From 7136e618e04e5df32af9ee12e20fecda25543fc5 Mon Sep 17 00:00:00 2001 From: guptakumarranjeet150 Date: Wed, 9 Sep 2026 03:20:26 +0545 Subject: [PATCH 1/2] fix(security): vendor stellar-sdk and freighter-api with strict CSP (closes #211) --- frontend/soroban.js | 10 +- frontend/vendor/freighter-api.js | 3 + frontend/vendor/integrity.json | 22 ++++ frontend/vendor/stellar-sdk.js | 172 +++++++++++++++++++++++++++++++ frontend/wallet.js | 8 +- netlify.toml | 7 ++ scripts/validate-frontend.mjs | 2 +- 7 files changed, 218 insertions(+), 6 deletions(-) create mode 100644 frontend/vendor/freighter-api.js create mode 100644 frontend/vendor/integrity.json create mode 100644 frontend/vendor/stellar-sdk.js diff --git a/frontend/soroban.js b/frontend/soroban.js index ffec828..ed7706c 100644 --- a/frontend/soroban.js +++ b/frontend/soroban.js @@ -1,3 +1,4 @@ +const LOCAL_SDK_PATH = "./vendor/stellar-sdk.js"; const SDK_URL = "https://esm.sh/@stellar/stellar-sdk@14.5.0?bundle"; export const TESTNET = Object.freeze({ @@ -11,9 +12,12 @@ let sdkPromise; function loadSdk() { if (!sdkPromise) { - sdkPromise = import(SDK_URL).catch((error) => { - sdkPromise = null; - throw new Error(`Stellar SDK could not load: ${error.message}`); + sdkPromise = import(LOCAL_SDK_PATH).catch((localErr) => { + console.warn("Vendored SDK load fallback to CDN:", localErr); + return import(SDK_URL).catch((error) => { + sdkPromise = null; + throw new Error(`Stellar SDK could not load: ${error.message}`); + }); }); } return sdkPromise; diff --git a/frontend/vendor/freighter-api.js b/frontend/vendor/freighter-api.js new file mode 100644 index 0000000..16d4b0a --- /dev/null +++ b/frontend/vendor/freighter-api.js @@ -0,0 +1,3 @@ +/* esm.sh - @stellar/freighter-api@5.0.0 */ +var Q=Object.create;var v=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var j=(E,t)=>()=>(t||E((t={exports:{}}).exports,t),t.exports);var x=(E,t,c,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let T of V(t))!X.call(E,T)&&T!==c&&v(E,T,{get:()=>t[T],enumerable:!(l=F(t,T))||l.enumerable});return E};var J=(E,t,c)=>(c=E!=null?Q(Y(E)):{},x(t||!E||!E.__esModule?v(c,"default",{value:E,enumerable:!0}):c,E));var b=j((O,U)=>{(function(E,t){typeof O=="object"&&typeof U=="object"?U.exports=t():typeof define=="function"&&define.amd?define([],t):typeof O=="object"?O.freighterApi=t():E.freighterApi=t()})(O,(()=>(()=>{"use strict";var E,t,c={d:(r,e)=>{for(var s in e)c.o(e,s)&&!c.o(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:e[s]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r:r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},l={};c.r(l),c.d(l,{WatchWalletChanges:()=>W,addToken:()=>h,default:()=>m,getAddress:()=>M,getNetwork:()=>G,getNetworkDetails:()=>f,isAllowed:()=>H,isBrowser:()=>i,isConnected:()=>L,requestAccess:()=>B,setAllowed:()=>K,signAuthEntry:()=>P,signMessage:()=>k,signTransaction:()=>y}),(function(r){r.CREATE_ACCOUNT="CREATE_ACCOUNT",r.FUND_ACCOUNT="FUND_ACCOUNT",r.ADD_ACCOUNT="ADD_ACCOUNT",r.IMPORT_ACCOUNT="IMPORT_ACCOUNT",r.IMPORT_HARDWARE_WALLET="IMPORT_HARDWARE_WALLET",r.LOAD_ACCOUNT="LOAD_ACCOUNT",r.MAKE_ACCOUNT_ACTIVE="MAKE_ACCOUNT_ACTIVE",r.UPDATE_ACCOUNT_NAME="UPDATE_ACCOUNT_NAME",r.GET_MNEMONIC_PHRASE="GET_MNEMONIC_PHRASE",r.CONFIRM_MNEMONIC_PHRASE="CONFIRM_MNEMONIC_PHRASE",r.CONFIRM_MIGRATED_MNEMONIC_PHRASE="CONFIRM_MIGRATED_MNEMONIC_PHRASE",r.RECOVER_ACCOUNT="RECOVER_ACCOUNT",r.CONFIRM_PASSWORD="CONFIRM_PASSWORD",r.REJECT_ACCESS="REJECT_ACCESS",r.GRANT_ACCESS="GRANT_ACCESS",r.ADD_TOKEN="ADD_TOKEN",r.SIGN_TRANSACTION="SIGN_TRANSACTION",r.SIGN_BLOB="SIGN_BLOB",r.SIGN_AUTH_ENTRY="SIGN_AUTH_ENTRY",r.HANDLE_SIGNED_HW_PAYLOAD="HANDLE_SIGNED_HW_PAYLOAD",r.REJECT_TRANSACTION="REJECT_TRANSACTION",r.SIGN_FREIGHTER_TRANSACTION="SIGN_FREIGHTER_TRANSACTION",r.SIGN_FREIGHTER_SOROBAN_TRANSACTION="SIGN_FREIGHTER_SOROBAN_TRANSACTION",r.ADD_RECENT_ADDRESS="ADD_RECENT_ADDRESS",r.LOAD_RECENT_ADDRESSES="LOAD_RECENT_ADDRESSES",r.LOAD_LAST_USED_ACCOUNT="LOAD_LAST_USED_ACCOUNT",r.SIGN_OUT="SIGN_OUT",r.SHOW_BACKUP_PHRASE="SHOW_BACKUP_PHRASE",r.SAVE_ALLOWLIST="SAVE_ALLOWLIST",r.SAVE_SETTINGS="SAVE_SETTINGS",r.SAVE_EXPERIMENTAL_FEATURES="SAVE_EXPERIMENTAL_FEATURES",r.LOAD_SETTINGS="LOAD_SETTINGS",r.GET_CACHED_ASSET_ICON="GET_CACHED_ASSET_ICON",r.CACHE_ASSET_ICON="CACHE_ASSET_ICON",r.GET_CACHED_ASSET_DOMAIN="GET_CACHED_ASSET_DOMAIN",r.CACHE_ASSET_DOMAIN="CACHE_ASSET_DOMAIN",r.GET_MEMO_REQUIRED_ACCOUNTS="GET_MEMO_REQUIRED_ACCOUNTS",r.ADD_CUSTOM_NETWORK="ADD_CUSTOM_NETWORK",r.CHANGE_NETWORK="CHANGE_NETWORK",r.REMOVE_CUSTOM_NETWORK="REMOVE_CUSTOM_NETWORK",r.EDIT_CUSTOM_NETWORK="EDIT_CUSTOM_NETWORK",r.RESET_EXP_DATA="RESET_EXP_DATA",r.ADD_TOKEN_ID="ADD_TOKEN_ID",r.GET_TOKEN_IDS="GET_TOKEN_IDS",r.REMOVE_TOKEN_ID="REMOVE_TOKEN_ID",r.GET_MIGRATABLE_ACCOUNTS="GET_MIGRATABLE_ACCOUNTS",r.GET_MIGRATED_MNEMONIC_PHRASE="GET_MIGRATED_MNEMONIC_PHRASE",r.MIGRATE_ACCOUNTS="MIGRATE_ACCOUNTS",r.ADD_ASSETS_LIST="ADD_ASSETS_LIST",r.MODIFY_ASSETS_LIST="MODIFY_ASSETS_LIST",r.CHANGE_ASSET_VISIBILITY="CHANGE_ASSET_VISIBILITY",r.GET_HIDDEN_ASSETS="GET_HIDDEN_ASSETS",r.GET_IS_ACCOUNT_MISMATCH="GET_IS_ACCOUNT_MISMATCH"})(E||(E={})),(function(r){r.REQUEST_ACCESS="REQUEST_ACCESS",r.REQUEST_PUBLIC_KEY="REQUEST_PUBLIC_KEY",r.SUBMIT_TOKEN="SUBMIT_TOKEN",r.SUBMIT_TRANSACTION="SUBMIT_TRANSACTION",r.SUBMIT_BLOB="SUBMIT_BLOB",r.SUBMIT_AUTH_ENTRY="SUBMIT_AUTH_ENTRY",r.REQUEST_NETWORK="REQUEST_NETWORK",r.REQUEST_NETWORK_DETAILS="REQUEST_NETWORK_DETAILS",r.REQUEST_CONNECTION_STATUS="REQUEST_CONNECTION_STATUS",r.REQUEST_ALLOWED_STATUS="REQUEST_ALLOWED_STATUS",r.SET_ALLOWED_STATUS="SET_ALLOWED_STATUS",r.REQUEST_USER_INFO="REQUEST_USER_INFO"})(t||(t={}));let T=r=>{let e=Date.now()+Math.random();return window.postMessage({source:"FREIGHTER_EXTERNAL_MSG_REQUEST",messageId:e,...r},window.location.origin),new Promise((s=>{let o=0;r.type!==t.REQUEST_CONNECTION_STATUS&&r.type!==t.REQUEST_PUBLIC_KEY||(o=setTimeout((()=>{s({isConnected:!1,publicKey:""}),window.removeEventListener("message",n)}),2e3));let n=_=>{var a,A;_.source===window&&((a=_?.data)===null||a===void 0?void 0:a.source)==="FREIGHTER_EXTERNAL_MSG_RESPONSE"&&((A=_?.data)===null||A===void 0?void 0:A.messagedId)===e&&(s(_.data),window.removeEventListener("message",n),clearTimeout(o))};window.addEventListener("message",n,!1)}))},S={code:-1,message:"Node environment is not supported"},R={code:-1,message:"The wallet encountered an internal error. Please try again or contact the wallet if the problem persists."},I=async()=>{let r;try{r=await T({type:t.REQUEST_ACCESS})}catch(s){console.error(s)}let{publicKey:e}=r||{publicKey:""};return{publicKey:e,error:r?.apiError}},g=async()=>{let r;try{r=await T({type:t.REQUEST_PUBLIC_KEY})}catch(e){console.error(e)}return{publicKey:r?.publicKey||"",error:r?.apiError}},p=async()=>{let r;try{r=await T({type:t.REQUEST_NETWORK_DETAILS})}catch(A){console.error(A)}let{networkDetails:e,apiError:s}=r||{networkDetails:{network:"",networkName:"",networkUrl:"",networkPassphrase:"",sorobanRpcUrl:void 0,apiError:""}},{network:o,networkUrl:n,networkPassphrase:_,sorobanRpcUrl:a}=e;return{network:o,networkUrl:n,networkPassphrase:_,sorobanRpcUrl:a,error:s}},w=async()=>{let r;try{r=await T({type:t.REQUEST_ALLOWED_STATUS})}catch(s){console.error(s)}let{isAllowed:e}=r||{isAllowed:!1};return{isAllowed:e,error:r?.apiError}},M=async()=>{let r="";if(i){let e=await g();return r=e.publicKey,e.error?{address:r,error:e.error}:{address:r}}return{address:r,error:S}},h=async r=>{if(i){let e=await(async s=>{let o;try{o=await T({contractId:s.contractId,networkPassphrase:s.networkPassphrase,type:t.SUBMIT_TOKEN})}catch{return{error:R}}return{contractId:o.contractId,error:o?.apiError}})(r);return e.error?{contractId:"",error:e.error}:{contractId:e.contractId||""}}return{contractId:"",error:S}},y=async(r,e)=>{if(i){let s=await(async(o,n)=>{let _,a,A,d;typeof n=="object"?(a=n.accountToSign,A=n.networkPassphrase):(_=n,a=void 0);try{d=await T({transactionXdr:o,network:_,networkPassphrase:A,accountToSign:a,type:t.SUBMIT_TRANSACTION})}catch{return{signedTransaction:"",signerAddress:"",error:R}}let{signedTransaction:N,signerAddress:C}=d;return{signedTransaction:N,signerAddress:C,error:d?.apiError}})(r,e);return s.error?{signedTxXdr:"",signerAddress:"",error:s.error}:{signedTxXdr:s.signedTransaction,signerAddress:s.signerAddress}}return{signedTxXdr:"",signerAddress:"",error:S}},k=async(r,e)=>{if(i){let{isAllowed:s}=await w();if(!s){let n=await I();if(n.error)return{signedMessage:null,signerAddress:"",error:n.error}}let o=await(async(n,_,a)=>{let A,d=(a||{}).address;try{A=await T({blob:n,accountToSign:d,apiVersion:"5.0.0",networkPassphrase:a?.networkPassphrase,type:t.SUBMIT_BLOB})}catch{return{signedMessage:null,signerAddress:"",error:R}}let{signedBlob:N,signerAddress:C}=A;return{signedMessage:N||null,signerAddress:C,error:A?.apiError}})(r,0,e);return o.error?{signedMessage:null,signerAddress:"",error:o.error}:{signedMessage:o.signedMessage,signerAddress:o.signerAddress}}return{signedMessage:null,signerAddress:"",error:S}},P=async(r,e)=>{if(i){let{isAllowed:s}=await w();if(!s){let n=await I();if(n.error)return{signedAuthEntry:null,signerAddress:"",error:n.error}}let o=await(async(n,_,a)=>{let A=(a||{}).address,d;try{d=await T({entryXdr:n,accountToSign:A,apiVersion:"5.0.0",networkPassphrase:a?.networkPassphrase,type:t.SUBMIT_AUTH_ENTRY})}catch(u){return console.error(u),{signedAuthEntry:null,signerAddress:"",error:R}}let{signedAuthEntry:N,signerAddress:C}=d;return{signedAuthEntry:N||null,signerAddress:C,error:d?.apiError}})(r,0,e);return o.error?{signedAuthEntry:null,signerAddress:"",error:o.error}:{signedAuthEntry:o.signedAuthEntry,signerAddress:o.signerAddress}}return{signedAuthEntry:null,signerAddress:"",error:S}},L=async()=>i?window.freighter?Promise.resolve({isConnected:window.freighter}):(async()=>{let r={isConnected:!1};try{r=await T({type:t.REQUEST_CONNECTION_STATUS})}catch(e){console.error(e)}return{isConnected:r.isConnected}})():{isConnected:!1,error:S},G=async()=>{if(i){let r=await(async()=>{let e;try{e=await T({type:t.REQUEST_NETWORK_DETAILS})}catch(o){console.error(o)}let{networkDetails:s}=e||{networkDetails:{network:"",networkPassphrase:""}};return{network:s?.network,networkPassphrase:s?.networkPassphrase,error:e?.apiError}})();return r.error?{network:"",networkPassphrase:"",error:r.error}:{network:r.network,networkPassphrase:r.networkPassphrase}}return{network:"",networkPassphrase:"",error:S}},f=async()=>{if(i){let r=await p();return r.error?{network:"",networkUrl:"",networkPassphrase:"",error:r.error}:{network:r.network,networkUrl:r.networkUrl,networkPassphrase:r.networkPassphrase,sorobanRpcUrl:r.sorobanRpcUrl}}return{network:"",networkUrl:"",networkPassphrase:"",error:S}},H=async()=>{let r=!1;if(i){let e=await w();return r=e.isAllowed,e.error?{isAllowed:r,error:e.error}:{isAllowed:r}}return{isAllowed:r,error:S}},K=async()=>{let r=!1;if(i){let e=await(async()=>{let s;try{s=await T({type:t.SET_ALLOWED_STATUS})}catch(n){console.error(n)}let{isAllowed:o}=s||{isAllowed:!1};return{isAllowed:o,error:s?.apiError}})();return r=e.isAllowed,e.error?{isAllowed:r,error:e.error}:{isAllowed:r}}return{isAllowed:r,error:S}},B=async()=>{let r="";if(i){let e=await I();return r=e.publicKey,e.error?{address:r,error:e.error}:{address:r}}return{address:r,error:S}};class W{constructor(e=3e3){this.fetchInfo=async s=>{if(!this.isRunning)return;let o=await g(),n=await p();(o.error||n.error)&&s({address:"",network:"",networkPassphrase:"",error:o.error||n.error}),this.currentAddress===o.publicKey&&this.currentNetwork===n.network&&this.currentNetworkPassphrase===n.networkPassphrase||(this.currentAddress=o.publicKey,this.currentNetwork=n.network,this.currentNetworkPassphrase=n.networkPassphrase,s({address:o.publicKey,network:n.network,networkPassphrase:n.networkPassphrase})),setTimeout((()=>this.fetchInfo(s)),this.timeout)},this.timeout=e,this.currentAddress="",this.currentNetwork="",this.currentNetworkPassphrase="",this.isRunning=!1}watch(e){return i?(this.isRunning=!0,this.fetchInfo(e),{}):{error:S}}stop(){this.isRunning=!1}}let i=typeof window<"u",m={getAddress:M,addToken:h,signTransaction:y,signMessage:k,signAuthEntry:P,isConnected:L,getNetwork:G,getNetworkDetails:f,isAllowed:H,setAllowed:K,requestAccess:B,WatchWalletChanges:W};return l})()))});var D=J(b()),z=D.default??D;export{z as default}; +//# sourceMappingURL=freighter-api.bundle.mjs.map \ No newline at end of file diff --git a/frontend/vendor/integrity.json b/frontend/vendor/integrity.json new file mode 100644 index 0000000..8fd784e --- /dev/null +++ b/frontend/vendor/integrity.json @@ -0,0 +1,22 @@ +{ + "version": "1.0.0", + "vendored_at": "2026-09-09T03:19:00Z", + "packages": { + "@stellar/stellar-sdk": { + "version": "14.5.0", + "source": "https://esm.sh/@stellar/stellar-sdk@14.5.0?bundle", + "vendored_file": "frontend/vendor/stellar-sdk.js", + "sha256": "sha256-a94982482ae4c644f6c485c6b121bdbb93471fb456f3ce7146d81daf64104140", + "sha384": "sha384-153704f526c9b7e4937c204c9a651bc641445c004c4ce581cc68a1377bf6d730443f6e20a6e359dd80a6a0410022e24f", + "size": 1020644 + }, + "@stellar/freighter-api": { + "version": "5.0.0", + "source": "https://esm.sh/@stellar/freighter-api@5.0.0?bundle", + "vendored_file": "frontend/vendor/freighter-api.js", + "sha256": "sha256-44a97accefe5e65168570784fe59efffd5211da2a56248658068dc97c67a3ae7", + "sha384": "sha384-c1e342302f7c22bfd6d4e818f44977552f86d833f24b31f71ccb00e1a5ac6f32d052ee1ec15e2933876654c1e4ec3faa", + "size": 10895 + } + } +} \ No newline at end of file diff --git a/frontend/vendor/stellar-sdk.js b/frontend/vendor/stellar-sdk.js new file mode 100644 index 0000000..a2d5865 --- /dev/null +++ b/frontend/vendor/stellar-sdk.js @@ -0,0 +1,172 @@ +/* esm.sh - @stellar/stellar-sdk@14.5.0 */ +import __Process$ from "/node/process.mjs"; +var __setImmediate$ = (cb, ...args) => ( { $t: setTimeout(cb, 0, ...args), [Symbol.dispose](){ clearTimeout(this.t) } }); +var ms=Object.create;var Fa=Object.defineProperty;var gs=Object.getOwnPropertyDescriptor;var vs=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,ws=Object.prototype.hasOwnProperty;var Ss=(_o,io)=>()=>(io||_o((io={exports:{}}).exports,io),io.exports);var As=(_o,io,wo,Dt)=>{if(io&&typeof io=="object"||typeof io=="function")for(let Ot of vs(io))!ws.call(_o,Ot)&&Ot!==wo&&Fa(_o,Ot,{get:()=>io[Ot],enumerable:!(Dt=gs(io,Ot))||Dt.enumerable});return _o};var Es=(_o,io,wo)=>(wo=_o!=null?ms(bs(_o)):{},As(io||!_o||!_o.__esModule?Fa(wo,"default",{value:_o,enumerable:!0}):wo,_o));var Da=Ss((qi,ua)=>{(function(_o,io){typeof qi=="object"&&typeof ua=="object"?ua.exports=io():typeof define=="function"&&define.amd?define("StellarSdk",[],io):typeof qi=="object"?qi.StellarSdk=io():_o.StellarSdk=io()})(self,()=>(()=>{var _o={41:(Dt,Ot,B)=>{"use strict";var P=B(655),Y=B(8068),a=B(9675),O=B(5795);Dt.exports=function(w,p,S){if(!w||typeof w!="object"&&typeof w!="function")throw new a("`obj` must be an object or a function`");if(typeof p!="string"&&typeof p!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,A=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],c=!!O&&O(w,p);if(P)P(w,p,{configurable:v===null&&c?c.configurable:!v,enumerable:o===null&&c?c.enumerable:!o,value:S,writable:A===null&&c?c.writable:!A});else{if(!l&&(o||A||v))throw new Y("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");w[p]=S}}},76:Dt=>{"use strict";Dt.exports=Function.prototype.call},251:(Dt,Ot)=>{Ot.read=function(B,P,Y,a,O){var w,p,S=8*O-a-1,o=(1<>1,v=-7,l=Y?O-1:0,c=Y?-1:1,R=B[P+l];for(l+=c,w=R&(1<<-v)-1,R>>=-v,v+=S;v>0;w=256*w+B[P+l],l+=c,v-=8);for(p=w&(1<<-v)-1,w>>=-v,v+=a;v>0;p=256*p+B[P+l],l+=c,v-=8);if(w===0)w=1-A;else{if(w===o)return p?NaN:1/0*(R?-1:1);p+=Math.pow(2,a),w-=A}return(R?-1:1)*p*Math.pow(2,w-a)},Ot.write=function(B,P,Y,a,O,w){var p,S,o,A=8*w-O-1,v=(1<>1,c=O===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=a?0:w-1,f=a?1:-1,E=P<0||P===0&&1/P<0?1:0;for(P=Math.abs(P),isNaN(P)||P===1/0?(S=isNaN(P)?1:0,p=v):(p=Math.floor(Math.log(P)/Math.LN2),P*(o=Math.pow(2,-p))<1&&(p--,o*=2),(P+=p+l>=1?c/o:c*Math.pow(2,1-l))*o>=2&&(p++,o/=2),p+l>=v?(S=0,p=v):p+l>=1?(S=(P*o-1)*Math.pow(2,O),p+=l):(S=P*Math.pow(2,l-1)*Math.pow(2,O),p=0));O>=8;B[Y+R]=255&S,R+=f,S/=256,O-=8);for(p=p<0;B[Y+R]=255&p,R+=f,p/=256,A-=8);B[Y+R-f]|=128*E}},345:(Dt,Ot,B)=>{Dt.exports=B(7007).EventEmitter},414:Dt=>{"use strict";Dt.exports=Math.round},453:(Dt,Ot,B)=>{"use strict";var P,Y=B(9612),a=B(9383),O=B(1237),w=B(9290),p=B(9538),S=B(8068),o=B(9675),A=B(5345),v=B(1514),l=B(8968),c=B(6188),R=B(8002),f=B(5880),E=B(414),k=B(3093),y=Function,_=function(rt){try{return y('"use strict"; return ('+rt+").constructor;")()}catch{}},m=B(5795),z=B(655),X=function(){throw new o},L=m?(function(){try{return X}catch{try{return m(arguments,"callee").get}catch{return X}}})():X,$=B(4039)(),ut=B(3628),xt=B(1064),vt=B(8648),Zt=B(1002),Bt=B(76),q={},ct=typeof Uint8Array<"u"&&ut?ut(Uint8Array):P,i={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?P:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?P:ArrayBuffer,"%ArrayIteratorPrototype%":$&&ut?ut([][Symbol.iterator]()):P,"%AsyncFromSyncIteratorPrototype%":P,"%AsyncFunction%":q,"%AsyncGenerator%":q,"%AsyncGeneratorFunction%":q,"%AsyncIteratorPrototype%":q,"%Atomics%":typeof Atomics>"u"?P:Atomics,"%BigInt%":typeof BigInt>"u"?P:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?P:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?P:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?P:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":O,"%Float16Array%":typeof Float16Array>"u"?P:Float16Array,"%Float32Array%":typeof Float32Array>"u"?P:Float32Array,"%Float64Array%":typeof Float64Array>"u"?P:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?P:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":q,"%Int8Array%":typeof Int8Array>"u"?P:Int8Array,"%Int16Array%":typeof Int16Array>"u"?P:Int16Array,"%Int32Array%":typeof Int32Array>"u"?P:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$&&ut?ut(ut([][Symbol.iterator]())):P,"%JSON%":typeof JSON=="object"?JSON:P,"%Map%":typeof Map>"u"?P:Map,"%MapIteratorPrototype%":typeof Map<"u"&&$&&ut?ut(new Map()[Symbol.iterator]()):P,"%Math%":Math,"%Number%":Number,"%Object%":Y,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?P:Promise,"%Proxy%":typeof Proxy>"u"?P:Proxy,"%RangeError%":w,"%ReferenceError%":p,"%Reflect%":typeof Reflect>"u"?P:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?P:Set,"%SetIteratorPrototype%":typeof Set<"u"&&$&&ut?ut(new Set()[Symbol.iterator]()):P,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?P:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$&&ut?ut(""[Symbol.iterator]()):P,"%Symbol%":$?Symbol:P,"%SyntaxError%":S,"%ThrowTypeError%":L,"%TypedArray%":ct,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?P:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?P:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?P:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?P:Uint32Array,"%URIError%":A,"%WeakMap%":typeof WeakMap>"u"?P:WeakMap,"%WeakRef%":typeof WeakRef>"u"?P:WeakRef,"%WeakSet%":typeof WeakSet>"u"?P:WeakSet,"%Function.prototype.call%":Bt,"%Function.prototype.apply%":Zt,"%Object.defineProperty%":z,"%Object.getPrototypeOf%":xt,"%Math.abs%":v,"%Math.floor%":l,"%Math.max%":c,"%Math.min%":R,"%Math.pow%":f,"%Math.round%":E,"%Math.sign%":k,"%Reflect.getPrototypeOf%":vt};if(ut)try{null.error}catch(rt){var T=ut(ut(rt));i["%Error.prototype%"]=T}var N=function rt(F){var lt;if(F==="%AsyncFunction%")lt=_("async function () {}");else if(F==="%GeneratorFunction%")lt=_("function* () {}");else if(F==="%AsyncGeneratorFunction%")lt=_("async function* () {}");else if(F==="%AsyncGenerator%"){var At=rt("%AsyncGeneratorFunction%");At&&(lt=At.prototype)}else if(F==="%AsyncIteratorPrototype%"){var Mt=rt("%AsyncGenerator%");Mt&&ut&&(lt=ut(Mt.prototype))}return i[F]=lt,lt},K={__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"]},dt=B(6743),j=B(9957),pt=dt.call(Bt,Array.prototype.concat),_t=dt.call(Zt,Array.prototype.splice),ot=dt.call(Bt,String.prototype.replace),it=dt.call(Bt,String.prototype.slice),Et=dt.call(Bt,RegExp.prototype.exec),jt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,et=/\\(\\)?/g,nt=function(rt,F){var lt,At=rt;if(j(K,At)&&(At="%"+(lt=K[At])[0]+"%"),j(i,At)){var Mt=i[At];if(Mt===q&&(Mt=N(At)),Mt===void 0&&!F)throw new o("intrinsic "+rt+" exists, but is not available. Please file an issue!");return{alias:lt,name:At,value:Mt}}throw new S("intrinsic "+rt+" does not exist!")};Dt.exports=function(rt,F){if(typeof rt!="string"||rt.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof F!="boolean")throw new o('"allowMissing" argument must be a boolean');if(Et(/^%?[^%]*%?$/,rt)===null)throw new S("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var lt=(function(M){var It=it(M,0,1),Jt=it(M,-1);if(It==="%"&&Jt!=="%")throw new S("invalid intrinsic syntax, expected closing `%`");if(Jt==="%"&&It!=="%")throw new S("invalid intrinsic syntax, expected opening `%`");var Wt=[];return ot(M,jt,function(xe,x,G,at){Wt[Wt.length]=G?ot(at,et,"$1"):x||xe}),Wt})(rt),At=lt.length>0?lt[0]:"",Mt=nt("%"+At+"%",F),$t=Mt.name,de=Mt.value,u=!1,g=Mt.alias;g&&(At=g[0],_t(lt,pt([0,1],g)));for(var I=1,W=!0;I=lt.length){var U=m(de,Q);de=(W=!!U)&&"get"in U&&!("originalValue"in U.get)?U.get:de[Q]}else W=j(de,Q),de=de[Q];W&&!u&&(i[$t]=de)}}return de}},487:(Dt,Ot,B)=>{"use strict";var P=B(6897),Y=B(655),a=B(3126),O=B(2205);Dt.exports=function(w){var p=a(arguments),S=w.length-(arguments.length-1);return P(p,1+(S>0?S:0),!0)},Y?Y(Dt.exports,"apply",{value:O}):Dt.exports.apply=O},507:(Dt,Ot,B)=>{"use strict";var P=B(453),Y=B(6556),a=B(8859),O=B(9675),w=P("%Map%",!0),p=Y("Map.prototype.get",!0),S=Y("Map.prototype.set",!0),o=Y("Map.prototype.has",!0),A=Y("Map.prototype.delete",!0),v=Y("Map.prototype.size",!0);Dt.exports=!!w&&function(){var l,c={assert:function(R){if(!c.has(R))throw new O("Side channel does not contain "+a(R))},delete:function(R){if(l){var f=A(l,R);return v(l)===0&&(l=void 0),f}return!1},get:function(R){if(l)return p(l,R)},has:function(R){return!!l&&o(l,R)},set:function(R,f){l||(l=new w),S(l,R,f)}};return c}},537:(Dt,Ot,B)=>{var P=Object.getOwnPropertyDescriptors||function(q){for(var ct=Object.keys(q),i={},T=0;T=N)return j;switch(j){case"%s":return String(T[i++]);case"%d":return Number(T[i++]);case"%j":try{return JSON.stringify(T[i++])}catch{return"[Circular]"}default:return j}}),dt=T[i];i"u")return function(){return Ot.deprecate(q,ct).apply(this,arguments)};var i=!1;return function(){if(!i){if(__Process$.throwDeprecation)throw new Error(ct);__Process$.traceDeprecation?console.trace(ct):console.error(ct),i=!0}return q.apply(this,arguments)}};var a={},O=/^$/;if(__Process$.env.NODE_DEBUG){var w=__Process$.env.NODE_DEBUG;w=w.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),O=new RegExp("^"+w+"$","i")}function p(q,ct){var i={seen:[],stylize:o};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),R(ct)?i.showHidden=ct:ct&&Ot._extend(i,ct),y(i.showHidden)&&(i.showHidden=!1),y(i.depth)&&(i.depth=2),y(i.colors)&&(i.colors=!1),y(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=S),A(i,q,i.depth)}function S(q,ct){var i=p.styles[ct];return i?"\x1B["+p.colors[i][0]+"m"+q+"\x1B["+p.colors[i][1]+"m":q}function o(q,ct){return q}function A(q,ct,i){if(q.customInspect&&ct&&L(ct.inspect)&&ct.inspect!==Ot.inspect&&(!ct.constructor||ct.constructor.prototype!==ct)){var T=ct.inspect(i,q);return k(T)||(T=A(q,T,i)),T}var N=(function(Et,jt){if(y(jt))return Et.stylize("undefined","undefined");if(k(jt)){var et="'"+JSON.stringify(jt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Et.stylize(et,"string")}if(E(jt))return Et.stylize(""+jt,"number");if(R(jt))return Et.stylize(""+jt,"boolean");if(f(jt))return Et.stylize("null","null")})(q,ct);if(N)return N;var K=Object.keys(ct),dt=(function(Et){var jt={};return Et.forEach(function(et,nt){jt[et]=!0}),jt})(K);if(q.showHidden&&(K=Object.getOwnPropertyNames(ct)),X(ct)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return v(ct);if(K.length===0){if(L(ct)){var j=ct.name?": "+ct.name:"";return q.stylize("[Function"+j+"]","special")}if(_(ct))return q.stylize(RegExp.prototype.toString.call(ct),"regexp");if(z(ct))return q.stylize(Date.prototype.toString.call(ct),"date");if(X(ct))return v(ct)}var pt,_t="",ot=!1,it=["{","}"];return c(ct)&&(ot=!0,it=["[","]"]),L(ct)&&(_t=" [Function"+(ct.name?": "+ct.name:"")+"]"),_(ct)&&(_t=" "+RegExp.prototype.toString.call(ct)),z(ct)&&(_t=" "+Date.prototype.toUTCString.call(ct)),X(ct)&&(_t=" "+v(ct)),K.length!==0||ot&&ct.length!=0?i<0?_(ct)?q.stylize(RegExp.prototype.toString.call(ct),"regexp"):q.stylize("[Object]","special"):(q.seen.push(ct),pt=ot?(function(Et,jt,et,nt,rt){for(var F=[],lt=0,At=jt.length;lt=0,rt+F.replace(/\u001b\[\d\d?m/g,"").length+1},0);return nt>60?et[0]+(jt===""?"":jt+` + `)+" "+Et.join(`, + `)+" "+et[1]:et[0]+jt+" "+Et.join(", ")+" "+et[1]})(pt,_t,it)):it[0]+_t+it[1]}function v(q){return"["+Error.prototype.toString.call(q)+"]"}function l(q,ct,i,T,N,K){var dt,j,pt;if((pt=Object.getOwnPropertyDescriptor(ct,N)||{value:ct[N]}).get?j=pt.set?q.stylize("[Getter/Setter]","special"):q.stylize("[Getter]","special"):pt.set&&(j=q.stylize("[Setter]","special")),vt(T,N)||(dt="["+N+"]"),j||(q.seen.indexOf(pt.value)<0?(j=f(i)?A(q,pt.value,null):A(q,pt.value,i-1)).indexOf(` +`)>-1&&(j=K?j.split(` +`).map(function(_t){return" "+_t}).join(` +`).slice(2):` +`+j.split(` +`).map(function(_t){return" "+_t}).join(` +`)):j=q.stylize("[Circular]","special")),y(dt)){if(K&&N.match(/^\d+$/))return j;(dt=JSON.stringify(""+N)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(dt=dt.slice(1,-1),dt=q.stylize(dt,"name")):(dt=dt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),dt=q.stylize(dt,"string"))}return dt+": "+j}function c(q){return Array.isArray(q)}function R(q){return typeof q=="boolean"}function f(q){return q===null}function E(q){return typeof q=="number"}function k(q){return typeof q=="string"}function y(q){return q===void 0}function _(q){return m(q)&&$(q)==="[object RegExp]"}function m(q){return typeof q=="object"&&q!==null}function z(q){return m(q)&&$(q)==="[object Date]"}function X(q){return m(q)&&($(q)==="[object Error]"||q instanceof Error)}function L(q){return typeof q=="function"}function $(q){return Object.prototype.toString.call(q)}function ut(q){return q<10?"0"+q.toString(10):q.toString(10)}Ot.debuglog=function(q){if(q=q.toUpperCase(),!a[q])if(O.test(q)){var ct=__Process$.pid;a[q]=function(){var i=Ot.format.apply(Ot,arguments);console.error("%s %d: %s",q,ct,i)}}else a[q]=function(){};return a[q]},Ot.inspect=p,p.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]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Ot.types=B(9032),Ot.isArray=c,Ot.isBoolean=R,Ot.isNull=f,Ot.isNullOrUndefined=function(q){return q==null},Ot.isNumber=E,Ot.isString=k,Ot.isSymbol=function(q){return typeof q=="symbol"},Ot.isUndefined=y,Ot.isRegExp=_,Ot.types.isRegExp=_,Ot.isObject=m,Ot.isDate=z,Ot.types.isDate=z,Ot.isError=X,Ot.types.isNativeError=X,Ot.isFunction=L,Ot.isPrimitive=function(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||q===void 0},Ot.isBuffer=B(1135);var xt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function vt(q,ct){return Object.prototype.hasOwnProperty.call(q,ct)}Ot.log=function(){var q,ct;console.log("%s - %s",(q=new Date,ct=[ut(q.getHours()),ut(q.getMinutes()),ut(q.getSeconds())].join(":"),[q.getDate(),xt[q.getMonth()],ct].join(" ")),Ot.format.apply(Ot,arguments))},Ot.inherits=B(6698),Ot._extend=function(q,ct){if(!ct||!m(ct))return q;for(var i=Object.keys(ct),T=i.length;T--;)q[i[T]]=ct[i[T]];return q};var Zt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function Bt(q,ct){if(!q){var i=new Error("Promise was rejected with a falsy value");i.reason=q,q=i}return ct(q)}Ot.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(Zt&&q[Zt]){var ct;if(typeof(ct=q[Zt])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ct,Zt,{value:ct,enumerable:!1,writable:!1,configurable:!0}),ct}function ct(){for(var i,T,N=new Promise(function(j,pt){i=j,T=pt}),K=[],dt=0;dt{"use strict";var P=B(655),Y=function(){return!!P};Y.hasArrayLengthDefineBug=function(){if(!P)return null;try{return P([],"length",{value:1}).length!==1}catch{return!0}},Dt.exports=Y},655:Dt=>{"use strict";var Ot=Object.defineProperty||!1;if(Ot)try{Ot({},"a",{value:1})}catch{Ot=!1}Dt.exports=Ot},784:(Dt,Ot,B)=>{"use strict";B.d(Ot,{$D:()=>l,$E:()=>R,Af:()=>S,WC:()=>o,fG:()=>v,jr:()=>c,tR:()=>A});var P=B(8950),Y=B(4076);function a(f){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},a(f)}function O(f,E){var k=Object.keys(f);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(f);E&&(y=y.filter(function(_){return Object.getOwnPropertyDescriptor(f,_).enumerable})),k.push.apply(k,y)}return k}function w(f){for(var E=1;E0&&{diagnosticEvents:k.map(function(y){return P.xdr.DiagnosticEvent.fromXDR(y,"base64")})}),{},{errorResult:P.xdr.TransactionResult.fromXDR(E,"base64")}):w({},f)}function o(f){var E,k,y,_,m=P.xdr.TransactionMeta.fromXDR(f.resultMetaXdr,"base64"),z={ledger:f.ledger,createdAt:f.createdAt,applicationOrder:f.applicationOrder,feeBump:f.feeBump,envelopeXdr:P.xdr.TransactionEnvelope.fromXDR(f.envelopeXdr,"base64"),resultXdr:P.xdr.TransactionResult.fromXDR(f.resultXdr,"base64"),resultMetaXdr:m,events:{contractEventsXdr:((E=(k=f.events)===null||k===void 0?void 0:k.contractEventsXdr)!==null&&E!==void 0?E:[]).map(function(ut){return ut.map(function(xt){return P.xdr.ContractEvent.fromXDR(xt,"base64")})}),transactionEventsXdr:((y=(_=f.events)===null||_===void 0?void 0:_.transactionEventsXdr)!==null&&y!==void 0?y:[]).map(function(ut){return P.xdr.TransactionEvent.fromXDR(ut,"base64")})}};switch(m.switch()){case 3:case 4:var X,L,$=m.value();$.sorobanMeta()!==null&&(z.returnValue=(X=(L=$.sorobanMeta())===null||L===void 0?void 0:L.returnValue())!==null&&X!==void 0?X:void 0)}return f.diagnosticEventsXdr&&(z.diagnosticEventsXdr=f.diagnosticEventsXdr.map(function(ut){return P.xdr.DiagnosticEvent.fromXDR(ut,"base64")})),z}function A(f){return w({status:f.status,txHash:f.txHash},o(f))}function v(f){var E;return{latestLedger:f.latestLedger,oldestLedger:f.oldestLedger,latestLedgerCloseTime:f.latestLedgerCloseTime,oldestLedgerCloseTime:f.oldestLedgerCloseTime,cursor:f.cursor,events:((E=f.events)!==null&&E!==void 0?E:[]).map(function(k){var y,_=w({},k);return delete _.contractId,w(w(w({},_),k.contractId!==""&&{contractId:new P.Contract(k.contractId)}),{},{topic:((y=k.topic)!==null&&y!==void 0?y:[]).map(function(m){return P.xdr.ScVal.fromXDR(m,"base64")}),value:P.xdr.ScVal.fromXDR(k.value,"base64")})})}}function l(f){var E;return{latestLedger:f.latestLedger,entries:((E=f.entries)!==null&&E!==void 0?E:[]).map(function(k){if(!k.key||!k.xdr)throw new TypeError("invalid ledger entry: ".concat(JSON.stringify(k)));return w({lastModifiedLedgerSeq:k.lastModifiedLedgerSeq,key:P.xdr.LedgerKey.fromXDR(k.key,"base64"),val:P.xdr.LedgerEntryData.fromXDR(k.xdr,"base64")},k.liveUntilLedgerSeq!==void 0&&{liveUntilLedgerSeq:k.liveUntilLedgerSeq})})}}function c(f){var E,k;if(!Y.j.isSimulationRaw(f))return f;var y={_parsed:!0,id:f.id,latestLedger:f.latestLedger,events:(E=(k=f.events)===null||k===void 0?void 0:k.map(function(_){return P.xdr.DiagnosticEvent.fromXDR(_,"base64")}))!==null&&E!==void 0?E:[]};return typeof f.error=="string"?w(w({},y),{},{error:f.error}):(function(_,m){var z,X,L,$,ut,xt=w(w(w({},m),{},{transactionData:new P.SorobanDataBuilder(_.transactionData),minResourceFee:_.minResourceFee},(z=(X=_.results)===null||X===void 0?void 0:X.length)!==null&&z!==void 0&&z&&{result:_.results.map(function(vt){var Zt;return{auth:((Zt=vt.auth)!==null&&Zt!==void 0?Zt:[]).map(function(Bt){return P.xdr.SorobanAuthorizationEntry.fromXDR(Bt,"base64")}),retval:vt.xdr?P.xdr.ScVal.fromXDR(vt.xdr,"base64"):P.xdr.ScVal.scvVoid()}})[0]}),(L=($=_.stateChanges)===null||$===void 0?void 0:$.length)!==null&&L!==void 0&&L&&{stateChanges:(ut=_.stateChanges)===null||ut===void 0?void 0:ut.map(function(vt){return{type:vt.type,key:P.xdr.LedgerKey.fromXDR(vt.key,"base64"),before:vt.before?P.xdr.LedgerEntry.fromXDR(vt.before,"base64"):null,after:vt.after?P.xdr.LedgerEntry.fromXDR(vt.after,"base64"):null}})});return _.restorePreamble&&_.restorePreamble.transactionData!==""?w(w({},xt),{},{restorePreamble:{minResourceFee:_.restorePreamble.minResourceFee,transactionData:new P.SorobanDataBuilder(_.restorePreamble.transactionData)}}):xt})(f,y)}function R(f){var E;if(!f.metadataXdr||!f.headerXdr)throw E=f.metadataXdr||f.headerXdr?f.metadataXdr?"headerXdr":"metadataXdr":"metadataXdr and headerXdr",new TypeError("invalid ledger missing fields: ".concat(E));var k=P.xdr.LedgerCloseMeta.fromXDR(f.metadataXdr,"base64"),y=P.xdr.LedgerHeaderHistoryEntry.fromXDR(f.headerXdr,"base64");return{hash:f.hash,sequence:f.sequence,ledgerCloseTime:f.ledgerCloseTime,metadataXdr:k,headerXdr:y}}},920:(Dt,Ot,B)=>{"use strict";var P=B(9675),Y=B(8859),a=B(4803),O=B(507),w=B(2271)||O||a;Dt.exports=function(){var p,S={assert:function(o){if(!S.has(o))throw new P("Side channel does not contain "+Y(o))},delete:function(o){return!!p&&p.delete(o)},get:function(o){return p&&p.get(o)},has:function(o){return!!p&&p.has(o)},set:function(o,A){p||(p=w()),p.set(o,A)}};return S}},1002:Dt=>{"use strict";Dt.exports=Function.prototype.apply},1064:(Dt,Ot,B)=>{"use strict";var P=B(9612);Dt.exports=P.getPrototypeOf||null},1083:(Dt,Ot,B)=>{var P=B(1568),Y=B(8835),a=Dt.exports;for(var O in P)P.hasOwnProperty(O)&&(a[O]=P[O]);function w(p){if(typeof p=="string"&&(p=Y.parse(p)),p.protocol||(p.protocol="https:"),p.protocol!=="https:")throw new Error('Protocol "'+p.protocol+'" not supported. Expected "https:"');return p}a.request=function(p,S){return p=w(p),P.request.call(this,p,S)},a.get=function(p,S){return p=w(p),P.get.call(this,p,S)}},1135:Dt=>{Dt.exports=function(Ot){return Ot&&typeof Ot=="object"&&typeof Ot.copy=="function"&&typeof Ot.fill=="function"&&typeof Ot.readUInt8=="function"}},1237:Dt=>{"use strict";Dt.exports=EvalError},1270:function(Dt,Ot,B){var P;Dt=B.nmd(Dt),(function(){Ot&&Ot.nodeType,Dt&&Dt.nodeType;var Y=typeof B.g=="object"&&B.g;Y.global!==Y&&Y.window!==Y&&Y.self;var a,O=2147483647,w=36,p=/^xn--/,S=/[^\x20-\x7E]/,o=/[\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"},v=Math.floor,l=String.fromCharCode;function c(L){throw new RangeError(A[L])}function R(L,$){for(var ut=L.length,xt=[];ut--;)xt[ut]=$(L[ut]);return xt}function f(L,$){var ut=L.split("@"),xt="";return ut.length>1&&(xt=ut[0]+"@",L=ut[1]),xt+R((L=L.replace(o,".")).split("."),$).join(".")}function E(L){for(var $,ut,xt=[],vt=0,Zt=L.length;vt=55296&&$<=56319&&vt65535&&(ut+=l(($-=65536)>>>10&1023|55296),$=56320|1023&$),ut+=l($)}).join("")}function y(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:w}function _(L,$){return L+22+75*(L<26)-(($!=0)<<5)}function m(L,$,ut){var xt=0;for(L=ut?v(L/700):L>>1,L+=v(L/$);L>455;xt+=w)L=v(L/35);return v(xt+36*L/(L+38))}function z(L){var $,ut,xt,vt,Zt,Bt,q,ct,i,T,N=[],K=L.length,dt=0,j=128,pt=72;for((ut=L.lastIndexOf("-"))<0&&(ut=0),xt=0;xt=128&&c("not-basic"),N.push(L.charCodeAt(xt));for(vt=ut>0?ut+1:0;vt=K&&c("invalid-input"),((ct=y(L.charCodeAt(vt++)))>=w||ct>v((O-dt)/Bt))&&c("overflow"),dt+=ct*Bt,!(ct<(i=q<=pt?1:q>=pt+26?26:q-pt));q+=w)Bt>v(O/(T=w-i))&&c("overflow"),Bt*=T;pt=m(dt-Zt,$=N.length+1,Zt==0),v(dt/$)>O-j&&c("overflow"),j+=v(dt/$),dt%=$,N.splice(dt++,0,j)}return k(N)}function X(L){var $,ut,xt,vt,Zt,Bt,q,ct,i,T,N,K,dt,j,pt,_t=[];for(K=(L=E(L)).length,$=128,ut=0,Zt=72,Bt=0;Bt=$&&Nv((O-ut)/(dt=xt+1))&&c("overflow"),ut+=(q-$)*dt,$=q,Bt=0;BtO&&c("overflow"),N==$){for(ct=ut,i=w;!(ct<(T=i<=Zt?1:i>=Zt+26?26:i-Zt));i+=w)pt=ct-T,j=w-T,_t.push(l(_(T+pt%j,0))),ct=v(pt/j);_t.push(l(_(ct,0))),Zt=m(ut,dt,xt==vt),ut=0,++xt}++ut,++$}return _t.join("")}a={version:"1.4.1",ucs2:{decode:E,encode:k},decode:z,encode:X,toASCII:function(L){return f(L,function($){return S.test($)?"xn--"+X($):$})},toUnicode:function(L){return f(L,function($){return p.test($)?z($.slice(4).toLowerCase()):$})}},(P=function(){return a}.call(Ot,B,Ot,Dt))===void 0||(Dt.exports=P)})()},1293:(Dt,Ot,B)=>{var P=B(5546),Y=B(2708);Dt.exports={parse:function(a){var O=P.parse(a.toString());return Y.compile(O)}}},1333:Dt=>{"use strict";Dt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var Ot={},B=Symbol("test"),P=Object(B);if(typeof B=="string"||Object.prototype.toString.call(B)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;for(var Y in Ot[B]=42,Ot)return!1;if(typeof Object.keys=="function"&&Object.keys(Ot).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(Ot).length!==0)return!1;var a=Object.getOwnPropertySymbols(Ot);if(a.length!==1||a[0]!==B||!Object.prototype.propertyIsEnumerable.call(Ot,B))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var O=Object.getOwnPropertyDescriptor(Ot,B);if(O.value!==42||O.enumerable!==!0)return!1}return!0}},1430:function(Dt,Ot,B){var P,Y;(function(a,O){"use strict";Dt.exports?Dt.exports=O():(Y=typeof(P=O)=="function"?P.call(Ot,B,Ot,Dt):P)===void 0||(Dt.exports=Y)})(0,function(a){"use strict";var O=a&&a.IPv6;return{best:function(w){var p,S,o=w.toLowerCase().split(":"),A=o.length,v=8;for(o[0]===""&&o[1]===""&&o[2]===""?(o.shift(),o.shift()):o[0]===""&&o[1]===""?o.shift():o[A-1]===""&&o[A-2]===""&&o.pop(),o[(A=o.length)-1].indexOf(".")!==-1&&(v=7),p=0;p1;c++)S.splice(0,1);o[l]=S.join("")}var R=-1,f=0,E=0,k=-1,y=!1;for(l=0;lf&&(R=k,f=E)):o[l]==="0"&&(y=!0,k=l,E=1);E>f&&(R=k,f=E),f>1&&o.splice(R,f,""),A=o.length;var _="";for(o[0]===""&&(_=":"),l=0;l{"use strict";Dt.exports=Math.abs},1568:(Dt,Ot,B)=>{var P=B(5537),Y=B(6917),a=B(7510),O=B(6866),w=B(8835),p=Ot;p.request=function(S,o){S=typeof S=="string"?w.parse(S):a(S);var A=B.g.location.protocol.search(/^https?:$/)===-1?"http:":"",v=S.protocol||A,l=S.hostname||S.host,c=S.port,R=S.path||"/";l&&l.indexOf(":")!==-1&&(l="["+l+"]"),S.url=(l?v+"//"+l:"")+(c?":"+c:"")+R,S.method=(S.method||"GET").toUpperCase(),S.headers=S.headers||{};var f=new P(S);return o&&f.on("response",o),f},p.get=function(S,o){var A=p.request(S,o);return A.end(),A},p.ClientRequest=P,p.IncomingMessage=Y.IncomingMessage,p.Agent=function(){},p.Agent.defaultMaxSockets=4,p.globalAgent=new p.Agent,p.STATUS_CODES=O,p.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"]},1731:(Dt,Ot,B)=>{var P=B(8287).Buffer,Y=B(8835).parse,a=B(7007),O=B(1083),w=B(1568),p=B(537),S=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],o=[239,187,191],A=262144,v=/^(cookie|authorization)$/i;function l(f,E){var k=l.CONNECTING,y=E&&E.headers,_=!1;Object.defineProperty(this,"readyState",{get:function(){return k}}),Object.defineProperty(this,"url",{get:function(){return f}});var m,z=this;function X(ct){k!==l.CLOSED&&(k=l.CONNECTING,Bt("error",new c("error",{message:ct})),vt&&(f=vt,vt=null,_=!1),setTimeout(function(){k!==l.CONNECTING||z.connectionInProgress||(z.connectionInProgress=!0,Zt())},z.reconnectInterval))}z.reconnectInterval=1e3,z.connectionInProgress=!1;var L="";y&&y["Last-Event-ID"]&&(L=y["Last-Event-ID"],delete y["Last-Event-ID"]);var $=!1,ut="",xt="",vt=null;function Zt(){var ct=Y(f),i=ct.protocol==="https:";if(ct.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},L&&(ct.headers["Last-Event-ID"]=L),y){var T=_?(function(_t){var ot={};for(var it in _t)v.test(it)||(ot[it]=_t[it]);return ot})(y):y;for(var N in T){var K=T[N];K&&(ct.headers[N]=K)}}if(ct.rejectUnauthorized=!(E&&!E.rejectUnauthorized),E&&E.createConnection!==void 0&&(ct.createConnection=E.createConnection),E&&E.proxy){var dt=Y(E.proxy);i=dt.protocol==="https:",ct.protocol=i?"https:":"http:",ct.path=f,ct.headers.Host=ct.host,ct.hostname=dt.hostname,ct.host=dt.host,ct.port=dt.port}if(E&&E.https){for(var j in E.https)if(S.indexOf(j)!==-1){var pt=E.https[j];pt!==void 0&&(ct[j]=pt)}}E&&E.withCredentials!==void 0&&(ct.withCredentials=E.withCredentials),m=(i?O:w).request(ct,function(_t){if(z.connectionInProgress=!1,_t.statusCode===500||_t.statusCode===502||_t.statusCode===503||_t.statusCode===504)return Bt("error",new c("error",{status:_t.statusCode,message:_t.statusMessage})),void X();if(_t.statusCode===301||_t.statusCode===302||_t.statusCode===307){var ot=_t.headers.location;if(!ot)return void Bt("error",new c("error",{status:_t.statusCode,message:_t.statusMessage}));var it=new URL(f).origin,Et=new URL(ot).origin;return _=it!==Et,_t.statusCode===307&&(vt=f),f=ot,void __Process$.nextTick(Zt)}if(_t.statusCode!==200)return Bt("error",new c("error",{status:_t.statusCode,message:_t.statusMessage})),z.close();var jt,et;k=l.OPEN,_t.on("close",function(){_t.removeAllListeners("close"),_t.removeAllListeners("end"),X()}),_t.on("end",function(){_t.removeAllListeners("close"),_t.removeAllListeners("end"),X()}),Bt("open",new c("open"));var nt=0,rt=-1,F=0,lt=0;_t.on("data",function(At){jt?(At.length>jt.length-lt&&((F=2*jt.length+At.length)>A&&(F=jt.length+At.length+A),et=P.alloc(F),jt.copy(et,0,0,lt),jt=et),At.copy(jt,lt),lt+=At.length):((function(W){return o.every(function(Q,St){return W[St]===Q})})(jt=At)&&(jt=jt.slice(o.length)),lt=jt.length);for(var Mt=0,$t=lt;Mt<$t;){$&&(jt[Mt]===10&&++Mt,$=!1);for(var de,u=-1,g=rt,I=nt;u<0&&I<$t;++I)(de=jt[I])===58?g<0&&(g=I-Mt):de===13?($=!0,u=I-Mt):de===10&&(u=I-Mt);if(u<0){nt=$t-Mt,rt=g;break}nt=0,rt=-1,q(jt,Mt,g,u),Mt+=u+1}Mt===$t?(jt=void 0,lt=0):Mt>0&&(jt=jt.slice(Mt,lt),lt=jt.length)})}),m.on("error",function(_t){z.connectionInProgress=!1,X(_t.message)}),m.setNoDelay&&m.setNoDelay(!0),m.end()}function Bt(){z.listeners(arguments[0]).length>0&&z.emit.apply(z,arguments)}function q(ct,i,T,N){if(N===0){if(ut.length>0){var K=xt||"message";Bt(K,new R(K,{data:ut.slice(0,-1),lastEventId:L,origin:new URL(f).origin})),ut=""}xt=void 0}else if(T>0){var dt=T<0,j=0,pt=ct.slice(i,i+(dt?N:T)).toString();i+=j=dt?N:ct[i+T+1]!==32?T+1:T+2;var _t=N-j,ot=ct.slice(i,i+_t).toString();if(pt==="data")ut+=ot+` +`;else if(pt==="event")xt=ot;else if(pt==="id")L=ot;else if(pt==="retry"){var it=parseInt(ot,10);Number.isNaN(it)||(z.reconnectInterval=it)}}}Zt(),this._close=function(){k!==l.CLOSED&&(k=l.CLOSED,m.abort&&m.abort(),m.xhr&&m.xhr.abort&&m.xhr.abort())}}function c(f,E){if(Object.defineProperty(this,"type",{writable:!1,value:f,enumerable:!0}),E)for(var k in E)E.hasOwnProperty(k)&&Object.defineProperty(this,k,{writable:!1,value:E[k],enumerable:!0})}function R(f,E){for(var k in Object.defineProperty(this,"type",{writable:!1,value:f,enumerable:!0}),E)E.hasOwnProperty(k)&&Object.defineProperty(this,k,{writable:!1,value:E[k],enumerable:!0})}Dt.exports=l,p.inherits(l,a.EventEmitter),l.prototype.constructor=l,["open","error","message"].forEach(function(f){Object.defineProperty(l.prototype,"on"+f,{get:function(){var E=this.listeners(f)[0];return E?E._listener?E._listener:E:void 0},set:function(E){this.removeAllListeners(f),this.addEventListener(f,E)}})}),Object.defineProperty(l,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(l,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(l,"CLOSED",{enumerable:!0,value:2}),l.prototype.CONNECTING=0,l.prototype.OPEN=1,l.prototype.CLOSED=2,l.prototype.close=function(){this._close()},l.prototype.addEventListener=function(f,E){typeof E=="function"&&(E._listener=E,this.on(f,E))},l.prototype.dispatchEvent=function(f){if(!f.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(f.type,f.detail)},l.prototype.removeEventListener=function(f,E){typeof E=="function"&&(E._listener=void 0,this.removeListener(f,E))}},1924:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{StellarBase:()=>O,default:()=>w,httpClient:()=>P.ok});var P=B(9983),Y=B(4356),a={};for(let p in Y)["default","StellarBase","httpClient"].indexOf(p)<0&&(a[p]=()=>Y[p]);B.d(Ot,a);var O=B(8950);let w=(Dt=B.hmd(Dt)).exports},2205:(Dt,Ot,B)=>{"use strict";var P=B(6743),Y=B(1002),a=B(3144);Dt.exports=function(){return a(P,Y,arguments)}},2271:(Dt,Ot,B)=>{"use strict";var P=B(453),Y=B(6556),a=B(8859),O=B(507),w=B(9675),p=P("%WeakMap%",!0),S=Y("WeakMap.prototype.get",!0),o=Y("WeakMap.prototype.set",!0),A=Y("WeakMap.prototype.has",!0),v=Y("WeakMap.prototype.delete",!0);Dt.exports=p?function(){var l,c,R={assert:function(f){if(!R.has(f))throw new w("Side channel does not contain "+a(f))},delete:function(f){if(p&&f&&(typeof f=="object"||typeof f=="function")){if(l)return v(l,f)}else if(O&&c)return c.delete(f);return!1},get:function(f){return p&&f&&(typeof f=="object"||typeof f=="function")&&l?S(l,f):c&&c.get(f)},has:function(f){return p&&f&&(typeof f=="object"||typeof f=="function")&&l?A(l,f):!!c&&c.has(f)},set:function(f,E){p&&f&&(typeof f=="object"||typeof f=="function")?(l||(l=new p),o(l,f,E)):O&&(c||(c=O()),c.set(f,E))}};return R}:O},2634:()=>{},2642:(Dt,Ot,B)=>{"use strict";var P=B(7720),Y=Object.prototype.hasOwnProperty,a=Array.isArray,O={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:P.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},w=function(o){return o.replace(/&#(\d+);/g,function(A,v){return String.fromCharCode(parseInt(v,10))})},p=function(o,A,v){if(o&&typeof o=="string"&&A.comma&&o.indexOf(",")>-1)return o.split(",");if(A.throwOnLimitExceeded&&v>=A.arrayLimit)throw new RangeError("Array limit exceeded. Only "+A.arrayLimit+" element"+(A.arrayLimit===1?"":"s")+" allowed in an array.");return o},S=function(o,A,v,l){if(o){var c=v.allowDots?o.replace(/\.([^.[]+)/g,"[$1]"):o,R=/(\[[^[\]]*])/g,f=v.depth>0&&/(\[[^[\]]*])/.exec(c),E=f?c.slice(0,f.index):c,k=[];if(E){if(!v.plainObjects&&Y.call(Object.prototype,E)&&!v.allowPrototypes)return;k.push(E)}for(var y=0;v.depth>0&&(f=R.exec(c))!==null&&y0&&_[_.length-1]==="[]"){var $=_.slice(0,-1).join("");L=Array.isArray(m)&&m[$]?m[$].length:0}for(var ut=X?m:p(m,z,L),xt=_.length-1;xt>=0;--xt){var vt,Zt=_[xt];if(Zt==="[]"&&z.parseArrays)vt=z.allowEmptyArrays&&(ut===""||z.strictNullHandling&&ut===null)?[]:P.combine([],ut);else{vt=z.plainObjects?{__proto__:null}:{};var Bt=Zt.charAt(0)==="["&&Zt.charAt(Zt.length-1)==="]"?Zt.slice(1,-1):Zt,q=z.decodeDotInKeys?Bt.replace(/%2E/g,"."):Bt,ct=parseInt(q,10);z.parseArrays||q!==""?!isNaN(ct)&&Zt!==q&&String(ct)===q&&ct>=0&&z.parseArrays&&ct<=z.arrayLimit?(vt=[])[ct]=ut:q!=="__proto__"&&(vt[q]=ut):vt={0:ut}}ut=vt}return ut})(k,A,v,l)}};Dt.exports=function(o,A){var v=(function(y){if(!y)return O;if(y.allowEmptyArrays!==void 0&&typeof y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(y.decodeDotInKeys!==void 0&&typeof y.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(y.decoder!==null&&y.decoder!==void 0&&typeof y.decoder!="function")throw new TypeError("Decoder has to be a function.");if(y.charset!==void 0&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(y.throwOnLimitExceeded!==void 0&&typeof y.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var _=y.charset===void 0?O.charset:y.charset,m=y.duplicates===void 0?O.duplicates:y.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:y.allowDots===void 0?y.decodeDotInKeys===!0||O.allowDots:!!y.allowDots,allowEmptyArrays:typeof y.allowEmptyArrays=="boolean"?!!y.allowEmptyArrays:O.allowEmptyArrays,allowPrototypes:typeof y.allowPrototypes=="boolean"?y.allowPrototypes:O.allowPrototypes,allowSparse:typeof y.allowSparse=="boolean"?y.allowSparse:O.allowSparse,arrayLimit:typeof y.arrayLimit=="number"?y.arrayLimit:O.arrayLimit,charset:_,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:O.charsetSentinel,comma:typeof y.comma=="boolean"?y.comma:O.comma,decodeDotInKeys:typeof y.decodeDotInKeys=="boolean"?y.decodeDotInKeys:O.decodeDotInKeys,decoder:typeof y.decoder=="function"?y.decoder:O.decoder,delimiter:typeof y.delimiter=="string"||P.isRegExp(y.delimiter)?y.delimiter:O.delimiter,depth:typeof y.depth=="number"||y.depth===!1?+y.depth:O.depth,duplicates:m,ignoreQueryPrefix:y.ignoreQueryPrefix===!0,interpretNumericEntities:typeof y.interpretNumericEntities=="boolean"?y.interpretNumericEntities:O.interpretNumericEntities,parameterLimit:typeof y.parameterLimit=="number"?y.parameterLimit:O.parameterLimit,parseArrays:y.parseArrays!==!1,plainObjects:typeof y.plainObjects=="boolean"?y.plainObjects:O.plainObjects,strictDepth:typeof y.strictDepth=="boolean"?!!y.strictDepth:O.strictDepth,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:O.strictNullHandling,throwOnLimitExceeded:typeof y.throwOnLimitExceeded=="boolean"&&y.throwOnLimitExceeded}})(A);if(o===""||o==null)return v.plainObjects?{__proto__:null}:{};for(var l=typeof o=="string"?(function(y,_){var m={__proto__:null},z=_.ignoreQueryPrefix?y.replace(/^\?/,""):y;z=z.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var X=_.parameterLimit===1/0?void 0:_.parameterLimit,L=z.split(_.delimiter,_.throwOnLimitExceeded?X+1:X);if(_.throwOnLimitExceeded&&L.length>X)throw new RangeError("Parameter limit exceeded. Only "+X+" parameter"+(X===1?"":"s")+" allowed.");var $,ut=-1,xt=_.charset;if(_.charsetSentinel)for($=0;$-1&&(Zt=a(Zt)?[Zt]:Zt);var i=Y.call(m,vt);i&&_.duplicates==="combine"?m[vt]=P.combine(m[vt],Zt):i&&_.duplicates!=="last"||(m[vt]=Zt)}return m})(o,v):o,c=v.plainObjects?{__proto__:null}:{},R=Object.keys(l),f=0;f{"use strict";var P=B(9600),Y=Object.prototype.toString,a=Object.prototype.hasOwnProperty;Dt.exports=function(O,w,p){if(!P(w))throw new TypeError("iterator must be a function");var S,o;arguments.length>=3&&(S=p),o=O,Y.call(o)==="[object Array]"?(function(A,v,l){for(var c=0,R=A.length;c{"use strict";Dt.exports={compile:function(Ot){var B=[],P=[],Y="",a=Object.create(null),O=a;return(function(f){for(var E,k=0;k-1&&w("Cannot redefine existing key '"+z+"'.",y,_),(X=X[$])instanceof Array&&X.length&&L-1?'"'+f+'"':f}}}},2726:(Dt,Ot,B)=>{"use strict";function P(v,l){var c=Object.keys(v);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(v);l&&(R=R.filter(function(f){return Object.getOwnPropertyDescriptor(v,f).enumerable})),c.push.apply(c,R)}return c}function Y(v){for(var l=1;l0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(f){var E={data:f,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var E=this.head,k=""+E.data;E=E.next;)k+=f+E.data;return k}},{key:"concat",value:function(f){if(this.length===0)return p.alloc(0);for(var E=p.allocUnsafe(f>>>0),k=this.head,y=0;k;)A(k.data,E,y),y+=k.data.length,k=k.next;return E}},{key:"consume",value:function(f,E){var k;return f_.length?_.length:f;if(m===_.length?y+=_:y+=_.slice(0,f),(f-=m)===0){m===_.length?(++k,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=_.slice(m));break}++k}return this.length-=k,y}},{key:"_getBuffer",value:function(f){var E=p.allocUnsafe(f),k=this.head,y=1;for(k.data.copy(E),f-=k.data.length;k=k.next;){var _=k.data,m=f>_.length?_.length:f;if(_.copy(E,E.length-f,0,m),(f-=m)===0){m===_.length?(++y,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=_.slice(m));break}++y}return this.length-=y,E}},{key:o,value:function(f,E){return S(this,Y(Y({},E),{},{depth:0,customInspect:!1}))}}])&&O(l.prototype,c),R&&O(l,R),Object.defineProperty(l,"prototype",{writable:!1}),v})()},2861:(Dt,Ot,B)=>{var P=B(8287),Y=P.Buffer;function a(w,p){for(var S in w)p[S]=w[S]}function O(w,p,S){return Y(w,p,S)}Y.from&&Y.alloc&&Y.allocUnsafe&&Y.allocUnsafeSlow?Dt.exports=P:(a(P,Ot),Ot.Buffer=O),O.prototype=Object.create(Y.prototype),a(Y,O),O.from=function(w,p,S){if(typeof w=="number")throw new TypeError("Argument must not be a number");return Y(w,p,S)},O.alloc=function(w,p,S){if(typeof w!="number")throw new TypeError("Argument must be a number");var o=Y(w);return p!==void 0?typeof S=="string"?o.fill(p,S):o.fill(p):o.fill(0),o},O.allocUnsafe=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return Y(w)},O.allocUnsafeSlow=function(w){if(typeof w!="number")throw new TypeError("Argument must be a number");return P.SlowBuffer(w)}},2955:(Dt,Ot,B)=>{"use strict";var P;function Y(k,y,_){return(y=(function(m){var z=(function(X,L){if(typeof X!="object"||X===null)return X;var $=X[Symbol.toPrimitive];if($!==void 0){var ut=$.call(X,L||"default");if(typeof ut!="object")return ut;throw new TypeError("@@toPrimitive must return a primitive value.")}return(L==="string"?String:Number)(X)})(m,"string");return typeof z=="symbol"?z:String(z)})(y))in k?Object.defineProperty(k,y,{value:_,enumerable:!0,configurable:!0,writable:!0}):k[y]=_,k}var a=B(6238),O=Symbol("lastResolve"),w=Symbol("lastReject"),p=Symbol("error"),S=Symbol("ended"),o=Symbol("lastPromise"),A=Symbol("handlePromise"),v=Symbol("stream");function l(k,y){return{value:k,done:y}}function c(k){var y=k[O];if(y!==null){var _=k[v].read();_!==null&&(k[o]=null,k[O]=null,k[w]=null,y(l(_,!1)))}}function R(k){__Process$.nextTick(c,k)}var f=Object.getPrototypeOf(function(){}),E=Object.setPrototypeOf((Y(P={get stream(){return this[v]},next:function(){var k=this,y=this[p];if(y!==null)return Promise.reject(y);if(this[S])return Promise.resolve(l(void 0,!0));if(this[v].destroyed)return new Promise(function(X,L){__Process$.nextTick(function(){k[p]?L(k[p]):X(l(void 0,!0))})});var _,m=this[o];if(m)_=new Promise((function(X,L){return function($,ut){X.then(function(){L[S]?$(l(void 0,!0)):L[A]($,ut)},ut)}})(m,this));else{var z=this[v].read();if(z!==null)return Promise.resolve(l(z,!1));_=new Promise(this[A])}return this[o]=_,_}},Symbol.asyncIterator,function(){return this}),Y(P,"return",function(){var k=this;return new Promise(function(y,_){k[v].destroy(null,function(m){m?_(m):y(l(void 0,!0))})})}),P),f);Dt.exports=function(k){var y,_=Object.create(E,(Y(y={},v,{value:k,writable:!0}),Y(y,O,{value:null,writable:!0}),Y(y,w,{value:null,writable:!0}),Y(y,p,{value:null,writable:!0}),Y(y,S,{value:k._readableState.endEmitted,writable:!0}),Y(y,A,{value:function(m,z){var X=_[v].read();X?(_[o]=null,_[O]=null,_[w]=null,m(l(X,!1))):(_[O]=m,_[w]=z)},writable:!0}),y));return _[o]=null,a(k,function(m){if(m&&m.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=_[w];return z!==null&&(_[o]=null,_[O]=null,_[w]=null,z(m)),void(_[p]=m)}var X=_[O];X!==null&&(_[o]=null,_[O]=null,_[w]=null,X(l(void 0,!0))),_[S]=!0}),k.on("readable",R.bind(null,_)),_}},3093:(Dt,Ot,B)=>{"use strict";var P=B(4459);Dt.exports=function(Y){return P(Y)||Y===0?Y:Y<0?-1:1}},3121:(Dt,Ot,B)=>{"use strict";function P(o){return P=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(o)}function Y(o,A){for(var v=0;vS});var O,w,p,S=(O=function o(){(function(A,v){if(!(A instanceof v))throw new TypeError("Cannot call a class as a function")})(this,o)},p=[{key:"validateTimebounds",value:function(o){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!o.timeBounds)return!1;var v=Math.floor(Date.now()/1e3),l=o.timeBounds,c=l.minTime,R=l.maxTime;return v>=Number.parseInt(c,10)-A&&v<=Number.parseInt(R,10)+A}},{key:"sleep",value:function(o){return new Promise(function(A){return setTimeout(A,o)})}}],(w=null)&&Y(O.prototype,w),p&&Y(O,p),Object.defineProperty(O,"prototype",{writable:!1}),O)},3126:(Dt,Ot,B)=>{"use strict";var P=B(6743),Y=B(9675),a=B(76),O=B(3144);Dt.exports=function(w){if(w.length<1||typeof w[0]!="function")throw new Y("a function is required");return O(P,a,w)}},3141:(Dt,Ot,B)=>{"use strict";var P=B(2861).Buffer,Y=P.isEncoding||function(c){switch((c=""+c)&&c.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 a(c){var R;switch(this.encoding=(function(f){var E=(function(k){if(!k)return"utf8";for(var y;;)switch(k){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 k;default:if(y)return;k=(""+k).toLowerCase(),y=!0}})(f);if(typeof E!="string"&&(P.isEncoding===Y||!Y(f)))throw new Error("Unknown encoding: "+f);return E||f})(c),this.encoding){case"utf16le":this.text=p,this.end=S,R=4;break;case"utf8":this.fillLast=w,R=4;break;case"base64":this.text=o,this.end=A,R=3;break;default:return this.write=v,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=P.allocUnsafe(R)}function O(c){return c<=127?0:c>>5==6?2:c>>4==14?3:c>>3==30?4:c>>6==2?-1:-2}function w(c){var R=this.lastTotal-this.lastNeed,f=(function(E,k){if((192&k[0])!=128)return E.lastNeed=0,"\uFFFD";if(E.lastNeed>1&&k.length>1){if((192&k[1])!=128)return E.lastNeed=1,"\uFFFD";if(E.lastNeed>2&&k.length>2&&(192&k[2])!=128)return E.lastNeed=2,"\uFFFD"}})(this,c);return f!==void 0?f:this.lastNeed<=c.length?(c.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(c.copy(this.lastChar,R,0,c.length),void(this.lastNeed-=c.length))}function p(c,R){if((c.length-R)%2==0){var f=c.toString("utf16le",R);if(f){var E=f.charCodeAt(f.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1],f.slice(0,-1)}return f}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=c[c.length-1],c.toString("utf16le",R,c.length-1)}function S(c){var R=c&&c.length?this.write(c):"";if(this.lastNeed){var f=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,f)}return R}function o(c,R){var f=(c.length-R)%3;return f===0?c.toString("base64",R):(this.lastNeed=3-f,this.lastTotal=3,f===1?this.lastChar[0]=c[c.length-1]:(this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1]),c.toString("base64",R,c.length-f))}function A(c){var R=c&&c.length?this.write(c):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function v(c){return c.toString(this.encoding)}function l(c){return c&&c.length?this.write(c):""}Ot.I=a,a.prototype.write=function(c){if(c.length===0)return"";var R,f;if(this.lastNeed){if((R=this.fillLast(c))===void 0)return"";f=this.lastNeed,this.lastNeed=0}else f=0;return f=0?(z>0&&(k.lastNeed=z-1),z):--m<_||z===-2?0:(z=O(y[m]),z>=0?(z>0&&(k.lastNeed=z-2),z):--m<_||z===-2?0:(z=O(y[m]),z>=0?(z>0&&(z===2?z=0:k.lastNeed=z-3),z):0))})(this,c,R);if(!this.lastNeed)return c.toString("utf8",R);this.lastTotal=f;var E=c.length-(f-this.lastNeed);return c.copy(this.lastChar,0,E),c.toString("utf8",R,E)},a.prototype.fillLast=function(c){if(this.lastNeed<=c.length)return c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,c.length),this.lastNeed-=c.length}},3144:(Dt,Ot,B)=>{"use strict";var P=B(6743),Y=B(1002),a=B(76),O=B(7119);Dt.exports=O||P.call(a,Y)},3209:(Dt,Ot,B)=>{"use strict";var P=65536,Y=4294967295,a=B(2861).Buffer,O=B.g.crypto||B.g.msCrypto;O&&O.getRandomValues?Dt.exports=function(w,p){if(w>Y)throw new RangeError("requested too many random bytes");var S=a.allocUnsafe(w);if(w>0)if(w>P)for(var o=0;o{"use strict";B.r(Ot),B.d(Ot,{Api:()=>P.j,BasicSleepStrategy:()=>N,Durability:()=>T,LinearSleepStrategy:()=>K,Server:()=>D,assembleTransaction:()=>k.X,default:()=>mt,parseRawEvents:()=>y.fG,parseRawSimulation:()=>y.jr});var P=B(4076),Y=B(4193),a=B.n(Y),O=B(8950),w=B(9983);function p(gt){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ft){return typeof ft}:function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},p(gt)}function S(gt,ft){var Gt=Object.keys(gt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(gt);ft&&(Lt=Lt.filter(function(ie){return Object.getOwnPropertyDescriptor(gt,ie).enumerable})),Gt.push.apply(Gt,Lt)}return Gt}function o(gt){for(var ft=1;ft3?(Pn=$n===Wr)&&(cn=Dr[(zr=Dr[4])?5:(zr=3,3)],Dr[4]=Dr[5]=gt):Dr[0]<=mn&&((Pn=Qr<2&&mnWr||Wr>$n)&&(Dr[4]=Qr,Dr[5]=Wr,ln.n=$n,zr=0))}if(Pn||Qr>1)return Ce;throw Un=!0,Wr}return function(Qr,Wr,Pn){if(Yn>1)throw TypeError("Generator is already running");for(Un&&Wr===1&&so(Wr,Pn),zr=Wr,cn=Pn;(ft=zr<2?gt:cn)||!Un;){un||(zr?zr<3?(zr>1&&(ln.n=-1),so(zr,cn)):ln.n=cn:ln.v=cn);try{if(Yn=2,un){if(zr||(Qr="next"),ft=un[Qr]){if(!(ft=ft.call(un,cn)))throw TypeError("iterator result is not an object");if(!ft.done)return ft;cn=ft.value,zr<2&&(zr=0)}else zr===1&&(ft=un.return)&&ft.call(un),zr<2&&(cn=TypeError("The iterator does not provide a '"+Qr+"' method"),zr=1);un=gt}else if((ft=(Un=ln.n<0)?cn:So.call(Gn,ln))!==Ce)break}catch(Dr){un=gt,zr=1,cn=Dr}finally{Yn=1}}return{value:ft,done:Un}}})(Pr,bn,En),!0),Zn}var Ce={};function He(){}function rr(){}function qe(){}ft=Object.getPrototypeOf;var pr=[][Lt]?ft(ft([][Lt]())):(l(ft={},Lt,function(){return this}),ft),De=qe.prototype=He.prototype=Object.create(pr);function dr(Pr){return Object.setPrototypeOf?Object.setPrototypeOf(Pr,qe):(Pr.__proto__=qe,l(Pr,ie,"GeneratorFunction")),Pr.prototype=Object.create(De),Pr}return rr.prototype=qe,l(De,"constructor",qe),l(qe,"constructor",rr),rr.displayName="GeneratorFunction",l(qe,ie,"GeneratorFunction"),l(De),l(De,ie,"Generator"),l(De,Lt,function(){return this}),l(De,"toString",function(){return"[object Generator]"}),(v=function(){return{w:$e,m:dr}})()}function l(gt,ft,Gt,Lt){var ie=Object.defineProperty;try{ie({},"",{})}catch{ie=0}l=function($e,Ce,He,rr){function qe(pr,De){l($e,pr,function(dr){return this._invoke(pr,De,dr)})}Ce?ie?ie($e,Ce,{value:He,enumerable:!rr,configurable:!rr,writable:!rr}):$e[Ce]=He:(qe("next",0),qe("throw",1),qe("return",2))},l(gt,ft,Gt,Lt)}function c(gt,ft,Gt,Lt,ie,$e,Ce){try{var He=gt[$e](Ce),rr=He.value}catch(qe){return void Gt(qe)}He.done?ft(rr):Promise.resolve(rr).then(Lt,ie)}function R(gt,ft){return Object.prototype.hasOwnProperty.call(gt,ft)}function f(gt,ft,Gt){return E.apply(this,arguments)}function E(){var gt;return gt=v().m(function ft(Gt,Lt,ie){var $e,Ce,He,rr=arguments;return v().w(function(qe){for(;;)switch(qe.n){case 0:return $e=rr.length>3&&rr[3]!==void 0?rr[3]:null,qe.n=1,Gt.post(Lt,{jsonrpc:"2.0",id:1,method:ie,params:$e});case 1:if(!R((Ce=qe.v).data,"error")){qe.n=2;break}throw Ce.data.error;case 2:return qe.a(2,(He=Ce.data)===null||He===void 0?void 0:He.result);case 3:return qe.a(2)}},ft)}),E=function(){var ft=this,Gt=arguments;return new Promise(function(Lt,ie){var $e=gt.apply(ft,Gt);function Ce(rr){c($e,Lt,ie,Ce,He,"next",rr)}function He(rr){c($e,Lt,ie,Ce,He,"throw",rr)}Ce(void 0)})},E.apply(this,arguments)}var k=B(8680),y=B(784),_=B(3121),m=B(8287).Buffer;function z(gt){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ft){return typeof ft}:function(ft){return ft&&typeof Symbol=="function"&&ft.constructor===Symbol&&ft!==Symbol.prototype?"symbol":typeof ft},z(gt)}function X(gt,ft){var Gt=Object.keys(gt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(gt);ft&&(Lt=Lt.filter(function(ie){return Object.getOwnPropertyDescriptor(gt,ie).enumerable})),Gt.push.apply(Gt,Lt)}return Gt}function L(gt){for(var ft=1;ftgt.length)&&(ft=gt.length);for(var Gt=0,Lt=Array(ft);Gt3?(Pn=$n===Wr)&&(cn=Dr[(zr=Dr[4])?5:(zr=3,3)],Dr[4]=Dr[5]=gt):Dr[0]<=mn&&((Pn=Qr<2&&mnWr||Wr>$n)&&(Dr[4]=Qr,Dr[5]=Wr,ln.n=$n,zr=0))}if(Pn||Qr>1)return Ce;throw Un=!0,Wr}return function(Qr,Wr,Pn){if(Yn>1)throw TypeError("Generator is already running");for(Un&&Wr===1&&so(Wr,Pn),zr=Wr,cn=Pn;(ft=zr<2?gt:cn)||!Un;){un||(zr?zr<3?(zr>1&&(ln.n=-1),so(zr,cn)):ln.n=cn:ln.v=cn);try{if(Yn=2,un){if(zr||(Qr="next"),ft=un[Qr]){if(!(ft=ft.call(un,cn)))throw TypeError("iterator result is not an object");if(!ft.done)return ft;cn=ft.value,zr<2&&(zr=0)}else zr===1&&(ft=un.return)&&ft.call(un),zr<2&&(cn=TypeError("The iterator does not provide a '"+Qr+"' method"),zr=1);un=gt}else if((ft=(Un=ln.n<0)?cn:So.call(Gn,ln))!==Ce)break}catch(Dr){un=gt,zr=1,cn=Dr}finally{Yn=1}}return{value:ft,done:Un}}})(Pr,bn,En),!0),Zn}var Ce={};function He(){}function rr(){}function qe(){}ft=Object.getPrototypeOf;var pr=[][Lt]?ft(ft([][Lt]())):(Zt(ft={},Lt,function(){return this}),ft),De=qe.prototype=He.prototype=Object.create(pr);function dr(Pr){return Object.setPrototypeOf?Object.setPrototypeOf(Pr,qe):(Pr.__proto__=qe,Zt(Pr,ie,"GeneratorFunction")),Pr.prototype=Object.create(De),Pr}return rr.prototype=qe,Zt(De,"constructor",qe),Zt(qe,"constructor",rr),rr.displayName="GeneratorFunction",Zt(qe,ie,"GeneratorFunction"),Zt(De),Zt(De,ie,"Generator"),Zt(De,Lt,function(){return this}),Zt(De,"toString",function(){return"[object Generator]"}),(vt=function(){return{w:$e,m:dr}})()}function Zt(gt,ft,Gt,Lt){var ie=Object.defineProperty;try{ie({},"",{})}catch{ie=0}Zt=function($e,Ce,He,rr){function qe(pr,De){Zt($e,pr,function(dr){return this._invoke(pr,De,dr)})}Ce?ie?ie($e,Ce,{value:He,enumerable:!rr,configurable:!rr,writable:!rr}):$e[Ce]=He:(qe("next",0),qe("throw",1),qe("return",2))},Zt(gt,ft,Gt,Lt)}function Bt(gt,ft,Gt,Lt,ie,$e,Ce){try{var He=gt[$e](Ce),rr=He.value}catch(qe){return void Gt(qe)}He.done?ft(rr):Promise.resolve(rr).then(Lt,ie)}function q(gt){return function(){var ft=this,Gt=arguments;return new Promise(function(Lt,ie){var $e=gt.apply(ft,Gt);function Ce(rr){Bt($e,Lt,ie,Ce,He,"next",rr)}function He(rr){Bt($e,Lt,ie,Ce,He,"throw",rr)}Ce(void 0)})}}function ct(gt,ft){for(var Gt=0;Gt1&&arguments[1]!==void 0?arguments[1]:{};if((function(ie,$e){if(!(ie instanceof $e))throw new TypeError("Cannot call a class as a function")})(this,gt),this.serverURL=a()(ft),this.httpClient=(Gt=Lt.headers,(0,w.vt)({headers:o(o({},Gt),{},{"X-Client-Name":"js-stellar-sdk","X-Client-Version":"14.5.0"})})),this.serverURL.protocol()!=="https"&&!Lt.allowHttp)throw new Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set")},pt=[{key:"getAccount",value:(Pt=q(vt().m(function gt(ft){var Gt;return vt().w(function(Lt){for(;;)switch(Lt.n){case 0:return Lt.n=1,this.getAccountEntry(ft);case 1:return Gt=Lt.v,Lt.a(2,new O.Account(ft,Gt.seqNum().toString()))}},gt,this)})),function(gt){return Pt.apply(this,arguments)})},{key:"getAccountEntry",value:(Vt=q(vt().m(function gt(ft){var Gt,Lt;return vt().w(function(ie){for(;;)switch(ie.p=ie.n){case 0:return Gt=O.xdr.LedgerKey.account(new O.xdr.LedgerKeyAccount({accountId:O.Keypair.fromPublicKey(ft).xdrPublicKey()})),ie.p=1,ie.n=2,this.getLedgerEntry(Gt);case 2:return Lt=ie.v,ie.a(2,Lt.val.account());case 3:throw ie.p=3,ie.v,new Error("Account not found: ".concat(ft));case 4:return ie.a(2)}},gt,this,[[1,3]])})),function(gt){return Vt.apply(this,arguments)})},{key:"getTrustline",value:(at=q(vt().m(function gt(ft,Gt){var Lt,ie;return vt().w(function($e){for(;;)switch($e.p=$e.n){case 0:return Lt=O.xdr.LedgerKey.trustline(new O.xdr.LedgerKeyTrustLine({accountId:O.Keypair.fromPublicKey(ft).xdrAccountId(),asset:Gt.toTrustLineXDRObject()})),$e.p=1,$e.n=2,this.getLedgerEntry(Lt);case 2:return ie=$e.v,$e.a(2,ie.val.trustLine());case 3:throw $e.p=3,$e.v,new Error("Trustline for ".concat(Gt.getCode(),":").concat(Gt.getIssuer()," not found for ").concat(ft));case 4:return $e.a(2)}},gt,this,[[1,3]])})),function(gt,ft){return at.apply(this,arguments)})},{key:"getClaimableBalance",value:(G=q(vt().m(function gt(ft){var Gt,Lt,ie,$e,Ce;return vt().w(function(He){for(;;)switch(He.p=He.n){case 0:if(!O.StrKey.isValidClaimableBalance(ft)){He.n=1;break}Lt=O.StrKey.decodeClaimableBalance(ft),ie=m.concat([m.from("\0\0\0"),Lt.subarray(0,1)]),Gt=O.xdr.ClaimableBalanceId.fromXDR(m.concat([ie,Lt.subarray(1)])),He.n=4;break;case 1:if(!ft.match(/[a-f0-9]{72}/i)){He.n=2;break}Gt=O.xdr.ClaimableBalanceId.fromXDR(ft,"hex"),He.n=4;break;case 2:if(!ft.match(/[a-f0-9]{64}/i)){He.n=3;break}Gt=O.xdr.ClaimableBalanceId.fromXDR(ft.padStart(72,"0"),"hex"),He.n=4;break;case 3:throw new TypeError("expected 72-char hex ID or strkey, not ".concat(ft));case 4:return $e=O.xdr.LedgerKey.claimableBalance(new O.xdr.LedgerKeyClaimableBalance({balanceId:Gt})),He.p=5,He.n=6,this.getLedgerEntry($e);case 6:return Ce=He.v,He.a(2,Ce.val.claimableBalance());case 7:throw He.p=7,He.v,new Error("Claimable balance ".concat(ft," not found"));case 8:return He.a(2)}},gt,this,[[5,7]])})),function(gt){return G.apply(this,arguments)})},{key:"getAssetBalance",value:(x=q(vt().m(function gt(ft,Gt,Lt){var ie,$e,Ce,He,rr;return vt().w(function(qe){for(;;)switch(qe.n){case 0:if(ie=ft,typeof ft!="string"){qe.n=1;break}ie=ft,qe.n=4;break;case 1:if(!(ft instanceof O.Address)){qe.n=2;break}ie=ft.toString(),qe.n=4;break;case 2:if(!(ft instanceof O.Contract)){qe.n=3;break}ie=ft.toString(),qe.n=4;break;case 3:throw new TypeError("invalid address: ".concat(ft));case 4:if(!O.StrKey.isValidEd25519PublicKey(ie)){qe.n=6;break}return qe.n=5,Promise.all([this.getTrustline(ie,Gt),this.getLatestLedger()]);case 5:return $e=qe.v,Ce=ut($e,2),He=Ce[0],rr=Ce[1],qe.a(2,{latestLedger:rr.sequence,balanceEntry:{amount:He.balance().toString(),authorized:!!(He.flags()&O.AuthRequiredFlag),clawback:!!(He.flags()&O.AuthClawbackEnabledFlag),revocable:!!(He.flags()&O.AuthRevocableFlag)}});case 6:if(!O.StrKey.isValidContract(ie)){qe.n=7;break}return qe.a(2,this.getSACBalance(ie,Gt,Lt));case 7:throw new Error("invalid address: ".concat(ft));case 8:return qe.a(2)}},gt,this)})),function(gt,ft,Gt){return x.apply(this,arguments)})},{key:"getHealth",value:(xe=q(vt().m(function gt(){return vt().w(function(ft){for(;;)if(ft.n===0)return ft.a(2,f(this.httpClient,this.serverURL.toString(),"getHealth"))},gt,this)})),function(){return xe.apply(this,arguments)})},{key:"getContractData",value:(Wt=q(vt().m(function gt(ft,Gt){var Lt,ie,$e,Ce,He,rr=arguments;return vt().w(function(qe){for(;;)switch(qe.p=qe.n){case 0:if(Lt=rr.length>2&&rr[2]!==void 0?rr[2]:T.Persistent,typeof ft!="string"){qe.n=1;break}ie=new O.Contract(ft).address().toScAddress(),qe.n=4;break;case 1:if(!(ft instanceof O.Address)){qe.n=2;break}ie=ft.toScAddress(),qe.n=4;break;case 2:if(!(ft instanceof O.Contract)){qe.n=3;break}ie=ft.address().toScAddress(),qe.n=4;break;case 3:throw new TypeError("unknown contract type: ".concat(ft));case 4:He=Lt,qe.n=He===T.Temporary?5:He===T.Persistent?6:7;break;case 5:return $e=O.xdr.ContractDataDurability.temporary(),qe.a(3,8);case 6:return $e=O.xdr.ContractDataDurability.persistent(),qe.a(3,8);case 7:throw new TypeError("invalid durability: ".concat(Lt));case 8:return Ce=O.xdr.LedgerKey.contractData(new O.xdr.LedgerKeyContractData({key:Gt,contract:ie,durability:$e})),qe.p=9,qe.n=10,this.getLedgerEntry(Ce);case 10:return qe.a(2,qe.v);case 11:throw qe.p=11,qe.v,{code:404,message:"Contract data not found for ".concat(O.Address.fromScAddress(ie).toString()," with key ").concat(Gt.toXDR("base64")," and durability: ").concat(Lt)};case 12:return qe.a(2)}},gt,this,[[9,11]])})),function(gt,ft){return Wt.apply(this,arguments)})},{key:"getContractWasmByContractId",value:(Jt=q(vt().m(function gt(ft){var Gt,Lt,ie,$e;return vt().w(function(Ce){for(;;)switch(Ce.n){case 0:return Lt=new O.Contract(ft).getFootprint(),Ce.n=1,this.getLedgerEntries(Lt);case 1:if((ie=Ce.v).entries.length&&(Gt=ie.entries[0])!==null&&Gt!==void 0&&Gt.val){Ce.n=2;break}return Ce.a(2,Promise.reject({code:404,message:"Could not obtain contract hash from server"}));case 2:return $e=ie.entries[0].val.contractData().val().instance().executable().wasmHash(),Ce.a(2,this.getContractWasmByHash($e))}},gt,this)})),function(gt){return Jt.apply(this,arguments)})},{key:"getContractWasmByHash",value:(It=q(vt().m(function gt(ft){var Gt,Lt,ie,$e,Ce,He,rr=arguments;return vt().w(function(qe){for(;;)switch(qe.n){case 0:return Lt=rr.length>1&&rr[1]!==void 0?rr[1]:void 0,ie=typeof ft=="string"?m.from(ft,Lt):ft,$e=O.xdr.LedgerKey.contractCode(new O.xdr.LedgerKeyContractCode({hash:ie})),qe.n=1,this.getLedgerEntries($e);case 1:if((Ce=qe.v).entries.length&&(Gt=Ce.entries[0])!==null&&Gt!==void 0&&Gt.val){qe.n=2;break}return qe.a(2,Promise.reject({code:404,message:"Could not obtain contract wasm from server"}));case 2:return He=Ce.entries[0].val.contractCode().code(),qe.a(2,He)}},gt,this)})),function(gt){return It.apply(this,arguments)})},{key:"getLedgerEntries",value:function(){return this._getLedgerEntries.apply(this,arguments).then(y.$D)}},{key:"_getLedgerEntries",value:function(){for(var gt=arguments.length,ft=new Array(gt),Gt=0;Gt{"use strict";Dt.exports=Y;var P=B(4610);function Y(a){if(!(this instanceof Y))return new Y(a);P.call(this,a)}B(6698)(Y,P),Y.prototype._transform=function(a,O,w){w(null,a)}},3628:(Dt,Ot,B)=>{"use strict";var P=B(8648),Y=B(1064),a=B(7176);Dt.exports=P?function(O){return P(O)}:Y?function(O){if(!O||typeof O!="object"&&typeof O!="function")throw new TypeError("getProto: not an object");return Y(O)}:a?function(O){return a(O)}:null},3898:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{Api:()=>{},Resolver:()=>_,STELLAR_TOML_MAX_SIZE:()=>k});var P=B(1293),Y=B.n(P),a=B(9983),O=B(8732);function w(m){return w=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},w(m)}function p(){var m,z,X=typeof Symbol=="function"?Symbol:{},L=X.iterator||"@@iterator",$=X.toStringTag||"@@toStringTag";function ut(T,N,K,dt){var j=N&&N.prototype instanceof vt?N:vt,pt=Object.create(j.prototype);return S(pt,"_invoke",(function(_t,ot,it){var Et,jt,et,nt=0,rt=it||[],F=!1,lt={p:0,n:0,v:m,a:At,f:At.bind(m,4),d:function(Mt,$t){return Et=Mt,jt=0,et=m,lt.n=$t,xt}};function At(Mt,$t){for(jt=Mt,et=$t,z=0;!F&&nt&&!de&&z3?(de=I===$t)&&(et=u[(jt=u[4])?5:(jt=3,3)],u[4]=u[5]=m):u[0]<=g&&((de=Mt<2&&g$t||$t>I)&&(u[4]=Mt,u[5]=$t,lt.n=I,jt=0))}if(de||Mt>1)return xt;throw F=!0,$t}return function(Mt,$t,de){if(nt>1)throw TypeError("Generator is already running");for(F&&$t===1&&At($t,de),jt=$t,et=de;(z=jt<2?m:et)||!F;){Et||(jt?jt<3?(jt>1&&(lt.n=-1),At(jt,et)):lt.n=et:lt.v=et);try{if(nt=2,Et){if(jt||(Mt="next"),z=Et[Mt]){if(!(z=z.call(Et,et)))throw TypeError("iterator result is not an object");if(!z.done)return z;et=z.value,jt<2&&(jt=0)}else jt===1&&(z=Et.return)&&z.call(Et),jt<2&&(et=TypeError("The iterator does not provide a '"+Mt+"' method"),jt=1);Et=m}else if((z=(F=lt.n<0)?et:_t.call(ot,lt))!==xt)break}catch(u){Et=m,jt=1,et=u}finally{nt=1}}return{value:z,done:F}}})(T,K,dt),!0),pt}var xt={};function vt(){}function Zt(){}function Bt(){}z=Object.getPrototypeOf;var q=[][L]?z(z([][L]())):(S(z={},L,function(){return this}),z),ct=Bt.prototype=vt.prototype=Object.create(q);function i(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,Bt):(T.__proto__=Bt,S(T,$,"GeneratorFunction")),T.prototype=Object.create(ct),T}return Zt.prototype=Bt,S(ct,"constructor",Bt),S(Bt,"constructor",Zt),Zt.displayName="GeneratorFunction",S(Bt,$,"GeneratorFunction"),S(ct),S(ct,$,"Generator"),S(ct,L,function(){return this}),S(ct,"toString",function(){return"[object Generator]"}),(p=function(){return{w:ut,m:i}})()}function S(m,z,X,L){var $=Object.defineProperty;try{$({},"",{})}catch{$=0}S=function(ut,xt,vt,Zt){function Bt(q,ct){S(ut,q,function(i){return this._invoke(q,ct,i)})}xt?$?$(ut,xt,{value:vt,enumerable:!Zt,configurable:!Zt,writable:!Zt}):ut[xt]=vt:(Bt("next",0),Bt("throw",1),Bt("return",2))},S(m,z,X,L)}function o(m,z,X,L,$,ut,xt){try{var vt=m[ut](xt),Zt=vt.value}catch(Bt){return void X(Bt)}vt.done?z(Zt):Promise.resolve(Zt).then(L,$)}function A(m,z){for(var X=0;X1&&vt[1]!==void 0?vt[1]:{}).allowHttp===void 0?O.T.isAllowHttp():L.allowHttp,ut=L.timeout===void 0?O.T.getTimeout():L.timeout,xt=$?"http":"https",Zt.a(2,a.ok.get("".concat(xt,"://").concat(z,"/.well-known/stellar.toml"),{maxRedirects:(X=L.allowedRedirects)!==null&&X!==void 0?X:0,maxContentLength:k,cancelToken:ut?new y(function(Bt){return setTimeout(function(){return Bt("timeout of ".concat(ut,"ms exceeded"))},ut)}):void 0,timeout:ut}).then(function(Bt){try{var q=Y().parse(Bt.data);return Promise.resolve(q)}catch(ct){return Promise.reject(new Error("stellar.toml is invalid - Parsing error on line ".concat(ct.line,", column ").concat(ct.column,": ").concat(ct.message)))}}).catch(function(Bt){throw Bt.message.match(/^maxContentLength size/)?new Error("stellar.toml file exceeds allowed size of ".concat(k)):Bt}))},m)}),E=function(){var m=this,z=arguments;return new Promise(function(X,L){var $=f.apply(m,z);function ut(vt){o($,X,L,ut,xt,"next",vt)}function xt(vt){o($,X,L,ut,xt,"throw",vt)}ut(void 0)})},function(m){return E.apply(this,arguments)})}],c&&A(l.prototype,c),R&&A(l,R),Object.defineProperty(l,"prototype",{writable:!1}),l)},4035:(Dt,Ot,B)=>{"use strict";var P,Y=B(6556),a=B(9092)(),O=B(9957),w=B(5795);if(a){var p=Y("RegExp.prototype.exec"),S={},o=function(){throw S},A={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(A[Symbol.toPrimitive]=o),P=function(l){if(!l||typeof l!="object")return!1;var c=w(l,"lastIndex");if(!(c&&O(c,"value")))return!1;try{p(l,A)}catch(R){return R===S}}}else{var v=Y("Object.prototype.toString");P=function(l){return!(!l||typeof l!="object"&&typeof l!="function")&&v(l)==="[object RegExp]"}}Dt.exports=P},4039:(Dt,Ot,B)=>{"use strict";var P=typeof Symbol<"u"&&Symbol,Y=B(1333);Dt.exports=function(){return typeof P=="function"&&typeof Symbol=="function"&&typeof P("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&Y()}},4076:(Dt,Ot,B)=>{"use strict";var P;B.d(Ot,{j:()=>P}),(function(Y){var a=(function(w){return w.SUCCESS="SUCCESS",w.NOT_FOUND="NOT_FOUND",w.FAILED="FAILED",w})({});function O(w){return"transactionData"in w}Y.GetTransactionStatus=a,Y.isSimulationError=function(w){return"error"in w},Y.isSimulationSuccess=O,Y.isSimulationRestore=function(w){return O(w)&&"restorePreamble"in w&&!!w.restorePreamble.transactionData},Y.isSimulationRaw=function(w){return!w._parsed}})(P||(P={}))},4193:function(Dt,Ot,B){var P,Y,a;(function(O,w){"use strict";Dt.exports?Dt.exports=w(B(9340),B(1430),B(4704)):(Y=[B(9340),B(1430),B(4704)],(a=typeof(P=w)=="function"?P.apply(Ot,Y):P)===void 0||(Dt.exports=a))})(0,function(O,w,p,S){"use strict";var o=S&&S.URI;function A(i,T){var N=arguments.length>=1;if(!(this instanceof A))return N?arguments.length>=2?new A(i,T):new A(i):new A;if(i===void 0){if(N)throw new TypeError("undefined is not a valid argument for URI");i=typeof location<"u"?location.href+"":""}if(i===null&&N)throw new TypeError("null is not a valid argument for URI");return this.href(i),T!==void 0?this.absoluteTo(T):this}A.version="1.19.11";var v=A.prototype,l=Object.prototype.hasOwnProperty;function c(i){return i.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function R(i){return i===void 0?"Undefined":String(Object.prototype.toString.call(i)).slice(8,-1)}function f(i){return R(i)==="Array"}function E(i,T){var N,K,dt={};if(R(T)==="RegExp")dt=null;else if(f(T))for(N=0,K=T.length;N]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,A.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},A.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,A.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,A.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},A.hostProtocols=["http","https"],A.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,A.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"},A.getDomAttribute=function(i){if(i&&i.nodeName){var T=i.nodeName.toLowerCase();if(T!=="input"||i.type==="image")return A.domAttributes[T]}},A.encode=z,A.decode=decodeURIComponent,A.iso8859=function(){A.encode=escape,A.decode=unescape},A.unicode=function(){A.encode=z,A.decode=decodeURIComponent},A.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"}}}},A.encodeQuery=function(i,T){var N=A.encode(i+"");return T===void 0&&(T=A.escapeQuerySpace),T?N.replace(/%20/g,"+"):N},A.decodeQuery=function(i,T){i+="",T===void 0&&(T=A.escapeQuerySpace);try{return A.decode(T?i.replace(/\+/g,"%20"):i)}catch{return i}};var X,L={encode:"encode",decode:"decode"},$=function(i,T){return function(N){try{return A[T](N+"").replace(A.characters[i][T].expression,function(K){return A.characters[i][T].map[K]})}catch{return N}}};for(X in L)A[X+"PathSegment"]=$("pathname",L[X]),A[X+"UrnPathSegment"]=$("urnpath",L[X]);var ut=function(i,T,N){return function(K){var dt;dt=N?function(ot){return A[T](A[N](ot))}:A[T];for(var j=(K+"").split(i),pt=0,_t=j.length;pt<_t;pt++)j[pt]=dt(j[pt]);return j.join(i)}};function xt(i){return function(T,N){return T===void 0?this._parts[i]||"":(this._parts[i]=T||null,this.build(!N),this)}}function vt(i,T){return function(N,K){return N===void 0?this._parts[i]||"":(N!==null&&(N+="").charAt(0)===T&&(N=N.substring(1)),this._parts[i]=N,this.build(!K),this)}}A.decodePath=ut("/","decodePathSegment"),A.decodeUrnPath=ut(":","decodeUrnPathSegment"),A.recodePath=ut("/","encodePathSegment","decode"),A.recodeUrnPath=ut(":","encodeUrnPathSegment","decode"),A.encodeReserved=$("reserved","encode"),A.parse=function(i,T){var N;return T||(T={preventInvalidHostname:A.preventInvalidHostname}),(N=(i=(i=i.replace(A.leading_whitespace_expression,"")).replace(A.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(T.fragment=i.substring(N+1)||null,i=i.substring(0,N)),(N=i.indexOf("?"))>-1&&(T.query=i.substring(N+1)||null,i=i.substring(0,N)),(i=(i=i.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)==="//"?(T.protocol=null,i=i.substring(2),i=A.parseAuthority(i,T)):(N=i.indexOf(":"))>-1&&(T.protocol=i.substring(0,N)||null,T.protocol&&!T.protocol.match(A.protocol_expression)?T.protocol=void 0:i.substring(N+1,N+3).replace(/\\/g,"/")==="//"?(i=i.substring(N+3),i=A.parseAuthority(i,T)):(i=i.substring(N+1),T.urn=!0)),T.path=i,T},A.parseHost=function(i,T){i||(i="");var N,K,dt=(i=i.replace(/\\/g,"/")).indexOf("/");if(dt===-1&&(dt=i.length),i.charAt(0)==="[")N=i.indexOf("]"),T.hostname=i.substring(1,N)||null,T.port=i.substring(N+2,dt)||null,T.port==="/"&&(T.port=null);else{var j=i.indexOf(":"),pt=i.indexOf("/"),_t=i.indexOf(":",j+1);_t!==-1&&(pt===-1||_t-1?dt:i.length-1);return j>-1&&(dt===-1||j-1?et.slice(0,nt)+et.slice(nt).replace(j,""):et.replace(j,"")).length<=ot[0].length||N.ignore&&N.ignore.test(et))){var lt=T(et,it,jt=it+et.length,i);lt!==void 0?(lt=String(lt),i=i.slice(0,it)+lt+i.slice(jt),K.lastIndex=it+lt.length):K.lastIndex=jt}}return K.lastIndex=0,i},A.ensureValidHostname=function(i,T){var N=!!i,K=!1;if(T&&(K=k(A.hostProtocols,T)),K&&!N)throw new TypeError("Hostname cannot be empty, if protocol is "+T);if(i&&i.match(A.invalid_hostname_characters)){if(!O)throw new TypeError('Hostname "'+i+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(O.toASCII(i).match(A.invalid_hostname_characters))throw new TypeError('Hostname "'+i+'" contains characters other than [A-Z0-9.-:_]')}},A.ensureValidPort=function(i){if(i){var T=Number(i);if(!(/^[0-9]+$/.test(T)&&T>0&&T<65536))throw new TypeError('Port "'+i+'" is not a valid port')}},A.noConflict=function(i){if(i){var T={URI:this.noConflict()};return S.URITemplate&&typeof S.URITemplate.noConflict=="function"&&(T.URITemplate=S.URITemplate.noConflict()),S.IPv6&&typeof S.IPv6.noConflict=="function"&&(T.IPv6=S.IPv6.noConflict()),S.SecondLevelDomains&&typeof S.SecondLevelDomains.noConflict=="function"&&(T.SecondLevelDomains=S.SecondLevelDomains.noConflict()),T}return S.URI===this&&(S.URI=o),this},v.build=function(i){return i===!0?this._deferred_build=!0:(i===void 0||this._deferred_build)&&(this._string=A.build(this._parts),this._deferred_build=!1),this},v.clone=function(){return new A(this)},v.valueOf=v.toString=function(){return this.build(!1)._string},v.protocol=xt("protocol"),v.username=xt("username"),v.password=xt("password"),v.hostname=xt("hostname"),v.port=xt("port"),v.query=vt("query","?"),v.fragment=vt("fragment","#"),v.search=function(i,T){var N=this.query(i,T);return typeof N=="string"&&N.length?"?"+N:N},v.hash=function(i,T){var N=this.fragment(i,T);return typeof N=="string"&&N.length?"#"+N:N},v.pathname=function(i,T){if(i===void 0||i===!0){var N=this._parts.path||(this._parts.hostname?"/":"");return i?(this._parts.urn?A.decodeUrnPath:A.decodePath)(N):N}return this._parts.urn?this._parts.path=i?A.recodeUrnPath(i):"":this._parts.path=i?A.recodePath(i):"/",this.build(!T),this},v.path=v.pathname,v.href=function(i,T){var N;if(i===void 0)return this.toString();this._string="",this._parts=A._parts();var K=i instanceof A,dt=typeof i=="object"&&(i.hostname||i.path||i.pathname);if(i.nodeName&&(i=i[A.getDomAttribute(i)]||"",dt=!1),!K&&dt&&i.pathname!==void 0&&(i=i.toString()),typeof i=="string"||i instanceof String)this._parts=A.parse(String(i),this._parts);else{if(!K&&!dt)throw new TypeError("invalid input");var j=K?i._parts:i;for(N in j)N!=="query"&&l.call(this._parts,N)&&(this._parts[N]=j[N]);j.query&&this.query(j.query,!1)}return this.build(!T),this},v.is=function(i){var T=!1,N=!1,K=!1,dt=!1,j=!1,pt=!1,_t=!1,ot=!this._parts.urn;switch(this._parts.hostname&&(ot=!1,N=A.ip4_expression.test(this._parts.hostname),K=A.ip6_expression.test(this._parts.hostname),j=(dt=!(T=N||K))&&p&&p.has(this._parts.hostname),pt=dt&&A.idn_expression.test(this._parts.hostname),_t=dt&&A.punycode_expression.test(this._parts.hostname)),i.toLowerCase()){case"relative":return ot;case"absolute":return!ot;case"domain":case"name":return dt;case"sld":return j;case"ip":return T;case"ip4":case"ipv4":case"inet4":return N;case"ip6":case"ipv6":case"inet6":return K;case"idn":return pt;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return _t}return null};var Zt=v.protocol,Bt=v.port,q=v.hostname;v.protocol=function(i,T){if(i&&!(i=i.replace(/:(\/\/)?$/,"")).match(A.protocol_expression))throw new TypeError('Protocol "'+i+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return Zt.call(this,i,T)},v.scheme=v.protocol,v.port=function(i,T){return this._parts.urn?i===void 0?"":this:(i!==void 0&&(i===0&&(i=null),i&&((i+="").charAt(0)===":"&&(i=i.substring(1)),A.ensureValidPort(i))),Bt.call(this,i,T))},v.hostname=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i!==void 0){var N={preventInvalidHostname:this._parts.preventInvalidHostname};if(A.parseHost(i,N)!=="/")throw new TypeError('Hostname "'+i+'" contains characters other than [A-Z0-9.-]');i=N.hostname,this._parts.preventInvalidHostname&&A.ensureValidHostname(i,this._parts.protocol)}return q.call(this,i,T)},v.origin=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0){var N=this.protocol();return this.authority()?(N?N+"://":"")+this.authority():""}var K=A(i);return this.protocol(K.protocol()).authority(K.authority()).build(!T),this},v.host=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0)return this._parts.hostname?A.buildHost(this._parts):"";if(A.parseHost(i,this._parts)!=="/")throw new TypeError('Hostname "'+i+'" contains characters other than [A-Z0-9.-]');return this.build(!T),this},v.authority=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0)return this._parts.hostname?A.buildAuthority(this._parts):"";if(A.parseAuthority(i,this._parts)!=="/")throw new TypeError('Hostname "'+i+'" contains characters other than [A-Z0-9.-]');return this.build(!T),this},v.userinfo=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0){var N=A.buildUserinfo(this._parts);return N&&N.substring(0,N.length-1)}return i[i.length-1]!=="@"&&(i+="@"),A.parseUserinfo(i,this._parts),this.build(!T),this},v.resource=function(i,T){var N;return i===void 0?this.path()+this.search()+this.hash():(N=A.parse(i),this._parts.path=N.path,this._parts.query=N.query,this._parts.fragment=N.fragment,this.build(!T),this)},v.subdomain=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0){if(!this._parts.hostname||this.is("IP"))return"";var N=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,N)||""}var K=this._parts.hostname.length-this.domain().length,dt=this._parts.hostname.substring(0,K),j=new RegExp("^"+c(dt));if(i&&i.charAt(i.length-1)!=="."&&(i+="."),i.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return i&&A.ensureValidHostname(i,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(j,i),this.build(!T),this},v.domain=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(typeof i=="boolean"&&(T=i,i=void 0),i===void 0){if(!this._parts.hostname||this.is("IP"))return"";var N=this._parts.hostname.match(/\./g);if(N&&N.length<2)return this._parts.hostname;var K=this._parts.hostname.length-this.tld(T).length-1;return K=this._parts.hostname.lastIndexOf(".",K-1)+1,this._parts.hostname.substring(K)||""}if(!i)throw new TypeError("cannot set domain empty");if(i.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(A.ensureValidHostname(i,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=i;else{var dt=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(dt,i)}return this.build(!T),this},v.tld=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(typeof i=="boolean"&&(T=i,i=void 0),i===void 0){if(!this._parts.hostname||this.is("IP"))return"";var N=this._parts.hostname.lastIndexOf("."),K=this._parts.hostname.substring(N+1);return T!==!0&&p&&p.list[K.toLowerCase()]&&p.get(this._parts.hostname)||K}var dt;if(!i)throw new TypeError("cannot set TLD empty");if(i.match(/[^a-zA-Z0-9-]/)){if(!p||!p.is(i))throw new TypeError('TLD "'+i+'" contains characters other than [A-Z0-9]');dt=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(dt,i)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");dt=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(dt,i)}return this.build(!T),this},v.directory=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0||i===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var N=this._parts.path.length-this.filename().length-1,K=this._parts.path.substring(0,N)||(this._parts.hostname?"/":"");return i?A.decodePath(K):K}var dt=this._parts.path.length-this.filename().length,j=this._parts.path.substring(0,dt),pt=new RegExp("^"+c(j));return this.is("relative")||(i||(i="/"),i.charAt(0)!=="/"&&(i="/"+i)),i&&i.charAt(i.length-1)!=="/"&&(i+="/"),i=A.recodePath(i),this._parts.path=this._parts.path.replace(pt,i),this.build(!T),this},v.filename=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(typeof i!="string"){if(!this._parts.path||this._parts.path==="/")return"";var N=this._parts.path.lastIndexOf("/"),K=this._parts.path.substring(N+1);return i?A.decodePathSegment(K):K}var dt=!1;i.charAt(0)==="/"&&(i=i.substring(1)),i.match(/\.?\//)&&(dt=!0);var j=new RegExp(c(this.filename())+"$");return i=A.recodePath(i),this._parts.path=this._parts.path.replace(j,i),dt?this.normalizePath(T):this.build(!T),this},v.suffix=function(i,T){if(this._parts.urn)return i===void 0?"":this;if(i===void 0||i===!0){if(!this._parts.path||this._parts.path==="/")return"";var N,K,dt=this.filename(),j=dt.lastIndexOf(".");return j===-1?"":(N=dt.substring(j+1),K=/^[a-z0-9%]+$/i.test(N)?N:"",i?A.decodePathSegment(K):K)}i.charAt(0)==="."&&(i=i.substring(1));var pt,_t=this.suffix();if(_t)pt=i?new RegExp(c(_t)+"$"):new RegExp(c("."+_t)+"$");else{if(!i)return this;this._parts.path+="."+A.recodePath(i)}return pt&&(i=A.recodePath(i),this._parts.path=this._parts.path.replace(pt,i)),this.build(!T),this},v.segment=function(i,T,N){var K=this._parts.urn?":":"/",dt=this.path(),j=dt.substring(0,1)==="/",pt=dt.split(K);if(i!==void 0&&typeof i!="number"&&(N=T,T=i,i=void 0),i!==void 0&&typeof i!="number")throw new Error('Bad segment "'+i+'", must be 0-based integer');if(j&&pt.shift(),i<0&&(i=Math.max(pt.length+i,0)),T===void 0)return i===void 0?pt:pt[i];if(i===null||pt[i]===void 0)if(f(T)){pt=[];for(var _t=0,ot=T.length;_t{"use strict";B.r(Ot),B.d(Ot,{AccountRequiresMemoError:()=>P.Cu,BadRequestError:()=>P.v7,BadResponseError:()=>P.nS,BindingGenerator:()=>l.fe,Config:()=>Y.T,Federation:()=>w,Friendbot:()=>S,Horizon:()=>o,NetworkError:()=>P.Dr,NotFoundError:()=>P.m_,StellarToml:()=>O,Utils:()=>a.A,WebAuth:()=>p,contract:()=>v,default:()=>f,rpc:()=>A});var P=B(5976),Y=B(8732),a=B(3121),O=B(3898),w=B(7600),p=B(7504),S=B(8242),o=B(8733),A=B(3496),v=B(8250),l=B(5234),c=B(8950),R={};for(let E in c)["default","Config","Utils","BindingGenerator","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(E)<0&&(R[E]=()=>c[E]);B.d(Ot,R);let f=(Dt=B.hmd(Dt)).exports;B.g.__USE_AXIOS__===void 0&&(B.g.__USE_AXIOS__=!0),B.g.__USE_EVENTSOURCE__===void 0&&(B.g.__USE_EVENTSOURCE__=!1)},4366:(Dt,Ot,B)=>{"use strict";B.d(Ot,{Q7:()=>v,SB:()=>A,Sq:()=>o,ch:()=>S,ff:()=>O,z0:()=>w});var P=B(8950);function Y(l){return(function(c){if(Array.isArray(c))return a(c)})(l)||(function(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)})(l)||(function(c,R){if(c){if(typeof c=="string")return a(c,R);var f={}.toString.call(c).slice(8,-1);return f==="Object"&&c.constructor&&(f=c.constructor.name),f==="Map"||f==="Set"?Array.from(c):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?a(c,R):void 0}})(l)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function a(l,c){(c==null||c>l.length)&&(c=l.length);for(var R=0,f=Array(c);R1&&arguments[1]!==void 0&&arguments[1];switch(l.switch()){case P.xdr.ScSpecType.scSpecTypeVal():return"any";case P.xdr.ScSpecType.scSpecTypeBool():return"boolean";case P.xdr.ScSpecType.scSpecTypeVoid():return"null";case P.xdr.ScSpecType.scSpecTypeError():return"Error";case P.xdr.ScSpecType.scSpecTypeU32():case P.xdr.ScSpecType.scSpecTypeI32():return"number";case P.xdr.ScSpecType.scSpecTypeU64():case P.xdr.ScSpecType.scSpecTypeI64():case P.xdr.ScSpecType.scSpecTypeTimepoint():case P.xdr.ScSpecType.scSpecTypeDuration():case P.xdr.ScSpecType.scSpecTypeU128():case P.xdr.ScSpecType.scSpecTypeI128():case P.xdr.ScSpecType.scSpecTypeU256():case P.xdr.ScSpecType.scSpecTypeI256():return"bigint";case P.xdr.ScSpecType.scSpecTypeBytes():case P.xdr.ScSpecType.scSpecTypeBytesN():return"Buffer";case P.xdr.ScSpecType.scSpecTypeString():case P.xdr.ScSpecType.scSpecTypeSymbol():return"string";case P.xdr.ScSpecType.scSpecTypeAddress():case P.xdr.ScSpecType.scSpecTypeMuxedAddress():return c?"string | Address":"string";case P.xdr.ScSpecType.scSpecTypeVec():var R=w(l.vec().elementType(),c);return"Array<".concat(R,">");case P.xdr.ScSpecType.scSpecTypeMap():var f=w(l.map().keyType(),c),E=w(l.map().valueType(),c);return"Map<".concat(f,", ").concat(E,">");case P.xdr.ScSpecType.scSpecTypeTuple():var k=l.tuple().valueTypes().map(function(z){return w(z,c)});return"[".concat(k.join(", "),"]");case P.xdr.ScSpecType.scSpecTypeOption():for(;l.option().valueType().switch()===P.xdr.ScSpecType.scSpecTypeOption();)l=l.option().valueType();var y=w(l.option().valueType(),c);return"".concat(y," | null");case P.xdr.ScSpecType.scSpecTypeResult():var _=w(l.result().okType(),c),m=w(l.result().errorType(),c);return"Result<".concat(_,", ").concat(m,">");case P.xdr.ScSpecType.scSpecTypeUdt():return O(l.udt().name().toString());default:return"unknown"}}function p(l,c){switch(l.switch()){case P.xdr.ScSpecType.scSpecTypeUdt():return void c.typeFileImports.add(O(l.udt().name().toString()));case P.xdr.ScSpecType.scSpecTypeAddress():case P.xdr.ScSpecType.scSpecTypeMuxedAddress():return void c.stellarImports.add("Address");case P.xdr.ScSpecType.scSpecTypeBytes():case P.xdr.ScSpecType.scSpecTypeBytesN():return void(c.needsBufferImport=!0);case P.xdr.ScSpecType.scSpecTypeVal():return void c.stellarImports.add("xdr");case P.xdr.ScSpecType.scSpecTypeResult():c.stellarContractImports.add("Result");break;case P.xdr.ScSpecType.scSpecTypeBool():case P.xdr.ScSpecType.scSpecTypeVoid():case P.xdr.ScSpecType.scSpecTypeError():case P.xdr.ScSpecType.scSpecTypeU32():case P.xdr.ScSpecType.scSpecTypeI32():case P.xdr.ScSpecType.scSpecTypeU64():case P.xdr.ScSpecType.scSpecTypeI64():case P.xdr.ScSpecType.scSpecTypeTimepoint():case P.xdr.ScSpecType.scSpecTypeDuration():case P.xdr.ScSpecType.scSpecTypeU128():case P.xdr.ScSpecType.scSpecTypeI128():case P.xdr.ScSpecType.scSpecTypeU256():case P.xdr.ScSpecType.scSpecTypeI256():case P.xdr.ScSpecType.scSpecTypeString():case P.xdr.ScSpecType.scSpecTypeSymbol():return}var R=(function(f){switch(f.switch()){case P.xdr.ScSpecType.scSpecTypeVec():return[f.vec().elementType()];case P.xdr.ScSpecType.scSpecTypeMap():return[f.map().keyType(),f.map().valueType()];case P.xdr.ScSpecType.scSpecTypeTuple():return f.tuple().valueTypes();case P.xdr.ScSpecType.scSpecTypeOption():return[f.option().valueType()];case P.xdr.ScSpecType.scSpecTypeResult():return[f.result().okType(),f.result().errorType()];default:return[]}})(l);R.forEach(function(f){return p(f,c)})}function S(l){var c={typeFileImports:new Set,stellarContractImports:new Set,stellarImports:new Set,needsBufferImport:!1};return l.forEach(function(R){return p(R,c)}),c}function o(l,c){var R=[],f=l.typeFileImports,E=[].concat(Y(l.stellarContractImports),Y(c?.additionalStellarContractImports||[])),k=[].concat(Y(l.stellarImports),Y(c?.additionalStellarImports||[]));if(c!=null&&c.includeTypeFileImports&&f.size>0&&R.push("import {".concat(Array.from(f).join(", "),"} from './types.js';")),E.length>0){var y=Array.from(new Set(E));R.push("import {".concat(y.join(", "),"} from '@stellar/stellar-sdk/contract';"))}if(k.length>0){var _=Array.from(new Set(k));R.push("import {".concat(_.join(", "),"} from '@stellar/stellar-sdk';"))}return l.needsBufferImport&&R.push("import { Buffer } from 'buffer';"),R.join(` +`)}function A(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(l.trim()==="")return"";var R=" ".repeat(c),f=l.replace(/\*\//g,"* /").replace(/@(?!(param|returns?|type|throws?|example|deprecated|see|link|since|author|version|description|summary)\b)/g,"\\@").split(` +`).map(function(E){return"".concat(R," * ").concat(E).trimEnd()});return"".concat(R,`/** +`).concat(f.join(` +`),` +`).concat(R,` */ +`)}function v(l){return l.fields().every(function(c,R){return c.name().toString().trim()===R.toString()})}},4459:Dt=>{"use strict";Dt.exports=Number.isNaN||function(Ot){return Ot!=Ot}},4610:(Dt,Ot,B)=>{"use strict";Dt.exports=o;var P=B(6048).F,Y=P.ERR_METHOD_NOT_IMPLEMENTED,a=P.ERR_MULTIPLE_CALLBACK,O=P.ERR_TRANSFORM_ALREADY_TRANSFORMING,w=P.ERR_TRANSFORM_WITH_LENGTH_0,p=B(5382);function S(l,c){var R=this._transformState;R.transforming=!1;var f=R.writecb;if(f===null)return this.emit("error",new a);R.writechunk=null,R.writecb=null,c!=null&&this.push(c),f(l);var E=this._readableState;E.reading=!1,(E.needReadable||E.length{function P(Y){try{if(!B.g.localStorage)return!1}catch{return!1}var a=B.g.localStorage[Y];return a!=null&&String(a).toLowerCase()==="true"}Dt.exports=function(Y,a){if(P("noDeprecation"))return Y;var O=!1;return function(){if(!O){if(P("throwDeprecation"))throw new Error(a);P("traceDeprecation")?console.trace(a):console.warn(a),O=!0}return Y.apply(this,arguments)}}},4704:function(Dt,Ot,B){var P,Y;(function(a,O){"use strict";Dt.exports?Dt.exports=O():(Y=typeof(P=O)=="function"?P.call(Ot,B,Ot,Dt):P)===void 0||(Dt.exports=Y)})(0,function(a){"use strict";var O=a&&a.SecondLevelDomains,w={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(p){var S=p.lastIndexOf(".");if(S<=0||S>=p.length-1)return!1;var o=p.lastIndexOf(".",S-1);if(o<=0||o>=S-1)return!1;var A=w.list[p.slice(S+1)];return!!A&&A.indexOf(" "+p.slice(o+1,S)+" ")>=0},is:function(p){var S=p.lastIndexOf(".");if(S<=0||S>=p.length-1||p.lastIndexOf(".",S-1)>=0)return!1;var o=w.list[p.slice(S+1)];return!!o&&o.indexOf(" "+p.slice(0,S)+" ")>=0},get:function(p){var S=p.lastIndexOf(".");if(S<=0||S>=p.length-1)return null;var o=p.lastIndexOf(".",S-1);if(o<=0||o>=S-1)return null;var A=w.list[p.slice(S+1)];return A?A.indexOf(" "+p.slice(o+1,S)+" ")<0?null:p.slice(o+1):null},noConflict:function(){return a.SecondLevelDomains===this&&(a.SecondLevelDomains=O),this}};return w})},4765:Dt=>{"use strict";var Ot=String.prototype.replace,B=/%20/g,P="RFC1738",Y="RFC3986";Dt.exports={default:Y,formatters:{RFC1738:function(a){return Ot.call(a,B,"+")},RFC3986:function(a){return String(a)}},RFC1738:P,RFC3986:Y}},4803:(Dt,Ot,B)=>{"use strict";var P=B(8859),Y=B(9675),a=function(O,w,p){for(var S,o=O;(S=o.next)!=null;o=S)if(S.key===w)return o.next=S.next,p||(S.next=O.next,O.next=S),S};Dt.exports=function(){var O,w={assert:function(p){if(!w.has(p))throw new Y("Side channel does not contain "+P(p))},delete:function(p){var S=O&&O.next,o=(function(A,v){if(A)return a(A,v,!0)})(O,p);return o&&S&&S===o&&(O=void 0),!!o},get:function(p){return(function(S,o){if(S){var A=a(S,o);return A&&A.value}})(O,p)},has:function(p){return(function(S,o){return!!S&&!!a(S,o)})(O,p)},set:function(p,S){O||(O={next:void 0}),(function(o,A,v){var l=a(o,A);l?l.value=v:o.next={key:A,next:o.next,value:v}})(O,p,S)}};return w}},5157:Dt=>{Dt.exports=function(){throw new Error("Readable.from is not available in the browser")}},5234:(Dt,Ot,B)=>{"use strict";B.d(Ot,{fe:()=>de});var P=B(8250);let Y="14.5.0";function a(u){return a=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},a(u)}function O(u,g){for(var I=0;I0?"".concat((0,l.SB)(St.doc,2),' { tag: "').concat(St.name,'"; values: readonly [').concat(St.types.join(", "),"] }"):"".concat((0,l.SB)(St.doc,2),' { tag: "').concat(St.name,'"; values: void }')}).join(` | +`);return"".concat(W," export type ").concat(I,` = +`).concat(Q,";")}},{key:"generateEnum",value:function(u){var g=(0,l.ff)(u.name().toString()),I=(0,l.SB)(u.doc().toString()||"Enum: ".concat(g),0),W=u.cases().map(function(Q){var St=Q.name().toString(),d=Q.value(),U=Q.doc().toString()||"Enum Case: ".concat(St);return"".concat((0,l.SB)(U,2)," ").concat(St," = ").concat(d)}).join(`, +`);return"".concat(I,"export enum ").concat(g,` { +`).concat(W,` +}`)}},{key:"generateErrorEnum",value:function(u){var g=this,I=(0,l.ff)(u.name().toString()),W=(0,l.SB)(u.doc().toString()||"Error Enum: ".concat(I),0),Q=u.cases().map(function(St){return g.generateEnumCase(St)}).map(function(St){return"".concat((0,l.SB)(St.doc,2)," ").concat(St.value,' : { message: "').concat(St.name,'" }')}).join(`, +`);return"".concat(W,"export const ").concat(I,` = { +`).concat(Q,` +}`)}},{key:"generateUnionCase",value:function(u){switch(u.switch()){case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():var g=u.voidCase();return{doc:g.doc().toString(),name:g.name().toString(),types:[]};case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var I=u.tupleCase();return{doc:I.doc().toString(),name:I.name().toString(),types:I.type().map(function(W){return(0,l.z0)(W)})};default:throw new Error("Unknown union case kind: ".concat(u.switch()))}}},{key:"generateEnumCase",value:function(u){return{doc:u.doc().toString(),name:u.name().toString(),value:u.value()}}},{key:"generateTupleStruct",value:function(u){var g=(0,l.ff)(u.name().toString()),I=(0,l.SB)(u.doc().toString()||"Tuple Struct: ".concat(g),0),W=u.fields().map(function(Q){return(0,l.z0)(Q.type())}).join(", ");return"".concat(I,"export type ").concat(g," = readonly [").concat(W,"];")}}]);function k(u){return k=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},k(u)}function y(u,g){for(var I=0;I0?(0,l.z0)(u.outputs()[0]):"void",Q=(0,l.SB)(u.doc().toString(),2),St=this.formatMethodParameters(I);return"".concat(Q," ").concat(g,"(").concat(St,"): Promise>;")}},{key:"generateFromJSONMethod",value:function(u){var g=u.name().toString(),I=u.outputs().length>0?(0,l.z0)(u.outputs()[0]):"void";return" ".concat(g," : this.txFromJSON<").concat(I,">")}},{key:"generateDeployMethod",value:function(u){if(!u){var g=this.formatConstructorParameters([]);return" static deploy(".concat(g,`): Promise> { + return ContractClient.deploy(null, options); + }`)}var I=u.inputs().map(function(St){return{name:St.name().toString(),type:(0,l.z0)(St.type(),!0)}}),W=this.formatConstructorParameters(I),Q=I.length>0?"{ ".concat(I.map(function(St){return St.name}).join(", ")," }, "):"";return" static deploy(".concat(W,`): Promise> { + return ContractClient.deploy(`).concat(Q,`options); + }`)}},{key:"formatMethodParameters",value:function(u){var g=[];if(u.length>0){var I="{ ".concat(u.map(function(W){return"".concat(W.name,": ").concat(W.type)}).join("; ")," }");g.push("{ ".concat(u.map(function(W){return W.name}).join(", ")," }: ").concat(I))}return g.push("options?: MethodOptions"),g.join(", ")}},{key:"formatConstructorParameters",value:function(u){var g=[];if(u.length>0){var I="{ ".concat(u.map(function(W){return"".concat(W.name,": ").concat(W.type)}).join("; ")," }");g.push("{ ".concat(u.map(function(W){return W.name}).join(", ")," }: ").concat(I))}return g.push(`options: MethodOptions & Omit & { wasmHash: Buffer | string; salt?: Buffer | Uint8Array; format?: "hex" | "base64"; address?: string; }`),g.join(", ")}}]),z=B(8451),X=B(8287).Buffer;function L(u){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(u)}function $(){var u,g,I=typeof Symbol=="function"?Symbol:{},W=I.iterator||"@@iterator",Q=I.toStringTag||"@@toStringTag";function St(x,G,at,Vt){var Pt=G&&G.prototype instanceof U?G:U,D=Object.create(Pt.prototype);return ut(D,"_invoke",(function(mt,gt,ft){var Gt,Lt,ie,$e=0,Ce=ft||[],He=!1,rr={p:0,n:0,v:u,a:qe,f:qe.bind(u,4),d:function(pr,De){return Gt=pr,Lt=0,ie=u,rr.n=De,d}};function qe(pr,De){for(Lt=pr,ie=De,g=0;!He&&$e&&!dr&&g3?(dr=bn===De)&&(ie=Pr[(Lt=Pr[4])?5:(Lt=3,3)],Pr[4]=Pr[5]=u):Pr[0]<=Zr&&((dr=pr<2&&ZrDe||De>bn)&&(Pr[4]=pr,Pr[5]=De,rr.n=bn,Lt=0))}if(dr||pr>1)return d;throw He=!0,De}return function(pr,De,dr){if($e>1)throw TypeError("Generator is already running");for(He&&De===1&&qe(De,dr),Lt=De,ie=dr;(g=Lt<2?u:ie)||!He;){Gt||(Lt?Lt<3?(Lt>1&&(rr.n=-1),qe(Lt,ie)):rr.n=ie:rr.v=ie);try{if($e=2,Gt){if(Lt||(pr="next"),g=Gt[pr]){if(!(g=g.call(Gt,ie)))throw TypeError("iterator result is not an object");if(!g.done)return g;ie=g.value,Lt<2&&(Lt=0)}else Lt===1&&(g=Gt.return)&&g.call(Gt),Lt<2&&(ie=TypeError("The iterator does not provide a '"+pr+"' method"),Lt=1);Gt=u}else if((g=(He=rr.n<0)?ie:mt.call(gt,rr))!==d)break}catch(Pr){Gt=u,Lt=1,ie=Pr}finally{$e=1}}return{value:g,done:He}}})(x,at,Vt),!0),D}var d={};function U(){}function M(){}function It(){}g=Object.getPrototypeOf;var Jt=[][W]?g(g([][W]())):(ut(g={},W,function(){return this}),g),Wt=It.prototype=U.prototype=Object.create(Jt);function xe(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,It):(x.__proto__=It,ut(x,Q,"GeneratorFunction")),x.prototype=Object.create(Wt),x}return M.prototype=It,ut(Wt,"constructor",It),ut(It,"constructor",M),M.displayName="GeneratorFunction",ut(It,Q,"GeneratorFunction"),ut(Wt),ut(Wt,Q,"Generator"),ut(Wt,W,function(){return this}),ut(Wt,"toString",function(){return"[object Generator]"}),($=function(){return{w:St,m:xe}})()}function ut(u,g,I,W){var Q=Object.defineProperty;try{Q({},"",{})}catch{Q=0}ut=function(St,d,U,M){function It(Jt,Wt){ut(St,Jt,function(xe){return this._invoke(Jt,Wt,xe)})}d?Q?Q(St,d,{value:U,enumerable:!M,configurable:!M,writable:!M}):St[d]=U:(It("next",0),It("throw",1),It("return",2))},ut(u,g,I,W)}function xt(u,g,I,W,Q,St,d){try{var U=u[St](d),M=U.value}catch(It){return void I(It)}U.done?g(M):Promise.resolve(M).then(W,Q)}function vt(u){return function(){var g=this,I=arguments;return new Promise(function(W,Q){var St=u.apply(g,I);function d(M){xt(St,W,Q,d,U,"next",M)}function U(M){xt(St,W,Q,d,U,"throw",M)}d(void 0)})}}function Zt(u,g){for(var I=0;I3?(dr=bn===De)&&(ie=Pr[(Lt=Pr[4])?5:(Lt=3,3)],Pr[4]=Pr[5]=u):Pr[0]<=Zr&&((dr=pr<2&&ZrDe||De>bn)&&(Pr[4]=pr,Pr[5]=De,rr.n=bn,Lt=0))}if(dr||pr>1)return d;throw He=!0,De}return function(pr,De,dr){if($e>1)throw TypeError("Generator is already running");for(He&&De===1&&qe(De,dr),Lt=De,ie=dr;(g=Lt<2?u:ie)||!He;){Gt||(Lt?Lt<3?(Lt>1&&(rr.n=-1),qe(Lt,ie)):rr.n=ie:rr.v=ie);try{if($e=2,Gt){if(Lt||(pr="next"),g=Gt[pr]){if(!(g=g.call(Gt,ie)))throw TypeError("iterator result is not an object");if(!g.done)return g;ie=g.value,Lt<2&&(Lt=0)}else Lt===1&&(g=Gt.return)&&g.call(Gt),Lt<2&&(ie=TypeError("The iterator does not provide a '"+pr+"' method"),Lt=1);Gt=u}else if((g=(He=rr.n<0)?ie:mt.call(gt,rr))!==d)break}catch(Pr){Gt=u,Lt=1,ie=Pr}finally{$e=1}}return{value:g,done:He}}})(x,at,Vt),!0),D}var d={};function U(){}function M(){}function It(){}g=Object.getPrototypeOf;var Jt=[][W]?g(g([][W]())):(F(g={},W,function(){return this}),g),Wt=It.prototype=U.prototype=Object.create(Jt);function xe(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,It):(x.__proto__=It,F(x,Q,"GeneratorFunction")),x.prototype=Object.create(Wt),x}return M.prototype=It,F(Wt,"constructor",It),F(It,"constructor",M),M.displayName="GeneratorFunction",F(It,Q,"GeneratorFunction"),F(Wt),F(Wt,Q,"Generator"),F(Wt,W,function(){return this}),F(Wt,"toString",function(){return"[object Generator]"}),(rt=function(){return{w:St,m:xe}})()}function F(u,g,I,W){var Q=Object.defineProperty;try{Q({},"",{})}catch{Q=0}F=function(St,d,U,M){function It(Jt,Wt){F(St,Jt,function(xe){return this._invoke(Jt,Wt,xe)})}d?Q?Q(St,d,{value:U,enumerable:!M,configurable:!M,writable:!M}):St[d]=U:(It("next",0),It("throw",1),It("return",2))},F(u,g,I,W)}function lt(u,g,I,W,Q,St,d){try{var U=u[St](d),M=U.value}catch(It){return void I(It)}U.done?g(M):Promise.resolve(M).then(W,Q)}function At(u){return function(){var g=this,I=arguments;return new Promise(function(W,Q){var St=u.apply(g,I);function d(M){lt(St,W,Q,d,U,"next",M)}function U(M){lt(St,W,Q,d,U,"throw",M)}d(void 0)})}}function Mt(u,g){for(var I=0;I{"use strict";var P=B(6048).F.ERR_INVALID_OPT_VALUE;Dt.exports={getHighWaterMark:function(Y,a,O,w){var p=(function(S,o,A){return S.highWaterMark!=null?S.highWaterMark:o?S[A]:null})(a,w,O);if(p!=null){if(!isFinite(p)||Math.floor(p)!==p||p<0)throw new P(w?O:"highWaterMark",p);return Math.floor(p)}return Y.objectMode?16:16384}}},5340:()=>{},5345:Dt=>{"use strict";Dt.exports=URIError},5373:(Dt,Ot,B)=>{"use strict";var P=B(8636),Y=B(2642),a=B(4765);Dt.exports={formats:a,parse:Y,stringify:P}},5382:(Dt,Ot,B)=>{"use strict";var P=Object.keys||function(v){var l=[];for(var c in v)l.push(c);return l};Dt.exports=S;var Y=B(5412),a=B(6708);B(6698)(S,Y);for(var O=P(a.prototype),w=0;w{"use strict";var P;Dt.exports=L,L.ReadableState=X,B(7007).EventEmitter;var Y=function(ot,it){return ot.listeners(it).length},a=B(345),O=B(8287).Buffer,w=(B.g!==void 0?B.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},p,S=B(9838);p=S&&S.debuglog?S.debuglog("stream"):function(){};var o,A,v,l=B(2726),c=B(5896),R=B(5291).getHighWaterMark,f=B(6048).F,E=f.ERR_INVALID_ARG_TYPE,k=f.ERR_STREAM_PUSH_AFTER_EOF,y=f.ERR_METHOD_NOT_IMPLEMENTED,_=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;B(6698)(L,a);var m=c.errorOrDestroy,z=["error","close","destroy","pause","resume"];function X(ot,it,Et){P=P||B(5382),ot=ot||{},typeof Et!="boolean"&&(Et=it instanceof P),this.objectMode=!!ot.objectMode,Et&&(this.objectMode=this.objectMode||!!ot.readableObjectMode),this.highWaterMark=R(this,ot,"readableHighWaterMark",Et),this.buffer=new l,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=ot.emitClose!==!1,this.autoDestroy=!!ot.autoDestroy,this.destroyed=!1,this.defaultEncoding=ot.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ot.encoding&&(o||(o=B(3141).I),this.decoder=new o(ot.encoding),this.encoding=ot.encoding)}function L(ot){if(P=P||B(5382),!(this instanceof L))return new L(ot);var it=this instanceof P;this._readableState=new X(ot,this,it),this.readable=!0,ot&&(typeof ot.read=="function"&&(this._read=ot.read),typeof ot.destroy=="function"&&(this._destroy=ot.destroy)),a.call(this)}function $(ot,it,Et,jt,et){p("readableAddChunk",it);var nt,rt=ot._readableState;if(it===null)rt.reading=!1,(function(F,lt){if(p("onEofChunk"),!lt.ended){if(lt.decoder){var At=lt.decoder.end();At&&At.length&&(lt.buffer.push(At),lt.length+=lt.objectMode?1:At.length)}lt.ended=!0,lt.sync?Zt(F):(lt.needReadable=!1,lt.emittedReadable||(lt.emittedReadable=!0,Bt(F)))}})(ot,rt);else if(et||(nt=(function(F,lt){var At;Mt=lt,O.isBuffer(Mt)||Mt instanceof w||typeof lt=="string"||lt===void 0||F.objectMode||(At=new E("chunk",["string","Buffer","Uint8Array"],lt));var Mt;return At})(rt,it)),nt)m(ot,nt);else if(rt.objectMode||it&&it.length>0)if(typeof it=="string"||rt.objectMode||Object.getPrototypeOf(it)===O.prototype||(it=(function(F){return O.from(F)})(it)),jt)rt.endEmitted?m(ot,new _):ut(ot,rt,it,!0);else if(rt.ended)m(ot,new k);else{if(rt.destroyed)return!1;rt.reading=!1,rt.decoder&&!Et?(it=rt.decoder.write(it),rt.objectMode||it.length!==0?ut(ot,rt,it,!1):q(ot,rt)):ut(ot,rt,it,!1)}else jt||(rt.reading=!1,q(ot,rt));return!rt.ended&&(rt.lengthit.highWaterMark&&(it.highWaterMark=(function(Et){return Et>=xt?Et=xt:(Et--,Et|=Et>>>1,Et|=Et>>>2,Et|=Et>>>4,Et|=Et>>>8,Et|=Et>>>16,Et++),Et})(ot)),ot<=it.length?ot:it.ended?it.length:(it.needReadable=!0,0))}function Zt(ot){var it=ot._readableState;p("emitReadable",it.needReadable,it.emittedReadable),it.needReadable=!1,it.emittedReadable||(p("emitReadable",it.flowing),it.emittedReadable=!0,__Process$.nextTick(Bt,ot))}function Bt(ot){var it=ot._readableState;p("emitReadable_",it.destroyed,it.length,it.ended),it.destroyed||!it.length&&!it.ended||(ot.emit("readable"),it.emittedReadable=!1),it.needReadable=!it.flowing&&!it.ended&&it.length<=it.highWaterMark,K(ot)}function q(ot,it){it.readingMore||(it.readingMore=!0,__Process$.nextTick(ct,ot,it))}function ct(ot,it){for(;!it.reading&&!it.ended&&(it.length0,it.resumeScheduled&&!it.paused?it.flowing=!0:ot.listenerCount("data")>0&&ot.resume()}function T(ot){p("readable nexttick read 0"),ot.read(0)}function N(ot,it){p("resume",it.reading),it.reading||ot.read(0),it.resumeScheduled=!1,ot.emit("resume"),K(ot),it.flowing&&!it.reading&&ot.read(0)}function K(ot){var it=ot._readableState;for(p("flow",it.flowing);it.flowing&&ot.read()!==null;);}function dt(ot,it){return it.length===0?null:(it.objectMode?Et=it.buffer.shift():!ot||ot>=it.length?(Et=it.decoder?it.buffer.join(""):it.buffer.length===1?it.buffer.first():it.buffer.concat(it.length),it.buffer.clear()):Et=it.buffer.consume(ot,it.decoder),Et);var Et}function j(ot){var it=ot._readableState;p("endReadable",it.endEmitted),it.endEmitted||(it.ended=!0,__Process$.nextTick(pt,it,ot))}function pt(ot,it){if(p("endReadableNT",ot.endEmitted,ot.length),!ot.endEmitted&&ot.length===0&&(ot.endEmitted=!0,it.readable=!1,it.emit("end"),ot.autoDestroy)){var Et=it._writableState;(!Et||Et.autoDestroy&&Et.finished)&&it.destroy()}}function _t(ot,it){for(var Et=0,jt=ot.length;Et=it.highWaterMark:it.length>0)||it.ended))return p("read: emitReadable",it.length,it.ended),it.length===0&&it.ended?j(this):Zt(this),null;if((ot=vt(ot,it))===0&&it.ended)return it.length===0&&j(this),null;var jt,et=it.needReadable;return p("need readable",et),(it.length===0||it.length-ot0?dt(ot,it):null)===null?(it.needReadable=it.length<=it.highWaterMark,ot=0):(it.length-=ot,it.awaitDrain=0),it.length===0&&(it.ended||(it.needReadable=!0),Et!==ot&&it.ended&&j(this)),jt!==null&&this.emit("data",jt),jt},L.prototype._read=function(ot){m(this,new y("_read()"))},L.prototype.pipe=function(ot,it){var Et=this,jt=this._readableState;switch(jt.pipesCount){case 0:jt.pipes=ot;break;case 1:jt.pipes=[jt.pipes,ot];break;default:jt.pipes.push(ot)}jt.pipesCount+=1,p("pipe count=%d opts=%j",jt.pipesCount,it);var et=(!it||it.end!==!1)&&ot!==__Process$.stdout&&ot!==__Process$.stderr?rt:u;function nt(g,I){p("onunpipe"),g===Et&&I&&I.hasUnpiped===!1&&(I.hasUnpiped=!0,p("cleanup"),ot.removeListener("close",$t),ot.removeListener("finish",de),ot.removeListener("drain",F),ot.removeListener("error",Mt),ot.removeListener("unpipe",nt),Et.removeListener("end",rt),Et.removeListener("end",u),Et.removeListener("data",At),lt=!0,!jt.awaitDrain||ot._writableState&&!ot._writableState.needDrain||F())}function rt(){p("onend"),ot.end()}jt.endEmitted?__Process$.nextTick(et):Et.once("end",et),ot.on("unpipe",nt);var F=(function(g){return function(){var I=g._readableState;p("pipeOnDrain",I.awaitDrain),I.awaitDrain&&I.awaitDrain--,I.awaitDrain===0&&Y(g,"data")&&(I.flowing=!0,K(g))}})(Et);ot.on("drain",F);var lt=!1;function At(g){p("ondata");var I=ot.write(g);p("dest.write",I),I===!1&&((jt.pipesCount===1&&jt.pipes===ot||jt.pipesCount>1&&_t(jt.pipes,ot)!==-1)&&!lt&&(p("false write response, pause",jt.awaitDrain),jt.awaitDrain++),Et.pause())}function Mt(g){p("onerror",g),u(),ot.removeListener("error",Mt),Y(ot,"error")===0&&m(ot,g)}function $t(){ot.removeListener("finish",de),u()}function de(){p("onfinish"),ot.removeListener("close",$t),u()}function u(){p("unpipe"),Et.unpipe(ot)}return Et.on("data",At),(function(g,I,W){if(typeof g.prependListener=="function")return g.prependListener(I,W);g._events&&g._events[I]?Array.isArray(g._events[I])?g._events[I].unshift(W):g._events[I]=[W,g._events[I]]:g.on(I,W)})(ot,"error",Mt),ot.once("close",$t),ot.once("finish",de),ot.emit("pipe",Et),jt.flowing||(p("pipe resume"),Et.resume()),ot},L.prototype.unpipe=function(ot){var it=this._readableState,Et={hasUnpiped:!1};if(it.pipesCount===0)return this;if(it.pipesCount===1)return ot&&ot!==it.pipes||(ot||(ot=it.pipes),it.pipes=null,it.pipesCount=0,it.flowing=!1,ot&&ot.emit("unpipe",this,Et)),this;if(!ot){var jt=it.pipes,et=it.pipesCount;it.pipes=null,it.pipesCount=0,it.flowing=!1;for(var nt=0;nt0,jt.flowing!==!1&&this.resume()):ot==="readable"&&(jt.endEmitted||jt.readableListening||(jt.readableListening=jt.needReadable=!0,jt.flowing=!1,jt.emittedReadable=!1,p("on readable",jt.length,jt.reading),jt.length?Zt(this):jt.reading||__Process$.nextTick(T,this))),Et},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(ot,it){var Et=a.prototype.removeListener.call(this,ot,it);return ot==="readable"&&__Process$.nextTick(i,this),Et},L.prototype.removeAllListeners=function(ot){var it=a.prototype.removeAllListeners.apply(this,arguments);return ot!=="readable"&&ot!==void 0||__Process$.nextTick(i,this),it},L.prototype.resume=function(){var ot=this._readableState;return ot.flowing||(p("resume"),ot.flowing=!ot.readableListening,(function(it,Et){Et.resumeScheduled||(Et.resumeScheduled=!0,__Process$.nextTick(N,it,Et))})(this,ot)),ot.paused=!1,this},L.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(ot){var it=this,Et=this._readableState,jt=!1;for(var et in ot.on("end",function(){if(p("wrapped end"),Et.decoder&&!Et.ended){var rt=Et.decoder.end();rt&&rt.length&&it.push(rt)}it.push(null)}),ot.on("data",function(rt){p("wrapped data"),Et.decoder&&(rt=Et.decoder.write(rt)),Et.objectMode&&rt==null||(Et.objectMode||rt&&rt.length)&&(it.push(rt)||(jt=!0,ot.pause()))}),ot)this[et]===void 0&&typeof ot[et]=="function"&&(this[et]=(function(rt){return function(){return ot[rt].apply(ot,arguments)}})(et));for(var nt=0;nt{var P=B(8287).Buffer,Y=B(6688),a=B(6698),O=B(6917),w=B(8399),p=O.IncomingMessage,S=O.readyStates,o=Dt.exports=function(v){var l,c=this;w.Writable.call(c),c._opts=v,c._body=[],c._headers={},v.auth&&c.setHeader("Authorization","Basic "+P.from(v.auth).toString("base64")),Object.keys(v.headers).forEach(function(f){c.setHeader(f,v.headers[f])});var R=!0;if(v.mode==="disable-fetch"||"requestTimeout"in v&&!Y.abortController)R=!1,l=!0;else if(v.mode==="prefer-streaming")l=!1;else if(v.mode==="allow-wrong-content-type")l=!Y.overrideMimeType;else{if(v.mode&&v.mode!=="default"&&v.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");l=!0}c._mode=(function(f,E){return Y.fetch&&E?"fetch":Y.mozchunkedarraybuffer?"moz-chunked-arraybuffer":Y.msstream?"ms-stream":Y.arraybuffer&&f?"arraybuffer":"text"})(l,R),c._fetchTimer=null,c._socketTimeout=null,c._socketTimer=null,c.on("finish",function(){c._onFinish()})};a(o,w.Writable),o.prototype.setHeader=function(v,l){var c=v.toLowerCase();A.indexOf(c)===-1&&(this._headers[c]={name:v,value:l})},o.prototype.getHeader=function(v){var l=this._headers[v.toLowerCase()];return l?l.value:null},o.prototype.removeHeader=function(v){delete this._headers[v.toLowerCase()]},o.prototype._onFinish=function(){var v=this;if(!v._destroyed){var l=v._opts;"timeout"in l&&l.timeout!==0&&v.setTimeout(l.timeout);var c=v._headers,R=null;l.method!=="GET"&&l.method!=="HEAD"&&(R=new Blob(v._body,{type:(c["content-type"]||{}).value||""}));var f=[];if(Object.keys(c).forEach(function(_){var m=c[_].name,z=c[_].value;Array.isArray(z)?z.forEach(function(X){f.push([m,X])}):f.push([m,z])}),v._mode==="fetch"){var E=null;if(Y.abortController){var k=new AbortController;E=k.signal,v._fetchAbortController=k,"requestTimeout"in l&&l.requestTimeout!==0&&(v._fetchTimer=B.g.setTimeout(function(){v.emit("requestTimeout"),v._fetchAbortController&&v._fetchAbortController.abort()},l.requestTimeout))}B.g.fetch(v._opts.url,{method:v._opts.method,headers:f,body:R||void 0,mode:"cors",credentials:l.withCredentials?"include":"same-origin",signal:E}).then(function(_){v._fetchResponse=_,v._resetTimers(!1),v._connect()},function(_){v._resetTimers(!0),v._destroyed||v.emit("error",_)})}else{var y=v._xhr=new B.g.XMLHttpRequest;try{y.open(v._opts.method,v._opts.url,!0)}catch(_){return void __Process$.nextTick(function(){v.emit("error",_)})}"responseType"in y&&(y.responseType=v._mode),"withCredentials"in y&&(y.withCredentials=!!l.withCredentials),v._mode==="text"&&"overrideMimeType"in y&&y.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in l&&(y.timeout=l.requestTimeout,y.ontimeout=function(){v.emit("requestTimeout")}),f.forEach(function(_){y.setRequestHeader(_[0],_[1])}),v._response=null,y.onreadystatechange=function(){switch(y.readyState){case S.LOADING:case S.DONE:v._onXHRProgress()}},v._mode==="moz-chunked-arraybuffer"&&(y.onprogress=function(){v._onXHRProgress()}),y.onerror=function(){v._destroyed||(v._resetTimers(!0),v.emit("error",new Error("XHR error")))};try{y.send(R)}catch(_){return void __Process$.nextTick(function(){v.emit("error",_)})}}}},o.prototype._onXHRProgress=function(){var v=this;v._resetTimers(!1),(function(l){try{var c=l.status;return c!==null&&c!==0}catch{return!1}})(v._xhr)&&!v._destroyed&&(v._response||v._connect(),v._response._onXHRProgress(v._resetTimers.bind(v)))},o.prototype._connect=function(){var v=this;v._destroyed||(v._response=new p(v._xhr,v._fetchResponse,v._mode,v._resetTimers.bind(v)),v._response.on("error",function(l){v.emit("error",l)}),v.emit("response",v._response))},o.prototype._write=function(v,l,c){this._body.push(v),c()},o.prototype._resetTimers=function(v){var l=this;B.g.clearTimeout(l._socketTimer),l._socketTimer=null,v?(B.g.clearTimeout(l._fetchTimer),l._fetchTimer=null):l._socketTimeout&&(l._socketTimer=B.g.setTimeout(function(){l.emit("timeout")},l._socketTimeout))},o.prototype.abort=o.prototype.destroy=function(v){var l=this;l._destroyed=!0,l._resetTimers(!0),l._response&&(l._response._destroyed=!0),l._xhr?l._xhr.abort():l._fetchAbortController&&l._fetchAbortController.abort(),v&&l.emit("error",v)},o.prototype.end=function(v,l,c){typeof v=="function"&&(c=v,v=void 0),w.Writable.prototype.end.call(this,v,l,c)},o.prototype.setTimeout=function(v,l){var c=this;l&&c.once("timeout",l),c._socketTimeout=v,c._resetTimers(!1)},o.prototype.flushHeaders=function(){},o.prototype.setNoDelay=function(){},o.prototype.setSocketKeepAlive=function(){};var A=["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"]},5546:Dt=>{Dt.exports=(function(){function Ot(B,P,Y,a,O,w){this.message=B,this.expected=P,this.found=Y,this.offset=a,this.line=O,this.column=w,this.name="SyntaxError"}return(function(B,P){function Y(){this.constructor=B}Y.prototype=P.prototype,B.prototype=new Y})(Ot,Error),{SyntaxError:Ot,parse:function(B){var P,Y=arguments.length>1?arguments[1]:{},a={},O={start:hr},w=hr,p=function(){return ei},S=a,o="#",A={type:"literal",value:"#",description:'"#"'},v=void 0,l={type:"any",description:"any character"},c="[",R={type:"literal",value:"[",description:'"["'},f="]",E={type:"literal",value:"]",description:'"]"'},k=function(tt){To(Sn("ObjectPath",tt,_e,Oe))},y=function(tt){To(Sn("ArrayPath",tt,_e,Oe))},_=function(tt,Ft){return tt.concat(Ft)},m=function(tt){return[tt]},z=function(tt){return tt},X=".",L={type:"literal",value:".",description:'"."'},$="=",ut={type:"literal",value:"=",description:'"="'},xt=function(tt,Ft){To(Sn("Assign",Ft,_e,Oe,tt))},vt=function(tt){return tt.join("")},Zt=function(tt){return tt.value},Bt='"""',q={type:"literal",value:'"""',description:'"\\"\\"\\""'},ct=null,i=function(tt){return Sn("String",tt.join(""),_e,Oe)},T='"',N={type:"literal",value:'"',description:'"\\""'},K="'''",dt={type:"literal",value:"'''",description:`"'''"`},j="'",pt={type:"literal",value:"'",description:`"'"`},_t=function(tt){return tt},ot=function(tt){return tt},it="\\",Et={type:"literal",value:"\\",description:'"\\\\"'},jt=function(){return""},et="e",nt={type:"literal",value:"e",description:'"e"'},rt="E",F={type:"literal",value:"E",description:'"E"'},lt=function(tt,Ft){return Sn("Float",parseFloat(tt+"e"+Ft),_e,Oe)},At=function(tt){return Sn("Float",parseFloat(tt),_e,Oe)},Mt="+",$t={type:"literal",value:"+",description:'"+"'},de=function(tt){return tt.join("")},u="-",g={type:"literal",value:"-",description:'"-"'},I=function(tt){return"-"+tt.join("")},W=function(tt){return Sn("Integer",parseInt(tt,10),_e,Oe)},Q="true",St={type:"literal",value:"true",description:'"true"'},d=function(){return Sn("Boolean",!0,_e,Oe)},U="false",M={type:"literal",value:"false",description:'"false"'},It=function(){return Sn("Boolean",!1,_e,Oe)},Jt=function(){return Sn("Array",[],_e,Oe)},Wt=function(tt){return Sn("Array",tt?[tt]:[],_e,Oe)},xe=function(tt){return Sn("Array",tt,_e,Oe)},x=function(tt,Ft){return Sn("Array",tt.concat(Ft),_e,Oe)},G=function(tt){return tt},at=",",Vt={type:"literal",value:",",description:'","'},Pt="{",D={type:"literal",value:"{",description:'"{"'},mt="}",gt={type:"literal",value:"}",description:'"}"'},ft=function(tt){return Sn("InlineTable",tt,_e,Oe)},Gt=function(tt,Ft){return Sn("InlineTableValue",Ft,_e,Oe,tt)},Lt=function(tt){return"."+tt},ie=function(tt){return tt.join("")},$e=":",Ce={type:"literal",value:":",description:'":"'},He=function(tt){return tt.join("")},rr="T",qe={type:"literal",value:"T",description:'"T"'},pr="Z",De={type:"literal",value:"Z",description:'"Z"'},dr=function(tt,Ft){return Sn("Date",new Date(tt+"T"+Ft+"Z"),_e,Oe)},Pr=function(tt,Ft){return Sn("Date",new Date(tt+"T"+Ft),_e,Oe)},Zr=/^[ \t]/,bn={type:"class",value:"[ \\t]",description:"[ \\t]"},En=` +`,lo={type:"literal",value:` +`,description:'"\\n"'},Zn="\r",So={type:"literal",value:"\r",description:'"\\r"'},Gn=/^[0-9a-f]/i,ao={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},un=/^[0-9]/,zr={type:"class",value:"[0-9]",description:"[0-9]"},cn="_",Yn={type:"literal",value:"_",description:'"_"'},yo=function(){return""},Un=/^[A-Za-z0-9_\-]/,ln={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},so=function(tt){return tt.join("")},Qr='\\"',Wr={type:"literal",value:'\\"',description:'"\\\\\\""'},Pn=function(){return'"'},Dr="\\\\",mn={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},$n=function(){return"\\"},fo="\\b",Ho={type:"literal",value:"\\b",description:'"\\\\b"'},$o=function(){return"\b"},Bo="\\t",ro={type:"literal",value:"\\t",description:'"\\\\t"'},Lo=function(){return" "},Co="\\n",zo={type:"literal",value:"\\n",description:'"\\\\n"'},ht=function(){return` +`},J="\\f",Ut={type:"literal",value:"\\f",description:'"\\\\f"'},ne=function(){return"\f"},Nt="\\r",ce={type:"literal",value:"\\r",description:'"\\\\r"'},Ue=function(){return"\r"},Ne="\\U",ue={type:"literal",value:"\\U",description:'"\\\\U"'},le=function(tt){return(function(Ft,Kt,Xt){var oe=parseInt("0x"+Ft);if(!(!isFinite(oe)||Math.floor(oe)!=oe||oe<0||oe>1114111||oe>55295&&oe<57344))return(function(){var be,ye,gr=16384,vr=[],Ur=-1,br=arguments.length;if(!br)return"";for(var Rr="";++Ur>10),ye=cr%1024+56320,vr.push(be,ye)),(Ur+1==br||vr.length>gr)&&(Rr+=String.fromCharCode.apply(null,vr),vr.length=0)}return Rr})(oe);(function(be,ye,gr){var vr=new Error(be);throw vr.line=ye,vr.column=gr,vr})("Invalid Unicode escape code: "+Ft,Kt,Xt)})(tt.join(""))},pe="\\u",We={type:"literal",value:"\\u",description:'"\\\\u"'},n=0,Z=0,bt=0,kt={line:1,column:1,seenCR:!1},Qt=0,te=[],wt=0,qt={};if("startRule"in Y){if(!(Y.startRule in O))throw new Error(`Can't start parsing from rule "`+Y.startRule+'".');w=O[Y.startRule]}function _e(){return ke(Z).line}function Oe(){return ke(Z).column}function ke(tt){return bt!==tt&&(bt>tt&&(bt=0,kt={line:1,column:1,seenCR:!1}),(function(Ft,Kt,Xt){var oe,be;for(oe=Kt;oeQt&&(Qt=n,te=[]),te.push(tt))}function Re(tt,Ft,Kt){var Xt=ke(Kt),oe=Ktvr.description?1:0});ye1?vr.slice(0,-1).join(", ")+" or "+vr[be.length-1]:vr[0])+" but "+(ye?'"'+(function(Ur){function br(Rr){return Rr.charCodeAt(0).toString(16).toUpperCase()}return Ur.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(Rr){return"\\x0"+br(Rr)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(Rr){return"\\x"+br(Rr)}).replace(/[\u0180-\u0FFF]/g,function(Rr){return"\\u0"+br(Rr)}).replace(/[\u1080-\uFFFF]/g,function(Rr){return"\\u"+br(Rr)})})(ye)+'"':"end of input")+" found."})(Ft,oe),Ft,oe,Kt,Xt.line,Xt.column)}function hr(){var tt,Ft,Kt,Xt=49*n+0,oe=qt[Xt];if(oe)return n=oe.nextPos,oe.result;for(tt=n,Ft=[],Kt=wr();Kt!==a;)Ft.push(Kt),Kt=wr();return Ft!==a&&(Z=tt,Ft=p()),tt=Ft,qt[Xt]={nextPos:n,result:tt},tt}function wr(){var tt,Ft,Kt,Xt,oe,be,ye,gr=49*n+1,vr=qt[gr];if(vr)return n=vr.nextPos,vr.result;for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if(Kt=(function(){var Ur,br=49*n+2,Rr=qt[br];return Rr?(n=Rr.nextPos,Rr.result):(Ur=or(),Ur===a&&(Ur=(function(){var cr,Jr,kn,yn,Vr,dn,Nn=49*n+4,Dn=qt[Nn];if(Dn)return n=Dn.nextPos,Dn.result;if(cr=n,B.charCodeAt(n)===91?(Jr=c,n++):(Jr=a,wt===0&&ee(R)),Jr!==a){for(kn=[],yn=_r();yn!==a;)kn.push(yn),yn=_r();if(kn!==a)if((yn=yr())!==a){for(Vr=[],dn=_r();dn!==a;)Vr.push(dn),dn=_r();Vr!==a?(B.charCodeAt(n)===93?(dn=f,n++):(dn=a,wt===0&&ee(E)),dn!==a?(Z=cr,cr=Jr=k(yn)):(n=cr,cr=S)):(n=cr,cr=S)}else n=cr,cr=S;else n=cr,cr=S}else n=cr,cr=S;return qt[Nn]={nextPos:n,result:cr},cr})(),Ur===a&&(Ur=(function(){var cr,Jr,kn,yn,Vr,dn,Nn,Dn,ko=49*n+5,Jn=qt[ko];if(Jn)return n=Jn.nextPos,Jn.result;if(cr=n,B.charCodeAt(n)===91?(Jr=c,n++):(Jr=a,wt===0&&ee(R)),Jr!==a)if(B.charCodeAt(n)===91?(kn=c,n++):(kn=a,wt===0&&ee(R)),kn!==a){for(yn=[],Vr=_r();Vr!==a;)yn.push(Vr),Vr=_r();if(yn!==a)if((Vr=yr())!==a){for(dn=[],Nn=_r();Nn!==a;)dn.push(Nn),Nn=_r();dn!==a?(B.charCodeAt(n)===93?(Nn=f,n++):(Nn=a,wt===0&&ee(E)),Nn!==a?(B.charCodeAt(n)===93?(Dn=f,n++):(Dn=a,wt===0&&ee(E)),Dn!==a?(Z=cr,cr=Jr=y(Vr)):(n=cr,cr=S)):(n=cr,cr=S)):(n=cr,cr=S)}else n=cr,cr=S;else n=cr,cr=S}else n=cr,cr=S;else n=cr,cr=S;return qt[ko]={nextPos:n,result:cr},cr})(),Ur===a&&(Ur=(function(){var cr,Jr,kn,yn,Vr,dn,Nn=49*n+9,Dn=qt[Nn];if(Dn)return n=Dn.nextPos,Dn.result;if(cr=n,Jr=sr(),Jr!==a){for(kn=[],yn=_r();yn!==a;)kn.push(yn),yn=_r();if(kn!==a)if(B.charCodeAt(n)===61?(yn=$,n++):(yn=a,wt===0&&ee(ut)),yn!==a){for(Vr=[],dn=_r();dn!==a;)Vr.push(dn),dn=_r();Vr!==a&&(dn=Er())!==a?(Z=cr,cr=Jr=xt(Jr,dn)):(n=cr,cr=S)}else n=cr,cr=S;else n=cr,cr=S}else n=cr,cr=S;if(cr===a)if(cr=n,(Jr=Ze())!==a){for(kn=[],yn=_r();yn!==a;)kn.push(yn),yn=_r();if(kn!==a)if(B.charCodeAt(n)===61?(yn=$,n++):(yn=a,wt===0&&ee(ut)),yn!==a){for(Vr=[],dn=_r();dn!==a;)Vr.push(dn),dn=_r();Vr!==a&&(dn=Er())!==a?(Z=cr,cr=Jr=xt(Jr,dn)):(n=cr,cr=S)}else n=cr,cr=S;else n=cr,cr=S}else n=cr,cr=S;return qt[Nn]={nextPos:n,result:cr},cr})()))),qt[br]={nextPos:n,result:Ur},Ur)})(),Kt!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();if(Xt!==a){for(oe=[],be=or();be!==a;)oe.push(be),be=or();if(oe!==a){if(be=[],(ye=Rn())!==a)for(;ye!==a;)be.push(ye),ye=Rn();else be=S;be===a&&(be=Ro()),be!==a?tt=Ft=[Ft,Kt,Xt,oe,be]:(n=tt,tt=S)}else n=tt,tt=S}else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S;if(tt===a){if(tt=n,Ft=[],(Kt=_r())!==a)for(;Kt!==a;)Ft.push(Kt),Kt=_r();else Ft=S;if(Ft!==a){if(Kt=[],(Xt=Rn())!==a)for(;Xt!==a;)Kt.push(Xt),Xt=Rn();else Kt=S;Kt===a&&(Kt=Ro()),Kt!==a?tt=Ft=[Ft,Kt]:(n=tt,tt=S)}else n=tt,tt=S;tt===a&&(tt=Rn())}return qt[gr]={nextPos:n,result:tt},tt}function or(){var tt,Ft,Kt,Xt,oe,be,ye=49*n+3,gr=qt[ye];if(gr)return n=gr.nextPos,gr.result;if(tt=n,B.charCodeAt(n)===35?(Ft=o,n++):(Ft=a,wt===0&&ee(A)),Ft!==a){for(Kt=[],Xt=n,oe=n,wt++,(be=Rn())===a&&(be=Ro()),wt--,be===a?oe=v:(n=oe,oe=S),oe!==a?(B.length>n?(be=B.charAt(n),n++):(be=a,wt===0&&ee(l)),be!==a?Xt=oe=[oe,be]:(n=Xt,Xt=S)):(n=Xt,Xt=S);Xt!==a;)Kt.push(Xt),Xt=n,oe=n,wt++,(be=Rn())===a&&(be=Ro()),wt--,be===a?oe=v:(n=oe,oe=S),oe!==a?(B.length>n?(be=B.charAt(n),n++):(be=a,wt===0&&ee(l)),be!==a?Xt=oe=[oe,be]:(n=Xt,Xt=S)):(n=Xt,Xt=S);Kt!==a?tt=Ft=[Ft,Kt]:(n=tt,tt=S)}else n=tt,tt=S;return qt[ye]={nextPos:n,result:tt},tt}function yr(){var tt,Ft,Kt,Xt=49*n+6,oe=qt[Xt];if(oe)return n=oe.nextPos,oe.result;if(tt=n,Ft=[],(Kt=ur())!==a)for(;Kt!==a;)Ft.push(Kt),Kt=ur();else Ft=S;return Ft!==a&&(Kt=Cr())!==a?(Z=tt,tt=Ft=_(Ft,Kt)):(n=tt,tt=S),tt===a&&(tt=n,(Ft=Cr())!==a&&(Z=tt,Ft=m(Ft)),tt=Ft),qt[Xt]={nextPos:n,result:tt},tt}function Cr(){var tt,Ft,Kt,Xt,oe,be=49*n+7,ye=qt[be];if(ye)return n=ye.nextPos,ye.result;for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=sr())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();Xt!==a?(Z=tt,tt=Ft=z(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S;if(tt===a){for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=Ze())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();Xt!==a?(Z=tt,tt=Ft=z(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}return qt[be]={nextPos:n,result:tt},tt}function ur(){var tt,Ft,Kt,Xt,oe,be,ye,gr=49*n+8,vr=qt[gr];if(vr)return n=vr.nextPos,vr.result;for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=sr())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();if(Xt!==a)if(B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),oe!==a){for(be=[],ye=_r();ye!==a;)be.push(ye),ye=_r();be!==a?(Z=tt,tt=Ft=z(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S;if(tt===a){for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=Ze())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();if(Xt!==a)if(B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),oe!==a){for(be=[],ye=_r();ye!==a;)be.push(ye),ye=_r();be!==a?(Z=tt,tt=Ft=z(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S}return qt[gr]={nextPos:n,result:tt},tt}function sr(){var tt,Ft,Kt,Xt=49*n+10,oe=qt[Xt];if(oe)return n=oe.nextPos,oe.result;if(tt=n,Ft=[],(Kt=ni())!==a)for(;Kt!==a;)Ft.push(Kt),Kt=ni();else Ft=S;return Ft!==a&&(Z=tt,Ft=vt(Ft)),tt=Ft,qt[Xt]={nextPos:n,result:tt},tt}function Ze(){var tt,Ft,Kt=49*n+11,Xt=qt[Kt];return Xt?(n=Xt.nextPos,Xt.result):(tt=n,(Ft=hn())!==a&&(Z=tt,Ft=Zt(Ft)),(tt=Ft)===a&&(tt=n,(Ft=jr())!==a&&(Z=tt,Ft=Zt(Ft)),tt=Ft),qt[Kt]={nextPos:n,result:tt},tt)}function Er(){var tt,Ft=49*n+12,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):(tt=(function(){var Xt,oe=49*n+13,be=qt[oe];return be?(n=be.nextPos,be.result):(Xt=(function(){var ye,gr,vr,Ur,br,Rr=49*n+14,cr=qt[Rr];if(cr)return n=cr.nextPos,cr.result;if(ye=n,B.substr(n,3)===Bt?(gr=Bt,n+=3):(gr=a,wt===0&&ee(q)),gr!==a)if((vr=Rn())===a&&(vr=ct),vr!==a){for(Ur=[],br=Xn();br!==a;)Ur.push(br),br=Xn();Ur!==a?(B.substr(n,3)===Bt?(br=Bt,n+=3):(br=a,wt===0&&ee(q)),br!==a?(Z=ye,ye=gr=i(Ur)):(n=ye,ye=S)):(n=ye,ye=S)}else n=ye,ye=S;else n=ye,ye=S;return qt[Rr]={nextPos:n,result:ye},ye})(),Xt===a&&(Xt=hn())===a&&(Xt=(function(){var ye,gr,vr,Ur,br,Rr=49*n+16,cr=qt[Rr];if(cr)return n=cr.nextPos,cr.result;if(ye=n,B.substr(n,3)===K?(gr=K,n+=3):(gr=a,wt===0&&ee(dt)),gr!==a)if((vr=Rn())===a&&(vr=ct),vr!==a){for(Ur=[],br=Fo();br!==a;)Ur.push(br),br=Fo();Ur!==a?(B.substr(n,3)===K?(br=K,n+=3):(br=a,wt===0&&ee(dt)),br!==a?(Z=ye,ye=gr=i(Ur)):(n=ye,ye=S)):(n=ye,ye=S)}else n=ye,ye=S;else n=ye,ye=S;return qt[Rr]={nextPos:n,result:ye},ye})(),Xt===a&&(Xt=jr())),qt[oe]={nextPos:n,result:Xt},Xt)})(),tt===a&&(tt=(function(){var Xt,oe,be,ye,gr,vr=49*n+38,Ur=qt[vr];return Ur?(n=Ur.nextPos,Ur.result):(Xt=n,(oe=Vo())!==a?(B.charCodeAt(n)===84?(be=rr,n++):(be=a,wt===0&&ee(qe)),be!==a?(ye=(function(){var br,Rr,cr,Jr,kn,yn,Vr,dn,Nn,Dn,ko,Jn=49*n+36,Zo=qt[Jn];return Zo?(n=Zo.nextPos,Zo.result):(br=n,Rr=n,cr=pn(),cr!==a&&(Jr=pn())!==a?(B.charCodeAt(n)===58?(kn=$e,n++):(kn=a,wt===0&&ee(Ce)),kn!==a&&(yn=pn())!==a&&(Vr=pn())!==a?(B.charCodeAt(n)===58?(dn=$e,n++):(dn=a,wt===0&&ee(Ce)),dn!==a&&(Nn=pn())!==a&&(Dn=pn())!==a?((ko=Xr())===a&&(ko=ct),ko!==a?Rr=cr=[cr,Jr,kn,yn,Vr,dn,Nn,Dn,ko]:(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S),Rr!==a&&(Z=br,Rr=He(Rr)),br=Rr,qt[Jn]={nextPos:n,result:br},br)})(),ye!==a?(B.charCodeAt(n)===90?(gr=pr,n++):(gr=a,wt===0&&ee(De)),gr!==a?(Z=Xt,Xt=oe=dr(oe,ye)):(n=Xt,Xt=S)):(n=Xt,Xt=S)):(n=Xt,Xt=S)):(n=Xt,Xt=S),Xt===a&&(Xt=n,(oe=Vo())!==a?(B.charCodeAt(n)===84?(be=rr,n++):(be=a,wt===0&&ee(qe)),be!==a?(ye=(function(){var br,Rr,cr,Jr,kn,yn,Vr,dn,Nn,Dn,ko,Jn,Zo,oi,ri,Kn,no,ii=49*n+37,Do=qt[ii];return Do?(n=Do.nextPos,Do.result):(br=n,Rr=n,cr=pn(),cr!==a&&(Jr=pn())!==a?(B.charCodeAt(n)===58?(kn=$e,n++):(kn=a,wt===0&&ee(Ce)),kn!==a&&(yn=pn())!==a&&(Vr=pn())!==a?(B.charCodeAt(n)===58?(dn=$e,n++):(dn=a,wt===0&&ee(Ce)),dn!==a&&(Nn=pn())!==a&&(Dn=pn())!==a?((ko=Xr())===a&&(ko=ct),ko!==a?(B.charCodeAt(n)===45?(Jn=u,n++):(Jn=a,wt===0&&ee(g)),Jn===a&&(B.charCodeAt(n)===43?(Jn=Mt,n++):(Jn=a,wt===0&&ee($t))),Jn!==a&&(Zo=pn())!==a&&(oi=pn())!==a?(B.charCodeAt(n)===58?(ri=$e,n++):(ri=a,wt===0&&ee(Ce)),ri!==a&&(Kn=pn())!==a&&(no=pn())!==a?Rr=cr=[cr,Jr,kn,yn,Vr,dn,Nn,Dn,ko,Jn,Zo,oi,ri,Kn,no]:(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S)):(n=Rr,Rr=S),Rr!==a&&(Z=br,Rr=He(Rr)),br=Rr,qt[ii]={nextPos:n,result:br},br)})(),ye!==a?(Z=Xt,Xt=oe=Pr(oe,ye)):(n=Xt,Xt=S)):(n=Xt,Xt=S)):(n=Xt,Xt=S)),qt[vr]={nextPos:n,result:Xt},Xt)})(),tt===a&&(tt=(function(){var Xt,oe,be,ye,gr=49*n+23,vr=qt[gr];return vr?(n=vr.nextPos,vr.result):(Xt=n,(oe=mo())===a&&(oe=wn()),oe!==a?(B.charCodeAt(n)===101?(be=et,n++):(be=a,wt===0&&ee(nt)),be===a&&(B.charCodeAt(n)===69?(be=rt,n++):(be=a,wt===0&&ee(F))),be!==a&&(ye=wn())!==a?(Z=Xt,Xt=oe=lt(oe,ye)):(n=Xt,Xt=S)):(n=Xt,Xt=S),Xt===a&&(Xt=n,(oe=mo())!==a&&(Z=Xt,oe=At(oe)),Xt=oe),qt[gr]={nextPos:n,result:Xt},Xt)})(),tt===a&&(tt=(function(){var Xt,oe,be=49*n+25,ye=qt[be];return ye?(n=ye.nextPos,ye.result):(Xt=n,(oe=wn())!==a&&(Z=Xt,oe=W(oe)),Xt=oe,qt[be]={nextPos:n,result:Xt},Xt)})(),tt===a&&(tt=(function(){var Xt,oe,be=49*n+27,ye=qt[be];return ye?(n=ye.nextPos,ye.result):(Xt=n,B.substr(n,4)===Q?(oe=Q,n+=4):(oe=a,wt===0&&ee(St)),oe!==a&&(Z=Xt,oe=d()),Xt=oe,Xt===a&&(Xt=n,B.substr(n,5)===U?(oe=U,n+=5):(oe=a,wt===0&&ee(M)),oe!==a&&(Z=Xt,oe=It()),Xt=oe),qt[be]={nextPos:n,result:Xt},Xt)})(),tt===a&&(tt=(function(){var Xt,oe,be,ye,gr,vr=49*n+28,Ur=qt[vr];if(Ur)return n=Ur.nextPos,Ur.result;if(Xt=n,B.charCodeAt(n)===91?(oe=c,n++):(oe=a,wt===0&&ee(R)),oe!==a){for(be=[],ye=Tn();ye!==a;)be.push(ye),ye=Tn();be!==a?(B.charCodeAt(n)===93?(ye=f,n++):(ye=a,wt===0&&ee(E)),ye!==a?(Z=Xt,Xt=oe=Jt()):(n=Xt,Xt=S)):(n=Xt,Xt=S)}else n=Xt,Xt=S;if(Xt===a&&(Xt=n,B.charCodeAt(n)===91?(oe=c,n++):(oe=a,wt===0&&ee(R)),oe!==a?((be=po())===a&&(be=ct),be!==a?(B.charCodeAt(n)===93?(ye=f,n++):(ye=a,wt===0&&ee(E)),ye!==a?(Z=Xt,Xt=oe=Wt(be)):(n=Xt,Xt=S)):(n=Xt,Xt=S)):(n=Xt,Xt=S),Xt===a)){if(Xt=n,B.charCodeAt(n)===91?(oe=c,n++):(oe=a,wt===0&&ee(R)),oe!==a){if(be=[],(ye=Ao())!==a)for(;ye!==a;)be.push(ye),ye=Ao();else be=S;be!==a?(B.charCodeAt(n)===93?(ye=f,n++):(ye=a,wt===0&&ee(E)),ye!==a?(Z=Xt,Xt=oe=xe(be)):(n=Xt,Xt=S)):(n=Xt,Xt=S)}else n=Xt,Xt=S;if(Xt===a)if(Xt=n,B.charCodeAt(n)===91?(oe=c,n++):(oe=a,wt===0&&ee(R)),oe!==a){if(be=[],(ye=Ao())!==a)for(;ye!==a;)be.push(ye),ye=Ao();else be=S;be!==a&&(ye=po())!==a?(B.charCodeAt(n)===93?(gr=f,n++):(gr=a,wt===0&&ee(E)),gr!==a?(Z=Xt,Xt=oe=x(be,ye)):(n=Xt,Xt=S)):(n=Xt,Xt=S)}else n=Xt,Xt=S}return qt[vr]={nextPos:n,result:Xt},Xt})(),tt===a&&(tt=(function(){var Xt,oe,be,ye,gr,vr,Ur=49*n+32,br=qt[Ur];if(br)return n=br.nextPos,br.result;if(Xt=n,B.charCodeAt(n)===123?(oe=Pt,n++):(oe=a,wt===0&&ee(D)),oe!==a){for(be=[],ye=_r();ye!==a;)be.push(ye),ye=_r();if(be!==a){for(ye=[],gr=Qn();gr!==a;)ye.push(gr),gr=Qn();if(ye!==a){for(gr=[],vr=_r();vr!==a;)gr.push(vr),vr=_r();gr!==a?(B.charCodeAt(n)===125?(vr=mt,n++):(vr=a,wt===0&&ee(gt)),vr!==a?(Z=Xt,Xt=oe=ft(ye)):(n=Xt,Xt=S)):(n=Xt,Xt=S)}else n=Xt,Xt=S}else n=Xt,Xt=S}else n=Xt,Xt=S;return qt[Ur]={nextPos:n,result:Xt},Xt})())))))),qt[Ft]={nextPos:n,result:tt},tt)}function hn(){var tt,Ft,Kt,Xt,oe=49*n+15,be=qt[oe];if(be)return n=be.nextPos,be.result;if(tt=n,B.charCodeAt(n)===34?(Ft=T,n++):(Ft=a,wt===0&&ee(N)),Ft!==a){for(Kt=[],Xt=Po();Xt!==a;)Kt.push(Xt),Xt=Po();Kt!==a?(B.charCodeAt(n)===34?(Xt=T,n++):(Xt=a,wt===0&&ee(N)),Xt!==a?(Z=tt,tt=Ft=i(Kt)):(n=tt,tt=S)):(n=tt,tt=S)}else n=tt,tt=S;return qt[oe]={nextPos:n,result:tt},tt}function jr(){var tt,Ft,Kt,Xt,oe=49*n+17,be=qt[oe];if(be)return n=be.nextPos,be.result;if(tt=n,B.charCodeAt(n)===39?(Ft=j,n++):(Ft=a,wt===0&&ee(pt)),Ft!==a){for(Kt=[],Xt=Vn();Xt!==a;)Kt.push(Xt),Xt=Vn();Kt!==a?(B.charCodeAt(n)===39?(Xt=j,n++):(Xt=a,wt===0&&ee(pt)),Xt!==a?(Z=tt,tt=Ft=i(Kt)):(n=tt,tt=S)):(n=tt,tt=S)}else n=tt,tt=S;return qt[oe]={nextPos:n,result:tt},tt}function Po(){var tt,Ft,Kt,Xt=49*n+18,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):((tt=Ko())===a&&(tt=n,Ft=n,wt++,B.charCodeAt(n)===34?(Kt=T,n++):(Kt=a,wt===0&&ee(N)),wt--,Kt===a?Ft=v:(n=Ft,Ft=S),Ft!==a?(B.length>n?(Kt=B.charAt(n),n++):(Kt=a,wt===0&&ee(l)),Kt!==a?(Z=tt,tt=Ft=_t(Kt)):(n=tt,tt=S)):(n=tt,tt=S)),qt[Xt]={nextPos:n,result:tt},tt)}function Vn(){var tt,Ft,Kt,Xt=49*n+19,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):(tt=n,Ft=n,wt++,B.charCodeAt(n)===39?(Kt=j,n++):(Kt=a,wt===0&&ee(pt)),wt--,Kt===a?Ft=v:(n=Ft,Ft=S),Ft!==a?(B.length>n?(Kt=B.charAt(n),n++):(Kt=a,wt===0&&ee(l)),Kt!==a?(Z=tt,tt=Ft=_t(Kt)):(n=tt,tt=S)):(n=tt,tt=S),qt[Xt]={nextPos:n,result:tt},tt)}function Xn(){var tt,Ft,Kt,Xt=49*n+20,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):((tt=Ko())===a&&(tt=(function(){var be,ye,gr,vr,Ur=49*n+21,br=qt[Ur];if(br)return n=br.nextPos,br.result;if(be=n,B.charCodeAt(n)===92?(ye=it,n++):(ye=a,wt===0&&ee(Et)),ye!==a)if(Rn()!==a){for(gr=[],vr=Eo();vr!==a;)gr.push(vr),vr=Eo();gr!==a?(Z=be,be=ye=jt()):(n=be,be=S)}else n=be,be=S;else n=be,be=S;return qt[Ur]={nextPos:n,result:be},be})(),tt===a&&(tt=n,Ft=n,wt++,B.substr(n,3)===Bt?(Kt=Bt,n+=3):(Kt=a,wt===0&&ee(q)),wt--,Kt===a?Ft=v:(n=Ft,Ft=S),Ft!==a?(B.length>n?(Kt=B.charAt(n),n++):(Kt=a,wt===0&&ee(l)),Kt!==a?(Z=tt,tt=Ft=ot(Kt)):(n=tt,tt=S)):(n=tt,tt=S))),qt[Xt]={nextPos:n,result:tt},tt)}function Fo(){var tt,Ft,Kt,Xt=49*n+22,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):(tt=n,Ft=n,wt++,B.substr(n,3)===K?(Kt=K,n+=3):(Kt=a,wt===0&&ee(dt)),wt--,Kt===a?Ft=v:(n=Ft,Ft=S),Ft!==a?(B.length>n?(Kt=B.charAt(n),n++):(Kt=a,wt===0&&ee(l)),Kt!==a?(Z=tt,tt=Ft=_t(Kt)):(n=tt,tt=S)):(n=tt,tt=S),qt[Xt]={nextPos:n,result:tt},tt)}function mo(){var tt,Ft,Kt,Xt,oe,be,ye=49*n+24,gr=qt[ye];return gr?(n=gr.nextPos,gr.result):(tt=n,B.charCodeAt(n)===43?(Ft=Mt,n++):(Ft=a,wt===0&&ee($t)),Ft===a&&(Ft=ct),Ft!==a?(Kt=n,(Xt=Xo())!==a?(B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),oe!==a&&(be=Xo())!==a?Kt=Xt=[Xt,oe,be]:(n=Kt,Kt=S)):(n=Kt,Kt=S),Kt!==a?(Z=tt,tt=Ft=de(Kt)):(n=tt,tt=S)):(n=tt,tt=S),tt===a&&(tt=n,B.charCodeAt(n)===45?(Ft=u,n++):(Ft=a,wt===0&&ee(g)),Ft!==a?(Kt=n,(Xt=Xo())!==a?(B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),oe!==a&&(be=Xo())!==a?Kt=Xt=[Xt,oe,be]:(n=Kt,Kt=S)):(n=Kt,Kt=S),Kt!==a?(Z=tt,tt=Ft=I(Kt)):(n=tt,tt=S)):(n=tt,tt=S)),qt[ye]={nextPos:n,result:tt},tt)}function wn(){var tt,Ft,Kt,Xt,oe,be=49*n+26,ye=qt[be];if(ye)return n=ye.nextPos,ye.result;if(tt=n,B.charCodeAt(n)===43?(Ft=Mt,n++):(Ft=a,wt===0&&ee($t)),Ft===a&&(Ft=ct),Ft!==a){if(Kt=[],(Xt=pn())!==a)for(;Xt!==a;)Kt.push(Xt),Xt=pn();else Kt=S;Kt!==a?(Xt=n,wt++,B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),wt--,oe===a?Xt=v:(n=Xt,Xt=S),Xt!==a?(Z=tt,tt=Ft=de(Kt)):(n=tt,tt=S)):(n=tt,tt=S)}else n=tt,tt=S;if(tt===a)if(tt=n,B.charCodeAt(n)===45?(Ft=u,n++):(Ft=a,wt===0&&ee(g)),Ft!==a){if(Kt=[],(Xt=pn())!==a)for(;Xt!==a;)Kt.push(Xt),Xt=pn();else Kt=S;Kt!==a?(Xt=n,wt++,B.charCodeAt(n)===46?(oe=X,n++):(oe=a,wt===0&&ee(L)),wt--,oe===a?Xt=v:(n=Xt,Xt=S),Xt!==a?(Z=tt,tt=Ft=I(Kt)):(n=tt,tt=S)):(n=tt,tt=S)}else n=tt,tt=S;return qt[be]={nextPos:n,result:tt},tt}function po(){var tt,Ft,Kt,Xt,oe,be=49*n+29,ye=qt[be];if(ye)return n=ye.nextPos,ye.result;for(tt=n,Ft=[],Kt=Tn();Kt!==a;)Ft.push(Kt),Kt=Tn();if(Ft!==a)if((Kt=Er())!==a){for(Xt=[],oe=Tn();oe!==a;)Xt.push(oe),oe=Tn();Xt!==a?(Z=tt,tt=Ft=G(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S;return qt[be]={nextPos:n,result:tt},tt}function Ao(){var tt,Ft,Kt,Xt,oe,be,ye,gr=49*n+30,vr=qt[gr];if(vr)return n=vr.nextPos,vr.result;for(tt=n,Ft=[],Kt=Tn();Kt!==a;)Ft.push(Kt),Kt=Tn();if(Ft!==a)if((Kt=Er())!==a){for(Xt=[],oe=Tn();oe!==a;)Xt.push(oe),oe=Tn();if(Xt!==a)if(B.charCodeAt(n)===44?(oe=at,n++):(oe=a,wt===0&&ee(Vt)),oe!==a){for(be=[],ye=Tn();ye!==a;)be.push(ye),ye=Tn();be!==a?(Z=tt,tt=Ft=G(Kt)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S;return qt[gr]={nextPos:n,result:tt},tt}function Tn(){var tt,Ft=49*n+31,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):((tt=_r())===a&&(tt=Rn())===a&&(tt=or()),qt[Ft]={nextPos:n,result:tt},tt)}function Qn(){var tt,Ft,Kt,Xt,oe,be,ye,gr,vr,Ur,br,Rr=49*n+33,cr=qt[Rr];if(cr)return n=cr.nextPos,cr.result;for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=sr())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();if(Xt!==a)if(B.charCodeAt(n)===61?(oe=$,n++):(oe=a,wt===0&&ee(ut)),oe!==a){for(be=[],ye=_r();ye!==a;)be.push(ye),ye=_r();if(be!==a)if((ye=Er())!==a){for(gr=[],vr=_r();vr!==a;)gr.push(vr),vr=_r();if(gr!==a)if(B.charCodeAt(n)===44?(vr=at,n++):(vr=a,wt===0&&ee(Vt)),vr!==a){for(Ur=[],br=_r();br!==a;)Ur.push(br),br=_r();Ur!==a?(Z=tt,tt=Ft=Gt(Kt,ye)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S;if(tt===a){for(tt=n,Ft=[],Kt=_r();Kt!==a;)Ft.push(Kt),Kt=_r();if(Ft!==a)if((Kt=sr())!==a){for(Xt=[],oe=_r();oe!==a;)Xt.push(oe),oe=_r();if(Xt!==a)if(B.charCodeAt(n)===61?(oe=$,n++):(oe=a,wt===0&&ee(ut)),oe!==a){for(be=[],ye=_r();ye!==a;)be.push(ye),ye=_r();be!==a&&(ye=Er())!==a?(Z=tt,tt=Ft=Gt(Kt,ye)):(n=tt,tt=S)}else n=tt,tt=S;else n=tt,tt=S}else n=tt,tt=S;else n=tt,tt=S}return qt[Rr]={nextPos:n,result:tt},tt}function Xr(){var tt,Ft,Kt,Xt=49*n+34,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):(tt=n,B.charCodeAt(n)===46?(Ft=X,n++):(Ft=a,wt===0&&ee(L)),Ft!==a&&(Kt=Xo())!==a?(Z=tt,tt=Ft=Lt(Kt)):(n=tt,tt=S),qt[Xt]={nextPos:n,result:tt},tt)}function Vo(){var tt,Ft,Kt,Xt,oe,be,ye,gr,vr,Ur,br,Rr,cr=49*n+35,Jr=qt[cr];return Jr?(n=Jr.nextPos,Jr.result):(tt=n,Ft=n,(Kt=pn())!==a&&(Xt=pn())!==a&&(oe=pn())!==a&&(be=pn())!==a?(B.charCodeAt(n)===45?(ye=u,n++):(ye=a,wt===0&&ee(g)),ye!==a&&(gr=pn())!==a&&(vr=pn())!==a?(B.charCodeAt(n)===45?(Ur=u,n++):(Ur=a,wt===0&&ee(g)),Ur!==a&&(br=pn())!==a&&(Rr=pn())!==a?Ft=Kt=[Kt,Xt,oe,be,ye,gr,vr,Ur,br,Rr]:(n=Ft,Ft=S)):(n=Ft,Ft=S)):(n=Ft,Ft=S),Ft!==a&&(Z=tt,Ft=ie(Ft)),tt=Ft,qt[cr]={nextPos:n,result:tt},tt)}function _r(){var tt,Ft=49*n+39,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):(Zr.test(B.charAt(n))?(tt=B.charAt(n),n++):(tt=a,wt===0&&ee(bn)),qt[Ft]={nextPos:n,result:tt},tt)}function Rn(){var tt,Ft,Kt,Xt=49*n+40,oe=qt[Xt];return oe?(n=oe.nextPos,oe.result):(B.charCodeAt(n)===10?(tt=En,n++):(tt=a,wt===0&&ee(lo)),tt===a&&(tt=n,B.charCodeAt(n)===13?(Ft=Zn,n++):(Ft=a,wt===0&&ee(So)),Ft!==a?(B.charCodeAt(n)===10?(Kt=En,n++):(Kt=a,wt===0&&ee(lo)),Kt!==a?tt=Ft=[Ft,Kt]:(n=tt,tt=S)):(n=tt,tt=S)),qt[Xt]={nextPos:n,result:tt},tt)}function Eo(){var tt,Ft=49*n+41,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):((tt=Rn())===a&&(tt=_r()),qt[Ft]={nextPos:n,result:tt},tt)}function Ro(){var tt,Ft,Kt=49*n+42,Xt=qt[Kt];return Xt?(n=Xt.nextPos,Xt.result):(tt=n,wt++,B.length>n?(Ft=B.charAt(n),n++):(Ft=a,wt===0&&ee(l)),wt--,Ft===a?tt=v:(n=tt,tt=S),qt[Kt]={nextPos:n,result:tt},tt)}function On(){var tt,Ft=49*n+43,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):(Gn.test(B.charAt(n))?(tt=B.charAt(n),n++):(tt=a,wt===0&&ee(ao)),qt[Ft]={nextPos:n,result:tt},tt)}function pn(){var tt,Ft,Kt=49*n+44,Xt=qt[Kt];return Xt?(n=Xt.nextPos,Xt.result):(un.test(B.charAt(n))?(tt=B.charAt(n),n++):(tt=a,wt===0&&ee(zr)),tt===a&&(tt=n,B.charCodeAt(n)===95?(Ft=cn,n++):(Ft=a,wt===0&&ee(Yn)),Ft!==a&&(Z=tt,Ft=yo()),tt=Ft),qt[Kt]={nextPos:n,result:tt},tt)}function ni(){var tt,Ft=49*n+45,Kt=qt[Ft];return Kt?(n=Kt.nextPos,Kt.result):(Un.test(B.charAt(n))?(tt=B.charAt(n),n++):(tt=a,wt===0&&ee(ln)),qt[Ft]={nextPos:n,result:tt},tt)}function Xo(){var tt,Ft,Kt,Xt=49*n+46,oe=qt[Xt];if(oe)return n=oe.nextPos,oe.result;if(tt=n,Ft=[],(Kt=pn())!==a)for(;Kt!==a;)Ft.push(Kt),Kt=pn();else Ft=S;return Ft!==a&&(Z=tt,Ft=so(Ft)),tt=Ft,qt[Xt]={nextPos:n,result:tt},tt}function Ko(){var tt,Ft,Kt=49*n+47,Xt=qt[Kt];return Xt?(n=Xt.nextPos,Xt.result):(tt=n,B.substr(n,2)===Qr?(Ft=Qr,n+=2):(Ft=a,wt===0&&ee(Wr)),Ft!==a&&(Z=tt,Ft=Pn()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===Dr?(Ft=Dr,n+=2):(Ft=a,wt===0&&ee(mn)),Ft!==a&&(Z=tt,Ft=$n()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===fo?(Ft=fo,n+=2):(Ft=a,wt===0&&ee(Ho)),Ft!==a&&(Z=tt,Ft=$o()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===Bo?(Ft=Bo,n+=2):(Ft=a,wt===0&&ee(ro)),Ft!==a&&(Z=tt,Ft=Lo()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===Co?(Ft=Co,n+=2):(Ft=a,wt===0&&ee(zo)),Ft!==a&&(Z=tt,Ft=ht()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===J?(Ft=J,n+=2):(Ft=a,wt===0&&ee(Ut)),Ft!==a&&(Z=tt,Ft=ne()),(tt=Ft)===a&&(tt=n,B.substr(n,2)===Nt?(Ft=Nt,n+=2):(Ft=a,wt===0&&ee(ce)),Ft!==a&&(Z=tt,Ft=Ue()),(tt=Ft)===a&&(tt=(function(){var oe,be,ye,gr,vr,Ur,br,Rr,cr,Jr,kn,yn=49*n+48,Vr=qt[yn];return Vr?(n=Vr.nextPos,Vr.result):(oe=n,B.substr(n,2)===Ne?(be=Ne,n+=2):(be=a,wt===0&&ee(ue)),be!==a?(ye=n,(gr=On())!==a&&(vr=On())!==a&&(Ur=On())!==a&&(br=On())!==a&&(Rr=On())!==a&&(cr=On())!==a&&(Jr=On())!==a&&(kn=On())!==a?ye=gr=[gr,vr,Ur,br,Rr,cr,Jr,kn]:(n=ye,ye=S),ye!==a?(Z=oe,oe=be=le(ye)):(n=oe,oe=S)):(n=oe,oe=S),oe===a&&(oe=n,B.substr(n,2)===pe?(be=pe,n+=2):(be=a,wt===0&&ee(We)),be!==a?(ye=n,(gr=On())!==a&&(vr=On())!==a&&(Ur=On())!==a&&(br=On())!==a?ye=gr=[gr,vr,Ur,br]:(n=ye,ye=S),ye!==a?(Z=oe,oe=be=le(ye)):(n=oe,oe=S)):(n=oe,oe=S)),qt[yn]={nextPos:n,result:oe},oe)})()))))))),qt[Kt]={nextPos:n,result:tt},tt)}var ei=[];function To(tt){ei.push(tt)}function Sn(tt,Ft,Kt,Xt,oe){var be={type:tt,value:Ft,line:Kt(),column:Xt()};return oe&&(be.key=oe),be}if((P=w())!==a&&n===B.length)return P;throw P!==a&&n{"use strict";var P=B(5767);Dt.exports=function(Y){return!!P(Y)}},5767:(Dt,Ot,B)=>{"use strict";var P=B(2682),Y=B(9209),a=B(487),O=B(6556),w=B(5795),p=B(3628),S=O("Object.prototype.toString"),o=B(9092)(),A=typeof globalThis>"u"?B.g:globalThis,v=Y(),l=O("String.prototype.slice"),c=O("Array.prototype.indexOf",!0)||function(f,E){for(var k=0;k-1?E:E==="Object"&&(function(k){var y=!1;return P(R,function(_,m){if(!y)try{_(k),y=l(m,1)}catch{}}),y})(f)}return w?(function(k){var y=!1;return P(R,function(_,m){if(!y)try{"$"+_(k)===m&&(y=l(m,1))}catch{}}),y})(f):null}},5795:(Dt,Ot,B)=>{"use strict";var P=B(6549);if(P)try{P([],"length")}catch{P=null}Dt.exports=P},5880:Dt=>{"use strict";Dt.exports=Math.pow},5896:Dt=>{"use strict";function Ot(Y,a){P(Y,a),B(Y)}function B(Y){Y._writableState&&!Y._writableState.emitClose||Y._readableState&&!Y._readableState.emitClose||Y.emit("close")}function P(Y,a){Y.emit("error",a)}Dt.exports={destroy:function(Y,a){var O=this,w=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return w||p?(a?a(Y):Y&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,__Process$.nextTick(P,this,Y)):__Process$.nextTick(P,this,Y)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(Y||null,function(S){!a&&S?O._writableState?O._writableState.errorEmitted?__Process$.nextTick(B,O):(O._writableState.errorEmitted=!0,__Process$.nextTick(Ot,O,S)):__Process$.nextTick(Ot,O,S):a?(__Process$.nextTick(B,O),a(S)):__Process$.nextTick(B,O)}),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(Y,a){var O=Y._readableState,w=Y._writableState;O&&O.autoDestroy||w&&w.autoDestroy?Y.destroy(a):Y.emit("error",a)}}},5976:(Dt,Ot,B)=>{"use strict";function P(et){return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},P(et)}function Y(et,nt){for(var rt=0;rtjt,v7:()=>xt,nS:()=>N,Dr:()=>A,m_:()=>y});var A=(function(et){function nt(At,Mt){var $t;return(function(de,u){if(!(de instanceof u))throw new TypeError("Cannot call a class as a function")})(this,nt),($t=O(this,nt,[At])).response=Mt,$t}return(function(At,Mt){if(typeof Mt!="function"&&Mt!==null)throw new TypeError("Super expression must either be null or a function");At.prototype=Object.create(Mt&&Mt.prototype,{constructor:{value:At,writable:!0,configurable:!0}}),Object.defineProperty(At,"prototype",{writable:!1}),Mt&&S(At,Mt)})(nt,et),rt=nt,(F=[{key:"getResponse",value:function(){return this.response}}])&&Y(rt.prototype,F),lt&&Y(rt,lt),Object.defineProperty(rt,"prototype",{writable:!1}),rt;var rt,F,lt})(w(Error));function v(et){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},v(et)}function l(et,nt){for(var rt=0;rt{"use strict";var Ot={};function B(Y,a,O){O||(O=Error);var w=(function(p){var S,o;function A(v,l,c){return p.call(this,(function(R,f,E){return typeof a=="string"?a:a(R,f,E)})(v,l,c))||this}return o=p,(S=A).prototype=Object.create(o.prototype),S.prototype.constructor=S,S.__proto__=o,A})(O);w.prototype.name=O.name,w.prototype.code=Y,Ot[Y]=w}function P(Y,a){if(Array.isArray(Y)){var O=Y.length;return Y=Y.map(function(w){return String(w)}),O>2?"one of ".concat(a," ").concat(Y.slice(0,O-1).join(", "),", or ")+Y[O-1]:O===2?"one of ".concat(a," ").concat(Y[0]," or ").concat(Y[1]):"of ".concat(a," ").concat(Y[0])}return"of ".concat(a," ").concat(String(Y))}B("ERR_INVALID_OPT_VALUE",function(Y,a){return'The value "'+a+'" is invalid for option "'+Y+'"'},TypeError),B("ERR_INVALID_ARG_TYPE",function(Y,a,O){var w,p,S,o;if(typeof a=="string"&&(p="not ",a.substr(!S||S<0?0:+S,p.length)===p)?(w="must not be",a=a.replace(/^not /,"")):w="must be",(function(v,l,c){return(c===void 0||c>v.length)&&(c=v.length),v.substring(c-l.length,c)===l})(Y," argument"))o="The ".concat(Y," ").concat(w," ").concat(P(a,"type"));else{var A=(function(v,l,c){return typeof c!="number"&&(c=0),!(c+l.length>v.length)&&v.indexOf(l,c)!==-1})(Y,".")?"property":"argument";o='The "'.concat(Y,'" ').concat(A," ").concat(w," ").concat(P(a,"type"))}return o+=". Received type ".concat(typeof O)},TypeError),B("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),B("ERR_METHOD_NOT_IMPLEMENTED",function(Y){return"The "+Y+" method is not implemented"}),B("ERR_STREAM_PREMATURE_CLOSE","Premature close"),B("ERR_STREAM_DESTROYED",function(Y){return"Cannot call "+Y+" after a stream was destroyed"}),B("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),B("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),B("ERR_STREAM_WRITE_AFTER_END","write after end"),B("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),B("ERR_UNKNOWN_ENCODING",function(Y){return"Unknown encoding: "+Y},TypeError),B("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Dt.exports.F=Ot},6121:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{axiosClient:()=>pe,create:()=>We});var P={};function Y(n,Z){return function(){return n.apply(Z,arguments)}}B.r(P),B.d(P,{hasBrowserEnv:()=>xe,hasStandardBrowserEnv:()=>G,hasStandardBrowserWebWorkerEnv:()=>at,navigator:()=>x,origin:()=>Vt});let{toString:a}=Object.prototype,{getPrototypeOf:O}=Object,{iterator:w,toStringTag:p}=Symbol,S=(o=Object.create(null),n=>{let Z=a.call(n);return o[Z]||(o[Z]=Z.slice(8,-1).toLowerCase())});var o;let A=n=>(n=n.toLowerCase(),Z=>S(Z)===n),v=n=>Z=>typeof Z===n,{isArray:l}=Array,c=v("undefined");function R(n){return n!==null&&!c(n)&&n.constructor!==null&&!c(n.constructor)&&k(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}let f=A("ArrayBuffer"),E=v("string"),k=v("function"),y=v("number"),_=n=>n!==null&&typeof n=="object",m=n=>{if(S(n)!=="object")return!1;let Z=O(n);return!(Z!==null&&Z!==Object.prototype&&Object.getPrototypeOf(Z)!==null||p in n||w in n)},z=A("Date"),X=A("File"),L=A("Blob"),$=A("FileList"),ut=A("URLSearchParams"),[xt,vt,Zt,Bt]=["ReadableStream","Request","Response","Headers"].map(A);function q(n,Z,{allOwnKeys:bt=!1}={}){if(n==null)return;let kt,Qt;if(typeof n!="object"&&(n=[n]),l(n))for(kt=0,Qt=n.length;kt0;)if(kt=bt[Qt],Z===kt.toLowerCase())return kt;return null}let i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:globalThis,T=n=>!c(n)&&n!==i,N=(K=typeof Uint8Array<"u"&&O(Uint8Array),n=>K&&n instanceof K);var K;let dt=A("HTMLFormElement"),j=(({hasOwnProperty:n})=>(Z,bt)=>n.call(Z,bt))(Object.prototype),pt=A("RegExp"),_t=(n,Z)=>{let bt=Object.getOwnPropertyDescriptors(n),kt={};q(bt,(Qt,te)=>{let wt;(wt=Z(Qt,te,n))!==!1&&(kt[te]=wt||Qt)}),Object.defineProperties(n,kt)},ot=A("AsyncFunction"),it=(Et=typeof __setImmediate$=="function",jt=k(i.postMessage),Et?__setImmediate$:jt?(et=`axios@${Math.random()}`,nt=[],i.addEventListener("message",({source:n,data:Z})=>{n===i&&Z===et&&nt.length&&nt.shift()()},!1),n=>{nt.push(n),i.postMessage(et,"*")}):n=>setTimeout(n));var Et,jt,et,nt;let rt=typeof queueMicrotask<"u"?queueMicrotask.bind(i):typeof __Process$<"u"&&__Process$.nextTick||it,F={isArray:l,isArrayBuffer:f,isBuffer:R,isFormData:n=>{let Z;return n&&(typeof FormData=="function"&&n instanceof FormData||k(n.append)&&((Z=S(n))==="formdata"||Z==="object"&&k(n.toString)&&n.toString()==="[object FormData]"))},isArrayBufferView:function(n){let Z;return Z=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(n):n&&n.buffer&&f(n.buffer),Z},isString:E,isNumber:y,isBoolean:n=>n===!0||n===!1,isObject:_,isPlainObject:m,isEmptyObject:n=>{if(!_(n)||R(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},isReadableStream:xt,isRequest:vt,isResponse:Zt,isHeaders:Bt,isUndefined:c,isDate:z,isFile:X,isBlob:L,isRegExp:pt,isFunction:k,isStream:n=>_(n)&&k(n.pipe),isURLSearchParams:ut,isTypedArray:N,isFileList:$,forEach:q,merge:function n(){let{caseless:Z,skipUndefined:bt}=T(this)&&this||{},kt={},Qt=(te,wt)=>{let qt=Z&&ct(kt,wt)||wt;m(kt[qt])&&m(te)?kt[qt]=n(kt[qt],te):m(te)?kt[qt]=n({},te):l(te)?kt[qt]=te.slice():bt&&c(te)||(kt[qt]=te)};for(let te=0,wt=arguments.length;te(q(Z,(Qt,te)=>{bt&&k(Qt)?Object.defineProperty(n,te,{value:Y(Qt,bt),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,te,{value:Qt,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:kt}),n),trim:n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),inherits:(n,Z,bt,kt)=>{n.prototype=Object.create(Z.prototype,kt),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:Z.prototype}),bt&&Object.assign(n.prototype,bt)},toFlatObject:(n,Z,bt,kt)=>{let Qt,te,wt,qt={};if(Z=Z||{},n==null)return Z;do{for(Qt=Object.getOwnPropertyNames(n),te=Qt.length;te-- >0;)wt=Qt[te],kt&&!kt(wt,n,Z)||qt[wt]||(Z[wt]=n[wt],qt[wt]=!0);n=bt!==!1&&O(n)}while(n&&(!bt||bt(n,Z))&&n!==Object.prototype);return Z},kindOf:S,kindOfTest:A,endsWith:(n,Z,bt)=>{n=String(n),(bt===void 0||bt>n.length)&&(bt=n.length),bt-=Z.length;let kt=n.indexOf(Z,bt);return kt!==-1&&kt===bt},toArray:n=>{if(!n)return null;if(l(n))return n;let Z=n.length;if(!y(Z))return null;let bt=new Array(Z);for(;Z-- >0;)bt[Z]=n[Z];return bt},forEachEntry:(n,Z)=>{let bt=(n&&n[w]).call(n),kt;for(;(kt=bt.next())&&!kt.done;){let Qt=kt.value;Z.call(n,Qt[0],Qt[1])}},matchAll:(n,Z)=>{let bt,kt=[];for(;(bt=n.exec(Z))!==null;)kt.push(bt);return kt},isHTMLForm:dt,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:_t,freezeMethods:n=>{_t(n,(Z,bt)=>{if(k(n)&&["arguments","caller","callee"].indexOf(bt)!==-1)return!1;let kt=n[bt];k(kt)&&(Z.enumerable=!1,"writable"in Z?Z.writable=!1:Z.set||(Z.set=()=>{throw Error("Can not rewrite read-only method '"+bt+"'")}))})},toObjectSet:(n,Z)=>{let bt={},kt=Qt=>{Qt.forEach(te=>{bt[te]=!0})};return l(n)?kt(n):kt(String(n).split(Z)),bt},toCamelCase:n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Z,bt,kt){return bt.toUpperCase()+kt}),noop:()=>{},toFiniteNumber:(n,Z)=>n!=null&&Number.isFinite(n=+n)?n:Z,findKey:ct,global:i,isContextDefined:T,isSpecCompliantForm:function(n){return!!(n&&k(n.append)&&n[p]==="FormData"&&n[w])},toJSONObject:n=>{let Z=new Array(10),bt=(kt,Qt)=>{if(_(kt)){if(Z.indexOf(kt)>=0)return;if(R(kt))return kt;if(!("toJSON"in kt)){Z[Qt]=kt;let te=l(kt)?[]:{};return q(kt,(wt,qt)=>{let _e=bt(wt,Qt+1);!c(_e)&&(te[qt]=_e)}),Z[Qt]=void 0,te}}return kt};return bt(n,0)},isAsyncFn:ot,isThenable:n=>n&&(_(n)||k(n))&&k(n.then)&&k(n.catch),setImmediate:it,asap:rt,isIterable:n=>n!=null&&k(n[w])};class lt extends Error{static from(Z,bt,kt,Qt,te,wt){let qt=new lt(Z.message,bt||Z.code,kt,Qt,te);return qt.cause=Z,qt.name=Z.name,wt&&Object.assign(qt,wt),qt}constructor(Z,bt,kt,Qt,te){super(Z),this.name="AxiosError",this.isAxiosError=!0,bt&&(this.code=bt),kt&&(this.config=kt),Qt&&(this.request=Qt),te&&(this.response=te,this.status=te.status)}toJSON(){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:F.toJSONObject(this.config),code:this.code,status:this.status}}}lt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",lt.ERR_BAD_OPTION="ERR_BAD_OPTION",lt.ECONNABORTED="ECONNABORTED",lt.ETIMEDOUT="ETIMEDOUT",lt.ERR_NETWORK="ERR_NETWORK",lt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",lt.ERR_DEPRECATED="ERR_DEPRECATED",lt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",lt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",lt.ERR_CANCELED="ERR_CANCELED",lt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",lt.ERR_INVALID_URL="ERR_INVALID_URL";let At=lt;var Mt=B(8287).Buffer;function $t(n){return F.isPlainObject(n)||F.isArray(n)}function de(n){return F.endsWith(n,"[]")?n.slice(0,-2):n}function u(n,Z,bt){return n?n.concat(Z).map(function(kt,Qt){return kt=de(kt),!bt&&Qt?"["+kt+"]":kt}).join(bt?".":""):Z}let g=F.toFlatObject(F,{},null,function(n){return/^is[A-Z]/.test(n)}),I=function(n,Z,bt){if(!F.isObject(n))throw new TypeError("target must be an object");Z=Z||new FormData;let kt=(bt=F.toFlatObject(bt,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Re,hr){return!F.isUndefined(hr[Re])})).metaTokens,Qt=bt.visitor||Oe,te=bt.dots,wt=bt.indexes,qt=(bt.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(Z);if(!F.isFunction(Qt))throw new TypeError("visitor must be a function");function _e(Re){if(Re===null)return"";if(F.isDate(Re))return Re.toISOString();if(F.isBoolean(Re))return Re.toString();if(!qt&&F.isBlob(Re))throw new At("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(Re)||F.isTypedArray(Re)?qt&&typeof Blob=="function"?new Blob([Re]):Mt.from(Re):Re}function Oe(Re,hr,wr){let or=Re;if(Re&&!wr&&typeof Re=="object"){if(F.endsWith(hr,"{}"))hr=kt?hr:hr.slice(0,-2),Re=JSON.stringify(Re);else if(F.isArray(Re)&&(function(yr){return F.isArray(yr)&&!yr.some($t)})(Re)||(F.isFileList(Re)||F.endsWith(hr,"[]"))&&(or=F.toArray(Re)))return hr=de(hr),or.forEach(function(yr,Cr){!F.isUndefined(yr)&&yr!==null&&Z.append(wt===!0?u([hr],Cr,te):wt===null?hr:hr+"[]",_e(yr))}),!1}return!!$t(Re)||(Z.append(u(wr,hr,te),_e(Re)),!1)}let ke=[],ee=Object.assign(g,{defaultVisitor:Oe,convertValue:_e,isVisitable:$t});if(!F.isObject(n))throw new TypeError("data must be an object");return(function Re(hr,wr){if(!F.isUndefined(hr)){if(ke.indexOf(hr)!==-1)throw Error("Circular reference detected in "+wr.join("."));ke.push(hr),F.forEach(hr,function(or,yr){(!(F.isUndefined(or)||or===null)&&Qt.call(Z,or,F.isString(yr)?yr.trim():yr,wr,ee))===!0&&Re(or,wr?wr.concat(yr):[yr])}),ke.pop()}})(n),Z};function W(n){let Z={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(bt){return Z[bt]})}function Q(n,Z){this._pairs=[],n&&I(n,this,Z)}let St=Q.prototype;St.append=function(n,Z){this._pairs.push([n,Z])},St.toString=function(n){let Z=n?function(bt){return n.call(this,bt,W)}:W;return this._pairs.map(function(bt){return Z(bt[0])+"="+Z(bt[1])},"").join("&")};let d=Q;function U(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function M(n,Z,bt){if(!Z)return n;let kt=bt&&bt.encode||U,Qt=F.isFunction(bt)?{serialize:bt}:bt,te=Qt&&Qt.serialize,wt;if(wt=te?te(Z,Qt):F.isURLSearchParams(Z)?Z.toString():new d(Z,Qt).toString(kt),wt){let qt=n.indexOf("#");qt!==-1&&(n=n.slice(0,qt)),n+=(n.indexOf("?")===-1?"?":"&")+wt}return n}let It=class{constructor(){this.handlers=[]}use(n,Z,bt){return this.handlers.push({fulfilled:n,rejected:Z,synchronous:!!bt&&bt.synchronous,runWhen:bt?bt.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){F.forEach(this.handlers,function(Z){Z!==null&&n(Z)})}},Jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:d,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},xe=typeof window<"u"&&typeof document<"u",x=typeof navigator=="object"&&navigator||void 0,G=xe&&(!x||["ReactNative","NativeScript","NS"].indexOf(x.product)<0),at=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vt=xe&&window.location.href||"http://localhost",Pt={...P,...Wt},D=function(n){function Z(bt,kt,Qt,te){let wt=bt[te++];if(wt==="__proto__")return!0;let qt=Number.isFinite(+wt),_e=te>=bt.length;return wt=!wt&&F.isArray(Qt)?Qt.length:wt,_e?(F.hasOwnProp(Qt,wt)?Qt[wt]=[Qt[wt],kt]:Qt[wt]=kt,!qt):(Qt[wt]&&F.isObject(Qt[wt])||(Qt[wt]=[]),Z(bt,kt,Qt[wt],te)&&F.isArray(Qt[wt])&&(Qt[wt]=(function(Oe){let ke={},ee=Object.keys(Oe),Re,hr=ee.length,wr;for(Re=0;Re{Z((function(te){return F.matchAll(/\w+|\[(\w*)]/g,te).map(wt=>wt[0]==="[]"?"":wt[1]||wt[0])})(kt),Qt,bt,0)}),bt}return null},mt={transitional:Jt,adapter:["xhr","http","fetch"],transformRequest:[function(n,Z){let bt=Z.getContentType()||"",kt=bt.indexOf("application/json")>-1,Qt=F.isObject(n);if(Qt&&F.isHTMLForm(n)&&(n=new FormData(n)),F.isFormData(n))return kt?JSON.stringify(D(n)):n;if(F.isArrayBuffer(n)||F.isBuffer(n)||F.isStream(n)||F.isFile(n)||F.isBlob(n)||F.isReadableStream(n))return n;if(F.isArrayBufferView(n))return n.buffer;if(F.isURLSearchParams(n))return Z.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let te;if(Qt){if(bt.indexOf("application/x-www-form-urlencoded")>-1)return(function(wt,qt){return I(wt,new Pt.classes.URLSearchParams,{visitor:function(_e,Oe,ke,ee){return Pt.isNode&&F.isBuffer(_e)?(this.append(Oe,_e.toString("base64")),!1):ee.defaultVisitor.apply(this,arguments)},...qt})})(n,this.formSerializer).toString();if((te=F.isFileList(n))||bt.indexOf("multipart/form-data")>-1){let wt=this.env&&this.env.FormData;return I(te?{"files[]":n}:n,wt&&new wt,this.formSerializer)}}return Qt||kt?(Z.setContentType("application/json",!1),(function(wt,qt,_e){if(F.isString(wt))try{return(qt||JSON.parse)(wt),F.trim(wt)}catch(Oe){if(Oe.name!=="SyntaxError")throw Oe}return(_e||JSON.stringify)(wt)})(n)):n}],transformResponse:[function(n){let Z=this.transitional||mt.transitional,bt=Z&&Z.forcedJSONParsing,kt=this.responseType==="json";if(F.isResponse(n)||F.isReadableStream(n))return n;if(n&&F.isString(n)&&(bt&&!this.responseType||kt)){let Qt=!(Z&&Z.silentJSONParsing)&&kt;try{return JSON.parse(n,this.parseReviver)}catch(te){if(Qt)throw te.name==="SyntaxError"?At.from(te,At.ERR_BAD_RESPONSE,this,null,this.response):te}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],n=>{mt.headers[n]={}});let gt=mt,ft=F.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"]),Gt=Symbol("internals");function Lt(n){return n&&String(n).trim().toLowerCase()}function ie(n){return n===!1||n==null?n:F.isArray(n)?n.map(ie):String(n)}function $e(n,Z,bt,kt,Qt){return F.isFunction(kt)?kt.call(this,Z,bt):(Qt&&(Z=bt),F.isString(Z)?F.isString(kt)?Z.indexOf(kt)!==-1:F.isRegExp(kt)?kt.test(Z):void 0:void 0)}class Ce{constructor(Z){Z&&this.set(Z)}set(Z,bt,kt){let Qt=this;function te(qt,_e,Oe){let ke=Lt(_e);if(!ke)throw new Error("header name must be a non-empty string");let ee=F.findKey(Qt,ke);(!ee||Qt[ee]===void 0||Oe===!0||Oe===void 0&&Qt[ee]!==!1)&&(Qt[ee||_e]=ie(qt))}let wt=(qt,_e)=>F.forEach(qt,(Oe,ke)=>te(Oe,ke,_e));if(F.isPlainObject(Z)||Z instanceof this.constructor)wt(Z,bt);else if(F.isString(Z)&&(Z=Z.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Z.trim()))wt((qt=>{let _e={},Oe,ke,ee;return qt&&qt.split(` +`).forEach(function(Re){ee=Re.indexOf(":"),Oe=Re.substring(0,ee).trim().toLowerCase(),ke=Re.substring(ee+1).trim(),!Oe||_e[Oe]&&ft[Oe]||(Oe==="set-cookie"?_e[Oe]?_e[Oe].push(ke):_e[Oe]=[ke]:_e[Oe]=_e[Oe]?_e[Oe]+", "+ke:ke)}),_e})(Z),bt);else if(F.isObject(Z)&&F.isIterable(Z)){let qt,_e,Oe={};for(let ke of Z){if(!F.isArray(ke))throw TypeError("Object iterator must return a key-value pair");Oe[_e=ke[0]]=(qt=Oe[_e])?F.isArray(qt)?[...qt,ke[1]]:[qt,ke[1]]:ke[1]}wt(Oe,bt)}else Z!=null&&te(bt,Z,kt);return this}get(Z,bt){if(Z=Lt(Z)){let kt=F.findKey(this,Z);if(kt){let Qt=this[kt];if(!bt)return Qt;if(bt===!0)return(function(te){let wt=Object.create(null),qt=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,_e;for(;_e=qt.exec(te);)wt[_e[1]]=_e[2];return wt})(Qt);if(F.isFunction(bt))return bt.call(this,Qt,kt);if(F.isRegExp(bt))return bt.exec(Qt);throw new TypeError("parser must be boolean|regexp|function")}}}has(Z,bt){if(Z=Lt(Z)){let kt=F.findKey(this,Z);return!(!kt||this[kt]===void 0||bt&&!$e(0,this[kt],kt,bt))}return!1}delete(Z,bt){let kt=this,Qt=!1;function te(wt){if(wt=Lt(wt)){let qt=F.findKey(kt,wt);!qt||bt&&!$e(0,kt[qt],qt,bt)||(delete kt[qt],Qt=!0)}}return F.isArray(Z)?Z.forEach(te):te(Z),Qt}clear(Z){let bt=Object.keys(this),kt=bt.length,Qt=!1;for(;kt--;){let te=bt[kt];Z&&!$e(0,this[te],te,Z,!0)||(delete this[te],Qt=!0)}return Qt}normalize(Z){let bt=this,kt={};return F.forEach(this,(Qt,te)=>{let wt=F.findKey(kt,te);if(wt)return bt[wt]=ie(Qt),void delete bt[te];let qt=Z?(function(_e){return _e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Oe,ke,ee)=>ke.toUpperCase()+ee)})(te):String(te).trim();qt!==te&&delete bt[te],bt[qt]=ie(Qt),kt[qt]=!0}),this}concat(...Z){return this.constructor.concat(this,...Z)}toJSON(Z){let bt=Object.create(null);return F.forEach(this,(kt,Qt)=>{kt!=null&&kt!==!1&&(bt[Qt]=Z&&F.isArray(kt)?kt.join(", "):kt)}),bt}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([Z,bt])=>Z+": "+bt).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(Z){return Z instanceof this?Z:new this(Z)}static concat(Z,...bt){let kt=new this(Z);return bt.forEach(Qt=>kt.set(Qt)),kt}static accessor(Z){let bt=(this[Gt]=this[Gt]={accessors:{}}).accessors,kt=this.prototype;function Qt(te){let wt=Lt(te);bt[wt]||((function(qt,_e){let Oe=F.toCamelCase(" "+_e);["get","set","has"].forEach(ke=>{Object.defineProperty(qt,ke+Oe,{value:function(ee,Re,hr){return this[ke].call(this,_e,ee,Re,hr)},configurable:!0})})})(kt,te),bt[wt]=!0)}return F.isArray(Z)?Z.forEach(Qt):Qt(Z),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(Ce.prototype,({value:n},Z)=>{let bt=Z[0].toUpperCase()+Z.slice(1);return{get:()=>n,set(kt){this[bt]=kt}}}),F.freezeMethods(Ce);let He=Ce;function rr(n,Z){let bt=this||gt,kt=Z||bt,Qt=He.from(kt.headers),te=kt.data;return F.forEach(n,function(wt){te=wt.call(bt,te,Qt.normalize(),Z?Z.status:void 0)}),Qt.normalize(),te}function qe(n){return!(!n||!n.__CANCEL__)}let pr=class extends At{constructor(n,Z,bt){super(n??"canceled",At.ERR_CANCELED,Z,bt),this.name="CanceledError",this.__CANCEL__=!0}};function De(n,Z,bt){let kt=bt.config.validateStatus;bt.status&&kt&&!kt(bt.status)?Z(new At("Request failed with status code "+bt.status,[At.ERR_BAD_REQUEST,At.ERR_BAD_RESPONSE][Math.floor(bt.status/100)-4],bt.config,bt.request,bt)):n(bt)}let dr=function(n,Z){n=n||10;let bt=new Array(n),kt=new Array(n),Qt,te=0,wt=0;return Z=Z!==void 0?Z:1e3,function(qt){let _e=Date.now(),Oe=kt[wt];Qt||(Qt=_e),bt[te]=qt,kt[te]=_e;let ke=wt,ee=0;for(;ke!==te;)ee+=bt[ke++],ke%=n;if(te=(te+1)%n,te===wt&&(wt=(wt+1)%n),_e-Qt{Qt=_e,bt=null,kt&&(clearTimeout(kt),kt=null),n(...qt)};return[(...qt)=>{let _e=Date.now(),Oe=_e-Qt;Oe>=te?wt(qt,_e):(bt=qt,kt||(kt=setTimeout(()=>{kt=null,wt(bt)},te-Oe)))},()=>bt&&wt(bt)]},Zr=(n,Z,bt=3)=>{let kt=0,Qt=dr(50,250);return Pr(te=>{let wt=te.loaded,qt=te.lengthComputable?te.total:void 0,_e=wt-kt,Oe=Qt(_e);kt=wt,n({loaded:wt,total:qt,progress:qt?wt/qt:void 0,bytes:_e,rate:Oe||void 0,estimated:Oe&&qt&&wt<=qt?(qt-wt)/Oe:void 0,event:te,lengthComputable:qt!=null,[Z?"download":"upload"]:!0})},bt)},bn=(n,Z)=>{let bt=n!=null;return[kt=>Z[0]({lengthComputable:bt,total:n,loaded:kt}),Z[1]]},En=n=>(...Z)=>F.asap(()=>n(...Z)),lo=Pt.hasStandardBrowserEnv?((n,Z)=>bt=>(bt=new URL(bt,Pt.origin),n.protocol===bt.protocol&&n.host===bt.host&&(Z||n.port===bt.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,Zn=Pt.hasStandardBrowserEnv?{write(n,Z,bt,kt,Qt,te,wt){if(typeof document>"u")return;let qt=[`${n}=${encodeURIComponent(Z)}`];F.isNumber(bt)&&qt.push(`expires=${new Date(bt).toUTCString()}`),F.isString(kt)&&qt.push(`path=${kt}`),F.isString(Qt)&&qt.push(`domain=${Qt}`),te===!0&&qt.push("secure"),F.isString(wt)&&qt.push(`SameSite=${wt}`),document.cookie=qt.join("; ")},read(n){if(typeof document>"u")return null;let Z=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return Z?decodeURIComponent(Z[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function So(n,Z,bt){let kt=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Z);return n&&(kt||bt==0)?(function(Qt,te){return te?Qt.replace(/\/?\/$/,"")+"/"+te.replace(/^\/+/,""):Qt})(n,Z):Z}let Gn=n=>n instanceof He?{...n}:n;function ao(n,Z){Z=Z||{};let bt={};function kt(Oe,ke,ee,Re){return F.isPlainObject(Oe)&&F.isPlainObject(ke)?F.merge.call({caseless:Re},Oe,ke):F.isPlainObject(ke)?F.merge({},ke):F.isArray(ke)?ke.slice():ke}function Qt(Oe,ke,ee,Re){return F.isUndefined(ke)?F.isUndefined(Oe)?void 0:kt(void 0,Oe,0,Re):kt(Oe,ke,0,Re)}function te(Oe,ke){if(!F.isUndefined(ke))return kt(void 0,ke)}function wt(Oe,ke){return F.isUndefined(ke)?F.isUndefined(Oe)?void 0:kt(void 0,Oe):kt(void 0,ke)}function qt(Oe,ke,ee){return ee in Z?kt(Oe,ke):ee in n?kt(void 0,Oe):void 0}let _e={url:te,method:te,data:te,baseURL:wt,transformRequest:wt,transformResponse:wt,paramsSerializer:wt,timeout:wt,timeoutMessage:wt,withCredentials:wt,withXSRFToken:wt,adapter:wt,responseType:wt,xsrfCookieName:wt,xsrfHeaderName:wt,onUploadProgress:wt,onDownloadProgress:wt,decompress:wt,maxContentLength:wt,maxBodyLength:wt,beforeRedirect:wt,transport:wt,httpAgent:wt,httpsAgent:wt,cancelToken:wt,socketPath:wt,responseEncoding:wt,validateStatus:qt,headers:(Oe,ke,ee)=>Qt(Gn(Oe),Gn(ke),0,!0)};return F.forEach(Object.keys({...n,...Z}),function(Oe){let ke=_e[Oe]||Qt,ee=ke(n[Oe],Z[Oe],Oe);F.isUndefined(ee)&&ke!==qt||(bt[Oe]=ee)}),bt}let un=n=>{let Z=ao({},n),{data:bt,withXSRFToken:kt,xsrfHeaderName:Qt,xsrfCookieName:te,headers:wt,auth:qt}=Z;if(Z.headers=wt=He.from(wt),Z.url=M(So(Z.baseURL,Z.url,Z.allowAbsoluteUrls),n.params,n.paramsSerializer),qt&&wt.set("Authorization","Basic "+btoa((qt.username||"")+":"+(qt.password?unescape(encodeURIComponent(qt.password)):""))),F.isFormData(bt)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)wt.setContentType(void 0);else if(F.isFunction(bt.getHeaders)){let _e=bt.getHeaders(),Oe=["content-type","content-length"];Object.entries(_e).forEach(([ke,ee])=>{Oe.includes(ke.toLowerCase())&&wt.set(ke,ee)})}}if(Pt.hasStandardBrowserEnv&&(kt&&F.isFunction(kt)&&(kt=kt(Z)),kt||kt!==!1&&lo(Z.url))){let _e=Qt&&te&&Zn.read(te);_e&&wt.set(Qt,_e)}return Z},zr=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(Z,bt){let kt=un(n),Qt=kt.data,te=He.from(kt.headers).normalize(),wt,qt,_e,Oe,ke,{responseType:ee,onUploadProgress:Re,onDownloadProgress:hr}=kt;function wr(){Oe&&Oe(),ke&&ke(),kt.cancelToken&&kt.cancelToken.unsubscribe(wt),kt.signal&&kt.signal.removeEventListener("abort",wt)}let or=new XMLHttpRequest;function yr(){if(!or)return;let ur=He.from("getAllResponseHeaders"in or&&or.getAllResponseHeaders());De(function(sr){Z(sr),wr()},function(sr){bt(sr),wr()},{data:ee&&ee!=="text"&&ee!=="json"?or.response:or.responseText,status:or.status,statusText:or.statusText,headers:ur,config:n,request:or}),or=null}or.open(kt.method.toUpperCase(),kt.url,!0),or.timeout=kt.timeout,"onloadend"in or?or.onloadend=yr:or.onreadystatechange=function(){or&&or.readyState===4&&(or.status!==0||or.responseURL&&or.responseURL.indexOf("file:")===0)&&setTimeout(yr)},or.onabort=function(){or&&(bt(new At("Request aborted",At.ECONNABORTED,n,or)),or=null)},or.onerror=function(ur){let sr=ur&&ur.message?ur.message:"Network Error",Ze=new At(sr,At.ERR_NETWORK,n,or);Ze.event=ur||null,bt(Ze),or=null},or.ontimeout=function(){let ur=kt.timeout?"timeout of "+kt.timeout+"ms exceeded":"timeout exceeded",sr=kt.transitional||Jt;kt.timeoutErrorMessage&&(ur=kt.timeoutErrorMessage),bt(new At(ur,sr.clarifyTimeoutError?At.ETIMEDOUT:At.ECONNABORTED,n,or)),or=null},Qt===void 0&&te.setContentType(null),"setRequestHeader"in or&&F.forEach(te.toJSON(),function(ur,sr){or.setRequestHeader(sr,ur)}),F.isUndefined(kt.withCredentials)||(or.withCredentials=!!kt.withCredentials),ee&&ee!=="json"&&(or.responseType=kt.responseType),hr&&([_e,ke]=Zr(hr,!0),or.addEventListener("progress",_e)),Re&&or.upload&&([qt,Oe]=Zr(Re),or.upload.addEventListener("progress",qt),or.upload.addEventListener("loadend",Oe)),(kt.cancelToken||kt.signal)&&(wt=ur=>{or&&(bt(!ur||ur.type?new pr(null,n,or):ur),or.abort(),or=null)},kt.cancelToken&&kt.cancelToken.subscribe(wt),kt.signal&&(kt.signal.aborted?wt():kt.signal.addEventListener("abort",wt)));let Cr=(function(ur){let sr=/^([-+\w]{1,25})(:?\/\/|:)/.exec(ur);return sr&&sr[1]||""})(kt.url);Cr&&Pt.protocols.indexOf(Cr)===-1?bt(new At("Unsupported protocol "+Cr+":",At.ERR_BAD_REQUEST,n)):or.send(Qt||null)})},cn=(n,Z)=>{let{length:bt}=n=n?n.filter(Boolean):[];if(Z||bt){let kt,Qt=new AbortController,te=function(Oe){if(!kt){kt=!0,qt();let ke=Oe instanceof Error?Oe:this.reason;Qt.abort(ke instanceof At?ke:new pr(ke instanceof Error?ke.message:ke))}},wt=Z&&setTimeout(()=>{wt=null,te(new At(`timeout of ${Z}ms exceeded`,At.ETIMEDOUT))},Z),qt=()=>{n&&(wt&&clearTimeout(wt),wt=null,n.forEach(Oe=>{Oe.unsubscribe?Oe.unsubscribe(te):Oe.removeEventListener("abort",te)}),n=null)};n.forEach(Oe=>Oe.addEventListener("abort",te));let{signal:_e}=Qt;return _e.unsubscribe=()=>F.asap(qt),_e}},Yn=function*(n,Z){let bt=n.byteLength;if(!Z||bt{let Qt=(async function*(_e,Oe){for await(let ke of yo(_e))yield*Yn(ke,Oe)})(n,Z),te,wt=0,qt=_e=>{te||(te=!0,kt&&kt(_e))};return new ReadableStream({async pull(_e){try{let{done:Oe,value:ke}=await Qt.next();if(Oe)return qt(),void _e.close();let ee=ke.byteLength;if(bt){let Re=wt+=ee;bt(Re)}_e.enqueue(new Uint8Array(ke))}catch(Oe){throw qt(Oe),Oe}},cancel:_e=>(qt(_e),Qt.return())},{highWaterMark:2})},{isFunction:ln}=F,so=(({Request:n,Response:Z})=>({Request:n,Response:Z}))(F.global),{ReadableStream:Qr,TextEncoder:Wr}=F.global,Pn=(n,...Z)=>{try{return!!n(...Z)}catch{return!1}},Dr=n=>{n=F.merge.call({skipUndefined:!0},so,n);let{fetch:Z,Request:bt,Response:kt}=n,Qt=Z?ln(Z):typeof fetch=="function",te=ln(bt),wt=ln(kt);if(!Qt)return!1;let qt=Qt&&ln(Qr),_e=Qt&&(typeof Wr=="function"?(Oe=new Wr,wr=>Oe.encode(wr)):async wr=>new Uint8Array(await new bt(wr).arrayBuffer()));var Oe;let ke=te&&qt&&Pn(()=>{let wr=!1,or=new bt(Pt.origin,{body:new Qr,method:"POST",get duplex(){return wr=!0,"half"}}).headers.has("Content-Type");return wr&&!or}),ee=wt&&qt&&Pn(()=>F.isReadableStream(new kt("").body)),Re={stream:ee&&(wr=>wr.body)};Qt&&["text","arrayBuffer","blob","formData","stream"].forEach(wr=>{!Re[wr]&&(Re[wr]=(or,yr)=>{let Cr=or&&or[wr];if(Cr)return Cr.call(or);throw new At(`Response type '${wr}' is not supported`,At.ERR_NOT_SUPPORT,yr)})});let hr=async(wr,or)=>{let yr=F.toFiniteNumber(wr.getContentLength());return yr??(async Cr=>Cr==null?0:F.isBlob(Cr)?Cr.size:F.isSpecCompliantForm(Cr)?(await new bt(Pt.origin,{method:"POST",body:Cr}).arrayBuffer()).byteLength:F.isArrayBufferView(Cr)||F.isArrayBuffer(Cr)?Cr.byteLength:(F.isURLSearchParams(Cr)&&(Cr+=""),F.isString(Cr)?(await _e(Cr)).byteLength:void 0))(or)};return async wr=>{let{url:or,method:yr,data:Cr,signal:ur,cancelToken:sr,timeout:Ze,onDownloadProgress:Er,onUploadProgress:hn,responseType:jr,headers:Po,withCredentials:Vn="same-origin",fetchOptions:Xn}=un(wr),Fo=Z||fetch;jr=jr?(jr+"").toLowerCase():"text";let mo=cn([ur,sr&&sr.toAbortSignal()],Ze),wn=null,po=mo&&mo.unsubscribe&&(()=>{mo.unsubscribe()}),Ao;try{if(hn&&ke&&yr!=="get"&&yr!=="head"&&(Ao=await hr(Po,Cr))!==0){let Rn,Eo=new bt(or,{method:"POST",body:Cr,duplex:"half"});if(F.isFormData(Cr)&&(Rn=Eo.headers.get("content-type"))&&Po.setContentType(Rn),Eo.body){let[Ro,On]=bn(Ao,Zr(En(hn)));Cr=Un(Eo.body,65536,Ro,On)}}F.isString(Vn)||(Vn=Vn?"include":"omit");let Tn=te&&"credentials"in bt.prototype,Qn={...Xn,signal:mo,method:yr.toUpperCase(),headers:Po.normalize().toJSON(),body:Cr,duplex:"half",credentials:Tn?Vn:void 0};wn=te&&new bt(or,Qn);let Xr=await(te?Fo(wn,Xn):Fo(or,Qn)),Vo=ee&&(jr==="stream"||jr==="response");if(ee&&(Er||Vo&&po)){let Rn={};["status","statusText","headers"].forEach(pn=>{Rn[pn]=Xr[pn]});let Eo=F.toFiniteNumber(Xr.headers.get("content-length")),[Ro,On]=Er&&bn(Eo,Zr(En(Er),!0))||[];Xr=new kt(Un(Xr.body,65536,Ro,()=>{On&&On(),po&&po()}),Rn)}jr=jr||"text";let _r=await Re[F.findKey(Re,jr)||"text"](Xr,wr);return!Vo&&po&&po(),await new Promise((Rn,Eo)=>{De(Rn,Eo,{data:_r,headers:He.from(Xr.headers),status:Xr.status,statusText:Xr.statusText,config:wr,request:wn})})}catch(Tn){throw po&&po(),Tn&&Tn.name==="TypeError"&&/Load failed|fetch/i.test(Tn.message)?Object.assign(new At("Network Error",At.ERR_NETWORK,wr,wn),{cause:Tn.cause||Tn}):At.from(Tn,Tn&&Tn.code,wr,wn)}}},mn=new Map,$n=n=>{let Z=n&&n.env||{},{fetch:bt,Request:kt,Response:Qt}=Z,te=[kt,Qt,bt],wt,qt,_e=te.length,Oe=mn;for(;_e--;)wt=te[_e],qt=Oe.get(wt),qt===void 0&&Oe.set(wt,qt=_e?new Map:Dr(Z)),Oe=qt;return qt},fo=($n(),{http:null,xhr:zr,fetch:{get:$n}});F.forEach(fo,(n,Z)=>{if(n){try{Object.defineProperty(n,"name",{value:Z})}catch{}Object.defineProperty(n,"adapterName",{value:Z})}});let Ho=n=>`- ${n}`,$o=n=>F.isFunction(n)||n===null||n===!1,Bo={getAdapter:function(n,Z){n=F.isArray(n)?n:[n];let{length:bt}=n,kt,Qt,te={};for(let wt=0;wt`adapter ${_e} `+(Oe===!1?"is not supported by the environment":"is not available in the build")),qt=bt?wt.length>1?`since : +`+wt.map(Ho).join(` +`):" "+Ho(wt[0]):"as no adapter specified";throw new At("There is no suitable adapter to dispatch the request "+qt,"ERR_NOT_SUPPORT")}return Qt},adapters:fo};function ro(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new pr(null,n)}function Lo(n){return ro(n),n.headers=He.from(n.headers),n.data=rr.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Bo.getAdapter(n.adapter||gt.adapter,n)(n).then(function(Z){return ro(n),Z.data=rr.call(n,n.transformResponse,Z),Z.headers=He.from(Z.headers),Z},function(Z){return qe(Z)||(ro(n),Z&&Z.response&&(Z.response.data=rr.call(n,n.transformResponse,Z.response),Z.response.headers=He.from(Z.response.headers))),Promise.reject(Z)})}let Co="1.13.3",zo={};["object","boolean","number","function","string","symbol"].forEach((n,Z)=>{zo[n]=function(bt){return typeof bt===n||"a"+(Z<1?"n ":" ")+n}});let ht={};zo.transitional=function(n,Z,bt){function kt(Qt,te){return"[Axios v"+Co+"] Transitional option '"+Qt+"'"+te+(bt?". "+bt:"")}return(Qt,te,wt)=>{if(n===!1)throw new At(kt(te," has been removed"+(Z?" in "+Z:"")),At.ERR_DEPRECATED);return Z&&!ht[te]&&(ht[te]=!0,console.warn(kt(te," has been deprecated since v"+Z+" and will be removed in the near future"))),!n||n(Qt,te,wt)}},zo.spelling=function(n){return(Z,bt)=>(console.warn(`${bt} is likely a misspelling of ${n}`),!0)};let J={assertOptions:function(n,Z,bt){if(typeof n!="object")throw new At("options must be an object",At.ERR_BAD_OPTION_VALUE);let kt=Object.keys(n),Qt=kt.length;for(;Qt-- >0;){let te=kt[Qt],wt=Z[te];if(wt){let qt=n[te],_e=qt===void 0||wt(qt,te,n);if(_e!==!0)throw new At("option "+te+" must be "+_e,At.ERR_BAD_OPTION_VALUE);continue}if(bt!==!0)throw new At("Unknown option "+te,At.ERR_BAD_OPTION)}},validators:zo},Ut=J.validators;class ne{constructor(Z){this.defaults=Z||{},this.interceptors={request:new It,response:new It}}async request(Z,bt){try{return await this._request(Z,bt)}catch(kt){if(kt instanceof Error){let Qt={};Error.captureStackTrace?Error.captureStackTrace(Qt):Qt=new Error;let te=Qt.stack?Qt.stack.replace(/^.+\n/,""):"";try{kt.stack?te&&!String(kt.stack).endsWith(te.replace(/^.+\n.+\n/,""))&&(kt.stack+=` +`+te):kt.stack=te}catch{}}throw kt}}_request(Z,bt){typeof Z=="string"?(bt=bt||{}).url=Z:bt=Z||{},bt=ao(this.defaults,bt);let{transitional:kt,paramsSerializer:Qt,headers:te}=bt;kt!==void 0&&J.assertOptions(kt,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),Qt!=null&&(F.isFunction(Qt)?bt.paramsSerializer={serialize:Qt}:J.assertOptions(Qt,{encode:Ut.function,serialize:Ut.function},!0)),bt.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?bt.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:bt.allowAbsoluteUrls=!0),J.assertOptions(bt,{baseUrl:Ut.spelling("baseURL"),withXsrfToken:Ut.spelling("withXSRFToken")},!0),bt.method=(bt.method||this.defaults.method||"get").toLowerCase();let wt=te&&F.merge(te.common,te[bt.method]);te&&F.forEach(["delete","get","head","post","put","patch","common"],wr=>{delete te[wr]}),bt.headers=He.concat(wt,te);let qt=[],_e=!0;this.interceptors.request.forEach(function(wr){typeof wr.runWhen=="function"&&wr.runWhen(bt)===!1||(_e=_e&&wr.synchronous,qt.unshift(wr.fulfilled,wr.rejected))});let Oe=[],ke;this.interceptors.response.forEach(function(wr){Oe.push(wr.fulfilled,wr.rejected)});let ee,Re=0;if(!_e){let wr=[Lo.bind(this),void 0];wr.unshift(...qt),wr.push(...Oe),ee=wr.length,ke=Promise.resolve(bt);let or=bt;for(;Re{or=yr!==void 0?yr:or}).catch(wr[Re++]).then(()=>or);return ke}ee=qt.length;let hr=bt;for(;Re{if(!kt._listeners)return;let te=kt._listeners.length;for(;te-- >0;)kt._listeners[te](Qt);kt._listeners=null}),this.promise.then=Qt=>{let te,wt=new Promise(qt=>{kt.subscribe(qt),te=qt}).then(Qt);return wt.cancel=function(){kt.unsubscribe(te)},wt},Z(function(Qt,te,wt){kt.reason||(kt.reason=new pr(Qt,te,wt),bt(kt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(Z){this.reason?Z(this.reason):this._listeners?this._listeners.push(Z):this._listeners=[Z]}unsubscribe(Z){if(!this._listeners)return;let bt=this._listeners.indexOf(Z);bt!==-1&&this._listeners.splice(bt,1)}toAbortSignal(){let Z=new AbortController,bt=kt=>{Z.abort(kt)};return this.subscribe(bt),Z.signal.unsubscribe=()=>this.unsubscribe(bt),Z.signal}static source(){let Z;return{token:new ce(function(bt){Z=bt}),cancel:Z}}}let Ue=ce,Ne={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ne).forEach(([n,Z])=>{Ne[Z]=n});let ue=Ne,le=(function n(Z){let bt=new Nt(Z),kt=Y(Nt.prototype.request,bt);return F.extend(kt,Nt.prototype,bt,{allOwnKeys:!0}),F.extend(kt,bt,null,{allOwnKeys:!0}),kt.create=function(Qt){return n(ao(Z,Qt))},kt})(gt);le.Axios=Nt,le.CanceledError=pr,le.CancelToken=Ue,le.isCancel=qe,le.VERSION=Co,le.toFormData=I,le.AxiosError=At,le.Cancel=le.CanceledError,le.all=function(n){return Promise.all(n)},le.spread=function(n){return function(Z){return n.apply(null,Z)}},le.isAxiosError=function(n){return F.isObject(n)&&n.isAxiosError===!0},le.mergeConfig=ao,le.AxiosHeaders=He,le.formToJSON=n=>D(F.isHTMLForm(n)?new FormData(n):n),le.getAdapter=Bo.getAdapter,le.HttpStatusCode=ue,le.default=le;var pe=le,We=le.create},6188:Dt=>{"use strict";Dt.exports=Math.max},6238:(Dt,Ot,B)=>{"use strict";var P=B(6048).F.ERR_STREAM_PREMATURE_CLOSE;function Y(){}Dt.exports=function a(O,w,p){if(typeof w=="function")return a(O,null,w);w||(w={}),p=(function(y){var _=!1;return function(){if(!_){_=!0;for(var m=arguments.length,z=new Array(m),X=0;X{"use strict";Dt.exports=Object.getOwnPropertyDescriptor},6556:(Dt,Ot,B)=>{"use strict";var P=B(453),Y=B(3126),a=Y([P("%String.prototype.indexOf%")]);Dt.exports=function(O,w){var p=P(O,!!w);return typeof p=="function"&&a(O,".prototype.")>-1?Y([p]):p}},6578:Dt=>{"use strict";Dt.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6688:(Dt,Ot,B)=>{var P;function Y(){if(P!==void 0)return P;if(B.g.XMLHttpRequest){P=new B.g.XMLHttpRequest;try{P.open("GET",B.g.XDomainRequest?"/":"https://example.com")}catch{P=null}}else P=null;return P}function a(w){var p=Y();if(!p)return!1;try{return p.responseType=w,p.responseType===w}catch{}return!1}function O(w){return typeof w=="function"}Ot.fetch=O(B.g.fetch)&&O(B.g.ReadableStream),Ot.writableStream=O(B.g.WritableStream),Ot.abortController=O(B.g.AbortController),Ot.arraybuffer=Ot.fetch||a("arraybuffer"),Ot.msstream=!Ot.fetch&&a("ms-stream"),Ot.mozchunkedarraybuffer=!Ot.fetch&&a("moz-chunked-arraybuffer"),Ot.overrideMimeType=Ot.fetch||!!Y()&&O(Y().overrideMimeType),P=null},6698:Dt=>{typeof Object.create=="function"?Dt.exports=function(Ot,B){B&&(Ot.super_=B,Ot.prototype=Object.create(B.prototype,{constructor:{value:Ot,enumerable:!1,writable:!0,configurable:!0}}))}:Dt.exports=function(Ot,B){if(B){Ot.super_=B;var P=function(){};P.prototype=B.prototype,Ot.prototype=new P,Ot.prototype.constructor=Ot}}},6708:(Dt,Ot,B)=>{"use strict";function P(q){var ct=this;this.next=null,this.entry=null,this.finish=function(){(function(i,T,N){var K=i.entry;for(i.entry=null;K;){var dt=K.callback;T.pendingcb--,dt(N),K=K.next}T.corkedRequestsFree.next=i})(ct,q)}}var Y;Dt.exports=L,L.WritableState=X;var a={deprecate:B(4643)},O=B(345),w=B(8287).Buffer,p=(B.g!==void 0?B.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},S,o=B(5896),A=B(5291).getHighWaterMark,v=B(6048).F,l=v.ERR_INVALID_ARG_TYPE,c=v.ERR_METHOD_NOT_IMPLEMENTED,R=v.ERR_MULTIPLE_CALLBACK,f=v.ERR_STREAM_CANNOT_PIPE,E=v.ERR_STREAM_DESTROYED,k=v.ERR_STREAM_NULL_VALUES,y=v.ERR_STREAM_WRITE_AFTER_END,_=v.ERR_UNKNOWN_ENCODING,m=o.errorOrDestroy;function z(){}function X(q,ct,i){Y=Y||B(5382),q=q||{},typeof i!="boolean"&&(i=ct instanceof Y),this.objectMode=!!q.objectMode,i&&(this.objectMode=this.objectMode||!!q.writableObjectMode),this.highWaterMark=A(this,q,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var T=q.decodeStrings===!1;this.decodeStrings=!T,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(N){(function(K,dt){var j=K._writableState,pt=j.sync,_t=j.writecb;if(typeof _t!="function")throw new R;if((function(it){it.writing=!1,it.writecb=null,it.length-=it.writelen,it.writelen=0})(j),dt)(function(it,Et,jt,et,nt){--Et.pendingcb,jt?(__Process$.nextTick(nt,et),__Process$.nextTick(Bt,it,Et),it._writableState.errorEmitted=!0,m(it,et)):(nt(et),it._writableState.errorEmitted=!0,m(it,et),Bt(it,Et))})(K,j,pt,dt,_t);else{var ot=vt(j)||K.destroyed;ot||j.corked||j.bufferProcessing||!j.bufferedRequest||xt(K,j),pt?__Process$.nextTick(ut,K,j,ot,_t):ut(K,j,ot,_t)}})(ct,N)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new P(this)}function L(q){var ct=this instanceof(Y=Y||B(5382));if(!ct&&!S.call(L,this))return new L(q);this._writableState=new X(q,this,ct),this.writable=!0,q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final)),O.call(this)}function $(q,ct,i,T,N,K,dt){ct.writelen=T,ct.writecb=dt,ct.writing=!0,ct.sync=!0,ct.destroyed?ct.onwrite(new E("write")):i?q._writev(N,ct.onwrite):q._write(N,K,ct.onwrite),ct.sync=!1}function ut(q,ct,i,T){i||(function(N,K){K.length===0&&K.needDrain&&(K.needDrain=!1,N.emit("drain"))})(q,ct),ct.pendingcb--,T(),Bt(q,ct)}function xt(q,ct){ct.bufferProcessing=!0;var i=ct.bufferedRequest;if(q._writev&&i&&i.next){var T=ct.bufferedRequestCount,N=new Array(T),K=ct.corkedRequestsFree;K.entry=i;for(var dt=0,j=!0;i;)N[dt]=i,i.isBuf||(j=!1),i=i.next,dt+=1;N.allBuffers=j,$(q,ct,!0,ct.length,N,"",K.finish),ct.pendingcb++,ct.lastBufferedRequest=null,K.next?(ct.corkedRequestsFree=K.next,K.next=null):ct.corkedRequestsFree=new P(ct),ct.bufferedRequestCount=0}else{for(;i;){var pt=i.chunk,_t=i.encoding,ot=i.callback;if($(q,ct,!1,ct.objectMode?1:pt.length,pt,_t,ot),i=i.next,ct.bufferedRequestCount--,ct.writing)break}i===null&&(ct.lastBufferedRequest=null)}ct.bufferedRequest=i,ct.bufferProcessing=!1}function vt(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function Zt(q,ct){q._final(function(i){ct.pendingcb--,i&&m(q,i),ct.prefinished=!0,q.emit("prefinish"),Bt(q,ct)})}function Bt(q,ct){var i=vt(ct);if(i&&((function(N,K){K.prefinished||K.finalCalled||(typeof N._final!="function"||K.destroyed?(K.prefinished=!0,N.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,__Process$.nextTick(Zt,N,K)))})(q,ct),ct.pendingcb===0&&(ct.finished=!0,q.emit("finish"),ct.autoDestroy))){var T=q._readableState;(!T||T.autoDestroy&&T.endEmitted)&&q.destroy()}return i}B(6698)(L,O),X.prototype.getBuffer=function(){for(var q=this.bufferedRequest,ct=[];q;)ct.push(q),q=q.next;return ct},(function(){try{Object.defineProperty(X.prototype,"buffer",{get:a.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"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(q){return!!S.call(this,q)||this===L&&q&&q._writableState instanceof X}})):S=function(q){return q instanceof this},L.prototype.pipe=function(){m(this,new f)},L.prototype.write=function(q,ct,i){var T,N=this._writableState,K=!1,dt=!N.objectMode&&(T=q,w.isBuffer(T)||T instanceof p);return dt&&!w.isBuffer(q)&&(q=(function(j){return w.from(j)})(q)),typeof ct=="function"&&(i=ct,ct=null),dt?ct="buffer":ct||(ct=N.defaultEncoding),typeof i!="function"&&(i=z),N.ending?(function(j,pt){var _t=new y;m(j,_t),__Process$.nextTick(pt,_t)})(this,i):(dt||(function(j,pt,_t,ot){var it;return _t===null?it=new k:typeof _t=="string"||pt.objectMode||(it=new l("chunk",["string","Buffer"],_t)),!it||(m(j,it),__Process$.nextTick(ot,it),!1)})(this,N,q,i))&&(N.pendingcb++,K=(function(j,pt,_t,ot,it,Et){if(!_t){var jt=(function(F,lt,At){return F.objectMode||F.decodeStrings===!1||typeof lt!="string"||(lt=w.from(lt,At)),lt})(pt,ot,it);ot!==jt&&(_t=!0,it="buffer",ot=jt)}var et=pt.objectMode?1:ot.length;pt.length+=et;var nt=pt.length-1))throw new _(q);return this._writableState.defaultEncoding=q,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(q,ct,i){i(new c("_write()"))},L.prototype._writev=null,L.prototype.end=function(q,ct,i){var T=this._writableState;return typeof q=="function"?(i=q,q=null,ct=null):typeof ct=="function"&&(i=ct,ct=null),q!=null&&this.write(q,ct),T.corked&&(T.corked=1,this.uncork()),T.ending||(function(N,K,dt){K.ending=!0,Bt(N,K),dt&&(K.finished?__Process$.nextTick(dt):N.once("finish",dt)),K.ended=!0,N.writable=!1})(this,T,i),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(q){this._writableState&&(this._writableState.destroyed=q)}}),L.prototype.destroy=o.destroy,L.prototype._undestroy=o.undestroy,L.prototype._destroy=function(q,ct){ct(q)}},6743:(Dt,Ot,B)=>{"use strict";var P=B(9353);Dt.exports=Function.prototype.bind||P},6866:Dt=>{Dt.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"}},6897:(Dt,Ot,B)=>{"use strict";var P=B(453),Y=B(41),a=B(592)(),O=B(5795),w=B(9675),p=P("%Math.floor%");Dt.exports=function(S,o){if(typeof S!="function")throw new w("`fn` is not a function");if(typeof o!="number"||o<0||o>4294967295||p(o)!==o)throw new w("`length` must be a positive 32-bit integer");var A=arguments.length>2&&!!arguments[2],v=!0,l=!0;if("length"in S&&O){var c=O(S,"length");c&&!c.configurable&&(v=!1),c&&!c.writable&&(l=!1)}return(v||l||!A)&&(a?Y(S,"length",o,!0,!0):Y(S,"length",o)),S}},6917:(Dt,Ot,B)=>{var P=B(8287).Buffer,Y=B(6688),a=B(6698),O=B(8399),w=Ot.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},p=Ot.IncomingMessage=function(S,o,A,v){var l=this;if(O.Readable.call(l),l._mode=A,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",function(){__Process$.nextTick(function(){l.emit("close")})}),A==="fetch"){if(l._fetchResponse=o,l.url=o.url,l.statusCode=o.status,l.statusMessage=o.statusText,o.headers.forEach(function(k,y){l.headers[y.toLowerCase()]=k,l.rawHeaders.push(y,k)}),Y.writableStream){var c=new WritableStream({write:function(k){return v(!1),new Promise(function(y,_){l._destroyed?_():l.push(P.from(k))?y():l._resumeFetch=y})},close:function(){v(!0),l._destroyed||l.push(null)},abort:function(k){v(!0),l._destroyed||l.emit("error",k)}});try{return void o.body.pipeTo(c).catch(function(k){v(!0),l._destroyed||l.emit("error",k)})}catch{}}var R=o.body.getReader();(function k(){R.read().then(function(y){l._destroyed||(v(y.done),y.done?l.push(null):(l.push(P.from(y.value)),k()))}).catch(function(y){v(!0),l._destroyed||l.emit("error",y)})})()}else if(l._xhr=S,l._pos=0,l.url=S.responseURL,l.statusCode=S.status,l.statusMessage=S.statusText,S.getAllResponseHeaders().split(/\r?\n/).forEach(function(k){var y=k.match(/^([^:]+):\s*(.*)/);if(y){var _=y[1].toLowerCase();_==="set-cookie"?(l.headers[_]===void 0&&(l.headers[_]=[]),l.headers[_].push(y[2])):l.headers[_]!==void 0?l.headers[_]+=", "+y[2]:l.headers[_]=y[2],l.rawHeaders.push(y[1],y[2])}}),l._charset="x-user-defined",!Y.overrideMimeType){var f=l.rawHeaders["mime-type"];if(f){var E=f.match(/;\s*charset=([^;])(;|$)/);E&&(l._charset=E[1].toLowerCase())}l._charset||(l._charset="utf-8")}};a(p,O.Readable),p.prototype._read=function(){var S=this._resumeFetch;S&&(this._resumeFetch=null,S())},p.prototype._onXHRProgress=function(S){var o=this,A=o._xhr,v=null;switch(o._mode){case"text":if((v=A.responseText).length>o._pos){var l=v.substr(o._pos);if(o._charset==="x-user-defined"){for(var c=P.alloc(l.length),R=0;Ro._pos&&(o.push(P.from(new Uint8Array(f.result.slice(o._pos)))),o._pos=f.result.byteLength)},f.onload=function(){S(!0),o.push(null)},f.readAsArrayBuffer(v)}o._xhr.readyState===w.DONE&&o._mode!=="ms-stream"&&(S(!0),o.push(null))}},7007:Dt=>{"use strict";var Ot,B=typeof Reflect=="object"?Reflect:null,P=B&&typeof B.apply=="function"?B.apply:function(f,E,k){return Function.prototype.apply.call(f,E,k)};Ot=B&&typeof B.ownKeys=="function"?B.ownKeys:Object.getOwnPropertySymbols?function(f){return Object.getOwnPropertyNames(f).concat(Object.getOwnPropertySymbols(f))}:function(f){return Object.getOwnPropertyNames(f)};var Y=Number.isNaN||function(f){return f!=f};function a(){a.init.call(this)}Dt.exports=a,Dt.exports.once=function(f,E){return new Promise(function(k,y){function _(z){f.removeListener(E,m),y(z)}function m(){typeof f.removeListener=="function"&&f.removeListener("error",_),k([].slice.call(arguments))}R(f,E,m,{once:!0}),E!=="error"&&(function(z,X,L){typeof z.on=="function"&&R(z,"error",X,L)})(f,_,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var O=10;function w(f){if(typeof f!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof f)}function p(f){return f._maxListeners===void 0?a.defaultMaxListeners:f._maxListeners}function S(f,E,k,y){var _,m,z,X;if(w(k),(m=f._events)===void 0?(m=f._events=Object.create(null),f._eventsCount=0):(m.newListener!==void 0&&(f.emit("newListener",E,k.listener?k.listener:k),m=f._events),z=m[E]),z===void 0)z=m[E]=k,++f._eventsCount;else if(typeof z=="function"?z=m[E]=y?[k,z]:[z,k]:y?z.unshift(k):z.push(k),(_=p(f))>0&&z.length>_&&!z.warned){z.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=f,L.type=E,L.count=z.length,X=L,console&&console.warn&&console.warn(X)}return f}function o(){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 A(f,E,k){var y={fired:!1,wrapFn:void 0,target:f,type:E,listener:k},_=o.bind(y);return _.listener=k,y.wrapFn=_,_}function v(f,E,k){var y=f._events;if(y===void 0)return[];var _=y[E];return _===void 0?[]:typeof _=="function"?k?[_.listener||_]:[_]:k?(function(m){for(var z=new Array(m.length),X=0;X0&&(m=E[0]),m instanceof Error)throw m;var z=new Error("Unhandled error."+(m?" ("+m.message+")":""));throw z.context=m,z}var X=_[f];if(X===void 0)return!1;if(typeof X=="function")P(X,this,E);else{var L=X.length,$=c(X,L);for(k=0;k=0;m--)if(k[m]===E||k[m].listener===E){z=k[m].listener,_=m;break}if(_<0)return this;_===0?k.shift():(function(X,L){for(;L+1=0;y--)this.removeListener(f,E[y]);return this},a.prototype.listeners=function(f){return v(this,f,!0)},a.prototype.rawListeners=function(f){return v(this,f,!1)},a.listenerCount=function(f,E){return typeof f.listenerCount=="function"?f.listenerCount(E):l.call(f,E)},a.prototype.listenerCount=l,a.prototype.eventNames=function(){return this._eventsCount>0?Ot(this._events):[]}},7119:Dt=>{"use strict";Dt.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},7176:(Dt,Ot,B)=>{"use strict";var P,Y=B(3126),a=B(5795);try{P=[].__proto__===Array.prototype}catch(S){if(!S||typeof S!="object"||!("code"in S)||S.code!=="ERR_PROTO_ACCESS")throw S}var O=!!P&&a&&a(Object.prototype,"__proto__"),w=Object,p=w.getPrototypeOf;Dt.exports=O&&typeof O.get=="function"?Y([O.get]):typeof p=="function"&&function(S){return p(S==null?S:w(S))}},7244:(Dt,Ot,B)=>{"use strict";var P=B(9092)(),Y=B(6556)("Object.prototype.toString"),a=function(p){return!(P&&p&&typeof p=="object"&&Symbol.toStringTag in p)&&Y(p)==="[object Arguments]"},O=function(p){return!!a(p)||p!==null&&typeof p=="object"&&"length"in p&&typeof p.length=="number"&&p.length>=0&&Y(p)!=="[object Array]"&&"callee"in p&&Y(p.callee)==="[object Function]"},w=(function(){return a(arguments)})();a.isLegacyArguments=O,Dt.exports=w?a:O},7504:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{InvalidChallengeError:()=>v,buildChallengeTx:()=>Zt,gatherTxSigners:()=>f,readChallengeTx:()=>Bt,verifyChallengeTxSigners:()=>q,verifyChallengeTxThreshold:()=>ct,verifyTxSignedBy:()=>E});var P=B(8950);function Y(i){return Y=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},Y(i)}function a(i,T){for(var N=0;Ni.length)&&(T=i.length);for(var N=0,K=Array(T);N=jt.length?{done:!0}:{done:!1,value:jt[rt++]}},e:function($t){throw $t},f:F}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var lt,At=!0,Mt=!1;return{s:function(){nt=nt.call(jt)},n:function(){var $t=nt.next();return At=$t.done,$t},e:function($t){Mt=!0,lt=$t},f:function(){try{At||nt.return==null||nt.return()}finally{if(Mt)throw lt}}}})(T);try{for(pt.s();!(N=pt.n()).done;){var _t=N.value;if(dt.length===0)break;var ot=void 0;try{ot=P.Keypair.fromPublicKey(_t)}catch(jt){throw new v("Signer is not a valid address: ".concat(jt.message))}for(var it=0;it=i.length?{done:!0}:{done:!1,value:i[K++]}},e:function(ot){throw ot},f:dt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var j,pt=!0,_t=!1;return{s:function(){N=N.call(i)},n:function(){var ot=N.next();return pt=ot.done,ot},e:function(ot){_t=!0,j=ot},f:function(){try{pt||N.return==null||N.return()}finally{if(_t)throw j}}}}function L(i){return L=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},L(i)}function $(i){return(function(T){if(Array.isArray(T))return T})(i)||vt(i)||ut(i)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ut(i,T){if(i){if(typeof i=="string")return xt(i,T);var N={}.toString.call(i).slice(8,-1);return N==="Object"&&i.constructor&&(N=i.constructor.name),N==="Map"||N==="Set"?Array.from(i):N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N)?xt(i,T):void 0}}function xt(i,T){(T==null||T>i.length)&&(T=i.length);for(var N=0,K=Array(T);N3&&arguments[3]!==void 0?arguments[3]:300,dt=arguments.length>4?arguments[4]:void 0,j=arguments.length>5?arguments[5]:void 0,pt=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,_t=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,ot=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null;if(T.startsWith("M")&&pt)throw Error("memo cannot be used if clientAccountID is a muxed account");var it=new P.Account(i.publicKey(),"-1"),Et=Math.floor(Date.now()/1e3),jt=y()(48).toString("base64"),et=new P.TransactionBuilder(it,{fee:P.BASE_FEE,networkPassphrase:dt,timebounds:{minTime:Et,maxTime:Et+K}}).addOperation(P.Operation.manageData({name:"".concat(N," auth"),value:jt,source:T})).addOperation(P.Operation.manageData({name:"web_auth_domain",value:j,source:it.accountId()}));if(_t){if(!ot)throw Error("clientSigningKey is required if clientDomain is provided");et.addOperation(P.Operation.manageData({name:"client_domain",value:_t,source:ot}))}pt&&et.addMemo(P.Memo.id(pt));var nt=et.build();return nt.sign(i),nt.toEnvelope().toXDR("base64").toString()}function Bt(i,T,N,K,dt){var j,pt;if(T.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");try{pt=new P.Transaction(i,N)}catch{try{pt=new P.FeeBumpTransaction(i,N)}catch{throw new v("Invalid challenge: unable to deserialize challengeTx transaction string")}throw new v("Invalid challenge: expected a Transaction but received a FeeBumpTransaction")}if(Number.parseInt(pt.sequence,10)!==0)throw new v("The transaction sequence number should be zero");if(pt.source!==T)throw new v("The transaction source account is not equal to the server's account");if(pt.operations.length<1)throw new v("The transaction should contain at least one operation");var _t=$(pt.operations),ot=_t[0],it=_t.slice(1);if(!ot.source)throw new v("The transaction's operation should contain a source account");var Et,jt=ot.source,et=null;if(pt.memo.type!==P.MemoNone){if(jt.startsWith("M"))throw new v("The transaction has a memo but the client account ID is a muxed account");if(pt.memo.type!==P.MemoID)throw new v("The transaction's memo must be of type `id`");et=pt.memo.value}if(ot.type!=="manageData")throw new v("The transaction's operation type should be 'manageData'");if(pt.timeBounds&&Number.parseInt((j=pt.timeBounds)===null||j===void 0?void 0:j.maxTime,10)===P.TimeoutInfinite)throw new v("The transaction requires non-infinite timebounds");if(!_.A.validateTimebounds(pt,300))throw new v("The transaction has expired");if(ot.value===void 0)throw new v("The transaction's operation values should not be null");if(!ot.value)throw new v("The transaction's operation value should not be null");if(m.from(ot.value.toString(),"base64").length!==48)throw new v("The transaction's operation value should be a 64 bytes base64 random string");if(!K)throw new v("Invalid homeDomains: a home domain must be provided for verification");if(typeof K=="string")"".concat(K," auth")===ot.name&&(Et=K);else{if(!Array.isArray(K))throw new v("Invalid homeDomains: homeDomains type is ".concat(L(K)," but should be a string or an array"));Et=K.find(function(lt){return"".concat(lt," auth")===ot.name})}if(!Et)throw new v("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");var nt,rt=X(it);try{for(rt.s();!(nt=rt.n()).done;){var F=nt.value;if(F.type!=="manageData")throw new v("The transaction has operations that are not of type 'manageData'");if(F.source!==T&&F.name!=="client_domain")throw new v("The transaction has operations that are unrecognized");if(F.name==="web_auth_domain"){if(F.value===void 0)throw new v("'web_auth_domain' operation value should not be null");if(F.value.compare(m.from(dt)))throw new v("'web_auth_domain' operation value does not match ".concat(dt))}}}catch(lt){rt.e(lt)}finally{rt.f()}if(!E(pt,T))throw new v("Transaction not signed by server: '".concat(T,"'"));return{tx:pt,clientAccountID:jt,matchedHomeDomain:Et,memo:et}}function q(i,T,N,K,dt,j){var pt,_t=Bt(i,T,N,dt,j).tx;try{pt=P.Keypair.fromPublicKey(T)}catch(I){throw new Error("Couldn't infer keypair from the provided 'serverAccountID': ".concat(I.message))}var ot,it,Et=new Set,jt=X(K);try{for(jt.s();!(ot=jt.n()).done;){var et=ot.value;et!==pt.publicKey()&&et.charAt(0)==="G"&&Et.add(et)}}catch(I){jt.e(I)}finally{jt.f()}if(Et.size===0)throw new v("No verifiable client signers provided, at least one G... address must be provided");var nt,rt=X(_t.operations);try{for(rt.s();!(nt=rt.n()).done;){var F=nt.value;if(F.type==="manageData"&&F.name==="client_domain"){if(it)throw new v("Found more than one client_domain operation");it=F.source}}}catch(I){rt.e(I)}finally{rt.f()}var lt=[pt.publicKey()].concat(z(Array.from(Et)));it&<.push(it);var At,Mt=f(_t,lt),$t=!1,de=!1,u=X(Mt);try{for(u.s();!(At=u.n()).done;){var g=At.value;g===pt.publicKey()&&($t=!0),g===it&&(de=!0)}}catch(I){u.e(I)}finally{u.f()}if(!$t)throw new v("Transaction not signed by server: '".concat(pt.publicKey(),"'"));if(it&&!de)throw new v("Transaction not signed by the source account of the 'client_domain' ManageData operation");if(Mt.length===1)throw new v("None of the given signers match the transaction signatures");if(Mt.length!==_t.signatures.length)throw new v("Transaction has unrecognized signatures");return Mt.splice(Mt.indexOf(pt.publicKey()),1),it&&Mt.splice(Mt.indexOf(it),1),Mt}function ct(i,T,N,K,dt,j,pt){var _t,ot=q(i,T,N,dt.map(function(et){return et.key}),j,pt),it=0,Et=X(ot);try{var jt=function(){var et,nt=_t.value,rt=((et=dt.find(function(F){return F.key===nt}))===null||et===void 0?void 0:et.weight)||0;it+=rt};for(Et.s();!(_t=Et.n()).done;)jt()}catch(et){Et.e(et)}finally{Et.f()}if(it{Dt.exports=function(){for(var B={},P=0;P{"use strict";Ot.byteLength=function(o){var A=w(o),v=A[0],l=A[1];return 3*(v+l)/4-l},Ot.toByteArray=function(o){var A,v,l=w(o),c=l[0],R=l[1],f=new Y((function(y,_,m){return 3*(_+m)/4-m})(0,c,R)),E=0,k=R>0?c-4:c;for(v=0;v>16&255,f[E++]=A>>8&255,f[E++]=255&A;return R===2&&(A=P[o.charCodeAt(v)]<<2|P[o.charCodeAt(v+1)]>>4,f[E++]=255&A),R===1&&(A=P[o.charCodeAt(v)]<<10|P[o.charCodeAt(v+1)]<<4|P[o.charCodeAt(v+2)]>>2,f[E++]=A>>8&255,f[E++]=255&A),f},Ot.fromByteArray=function(o){for(var A,v=o.length,l=v%3,c=[],R=16383,f=0,E=v-l;fE?E:f+R));return l===1?(A=o[v-1],c.push(B[A>>2]+B[A<<4&63]+"==")):l===2&&(A=(o[v-2]<<8)+o[v-1],c.push(B[A>>10]+B[A>>4&63]+B[A<<2&63]+"=")),c.join("")};for(var B=[],P=[],Y=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=0;O<64;++O)B[O]=a[O],P[a.charCodeAt(O)]=O;function w(o){var A=o.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=o.indexOf("=");return v===-1&&(v=A),[v,v===A?0:4-v%4]}function p(o){return B[o>>18&63]+B[o>>12&63]+B[o>>6&63]+B[63&o]}function S(o,A,v){for(var l,c=[],R=A;R{"use strict";B.r(Ot),B.d(Ot,{Api:()=>{},FEDERATION_RESPONSE_MAX_SIZE:()=>y,Server:()=>_});var P=B(8950),Y=B(4193),a=B.n(Y),O=B(8732),w=B(5976),p=B(3898),S=B(9983);function o(m){return o=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},o(m)}function A(m,z){return(function(X){if(Array.isArray(X))return X})(m)||(function(X,L){var $=X==null?null:typeof Symbol<"u"&&X[Symbol.iterator]||X["@@iterator"];if($!=null){var ut,xt,vt,Zt,Bt=[],q=!0,ct=!1;try{if(vt=($=$.call(X)).next,L===0){if(Object($)!==$)return;q=!1}else for(;!(q=(ut=vt.call($)).done)&&(Bt.push(ut.value),Bt.length!==L);q=!0);}catch(i){ct=!0,xt=i}finally{try{if(!q&&$.return!=null&&(Zt=$.return(),Object(Zt)!==Zt))return}finally{if(ct)throw xt}}return Bt}})(m,z)||(function(X,L){if(X){if(typeof X=="string")return v(X,L);var $={}.toString.call(X).slice(8,-1);return $==="Object"&&X.constructor&&($=X.constructor.name),$==="Map"||$==="Set"?Array.from(X):$==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($)?v(X,L):void 0}})(m,z)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function v(m,z){(z==null||z>m.length)&&(z=m.length);for(var X=0,L=Array(z);X3?(de=I===$t)&&(et=u[(jt=u[4])?5:(jt=3,3)],u[4]=u[5]=m):u[0]<=g&&((de=Mt<2&&g$t||$t>I)&&(u[4]=Mt,u[5]=$t,lt.n=I,jt=0))}if(de||Mt>1)return xt;throw F=!0,$t}return function(Mt,$t,de){if(nt>1)throw TypeError("Generator is already running");for(F&&$t===1&&At($t,de),jt=$t,et=de;(z=jt<2?m:et)||!F;){Et||(jt?jt<3?(jt>1&&(lt.n=-1),At(jt,et)):lt.n=et:lt.v=et);try{if(nt=2,Et){if(jt||(Mt="next"),z=Et[Mt]){if(!(z=z.call(Et,et)))throw TypeError("iterator result is not an object");if(!z.done)return z;et=z.value,jt<2&&(jt=0)}else jt===1&&(z=Et.return)&&z.call(Et),jt<2&&(et=TypeError("The iterator does not provide a '"+Mt+"' method"),jt=1);Et=m}else if((z=(F=lt.n<0)?et:_t.call(ot,lt))!==xt)break}catch(u){Et=m,jt=1,et=u}finally{nt=1}}return{value:z,done:F}}})(T,K,dt),!0),pt}var xt={};function vt(){}function Zt(){}function Bt(){}z=Object.getPrototypeOf;var q=[][L]?z(z([][L]())):(c(z={},L,function(){return this}),z),ct=Bt.prototype=vt.prototype=Object.create(q);function i(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,Bt):(T.__proto__=Bt,c(T,$,"GeneratorFunction")),T.prototype=Object.create(ct),T}return Zt.prototype=Bt,c(ct,"constructor",Bt),c(Bt,"constructor",Zt),Zt.displayName="GeneratorFunction",c(Bt,$,"GeneratorFunction"),c(ct),c(ct,$,"Generator"),c(ct,L,function(){return this}),c(ct,"toString",function(){return"[object Generator]"}),(l=function(){return{w:ut,m:i}})()}function c(m,z,X,L){var $=Object.defineProperty;try{$({},"",{})}catch{$=0}c=function(ut,xt,vt,Zt){function Bt(q,ct){c(ut,q,function(i){return this._invoke(q,ct,i)})}xt?$?$(ut,xt,{value:vt,enumerable:!Zt,configurable:!Zt,writable:!Zt}):ut[xt]=vt:(Bt("next",0),Bt("throw",1),Bt("return",2))},c(m,z,X,L)}function R(m,z,X,L,$,ut,xt){try{var vt=m[ut](xt),Zt=vt.value}catch(Bt){return void X(Bt)}vt.done?z(Zt):Promise.resolve(Zt).then(L,$)}function f(m){return function(){var z=this,X=arguments;return new Promise(function(L,$){var ut=m.apply(z,X);function xt(Zt){R(ut,L,$,xt,vt,"next",Zt)}function vt(Zt){R(ut,L,$,xt,vt,"throw",Zt)}xt(void 0)})}}function E(m,z){for(var X=0;X2&&arguments[2]!==void 0?arguments[2]:{};(function(N,K){if(!(N instanceof K))throw new TypeError("Cannot call a class as a function")})(this,m),this.serverURL=a()(q),this.domain=ct;var T=i.allowHttp===void 0?O.T.isAllowHttp():i.allowHttp;if(this.timeout=i.timeout===void 0?O.T.getTimeout():i.timeout,this.serverURL.protocol()!=="https"&&!T)throw new Error("Cannot connect to insecure federation server")}return z=m,X=[{key:"resolveAddress",value:(Bt=f(l().m(function q(ct){var i,T;return l().w(function(N){for(;;)switch(N.n){case 0:if(i=ct,!(ct.indexOf("*")<0)){N.n=2;break}if(this.domain){N.n=1;break}return N.a(2,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 1:i="".concat(ct,"*").concat(this.domain);case 2:return T=this.serverURL.query({type:"name",q:i}),N.a(2,this._sendRequest(T))}},q,this)})),function(q){return Bt.apply(this,arguments)})},{key:"resolveAccountId",value:(Zt=f(l().m(function q(ct){var i;return l().w(function(T){for(;;)if(T.n===0)return i=this.serverURL.query({type:"id",q:ct}),T.a(2,this._sendRequest(i))},q,this)})),function(q){return Zt.apply(this,arguments)})},{key:"resolveTransactionId",value:(vt=f(l().m(function q(ct){var i;return l().w(function(T){for(;;)if(T.n===0)return i=this.serverURL.query({type:"txid",q:ct}),T.a(2,this._sendRequest(i))},q,this)})),function(q){return vt.apply(this,arguments)})},{key:"_sendRequest",value:(xt=f(l().m(function q(ct){var i;return l().w(function(T){for(;;)if(T.n===0)return i=this.timeout,T.a(2,S.ok.get(ct.toString(),{maxContentLength:y,timeout:i}).then(function(N){if(N.data.memo!==void 0&&typeof N.data.memo!="string")throw new Error("memo value should be of type string");return N.data}).catch(function(N){if(N instanceof Error){if(N.message.match(/^maxContentLength size/))throw new Error("federation response exceeds allowed size of ".concat(y));return Promise.reject(N)}return Promise.reject(new w.nS("Server query failed. Server responded: ".concat(N.status," ").concat(N.statusText),N.data))}))},q,this)})),function(q){return xt.apply(this,arguments)})}],L=[{key:"resolve",value:(ut=f(l().m(function q(ct){var i,T,N,K,dt,j=arguments;return l().w(function(pt){for(;;)switch(pt.n){case 0:if(i=j.length>1&&j[1]!==void 0?j[1]:{},!(ct.indexOf("*")<0)){pt.n=2;break}if(P.StrKey.isValidEd25519PublicKey(ct)){pt.n=1;break}return pt.a(2,Promise.reject(new Error("Invalid Account ID")));case 1:return pt.a(2,Promise.resolve({account_id:ct}));case 2:if(T=ct.split("*"),N=A(T,2),K=N[1],T.length===2&&K){pt.n=3;break}return pt.a(2,Promise.reject(new Error("Invalid Stellar address")));case 3:return pt.n=4,m.createForDomain(K,i);case 4:return dt=pt.v,pt.a(2,dt.resolveAddress(ct))}},q)})),function(q){return ut.apply(this,arguments)})},{key:"createForDomain",value:($=f(l().m(function q(ct){var i,T,N=arguments;return l().w(function(K){for(;;)switch(K.n){case 0:return i=N.length>1&&N[1]!==void 0?N[1]:{},K.n=1,p.Resolver.resolve(ct,i);case 1:if((T=K.v).FEDERATION_SERVER){K.n=2;break}return K.a(2,Promise.reject(new Error("stellar.toml does not contain FEDERATION_SERVER field")));case 2:return K.a(2,new m(T.FEDERATION_SERVER,ct,i))}},q)})),function(q){return $.apply(this,arguments)})}],X&&E(z.prototype,X),L&&E(z,L),Object.defineProperty(z,"prototype",{writable:!1}),z;var z,X,L,$,ut,xt,vt,Zt,Bt})()},7720:(Dt,Ot,B)=>{"use strict";var P=B(4765),Y=Object.prototype.hasOwnProperty,a=Array.isArray,O=(function(){for(var S=[],o=0;o<256;++o)S.push("%"+((o<16?"0":"")+o.toString(16)).toUpperCase());return S})(),w=function(S,o){for(var A=o&&o.plainObjects?{__proto__:null}:{},v=0;v1;){var _=y.pop(),m=_.obj[_.prop];if(a(m)){for(var z=[],X=0;X=p?c.slice(f,f+p):c,k=[],y=0;y=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122||l===P.RFC1738&&(_===40||_===41)?k[k.length]=E.charAt(y):_<128?k[k.length]=O[_]:_<2048?k[k.length]=O[192|_>>6]+O[128|63&_]:_<55296||_>=57344?k[k.length]=O[224|_>>12]+O[128|_>>6&63]+O[128|63&_]:(y+=1,_=65536+((1023&_)<<10|1023&E.charCodeAt(y)),k[k.length]=O[240|_>>18]+O[128|_>>12&63]+O[128|_>>6&63]+O[128|63&_])}R+=k.join("")}return R},isBuffer:function(S){return!(!S||typeof S!="object")&&!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},isRegExp:function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},maybeMap:function(S,o){if(a(S)){for(var A=[],v=0;v{"use strict";var P,Y=B(6048).F,a=Y.ERR_MISSING_ARGS,O=Y.ERR_STREAM_DESTROYED;function w(o){if(o)throw o}function p(o){o()}function S(o,A){return o.pipe(A)}Dt.exports=function(){for(var o=arguments.length,A=new Array(o),v=0;v0,function(y){l||(l=y),y&&R.forEach(p),k||(R.forEach(p),c(l))})});return A.reduce(S)}},8002:Dt=>{"use strict";Dt.exports=Math.min},8068:Dt=>{"use strict";Dt.exports=SyntaxError},8184:(Dt,Ot,B)=>{"use strict";var P,Y=B(6556),a=B(9721)(/^\s*(?:function)?\*/),O=B(9092)(),w=B(3628),p=Y("Object.prototype.toString"),S=Y("Function.prototype.toString");Dt.exports=function(o){if(typeof o!="function")return!1;if(a(S(o)))return!0;if(!O)return p(o)==="[object GeneratorFunction]";if(!w)return!1;if(P===void 0){var A=(function(){if(!O)return!1;try{return Function("return function*() {}")()}catch{}})();P=!!A&&w(A)}return w(o)===P}},8242:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{Api:()=>{}})},8250:(Dt,Ot,B)=>{"use strict";B.r(Ot),B.d(Ot,{AssembledTransaction:()=>Lt,Client:()=>zo,DEFAULT_TIMEOUT:()=>f.c,Err:()=>c,NULL_ACCOUNT:()=>f.u,Ok:()=>l,SentTransaction:()=>T,Spec:()=>cn,Watcher:()=>N,basicNodeSigner:()=>qe});var P=B(8950),Y=B(3496),a=B(4076),O=B(8680);function w(ht){return w=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},w(ht)}function p(ht,J){if(!(ht instanceof J))throw new TypeError("Cannot call a class as a function")}function S(ht,J){for(var Ut=0;Ut3?(Ze=jr===sr)&&(Re=Er[(ee=Er[4])?5:(ee=3,3)],Er[4]=Er[5]=ht):Er[0]<=hn&&((Ze=ur<2&&hnsr||sr>jr)&&(Er[4]=ur,Er[5]=sr,yr.n=jr,ee=0))}if(Ze||ur>1)return Ue;throw or=!0,sr}return function(ur,sr,Ze){if(hr>1)throw TypeError("Generator is already running");for(or&&sr===1&&Cr(sr,Ze),ee=sr,Re=Ze;(J=ee<2?ht:Re)||!or;){ke||(ee?ee<3?(ee>1&&(yr.n=-1),Cr(ee,Re)):yr.n=Re:yr.v=Re);try{if(hr=2,ke){if(ee||(ur="next"),J=ke[ur]){if(!(J=J.call(ke,Re)))throw TypeError("iterator result is not an object");if(!J.done)return J;Re=J.value,ee<2&&(ee=0)}else ee===1&&(J=ke.return)&&J.call(ke),ee<2&&(Re=TypeError("The iterator does not provide a '"+ur+"' method"),ee=1);ke=ht}else if((J=(or=yr.n<0)?Re:qt.call(_e,yr))!==Ue)break}catch(Er){ke=ht,ee=1,Re=Er}finally{hr=1}}return{value:J,done:or}}})(Z,kt,Qt),!0),wt}var Ue={};function Ne(){}function ue(){}function le(){}J=Object.getPrototypeOf;var pe=[][ne]?J(J([][ne]())):($(J={},ne,function(){return this}),J),We=le.prototype=Ne.prototype=Object.create(pe);function n(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,le):(Z.__proto__=le,$(Z,Nt,"GeneratorFunction")),Z.prototype=Object.create(We),Z}return ue.prototype=le,$(We,"constructor",le),$(le,"constructor",ue),ue.displayName="GeneratorFunction",$(le,Nt,"GeneratorFunction"),$(We),$(We,Nt,"Generator"),$(We,ne,function(){return this}),$(We,"toString",function(){return"[object Generator]"}),(L=function(){return{w:ce,m:n}})()}function $(ht,J,Ut,ne){var Nt=Object.defineProperty;try{Nt({},"",{})}catch{Nt=0}$=function(ce,Ue,Ne,ue){function le(pe,We){$(ce,pe,function(n){return this._invoke(pe,We,n)})}Ue?Nt?Nt(ce,Ue,{value:Ne,enumerable:!ue,configurable:!ue,writable:!ue}):ce[Ue]=Ne:(le("next",0),le("throw",1),le("return",2))},$(ht,J,Ut,ne)}function ut(ht,J,Ut,ne,Nt,ce,Ue){try{var Ne=ht[ce](Ue),ue=Ne.value}catch(le){return void Ut(le)}Ne.done?J(ue):Promise.resolve(ue).then(ne,Nt)}function xt(ht){return function(){var J=this,Ut=arguments;return new Promise(function(ne,Nt){var ce=ht.apply(J,Ut);function Ue(ue){ut(ce,ne,Nt,Ue,Ne,"next",ue)}function Ne(ue){ut(ce,ne,Nt,Ue,Ne,"throw",ue)}Ue(void 0)})}}function vt(ht,J){if(!(ht instanceof J))throw new TypeError("Cannot call a class as a function")}function Zt(ht,J){for(var Ut=0;Ut=ht.length&&(ht=void 0),{value:ht&&ht[Ut++],done:!ht}}}}throw new TypeError(U(ht)+" is not iterable")}function Wt(ht,J){return(function(Ut){if(Array.isArray(Ut))return Ut})(ht)||(function(Ut,ne){var Nt=Ut==null?null:typeof Symbol<"u"&&Ut[Symbol.iterator]||Ut["@@iterator"];if(Nt!=null){var ce,Ue,Ne,ue,le=[],pe=!0,We=!1;try{if(Ne=(Nt=Nt.call(Ut)).next,ne===0){if(Object(Nt)!==Nt)return;pe=!1}else for(;!(pe=(ce=Ne.call(Nt)).done)&&(le.push(ce.value),le.length!==ne);pe=!0);}catch(n){We=!0,Ue=n}finally{try{if(!pe&&Nt.return!=null&&(ue=Nt.return(),Object(ue)!==ue))return}finally{if(We)throw Ue}}return le}})(ht,J)||Vt(ht,J)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function xe(ht,J){var Ut=typeof Symbol<"u"&&ht[Symbol.iterator]||ht["@@iterator"];if(!Ut){if(Array.isArray(ht)||(Ut=Vt(ht))||J&&ht&&typeof ht.length=="number"){Ut&&(ht=Ut);var ne=0,Nt=function(){};return{s:Nt,n:function(){return ne>=ht.length?{done:!0}:{done:!1,value:ht[ne++]}},e:function(ue){throw ue},f:Nt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ce,Ue=!0,Ne=!1;return{s:function(){Ut=Ut.call(ht)},n:function(){var ue=Ut.next();return Ue=ue.done,ue},e:function(ue){Ne=!0,ce=ue},f:function(){try{Ue||Ut.return==null||Ut.return()}finally{if(Ne)throw ce}}}}function x(){var ht,J,Ut=typeof Symbol=="function"?Symbol:{},ne=Ut.iterator||"@@iterator",Nt=Ut.toStringTag||"@@toStringTag";function ce(Z,bt,kt,Qt){var te=bt&&bt.prototype instanceof Ne?bt:Ne,wt=Object.create(te.prototype);return G(wt,"_invoke",(function(qt,_e,Oe){var ke,ee,Re,hr=0,wr=Oe||[],or=!1,yr={p:0,n:0,v:ht,a:Cr,f:Cr.bind(ht,4),d:function(ur,sr){return ke=ur,ee=0,Re=ht,yr.n=sr,Ue}};function Cr(ur,sr){for(ee=ur,Re=sr,J=0;!or&&hr&&!Ze&&J3?(Ze=jr===sr)&&(Re=Er[(ee=Er[4])?5:(ee=3,3)],Er[4]=Er[5]=ht):Er[0]<=hn&&((Ze=ur<2&&hnsr||sr>jr)&&(Er[4]=ur,Er[5]=sr,yr.n=jr,ee=0))}if(Ze||ur>1)return Ue;throw or=!0,sr}return function(ur,sr,Ze){if(hr>1)throw TypeError("Generator is already running");for(or&&sr===1&&Cr(sr,Ze),ee=sr,Re=Ze;(J=ee<2?ht:Re)||!or;){ke||(ee?ee<3?(ee>1&&(yr.n=-1),Cr(ee,Re)):yr.n=Re:yr.v=Re);try{if(hr=2,ke){if(ee||(ur="next"),J=ke[ur]){if(!(J=J.call(ke,Re)))throw TypeError("iterator result is not an object");if(!J.done)return J;Re=J.value,ee<2&&(ee=0)}else ee===1&&(J=ke.return)&&J.call(ke),ee<2&&(Re=TypeError("The iterator does not provide a '"+ur+"' method"),ee=1);ke=ht}else if((J=(or=yr.n<0)?Re:qt.call(_e,yr))!==Ue)break}catch(Er){ke=ht,ee=1,Re=Er}finally{hr=1}}return{value:J,done:or}}})(Z,kt,Qt),!0),wt}var Ue={};function Ne(){}function ue(){}function le(){}J=Object.getPrototypeOf;var pe=[][ne]?J(J([][ne]())):(G(J={},ne,function(){return this}),J),We=le.prototype=Ne.prototype=Object.create(pe);function n(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,le):(Z.__proto__=le,G(Z,Nt,"GeneratorFunction")),Z.prototype=Object.create(We),Z}return ue.prototype=le,G(We,"constructor",le),G(le,"constructor",ue),ue.displayName="GeneratorFunction",G(le,Nt,"GeneratorFunction"),G(We),G(We,Nt,"Generator"),G(We,ne,function(){return this}),G(We,"toString",function(){return"[object Generator]"}),(x=function(){return{w:ce,m:n}})()}function G(ht,J,Ut,ne){var Nt=Object.defineProperty;try{Nt({},"",{})}catch{Nt=0}G=function(ce,Ue,Ne,ue){function le(pe,We){G(ce,pe,function(n){return this._invoke(pe,We,n)})}Ue?Nt?Nt(ce,Ue,{value:Ne,enumerable:!ue,configurable:!ue,writable:!ue}):ce[Ue]=Ne:(le("next",0),le("throw",1),le("return",2))},G(ht,J,Ut,ne)}function at(ht){return(function(J){if(Array.isArray(J))return Pt(J)})(ht)||(function(J){if(typeof Symbol<"u"&&J[Symbol.iterator]!=null||J["@@iterator"]!=null)return Array.from(J)})(ht)||Vt(ht)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Vt(ht,J){if(ht){if(typeof ht=="string")return Pt(ht,J);var Ut={}.toString.call(ht).slice(8,-1);return Ut==="Object"&&ht.constructor&&(Ut=ht.constructor.name),Ut==="Map"||Ut==="Set"?Array.from(ht):Ut==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ut)?Pt(ht,J):void 0}}function Pt(ht,J){(J==null||J>ht.length)&&(J=ht.length);for(var Ut=0,ne=Array(J);Ut0&&Re[0]!==void 0?Re[0]:{}).restore,pe.built){hr.n=2;break}if(pe.raw){hr.n=1;break}throw new Error("Transaction has not yet been assembled; call `AssembledTransaction.build` first.");case 1:pe.built=pe.raw.build();case 2:return te=te??pe.options.restore,delete pe.simulationResult,delete pe.simulationTransactionData,hr.n=3,pe.server.simulateTransaction(pe.built);case 3:if(pe.simulation=hr.v,!te||!a.j.isSimulationRestore(pe.simulation)){hr.n=8;break}return hr.n=4,(0,R.sU)(pe.options,pe.server);case 4:return wt=hr.v,hr.n=5,pe.restoreFootprint(pe.simulation.restorePreamble,wt);case 5:if((qt=hr.v).status!==a.j.GetTransactionStatus.SUCCESS){hr.n=7;break}return ee=new P.Contract(pe.options.contractId),pe.raw=new P.TransactionBuilder(wt,{fee:(_e=pe.options.fee)!==null&&_e!==void 0?_e:P.BASE_FEE,networkPassphrase:pe.options.networkPassphrase}).addOperation(ee.call.apply(ee,[pe.options.method].concat(at((Oe=pe.options.args)!==null&&Oe!==void 0?Oe:[])))).setTimeout((ke=pe.options.timeoutInSeconds)!==null&&ke!==void 0?ke:f.c),hr.n=6,pe.simulate();case 6:return hr.a(2,pe);case 7:throw new ht.Errors.RestorationFailure(`Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result: +`.concat(JSON.stringify(qt)));case 8:return a.j.isSimulationSuccess(pe.simulation)&&(pe.built=(0,O.X)(pe.built,pe.simulation).build()),hr.a(2,pe)}},Qt)}))),ft(this,"sign",mt(x().m(function Qt(){var te,wt,qt,_e,Oe,ke,ee,Re,hr,wr,or,yr,Cr=arguments;return x().w(function(ur){for(;;)switch(ur.n){case 0:if(qt=(wt=Cr.length>0&&Cr[0]!==void 0?Cr[0]:{}).force,_e=qt!==void 0&&qt,Oe=wt.signTransaction,ke=Oe===void 0?pe.options.signTransaction:Oe,pe.built){ur.n=1;break}throw new Error("Transaction has not yet been simulated");case 1:if(_e||!pe.isReadCall){ur.n=2;break}throw new ht.Errors.NoSignatureNeeded("This is a read call. It requires no signature or sending. Use `force: true` to sign and send anyway.");case 2:if(ke){ur.n=3;break}throw new ht.Errors.NoSigner("You must provide a signTransaction function, either when calling `signAndSend` or when initializing your Client");case 3:if(pe.options.publicKey){ur.n=4;break}throw new ht.Errors.FakeAccount("This transaction was constructed using a default account. Provide a valid publicKey in the AssembledTransactionOptions.");case 4:if(!(ee=pe.needsNonInvokerSigningBy().filter(function(sr){return!sr.startsWith("C")})).length){ur.n=5;break}throw new ht.Errors.NeedsMoreSignatures("Transaction requires signatures from ".concat(ee,". ")+"See `needsNonInvokerSigningBy` for details.");case 5:return Re=(te=pe.options.timeoutInSeconds)!==null&&te!==void 0?te:f.c,pe.built=P.TransactionBuilder.cloneFrom(pe.built,{fee:pe.built.fee,timebounds:void 0,sorobanData:pe.simulationData.transactionData}).setTimeout(Re).build(),hr={networkPassphrase:pe.options.networkPassphrase},pe.options.address&&(hr.address=pe.options.address),pe.options.submit!==void 0&&(hr.submit=pe.options.submit),pe.options.submitUrl&&(hr.submitUrl=pe.options.submitUrl),ur.n=6,ke(pe.built.toXDR(),hr);case 6:wr=ur.v,or=wr.signedTxXdr,yr=wr.error,pe.handleWalletError(yr),pe.signed=P.TransactionBuilder.fromXDR(or,pe.options.networkPassphrase);case 7:return ur.a(2)}},Qt)}))),ft(this,"signAndSend",mt(x().m(function Qt(){var te,wt,qt,_e,Oe,ke,ee,Re=arguments;return x().w(function(hr){for(;;)switch(hr.p=hr.n){case 0:if(wt=(te=Re.length>0&&Re[0]!==void 0?Re[0]:{}).force,qt=wt!==void 0&&wt,_e=te.signTransaction,Oe=_e===void 0?pe.options.signTransaction:_e,ke=te.watcher,pe.signed){hr.n=3;break}return ee=pe.options.submit,pe.options.submit&&(pe.options.submit=!1),hr.p=1,hr.n=2,pe.sign({force:qt,signTransaction:Oe});case 2:return hr.p=2,pe.options.submit=ee,hr.f(2);case 3:return hr.a(2,pe.send(ke))}},Qt,null,[[1,,2,3]])}))),ft(this,"needsNonInvokerSigningBy",function(){var Qt,te=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeAlreadySigned,wt=te!==void 0&&te;if(!pe.built)throw new Error("Transaction has not yet been simulated");if(!("operations"in pe.built))throw new Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(pe.built)));var qt=pe.built.operations[0];return at(new Set(((Qt=qt.auth)!==null&&Qt!==void 0?Qt:[]).filter(function(_e){return _e.credentials().switch()===P.xdr.SorobanCredentialsType.sorobanCredentialsAddress()&&(wt||_e.credentials().address().signature().switch().name==="scvVoid")}).map(function(_e){return P.Address.fromScAddress(_e.credentials().address().address()).toString()})))}),ft(this,"signAuthEntries",mt(x().m(function Qt(){var te,wt,qt,_e,Oe,ke,ee,Re,hr,wr,or,yr,Cr,ur,sr,Ze,Er,hn=arguments;return x().w(function(jr){for(;;)switch(jr.p=jr.n){case 0:if(qt=(wt=hn.length>0&&hn[0]!==void 0?hn[0]:{}).expiration,_e=qt===void 0?mt(x().m(function Po(){var Vn;return x().w(function(Xn){for(;;)switch(Xn.n){case 0:return Xn.n=1,pe.server.getLatestLedger();case 1:return Vn=Xn.v.sequence,Xn.a(2,Vn+100)}},Po)}))():qt,Oe=wt.signAuthEntry,ke=Oe===void 0?pe.options.signAuthEntry:Oe,ee=wt.address,Re=ee===void 0?pe.options.publicKey:ee,hr=wt.authorizeEntry,wr=hr===void 0?P.authorizeEntry:hr,pe.built){jr.n=1;break}throw new Error("Transaction has not yet been assembled or simulated");case 1:if(wr!==P.authorizeEntry){jr.n=4;break}if((or=pe.needsNonInvokerSigningBy()).length!==0){jr.n=2;break}throw new ht.Errors.NoUnsignedNonInvokerAuthEntries("No unsigned non-invoker auth entries; maybe you already signed?");case 2:if(or.indexOf(Re??"")!==-1){jr.n=3;break}throw new ht.Errors.NoSignatureNeeded('No auth entries for public key "'.concat(Re,'"'));case 3:if(ke){jr.n=4;break}throw new ht.Errors.NoSigner("You must provide `signAuthEntry` or a custom `authorizeEntry`");case 4:yr=pe.built.operations[0],Cr=(te=yr.auth)!==null&&te!==void 0?te:[],ur=xe(Cr.entries()),jr.p=5,Ze=x().m(function Po(){var Vn,Xn,Fo,mo,wn,po,Ao,Tn;return x().w(function(Qn){for(;;)switch(Qn.n){case 0:if(Vn=Wt(sr.value,2),Xn=Vn[0],Fo=Vn[1],(mo=P.xdr.SorobanCredentials.fromXDR(Fo.credentials().toXDR())).switch()===P.xdr.SorobanCredentialsType.sorobanCredentialsAddress()){Qn.n=1;break}return Qn.a(2,0);case 1:if(P.Address.fromScAddress(mo.address().address()).toString()===Re){Qn.n=2;break}return Qn.a(2,0);case 2:return wn=ke??Promise.resolve,po=wr,Ao=Fo,Tn=(function(){var Xr=mt(x().m(function Vo(_r){var Rn,Eo,Ro;return x().w(function(On){for(;;)switch(On.n){case 0:return On.n=1,wn(_r.toXDR("base64"),{address:Re});case 1:return Rn=On.v,Eo=Rn.signedAuthEntry,Ro=Rn.error,pe.handleWalletError(Ro),On.a(2,d.from(Eo,"base64"))}},Vo)}));return function(Vo){return Xr.apply(this,arguments)}})(),Qn.n=3,_e;case 3:return Qn.n=4,po(Ao,Tn,Qn.v,pe.options.networkPassphrase);case 4:Cr[Xn]=Qn.v;case 5:return Qn.a(2)}},Po)}),ur.s();case 6:if((sr=ur.n()).done){jr.n=9;break}return jr.d(Jt(Ze()),7);case 7:if(jr.v!==0){jr.n=8;break}return jr.a(3,8);case 8:jr.n=6;break;case 9:jr.n=11;break;case 10:jr.p=10,Er=jr.v,ur.e(Er);case 11:return jr.p=11,ur.f(),jr.f(11);case 12:return jr.a(2)}},Qt,null,[[5,10,11,12]])}))),this.options=ue,this.options.simulate=(le=this.options.simulate)===null||le===void 0||le;var We=this.options,n=We.server,Z=We.allowHttp,bt=We.headers,kt=We.rpcUrl;this.server=n??new Y.Server(kt,{allowHttp:Z,headers:bt})}return J=ht,Ut=[{key:"toJSON",value:function(){var ue;return JSON.stringify({method:this.options.method,tx:(ue=this.built)===null||ue===void 0?void 0:ue.toXDR(),simulationResult:{auth:this.simulationData.result.auth.map(function(le){return le.toXDR("base64")}),retval:this.simulationData.result.retval.toXDR("base64")},simulationTransactionData:this.simulationData.transactionData.toXDR("base64")})}},{key:"toXDR",value:function(){var ue;if(!this.built)throw new Error("Transaction has not yet been simulated; call `AssembledTransaction.simulate` first.");return(ue=this.built)===null||ue===void 0?void 0:ue.toEnvelope().toXDR("base64")}},{key:"handleWalletError",value:function(ue){if(ue){var le=ue.message,pe=ue.code,We="".concat(le).concat(ue.ext?" (".concat(ue.ext.join(", "),")"):"");switch(pe){case-1:throw new ht.Errors.InternalWalletError(We);case-2:throw new ht.Errors.ExternalServiceError(We);case-3:throw new ht.Errors.InvalidClientRequest(We);case-4:throw new ht.Errors.UserRejected(We);default:throw new Error("Unhandled error: ".concat(We))}}}},{key:"simulationData",get:function(){var ue;if(this.simulationResult&&this.simulationTransactionData)return{result:this.simulationResult,transactionData:this.simulationTransactionData};var le=this.simulation;if(!le)throw new ht.Errors.NotYetSimulated("Transaction has not yet been simulated");if(a.j.isSimulationError(le))throw new ht.Errors.SimulationFailed('Transaction simulation failed: "'.concat(le.error,'"'));if(a.j.isSimulationRestore(le))throw new ht.Errors.ExpiredState("You need to restore some contract state before you can invoke this method.\nYou can set `restore` to true in the method options in order to automatically restore the contract state when needed.");return this.simulationResult=(ue=le.result)!==null&&ue!==void 0?ue:{auth:[],retval:P.xdr.ScVal.scvVoid()},this.simulationTransactionData=le.transactionData.build(),{result:this.simulationResult,transactionData:this.simulationTransactionData}}},{key:"result",get:function(){try{if(!this.simulationData.result)throw new Error("No simulation result!");return this.options.parseResultXdr(this.simulationData.result.retval)}catch(le){if(!(0,R.pp)(le))throw le;var ue=this.parseError(le.toString());if(ue)return ue;throw le}}},{key:"parseError",value:function(ue){if(this.options.errorTypes){var le=ue.match(R.X8);if(le){var pe=parseInt(le[1],10),We=this.options.errorTypes[pe];if(We)return new c(We)}}}},{key:"send",value:(Ne=mt(x().m(function ue(le){var pe;return x().w(function(We){for(;;)switch(We.n){case 0:if(this.signed){We.n=1;break}throw new Error("The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.");case 1:return We.n=2,T.init(this,le);case 2:return pe=We.v,We.a(2,pe)}},ue,this)})),function(ue){return Ne.apply(this,arguments)})},{key:"isReadCall",get:function(){var ue=this.simulationData.result.auth.length,le=this.simulationData.transactionData.resources().footprint().readWrite().length;return ue===0&&le===0}},{key:"restoreFootprint",value:(Ue=mt(x().m(function ue(le,pe){var We,n,Z;return x().w(function(bt){for(;;)switch(bt.n){case 0:if(this.options.signTransaction){bt.n=1;break}throw new Error("For automatic restore to work you must provide a signTransaction function when initializing your Client");case 1:if(pe==null){bt.n=2;break}Z=pe,bt.n=4;break;case 2:return bt.n=3,(0,R.sU)(this.options,this.server);case 3:Z=bt.v;case 4:return pe=Z,bt.n=5,ht.buildFootprintRestoreTransaction(It({},this.options),le.transactionData,pe,le.minResourceFee);case 5:return We=bt.v,bt.n=6,We.signAndSend();case 6:if((n=bt.v).getTransactionResponse){bt.n=7;break}throw new ht.Errors.RestorationFailure(`The attempt at automatic restore failed. +`.concat(JSON.stringify(n)));case 7:return bt.a(2,n.getTransactionResponse)}},ue,this)})),function(ue,le){return Ue.apply(this,arguments)})}],ne=[{key:"fromJSON",value:function(ue,le){var pe=le.tx,We=le.simulationResult,n=le.simulationTransactionData,Z=new ht(ue);return Z.built=P.TransactionBuilder.fromXDR(pe,ue.networkPassphrase),Z.simulationResult={auth:We.auth.map(function(bt){return P.xdr.SorobanAuthorizationEntry.fromXDR(bt,"base64")}),retval:P.xdr.ScVal.fromXDR(We.retval,"base64")},Z.simulationTransactionData=P.xdr.SorobanTransactionData.fromXDR(n,"base64"),Z}},{key:"fromXDR",value:function(ue,le,pe){var We,n=P.xdr.TransactionEnvelope.fromXDR(le,"base64"),Z=P.TransactionBuilder.fromXDR(n,ue.networkPassphrase),bt=Z.operations[0];if(bt==null||(We=bt.func)===null||We===void 0||!We.value||typeof bt.func.value!="function")throw new Error("Could not extract the method from the transaction envelope.");var kt=bt.func.value();if(kt==null||!kt.functionName)throw new Error("Could not extract the method name from the transaction envelope.");var Qt=kt.functionName().toString("utf-8"),te=new ht(It(It({},ue),{},{method:Qt,parseResultXdr:function(wt){return pe.funcResToNative(Qt,wt)}}));return te.built=Z,te}},{key:"build",value:function(ue){var le,pe=new P.Contract(ue.contractId);return ht.buildWithOp(pe.call.apply(pe,[ue.method].concat(at((le=ue.args)!==null&&le!==void 0?le:[]))),ue)}},{key:"buildWithOp",value:(ce=mt(x().m(function ue(le,pe){var We,n,Z,bt;return x().w(function(kt){for(;;)switch(kt.n){case 0:return Z=new ht(pe),kt.n=1,(0,R.sU)(pe,Z.server);case 1:if(bt=kt.v,Z.raw=new P.TransactionBuilder(bt,{fee:(We=pe.fee)!==null&&We!==void 0?We:P.BASE_FEE,networkPassphrase:pe.networkPassphrase}).setTimeout((n=pe.timeoutInSeconds)!==null&&n!==void 0?n:f.c).addOperation(le),!pe.simulate){kt.n=2;break}return kt.n=2,Z.simulate();case 2:return kt.a(2,Z)}},ue)})),function(ue,le){return ce.apply(this,arguments)})},{key:"buildFootprintRestoreTransaction",value:(Nt=mt(x().m(function ue(le,pe,We,n){var Z,bt;return x().w(function(kt){for(;;)switch(kt.n){case 0:return(bt=new ht(le)).raw=new P.TransactionBuilder(We,{fee:n,networkPassphrase:le.networkPassphrase}).setSorobanData(pe instanceof P.SorobanDataBuilder?pe.build():pe).addOperation(P.Operation.restoreFootprint({})).setTimeout((Z=le.timeoutInSeconds)!==null&&Z!==void 0?Z:f.c),kt.n=1,bt.simulate({restore:!1});case 1:return kt.a(2,bt)}},ue)})),function(ue,le,pe,We){return Nt.apply(this,arguments)})}],Ut&>(J.prototype,Ut),ne&>(J,ne),Object.defineProperty(J,"prototype",{writable:!1}),J;var J,Ut,ne,Nt,ce,Ue,Ne})();ft(Lt,"Errors",{ExpiredState:rt,RestorationFailure:F,NeedsMoreSignatures:lt,NoSignatureNeeded:At,NoUnsignedNonInvokerAuthEntries:Mt,NoSigner:$t,NotYetSimulated:de,FakeAccount:u,SimulationFailed:g,InternalWalletError:I,ExternalServiceError:W,InvalidClientRequest:Q,UserRejected:St});var ie=B(8287).Buffer;function $e(){var ht,J,Ut=typeof Symbol=="function"?Symbol:{},ne=Ut.iterator||"@@iterator",Nt=Ut.toStringTag||"@@toStringTag";function ce(Z,bt,kt,Qt){var te=bt&&bt.prototype instanceof Ne?bt:Ne,wt=Object.create(te.prototype);return Ce(wt,"_invoke",(function(qt,_e,Oe){var ke,ee,Re,hr=0,wr=Oe||[],or=!1,yr={p:0,n:0,v:ht,a:Cr,f:Cr.bind(ht,4),d:function(ur,sr){return ke=ur,ee=0,Re=ht,yr.n=sr,Ue}};function Cr(ur,sr){for(ee=ur,Re=sr,J=0;!or&&hr&&!Ze&&J3?(Ze=jr===sr)&&(Re=Er[(ee=Er[4])?5:(ee=3,3)],Er[4]=Er[5]=ht):Er[0]<=hn&&((Ze=ur<2&&hnsr||sr>jr)&&(Er[4]=ur,Er[5]=sr,yr.n=jr,ee=0))}if(Ze||ur>1)return Ue;throw or=!0,sr}return function(ur,sr,Ze){if(hr>1)throw TypeError("Generator is already running");for(or&&sr===1&&Cr(sr,Ze),ee=sr,Re=Ze;(J=ee<2?ht:Re)||!or;){ke||(ee?ee<3?(ee>1&&(yr.n=-1),Cr(ee,Re)):yr.n=Re:yr.v=Re);try{if(hr=2,ke){if(ee||(ur="next"),J=ke[ur]){if(!(J=J.call(ke,Re)))throw TypeError("iterator result is not an object");if(!J.done)return J;Re=J.value,ee<2&&(ee=0)}else ee===1&&(J=ke.return)&&J.call(ke),ee<2&&(Re=TypeError("The iterator does not provide a '"+ur+"' method"),ee=1);ke=ht}else if((J=(or=yr.n<0)?Re:qt.call(_e,yr))!==Ue)break}catch(Er){ke=ht,ee=1,Re=Er}finally{hr=1}}return{value:J,done:or}}})(Z,kt,Qt),!0),wt}var Ue={};function Ne(){}function ue(){}function le(){}J=Object.getPrototypeOf;var pe=[][ne]?J(J([][ne]())):(Ce(J={},ne,function(){return this}),J),We=le.prototype=Ne.prototype=Object.create(pe);function n(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,le):(Z.__proto__=le,Ce(Z,Nt,"GeneratorFunction")),Z.prototype=Object.create(We),Z}return ue.prototype=le,Ce(We,"constructor",le),Ce(le,"constructor",ue),ue.displayName="GeneratorFunction",Ce(le,Nt,"GeneratorFunction"),Ce(We),Ce(We,Nt,"Generator"),Ce(We,ne,function(){return this}),Ce(We,"toString",function(){return"[object Generator]"}),($e=function(){return{w:ce,m:n}})()}function Ce(ht,J,Ut,ne){var Nt=Object.defineProperty;try{Nt({},"",{})}catch{Nt=0}Ce=function(ce,Ue,Ne,ue){function le(pe,We){Ce(ce,pe,function(n){return this._invoke(pe,We,n)})}Ue?Nt?Nt(ce,Ue,{value:Ne,enumerable:!ue,configurable:!ue,writable:!ue}):ce[Ue]=Ne:(le("next",0),le("throw",1),le("return",2))},Ce(ht,J,Ut,ne)}function He(ht,J,Ut,ne,Nt,ce,Ue){try{var Ne=ht[ce](Ue),ue=Ne.value}catch(le){return void Ut(le)}Ne.done?J(ue):Promise.resolve(ue).then(ne,Nt)}function rr(ht){return function(){var J=this,Ut=arguments;return new Promise(function(ne,Nt){var ce=ht.apply(J,Ut);function Ue(ue){He(ce,ne,Nt,Ue,Ne,"next",ue)}function Ne(ue){He(ce,ne,Nt,Ue,Ne,"throw",ue)}Ue(void 0)})}}var qe=function(ht,J){return{signTransaction:(ne=rr($e().m(function Nt(ce,Ue){var Ne;return $e().w(function(ue){for(;;)if(ue.n===0)return(Ne=P.TransactionBuilder.fromXDR(ce,Ue?.networkPassphrase||J)).sign(ht),ue.a(2,{signedTxXdr:Ne.toXDR(),signerAddress:ht.publicKey()})},Nt)})),function(Nt,ce){return ne.apply(this,arguments)}),signAuthEntry:(Ut=rr($e().m(function Nt(ce){var Ue;return $e().w(function(Ne){for(;;)if(Ne.n===0)return Ue=ht.sign((0,P.hash)(ie.from(ce,"base64"))).toString("base64"),Ne.a(2,{signedAuthEntry:Ue,signerAddress:ht.publicKey()})},Nt)})),function(Nt){return Ut.apply(this,arguments)})};var Ut,ne},pr=B(8451),De=B(8287).Buffer;function dr(ht,J){var Ut=Object.keys(ht);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(ht);J&&(ne=ne.filter(function(Nt){return Object.getOwnPropertyDescriptor(ht,Nt).enumerable})),Ut.push.apply(Ut,ne)}return Ut}function Pr(ht){for(var J=1;Jht.length)&&(J=ht.length);for(var Ut=0,ne=Array(J);Ut0&&(ne.required=Ut),ne}var cn=(function(){function ht(Nt){if((function(Ue,Ne){if(!(Ue instanceof Ne))throw new TypeError("Cannot call a class as a function")})(this,ht),En(this,"entries",[]),De.isBuffer(Nt))this.entries=(0,R.ns)(Nt);else if(typeof Nt=="string")this.entries=(0,R.ns)(De.from(Nt,"base64"));else{if(Nt.length===0)throw new Error("Contract spec must have at least one entry");var ce=Nt[0];this.entries=typeof ce=="string"?Nt.map(function(Ue){return P.xdr.ScSpecEntry.fromXDR(Ue,"base64")}):Nt}}return J=ht,Ut=[{key:"funcs",value:function(){return this.entries.filter(function(Nt){return Nt.switch().value===P.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value}).map(function(Nt){return Nt.functionV0()})}},{key:"getFunc",value:function(Nt){var ce=this.findEntry(Nt);if(ce.switch().value!==P.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value)throw new Error("".concat(Nt," is not a function"));return ce.functionV0()}},{key:"funcArgsToScVals",value:function(Nt,ce){var Ue=this;return this.getFunc(Nt).inputs().map(function(Ne){return Ue.nativeToScVal((function(ue,le){var pe=le.name().toString(),We=Object.entries(ue).find(function(n){return Zn(n,1)[0]===pe});if(!We)throw new Error("Missing field ".concat(pe));return We[1]})(ce,Ne),Ne.type())})}},{key:"funcResToNative",value:function(Nt,ce){var Ue=typeof ce=="string"?P.xdr.ScVal.fromXDR(ce,"base64"):ce,Ne=this.getFunc(Nt).outputs();if(Ne.length===0){var ue=Ue.switch();if(ue.value!==P.xdr.ScValType.scvVoid().value)throw new Error("Expected void, got ".concat(ue.name));return null}if(Ne.length>1)throw new Error("Multiple outputs not supported");var le=Ne[0];return le.switch().value===P.xdr.ScSpecType.scSpecTypeResult().value?new l(this.scValToNative(Ue,le.result().okType())):this.scValToNative(Ue,le)}},{key:"findEntry",value:function(Nt){var ce=this.entries.find(function(Ue){return Ue.value().name().toString()===Nt});if(!ce)throw new Error("no such entry: ".concat(Nt));return ce}},{key:"nativeToScVal",value:function(Nt,ce){var Ue=this,Ne=ce.switch(),ue=Ne.value;if(Ne.value===P.xdr.ScSpecType.scSpecTypeUdt().value){var le=ce.udt();return this.nativeToUdt(Nt,le.name().toString())}if(ue===P.xdr.ScSpecType.scSpecTypeOption().value){var pe=ce.option();return Nt==null?P.xdr.ScVal.scvVoid():this.nativeToScVal(Nt,pe.valueType())}switch(Zr(Nt)){case"object":var We,n,Z;if(Nt===null){if(ue===P.xdr.ScSpecType.scSpecTypeVoid().value)return P.xdr.ScVal.scvVoid();throw new TypeError("Type ".concat(ce," was not void, but value was null"))}if(Nt instanceof P.xdr.ScVal)return Nt;if(Nt instanceof P.Address){if(ce.switch().value!==P.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(ce," was not address, but value was Address"));return Nt.toScVal()}if(Nt instanceof P.Contract){if(ce.switch().value!==P.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(ce," was not address, but value was Address"));return Nt.address().toScVal()}if(Nt instanceof Uint8Array||De.isBuffer(Nt)){var bt=Uint8Array.from(Nt);switch(ue){case P.xdr.ScSpecType.scSpecTypeBytesN().value:var kt=ce.bytesN();if(bt.length!==kt.n())throw new TypeError("expected ".concat(kt.n()," bytes, but got ").concat(bt.length));return P.xdr.ScVal.scvBytes(bt);case P.xdr.ScSpecType.scSpecTypeBytes().value:return P.xdr.ScVal.scvBytes(bt);default:throw new TypeError("invalid type (".concat(ce,") specified for Bytes and BytesN"))}}if(Array.isArray(Nt))switch(ue){case P.xdr.ScSpecType.scSpecTypeVec().value:var Qt=ce.vec().elementType();return P.xdr.ScVal.scvVec(Nt.map(function(sr){return Ue.nativeToScVal(sr,Qt)}));case P.xdr.ScSpecType.scSpecTypeTuple().value:var te=ce.tuple().valueTypes();if(Nt.length!==te.length)throw new TypeError("Tuple expects ".concat(te.length," values, but ").concat(Nt.length," were provided"));return P.xdr.ScVal.scvVec(Nt.map(function(sr,Ze){return Ue.nativeToScVal(sr,te[Ze])}));case P.xdr.ScSpecType.scSpecTypeMap().value:var wt=ce.map(),qt=wt.keyType(),_e=wt.valueType();return P.xdr.ScVal.scvMap(Nt.map(function(sr){var Ze=Ue.nativeToScVal(sr[0],qt),Er=Ue.nativeToScVal(sr[1],_e);return new P.xdr.ScMapEntry({key:Ze,val:Er})}));default:throw new TypeError("Type ".concat(ce," was not vec, but value was Array"))}if(Nt.constructor===Map){if(ue!==P.xdr.ScSpecType.scSpecTypeMap().value)throw new TypeError("Type ".concat(ce," was not map, but value was Map"));for(var Oe=ce.map(),ke=[],ee=Nt.entries(),Re=ee.next();!Re.done;){var hr=Zn(Re.value,2),wr=hr[0],or=hr[1],yr=this.nativeToScVal(wr,Oe.keyType()),Cr=this.nativeToScVal(or,Oe.valueType());ke.push(new P.xdr.ScMapEntry({key:yr,val:Cr})),Re=ee.next()}return P.xdr.ScVal.scvMap(ke)}throw((We=(n=Nt.constructor)===null||n===void 0?void 0:n.name)!==null&&We!==void 0?We:"")!=="Object"?new TypeError("cannot interpret ".concat((Z=Nt.constructor)===null||Z===void 0?void 0:Z.name," value as ScVal (").concat(JSON.stringify(Nt),")")):new TypeError("Received object ".concat(Nt," did not match the provided type ").concat(ce));case"number":case"bigint":switch(ue){case P.xdr.ScSpecType.scSpecTypeU32().value:return P.xdr.ScVal.scvU32(Nt);case P.xdr.ScSpecType.scSpecTypeI32().value:return P.xdr.ScVal.scvI32(Nt);case P.xdr.ScSpecType.scSpecTypeU64().value:case P.xdr.ScSpecType.scSpecTypeI64().value:case P.xdr.ScSpecType.scSpecTypeU128().value:case P.xdr.ScSpecType.scSpecTypeI128().value:case P.xdr.ScSpecType.scSpecTypeU256().value:case P.xdr.ScSpecType.scSpecTypeI256().value:case P.xdr.ScSpecType.scSpecTypeTimepoint().value:case P.xdr.ScSpecType.scSpecTypeDuration().value:var ur=Ne.name.substring(10).toLowerCase();return new P.XdrLargeInt(ur,Nt).toScVal();default:throw new TypeError("invalid type (".concat(ce,") specified for integer"))}case"string":return(function(sr,Ze){switch(Ze.value){case P.xdr.ScSpecType.scSpecTypeString().value:return P.xdr.ScVal.scvString(sr);case P.xdr.ScSpecType.scSpecTypeSymbol().value:return P.xdr.ScVal.scvSymbol(sr);case P.xdr.ScSpecType.scSpecTypeAddress().value:case P.xdr.ScSpecType.scSpecTypeMuxedAddress().value:return P.Address.fromString(sr).toScVal();case P.xdr.ScSpecType.scSpecTypeU64().value:return new P.XdrLargeInt("u64",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeI64().value:return new P.XdrLargeInt("i64",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeU128().value:return new P.XdrLargeInt("u128",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeI128().value:return new P.XdrLargeInt("i128",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeU256().value:return new P.XdrLargeInt("u256",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeI256().value:return new P.XdrLargeInt("i256",sr).toScVal();case P.xdr.ScSpecType.scSpecTypeBytes().value:case P.xdr.ScSpecType.scSpecTypeBytesN().value:return P.xdr.ScVal.scvBytes(De.from(sr,"base64"));case P.xdr.ScSpecType.scSpecTypeTimepoint().value:return P.xdr.ScVal.scvTimepoint(new P.xdr.Uint64(sr));case P.xdr.ScSpecType.scSpecTypeDuration().value:return P.xdr.ScVal.scvDuration(new P.xdr.Uint64(sr));default:throw new TypeError("invalid type ".concat(Ze.name," specified for string value"))}})(Nt,Ne);case"boolean":if(ue!==P.xdr.ScSpecType.scSpecTypeBool().value)throw TypeError("Type ".concat(ce," was not bool, but value was bool"));return P.xdr.ScVal.scvBool(Nt);case"undefined":if(!ce)return P.xdr.ScVal.scvVoid();switch(ue){case P.xdr.ScSpecType.scSpecTypeVoid().value:case P.xdr.ScSpecType.scSpecTypeOption().value:return P.xdr.ScVal.scvVoid();default:throw new TypeError("Type ".concat(ce," was not void, but value was undefined"))}case"function":return this.nativeToScVal(Nt(),ce);default:throw new TypeError("failed to convert typeof ".concat(Zr(Nt)," (").concat(Nt,")"))}}},{key:"nativeToUdt",value:function(Nt,ce){var Ue=this.findEntry(ce);switch(Ue.switch()){case P.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():if(typeof Nt!="number")throw new TypeError("expected number for enum ".concat(ce,", but got ").concat(Zr(Nt)));return this.nativeToEnum(Nt,Ue.udtEnumV0());case P.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.nativeToStruct(Nt,Ue.udtStructV0());case P.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.nativeToUnion(Nt,Ue.udtUnionV0());default:throw new Error("failed to parse udt ".concat(ce))}}},{key:"nativeToUnion",value:function(Nt,ce){var Ue=this,Ne=Nt.tag,ue=ce.cases().find(function(n){return n.value().name().toString()===Ne});if(!ue)throw new TypeError("no such enum entry: ".concat(Ne," in ").concat(ce));var le=P.xdr.ScVal.scvSymbol(Ne);switch(ue.switch()){case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():return P.xdr.ScVal.scvVec([le]);case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var pe=ue.tupleCase().type();if(Array.isArray(Nt.values)){if(Nt.values.length!==pe.length)throw new TypeError("union ".concat(ce," expects ").concat(pe.length," values, but got ").concat(Nt.values.length));var We=Nt.values.map(function(n,Z){return Ue.nativeToScVal(n,pe[Z])});return We.unshift(le),P.xdr.ScVal.scvVec(We)}throw new Error("failed to parse union case ".concat(ue," with ").concat(Nt));default:throw new Error("failed to parse union ".concat(ce," with ").concat(Nt))}}},{key:"nativeToStruct",value:function(Nt,ce){var Ue=this,Ne=ce.fields();if(Ne.some(Gn)){if(!Ne.every(Gn))throw new Error("mixed numeric and non-numeric field names are not allowed");return P.xdr.ScVal.scvVec(Ne.map(function(ue,le){return Ue.nativeToScVal(Nt[le],Ne[le].type())}))}return P.xdr.ScVal.scvMap(Ne.map(function(ue){var le=ue.name().toString();return new P.xdr.ScMapEntry({key:Ue.nativeToScVal(le,P.xdr.ScSpecTypeDef.scSpecTypeSymbol()),val:Ue.nativeToScVal(Nt[le],ue.type())})}))}},{key:"nativeToEnum",value:function(Nt,ce){if(ce.cases().some(function(Ue){return Ue.value()===Nt}))return P.xdr.ScVal.scvU32(Nt);throw new TypeError("no such enum entry: ".concat(Nt," in ").concat(ce))}},{key:"scValStrToNative",value:function(Nt,ce){return this.scValToNative(P.xdr.ScVal.fromXDR(Nt,"base64"),ce)}},{key:"scValToNative",value:function(Nt,ce){var Ue=this,Ne=ce.switch(),ue=Ne.value;if(ue===P.xdr.ScSpecType.scSpecTypeOption().value)return Nt.switch().value===P.xdr.ScValType.scvVoid().value?null:this.scValToNative(Nt,ce.option().valueType());if(ue===P.xdr.ScSpecType.scSpecTypeUdt().value)return this.scValUdtToNative(Nt,ce.udt());switch(Nt.switch().value){case P.xdr.ScValType.scvVoid().value:return null;case P.xdr.ScValType.scvU64().value:case P.xdr.ScValType.scvI64().value:case P.xdr.ScValType.scvTimepoint().value:case P.xdr.ScValType.scvDuration().value:case P.xdr.ScValType.scvU128().value:case P.xdr.ScValType.scvI128().value:case P.xdr.ScValType.scvU256().value:case P.xdr.ScValType.scvI256().value:return(0,P.scValToBigInt)(Nt);case P.xdr.ScValType.scvVec().value:if(ue===P.xdr.ScSpecType.scSpecTypeVec().value){var le,pe=ce.vec();return((le=Nt.vec())!==null&&le!==void 0?le:[]).map(function(qt){return Ue.scValToNative(qt,pe.elementType())})}if(ue===P.xdr.ScSpecType.scSpecTypeTuple().value){var We,n=ce.tuple().valueTypes();return((We=Nt.vec())!==null&&We!==void 0?We:[]).map(function(qt,_e){return Ue.scValToNative(qt,n[_e])})}throw new TypeError("Type ".concat(ce," was not vec, but ").concat(Nt," is"));case P.xdr.ScValType.scvAddress().value:return P.Address.fromScVal(Nt).toString();case P.xdr.ScValType.scvMap().value:var Z,bt=(Z=Nt.map())!==null&&Z!==void 0?Z:[];if(ue===P.xdr.ScSpecType.scSpecTypeMap().value){var kt=ce.map(),Qt=kt.keyType(),te=kt.valueType();return bt.map(function(qt){return[Ue.scValToNative(qt.key(),Qt),Ue.scValToNative(qt.val(),te)]})}throw new TypeError("ScSpecType ".concat(Ne.name," was not map, but ").concat(JSON.stringify(Nt,null,2)," is"));case P.xdr.ScValType.scvBool().value:case P.xdr.ScValType.scvU32().value:case P.xdr.ScValType.scvI32().value:case P.xdr.ScValType.scvBytes().value:return Nt.value();case P.xdr.ScValType.scvString().value:case P.xdr.ScValType.scvSymbol().value:var wt;if(ue!==P.xdr.ScSpecType.scSpecTypeString().value&&ue!==P.xdr.ScSpecType.scSpecTypeSymbol().value)throw new Error("ScSpecType ".concat(Ne.name," was not string or symbol, but ").concat(JSON.stringify(Nt,null,2)," is"));return(wt=Nt.value())===null||wt===void 0?void 0:wt.toString();default:throw new TypeError("failed to convert ".concat(JSON.stringify(Nt,null,2)," to native type from type ").concat(Ne.name))}}},{key:"scValUdtToNative",value:function(Nt,ce){var Ue=this.findEntry(ce.name().toString());switch(Ue.switch()){case P.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():return this.enumToNative(Nt);case P.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.structToNative(Nt,Ue.udtStructV0());case P.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.unionToNative(Nt,Ue.udtUnionV0());default:throw new Error("failed to parse udt ".concat(ce.name().toString(),": ").concat(Ue))}}},{key:"unionToNative",value:function(Nt,ce){var Ue=this,Ne=Nt.vec();if(!Ne)throw new Error("".concat(JSON.stringify(Nt,null,2)," is not a vec"));if(Ne.length===0&&ce.cases.length!==0)throw new Error("".concat(Nt," has length 0, but the there are at least one case in the union"));var ue=Ne[0].sym().toString();if(Ne[0].switch().value!==P.xdr.ScValType.scvSymbol().value)throw new Error("{vec[0]} is not a symbol");var le=ce.cases().find((function(n){return function(Z){switch(Z.switch().value){case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:return Z.tupleCase().name().toString()===n;case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:return Z.voidCase().name().toString()===n;default:return!1}}})(ue));if(!le)throw new Error("failed to find entry ".concat(ue," in union {udt.name().toString()}"));var pe={tag:ue};if(le.switch().value===P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value){var We=le.tupleCase().type().map(function(n,Z){return Ue.scValToNative(Ne[Z+1],n)});pe.values=We}return pe}},{key:"structToNative",value:function(Nt,ce){var Ue,Ne,ue=this,le={},pe=ce.fields();return pe.some(Gn)?(Ne=Nt.vec())===null||Ne===void 0?void 0:Ne.map(function(We,n){return ue.scValToNative(We,pe[n].type())}):((Ue=Nt.map())===null||Ue===void 0||Ue.forEach(function(We,n){var Z=pe[n];le[Z.name().toString()]=ue.scValToNative(We.val(),Z.type())}),le)}},{key:"enumToNative",value:function(Nt){if(Nt.switch().value!==P.xdr.ScValType.scvU32().value)throw new Error("Enum must have a u32 value");return Nt.u32()}},{key:"errorCases",value:function(){return this.entries.filter(function(Nt){return Nt.switch().value===P.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value}).flatMap(function(Nt){return Nt.value().cases()})}},{key:"jsonSchema",value:function(Nt){var ce={};this.entries.forEach(function(Ne){switch(Ne.switch().value){case P.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value:var ue=Ne.udtEnumV0();ce[ue.name().toString()]=(function(kt){var Qt=kt.doc().toString(),te=kt.cases(),wt=[];te.forEach(function(_e){var Oe=_e.name().toString(),ke=_e.doc().toString();wt.push({description:ke,title:Oe,enum:[_e.value()],type:"number"})});var qt={oneOf:wt};return Qt.length>0&&(qt.description=Qt),qt})(ue);break;case P.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value:var le=Ne.udtStructV0();ce[le.name().toString()]=(function(kt){var Qt=kt.fields();if(Qt.some(Gn)){if(!Qt.every(Gn))throw new Error("mixed numeric and non-numeric field names are not allowed");return{type:"array",items:Qt.map(function(Oe,ke){return un(Qt[ke].type())}),minItems:Qt.length,maxItems:Qt.length}}var te=kt.doc().toString(),wt=zr(Qt),qt=wt.properties,_e=wt.required;return qt.additionalProperties=!1,{description:te,properties:qt,required:_e,type:"object"}})(le);break;case P.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value:var pe=Ne.udtUnionV0();ce[pe.name().toString()]=(function(kt){var Qt=kt.doc().toString(),te=kt.cases(),wt=[];te.forEach(function(_e){switch(_e.switch().value){case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:var Oe=_e.voidCase().name().toString();wt.push({type:"object",title:Oe,properties:{tag:Oe},additionalProperties:!1,required:["tag"]});break;case P.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:var ke=_e.tupleCase(),ee=ke.name().toString();wt.push({type:"object",title:ee,properties:{tag:ee,values:{type:"array",items:ke.type().map(un)}},required:["tag","values"],additionalProperties:!1})}});var qt={oneOf:wt};return Qt.length>0&&(qt.description=Qt),qt})(pe);break;case P.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value:var We=Ne.functionV0(),n=We.name().toString(),Z=(function(kt){var Qt=zr(kt.inputs()),te=Qt.properties,wt=Qt.required,qt={additionalProperties:!1,properties:te,type:"object"};wt?.length>0&&(qt.required=wt);var _e={properties:{args:qt}},Oe=kt.outputs(),ke=Oe.length>0?un(Oe[0]):un(P.xdr.ScSpecTypeDef.scSpecTypeVoid()),ee=kt.doc().toString();return ee.length>0&&(_e.description=ee),_e.additionalProperties=!1,ke.additionalProperties=!1,{input:_e,output:ke}})(We),bt=Z.input;ce[n]=bt;case P.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value:}});var Ue={$schema:"http://json-schema.org/draft-07/schema#",definitions:Pr(Pr({},ao),ce)};return Nt&&(Ue.$ref="#/definitions/".concat(Nt)),Ue}}],ne=[{key:"fromWasm",value:function(Nt){return new ht((0,pr.U)(Nt))}}],Ut&&bn(J.prototype,Ut),ne&&bn(J,ne),Object.defineProperty(J,"prototype",{writable:!1}),J;var J,Ut,ne})(),Yn=B(4366),yo=B(8287).Buffer;function Un(ht){return Un=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},Un(ht)}var ln=["method"],so=["wasmHash","salt","format","fee","timeoutInSeconds","simulate"];function Qr(){var ht,J,Ut=typeof Symbol=="function"?Symbol:{},ne=Ut.iterator||"@@iterator",Nt=Ut.toStringTag||"@@toStringTag";function ce(Z,bt,kt,Qt){var te=bt&&bt.prototype instanceof Ne?bt:Ne,wt=Object.create(te.prototype);return Wr(wt,"_invoke",(function(qt,_e,Oe){var ke,ee,Re,hr=0,wr=Oe||[],or=!1,yr={p:0,n:0,v:ht,a:Cr,f:Cr.bind(ht,4),d:function(ur,sr){return ke=ur,ee=0,Re=ht,yr.n=sr,Ue}};function Cr(ur,sr){for(ee=ur,Re=sr,J=0;!or&&hr&&!Ze&&J3?(Ze=jr===sr)&&(Re=Er[(ee=Er[4])?5:(ee=3,3)],Er[4]=Er[5]=ht):Er[0]<=hn&&((Ze=ur<2&&hnsr||sr>jr)&&(Er[4]=ur,Er[5]=sr,yr.n=jr,ee=0))}if(Ze||ur>1)return Ue;throw or=!0,sr}return function(ur,sr,Ze){if(hr>1)throw TypeError("Generator is already running");for(or&&sr===1&&Cr(sr,Ze),ee=sr,Re=Ze;(J=ee<2?ht:Re)||!or;){ke||(ee?ee<3?(ee>1&&(yr.n=-1),Cr(ee,Re)):yr.n=Re:yr.v=Re);try{if(hr=2,ke){if(ee||(ur="next"),J=ke[ur]){if(!(J=J.call(ke,Re)))throw TypeError("iterator result is not an object");if(!J.done)return J;Re=J.value,ee<2&&(ee=0)}else ee===1&&(J=ke.return)&&J.call(ke),ee<2&&(Re=TypeError("The iterator does not provide a '"+ur+"' method"),ee=1);ke=ht}else if((J=(or=yr.n<0)?Re:qt.call(_e,yr))!==Ue)break}catch(Er){ke=ht,ee=1,Re=Er}finally{hr=1}}return{value:J,done:or}}})(Z,kt,Qt),!0),wt}var Ue={};function Ne(){}function ue(){}function le(){}J=Object.getPrototypeOf;var pe=[][ne]?J(J([][ne]())):(Wr(J={},ne,function(){return this}),J),We=le.prototype=Ne.prototype=Object.create(pe);function n(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,le):(Z.__proto__=le,Wr(Z,Nt,"GeneratorFunction")),Z.prototype=Object.create(We),Z}return ue.prototype=le,Wr(We,"constructor",le),Wr(le,"constructor",ue),ue.displayName="GeneratorFunction",Wr(le,Nt,"GeneratorFunction"),Wr(We),Wr(We,Nt,"Generator"),Wr(We,ne,function(){return this}),Wr(We,"toString",function(){return"[object Generator]"}),(Qr=function(){return{w:ce,m:n}})()}function Wr(ht,J,Ut,ne){var Nt=Object.defineProperty;try{Nt({},"",{})}catch{Nt=0}Wr=function(ce,Ue,Ne,ue){function le(pe,We){Wr(ce,pe,function(n){return this._invoke(pe,We,n)})}Ue?Nt?Nt(ce,Ue,{value:Ne,enumerable:!ue,configurable:!ue,writable:!ue}):ce[Ue]=Ne:(le("next",0),le("throw",1),le("return",2))},Wr(ht,J,Ut,ne)}function Pn(ht,J){var Ut=Object.keys(ht);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(ht);J&&(ne=ne.filter(function(Nt){return Object.getOwnPropertyDescriptor(ht,Nt).enumerable})),Ut.push.apply(Ut,ne)}return Ut}function Dr(ht){for(var J=1;J2&&pe[2]!==void 0?pe[2]:"hex",Ut&&Ut.rpcUrl){We.n=1;break}throw new TypeError("options must contain rpcUrl");case 1:return Nt=Ut.rpcUrl,ce=Ut.allowHttp,Ue=Ut.headers,Ne={allowHttp:ce,headers:Ue},ue=new Y.Server(Nt,Ne),We.n=2,ue.getContractWasmByHash(J,ne);case 2:return le=We.v,We.a(2,cn.fromWasm(le))}},ht)})),Co.apply(this,arguments)}var zo=(function(){function ht(ue,le){var pe=this;if((function(Z,bt){if(!(Z instanceof bt))throw new TypeError("Cannot call a class as a function")})(this,ht),fo(this,"txFromJSON",function(Z){var bt=JSON.parse(Z),kt=bt.method,Qt=mn(bt,ln);return Lt.fromJSON(Dr(Dr({},pe.options),{},{method:kt,parseResultXdr:function(te){return pe.spec.funcResToNative(kt,te)}}),Qt)}),fo(this,"txFromXDR",function(Z){return Lt.fromXDR(pe.options,Z,pe.spec)}),this.spec=ue,this.options=le,le.server===void 0){var We=le.allowHttp,n=le.headers;le.server=new Y.Server(le.rpcUrl,{allowHttp:We,headers:n})}this.spec.funcs().forEach(function(Z){var bt=Z.name().toString();if(bt!==ro){var kt=function(Qt,te){return Lt.build(Dr(Dr(Dr({method:bt,args:Qt&&ue.funcArgsToScVals(bt,Qt)},le),te),{},{errorTypes:ue.errorCases().reduce(function(wt,qt){return Dr(Dr({},wt),{},fo({},qt.value(),{message:qt.doc().toString()}))},{}),parseResultXdr:function(wt){return ue.funcResToNative(bt,wt)}}))};pe[(0,Yn.ff)(bt)]=ue.getFunc(bt).inputs().length===0?function(Qt){return kt(void 0,Qt)}:kt}})}return J=ht,Ut=null,ne=[{key:"deploy",value:(Ne=Bo(Qr().m(function ue(le,pe){var We,n,Z,bt,kt,Qt,te,wt,qt;return Qr().w(function(_e){for(;;)switch(_e.n){case 0:return We=pe.wasmHash,n=pe.salt,Z=pe.format,bt=pe.fee,kt=pe.timeoutInSeconds,Qt=pe.simulate,te=mn(pe,so),_e.n=1,Lo(We,te,Z);case 1:return wt=_e.v,qt=P.Operation.createCustomContract({address:new P.Address(pe.address||pe.publicKey),wasmHash:typeof We=="string"?yo.from(We,Z??"hex"):We,salt:n,constructorArgs:le?wt.funcArgsToScVals(ro,le):[]}),_e.a(2,Lt.buildWithOp(qt,Dr(Dr({fee:bt,timeoutInSeconds:kt,simulate:Qt},te),{},{contractId:"ignored",method:ro,parseResultXdr:function(Oe){return new ht(wt,Dr(Dr({},te),{},{contractId:P.Address.fromScVal(Oe).toString()}))}})))}},ue)})),function(ue,le){return Ne.apply(this,arguments)})},{key:"fromWasmHash",value:(Ue=Bo(Qr().m(function ue(le,pe){var We,n,Z,bt,kt,Qt,te,wt=arguments;return Qr().w(function(qt){for(;;)switch(qt.n){case 0:if(n=wt.length>2&&wt[2]!==void 0?wt[2]:"hex",pe&&pe.rpcUrl){qt.n=1;break}throw new TypeError("options must contain rpcUrl");case 1:return Z=pe.rpcUrl,bt=pe.allowHttp,kt=pe.headers,Qt=(We=pe.server)!==null&&We!==void 0?We:new Y.Server(Z,{allowHttp:bt,headers:kt}),qt.n=2,Qt.getContractWasmByHash(le,n);case 2:return te=qt.v,qt.a(2,ht.fromWasm(te,pe))}},ue)})),function(ue,le){return Ue.apply(this,arguments)})},{key:"fromWasm",value:(ce=Bo(Qr().m(function ue(le,pe){var We;return Qr().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,cn.fromWasm(le);case 1:return We=n.v,n.a(2,new ht(We,pe))}},ue)})),function(ue,le){return ce.apply(this,arguments)})},{key:"from",value:(Nt=Bo(Qr().m(function ue(le){var pe,We,n,Z,bt,kt;return Qr().w(function(Qt){for(;;)switch(Qt.n){case 0:if(le&&le.rpcUrl&&le.contractId){Qt.n=1;break}throw new TypeError("options must contain rpcUrl and contractId");case 1:return pe=le.rpcUrl,We=le.contractId,n=le.allowHttp,Z=le.headers,bt=new Y.Server(pe,{allowHttp:n,headers:Z}),Qt.n=2,bt.getContractWasmByContractId(We);case 2:return kt=Qt.v,Qt.a(2,ht.fromWasm(kt,le))}},ue)})),function(ue){return Nt.apply(this,arguments)})}],Ut&&$n(J.prototype,Ut),ne&&$n(J,ne),Object.defineProperty(J,"prototype",{writable:!1}),J;var J,Ut,ne,Nt,ce,Ue,Ne})()},8287:(Dt,Ot,B)=>{"use strict";let P=B(7526),Y=B(251),a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ot.Buffer=p,Ot.SlowBuffer=function(u){return+u!=u&&(u=0),p.alloc(+u)},Ot.INSPECT_MAX_BYTES=50;let O=2147483647;function w(u){if(u>O)throw new RangeError('The value "'+u+'" is invalid for option "size"');let g=new Uint8Array(u);return Object.setPrototypeOf(g,p.prototype),g}function p(u,g,I){if(typeof u=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return A(u)}return S(u,g,I)}function S(u,g,I){if(typeof u=="string")return(function(St,d){if(typeof d=="string"&&d!==""||(d="utf8"),!p.isEncoding(d))throw new TypeError("Unknown encoding: "+d);let U=0|R(St,d),M=w(U),It=M.write(St,d);return It!==U&&(M=M.slice(0,It)),M})(u,g);if(ArrayBuffer.isView(u))return(function(St){if(lt(St,Uint8Array)){let d=new Uint8Array(St);return l(d.buffer,d.byteOffset,d.byteLength)}return v(St)})(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(lt(u,ArrayBuffer)||u&<(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(lt(u,SharedArrayBuffer)||u&<(u.buffer,SharedArrayBuffer)))return l(u,g,I);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let W=u.valueOf&&u.valueOf();if(W!=null&&W!==u)return p.from(W,g,I);let Q=(function(St){if(p.isBuffer(St)){let d=0|c(St.length),U=w(d);return U.length===0||St.copy(U,0,0,d),U}if(St.length!==void 0)return typeof St.length!="number"||At(St.length)?w(0):v(St);if(St.type==="Buffer"&&Array.isArray(St.data))return v(St.data)})(u);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return p.from(u[Symbol.toPrimitive]("string"),g,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}function o(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function A(u){return o(u),w(u<0?0:0|c(u))}function v(u){let g=u.length<0?0:0|c(u.length),I=w(g);for(let W=0;W=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return 0|u}function R(u,g){if(p.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||lt(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);let I=u.length,W=arguments.length>2&&arguments[2]===!0;if(!W&&I===0)return 0;let Q=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return nt(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*I;case"hex":return I>>>1;case"base64":return rt(u).length;default:if(Q)return W?-1:nt(u).length;g=(""+g).toLowerCase(),Q=!0}}function f(u,g,I){let W=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0)<=(g>>>=0))return"";for(u||(u="utf8");;)switch(u){case"hex":return Bt(this,g,I);case"utf8":case"utf-8":return ut(this,g,I);case"ascii":return vt(this,g,I);case"latin1":case"binary":return Zt(this,g,I);case"base64":return $(this,g,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,g,I);default:if(W)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),W=!0}}function E(u,g,I){let W=u[g];u[g]=u[I],u[I]=W}function k(u,g,I,W,Q){if(u.length===0)return-1;if(typeof I=="string"?(W=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),At(I=+I)&&(I=Q?0:u.length-1),I<0&&(I=u.length+I),I>=u.length){if(Q)return-1;I=u.length-1}else if(I<0){if(!Q)return-1;I=0}if(typeof g=="string"&&(g=p.from(g,W)),p.isBuffer(g))return g.length===0?-1:y(u,g,I,W,Q);if(typeof g=="number")return g&=255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(u,g,I):Uint8Array.prototype.lastIndexOf.call(u,g,I):y(u,[g],I,W,Q);throw new TypeError("val must be string, number or Buffer")}function y(u,g,I,W,Q){let St,d=1,U=u.length,M=g.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(u.length<2||g.length<2)return-1;d=2,U/=2,M/=2,I/=2}function It(Jt,Wt){return d===1?Jt[Wt]:Jt.readUInt16BE(Wt*d)}if(Q){let Jt=-1;for(St=I;StU&&(I=U-M),St=I;St>=0;St--){let Jt=!0;for(let Wt=0;WtQ&&(W=Q):W=Q;let St=g.length,d;for(W>St/2&&(W=St/2),d=0;d>8,M=d%256,It.push(M),It.push(U);return It})(g,u.length-I),u,I,W)}function $(u,g,I){return g===0&&I===u.length?P.fromByteArray(u):P.fromByteArray(u.slice(g,I))}function ut(u,g,I){I=Math.min(u.length,I);let W=[],Q=g;for(;Q239?4:St>223?3:St>191?2:1;if(Q+U<=I){let M,It,Jt,Wt;switch(U){case 1:St<128&&(d=St);break;case 2:M=u[Q+1],(192&M)==128&&(Wt=(31&St)<<6|63&M,Wt>127&&(d=Wt));break;case 3:M=u[Q+1],It=u[Q+2],(192&M)==128&&(192&It)==128&&(Wt=(15&St)<<12|(63&M)<<6|63&It,Wt>2047&&(Wt<55296||Wt>57343)&&(d=Wt));break;case 4:M=u[Q+1],It=u[Q+2],Jt=u[Q+3],(192&M)==128&&(192&It)==128&&(192&Jt)==128&&(Wt=(15&St)<<18|(63&M)<<12|(63&It)<<6|63&Jt,Wt>65535&&Wt<1114112&&(d=Wt))}}d===null?(d=65533,U=1):d>65535&&(d-=65536,W.push(d>>>10&1023|55296),d=56320|1023&d),W.push(d),Q+=U}return(function(St){let d=St.length;if(d<=xt)return String.fromCharCode.apply(String,St);let U="",M=0;for(;M"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(u,g,I){return S(u,g,I)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array),p.alloc=function(u,g,I){return(function(W,Q,St){return o(W),W<=0?w(W):Q!==void 0?typeof St=="string"?w(W).fill(Q,St):w(W).fill(Q):w(W)})(u,g,I)},p.allocUnsafe=function(u){return A(u)},p.allocUnsafeSlow=function(u){return A(u)},p.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==p.prototype},p.compare=function(u,g){if(lt(u,Uint8Array)&&(u=p.from(u,u.offset,u.byteLength)),lt(g,Uint8Array)&&(g=p.from(g,g.offset,g.byteLength)),!p.isBuffer(u)||!p.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===g)return 0;let I=u.length,W=g.length;for(let Q=0,St=Math.min(I,W);QW.length?(p.isBuffer(St)||(St=p.from(St)),St.copy(W,Q)):Uint8Array.prototype.set.call(W,St,Q);else{if(!p.isBuffer(St))throw new TypeError('"list" argument must be an Array of Buffers');St.copy(W,Q)}Q+=St.length}return W},p.byteLength=R,p.prototype._isBuffer=!0,p.prototype.swap16=function(){let u=this.length;if(u%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;gg&&(u+=" ... "),""},a&&(p.prototype[a]=p.prototype.inspect),p.prototype.compare=function(u,g,I,W,Q){if(lt(u,Uint8Array)&&(u=p.from(u,u.offset,u.byteLength)),!p.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(g===void 0&&(g=0),I===void 0&&(I=u?u.length:0),W===void 0&&(W=0),Q===void 0&&(Q=this.length),g<0||I>u.length||W<0||Q>this.length)throw new RangeError("out of range index");if(W>=Q&&g>=I)return 0;if(W>=Q)return-1;if(g>=I)return 1;if(this===u)return 0;let St=(Q>>>=0)-(W>>>=0),d=(I>>>=0)-(g>>>=0),U=Math.min(St,d),M=this.slice(W,Q),It=u.slice(g,I);for(let Jt=0;Jt>>=0,isFinite(I)?(I>>>=0,W===void 0&&(W="utf8")):(W=I,I=void 0)}let Q=this.length-g;if((I===void 0||I>Q)&&(I=Q),u.length>0&&(I<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let St=!1;for(;;)switch(W){case"hex":return _(this,u,g,I);case"utf8":case"utf-8":return m(this,u,g,I);case"ascii":case"latin1":case"binary":return z(this,u,g,I);case"base64":return X(this,u,g,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,u,g,I);default:if(St)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),St=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let xt=4096;function vt(u,g,I){let W="";I=Math.min(u.length,I);for(let Q=g;QW)&&(I=W);let Q="";for(let St=g;StI)throw new RangeError("Trying to access beyond buffer length")}function i(u,g,I,W,Q,St){if(!p.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>Q||gu.length)throw new RangeError("Index out of range")}function T(u,g,I,W,Q){it(g,W,Q,u,I,7);let St=Number(g&BigInt(4294967295));u[I++]=St,St>>=8,u[I++]=St,St>>=8,u[I++]=St,St>>=8,u[I++]=St;let d=Number(g>>BigInt(32)&BigInt(4294967295));return u[I++]=d,d>>=8,u[I++]=d,d>>=8,u[I++]=d,d>>=8,u[I++]=d,I}function N(u,g,I,W,Q){it(g,W,Q,u,I,7);let St=Number(g&BigInt(4294967295));u[I+7]=St,St>>=8,u[I+6]=St,St>>=8,u[I+5]=St,St>>=8,u[I+4]=St;let d=Number(g>>BigInt(32)&BigInt(4294967295));return u[I+3]=d,d>>=8,u[I+2]=d,d>>=8,u[I+1]=d,d>>=8,u[I]=d,I+8}function K(u,g,I,W,Q,St){if(I+W>u.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function dt(u,g,I,W,Q){return g=+g,I>>>=0,Q||K(u,0,I,4),Y.write(u,g,I,W,23,4),I+4}function j(u,g,I,W,Q){return g=+g,I>>>=0,Q||K(u,0,I,8),Y.write(u,g,I,W,52,8),I+8}p.prototype.slice=function(u,g){let I=this.length;(u=~~u)<0?(u+=I)<0&&(u=0):u>I&&(u=I),(g=g===void 0?I:~~g)<0?(g+=I)<0&&(g=0):g>I&&(g=I),g>>=0,g>>>=0,I||ct(u,g,this.length);let W=this[u],Q=1,St=0;for(;++St>>=0,g>>>=0,I||ct(u,g,this.length);let W=this[u+--g],Q=1;for(;g>0&&(Q*=256);)W+=this[u+--g]*Q;return W},p.prototype.readUint8=p.prototype.readUInt8=function(u,g){return u>>>=0,g||ct(u,1,this.length),this[u]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(u,g){return u>>>=0,g||ct(u,2,this.length),this[u]|this[u+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(u,g){return u>>>=0,g||ct(u,2,this.length),this[u]<<8|this[u+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(u,g){return u>>>=0,g||ct(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+16777216*this[u+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(u,g){return u>>>=0,g||ct(u,4,this.length),16777216*this[u]+(this[u+1]<<16|this[u+2]<<8|this[u+3])},p.prototype.readBigUInt64LE=$t(function(u){Et(u>>>=0,"offset");let g=this[u],I=this[u+7];g!==void 0&&I!==void 0||jt(u,this.length-8);let W=g+256*this[++u]+65536*this[++u]+this[++u]*2**24,Q=this[++u]+256*this[++u]+65536*this[++u]+I*2**24;return BigInt(W)+(BigInt(Q)<>>=0,"offset");let g=this[u],I=this[u+7];g!==void 0&&I!==void 0||jt(u,this.length-8);let W=g*2**24+65536*this[++u]+256*this[++u]+this[++u],Q=this[++u]*2**24+65536*this[++u]+256*this[++u]+I;return(BigInt(W)<>>=0,g>>>=0,I||ct(u,g,this.length);let W=this[u],Q=1,St=0;for(;++St=Q&&(W-=Math.pow(2,8*g)),W},p.prototype.readIntBE=function(u,g,I){u>>>=0,g>>>=0,I||ct(u,g,this.length);let W=g,Q=1,St=this[u+--W];for(;W>0&&(Q*=256);)St+=this[u+--W]*Q;return Q*=128,St>=Q&&(St-=Math.pow(2,8*g)),St},p.prototype.readInt8=function(u,g){return u>>>=0,g||ct(u,1,this.length),128&this[u]?-1*(255-this[u]+1):this[u]},p.prototype.readInt16LE=function(u,g){u>>>=0,g||ct(u,2,this.length);let I=this[u]|this[u+1]<<8;return 32768&I?4294901760|I:I},p.prototype.readInt16BE=function(u,g){u>>>=0,g||ct(u,2,this.length);let I=this[u+1]|this[u]<<8;return 32768&I?4294901760|I:I},p.prototype.readInt32LE=function(u,g){return u>>>=0,g||ct(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},p.prototype.readInt32BE=function(u,g){return u>>>=0,g||ct(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},p.prototype.readBigInt64LE=$t(function(u){Et(u>>>=0,"offset");let g=this[u],I=this[u+7];g!==void 0&&I!==void 0||jt(u,this.length-8);let W=this[u+4]+256*this[u+5]+65536*this[u+6]+(I<<24);return(BigInt(W)<>>=0,"offset");let g=this[u],I=this[u+7];g!==void 0&&I!==void 0||jt(u,this.length-8);let W=(g<<24)+65536*this[++u]+256*this[++u]+this[++u];return(BigInt(W)<>>=0,g||ct(u,4,this.length),Y.read(this,u,!0,23,4)},p.prototype.readFloatBE=function(u,g){return u>>>=0,g||ct(u,4,this.length),Y.read(this,u,!1,23,4)},p.prototype.readDoubleLE=function(u,g){return u>>>=0,g||ct(u,8,this.length),Y.read(this,u,!0,52,8)},p.prototype.readDoubleBE=function(u,g){return u>>>=0,g||ct(u,8,this.length),Y.read(this,u,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(u,g,I,W){u=+u,g>>>=0,I>>>=0,!W&&i(this,u,g,I,Math.pow(2,8*I)-1,0);let Q=1,St=0;for(this[g]=255&u;++St>>=0,I>>>=0,!W&&i(this,u,g,I,Math.pow(2,8*I)-1,0);let Q=I-1,St=1;for(this[g+Q]=255&u;--Q>=0&&(St*=256);)this[g+Q]=u/St&255;return g+I},p.prototype.writeUint8=p.prototype.writeUInt8=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,1,255,0),this[g]=255&u,g+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,2,65535,0),this[g]=255&u,this[g+1]=u>>>8,g+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,2,65535,0),this[g]=u>>>8,this[g+1]=255&u,g+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,4,4294967295,0),this[g+3]=u>>>24,this[g+2]=u>>>16,this[g+1]=u>>>8,this[g]=255&u,g+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,4,4294967295,0),this[g]=u>>>24,this[g+1]=u>>>16,this[g+2]=u>>>8,this[g+3]=255&u,g+4},p.prototype.writeBigUInt64LE=$t(function(u,g=0){return T(this,u,g,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=$t(function(u,g=0){return N(this,u,g,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(u,g,I,W){if(u=+u,g>>>=0,!W){let U=Math.pow(2,8*I-1);i(this,u,g,I,U-1,-U)}let Q=0,St=1,d=0;for(this[g]=255&u;++Q>>=0,!W){let U=Math.pow(2,8*I-1);i(this,u,g,I,U-1,-U)}let Q=I-1,St=1,d=0;for(this[g+Q]=255&u;--Q>=0&&(St*=256);)u<0&&d===0&&this[g+Q+1]!==0&&(d=1),this[g+Q]=(u/St|0)-d&255;return g+I},p.prototype.writeInt8=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,1,127,-128),u<0&&(u=255+u+1),this[g]=255&u,g+1},p.prototype.writeInt16LE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,2,32767,-32768),this[g]=255&u,this[g+1]=u>>>8,g+2},p.prototype.writeInt16BE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,2,32767,-32768),this[g]=u>>>8,this[g+1]=255&u,g+2},p.prototype.writeInt32LE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,4,2147483647,-2147483648),this[g]=255&u,this[g+1]=u>>>8,this[g+2]=u>>>16,this[g+3]=u>>>24,g+4},p.prototype.writeInt32BE=function(u,g,I){return u=+u,g>>>=0,I||i(this,u,g,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[g]=u>>>24,this[g+1]=u>>>16,this[g+2]=u>>>8,this[g+3]=255&u,g+4},p.prototype.writeBigInt64LE=$t(function(u,g=0){return T(this,u,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=$t(function(u,g=0){return N(this,u,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeFloatLE=function(u,g,I){return dt(this,u,g,!0,I)},p.prototype.writeFloatBE=function(u,g,I){return dt(this,u,g,!1,I)},p.prototype.writeDoubleLE=function(u,g,I){return j(this,u,g,!0,I)},p.prototype.writeDoubleBE=function(u,g,I){return j(this,u,g,!1,I)},p.prototype.copy=function(u,g,I,W){if(!p.isBuffer(u))throw new TypeError("argument should be a Buffer");if(I||(I=0),W||W===0||(W=this.length),g>=u.length&&(g=u.length),g||(g=0),W>0&&W=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),u.length-g>>=0,I=I===void 0?this.length:I>>>0,u||(u=0),typeof u=="number")for(Q=g;Q=W+4;I-=3)g=`_${u.slice(I-3,I)}${g}`;return`${u.slice(0,I)}${g}`}function it(u,g,I,W,Q,St){if(u>I||u3?g===0||g===BigInt(0)?`>= 0${d} and < 2${d} ** ${8*(St+1)}${d}`:`>= -(2${d} ** ${8*(St+1)-1}${d}) and < 2 ** ${8*(St+1)-1}${d}`:`>= ${g}${d} and <= ${I}${d}`,new pt.ERR_OUT_OF_RANGE("value",U,u)}(function(d,U,M){Et(U,"offset"),d[U]!==void 0&&d[U+M]!==void 0||jt(U,d.length-(M+1))})(W,Q,St)}function Et(u,g){if(typeof u!="number")throw new pt.ERR_INVALID_ARG_TYPE(g,"number",u)}function jt(u,g,I){throw Math.floor(u)!==u?(Et(u,I),new pt.ERR_OUT_OF_RANGE(I||"offset","an integer",u)):g<0?new pt.ERR_BUFFER_OUT_OF_BOUNDS:new pt.ERR_OUT_OF_RANGE(I||"offset",`>= ${I?1:0} and <= ${g}`,u)}_t("ERR_BUFFER_OUT_OF_BOUNDS",function(u){return u?`${u} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),_t("ERR_INVALID_ARG_TYPE",function(u,g){return`The "${u}" argument must be of type number. Received type ${typeof g}`},TypeError),_t("ERR_OUT_OF_RANGE",function(u,g,I){let W=`The value of "${u}" is out of range.`,Q=I;return Number.isInteger(I)&&Math.abs(I)>4294967296?Q=ot(String(I)):typeof I=="bigint"&&(Q=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(Q=ot(Q)),Q+="n"),W+=` It must be ${g}. Received ${Q}`,W},RangeError);let et=/[^+/0-9A-Za-z-_]/g;function nt(u,g){let I;g=g||1/0;let W=u.length,Q=null,St=[];for(let d=0;d55295&&I<57344){if(!Q){if(I>56319){(g-=3)>-1&&St.push(239,191,189);continue}if(d+1===W){(g-=3)>-1&&St.push(239,191,189);continue}Q=I;continue}if(I<56320){(g-=3)>-1&&St.push(239,191,189),Q=I;continue}I=65536+(Q-55296<<10|I-56320)}else Q&&(g-=3)>-1&&St.push(239,191,189);if(Q=null,I<128){if((g-=1)<0)break;St.push(I)}else if(I<2048){if((g-=2)<0)break;St.push(I>>6|192,63&I|128)}else if(I<65536){if((g-=3)<0)break;St.push(I>>12|224,I>>6&63|128,63&I|128)}else{if(!(I<1114112))throw new Error("Invalid code point");if((g-=4)<0)break;St.push(I>>18|240,I>>12&63|128,I>>6&63|128,63&I|128)}}return St}function rt(u){return P.toByteArray((function(g){if((g=(g=g.split("=")[0]).trim().replace(et,"")).length<2)return"";for(;g.length%4!=0;)g+="=";return g})(u))}function F(u,g,I,W){let Q;for(Q=0;Q=g.length||Q>=u.length);++Q)g[Q+I]=u[Q];return Q}function lt(u,g){return u instanceof g||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===g.name}function At(u){return u!=u}let Mt=(function(){let u="0123456789abcdef",g=new Array(256);for(let I=0;I<16;++I){let W=16*I;for(let Q=0;Q<16;++Q)g[W+Q]=u[I]+u[Q]}return g})();function $t(u){return typeof BigInt>"u"?de:u}function de(){throw new Error("BigInt not supported")}},8302:(Dt,Ot,B)=>{"use strict";B.d(Ot,{X8:()=>c,cF:()=>v,ns:()=>E,ph:()=>f,pp:()=>R,sU:()=>k});var P=B(8950),Y=B(9138);function a(){var _,m,z=typeof Symbol=="function"?Symbol:{},X=z.iterator||"@@iterator",L=z.toStringTag||"@@toStringTag";function $(i,T,N,K){var dt=T&&T.prototype instanceof xt?T:xt,j=Object.create(dt.prototype);return O(j,"_invoke",(function(pt,_t,ot){var it,Et,jt,et=0,nt=ot||[],rt=!1,F={p:0,n:0,v:_,a:lt,f:lt.bind(_,4),d:function(At,Mt){return it=At,Et=0,jt=_,F.n=Mt,ut}};function lt(At,Mt){for(Et=At,jt=Mt,m=0;!rt&&et&&!$t&&m3?($t=g===Mt)&&(jt=de[(Et=de[4])?5:(Et=3,3)],de[4]=de[5]=_):de[0]<=u&&(($t=At<2&&uMt||Mt>g)&&(de[4]=At,de[5]=Mt,F.n=g,Et=0))}if($t||At>1)return ut;throw rt=!0,Mt}return function(At,Mt,$t){if(et>1)throw TypeError("Generator is already running");for(rt&&Mt===1&<(Mt,$t),Et=Mt,jt=$t;(m=Et<2?_:jt)||!rt;){it||(Et?Et<3?(Et>1&&(F.n=-1),lt(Et,jt)):F.n=jt:F.v=jt);try{if(et=2,it){if(Et||(At="next"),m=it[At]){if(!(m=m.call(it,jt)))throw TypeError("iterator result is not an object");if(!m.done)return m;jt=m.value,Et<2&&(Et=0)}else Et===1&&(m=it.return)&&m.call(it),Et<2&&(jt=TypeError("The iterator does not provide a '"+At+"' method"),Et=1);it=_}else if((m=(rt=F.n<0)?jt:pt.call(_t,F))!==ut)break}catch(de){it=_,Et=1,jt=de}finally{et=1}}return{value:m,done:rt}}})(i,N,K),!0),j}var ut={};function xt(){}function vt(){}function Zt(){}m=Object.getPrototypeOf;var Bt=[][X]?m(m([][X]())):(O(m={},X,function(){return this}),m),q=Zt.prototype=xt.prototype=Object.create(Bt);function ct(i){return Object.setPrototypeOf?Object.setPrototypeOf(i,Zt):(i.__proto__=Zt,O(i,L,"GeneratorFunction")),i.prototype=Object.create(q),i}return vt.prototype=Zt,O(q,"constructor",Zt),O(Zt,"constructor",vt),vt.displayName="GeneratorFunction",O(Zt,L,"GeneratorFunction"),O(q),O(q,L,"Generator"),O(q,X,function(){return this}),O(q,"toString",function(){return"[object Generator]"}),(a=function(){return{w:$,m:ct}})()}function O(_,m,z,X){var L=Object.defineProperty;try{L({},"",{})}catch{L=0}O=function($,ut,xt,vt){function Zt(Bt,q){O($,Bt,function(ct){return this._invoke(Bt,q,ct)})}ut?L?L($,ut,{value:xt,enumerable:!vt,configurable:!vt,writable:!vt}):$[ut]=xt:(Zt("next",0),Zt("throw",1),Zt("return",2))},O(_,m,z,X)}function w(_){return(function(m){if(Array.isArray(m))return p(m)})(_)||(function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)})(_)||(function(m,z){if(m){if(typeof m=="string")return p(m,z);var X={}.toString.call(m).slice(8,-1);return X==="Object"&&m.constructor&&(X=m.constructor.name),X==="Map"||X==="Set"?Array.from(m):X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X)?p(m,z):void 0}})(_)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function p(_,m){(m==null||m>_.length)&&(m=_.length);for(var z=0,X=Array(m);z3&&i[3]!==void 0?i[3]:1.5,$=i.length>4&&i[4]!==void 0&&i[4],xt=0,q=ut=[],T.n=1,m();case 1:if(q.push.call(q,T.v),z(ut[ut.length-1])){T.n=2;break}return T.a(2,ut);case 2:vt=new Date(Date.now()+1e3*X).valueOf(),Bt=Zt=1e3;case 3:if(!(Date.now()vt&&(Zt=vt-Date.now(),$&&console.info("was gonna wait too long; new waitTime: ".concat(Zt,"ms"))),Bt=Zt+Bt,ct=ut,T.n=5,m(ut[ut.length-1]);case 5:ct.push.call(ct,T.v),$&&z(ut[ut.length-1])&&console.info("".concat(xt,". Called ").concat(m,"; ").concat(ut.length," prev attempts. Most recent: ").concat(JSON.stringify(ut[ut.length-1],null,2))),T.n=3;break;case 6:return T.a(2,ut)}},_)})),l.apply(this,arguments)}var c=/Error\(Contract, #(\d+)\)/;function R(_){return S(_)==="object"&&_!==null&&"toString"in _}function f(_){var m=new Map,z=_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength),X=0,L=function(i){if(X+i>_.byteLength)throw new Error("Buffer overflow");var T=new Uint8Array(z,X,i);return X+=i,T};function $(){for(var i=0,T=0;;){var N=L(1)[0];if(i|=(127&N)<=32)throw new Error("Invalid WASM value")}return i>>>0}if(w(L(4)).join()!=="0,97,115,109")throw new Error("Invalid WASM magic");if(w(L(4)).join()!=="1,0,0,0")throw new Error("Invalid WASM version");for(;X<_.byteLength;){var ut=L(1)[0],xt=$(),vt=X;if(ut===0){var Zt=$();if(Zt===0||X+Zt>vt+xt)continue;var Bt=L(Zt),q=L(xt-(X-vt));try{var ct=new TextDecoder("utf-8",{fatal:!0}).decode(Bt);q.length>0&&m.set(ct,(m.get(ct)||[]).concat(q))}catch{}}else X+=xt}return m}function E(_){for(var m=new P.cereal.XdrReader(_),z=[];!m.eof;)z.push(P.xdr.ScSpecEntry.read(m));return z}function k(_,m){return y.apply(this,arguments)}function y(){return(y=A(a().m(function _(m,z){return a().w(function(X){for(;;)if(X.n===0)return X.a(2,m.publicKey?z.getAccount(m.publicKey):new P.Account(Y.u,"0"))},_)}))).apply(this,arguments)}},8399:(Dt,Ot,B)=>{(Ot=Dt.exports=B(5412)).Stream=Ot,Ot.Readable=Ot,Ot.Writable=B(6708),Ot.Duplex=B(5382),Ot.Transform=B(4610),Ot.PassThrough=B(3600),Ot.finished=B(6238),Ot.pipeline=B(7758)},8451:(Dt,Ot,B)=>{"use strict";B.d(Ot,{U:()=>a});var P=B(8302),Y=B(8287).Buffer;function a(O){var w=(0,P.ph)(O).get("contractspecv0");if(!w||w.length===0)throw new Error("Could not obtain contract spec from wasm");return Y.from(w[0])}},8636:(Dt,Ot,B)=>{"use strict";var P=B(920),Y=B(7720),a=B(4765),O=Object.prototype.hasOwnProperty,w={brackets:function(f){return f+"[]"},comma:"comma",indices:function(f,E){return f+"["+E+"]"},repeat:function(f){return f}},p=Array.isArray,S=Array.prototype.push,o=function(f,E){S.apply(f,p(E)?E:[E])},A=Date.prototype.toISOString,v=a.default,l={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Y.encode,encodeValuesOnly:!1,filter:void 0,format:v,formatter:a.formatters[v],indices:!1,serializeDate:function(f){return A.call(f)},skipNulls:!1,strictNullHandling:!1},c={},R=function f(E,k,y,_,m,z,X,L,$,ut,xt,vt,Zt,Bt,q,ct,i,T){for(var N,K=E,dt=T,j=0,pt=!1;(dt=dt.get(c))!==void 0&&!pt;){var _t=dt.get(E);if(j+=1,_t!==void 0){if(_t===j)throw new RangeError("Cyclic object value");pt=!0}dt.get(c)===void 0&&(j=0)}if(typeof ut=="function"?K=ut(k,K):K instanceof Date?K=Zt(K):y==="comma"&&p(K)&&(K=Y.maybeMap(K,function($t){return $t instanceof Date?Zt($t):$t})),K===null){if(z)return $&&!ct?$(k,l.encoder,i,"key",Bt):k;K=""}if(typeof(N=K)=="string"||typeof N=="number"||typeof N=="boolean"||typeof N=="symbol"||typeof N=="bigint"||Y.isBuffer(K))return $?[q(ct?k:$(k,l.encoder,i,"key",Bt))+"="+q($(K,l.encoder,i,"value",Bt))]:[q(k)+"="+q(String(K))];var ot,it=[];if(K===void 0)return it;if(y==="comma"&&p(K))ct&&$&&(K=Y.maybeMap(K,$)),ot=[{value:K.length>0?K.join(",")||null:void 0}];else if(p(ut))ot=ut;else{var Et=Object.keys(K);ot=xt?Et.sort(xt):Et}var jt=L?String(k).replace(/\./g,"%2E"):String(k),et=_&&p(K)&&K.length===1?jt+"[]":jt;if(m&&p(K)&&K.length===0)return et+"[]";for(var nt=0;nt0?Zt+vt:""}},8648:Dt=>{"use strict";Dt.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null},8680:(Dt,Ot,B)=>{"use strict";B.d(Ot,{X:()=>O});var P=B(8950),Y=B(4076),a=B(784);function O(w,p){if("innerTransaction"in w)return O(w.innerTransaction,p);if(!(function(f){if(f.operations.length!==1)return!1;switch(f.operations[0].type){case"invokeHostFunction":case"extendFootprintTtl":case"restoreFootprint":return!0;default:return!1}})(w))throw new TypeError("unsupported transaction: must contain exactly one invokeHostFunction, extendFootprintTtl, or restoreFootprint operation");var S=(0,a.jr)(p);if(!Y.j.isSimulationSuccess(S))throw new Error("simulation incorrect: ".concat(JSON.stringify(S)));var o=parseInt(w.fee)||0,A=parseInt(S.minResourceFee)||0,v=P.TransactionBuilder.cloneFrom(w,{fee:(o+A).toString(),sorobanData:S.transactionData.build(),networkPassphrase:w.networkPassphrase});if(w.operations[0].type==="invokeHostFunction"){var l;v.clearOperations();var c=w.operations[0],R=(l=c.auth)!==null&&l!==void 0?l:[];v.addOperation(P.Operation.invokeHostFunction({source:c.source,func:c.func,auth:R.length>0?R:S.result.auth}))}return v}},8732:(Dt,Ot,B)=>{"use strict";function P(R){return P=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},P(R)}function Y(R,f){for(var E=0;Ec});var S,o,A,v={allowHttp:!1,timeout:0},l=O({},v),c=(S=function R(){(function(f,E){if(!(f instanceof E))throw new TypeError("Cannot call a class as a function")})(this,R)},A=[{key:"setAllowHttp",value:function(R){l.allowHttp=R}},{key:"setTimeout",value:function(R){l.timeout=R}},{key:"isAllowHttp",value:function(){return l.allowHttp}},{key:"getTimeout",value:function(){return l.timeout}},{key:"setDefault",value:function(){l=O({},v)}}],(o=null)&&Y(S.prototype,o),A&&Y(S,A),Object.defineProperty(S,"prototype",{writable:!1}),S)},8733:(Dt,Ot,B)=>{"use strict";var P;B.r(Ot),B.d(Ot,{AccountResponse:()=>f,HorizonApi:()=>P,SERVER_TIME_MAP:()=>F,Server:()=>Ci,ServerApi:()=>a,default:()=>di,getCurrentServerTime:()=>At}),(function(H){var b=(function(yt){return yt.constantProduct="constant_product",yt})({});H.LiquidityPoolType=b;var h=(function(yt){return yt.createAccount="create_account",yt.payment="payment",yt.pathPayment="path_payment_strict_receive",yt.createPassiveOffer="create_passive_sell_offer",yt.manageOffer="manage_sell_offer",yt.setOptions="set_options",yt.changeTrust="change_trust",yt.allowTrust="allow_trust",yt.accountMerge="account_merge",yt.inflation="inflation",yt.manageData="manage_data",yt.bumpSequence="bump_sequence",yt.manageBuyOffer="manage_buy_offer",yt.pathPaymentStrictSend="path_payment_strict_send",yt.createClaimableBalance="create_claimable_balance",yt.claimClaimableBalance="claim_claimable_balance",yt.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",yt.endSponsoringFutureReserves="end_sponsoring_future_reserves",yt.revokeSponsorship="revoke_sponsorship",yt.clawback="clawback",yt.clawbackClaimableBalance="clawback_claimable_balance",yt.setTrustLineFlags="set_trust_line_flags",yt.liquidityPoolDeposit="liquidity_pool_deposit",yt.liquidityPoolWithdraw="liquidity_pool_withdraw",yt.invokeHostFunction="invoke_host_function",yt.bumpFootprintExpiration="bump_footprint_expiration",yt.restoreFootprint="restore_footprint",yt})({});H.OperationResponseType=h;var C=(function(yt){return yt[yt.createAccount=0]="createAccount",yt[yt.payment=1]="payment",yt[yt.pathPayment=2]="pathPayment",yt[yt.createPassiveOffer=3]="createPassiveOffer",yt[yt.manageOffer=4]="manageOffer",yt[yt.setOptions=5]="setOptions",yt[yt.changeTrust=6]="changeTrust",yt[yt.allowTrust=7]="allowTrust",yt[yt.accountMerge=8]="accountMerge",yt[yt.inflation=9]="inflation",yt[yt.manageData=10]="manageData",yt[yt.bumpSequence=11]="bumpSequence",yt[yt.manageBuyOffer=12]="manageBuyOffer",yt[yt.pathPaymentStrictSend=13]="pathPaymentStrictSend",yt[yt.createClaimableBalance=14]="createClaimableBalance",yt[yt.claimClaimableBalance=15]="claimClaimableBalance",yt[yt.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",yt[yt.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",yt[yt.revokeSponsorship=18]="revokeSponsorship",yt[yt.clawback=19]="clawback",yt[yt.clawbackClaimableBalance=20]="clawbackClaimableBalance",yt[yt.setTrustLineFlags=21]="setTrustLineFlags",yt[yt.liquidityPoolDeposit=22]="liquidityPoolDeposit",yt[yt.liquidityPoolWithdraw=23]="liquidityPoolWithdraw",yt[yt.invokeHostFunction=24]="invokeHostFunction",yt[yt.bumpFootprintExpiration=25]="bumpFootprintExpiration",yt[yt.restoreFootprint=26]="restoreFootprint",yt})({});H.OperationResponseTypeI=C;var st=(function(yt){return yt.TX_FAILED="tx_failed",yt.TX_BAD_SEQ="tx_bad_seq",yt.TX_BAD_AUTH="tx_bad_auth",yt.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra",yt.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",yt.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",yt.TX_NOT_SUPPORTED="tx_not_supported",yt.TX_SUCCESS="tx_success",yt.TX_TOO_EARLY="tx_too_early",yt.TX_TOO_LATE="tx_too_late",yt.TX_MISSING_OPERATION="tx_missing_operation",yt.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",yt.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",yt.TX_INSUFFICIENT_FEE="tx_insufficient_fee",yt.TX_INTERNAL_ERROR="tx_internal_error",yt})({});H.TransactionFailedResultCodes=st})(P||(P={}));var Y,a,O=((Y={})[Y.account_created=0]="account_created",Y[Y.account_removed=1]="account_removed",Y[Y.account_credited=2]="account_credited",Y[Y.account_debited=3]="account_debited",Y[Y.account_thresholds_updated=4]="account_thresholds_updated",Y[Y.account_home_domain_updated=5]="account_home_domain_updated",Y[Y.account_flags_updated=6]="account_flags_updated",Y[Y.account_inflation_destination_updated=7]="account_inflation_destination_updated",Y[Y.signer_created=10]="signer_created",Y[Y.signer_removed=11]="signer_removed",Y[Y.signer_updated=12]="signer_updated",Y[Y.trustline_created=20]="trustline_created",Y[Y.trustline_removed=21]="trustline_removed",Y[Y.trustline_updated=22]="trustline_updated",Y[Y.trustline_authorized=23]="trustline_authorized",Y[Y.trustline_deauthorized=24]="trustline_deauthorized",Y[Y.trustline_authorized_to_maintain_liabilities=25]="trustline_authorized_to_maintain_liabilities",Y[Y.trustline_flags_updated=26]="trustline_flags_updated",Y[Y.offer_created=30]="offer_created",Y[Y.offer_removed=31]="offer_removed",Y[Y.offer_updated=32]="offer_updated",Y[Y.trade=33]="trade",Y[Y.data_created=40]="data_created",Y[Y.data_removed=41]="data_removed",Y[Y.data_updated=42]="data_updated",Y[Y.sequence_bumped=43]="sequence_bumped",Y[Y.claimable_balance_created=50]="claimable_balance_created",Y[Y.claimable_balance_claimant_created=51]="claimable_balance_claimant_created",Y[Y.claimable_balance_claimed=52]="claimable_balance_claimed",Y[Y.account_sponsorship_created=60]="account_sponsorship_created",Y[Y.account_sponsorship_updated=61]="account_sponsorship_updated",Y[Y.account_sponsorship_removed=62]="account_sponsorship_removed",Y[Y.trustline_sponsorship_created=63]="trustline_sponsorship_created",Y[Y.trustline_sponsorship_updated=64]="trustline_sponsorship_updated",Y[Y.trustline_sponsorship_removed=65]="trustline_sponsorship_removed",Y[Y.data_sponsorship_created=66]="data_sponsorship_created",Y[Y.data_sponsorship_updated=67]="data_sponsorship_updated",Y[Y.data_sponsorship_removed=68]="data_sponsorship_removed",Y[Y.claimable_balance_sponsorship_created=69]="claimable_balance_sponsorship_created",Y[Y.claimable_balance_sponsorship_updated=70]="claimable_balance_sponsorship_updated",Y[Y.claimable_balance_sponsorship_removed=71]="claimable_balance_sponsorship_removed",Y[Y.signer_sponsorship_created=72]="signer_sponsorship_created",Y[Y.signer_sponsorship_updated=73]="signer_sponsorship_updated",Y[Y.signer_sponsorship_removed=74]="signer_sponsorship_removed",Y[Y.claimable_balance_clawed_back=80]="claimable_balance_clawed_back",Y[Y.liquidity_pool_deposited=90]="liquidity_pool_deposited",Y[Y.liquidity_pool_withdrew=91]="liquidity_pool_withdrew",Y[Y.liquidity_pool_trade=92]="liquidity_pool_trade",Y[Y.liquidity_pool_created=93]="liquidity_pool_created",Y[Y.liquidity_pool_removed=94]="liquidity_pool_removed",Y[Y.liquidity_pool_revoked=95]="liquidity_pool_revoked",Y[Y.contract_credited=96]="contract_credited",Y[Y.contract_debited=97]="contract_debited",Y);(function(H){H.EffectType=O;var b=(function(h){return h.all="all",h.liquidityPools="liquidity_pool",h.orderbook="orderbook",h})({});H.TradeType=b,P.OperationResponseType,P.OperationResponseTypeI})(a||(a={}));var w=B(8950);function p(H){return p=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},p(H)}function S(H,b){return(function(h){if(Array.isArray(h))return h})(H)||(function(h,C){var st=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(st!=null){var yt,Ye,Ke,ir,Tr=[],Lr=!0,Yr=!1;try{if(Ke=(st=st.call(h)).next,C===0){if(Object(st)!==st)return;Lr=!1}else for(;!(Lr=(yt=Ke.call(st)).done)&&(Tr.push(yt.value),Tr.length!==C);Lr=!0);}catch(kr){Yr=!0,Ye=kr}finally{try{if(!Lr&&st.return!=null&&(ir=st.return(),Object(ir)!==ir))return}finally{if(Yr)throw Ye}}return Tr}})(H,b)||(function(h,C){if(h){if(typeof h=="string")return o(h,C);var st={}.toString.call(h).slice(8,-1);return st==="Object"&&h.constructor&&(st=h.constructor.name),st==="Map"||st==="Set"?Array.from(h):st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st)?o(h,C):void 0}})(H,b)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function o(H,b){(b==null||b>H.length)&&(b=H.length);for(var h=0,C=Array(b);h0||H===b?b:b-1}function Zt(H){for(var b,h,C=1,st=H.length,yt=H[0]+"";CTr^h?1:-1;for(Ke=(ir=st.length)<(Tr=yt.length)?ir:Tr,Ye=0;Yeyt[Ye]^h?1:-1;return ir==Tr?0:ir>Tr^h?1:-1}function q(H,b,h,C){if(Hh||H!==y(H))throw Error(_+(C||"Argument")+(typeof H=="number"?Hh?" out of range: ":" not an integer: ":" not a primitive number: ")+String(H))}function ct(H){var b=H.c.length-1;return vt(H.e/X)==b&&H.c[b]%2!=0}function i(H,b){return(H.length>1?H.charAt(0)+"."+H.slice(1):H)+(b<0?"e":"e+")+b}function T(H,b,h){var C,st;if(b<0){for(st=h+".";++b;st+=h);H=st+H}else if(++b>(C=H.length)){for(st=h,b-=C;--b;st+=h);H+=st}else bBn?Le.c=Le.e=null:Ct.e=10;Ie/=10,Ae++);return void(Ae>Bn?Le.c=Le.e=null:(Le.e=Ae,Le.c=[Ct]))}Qe=String(Ct)}else{if(!E.test(Qe=String(Ct)))return st(Le,Qe,Te);Le.s=Qe.charCodeAt(0)==45?(Qe=Qe.slice(1),-1):1}(Ae=Qe.indexOf("."))>-1&&(Qe=Qe.replace(".","")),(Ie=Qe.search(/e/i))>0?(Ae<0&&(Ae=Ie),Ae+=+Qe.slice(Ie+1),Qe=Qe.substring(0,Ie)):Ae<0&&(Ae=Qe.length)}else{if(q(Ht,2,on.length,"Base"),Ht==10&&eo)return fn(Le=new lr(Ct),Mn+Le.e+1,Ln);if(Qe=String(Ct),Te=typeof Ct=="number"){if(0*Ct!=0)return st(Le,Qe,Te,Ht);if(Le.s=1/Ct<0?(Qe=Qe.slice(1),-1):1,lr.DEBUG&&Qe.replace(/^0\.0*|\./,"").length>15)throw Error(m+Ct)}else Le.s=Qe.charCodeAt(0)===45?(Qe=Qe.slice(1),-1):1;for(fe=on.slice(0,Ht),Ae=Ie=0,Me=Qe.length;IeAe){Ae=Me;continue}}else if(!ve&&(Qe==Qe.toUpperCase()&&(Qe=Qe.toLowerCase())||Qe==Qe.toLowerCase()&&(Qe=Qe.toUpperCase()))){ve=!0,Ie=-1,Ae=0;continue}return st(Le,String(Ct),Te,Ht)}Te=!1,(Ae=(Qe=C(Qe,Ht,10,Le.s)).indexOf("."))>-1?Qe=Qe.replace(".",""):Ae=Qe.length}for(Ie=0;Qe.charCodeAt(Ie)===48;Ie++);for(Me=Qe.length;Qe.charCodeAt(--Me)===48;);if(Qe=Qe.slice(Ie,++Me)){if(Me-=Ie,Te&&lr.DEBUG&&Me>15&&(Ct>L||Ct!==y(Ct)))throw Error(m+Le.s*Ct);if((Ae=Ae-Ie-1)>Bn)Le.c=Le.e=null;else if(Ae=vo)?i(Me,Ie):T(Me,Ie,"0");else if(Ae=(Ct=fn(new lr(Ct),Ht,fe)).e,Te=(Me=Zt(Ct.c)).length,je==1||je==2&&(Ht<=Ae||Ae<=go)){for(;TeIe),Me=T(Me,Ae,"0"),Ae+1>Te){if(--Ht>0)for(Me+=".";Ht--;Me+="0");}else if((Ht+=Ae-Te)>0)for(Ae+1==Te&&(Me+=".");Ht--;Me+="0");return Ct.s<0&&ve?"-"+Me:Me}function xn(Ct,Ht){for(var fe,je,ve=1,Ae=new lr(Ct[0]);ve=10;ve/=10,je++);return(fe=je+fe*X-1)>Bn?Ct.c=Ct.e=null:fe=10;Te/=10,ve++);if((Ae=Ht-ve)<0)Ae+=X,Ie=Ht,Me=Ir[Qe=0],Le=y(Me/qr[ve-Ie-1]%10);else if((Qe=k((Ae+1)/X))>=Ir.length){if(!je)break t;for(;Ir.length<=Qe;Ir.push(0));Me=Le=0,ve=1,Ie=(Ae%=X)-X+1}else{for(Me=Te=Ir[Qe],ve=1;Te>=10;Te/=10,ve++);Le=(Ie=(Ae%=X)-X+ve)<0?0:y(Me/qr[ve-Ie-1]%10)}if(je=je||Ht<0||Ir[Qe+1]!=null||(Ie<0?Me:Me%qr[ve-Ie-1]),je=fe<4?(Le||je)&&(fe==0||fe==(Ct.s<0?3:2)):Le>5||Le==5&&(fe==4||je||fe==6&&(Ae>0?Ie>0?Me/qr[ve-Ie]:0:Ir[Qe-1])%10&1||fe==(Ct.s<0?8:7)),Ht<1||!Ir[0])return Ir.length=0,je?(Ht-=Ct.e+1,Ir[0]=qr[(X-Ht%X)%X],Ct.e=-Ht||0):Ir[0]=Ct.e=0,Ct;if(Ae==0?(Ir.length=Qe,Te=1,Qe--):(Ir.length=Qe+1,Te=qr[X-Ae],Ir[Qe]=Ie>0?y(Me/qr[ve-Ie]%qr[Ie])*Te:0),je)for(;;){if(Qe==0){for(Ae=1,Ie=Ir[0];Ie>=10;Ie/=10,Ae++);for(Ie=Ir[0]+=Te,Te=1;Ie>=10;Ie/=10,Te++);Ae!=Te&&(Ct.e++,Ir[0]==z&&(Ir[0]=1));break}if(Ir[Qe]+=Te,Ir[Qe]!=z)break;Ir[Qe--]=0,Te=1}for(Ae=Ir.length;Ir[--Ae]===0;Ir.pop());}Ct.e>Bn?Ct.c=Ct.e=null:Ct.e=vo?i(Ht,fe):T(Ht,fe,"0"),Ct.s<0?"-"+Ht:Ht)}return lr.clone=H,lr.ROUND_UP=0,lr.ROUND_DOWN=1,lr.ROUND_CEIL=2,lr.ROUND_FLOOR=3,lr.ROUND_HALF_UP=4,lr.ROUND_HALF_DOWN=5,lr.ROUND_HALF_EVEN=6,lr.ROUND_HALF_CEIL=7,lr.ROUND_HALF_FLOOR=8,lr.EUCLID=9,lr.config=lr.set=function(Ct){var Ht,fe;if(Ct!=null){if(typeof Ct!="object")throw Error(_+"Object expected: "+Ct);if(Ct.hasOwnProperty(Ht="DECIMAL_PLACES")&&(q(fe=Ct[Ht],0,xt,Ht),Mn=fe),Ct.hasOwnProperty(Ht="ROUNDING_MODE")&&(q(fe=Ct[Ht],0,8,Ht),Ln=fe),Ct.hasOwnProperty(Ht="EXPONENTIAL_AT")&&((fe=Ct[Ht])&&fe.pop?(q(fe[0],-xt,0,Ht),q(fe[1],0,xt,Ht),go=fe[0],vo=fe[1]):(q(fe,-xt,xt,Ht),go=-(vo=fe<0?-fe:fe))),Ct.hasOwnProperty(Ht="RANGE"))if((fe=Ct[Ht])&&fe.pop)q(fe[0],-xt,-1,Ht),q(fe[1],1,xt,Ht),Fr=fe[0],Bn=fe[1];else{if(q(fe,-xt,xt,Ht),!fe)throw Error(_+Ht+" cannot be zero: "+fe);Fr=-(Bn=fe<0?-fe:fe)}if(Ct.hasOwnProperty(Ht="CRYPTO")){if((fe=Ct[Ht])!==!!fe)throw Error(_+Ht+" not true or false: "+fe);if(fe){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw uo=!fe,Error(_+"crypto unavailable");uo=fe}else uo=fe}if(Ct.hasOwnProperty(Ht="MODULO_MODE")&&(q(fe=Ct[Ht],0,9,Ht),to=fe),Ct.hasOwnProperty(Ht="POW_PRECISION")&&(q(fe=Ct[Ht],0,xt,Ht),gn=fe),Ct.hasOwnProperty(Ht="FORMAT")){if(typeof(fe=Ct[Ht])!="object")throw Error(_+Ht+" not an object: "+fe);$r=fe}if(Ct.hasOwnProperty(Ht="ALPHABET")){if(typeof(fe=Ct[Ht])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(fe))throw Error(_+Ht+" invalid: "+fe);eo=fe.slice(0,10)=="0123456789",on=fe}}return{DECIMAL_PLACES:Mn,ROUNDING_MODE:Ln,EXPONENTIAL_AT:[go,vo],RANGE:[Fr,Bn],CRYPTO:uo,MODULO_MODE:to,POW_PRECISION:gn,FORMAT:$r,ALPHABET:on}},lr.isBigNumber=function(Ct){if(!Ct||Ct._isBigNumber!==!0)return!1;if(!lr.DEBUG)return!0;var Ht,fe,je=Ct.c,ve=Ct.e,Ae=Ct.s;t:if({}.toString.call(je)=="[object Array]"){if((Ae===1||Ae===-1)&&ve>=-xt&&ve<=xt&&ve===y(ve)){if(je[0]===0){if(ve===0&&je.length===1)return!0;break t}if((Ht=(ve+1)%X)<1&&(Ht+=X),String(je[0]).length==Ht){for(Ht=0;Ht=z||fe!==y(fe))break t;if(fe!==0)return!0}}}else if(je===null&&ve===null&&(Ae===null||Ae===1||Ae===-1))return!0;throw Error(_+"Invalid BigNumber: "+Ct)},lr.maximum=lr.max=function(){return xn(arguments,-1)},lr.minimum=lr.min=function(){return xn(arguments,1)},lr.random=(yt=9007199254740992,Ye=Math.random()*yt&2097151?function(){return y(Math.random()*yt)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(Ct){var Ht,fe,je,ve,Ae,Ie=0,Te=[],Me=new lr(In);if(Ct==null?Ct=Mn:q(Ct,0,xt),ve=k(Ct/X),uo)if(crypto.getRandomValues){for(Ht=crypto.getRandomValues(new Uint32Array(ve*=2));Ie>>11))>=9e15?(fe=crypto.getRandomValues(new Uint32Array(2)),Ht[Ie]=fe[0],Ht[Ie+1]=fe[1]):(Te.push(Ae%1e14),Ie+=2);Ie=ve/2}else{if(!crypto.randomBytes)throw uo=!1,Error(_+"crypto unavailable");for(Ht=crypto.randomBytes(ve*=7);Ie=9e15?crypto.randomBytes(7).copy(Ht,Ie):(Te.push(Ae%1e14),Ie+=7);Ie=ve/7}if(!uo)for(;Ie=10;Ae/=10,Ie++);Ieve-1&&(Me[Ie+1]==null&&(Me[Ie+1]=0),Me[Ie+1]+=Me[Ie]/ve|0,Me[Ie]%=ve)}return Me.reverse()}return function(fe,je,ve,Ae,Ie){var Te,Me,Qe,Le,Ir,qr,Kr,vn,zn=fe.indexOf("."),Wn=Mn,An=Ln;for(zn>=0&&(Le=gn,gn=0,fe=fe.replace(".",""),qr=(vn=new lr(je)).pow(fe.length-zn),gn=Le,vn.c=Ht(T(Zt(qr.c),qr.e,"0"),10,ve,Ct),vn.e=vn.c.length),Qe=Le=(Kr=Ht(fe,je,ve,Ie?(Te=on,Ct):(Te=Ct,on))).length;Kr[--Le]==0;Kr.pop());if(!Kr[0])return Te.charAt(0);if(zn<0?--Qe:(qr.c=Kr,qr.e=Qe,qr.s=Ae,Kr=(qr=h(qr,vn,Wn,An,ve)).c,Ir=qr.r,Qe=qr.e),zn=Kr[Me=Qe+Wn+1],Le=ve/2,Ir=Ir||Me<0||Kr[Me+1]!=null,Ir=An<4?(zn!=null||Ir)&&(An==0||An==(qr.s<0?3:2)):zn>Le||zn==Le&&(An==4||Ir||An==6&&1&Kr[Me-1]||An==(qr.s<0?8:7)),Me<1||!Kr[0])fe=Ir?T(Te.charAt(1),-Wn,Te.charAt(0)):Te.charAt(0);else{if(Kr.length=Me,Ir)for(--ve;++Kr[--Me]>ve;)Kr[Me]=0,Me||(++Qe,Kr=[1].concat(Kr));for(Le=Kr.length;!Kr[--Le];);for(zn=0,fe="";zn<=Le;fe+=Te.charAt(Kr[zn++]));fe=T(fe,Qe,Te.charAt(0))}return fe}})(),h=(function(){function Ct(je,ve,Ae){var Ie,Te,Me,Qe,Le=0,Ir=je.length,qr=ve%ut,Kr=ve/ut|0;for(je=je.slice();Ir--;)Le=((Te=qr*(Me=je[Ir]%ut)+(Ie=Kr*Me+(Qe=je[Ir]/ut|0)*qr)%ut*ut+Le)/Ae|0)+(Ie/ut|0)+Kr*Qe,je[Ir]=Te%Ae;return Le&&(je=[Le].concat(je)),je}function Ht(je,ve,Ae,Ie){var Te,Me;if(Ae!=Ie)Me=Ae>Ie?1:-1;else for(Te=Me=0;Teve[Te]?1:-1;break}return Me}function fe(je,ve,Ae,Ie){for(var Te=0;Ae--;)je[Ae]-=Te,Te=je[Ae]1;je.splice(0,1));}return function(je,ve,Ae,Ie,Te){var Me,Qe,Le,Ir,qr,Kr,vn,zn,Wn,An,jn,ho,Qo,hi,Ai,qo,Yo,Uo=je.s==ve.s?1:-1,Oo=je.c,qn=ve.c;if(!(Oo&&Oo[0]&&qn&&qn[0]))return new lr(je.s&&ve.s&&(Oo?!qn||Oo[0]!=qn[0]:qn)?Oo&&Oo[0]==0||!qn?0*Uo:Uo/0:NaN);for(Wn=(zn=new lr(Uo)).c=[],Uo=Ae+(Qe=je.e-ve.e)+1,Te||(Te=z,Qe=vt(je.e/X)-vt(ve.e/X),Uo=Uo/X|0),Le=0;qn[Le]==(Oo[Le]||0);Le++);if(qn[Le]>(Oo[Le]||0)&&Qe--,Uo<0)Wn.push(1),Ir=!0;else{for(hi=Oo.length,qo=qn.length,Le=0,Uo+=2,(qr=y(Te/(qn[0]+1)))>1&&(qn=Ct(qn,qr,Te),Oo=Ct(Oo,qr,Te),qo=qn.length,hi=Oo.length),Qo=qo,jn=(An=Oo.slice(0,qo)).length;jn=Te/2&&Ai++;do{if(qr=0,(Me=Ht(qn,An,qo,jn))<0){if(ho=An[0],qo!=jn&&(ho=ho*Te+(An[1]||0)),(qr=y(ho/Ai))>1)for(qr>=Te&&(qr=Te-1),vn=(Kr=Ct(qn,qr,Te)).length,jn=An.length;Ht(Kr,An,vn,jn)==1;)qr--,fe(Kr,qo=10;Uo/=10,Le++);fn(zn,Ae+(zn.e=Le+Qe*X-1)+1,Ie,Ir)}else zn.e=Qe,zn.r=+Ir;return zn}})(),Ke=/^(-?)0([xbo])(?=\w[\w.]*$)/i,ir=/^([^.]+)\.$/,Tr=/^\.([^.]+)$/,Lr=/^-?(Infinity|NaN)$/,Yr=/^\s*\+(?=[\w.])|^\s+|\s+$/g,st=function(Ct,Ht,fe,je){var ve,Ae=fe?Ht:Ht.replace(Yr,"");if(Lr.test(Ae))Ct.s=isNaN(Ae)?null:Ae<0?-1:1;else{if(!fe&&(Ae=Ae.replace(Ke,function(Ie,Te,Me){return ve=(Me=Me.toLowerCase())=="x"?16:Me=="b"?2:8,je&&je!=ve?Ie:Te}),je&&(ve=je,Ae=Ae.replace(ir,"$1").replace(Tr,"0.$1")),Ht!=Ae))return new lr(Ae,ve);if(lr.DEBUG)throw Error(_+"Not a"+(je?" base "+je:"")+" number: "+Ht);Ct.s=null}Ct.c=Ct.e=null},kr.absoluteValue=kr.abs=function(){var Ct=new lr(this);return Ct.s<0&&(Ct.s=1),Ct},kr.comparedTo=function(Ct,Ht){return Bt(this,new lr(Ct,Ht))},kr.decimalPlaces=kr.dp=function(Ct,Ht){var fe,je,ve,Ae=this;if(Ct!=null)return q(Ct,0,xt),Ht==null?Ht=Ln:q(Ht,0,8),fn(new lr(Ae),Ct+Ae.e+1,Ht);if(!(fe=Ae.c))return null;if(je=((ve=fe.length-1)-vt(this.e/X))*X,ve=fe[ve])for(;ve%10==0;ve/=10,je--);return je<0&&(je=0),je},kr.dividedBy=kr.div=function(Ct,Ht){return h(this,new lr(Ct,Ht),Mn,Ln)},kr.dividedToIntegerBy=kr.idiv=function(Ct,Ht){return h(this,new lr(Ct,Ht),0,1)},kr.exponentiatedBy=kr.pow=function(Ct,Ht){var fe,je,ve,Ae,Ie,Te,Me,Qe,Le=this;if((Ct=new lr(Ct)).c&&!Ct.isInteger())throw Error(_+"Exponent not an integer: "+an(Ct));if(Ht!=null&&(Ht=new lr(Ht)),Ie=Ct.e>14,!Le.c||!Le.c[0]||Le.c[0]==1&&!Le.e&&Le.c.length==1||!Ct.c||!Ct.c[0])return Qe=new lr(Math.pow(+an(Le),Ie?Ct.s*(2-ct(Ct)):+an(Ct))),Ht?Qe.mod(Ht):Qe;if(Te=Ct.s<0,Ht){if(Ht.c?!Ht.c[0]:!Ht.s)return new lr(NaN);(je=!Te&&Le.isInteger()&&Ht.isInteger())&&(Le=Le.mod(Ht))}else{if(Ct.e>9&&(Le.e>0||Le.e<-1||(Le.e==0?Le.c[0]>1||Ie&&Le.c[1]>=24e7:Le.c[0]<8e13||Ie&&Le.c[0]<=9999975e7)))return Ae=Le.s<0&&ct(Ct)?-0:0,Le.e>-1&&(Ae=1/Ae),new lr(Te?1/Ae:Ae);gn&&(Ae=k(gn/X+2))}for(Ie?(fe=new lr(.5),Te&&(Ct.s=1),Me=ct(Ct)):Me=(ve=Math.abs(+an(Ct)))%2,Qe=new lr(In);;){if(Me){if(!(Qe=Qe.times(Le)).c)break;Ae?Qe.c.length>Ae&&(Qe.c.length=Ae):je&&(Qe=Qe.mod(Ht))}if(ve){if((ve=y(ve/2))===0)break;Me=ve%2}else if(fn(Ct=Ct.times(fe),Ct.e+1,1),Ct.e>14)Me=ct(Ct);else{if((ve=+an(Ct))==0)break;Me=ve%2}Le=Le.times(Le),Ae?Le.c&&Le.c.length>Ae&&(Le.c.length=Ae):je&&(Le=Le.mod(Ht))}return je?Qe:(Te&&(Qe=In.div(Qe)),Ht?Qe.mod(Ht):Ae?fn(Qe,gn,Ln,void 0):Qe)},kr.integerValue=function(Ct){var Ht=new lr(this);return Ct==null?Ct=Ln:q(Ct,0,8),fn(Ht,Ht.e+1,Ct)},kr.isEqualTo=kr.eq=function(Ct,Ht){return Bt(this,new lr(Ct,Ht))===0},kr.isFinite=function(){return!!this.c},kr.isGreaterThan=kr.gt=function(Ct,Ht){return Bt(this,new lr(Ct,Ht))>0},kr.isGreaterThanOrEqualTo=kr.gte=function(Ct,Ht){return(Ht=Bt(this,new lr(Ct,Ht)))===1||Ht===0},kr.isInteger=function(){return!!this.c&&vt(this.e/X)>this.c.length-2},kr.isLessThan=kr.lt=function(Ct,Ht){return Bt(this,new lr(Ct,Ht))<0},kr.isLessThanOrEqualTo=kr.lte=function(Ct,Ht){return(Ht=Bt(this,new lr(Ct,Ht)))===-1||Ht===0},kr.isNaN=function(){return!this.s},kr.isNegative=function(){return this.s<0},kr.isPositive=function(){return this.s>0},kr.isZero=function(){return!!this.c&&this.c[0]==0},kr.minus=function(Ct,Ht){var fe,je,ve,Ae,Ie=this,Te=Ie.s;if(Ht=(Ct=new lr(Ct,Ht)).s,!Te||!Ht)return new lr(NaN);if(Te!=Ht)return Ct.s=-Ht,Ie.plus(Ct);var Me=Ie.e/X,Qe=Ct.e/X,Le=Ie.c,Ir=Ct.c;if(!Me||!Qe){if(!Le||!Ir)return Le?(Ct.s=-Ht,Ct):new lr(Ir?Ie:NaN);if(!Le[0]||!Ir[0])return Ir[0]?(Ct.s=-Ht,Ct):new lr(Le[0]?Ie:Ln==3?-0:0)}if(Me=vt(Me),Qe=vt(Qe),Le=Le.slice(),Te=Me-Qe){for((Ae=Te<0)?(Te=-Te,ve=Le):(Qe=Me,ve=Ir),ve.reverse(),Ht=Te;Ht--;ve.push(0));ve.reverse()}else for(je=(Ae=(Te=Le.length)<(Ht=Ir.length))?Te:Ht,Te=Ht=0;Ht0)for(;Ht--;Le[fe++]=0);for(Ht=z-1;je>Te;){if(Le[--je]=0;){for(fe=0,qr=ho[ve]%Wn,Kr=ho[ve]/Wn|0,Ae=ve+(Ie=Me);Ae>ve;)fe=((Qe=qr*(Qe=jn[--Ie]%Wn)+(Te=Kr*Qe+(Le=jn[Ie]/Wn|0)*qr)%Wn*Wn+vn[Ae]+fe)/zn|0)+(Te/Wn|0)+Kr*Le,vn[Ae--]=Qe%zn;vn[Ae]=fe}return fe?++je:vn.splice(0,1),xo(Ct,vn,je)},kr.negated=function(){var Ct=new lr(this);return Ct.s=-Ct.s||null,Ct},kr.plus=function(Ct,Ht){var fe,je=this,ve=je.s;if(Ht=(Ct=new lr(Ct,Ht)).s,!ve||!Ht)return new lr(NaN);if(ve!=Ht)return Ct.s=-Ht,je.minus(Ct);var Ae=je.e/X,Ie=Ct.e/X,Te=je.c,Me=Ct.c;if(!Ae||!Ie){if(!Te||!Me)return new lr(ve/0);if(!Te[0]||!Me[0])return Me[0]?Ct:new lr(Te[0]?je:0*ve)}if(Ae=vt(Ae),Ie=vt(Ie),Te=Te.slice(),ve=Ae-Ie){for(ve>0?(Ie=Ae,fe=Me):(ve=-ve,fe=Te),fe.reverse();ve--;fe.push(0));fe.reverse()}for((ve=Te.length)-(Ht=Me.length)<0&&(fe=Me,Me=Te,Te=fe,Ht=ve),ve=0;Ht;)ve=(Te[--Ht]=Te[Ht]+Me[Ht]+ve)/z|0,Te[Ht]=z===Te[Ht]?0:Te[Ht]%z;return ve&&(Te=[ve].concat(Te),++Ie),xo(Ct,Te,Ie)},kr.precision=kr.sd=function(Ct,Ht){var fe,je,ve,Ae=this;if(Ct!=null&&Ct!==!!Ct)return q(Ct,1,xt),Ht==null?Ht=Ln:q(Ht,0,8),fn(new lr(Ae),Ct,Ht);if(!(fe=Ae.c))return null;if(je=(ve=fe.length-1)*X+1,ve=fe[ve]){for(;ve%10==0;ve/=10,je--);for(ve=fe[0];ve>=10;ve/=10,je++);}return Ct&&Ae.e+1>je&&(je=Ae.e+1),je},kr.shiftedBy=function(Ct){return q(Ct,-9007199254740991,L),this.times("1e"+Ct)},kr.squareRoot=kr.sqrt=function(){var Ct,Ht,fe,je,ve,Ae=this,Ie=Ae.c,Te=Ae.s,Me=Ae.e,Qe=Mn+4,Le=new lr("0.5");if(Te!==1||!Ie||!Ie[0])return new lr(!Te||Te<0&&(!Ie||Ie[0])?NaN:Ie?Ae:1/0);if((Te=Math.sqrt(+an(Ae)))==0||Te==1/0?(((Ht=Zt(Ie)).length+Me)%2==0&&(Ht+="0"),Te=Math.sqrt(+Ht),Me=vt((Me+1)/2)-(Me<0||Me%2),fe=new lr(Ht=Te==1/0?"5e"+Me:(Ht=Te.toExponential()).slice(0,Ht.indexOf("e")+1)+Me)):fe=new lr(Te+""),fe.c[0]){for((Te=(Me=fe.e)+Qe)<3&&(Te=0);;)if(ve=fe,fe=Le.times(ve.plus(h(Ae,ve,Qe,1))),Zt(ve.c).slice(0,Te)===(Ht=Zt(fe.c)).slice(0,Te)){if(fe.e0&&vn>0){for(Ae=vn%Te||Te,Le=Kr.substr(0,Ae);Ae0&&(Le+=Qe+Kr.slice(Ae)),qr&&(Le="-"+Le)}je=Ir?Le+(fe.decimalSeparator||"")+((Me=+fe.fractionGroupSize)?Ir.replace(new RegExp("\\d{"+Me+"}\\B","g"),"$&"+(fe.fractionGroupSeparator||"")):Ir):Le}return(fe.prefix||"")+je+(fe.suffix||"")},kr.toFraction=function(Ct){var Ht,fe,je,ve,Ae,Ie,Te,Me,Qe,Le,Ir,qr,Kr=this,vn=Kr.c;if(Ct!=null&&(!(Te=new lr(Ct)).isInteger()&&(Te.c||Te.s!==1)||Te.lt(In)))throw Error(_+"Argument "+(Te.isInteger()?"out of range: ":"not an integer: ")+an(Te));if(!vn)return new lr(Kr);for(Ht=new lr(In),Qe=fe=new lr(In),je=Me=new lr(In),qr=Zt(vn),Ae=Ht.e=qr.length-Kr.e-1,Ht.c[0]=$[(Ie=Ae%X)<0?X+Ie:Ie],Ct=!Ct||Te.comparedTo(Ht)>0?Ae>0?Ht:Qe:Te,Ie=Bn,Bn=1/0,Te=new lr(qr),Me.c[0]=0;Le=h(Te,Ht,0,1),(ve=fe.plus(Le.times(je))).comparedTo(Ct)!=1;)fe=je,je=ve,Qe=Me.plus(Le.times(ve=Qe)),Me=ve,Ht=Te.minus(Le.times(ve=Ht)),Te=ve;return ve=h(Ct.minus(fe),je,0,1),Me=Me.plus(ve.times(Qe)),fe=fe.plus(ve.times(je)),Me.s=Qe.s=Kr.s,Ir=h(Qe,je,Ae*=2,Ln).minus(Kr).abs().comparedTo(h(Me,fe,Ae,Ln).minus(Kr).abs())<1?[Qe,je]:[Me,fe],Bn=Ie,Ir},kr.toNumber=function(){return+an(this)},kr.toPrecision=function(Ct,Ht){return Ct!=null&&q(Ct,1,xt),Hn(this,Ct,Ht,2)},kr.toString=function(Ct){var Ht,fe=this,je=fe.s,ve=fe.e;return ve===null?je?(Ht="Infinity",je<0&&(Ht="-"+Ht)):Ht="NaN":(Ct==null?Ht=ve<=go||ve>=vo?i(Zt(fe.c),ve):T(Zt(fe.c),ve,"0"):Ct===10&&eo?Ht=T(Zt((fe=fn(new lr(fe),Mn+ve+1,Ln)).c),fe.e,"0"):(q(Ct,2,on.length,"Base"),Ht=C(T(Zt(fe.c),ve,"0"),10,Ct,je,!0)),je<0&&fe.c[0]&&(Ht="-"+Ht)),Ht},kr.valueOf=kr.toJSON=function(){return an(this)},kr._isBigNumber=!0,kr[Symbol.toStringTag]="BigNumber",kr[Symbol.for("nodejs.util.inspect.custom")]=kr.valueOf,b!=null&&lr.set(b),lr})();let K=N;var dt=B(4193),j=B.n(dt),pt=B(9127),_t=B.n(pt),ot=B(5976),it=B(9983);function Et(H){return Et=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},Et(H)}function jt(H,b){var h=Object.keys(H);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(H);b&&(C=C.filter(function(st){return Object.getOwnPropertyDescriptor(H,st).enumerable})),h.push.apply(h,C)}return h}function et(H){for(var b=1;b300?null:st-C+h}function Mt(H){return Mt=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},Mt(H)}function $t(){var H,b,h=typeof Symbol=="function"?Symbol:{},C=h.iterator||"@@iterator",st=h.toStringTag||"@@toStringTag";function yt(In,Mn,Ln,go){var vo=Mn&&Mn.prototype instanceof Ke?Mn:Ke,Fr=Object.create(vo.prototype);return de(Fr,"_invoke",(function(Bn,uo,to){var gn,$r,on,eo=0,lr=to||[],Hn=!1,xn={p:0,n:0,v:H,a:xo,f:xo.bind(H,4),d:function(fn,an){return gn=fn,$r=0,on=H,xn.n=an,Ye}};function xo(fn,an){for($r=fn,on=an,b=0;!Hn&&eo&&!Ct&&b3?(Ct=je===an)&&(on=Ht[($r=Ht[4])?5:($r=3,3)],Ht[4]=Ht[5]=H):Ht[0]<=fe&&((Ct=fn<2&&fean||an>je)&&(Ht[4]=fn,Ht[5]=an,xn.n=je,$r=0))}if(Ct||fn>1)return Ye;throw Hn=!0,an}return function(fn,an,Ct){if(eo>1)throw TypeError("Generator is already running");for(Hn&&an===1&&xo(an,Ct),$r=an,on=Ct;(b=$r<2?H:on)||!Hn;){gn||($r?$r<3?($r>1&&(xn.n=-1),xo($r,on)):xn.n=on:xn.v=on);try{if(eo=2,gn){if($r||(fn="next"),b=gn[fn]){if(!(b=b.call(gn,on)))throw TypeError("iterator result is not an object");if(!b.done)return b;on=b.value,$r<2&&($r=0)}else $r===1&&(b=gn.return)&&b.call(gn),$r<2&&(on=TypeError("The iterator does not provide a '"+fn+"' method"),$r=1);gn=H}else if((b=(Hn=xn.n<0)?on:Bn.call(uo,xn))!==Ye)break}catch(Ht){gn=H,$r=1,on=Ht}finally{eo=1}}return{value:b,done:Hn}}})(In,Ln,go),!0),Fr}var Ye={};function Ke(){}function ir(){}function Tr(){}b=Object.getPrototypeOf;var Lr=[][C]?b(b([][C]())):(de(b={},C,function(){return this}),b),Yr=Tr.prototype=Ke.prototype=Object.create(Lr);function kr(In){return Object.setPrototypeOf?Object.setPrototypeOf(In,Tr):(In.__proto__=Tr,de(In,st,"GeneratorFunction")),In.prototype=Object.create(Yr),In}return ir.prototype=Tr,de(Yr,"constructor",Tr),de(Tr,"constructor",ir),ir.displayName="GeneratorFunction",de(Tr,st,"GeneratorFunction"),de(Yr),de(Yr,st,"Generator"),de(Yr,C,function(){return this}),de(Yr,"toString",function(){return"[object Generator]"}),($t=function(){return{w:yt,m:kr}})()}function de(H,b,h,C){var st=Object.defineProperty;try{st({},"",{})}catch{st=0}de=function(yt,Ye,Ke,ir){function Tr(Lr,Yr){de(yt,Lr,function(kr){return this._invoke(Lr,Yr,kr)})}Ye?st?st(yt,Ye,{value:Ke,enumerable:!ir,configurable:!ir,writable:!ir}):yt[Ye]=Ke:(Tr("next",0),Tr("throw",1),Tr("return",2))},de(H,b,h,C)}function u(H,b,h,C,st,yt,Ye){try{var Ke=H[yt](Ye),ir=Ke.value}catch(Tr){return void h(Tr)}Ke.done?b(ir):Promise.resolve(ir).then(C,st)}function g(H){return function(){var b=this,h=arguments;return new Promise(function(C,st){var yt=H.apply(b,h);function Ye(ir){u(yt,C,st,Ye,Ke,"next",ir)}function Ke(ir){u(yt,C,st,Ye,Ke,"throw",ir)}Ye(void 0)})}}function I(H,b){return(function(h){if(Array.isArray(h))return h})(H)||(function(h,C){var st=h==null?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(st!=null){var yt,Ye,Ke,ir,Tr=[],Lr=!0,Yr=!1;try{if(Ke=(st=st.call(h)).next,C===0){if(Object(st)!==st)return;Lr=!1}else for(;!(Lr=(yt=Ke.call(st)).done)&&(Tr.push(yt.value),Tr.length!==C);Lr=!0);}catch(kr){Yr=!0,Ye=kr}finally{try{if(!Lr&&st.return!=null&&(ir=st.return(),Object(ir)!==ir))return}finally{if(Yr)throw Ye}}return Tr}})(H,b)||(function(h,C){if(h){if(typeof h=="string")return W(h,C);var st={}.toString.call(h).slice(8,-1);return st==="Object"&&h.constructor&&(st=h.constructor.name),st==="Map"||st==="Set"?Array.from(h):st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st)?W(h,C):void 0}})(H,b)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function W(H,b){(b==null||b>H.length)&&(b=H.length);for(var h=0,C=Array(b);h2&&arguments[2]!==void 0?arguments[2]:"";(function(st,yt){if(!(st instanceof yt))throw new TypeError("Cannot call a class as a function")})(this,H),this.url=b.clone(),this.filter=[],this.originalSegments=this.url.segment()||[],this.neighborRoot=C,this.httpClient=h},[{key:"call",value:function(){var H=this;return this.checkFilter(),this._sendNormalRequest(this.url).then(function(b){return H._parseResponse(b)})}},{key:"stream",value:function(){var H=this,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(d===void 0)throw new Error("Streaming requires eventsource to be enabled. If you need this functionality, compile with USE_EVENTSOURCE=true.");this.checkFilter(),this.url.setQuery("X-Client-Name","js-stellar-sdk"),this.url.setQuery("X-Client-Version",rt);var h,C,st=this.httpClient.defaults.headers;st&&["X-App-Name","X-App-Version"].forEach(function(Ke){var ir,Tr;if(st instanceof Headers)ir=(Tr=st.get(Ke))!==null&&Tr!==void 0?Tr:void 0;else if(Array.isArray(st)){var Lr=st.find(function(Yr){return I(Yr,1)[0]===Ke});ir=Lr?.[1]}else ir=st[Ke];ir&&H.url.setQuery(Ke,ir)});var yt=function(){C=setTimeout(function(){var Ke;(Ke=h)===null||Ke===void 0||Ke.close(),h=Ye()},b.reconnectTimeout||15e3)},Ye=function(){try{h=new d(H.url.toString())}catch(Yr){b.onerror&&b.onerror(Yr)}if(yt(),!h)return h;var Ke=!1,ir=function(){Ke||(clearTimeout(C),h.close(),Ye(),Ke=!0)},Tr=function(Yr){if(Yr.type!=="close"){var kr=Yr.data?H._parseRecord(JSON.parse(Yr.data)):Yr;kr.paging_token&&H.url.setQuery("cursor",kr.paging_token),clearTimeout(C),yt(),b.onmessage!==void 0&&b.onmessage(kr)}else ir()},Lr=function(Yr){b.onerror&&b.onerror(Yr)};return h.addEventListener?(h.addEventListener("message",Tr.bind(H)),h.addEventListener("error",Lr.bind(H)),h.addEventListener("close",ir.bind(H))):(h.onmessage=Tr.bind(H),h.onerror=Lr.bind(H)),h};return Ye(),function(){var Ke;clearTimeout(C),(Ke=h)===null||Ke===void 0||Ke.close()}}},{key:"cursor",value:function(H){return this.url.setQuery("cursor",H),this}},{key:"limit",value:function(H){return this.url.setQuery("limit",H.toString()),this}},{key:"order",value:function(H){return this.url.setQuery("order",H),this}},{key:"join",value:function(H){return this.url.setQuery("join",H),this}},{key:"forEndpoint",value:function(H,b){if(this.neighborRoot==="")throw new Error("Invalid usage: neighborRoot not set in constructor");return this.filter.push([H,b,this.neighborRoot]),this}},{key:"checkFilter",value:function(){if(this.filter.length>=2)throw new ot.v7("Too many filters specified",this.filter);if(this.filter.length===1){var H=this.originalSegments.concat(this.filter[0]);this.url.segment(H)}}},{key:"_requestFnForLink",value:function(H){var b=this;return g($t().m(function h(){var C,st,yt,Ye,Ke=arguments;return $t().w(function(ir){for(;;)switch(ir.n){case 0:return C=Ke.length>0&&Ke[0]!==void 0?Ke[0]:{},H.templated?(yt=_t()(H.href),st=j()(yt.expand(C))):st=j()(H.href),ir.n=1,b._sendNormalRequest(st);case 1:return Ye=ir.v,ir.a(2,b._parseResponse(Ye))}},h)}))}},{key:"_parseRecord",value:function(H){var b=this;return H._links&&Object.keys(H._links).forEach(function(h){var C=H._links[h],st=!1;if(H[h]!==void 0&&(H["".concat(h,"_attr")]=H[h],st=!0),st&&Jt.indexOf(h)>=0){var yt=b._parseRecord(H[h]);H[h]=g($t().m(function Ye(){return $t().w(function(Ke){for(;;)if(Ke.n===0)return Ke.a(2,yt)},Ye)}))}else H[h]=b._requestFnForLink(C)}),H}},{key:"_sendNormalRequest",value:(x=g($t().m(function H(b){var h;return $t().w(function(C){for(;;)if(C.n===0)return h=(h=b).authority(this.url.authority()).protocol(this.url.protocol()),C.a(2,this.httpClient.get(h.toString()).then(function(st){return st.data}).catch(this._handleNetworkError))},H,this)})),function(H){return x.apply(this,arguments)})},{key:"_parseResponse",value:function(H){return H._embedded&&H._embedded.records?this._toCollectionPage(H):this._parseRecord(H)}},{key:"_toCollectionPage",value:function(H){for(var b,h,C=this,st=0;stC||h>=24*st||h%st!==0)}}])})(G);function be(H){return be=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},be(H)}function ye(H,b){for(var h=0;h3?(Ct=je===an)&&(on=Ht[($r=Ht[4])?5:($r=3,3)],Ht[4]=Ht[5]=H):Ht[0]<=fe&&((Ct=fn<2&&fean||an>je)&&(Ht[4]=fn,Ht[5]=an,xn.n=je,$r=0))}if(Ct||fn>1)return Ye;throw Hn=!0,an}return function(fn,an,Ct){if(eo>1)throw TypeError("Generator is already running");for(Hn&&an===1&&xo(an,Ct),$r=an,on=Ct;(b=$r<2?H:on)||!Hn;){gn||($r?$r<3?($r>1&&(xn.n=-1),xo($r,on)):xn.n=on:xn.v=on);try{if(eo=2,gn){if($r||(fn="next"),b=gn[fn]){if(!(b=b.call(gn,on)))throw TypeError("iterator result is not an object");if(!b.done)return b;on=b.value,$r<2&&($r=0)}else $r===1&&(b=gn.return)&&b.call(gn),$r<2&&(on=TypeError("The iterator does not provide a '"+fn+"' method"),$r=1);gn=H}else if((b=(Hn=xn.n<0)?on:Bn.call(uo,xn))!==Ye)break}catch(Ht){gn=H,$r=1,on=Ht}finally{eo=1}}return{value:b,done:Hn}}})(In,Ln,go),!0),Fr}var Ye={};function Ke(){}function ir(){}function Tr(){}b=Object.getPrototypeOf;var Lr=[][C]?b(b([][C]())):(no(b={},C,function(){return this}),b),Yr=Tr.prototype=Ke.prototype=Object.create(Lr);function kr(In){return Object.setPrototypeOf?Object.setPrototypeOf(In,Tr):(In.__proto__=Tr,no(In,st,"GeneratorFunction")),In.prototype=Object.create(Yr),In}return ir.prototype=Tr,no(Yr,"constructor",Tr),no(Tr,"constructor",ir),ir.displayName="GeneratorFunction",no(Tr,st,"GeneratorFunction"),no(Yr),no(Yr,st,"Generator"),no(Yr,C,function(){return this}),no(Yr,"toString",function(){return"[object Generator]"}),(Kn=function(){return{w:yt,m:kr}})()}function no(H,b,h,C){var st=Object.defineProperty;try{st({},"",{})}catch{st=0}no=function(yt,Ye,Ke,ir){function Tr(Lr,Yr){no(yt,Lr,function(kr){return this._invoke(Lr,Yr,kr)})}Ye?st?st(yt,Ye,{value:Ke,enumerable:!ir,configurable:!ir,writable:!ir}):yt[Ye]=Ke:(Tr("next",0),Tr("throw",1),Tr("return",2))},no(H,b,h,C)}function ii(H,b,h,C,st,yt,Ye){try{var Ke=H[yt](Ye),ir=Ke.value}catch(Tr){return void h(Tr)}Ke.done?b(ir):Promise.resolve(ir).then(C,st)}function Do(H){return function(){var b=this,h=arguments;return new Promise(function(C,st){var yt=H.apply(b,h);function Ye(ir){ii(yt,C,st,Ye,Ke,"next",ir)}function Ke(ir){ii(yt,C,st,Ye,Ke,"throw",ir)}Ye(void 0)})}}function bi(H,b){for(var h=0;h1&&arguments[1]!==void 0?arguments[1]:{};(function(Ke,ir){if(!(Ke instanceof ir))throw new TypeError("Cannot call a class as a function")})(this,H),this.serverURL=j()(b);var C,st,yt=h.allowHttp===void 0?at.T.isAllowHttp():h.allowHttp,Ye={};if(h.appName&&(Ye["X-App-Name"]=h.appName),h.appVersion&&(Ye["X-App-Version"]=h.appVersion),h.authToken&&(Ye["X-Auth-Token"]=h.authToken),h.headers&&Object.assign(Ye,h.headers),this.httpClient=(C=Ye,(st=(0,it.vt)({headers:et(et({},C),{},{"X-Client-Name":"js-stellar-sdk","X-Client-Version":rt})})).interceptors.response.use(function(Ke){var ir=j()(Ke.config.url).hostname(),Tr=0;if(Ke.headers instanceof Headers){var Lr=Ke.headers.get("date");Lr&&(Tr=lt(Date.parse(Lr)))}else if(Et(Ke.headers)==="object"&&"date"in Ke.headers){var Yr=Ke.headers;typeof Yr.date=="string"&&(Tr=lt(Date.parse(Yr.date)))}var kr=lt(new Date().getTime());return Number.isNaN(Tr)||(F[ir]={serverTime:Tr,localTimeRecorded:kr}),Ke}),st),this.serverURL.protocol()!=="https"&&!yt)throw new Error("Cannot connect to insecure horizon server")},[{key:"fetchTimebounds",value:(Si=Do(Kn().m(function H(b){var h,C,st=arguments;return Kn().w(function(yt){for(;;)switch(yt.n){case 0:if(h=st.length>1&&st[1]!==void 0&&st[1],!(C=At(this.serverURL.hostname()))){yt.n=1;break}return yt.a(2,{minTime:0,maxTime:C+b});case 1:if(!h){yt.n=2;break}return yt.a(2,{minTime:0,maxTime:Math.floor(new Date().getTime()/1e3)+b});case 2:return yt.n=3,this.httpClient.get(this.serverURL.toString());case 3:return yt.a(2,this.fetchTimebounds(b,!0))}},H,this)})),function(H){return Si.apply(this,arguments)})},{key:"fetchBaseFee",value:(pi=Do(Kn().m(function H(){var b;return Kn().w(function(h){for(;;)switch(h.n){case 0:return h.n=1,this.feeStats();case 1:return b=h.v,h.a(2,parseInt(b.last_ledger_base_fee,10)||100)}},H,this)})),function(){return pi.apply(this,arguments)})},{key:"feeStats",value:(wi=Do(Kn().m(function H(){var b;return Kn().w(function(h){for(;;)if(h.n===0)return(b=new G(this.serverURL,this.httpClient)).filter.push(["fee_stats"]),h.a(2,b.call())},H,this)})),function(){return wi.apply(this,arguments)})},{key:"root",value:(jo=Do(Kn().m(function H(){var b;return Kn().w(function(h){for(;;)if(h.n===0)return b=new G(this.serverURL,this.httpClient),h.a(2,b.call())},H,this)})),function(){return jo.apply(this,arguments)})},{key:"submitTransaction",value:(Mo=Do(Kn().m(function H(b){var h,C=arguments;return Kn().w(function(st){for(;;)switch(st.n){case 0:if((C.length>1&&C[1]!==void 0?C[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){st.n=1;break}return st.n=1,this.checkMemoRequired(b);case 1:return h=encodeURIComponent(b.toEnvelope().toXDR().toString("base64")),st.a(2,this.httpClient.post(this.serverURL.clone().segment("transactions").toString(),"tx=".concat(h),{timeout:6e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(yt){if(!yt.data.result_xdr)return yt.data;var Ye,Ke,ir=w.xdr.TransactionResult.fromXDR(yt.data.result_xdr,"base64").result().value();return ir.length&&(Ye=ir.map(function(Tr,Lr){if(Tr.value().switch().name!=="manageBuyOffer"&&Tr.value().switch().name!=="manageSellOffer")return null;Ke=!0;var Yr,kr=new K(0),In=new K(0),Mn=Tr.value().value().success(),Ln=Mn.offersClaimed().map(function(uo){var to=uo.value(),gn="";switch(uo.switch()){case w.xdr.ClaimAtomType.claimAtomTypeV0():gn=w.StrKey.encodeEd25519PublicKey(to.sellerEd25519());break;case w.xdr.ClaimAtomType.claimAtomTypeOrderBook():gn=w.StrKey.encodeEd25519PublicKey(to.sellerId().ed25519());break;default:throw new Error("Invalid offer result type: ".concat(uo.switch()))}var $r=new K(to.amountBought().toString()),on=new K(to.amountSold().toString());kr=kr.plus(on),In=In.plus($r);var eo=w.Asset.fromOperation(to.assetSold()),lr=w.Asset.fromOperation(to.assetBought()),Hn={type:eo.getAssetType(),assetCode:eo.getCode(),issuer:eo.getIssuer()},xn={type:lr.getAssetType(),assetCode:lr.getCode(),issuer:lr.getIssuer()};return{sellerId:gn,offerId:to.offerId().toString(),assetSold:Hn,amountSold:si(on),assetBought:xn,amountBought:si($r)}}),go=Mn.offer().switch().name;if(typeof Mn.offer().value=="function"&&Mn.offer().value()){var vo=Mn.offer().value();Yr={offerId:vo.offerId().toString(),selling:{},buying:{},amount:si(vo.amount().toString()),price:{n:vo.price().n(),d:vo.price().d()}};var Fr=w.Asset.fromOperation(vo.selling());Yr.selling={type:Fr.getAssetType(),assetCode:Fr.getCode(),issuer:Fr.getIssuer()};var Bn=w.Asset.fromOperation(vo.buying());Yr.buying={type:Bn.getAssetType(),assetCode:Bn.getCode(),issuer:Bn.getIssuer()}}return{offersClaimed:Ln,effect:go,operationIndex:Lr,currentOffer:Yr,amountBought:si(kr),amountSold:si(In),isFullyOpen:!Ln.length&&go!=="manageOfferDeleted",wasPartiallyFilled:!!Ln.length&&go!=="manageOfferDeleted",wasImmediatelyFilled:!!Ln.length&&go==="manageOfferDeleted",wasImmediatelyDeleted:!Ln.length&&go==="manageOfferDeleted"}}).filter(function(Tr){return!!Tr})),oi(oi({},yt.data),{},{offerResults:Ke?Ye:void 0})}).catch(function(yt){return yt instanceof Error?Promise.reject(yt):Promise.reject(new ot.nS("Transaction submission failed. Server responded: ".concat(yt.status," ").concat(yt.statusText),yt.data))}))}},H,this)})),function(H){return Mo.apply(this,arguments)})},{key:"submitAsyncTransaction",value:(Bi=Do(Kn().m(function H(b){var h,C=arguments;return Kn().w(function(st){for(;;)switch(st.n){case 0:if((C.length>1&&C[1]!==void 0?C[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){st.n=1;break}return st.n=1,this.checkMemoRequired(b);case 1:return h=encodeURIComponent(b.toEnvelope().toXDR().toString("base64")),st.a(2,this.httpClient.post(this.serverURL.clone().segment("transactions_async").toString(),"tx=".concat(h),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(yt){return yt.data}).catch(function(yt){return yt instanceof Error?Promise.reject(yt):Promise.reject(new ot.nS("Transaction submission failed. Server responded: ".concat(yt.status," ").concat(yt.statusText),yt.data))}))}},H,this)})),function(H){return Bi.apply(this,arguments)})},{key:"accounts",value:function(){return new Lt(this.serverURL,this.httpClient)}},{key:"claimableBalances",value:function(){return new So(this.serverURL,this.httpClient)}},{key:"ledgers",value:function(){return new zo(this.serverURL,this.httpClient)}},{key:"transactions",value:function(){return new ko(this.serverURL,this.httpClient)}},{key:"offers",value:function(){return new kt(this.serverURL,this.httpClient)}},{key:"orderbook",value:function(H,b){return new sr(this.serverURL,this.httpClient,H,b)}},{key:"trades",value:function(){return new cr(this.serverURL,this.httpClient)}},{key:"operations",value:function(){return new ee(this.serverURL,this.httpClient)}},{key:"liquidityPools",value:function(){return new Ne(this.serverURL,this.httpClient)}},{key:"strictReceivePaths",value:function(H,b,h){return new Vo(this.serverURL,this.httpClient,H,b,h)}},{key:"strictSendPaths",value:function(H,b,h){return new Xo(this.serverURL,this.httpClient,H,b,h)}},{key:"payments",value:function(){return new Fo(this.serverURL,this.httpClient)}},{key:"effects",value:function(){return new Un(this.serverURL,this.httpClient)}},{key:"friendbot",value:function(H){return new $n(this.serverURL,this.httpClient,H)}},{key:"assets",value:function(){return new De(this.serverURL,this.httpClient)}},{key:"loadAccount",value:(fi=Do(Kn().m(function H(b){var h;return Kn().w(function(C){for(;;)switch(C.n){case 0:return C.n=1,this.accounts().accountId(b).call();case 1:return h=C.v,C.a(2,new f(h))}},H,this)})),function(H){return fi.apply(this,arguments)})},{key:"tradeAggregation",value:function(H,b,h,C,st,yt){return new oe(this.serverURL,this.httpClient,H,b,h,C,st,yt)}},{key:"checkMemoRequired",value:(Ii=Do(Kn().m(function H(b){var h,C,st,yt,Ye,Ke;return Kn().w(function(ir){for(;;)switch(ir.p=ir.n){case 0:if(b instanceof w.FeeBumpTransaction&&(b=b.innerTransaction),b.memo.type==="none"){ir.n=1;break}return ir.a(2);case 1:h=new Set,C=0;case 2:if(!(C{"use strict";var P=B(1270);function Y(){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 a=/^([a-z0-9.+-]+:)/i,O=/:[0-9]*$/,w=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,p=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),S=["'"].concat(p),o=["%","/","?",";","#"].concat(S),A=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,l=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,c={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=B(5373);function k(y,_,m){if(y&&typeof y=="object"&&y instanceof Y)return y;var z=new Y;return z.parse(y,_,m),z}Y.prototype.parse=function(y,_,m){if(typeof y!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof y);var z=y.indexOf("?"),X=z!==-1&&z127?pt+="x":pt+=j[_t];if(!pt.match(v)){var it=K.slice(0,i),Et=K.slice(i+1),jt=j.match(l);jt&&(it.push(jt[1]),Et.unshift(jt[2])),Et.length&&($="/"+Et.join(".")+$),this.hostname=it.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=P.toASCII(this.hostname));var et=this.port?":"+this.port:"",nt=this.hostname||"";this.host=nt+et,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),$[0]!=="/"&&($="/"+$))}if(!c[vt])for(i=0,dt=S.length;i0)&&m.host.split("@"))&&(m.auth=jt.shift(),m.hostname=jt.shift(),m.host=m.hostname)),m.search=y.search,m.query=y.query,m.pathname===null&&m.search===null||(m.path=(m.pathname?m.pathname:"")+(m.search?m.search:"")),m.href=m.format(),m;if(!j.length)return m.pathname=null,m.search?m.path="/"+m.search:m.path=null,m.href=m.format(),m;for(var _t=j.slice(-1)[0],ot=(m.host||y.host||j.length>1)&&(_t==="."||_t==="..")||_t==="",it=0,Et=j.length;Et>=0;Et--)(_t=j[Et])==="."?j.splice(Et,1):_t===".."?(j.splice(Et,1),it++):it&&(j.splice(Et,1),it--);if(!K&&!dt)for(;it--;it)j.unshift("..");!K||j[0]===""||j[0]&&j[0].charAt(0)==="/"||j.unshift(""),ot&&j.join("/").substr(-1)!=="/"&&j.push("");var jt,et=j[0]===""||j[0]&&j[0].charAt(0)==="/";return pt&&(m.hostname=et?"":j.length?j.shift():"",m.host=m.hostname,(jt=!!(m.host&&m.host.indexOf("@")>0)&&m.host.split("@"))&&(m.auth=jt.shift(),m.hostname=jt.shift(),m.host=m.hostname)),(K=K||m.host&&j.length)&&!et&&j.unshift(""),j.length>0?m.pathname=j.join("/"):(m.pathname=null,m.path=null),m.pathname===null&&m.search===null||(m.path=(m.pathname?m.pathname:"")+(m.search?m.search:"")),m.auth=y.auth||m.auth,m.slashes=m.slashes||y.slashes,m.href=m.format(),m},Y.prototype.parseHost=function(){var y=this.host,_=O.exec(y);_&&((_=_[0])!==":"&&(this.port=_.substr(1)),y=y.substr(0,y.length-_.length)),y&&(this.hostname=y)},Ot.parse=k,Ot.resolve=function(y,_){return k(y,!1,!0).resolve(_)},Ot.resolveObject=function(y,_){return y?k(y,!1,!0).resolveObject(_):_},Ot.format=function(y){return typeof y=="string"&&(y=k(y)),y instanceof Y?y.format():Y.prototype.format.call(y)},Ot.Url=Y},8859:(Dt,Ot,B)=>{var P=typeof Map=="function"&&Map.prototype,Y=Object.getOwnPropertyDescriptor&&P?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=P&&Y&&typeof Y.get=="function"?Y.get:null,O=P&&Map.prototype.forEach,w=typeof Set=="function"&&Set.prototype,p=Object.getOwnPropertyDescriptor&&w?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,S=w&&p&&typeof p.get=="function"?p.get:null,o=w&&Set.prototype.forEach,A=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,l=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,c=Boolean.prototype.valueOf,R=Object.prototype.toString,f=Function.prototype.toString,E=String.prototype.match,k=String.prototype.slice,y=String.prototype.replace,_=String.prototype.toUpperCase,m=String.prototype.toLowerCase,z=RegExp.prototype.test,X=Array.prototype.concat,L=Array.prototype.join,$=Array.prototype.slice,ut=Math.floor,xt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,vt=Object.getOwnPropertySymbols,Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Bt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Bt||!0)?Symbol.toStringTag:null,ct=Object.prototype.propertyIsEnumerable,i=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function T(W,Q){if(W===1/0||W===-1/0||W!=W||W&&W>-1e3&&W<1e3||z.call(/e/,Q))return Q;var St=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var d=W<0?-ut(-W):ut(W);if(d!==W){var U=String(d),M=k.call(Q,U.length+1);return y.call(U,St,"$&_")+"."+y.call(y.call(M,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(Q,St,"$&_")}var N=B(2634),K=N.custom,dt=et(K)?K:null,j={__proto__:null,double:'"',single:"'"},pt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function _t(W,Q,St){var d=St.quoteStyle||Q,U=j[d];return U+W+U}function ot(W){return y.call(String(W),/"/g,""")}function it(W){return!q||!(typeof W=="object"&&(q in W||W[q]!==void 0))}function Et(W){return F(W)==="[object Array]"&&it(W)}function jt(W){return F(W)==="[object RegExp]"&&it(W)}function et(W){if(Bt)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!Zt)return!1;try{return Zt.call(W),!0}catch{}return!1}Dt.exports=function W(Q,St,d,U){var M=St||{};if(rt(M,"quoteStyle")&&!rt(j,M.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rt(M,"maxStringLength")&&(typeof M.maxStringLength=="number"?M.maxStringLength<0&&M.maxStringLength!==1/0:M.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var It=!rt(M,"customInspect")||M.customInspect;if(typeof It!="boolean"&&It!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(rt(M,"indent")&&M.indent!==null&&M.indent!==" "&&!(parseInt(M.indent,10)===M.indent&&M.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(rt(M,"numericSeparator")&&typeof M.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Jt=M.numericSeparator;if(Q===void 0)return"undefined";if(Q===null)return"null";if(typeof Q=="boolean")return Q?"true":"false";if(typeof Q=="string")return At(Q,M);if(typeof Q=="number"){if(Q===0)return 1/0/Q>0?"0":"-0";var Wt=String(Q);return Jt?T(Q,Wt):Wt}if(typeof Q=="bigint"){var xe=String(Q)+"n";return Jt?T(Q,xe):xe}var x=M.depth===void 0?5:M.depth;if(d===void 0&&(d=0),d>=x&&x>0&&typeof Q=="object")return Et(Q)?"[Array]":"[Object]";var G=(function(De,dr){var Pr;if(De.indent===" ")Pr=" ";else{if(!(typeof De.indent=="number"&&De.indent>0))return null;Pr=L.call(Array(De.indent+1)," ")}return{base:Pr,prev:L.call(Array(dr+1),Pr)}})(M,d);if(U===void 0)U=[];else if(lt(U,Q)>=0)return"[Circular]";function at(De,dr,Pr){if(dr&&(U=$.call(U)).push(dr),Pr){var Zr={depth:M.depth};return rt(M,"quoteStyle")&&(Zr.quoteStyle=M.quoteStyle),W(De,Zr,d+1,U)}return W(De,M,d+1,U)}if(typeof Q=="function"&&!jt(Q)){var Vt=(function(De){if(De.name)return De.name;var dr=E.call(f.call(De),/^function\s*([\w$]+)/);return dr?dr[1]:null})(Q),Pt=I(Q,at);return"[Function"+(Vt?": "+Vt:" (anonymous)")+"]"+(Pt.length>0?" { "+L.call(Pt,", ")+" }":"")}if(et(Q)){var D=Bt?y.call(String(Q),/^(Symbol\(.*\))_[^)]*$/,"$1"):Zt.call(Q);return typeof Q!="object"||Bt?D:$t(D)}if((function(De){return!De||typeof De!="object"?!1:typeof HTMLElement<"u"&&De instanceof HTMLElement?!0:typeof De.nodeName=="string"&&typeof De.getAttribute=="function"})(Q)){for(var mt="<"+m.call(String(Q.nodeName)),gt=Q.attributes||[],ft=0;ft"}if(Et(Q)){if(Q.length===0)return"[]";var Gt=I(Q,at);return G&&!(function(De){for(var dr=0;dr=0)return!1;return!0})(Gt)?"["+g(Gt,G)+"]":"[ "+L.call(Gt,", ")+" ]"}if((function(De){return F(De)==="[object Error]"&&it(De)})(Q)){var Lt=I(Q,at);return"cause"in Error.prototype||!("cause"in Q)||ct.call(Q,"cause")?Lt.length===0?"["+String(Q)+"]":"{ ["+String(Q)+"] "+L.call(Lt,", ")+" }":"{ ["+String(Q)+"] "+L.call(X.call("[cause]: "+at(Q.cause),Lt),", ")+" }"}if(typeof Q=="object"&&It){if(dt&&typeof Q[dt]=="function"&&N)return N(Q,{depth:x-d});if(It!=="symbol"&&typeof Q.inspect=="function")return Q.inspect()}if((function(De){if(!a||!De||typeof De!="object")return!1;try{a.call(De);try{S.call(De)}catch{return!0}return De instanceof Map}catch{}return!1})(Q)){var ie=[];return O&&O.call(Q,function(De,dr){ie.push(at(dr,Q,!0)+" => "+at(De,Q))}),u("Map",a.call(Q),ie,G)}if((function(De){if(!S||!De||typeof De!="object")return!1;try{S.call(De);try{a.call(De)}catch{return!0}return De instanceof Set}catch{}return!1})(Q)){var $e=[];return o&&o.call(Q,function(De){$e.push(at(De,Q))}),u("Set",S.call(Q),$e,G)}if((function(De){if(!A||!De||typeof De!="object")return!1;try{A.call(De,A);try{v.call(De,v)}catch{return!0}return De instanceof WeakMap}catch{}return!1})(Q))return de("WeakMap");if((function(De){if(!v||!De||typeof De!="object")return!1;try{v.call(De,v);try{A.call(De,A)}catch{return!0}return De instanceof WeakSet}catch{}return!1})(Q))return de("WeakSet");if((function(De){if(!l||!De||typeof De!="object")return!1;try{return l.call(De),!0}catch{}return!1})(Q))return de("WeakRef");if((function(De){return F(De)==="[object Number]"&&it(De)})(Q))return $t(at(Number(Q)));if((function(De){if(!De||typeof De!="object"||!xt)return!1;try{return xt.call(De),!0}catch{}return!1})(Q))return $t(at(xt.call(Q)));if((function(De){return F(De)==="[object Boolean]"&&it(De)})(Q))return $t(c.call(Q));if((function(De){return F(De)==="[object String]"&&it(De)})(Q))return $t(at(String(Q)));if(typeof window<"u"&&Q===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Q===globalThis||B.g!==void 0&&Q===B.g)return"{ [object globalThis] }";if(!(function(De){return F(De)==="[object Date]"&&it(De)})(Q)&&!jt(Q)){var Ce=I(Q,at),He=i?i(Q)===Object.prototype:Q instanceof Object||Q.constructor===Object,rr=Q instanceof Object?"":"null prototype",qe=!He&&q&&Object(Q)===Q&&q in Q?k.call(F(Q),8,-1):rr?"Object":"",pr=(He||typeof Q.constructor!="function"?"":Q.constructor.name?Q.constructor.name+" ":"")+(qe||rr?"["+L.call(X.call([],qe||[],rr||[]),": ")+"] ":"");return Ce.length===0?pr+"{}":G?pr+"{"+g(Ce,G)+"}":pr+"{ "+L.call(Ce,", ")+" }"}return String(Q)};var nt=Object.prototype.hasOwnProperty||function(W){return W in this};function rt(W,Q){return nt.call(W,Q)}function F(W){return R.call(W)}function lt(W,Q){if(W.indexOf)return W.indexOf(Q);for(var St=0,d=W.length;StQ.maxStringLength){var St=W.length-Q.maxStringLength,d="... "+St+" more character"+(St>1?"s":"");return At(k.call(W,0,Q.maxStringLength),Q)+d}var U=pt[Q.quoteStyle||"single"];return U.lastIndex=0,_t(y.call(y.call(W,U,"\\$1"),/[\x00-\x1f]/g,Mt),"single",Q)}function Mt(W){var Q=W.charCodeAt(0),St={8:"b",9:"t",10:"n",12:"f",13:"r"}[Q];return St?"\\"+St:"\\x"+(Q<16?"0":"")+_.call(Q.toString(16))}function $t(W){return"Object("+W+")"}function de(W){return W+" { ? }"}function u(W,Q,St,d){return W+" ("+Q+") {"+(d?g(St,d):L.call(St,", "))+"}"}function g(W,Q){if(W.length===0)return"";var St=` +`+Q.prev+Q.base;return St+L.call(W,","+St)+` +`+Q.prev}function I(W,Q){var St=Et(W),d=[];if(St){d.length=W.length;for(var U=0;U{var Ot;Ot=()=>(()=>{var B={41(a,O,w){"use strict";var p=w(655),S=w(8068),o=w(9675),A=w(5795);a.exports=function(v,l,c){if(!v||typeof v!="object"&&typeof v!="function")throw new o("`obj` must be an object or a function`");if(typeof l!="string"&&typeof l!="symbol")throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new o("`loose`, if provided, must be a boolean");var R=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,E=arguments.length>5?arguments[5]:null,k=arguments.length>6&&arguments[6],y=!!A&&A(v,l);if(p)p(v,l,{configurable:E===null&&y?y.configurable:!E,enumerable:R===null&&y?y.enumerable:!R,value:c,writable:f===null&&y?y.writable:!f});else{if(!k&&(R||f||E))throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");v[l]=c}}},76(a){"use strict";a.exports=Function.prototype.call},251(a,O){O.read=function(w,p,S,o,A){var v,l,c=8*A-o-1,R=(1<>1,E=-7,k=S?A-1:0,y=S?-1:1,_=w[p+k];for(k+=y,v=_&(1<<-E)-1,_>>=-E,E+=c;E>0;v=256*v+w[p+k],k+=y,E-=8);for(l=v&(1<<-E)-1,v>>=-E,E+=o;E>0;l=256*l+w[p+k],k+=y,E-=8);if(v===0)v=1-f;else{if(v===R)return l?NaN:1/0*(_?-1:1);l+=Math.pow(2,o),v-=f}return(_?-1:1)*l*Math.pow(2,v-o)},O.write=function(w,p,S,o,A,v){var l,c,R,f=8*v-A-1,E=(1<>1,y=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=o?0:v-1,m=o?1:-1,z=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(c=isNaN(p)?1:0,l=E):(l=Math.floor(Math.log(p)/Math.LN2),p*(R=Math.pow(2,-l))<1&&(l--,R*=2),(p+=l+k>=1?y/R:y*Math.pow(2,1-k))*R>=2&&(l++,R/=2),l+k>=E?(c=0,l=E):l+k>=1?(c=(p*R-1)*Math.pow(2,A),l+=k):(c=p*Math.pow(2,k-1)*Math.pow(2,A),l=0));A>=8;w[S+_]=255&c,_+=m,c/=256,A-=8);for(l=l<0;w[S+_]=255&l,_+=m,l/=256,f-=8);w[S+_-m]|=128*z}},392(a,O,w){"use strict";var p=w(2861).Buffer,S=w(5377);function o(A,v){this._block=p.alloc(A),this._finalSize=v,this._blockSize=A,this._len=0}o.prototype.update=function(A,v){A=S(A,v||"utf8");for(var l=this._block,c=this._blockSize,R=A.length,f=this._len,E=0;E=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=8*this._len;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var c=(4294967295&l)>>>0,R=(l-c)/4294967296;this._block.writeUInt32BE(R,this._blockSize-8),this._block.writeUInt32BE(c,this._blockSize-4)}this._update(this._block);var f=this._hash();return A?f.toString(A):f},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},a.exports=o},414(a){"use strict";a.exports=Math.round},448(a,O,w){"use strict";w.r(O),w.d(O,{Account:()=>ho,Address:()=>Ke,Asset:()=>Xr,AuthClawbackEnabledFlag:()=>vo,AuthImmutableFlag:()=>go,AuthRequiredFlag:()=>Mn,AuthRevocableFlag:()=>Ln,BASE_FEE:()=>zi,Claimant:()=>bi,Contract:()=>ma,FeeBumpTransaction:()=>zn,Hyper:()=>p.Hyper,Int128:()=>Ji,Int256:()=>ea,Keypair:()=>wn,LiquidityPoolAsset:()=>Kn,LiquidityPoolFeeV18:()=>Rn,LiquidityPoolId:()=>fi,Memo:()=>xo,MemoHash:()=>Hn,MemoID:()=>eo,MemoNone:()=>on,MemoReturn:()=>xn,MemoText:()=>lr,MuxedAccount:()=>qo,Networks:()=>Wi,Operation:()=>Fr,ScInt:()=>Oa,SignerKey:()=>la,Soroban:()=>Xa,SorobanDataBuilder:()=>qn,StrKey:()=>Ze,TimeoutInfinite:()=>Ga,Transaction:()=>Ie,TransactionBase:()=>Xo,TransactionBuilder:()=>Ha,Uint128:()=>Zi,Uint256:()=>$i,UnsignedHyper:()=>p.UnsignedHyper,XdrLargeInt:()=>ui,authorizeEntry:()=>ja,authorizeInvocation:()=>ps,buildInvocationTree:()=>Na,cereal:()=>A,decodeAddressToMuxedAccount:()=>Mo,default:()=>ys,encodeMuxedAccount:()=>wi,encodeMuxedAccountToAddress:()=>jo,extractBaseAddress:()=>pi,getLiquidityPoolId:()=>Eo,hash:()=>l,humanizeEvents:()=>fs,nativeToScVal:()=>li,scValToBigInt:()=>ka,scValToNative:()=>Jo,sign:()=>qt,verify:()=>_e,walkInvocationTree:()=>hs,xdr:()=>o});var p=w(3740),S=p.config(function(t){var e=1024;t.typedef("Value",t.varOpaque()),t.struct("ScpBallot",[["counter",t.lookup("Uint32")],["value",t.lookup("Value")]]),t.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),t.struct("ScpNomination",[["quorumSetHash",t.lookup("Hash")],["votes",t.varArray(t.lookup("Value"),2147483647)],["accepted",t.varArray(t.lookup("Value"),2147483647)]]),t.struct("ScpStatementPrepare",[["quorumSetHash",t.lookup("Hash")],["ballot",t.lookup("ScpBallot")],["prepared",t.option(t.lookup("ScpBallot"))],["preparedPrime",t.option(t.lookup("ScpBallot"))],["nC",t.lookup("Uint32")],["nH",t.lookup("Uint32")]]),t.struct("ScpStatementConfirm",[["ballot",t.lookup("ScpBallot")],["nPrepared",t.lookup("Uint32")],["nCommit",t.lookup("Uint32")],["nH",t.lookup("Uint32")],["quorumSetHash",t.lookup("Hash")]]),t.struct("ScpStatementExternalize",[["commit",t.lookup("ScpBallot")],["nH",t.lookup("Uint32")],["commitQuorumSetHash",t.lookup("Hash")]]),t.union("ScpStatementPledges",{switchOn:t.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:t.lookup("ScpStatementPrepare"),confirm:t.lookup("ScpStatementConfirm"),externalize:t.lookup("ScpStatementExternalize"),nominate:t.lookup("ScpNomination")}}),t.struct("ScpStatement",[["nodeId",t.lookup("NodeId")],["slotIndex",t.lookup("Uint64")],["pledges",t.lookup("ScpStatementPledges")]]),t.struct("ScpEnvelope",[["statement",t.lookup("ScpStatement")],["signature",t.lookup("Signature")]]),t.struct("ScpQuorumSet",[["threshold",t.lookup("Uint32")],["validators",t.varArray(t.lookup("NodeId"),2147483647)],["innerSets",t.varArray(t.lookup("ScpQuorumSet"),2147483647)]]),t.typedef("Thresholds",t.opaque(4)),t.typedef("String32",t.string(32)),t.typedef("String64",t.string(64)),t.typedef("SequenceNumber",t.lookup("Int64")),t.typedef("DataValue",t.varOpaque(64)),t.typedef("AssetCode4",t.opaque(4)),t.typedef("AssetCode12",t.opaque(12)),t.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),t.union("AssetCode",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:t.lookup("AssetCode4"),assetCode12:t.lookup("AssetCode12")}}),t.struct("AlphaNum4",[["assetCode",t.lookup("AssetCode4")],["issuer",t.lookup("AccountId")]]),t.struct("AlphaNum12",[["assetCode",t.lookup("AssetCode12")],["issuer",t.lookup("AccountId")]]),t.union("Asset",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",t.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:t.lookup("AlphaNum4"),alphaNum12:t.lookup("AlphaNum12")}}),t.struct("Price",[["n",t.lookup("Int32")],["d",t.lookup("Int32")]]),t.struct("Liabilities",[["buying",t.lookup("Int64")],["selling",t.lookup("Int64")]]),t.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),t.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),t.struct("Signer",[["key",t.lookup("SignerKey")],["weight",t.lookup("Uint32")]]),t.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),t.const("MASK_ACCOUNT_FLAGS",7),t.const("MASK_ACCOUNT_FLAGS_V17",15),t.const("MAX_SIGNERS",20),t.typedef("SponsorshipDescriptor",t.option(t.lookup("AccountId"))),t.struct("AccountEntryExtensionV3",[["ext",t.lookup("ExtensionPoint")],["seqLedger",t.lookup("Uint32")],["seqTime",t.lookup("TimePoint")]]),t.union("AccountEntryExtensionV2Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[3,"v3"]],arms:{v3:t.lookup("AccountEntryExtensionV3")}}),t.struct("AccountEntryExtensionV2",[["numSponsored",t.lookup("Uint32")],["numSponsoring",t.lookup("Uint32")],["signerSponsoringIDs",t.varArray(t.lookup("SponsorshipDescriptor"),t.lookup("MAX_SIGNERS"))],["ext",t.lookup("AccountEntryExtensionV2Ext")]]),t.union("AccountEntryExtensionV1Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[2,"v2"]],arms:{v2:t.lookup("AccountEntryExtensionV2")}}),t.struct("AccountEntryExtensionV1",[["liabilities",t.lookup("Liabilities")],["ext",t.lookup("AccountEntryExtensionV1Ext")]]),t.union("AccountEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("AccountEntryExtensionV1")}}),t.struct("AccountEntry",[["accountId",t.lookup("AccountId")],["balance",t.lookup("Int64")],["seqNum",t.lookup("SequenceNumber")],["numSubEntries",t.lookup("Uint32")],["inflationDest",t.option(t.lookup("AccountId"))],["flags",t.lookup("Uint32")],["homeDomain",t.lookup("String32")],["thresholds",t.lookup("Thresholds")],["signers",t.varArray(t.lookup("Signer"),t.lookup("MAX_SIGNERS"))],["ext",t.lookup("AccountEntryExt")]]),t.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),t.const("MASK_TRUSTLINE_FLAGS",1),t.const("MASK_TRUSTLINE_FLAGS_V13",3),t.const("MASK_TRUSTLINE_FLAGS_V17",7),t.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),t.union("TrustLineAsset",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",t.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:t.lookup("AlphaNum4"),alphaNum12:t.lookup("AlphaNum12"),liquidityPoolId:t.lookup("PoolId")}}),t.union("TrustLineEntryExtensionV2Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",t.lookup("Int32")],["ext",t.lookup("TrustLineEntryExtensionV2Ext")]]),t.union("TrustLineEntryV1Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[2,"v2"]],arms:{v2:t.lookup("TrustLineEntryExtensionV2")}}),t.struct("TrustLineEntryV1",[["liabilities",t.lookup("Liabilities")],["ext",t.lookup("TrustLineEntryV1Ext")]]),t.union("TrustLineEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("TrustLineEntryV1")}}),t.struct("TrustLineEntry",[["accountId",t.lookup("AccountId")],["asset",t.lookup("TrustLineAsset")],["balance",t.lookup("Int64")],["limit",t.lookup("Int64")],["flags",t.lookup("Uint32")],["ext",t.lookup("TrustLineEntryExt")]]),t.enum("OfferEntryFlags",{passiveFlag:1}),t.const("MASK_OFFERENTRY_FLAGS",1),t.union("OfferEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("OfferEntry",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Int64")],["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")],["flags",t.lookup("Uint32")],["ext",t.lookup("OfferEntryExt")]]),t.union("DataEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("DataEntry",[["accountId",t.lookup("AccountId")],["dataName",t.lookup("String64")],["dataValue",t.lookup("DataValue")],["ext",t.lookup("DataEntryExt")]]),t.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),t.union("ClaimPredicate",{switchOn:t.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",t.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:t.varArray(t.lookup("ClaimPredicate"),2),orPredicates:t.varArray(t.lookup("ClaimPredicate"),2),notPredicate:t.option(t.lookup("ClaimPredicate")),absBefore:t.lookup("Int64"),relBefore:t.lookup("Int64")}}),t.enum("ClaimantType",{claimantTypeV0:0}),t.struct("ClaimantV0",[["destination",t.lookup("AccountId")],["predicate",t.lookup("ClaimPredicate")]]),t.union("Claimant",{switchOn:t.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:t.lookup("ClaimantV0")}}),t.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),t.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),t.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("ClaimableBalanceEntryExtensionV1",[["ext",t.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",t.lookup("Uint32")]]),t.union("ClaimableBalanceEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("ClaimableBalanceEntryExtensionV1")}}),t.struct("ClaimableBalanceEntry",[["balanceId",t.lookup("ClaimableBalanceId")],["claimants",t.varArray(t.lookup("Claimant"),10)],["asset",t.lookup("Asset")],["amount",t.lookup("Int64")],["ext",t.lookup("ClaimableBalanceEntryExt")]]),t.struct("LiquidityPoolConstantProductParameters",[["assetA",t.lookup("Asset")],["assetB",t.lookup("Asset")],["fee",t.lookup("Int32")]]),t.struct("LiquidityPoolEntryConstantProduct",[["params",t.lookup("LiquidityPoolConstantProductParameters")],["reserveA",t.lookup("Int64")],["reserveB",t.lookup("Int64")],["totalPoolShares",t.lookup("Int64")],["poolSharesTrustLineCount",t.lookup("Int64")]]),t.union("LiquidityPoolEntryBody",{switchOn:t.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:t.lookup("LiquidityPoolEntryConstantProduct")}}),t.struct("LiquidityPoolEntry",[["liquidityPoolId",t.lookup("PoolId")],["body",t.lookup("LiquidityPoolEntryBody")]]),t.enum("ContractDataDurability",{temporary:0,persistent:1}),t.struct("ContractDataEntry",[["ext",t.lookup("ExtensionPoint")],["contract",t.lookup("ScAddress")],["key",t.lookup("ScVal")],["durability",t.lookup("ContractDataDurability")],["val",t.lookup("ScVal")]]),t.struct("ContractCodeCostInputs",[["ext",t.lookup("ExtensionPoint")],["nInstructions",t.lookup("Uint32")],["nFunctions",t.lookup("Uint32")],["nGlobals",t.lookup("Uint32")],["nTableEntries",t.lookup("Uint32")],["nTypes",t.lookup("Uint32")],["nDataSegments",t.lookup("Uint32")],["nElemSegments",t.lookup("Uint32")],["nImports",t.lookup("Uint32")],["nExports",t.lookup("Uint32")],["nDataSegmentBytes",t.lookup("Uint32")]]),t.struct("ContractCodeEntryV1",[["ext",t.lookup("ExtensionPoint")],["costInputs",t.lookup("ContractCodeCostInputs")]]),t.union("ContractCodeEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("ContractCodeEntryV1")}}),t.struct("ContractCodeEntry",[["ext",t.lookup("ContractCodeEntryExt")],["hash",t.lookup("Hash")],["code",t.varOpaque()]]),t.struct("TtlEntry",[["keyHash",t.lookup("Hash")],["liveUntilLedgerSeq",t.lookup("Uint32")]]),t.union("LedgerEntryExtensionV1Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("LedgerEntryExtensionV1",[["sponsoringId",t.lookup("SponsorshipDescriptor")],["ext",t.lookup("LedgerEntryExtensionV1Ext")]]),t.union("LedgerEntryData",{switchOn:t.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:t.lookup("AccountEntry"),trustLine:t.lookup("TrustLineEntry"),offer:t.lookup("OfferEntry"),data:t.lookup("DataEntry"),claimableBalance:t.lookup("ClaimableBalanceEntry"),liquidityPool:t.lookup("LiquidityPoolEntry"),contractData:t.lookup("ContractDataEntry"),contractCode:t.lookup("ContractCodeEntry"),configSetting:t.lookup("ConfigSettingEntry"),ttl:t.lookup("TtlEntry")}}),t.union("LedgerEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("LedgerEntryExtensionV1")}}),t.struct("LedgerEntry",[["lastModifiedLedgerSeq",t.lookup("Uint32")],["data",t.lookup("LedgerEntryData")],["ext",t.lookup("LedgerEntryExt")]]),t.struct("LedgerKeyAccount",[["accountId",t.lookup("AccountId")]]),t.struct("LedgerKeyTrustLine",[["accountId",t.lookup("AccountId")],["asset",t.lookup("TrustLineAsset")]]),t.struct("LedgerKeyOffer",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Int64")]]),t.struct("LedgerKeyData",[["accountId",t.lookup("AccountId")],["dataName",t.lookup("String64")]]),t.struct("LedgerKeyClaimableBalance",[["balanceId",t.lookup("ClaimableBalanceId")]]),t.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",t.lookup("PoolId")]]),t.struct("LedgerKeyContractData",[["contract",t.lookup("ScAddress")],["key",t.lookup("ScVal")],["durability",t.lookup("ContractDataDurability")]]),t.struct("LedgerKeyContractCode",[["hash",t.lookup("Hash")]]),t.struct("LedgerKeyConfigSetting",[["configSettingId",t.lookup("ConfigSettingId")]]),t.struct("LedgerKeyTtl",[["keyHash",t.lookup("Hash")]]),t.union("LedgerKey",{switchOn:t.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:t.lookup("LedgerKeyAccount"),trustLine:t.lookup("LedgerKeyTrustLine"),offer:t.lookup("LedgerKeyOffer"),data:t.lookup("LedgerKeyData"),claimableBalance:t.lookup("LedgerKeyClaimableBalance"),liquidityPool:t.lookup("LedgerKeyLiquidityPool"),contractData:t.lookup("LedgerKeyContractData"),contractCode:t.lookup("LedgerKeyContractCode"),configSetting:t.lookup("LedgerKeyConfigSetting"),ttl:t.lookup("LedgerKeyTtl")}}),t.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),t.enum("BucketListType",{live:0,hotArchive:1}),t.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),t.enum("HotArchiveBucketEntryType",{hotArchiveMetaentry:-1,hotArchiveArchived:0,hotArchiveLive:1}),t.union("BucketMetadataExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"bucketListType"]],arms:{bucketListType:t.lookup("BucketListType")}}),t.struct("BucketMetadata",[["ledgerVersion",t.lookup("Uint32")],["ext",t.lookup("BucketMetadataExt")]]),t.union("BucketEntry",{switchOn:t.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:t.lookup("LedgerEntry"),deadEntry:t.lookup("LedgerKey"),metaEntry:t.lookup("BucketMetadata")}}),t.union("HotArchiveBucketEntry",{switchOn:t.lookup("HotArchiveBucketEntryType"),switchName:"type",switches:[["hotArchiveArchived","archivedEntry"],["hotArchiveLive","key"],["hotArchiveMetaentry","metaEntry"]],arms:{archivedEntry:t.lookup("LedgerEntry"),key:t.lookup("LedgerKey"),metaEntry:t.lookup("BucketMetadata")}}),t.typedef("UpgradeType",t.varOpaque(128)),t.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),t.struct("LedgerCloseValueSignature",[["nodeId",t.lookup("NodeId")],["signature",t.lookup("Signature")]]),t.union("StellarValueExt",{switchOn:t.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",t.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:t.lookup("LedgerCloseValueSignature")}}),t.struct("StellarValue",[["txSetHash",t.lookup("Hash")],["closeTime",t.lookup("TimePoint")],["upgrades",t.varArray(t.lookup("UpgradeType"),6)],["ext",t.lookup("StellarValueExt")]]),t.const("MASK_LEDGER_HEADER_FLAGS",7),t.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),t.union("LedgerHeaderExtensionV1Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("LedgerHeaderExtensionV1",[["flags",t.lookup("Uint32")],["ext",t.lookup("LedgerHeaderExtensionV1Ext")]]),t.union("LedgerHeaderExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("LedgerHeaderExtensionV1")}}),t.struct("LedgerHeader",[["ledgerVersion",t.lookup("Uint32")],["previousLedgerHash",t.lookup("Hash")],["scpValue",t.lookup("StellarValue")],["txSetResultHash",t.lookup("Hash")],["bucketListHash",t.lookup("Hash")],["ledgerSeq",t.lookup("Uint32")],["totalCoins",t.lookup("Int64")],["feePool",t.lookup("Int64")],["inflationSeq",t.lookup("Uint32")],["idPool",t.lookup("Uint64")],["baseFee",t.lookup("Uint32")],["baseReserve",t.lookup("Uint32")],["maxTxSetSize",t.lookup("Uint32")],["skipList",t.array(t.lookup("Hash"),4)],["ext",t.lookup("LedgerHeaderExt")]]),t.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),t.struct("ConfigUpgradeSetKey",[["contractId",t.lookup("ContractId")],["contentHash",t.lookup("Hash")]]),t.union("LedgerUpgrade",{switchOn:t.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:t.lookup("Uint32"),newBaseFee:t.lookup("Uint32"),newMaxTxSetSize:t.lookup("Uint32"),newBaseReserve:t.lookup("Uint32"),newFlags:t.lookup("Uint32"),newConfig:t.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:t.lookup("Uint32")}}),t.struct("ConfigUpgradeSet",[["updatedEntry",t.varArray(t.lookup("ConfigSettingEntry"),2147483647)]]),t.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),t.typedef("DependentTxCluster",t.varArray(t.lookup("TransactionEnvelope"),2147483647)),t.typedef("ParallelTxExecutionStage",t.varArray(t.lookup("DependentTxCluster"),2147483647)),t.struct("ParallelTxsComponent",[["baseFee",t.option(t.lookup("Int64"))],["executionStages",t.varArray(t.lookup("ParallelTxExecutionStage"),2147483647)]]),t.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",t.option(t.lookup("Int64"))],["txes",t.varArray(t.lookup("TransactionEnvelope"),2147483647)]]),t.union("TxSetComponent",{switchOn:t.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:t.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),t.union("TransactionPhase",{switchOn:t.int(),switchName:"v",switches:[[0,"v0Components"],[1,"parallelTxsComponent"]],arms:{v0Components:t.varArray(t.lookup("TxSetComponent"),2147483647),parallelTxsComponent:t.lookup("ParallelTxsComponent")}}),t.struct("TransactionSet",[["previousLedgerHash",t.lookup("Hash")],["txes",t.varArray(t.lookup("TransactionEnvelope"),2147483647)]]),t.struct("TransactionSetV1",[["previousLedgerHash",t.lookup("Hash")],["phases",t.varArray(t.lookup("TransactionPhase"),2147483647)]]),t.union("GeneralizedTransactionSet",{switchOn:t.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:t.lookup("TransactionSetV1")}}),t.struct("TransactionResultPair",[["transactionHash",t.lookup("Hash")],["result",t.lookup("TransactionResult")]]),t.struct("TransactionResultSet",[["results",t.varArray(t.lookup("TransactionResultPair"),2147483647)]]),t.union("TransactionHistoryEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:t.lookup("GeneralizedTransactionSet")}}),t.struct("TransactionHistoryEntry",[["ledgerSeq",t.lookup("Uint32")],["txSet",t.lookup("TransactionSet")],["ext",t.lookup("TransactionHistoryEntryExt")]]),t.union("TransactionHistoryResultEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("TransactionHistoryResultEntry",[["ledgerSeq",t.lookup("Uint32")],["txResultSet",t.lookup("TransactionResultSet")],["ext",t.lookup("TransactionHistoryResultEntryExt")]]),t.union("LedgerHeaderHistoryEntryExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("LedgerHeaderHistoryEntry",[["hash",t.lookup("Hash")],["header",t.lookup("LedgerHeader")],["ext",t.lookup("LedgerHeaderHistoryEntryExt")]]),t.struct("LedgerScpMessages",[["ledgerSeq",t.lookup("Uint32")],["messages",t.varArray(t.lookup("ScpEnvelope"),2147483647)]]),t.struct("ScpHistoryEntryV0",[["quorumSets",t.varArray(t.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",t.lookup("LedgerScpMessages")]]),t.union("ScpHistoryEntry",{switchOn:t.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:t.lookup("ScpHistoryEntryV0")}}),t.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3,ledgerEntryRestored:4}),t.union("LedgerEntryChange",{switchOn:t.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"],["ledgerEntryRestored","restored"]],arms:{created:t.lookup("LedgerEntry"),updated:t.lookup("LedgerEntry"),removed:t.lookup("LedgerKey"),state:t.lookup("LedgerEntry"),restored:t.lookup("LedgerEntry")}}),t.typedef("LedgerEntryChanges",t.varArray(t.lookup("LedgerEntryChange"),2147483647)),t.struct("OperationMeta",[["changes",t.lookup("LedgerEntryChanges")]]),t.struct("TransactionMetaV1",[["txChanges",t.lookup("LedgerEntryChanges")],["operations",t.varArray(t.lookup("OperationMeta"),2147483647)]]),t.struct("TransactionMetaV2",[["txChangesBefore",t.lookup("LedgerEntryChanges")],["operations",t.varArray(t.lookup("OperationMeta"),2147483647)],["txChangesAfter",t.lookup("LedgerEntryChanges")]]),t.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),t.struct("ContractEventV0",[["topics",t.varArray(t.lookup("ScVal"),2147483647)],["data",t.lookup("ScVal")]]),t.union("ContractEventBody",{switchOn:t.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:t.lookup("ContractEventV0")}}),t.struct("ContractEvent",[["ext",t.lookup("ExtensionPoint")],["contractId",t.option(t.lookup("ContractId"))],["type",t.lookup("ContractEventType")],["body",t.lookup("ContractEventBody")]]),t.struct("DiagnosticEvent",[["inSuccessfulContractCall",t.bool()],["event",t.lookup("ContractEvent")]]),t.struct("SorobanTransactionMetaExtV1",[["ext",t.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",t.lookup("Int64")],["totalRefundableResourceFeeCharged",t.lookup("Int64")],["rentFeeCharged",t.lookup("Int64")]]),t.union("SorobanTransactionMetaExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("SorobanTransactionMetaExtV1")}}),t.struct("SorobanTransactionMeta",[["ext",t.lookup("SorobanTransactionMetaExt")],["events",t.varArray(t.lookup("ContractEvent"),2147483647)],["returnValue",t.lookup("ScVal")],["diagnosticEvents",t.varArray(t.lookup("DiagnosticEvent"),2147483647)]]),t.struct("TransactionMetaV3",[["ext",t.lookup("ExtensionPoint")],["txChangesBefore",t.lookup("LedgerEntryChanges")],["operations",t.varArray(t.lookup("OperationMeta"),2147483647)],["txChangesAfter",t.lookup("LedgerEntryChanges")],["sorobanMeta",t.option(t.lookup("SorobanTransactionMeta"))]]),t.struct("OperationMetaV2",[["ext",t.lookup("ExtensionPoint")],["changes",t.lookup("LedgerEntryChanges")],["events",t.varArray(t.lookup("ContractEvent"),2147483647)]]),t.struct("SorobanTransactionMetaV2",[["ext",t.lookup("SorobanTransactionMetaExt")],["returnValue",t.option(t.lookup("ScVal"))]]),t.enum("TransactionEventStage",{transactionEventStageBeforeAllTxes:0,transactionEventStageAfterTx:1,transactionEventStageAfterAllTxes:2}),t.struct("TransactionEvent",[["stage",t.lookup("TransactionEventStage")],["event",t.lookup("ContractEvent")]]),t.struct("TransactionMetaV4",[["ext",t.lookup("ExtensionPoint")],["txChangesBefore",t.lookup("LedgerEntryChanges")],["operations",t.varArray(t.lookup("OperationMetaV2"),2147483647)],["txChangesAfter",t.lookup("LedgerEntryChanges")],["sorobanMeta",t.option(t.lookup("SorobanTransactionMetaV2"))],["events",t.varArray(t.lookup("TransactionEvent"),2147483647)],["diagnosticEvents",t.varArray(t.lookup("DiagnosticEvent"),2147483647)]]),t.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",t.lookup("ScVal")],["events",t.varArray(t.lookup("ContractEvent"),2147483647)]]),t.union("TransactionMeta",{switchOn:t.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"],[4,"v4"]],arms:{operations:t.varArray(t.lookup("OperationMeta"),2147483647),v1:t.lookup("TransactionMetaV1"),v2:t.lookup("TransactionMetaV2"),v3:t.lookup("TransactionMetaV3"),v4:t.lookup("TransactionMetaV4")}}),t.struct("TransactionResultMeta",[["result",t.lookup("TransactionResultPair")],["feeProcessing",t.lookup("LedgerEntryChanges")],["txApplyProcessing",t.lookup("TransactionMeta")]]),t.struct("TransactionResultMetaV1",[["ext",t.lookup("ExtensionPoint")],["result",t.lookup("TransactionResultPair")],["feeProcessing",t.lookup("LedgerEntryChanges")],["txApplyProcessing",t.lookup("TransactionMeta")],["postTxApplyFeeProcessing",t.lookup("LedgerEntryChanges")]]),t.struct("UpgradeEntryMeta",[["upgrade",t.lookup("LedgerUpgrade")],["changes",t.lookup("LedgerEntryChanges")]]),t.struct("LedgerCloseMetaV0",[["ledgerHeader",t.lookup("LedgerHeaderHistoryEntry")],["txSet",t.lookup("TransactionSet")],["txProcessing",t.varArray(t.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",t.varArray(t.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",t.varArray(t.lookup("ScpHistoryEntry"),2147483647)]]),t.struct("LedgerCloseMetaExtV1",[["ext",t.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",t.lookup("Int64")]]),t.union("LedgerCloseMetaExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"v1"]],arms:{v1:t.lookup("LedgerCloseMetaExtV1")}}),t.struct("LedgerCloseMetaV1",[["ext",t.lookup("LedgerCloseMetaExt")],["ledgerHeader",t.lookup("LedgerHeaderHistoryEntry")],["txSet",t.lookup("GeneralizedTransactionSet")],["txProcessing",t.varArray(t.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",t.varArray(t.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",t.varArray(t.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfLiveSorobanState",t.lookup("Uint64")],["evictedKeys",t.varArray(t.lookup("LedgerKey"),2147483647)],["unused",t.varArray(t.lookup("LedgerEntry"),2147483647)]]),t.struct("LedgerCloseMetaV2",[["ext",t.lookup("LedgerCloseMetaExt")],["ledgerHeader",t.lookup("LedgerHeaderHistoryEntry")],["txSet",t.lookup("GeneralizedTransactionSet")],["txProcessing",t.varArray(t.lookup("TransactionResultMetaV1"),2147483647)],["upgradesProcessing",t.varArray(t.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",t.varArray(t.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfLiveSorobanState",t.lookup("Uint64")],["evictedKeys",t.varArray(t.lookup("LedgerKey"),2147483647)]]),t.union("LedgerCloseMeta",{switchOn:t.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"],[2,"v2"]],arms:{v0:t.lookup("LedgerCloseMetaV0"),v1:t.lookup("LedgerCloseMetaV1"),v2:t.lookup("LedgerCloseMetaV2")}}),t.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),t.struct("Error",[["code",t.lookup("ErrorCode")],["msg",t.string(100)]]),t.struct("SendMore",[["numMessages",t.lookup("Uint32")]]),t.struct("SendMoreExtended",[["numMessages",t.lookup("Uint32")],["numBytes",t.lookup("Uint32")]]),t.struct("AuthCert",[["pubkey",t.lookup("Curve25519Public")],["expiration",t.lookup("Uint64")],["sig",t.lookup("Signature")]]),t.struct("Hello",[["ledgerVersion",t.lookup("Uint32")],["overlayVersion",t.lookup("Uint32")],["overlayMinVersion",t.lookup("Uint32")],["networkId",t.lookup("Hash")],["versionStr",t.string(100)],["listeningPort",t.int()],["peerId",t.lookup("NodeId")],["cert",t.lookup("AuthCert")],["nonce",t.lookup("Uint256")]]),t.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),t.struct("Auth",[["flags",t.int()]]),t.enum("IpAddrType",{iPv4:0,iPv6:1}),t.union("PeerAddressIp",{switchOn:t.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:t.opaque(4),ipv6:t.opaque(16)}}),t.struct("PeerAddress",[["ip",t.lookup("PeerAddressIp")],["port",t.lookup("Uint32")],["numFailures",t.lookup("Uint32")]]),t.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19,timeSlicedSurveyRequest:21,timeSlicedSurveyResponse:22,timeSlicedSurveyStartCollecting:23,timeSlicedSurveyStopCollecting:24}),t.struct("DontHave",[["type",t.lookup("MessageType")],["reqHash",t.lookup("Uint256")]]),t.enum("SurveyMessageCommandType",{timeSlicedSurveyTopology:1}),t.enum("SurveyMessageResponseType",{surveyTopologyResponseV2:2}),t.struct("TimeSlicedSurveyStartCollectingMessage",[["surveyorId",t.lookup("NodeId")],["nonce",t.lookup("Uint32")],["ledgerNum",t.lookup("Uint32")]]),t.struct("SignedTimeSlicedSurveyStartCollectingMessage",[["signature",t.lookup("Signature")],["startCollecting",t.lookup("TimeSlicedSurveyStartCollectingMessage")]]),t.struct("TimeSlicedSurveyStopCollectingMessage",[["surveyorId",t.lookup("NodeId")],["nonce",t.lookup("Uint32")],["ledgerNum",t.lookup("Uint32")]]),t.struct("SignedTimeSlicedSurveyStopCollectingMessage",[["signature",t.lookup("Signature")],["stopCollecting",t.lookup("TimeSlicedSurveyStopCollectingMessage")]]),t.struct("SurveyRequestMessage",[["surveyorPeerId",t.lookup("NodeId")],["surveyedPeerId",t.lookup("NodeId")],["ledgerNum",t.lookup("Uint32")],["encryptionKey",t.lookup("Curve25519Public")],["commandType",t.lookup("SurveyMessageCommandType")]]),t.struct("TimeSlicedSurveyRequestMessage",[["request",t.lookup("SurveyRequestMessage")],["nonce",t.lookup("Uint32")],["inboundPeersIndex",t.lookup("Uint32")],["outboundPeersIndex",t.lookup("Uint32")]]),t.struct("SignedTimeSlicedSurveyRequestMessage",[["requestSignature",t.lookup("Signature")],["request",t.lookup("TimeSlicedSurveyRequestMessage")]]),t.typedef("EncryptedBody",t.varOpaque(64e3)),t.struct("SurveyResponseMessage",[["surveyorPeerId",t.lookup("NodeId")],["surveyedPeerId",t.lookup("NodeId")],["ledgerNum",t.lookup("Uint32")],["commandType",t.lookup("SurveyMessageCommandType")],["encryptedBody",t.lookup("EncryptedBody")]]),t.struct("TimeSlicedSurveyResponseMessage",[["response",t.lookup("SurveyResponseMessage")],["nonce",t.lookup("Uint32")]]),t.struct("SignedTimeSlicedSurveyResponseMessage",[["responseSignature",t.lookup("Signature")],["response",t.lookup("TimeSlicedSurveyResponseMessage")]]),t.struct("PeerStats",[["id",t.lookup("NodeId")],["versionStr",t.string(100)],["messagesRead",t.lookup("Uint64")],["messagesWritten",t.lookup("Uint64")],["bytesRead",t.lookup("Uint64")],["bytesWritten",t.lookup("Uint64")],["secondsConnected",t.lookup("Uint64")],["uniqueFloodBytesRecv",t.lookup("Uint64")],["duplicateFloodBytesRecv",t.lookup("Uint64")],["uniqueFetchBytesRecv",t.lookup("Uint64")],["duplicateFetchBytesRecv",t.lookup("Uint64")],["uniqueFloodMessageRecv",t.lookup("Uint64")],["duplicateFloodMessageRecv",t.lookup("Uint64")],["uniqueFetchMessageRecv",t.lookup("Uint64")],["duplicateFetchMessageRecv",t.lookup("Uint64")]]),t.struct("TimeSlicedNodeData",[["addedAuthenticatedPeers",t.lookup("Uint32")],["droppedAuthenticatedPeers",t.lookup("Uint32")],["totalInboundPeerCount",t.lookup("Uint32")],["totalOutboundPeerCount",t.lookup("Uint32")],["p75ScpFirstToSelfLatencyMs",t.lookup("Uint32")],["p75ScpSelfToOtherLatencyMs",t.lookup("Uint32")],["lostSyncCount",t.lookup("Uint32")],["isValidator",t.bool()],["maxInboundPeerCount",t.lookup("Uint32")],["maxOutboundPeerCount",t.lookup("Uint32")]]),t.struct("TimeSlicedPeerData",[["peerStats",t.lookup("PeerStats")],["averageLatencyMs",t.lookup("Uint32")]]),t.typedef("TimeSlicedPeerDataList",t.varArray(t.lookup("TimeSlicedPeerData"),25)),t.struct("TopologyResponseBodyV2",[["inboundPeers",t.lookup("TimeSlicedPeerDataList")],["outboundPeers",t.lookup("TimeSlicedPeerDataList")],["nodeData",t.lookup("TimeSlicedNodeData")]]),t.union("SurveyResponseBody",{switchOn:t.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV2","topologyResponseBodyV2"]],arms:{topologyResponseBodyV2:t.lookup("TopologyResponseBodyV2")}}),t.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),t.typedef("TxAdvertVector",t.varArray(t.lookup("Hash"),t.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),t.struct("FloodAdvert",[["txHashes",t.lookup("TxAdvertVector")]]),t.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),t.typedef("TxDemandVector",t.varArray(t.lookup("Hash"),t.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),t.struct("FloodDemand",[["txHashes",t.lookup("TxDemandVector")]]),t.union("StellarMessage",{switchOn:t.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["timeSlicedSurveyRequest","signedTimeSlicedSurveyRequestMessage"],["timeSlicedSurveyResponse","signedTimeSlicedSurveyResponseMessage"],["timeSlicedSurveyStartCollecting","signedTimeSlicedSurveyStartCollectingMessage"],["timeSlicedSurveyStopCollecting","signedTimeSlicedSurveyStopCollectingMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:t.lookup("Error"),hello:t.lookup("Hello"),auth:t.lookup("Auth"),dontHave:t.lookup("DontHave"),peers:t.varArray(t.lookup("PeerAddress"),100),txSetHash:t.lookup("Uint256"),txSet:t.lookup("TransactionSet"),generalizedTxSet:t.lookup("GeneralizedTransactionSet"),transaction:t.lookup("TransactionEnvelope"),signedTimeSlicedSurveyRequestMessage:t.lookup("SignedTimeSlicedSurveyRequestMessage"),signedTimeSlicedSurveyResponseMessage:t.lookup("SignedTimeSlicedSurveyResponseMessage"),signedTimeSlicedSurveyStartCollectingMessage:t.lookup("SignedTimeSlicedSurveyStartCollectingMessage"),signedTimeSlicedSurveyStopCollectingMessage:t.lookup("SignedTimeSlicedSurveyStopCollectingMessage"),qSetHash:t.lookup("Uint256"),qSet:t.lookup("ScpQuorumSet"),envelope:t.lookup("ScpEnvelope"),getScpLedgerSeq:t.lookup("Uint32"),sendMoreMessage:t.lookup("SendMore"),sendMoreExtendedMessage:t.lookup("SendMoreExtended"),floodAdvert:t.lookup("FloodAdvert"),floodDemand:t.lookup("FloodDemand")}}),t.struct("AuthenticatedMessageV0",[["sequence",t.lookup("Uint64")],["message",t.lookup("StellarMessage")],["mac",t.lookup("HmacSha256Mac")]]),t.union("AuthenticatedMessage",{switchOn:t.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:t.lookup("AuthenticatedMessageV0")}}),t.const("MAX_OPS_PER_TX",100),t.union("LiquidityPoolParameters",{switchOn:t.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:t.lookup("LiquidityPoolConstantProductParameters")}}),t.struct("MuxedAccountMed25519",[["id",t.lookup("Uint64")],["ed25519",t.lookup("Uint256")]]),t.union("MuxedAccount",{switchOn:t.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:t.lookup("Uint256"),med25519:t.lookup("MuxedAccountMed25519")}}),t.struct("DecoratedSignature",[["hint",t.lookup("SignatureHint")],["signature",t.lookup("Signature")]]),t.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}),t.struct("CreateAccountOp",[["destination",t.lookup("AccountId")],["startingBalance",t.lookup("Int64")]]),t.struct("PaymentOp",[["destination",t.lookup("MuxedAccount")],["asset",t.lookup("Asset")],["amount",t.lookup("Int64")]]),t.struct("PathPaymentStrictReceiveOp",[["sendAsset",t.lookup("Asset")],["sendMax",t.lookup("Int64")],["destination",t.lookup("MuxedAccount")],["destAsset",t.lookup("Asset")],["destAmount",t.lookup("Int64")],["path",t.varArray(t.lookup("Asset"),5)]]),t.struct("PathPaymentStrictSendOp",[["sendAsset",t.lookup("Asset")],["sendAmount",t.lookup("Int64")],["destination",t.lookup("MuxedAccount")],["destAsset",t.lookup("Asset")],["destMin",t.lookup("Int64")],["path",t.varArray(t.lookup("Asset"),5)]]),t.struct("ManageSellOfferOp",[["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")],["offerId",t.lookup("Int64")]]),t.struct("ManageBuyOfferOp",[["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["buyAmount",t.lookup("Int64")],["price",t.lookup("Price")],["offerId",t.lookup("Int64")]]),t.struct("CreatePassiveSellOfferOp",[["selling",t.lookup("Asset")],["buying",t.lookup("Asset")],["amount",t.lookup("Int64")],["price",t.lookup("Price")]]),t.struct("SetOptionsOp",[["inflationDest",t.option(t.lookup("AccountId"))],["clearFlags",t.option(t.lookup("Uint32"))],["setFlags",t.option(t.lookup("Uint32"))],["masterWeight",t.option(t.lookup("Uint32"))],["lowThreshold",t.option(t.lookup("Uint32"))],["medThreshold",t.option(t.lookup("Uint32"))],["highThreshold",t.option(t.lookup("Uint32"))],["homeDomain",t.option(t.lookup("String32"))],["signer",t.option(t.lookup("Signer"))]]),t.union("ChangeTrustAsset",{switchOn:t.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",t.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:t.lookup("AlphaNum4"),alphaNum12:t.lookup("AlphaNum12"),liquidityPool:t.lookup("LiquidityPoolParameters")}}),t.struct("ChangeTrustOp",[["line",t.lookup("ChangeTrustAsset")],["limit",t.lookup("Int64")]]),t.struct("AllowTrustOp",[["trustor",t.lookup("AccountId")],["asset",t.lookup("AssetCode")],["authorize",t.lookup("Uint32")]]),t.struct("ManageDataOp",[["dataName",t.lookup("String64")],["dataValue",t.option(t.lookup("DataValue"))]]),t.struct("BumpSequenceOp",[["bumpTo",t.lookup("SequenceNumber")]]),t.struct("CreateClaimableBalanceOp",[["asset",t.lookup("Asset")],["amount",t.lookup("Int64")],["claimants",t.varArray(t.lookup("Claimant"),10)]]),t.struct("ClaimClaimableBalanceOp",[["balanceId",t.lookup("ClaimableBalanceId")]]),t.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",t.lookup("AccountId")]]),t.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),t.struct("RevokeSponsorshipOpSigner",[["accountId",t.lookup("AccountId")],["signerKey",t.lookup("SignerKey")]]),t.union("RevokeSponsorshipOp",{switchOn:t.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:t.lookup("LedgerKey"),signer:t.lookup("RevokeSponsorshipOpSigner")}}),t.struct("ClawbackOp",[["asset",t.lookup("Asset")],["from",t.lookup("MuxedAccount")],["amount",t.lookup("Int64")]]),t.struct("ClawbackClaimableBalanceOp",[["balanceId",t.lookup("ClaimableBalanceId")]]),t.struct("SetTrustLineFlagsOp",[["trustor",t.lookup("AccountId")],["asset",t.lookup("Asset")],["clearFlags",t.lookup("Uint32")],["setFlags",t.lookup("Uint32")]]),t.const("LIQUIDITY_POOL_FEE_V18",30),t.struct("LiquidityPoolDepositOp",[["liquidityPoolId",t.lookup("PoolId")],["maxAmountA",t.lookup("Int64")],["maxAmountB",t.lookup("Int64")],["minPrice",t.lookup("Price")],["maxPrice",t.lookup("Price")]]),t.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",t.lookup("PoolId")],["amount",t.lookup("Int64")],["minAmountA",t.lookup("Int64")],["minAmountB",t.lookup("Int64")]]),t.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2,hostFunctionTypeCreateContractV2:3}),t.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),t.struct("ContractIdPreimageFromAddress",[["address",t.lookup("ScAddress")],["salt",t.lookup("Uint256")]]),t.union("ContractIdPreimage",{switchOn:t.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:t.lookup("ContractIdPreimageFromAddress"),fromAsset:t.lookup("Asset")}}),t.struct("CreateContractArgs",[["contractIdPreimage",t.lookup("ContractIdPreimage")],["executable",t.lookup("ContractExecutable")]]),t.struct("CreateContractArgsV2",[["contractIdPreimage",t.lookup("ContractIdPreimage")],["executable",t.lookup("ContractExecutable")],["constructorArgs",t.varArray(t.lookup("ScVal"),2147483647)]]),t.struct("InvokeContractArgs",[["contractAddress",t.lookup("ScAddress")],["functionName",t.lookup("ScSymbol")],["args",t.varArray(t.lookup("ScVal"),2147483647)]]),t.union("HostFunction",{switchOn:t.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"],["hostFunctionTypeCreateContractV2","createContractV2"]],arms:{invokeContract:t.lookup("InvokeContractArgs"),createContract:t.lookup("CreateContractArgs"),wasm:t.varOpaque(),createContractV2:t.lookup("CreateContractArgsV2")}}),t.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1,sorobanAuthorizedFunctionTypeCreateContractV2HostFn:2}),t.union("SorobanAuthorizedFunction",{switchOn:t.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"],["sorobanAuthorizedFunctionTypeCreateContractV2HostFn","createContractV2HostFn"]],arms:{contractFn:t.lookup("InvokeContractArgs"),createContractHostFn:t.lookup("CreateContractArgs"),createContractV2HostFn:t.lookup("CreateContractArgsV2")}}),t.struct("SorobanAuthorizedInvocation",[["function",t.lookup("SorobanAuthorizedFunction")],["subInvocations",t.varArray(t.lookup("SorobanAuthorizedInvocation"),2147483647)]]),t.struct("SorobanAddressCredentials",[["address",t.lookup("ScAddress")],["nonce",t.lookup("Int64")],["signatureExpirationLedger",t.lookup("Uint32")],["signature",t.lookup("ScVal")]]),t.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),t.union("SorobanCredentials",{switchOn:t.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",t.void()],["sorobanCredentialsAddress","address"]],arms:{address:t.lookup("SorobanAddressCredentials")}}),t.struct("SorobanAuthorizationEntry",[["credentials",t.lookup("SorobanCredentials")],["rootInvocation",t.lookup("SorobanAuthorizedInvocation")]]),t.typedef("SorobanAuthorizationEntries",t.varArray(t.lookup("SorobanAuthorizationEntry"),2147483647)),t.struct("InvokeHostFunctionOp",[["hostFunction",t.lookup("HostFunction")],["auth",t.varArray(t.lookup("SorobanAuthorizationEntry"),2147483647)]]),t.struct("ExtendFootprintTtlOp",[["ext",t.lookup("ExtensionPoint")],["extendTo",t.lookup("Uint32")]]),t.struct("RestoreFootprintOp",[["ext",t.lookup("ExtensionPoint")]]),t.union("OperationBody",{switchOn:t.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",t.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",t.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:t.lookup("CreateAccountOp"),paymentOp:t.lookup("PaymentOp"),pathPaymentStrictReceiveOp:t.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:t.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:t.lookup("CreatePassiveSellOfferOp"),setOptionsOp:t.lookup("SetOptionsOp"),changeTrustOp:t.lookup("ChangeTrustOp"),allowTrustOp:t.lookup("AllowTrustOp"),destination:t.lookup("MuxedAccount"),manageDataOp:t.lookup("ManageDataOp"),bumpSequenceOp:t.lookup("BumpSequenceOp"),manageBuyOfferOp:t.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:t.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:t.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:t.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:t.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:t.lookup("RevokeSponsorshipOp"),clawbackOp:t.lookup("ClawbackOp"),clawbackClaimableBalanceOp:t.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:t.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:t.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:t.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:t.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:t.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:t.lookup("RestoreFootprintOp")}}),t.struct("Operation",[["sourceAccount",t.option(t.lookup("MuxedAccount"))],["body",t.lookup("OperationBody")]]),t.struct("HashIdPreimageOperationId",[["sourceAccount",t.lookup("AccountId")],["seqNum",t.lookup("SequenceNumber")],["opNum",t.lookup("Uint32")]]),t.struct("HashIdPreimageRevokeId",[["sourceAccount",t.lookup("AccountId")],["seqNum",t.lookup("SequenceNumber")],["opNum",t.lookup("Uint32")],["liquidityPoolId",t.lookup("PoolId")],["asset",t.lookup("Asset")]]),t.struct("HashIdPreimageContractId",[["networkId",t.lookup("Hash")],["contractIdPreimage",t.lookup("ContractIdPreimage")]]),t.struct("HashIdPreimageSorobanAuthorization",[["networkId",t.lookup("Hash")],["nonce",t.lookup("Int64")],["signatureExpirationLedger",t.lookup("Uint32")],["invocation",t.lookup("SorobanAuthorizedInvocation")]]),t.union("HashIdPreimage",{switchOn:t.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:t.lookup("HashIdPreimageOperationId"),revokeId:t.lookup("HashIdPreimageRevokeId"),contractId:t.lookup("HashIdPreimageContractId"),sorobanAuthorization:t.lookup("HashIdPreimageSorobanAuthorization")}}),t.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),t.union("Memo",{switchOn:t.lookup("MemoType"),switchName:"type",switches:[["memoNone",t.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:t.string(28),id:t.lookup("Uint64"),hash:t.lookup("Hash"),retHash:t.lookup("Hash")}}),t.struct("TimeBounds",[["minTime",t.lookup("TimePoint")],["maxTime",t.lookup("TimePoint")]]),t.struct("LedgerBounds",[["minLedger",t.lookup("Uint32")],["maxLedger",t.lookup("Uint32")]]),t.struct("PreconditionsV2",[["timeBounds",t.option(t.lookup("TimeBounds"))],["ledgerBounds",t.option(t.lookup("LedgerBounds"))],["minSeqNum",t.option(t.lookup("SequenceNumber"))],["minSeqAge",t.lookup("Duration")],["minSeqLedgerGap",t.lookup("Uint32")],["extraSigners",t.varArray(t.lookup("SignerKey"),2)]]),t.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),t.union("Preconditions",{switchOn:t.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",t.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:t.lookup("TimeBounds"),v2:t.lookup("PreconditionsV2")}}),t.struct("LedgerFootprint",[["readOnly",t.varArray(t.lookup("LedgerKey"),2147483647)],["readWrite",t.varArray(t.lookup("LedgerKey"),2147483647)]]),t.struct("SorobanResources",[["footprint",t.lookup("LedgerFootprint")],["instructions",t.lookup("Uint32")],["diskReadBytes",t.lookup("Uint32")],["writeBytes",t.lookup("Uint32")]]),t.struct("SorobanResourcesExtV0",[["archivedSorobanEntries",t.varArray(t.lookup("Uint32"),2147483647)]]),t.union("SorobanTransactionDataExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"resourceExt"]],arms:{resourceExt:t.lookup("SorobanResourcesExtV0")}}),t.struct("SorobanTransactionData",[["ext",t.lookup("SorobanTransactionDataExt")],["resources",t.lookup("SorobanResources")],["resourceFee",t.lookup("Int64")]]),t.union("TransactionV0Ext",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("TransactionV0",[["sourceAccountEd25519",t.lookup("Uint256")],["fee",t.lookup("Uint32")],["seqNum",t.lookup("SequenceNumber")],["timeBounds",t.option(t.lookup("TimeBounds"))],["memo",t.lookup("Memo")],["operations",t.varArray(t.lookup("Operation"),t.lookup("MAX_OPS_PER_TX"))],["ext",t.lookup("TransactionV0Ext")]]),t.struct("TransactionV0Envelope",[["tx",t.lookup("TransactionV0")],["signatures",t.varArray(t.lookup("DecoratedSignature"),20)]]),t.union("TransactionExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()],[1,"sorobanData"]],arms:{sorobanData:t.lookup("SorobanTransactionData")}}),t.struct("Transaction",[["sourceAccount",t.lookup("MuxedAccount")],["fee",t.lookup("Uint32")],["seqNum",t.lookup("SequenceNumber")],["cond",t.lookup("Preconditions")],["memo",t.lookup("Memo")],["operations",t.varArray(t.lookup("Operation"),t.lookup("MAX_OPS_PER_TX"))],["ext",t.lookup("TransactionExt")]]),t.struct("TransactionV1Envelope",[["tx",t.lookup("Transaction")],["signatures",t.varArray(t.lookup("DecoratedSignature"),20)]]),t.union("FeeBumpTransactionInnerTx",{switchOn:t.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:t.lookup("TransactionV1Envelope")}}),t.union("FeeBumpTransactionExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("FeeBumpTransaction",[["feeSource",t.lookup("MuxedAccount")],["fee",t.lookup("Int64")],["innerTx",t.lookup("FeeBumpTransactionInnerTx")],["ext",t.lookup("FeeBumpTransactionExt")]]),t.struct("FeeBumpTransactionEnvelope",[["tx",t.lookup("FeeBumpTransaction")],["signatures",t.varArray(t.lookup("DecoratedSignature"),20)]]),t.union("TransactionEnvelope",{switchOn:t.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:t.lookup("TransactionV0Envelope"),v1:t.lookup("TransactionV1Envelope"),feeBump:t.lookup("FeeBumpTransactionEnvelope")}}),t.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:t.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:t.lookup("Transaction"),feeBump:t.lookup("FeeBumpTransaction")}}),t.struct("TransactionSignaturePayload",[["networkId",t.lookup("Hash")],["taggedTransaction",t.lookup("TransactionSignaturePayloadTaggedTransaction")]]),t.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),t.struct("ClaimOfferAtomV0",[["sellerEd25519",t.lookup("Uint256")],["offerId",t.lookup("Int64")],["assetSold",t.lookup("Asset")],["amountSold",t.lookup("Int64")],["assetBought",t.lookup("Asset")],["amountBought",t.lookup("Int64")]]),t.struct("ClaimOfferAtom",[["sellerId",t.lookup("AccountId")],["offerId",t.lookup("Int64")],["assetSold",t.lookup("Asset")],["amountSold",t.lookup("Int64")],["assetBought",t.lookup("Asset")],["amountBought",t.lookup("Int64")]]),t.struct("ClaimLiquidityAtom",[["liquidityPoolId",t.lookup("PoolId")],["assetSold",t.lookup("Asset")],["amountSold",t.lookup("Int64")],["assetBought",t.lookup("Asset")],["amountBought",t.lookup("Int64")]]),t.union("ClaimAtom",{switchOn:t.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:t.lookup("ClaimOfferAtomV0"),orderBook:t.lookup("ClaimOfferAtom"),liquidityPool:t.lookup("ClaimLiquidityAtom")}}),t.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),t.union("CreateAccountResult",{switchOn:t.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",t.void()],["createAccountMalformed",t.void()],["createAccountUnderfunded",t.void()],["createAccountLowReserve",t.void()],["createAccountAlreadyExist",t.void()]],arms:{}}),t.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),t.union("PaymentResult",{switchOn:t.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",t.void()],["paymentMalformed",t.void()],["paymentUnderfunded",t.void()],["paymentSrcNoTrust",t.void()],["paymentSrcNotAuthorized",t.void()],["paymentNoDestination",t.void()],["paymentNoTrust",t.void()],["paymentNotAuthorized",t.void()],["paymentLineFull",t.void()],["paymentNoIssuer",t.void()]],arms:{}}),t.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}),t.struct("SimplePaymentResult",[["destination",t.lookup("AccountId")],["asset",t.lookup("Asset")],["amount",t.lookup("Int64")]]),t.struct("PathPaymentStrictReceiveResultSuccess",[["offers",t.varArray(t.lookup("ClaimAtom"),2147483647)],["last",t.lookup("SimplePaymentResult")]]),t.union("PathPaymentStrictReceiveResult",{switchOn:t.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",t.void()],["pathPaymentStrictReceiveUnderfunded",t.void()],["pathPaymentStrictReceiveSrcNoTrust",t.void()],["pathPaymentStrictReceiveSrcNotAuthorized",t.void()],["pathPaymentStrictReceiveNoDestination",t.void()],["pathPaymentStrictReceiveNoTrust",t.void()],["pathPaymentStrictReceiveNotAuthorized",t.void()],["pathPaymentStrictReceiveLineFull",t.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",t.void()],["pathPaymentStrictReceiveOfferCrossSelf",t.void()],["pathPaymentStrictReceiveOverSendmax",t.void()]],arms:{success:t.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:t.lookup("Asset")}}),t.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}),t.struct("PathPaymentStrictSendResultSuccess",[["offers",t.varArray(t.lookup("ClaimAtom"),2147483647)],["last",t.lookup("SimplePaymentResult")]]),t.union("PathPaymentStrictSendResult",{switchOn:t.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",t.void()],["pathPaymentStrictSendUnderfunded",t.void()],["pathPaymentStrictSendSrcNoTrust",t.void()],["pathPaymentStrictSendSrcNotAuthorized",t.void()],["pathPaymentStrictSendNoDestination",t.void()],["pathPaymentStrictSendNoTrust",t.void()],["pathPaymentStrictSendNotAuthorized",t.void()],["pathPaymentStrictSendLineFull",t.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",t.void()],["pathPaymentStrictSendOfferCrossSelf",t.void()],["pathPaymentStrictSendUnderDestmin",t.void()]],arms:{success:t.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:t.lookup("Asset")}}),t.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}),t.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),t.union("ManageOfferSuccessResultOffer",{switchOn:t.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",t.void()]],arms:{offer:t.lookup("OfferEntry")}}),t.struct("ManageOfferSuccessResult",[["offersClaimed",t.varArray(t.lookup("ClaimAtom"),2147483647)],["offer",t.lookup("ManageOfferSuccessResultOffer")]]),t.union("ManageSellOfferResult",{switchOn:t.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",t.void()],["manageSellOfferSellNoTrust",t.void()],["manageSellOfferBuyNoTrust",t.void()],["manageSellOfferSellNotAuthorized",t.void()],["manageSellOfferBuyNotAuthorized",t.void()],["manageSellOfferLineFull",t.void()],["manageSellOfferUnderfunded",t.void()],["manageSellOfferCrossSelf",t.void()],["manageSellOfferSellNoIssuer",t.void()],["manageSellOfferBuyNoIssuer",t.void()],["manageSellOfferNotFound",t.void()],["manageSellOfferLowReserve",t.void()]],arms:{success:t.lookup("ManageOfferSuccessResult")}}),t.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}),t.union("ManageBuyOfferResult",{switchOn:t.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",t.void()],["manageBuyOfferSellNoTrust",t.void()],["manageBuyOfferBuyNoTrust",t.void()],["manageBuyOfferSellNotAuthorized",t.void()],["manageBuyOfferBuyNotAuthorized",t.void()],["manageBuyOfferLineFull",t.void()],["manageBuyOfferUnderfunded",t.void()],["manageBuyOfferCrossSelf",t.void()],["manageBuyOfferSellNoIssuer",t.void()],["manageBuyOfferBuyNoIssuer",t.void()],["manageBuyOfferNotFound",t.void()],["manageBuyOfferLowReserve",t.void()]],arms:{success:t.lookup("ManageOfferSuccessResult")}}),t.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),t.union("SetOptionsResult",{switchOn:t.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",t.void()],["setOptionsLowReserve",t.void()],["setOptionsTooManySigners",t.void()],["setOptionsBadFlags",t.void()],["setOptionsInvalidInflation",t.void()],["setOptionsCantChange",t.void()],["setOptionsUnknownFlag",t.void()],["setOptionsThresholdOutOfRange",t.void()],["setOptionsBadSigner",t.void()],["setOptionsInvalidHomeDomain",t.void()],["setOptionsAuthRevocableRequired",t.void()]],arms:{}}),t.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),t.union("ChangeTrustResult",{switchOn:t.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",t.void()],["changeTrustMalformed",t.void()],["changeTrustNoIssuer",t.void()],["changeTrustInvalidLimit",t.void()],["changeTrustLowReserve",t.void()],["changeTrustSelfNotAllowed",t.void()],["changeTrustTrustLineMissing",t.void()],["changeTrustCannotDelete",t.void()],["changeTrustNotAuthMaintainLiabilities",t.void()]],arms:{}}),t.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),t.union("AllowTrustResult",{switchOn:t.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",t.void()],["allowTrustMalformed",t.void()],["allowTrustNoTrustLine",t.void()],["allowTrustTrustNotRequired",t.void()],["allowTrustCantRevoke",t.void()],["allowTrustSelfNotAllowed",t.void()],["allowTrustLowReserve",t.void()]],arms:{}}),t.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),t.union("AccountMergeResult",{switchOn:t.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",t.void()],["accountMergeNoAccount",t.void()],["accountMergeImmutableSet",t.void()],["accountMergeHasSubEntries",t.void()],["accountMergeSeqnumTooFar",t.void()],["accountMergeDestFull",t.void()],["accountMergeIsSponsor",t.void()]],arms:{sourceAccountBalance:t.lookup("Int64")}}),t.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),t.struct("InflationPayout",[["destination",t.lookup("AccountId")],["amount",t.lookup("Int64")]]),t.union("InflationResult",{switchOn:t.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",t.void()]],arms:{payouts:t.varArray(t.lookup("InflationPayout"),2147483647)}}),t.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),t.union("ManageDataResult",{switchOn:t.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",t.void()],["manageDataNotSupportedYet",t.void()],["manageDataNameNotFound",t.void()],["manageDataLowReserve",t.void()],["manageDataInvalidName",t.void()]],arms:{}}),t.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),t.union("BumpSequenceResult",{switchOn:t.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",t.void()],["bumpSequenceBadSeq",t.void()]],arms:{}}),t.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),t.union("CreateClaimableBalanceResult",{switchOn:t.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",t.void()],["createClaimableBalanceLowReserve",t.void()],["createClaimableBalanceNoTrust",t.void()],["createClaimableBalanceNotAuthorized",t.void()],["createClaimableBalanceUnderfunded",t.void()]],arms:{balanceId:t.lookup("ClaimableBalanceId")}}),t.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),t.union("ClaimClaimableBalanceResult",{switchOn:t.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",t.void()],["claimClaimableBalanceDoesNotExist",t.void()],["claimClaimableBalanceCannotClaim",t.void()],["claimClaimableBalanceLineFull",t.void()],["claimClaimableBalanceNoTrust",t.void()],["claimClaimableBalanceNotAuthorized",t.void()]],arms:{}}),t.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),t.union("BeginSponsoringFutureReservesResult",{switchOn:t.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",t.void()],["beginSponsoringFutureReservesMalformed",t.void()],["beginSponsoringFutureReservesAlreadySponsored",t.void()],["beginSponsoringFutureReservesRecursive",t.void()]],arms:{}}),t.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),t.union("EndSponsoringFutureReservesResult",{switchOn:t.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",t.void()],["endSponsoringFutureReservesNotSponsored",t.void()]],arms:{}}),t.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),t.union("RevokeSponsorshipResult",{switchOn:t.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",t.void()],["revokeSponsorshipDoesNotExist",t.void()],["revokeSponsorshipNotSponsor",t.void()],["revokeSponsorshipLowReserve",t.void()],["revokeSponsorshipOnlyTransferable",t.void()],["revokeSponsorshipMalformed",t.void()]],arms:{}}),t.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),t.union("ClawbackResult",{switchOn:t.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",t.void()],["clawbackMalformed",t.void()],["clawbackNotClawbackEnabled",t.void()],["clawbackNoTrust",t.void()],["clawbackUnderfunded",t.void()]],arms:{}}),t.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),t.union("ClawbackClaimableBalanceResult",{switchOn:t.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",t.void()],["clawbackClaimableBalanceDoesNotExist",t.void()],["clawbackClaimableBalanceNotIssuer",t.void()],["clawbackClaimableBalanceNotClawbackEnabled",t.void()]],arms:{}}),t.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),t.union("SetTrustLineFlagsResult",{switchOn:t.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",t.void()],["setTrustLineFlagsMalformed",t.void()],["setTrustLineFlagsNoTrustLine",t.void()],["setTrustLineFlagsCantRevoke",t.void()],["setTrustLineFlagsInvalidState",t.void()],["setTrustLineFlagsLowReserve",t.void()]],arms:{}}),t.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),t.union("LiquidityPoolDepositResult",{switchOn:t.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",t.void()],["liquidityPoolDepositMalformed",t.void()],["liquidityPoolDepositNoTrust",t.void()],["liquidityPoolDepositNotAuthorized",t.void()],["liquidityPoolDepositUnderfunded",t.void()],["liquidityPoolDepositLineFull",t.void()],["liquidityPoolDepositBadPrice",t.void()],["liquidityPoolDepositPoolFull",t.void()]],arms:{}}),t.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),t.union("LiquidityPoolWithdrawResult",{switchOn:t.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",t.void()],["liquidityPoolWithdrawMalformed",t.void()],["liquidityPoolWithdrawNoTrust",t.void()],["liquidityPoolWithdrawUnderfunded",t.void()],["liquidityPoolWithdrawLineFull",t.void()],["liquidityPoolWithdrawUnderMinimum",t.void()]],arms:{}}),t.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),t.union("InvokeHostFunctionResult",{switchOn:t.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",t.void()],["invokeHostFunctionTrapped",t.void()],["invokeHostFunctionResourceLimitExceeded",t.void()],["invokeHostFunctionEntryArchived",t.void()],["invokeHostFunctionInsufficientRefundableFee",t.void()]],arms:{success:t.lookup("Hash")}}),t.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),t.union("ExtendFootprintTtlResult",{switchOn:t.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",t.void()],["extendFootprintTtlMalformed",t.void()],["extendFootprintTtlResourceLimitExceeded",t.void()],["extendFootprintTtlInsufficientRefundableFee",t.void()]],arms:{}}),t.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),t.union("RestoreFootprintResult",{switchOn:t.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",t.void()],["restoreFootprintMalformed",t.void()],["restoreFootprintResourceLimitExceeded",t.void()],["restoreFootprintInsufficientRefundableFee",t.void()]],arms:{}}),t.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),t.union("OperationResultTr",{switchOn:t.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:t.lookup("CreateAccountResult"),paymentResult:t.lookup("PaymentResult"),pathPaymentStrictReceiveResult:t.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:t.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:t.lookup("ManageSellOfferResult"),setOptionsResult:t.lookup("SetOptionsResult"),changeTrustResult:t.lookup("ChangeTrustResult"),allowTrustResult:t.lookup("AllowTrustResult"),accountMergeResult:t.lookup("AccountMergeResult"),inflationResult:t.lookup("InflationResult"),manageDataResult:t.lookup("ManageDataResult"),bumpSeqResult:t.lookup("BumpSequenceResult"),manageBuyOfferResult:t.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:t.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:t.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:t.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:t.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:t.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:t.lookup("RevokeSponsorshipResult"),clawbackResult:t.lookup("ClawbackResult"),clawbackClaimableBalanceResult:t.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:t.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:t.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:t.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:t.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:t.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:t.lookup("RestoreFootprintResult")}}),t.union("OperationResult",{switchOn:t.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",t.void()],["opNoAccount",t.void()],["opNotSupported",t.void()],["opTooManySubentries",t.void()],["opExceededWorkLimit",t.void()],["opTooManySponsoring",t.void()]],arms:{tr:t.lookup("OperationResultTr")}}),t.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}),t.union("InnerTransactionResultResult",{switchOn:t.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",t.void()],["txTooLate",t.void()],["txMissingOperation",t.void()],["txBadSeq",t.void()],["txBadAuth",t.void()],["txInsufficientBalance",t.void()],["txNoAccount",t.void()],["txInsufficientFee",t.void()],["txBadAuthExtra",t.void()],["txInternalError",t.void()],["txNotSupported",t.void()],["txBadSponsorship",t.void()],["txBadMinSeqAgeOrGap",t.void()],["txMalformed",t.void()],["txSorobanInvalid",t.void()]],arms:{results:t.varArray(t.lookup("OperationResult"),2147483647)}}),t.union("InnerTransactionResultExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("InnerTransactionResult",[["feeCharged",t.lookup("Int64")],["result",t.lookup("InnerTransactionResultResult")],["ext",t.lookup("InnerTransactionResultExt")]]),t.struct("InnerTransactionResultPair",[["transactionHash",t.lookup("Hash")],["result",t.lookup("InnerTransactionResult")]]),t.union("TransactionResultResult",{switchOn:t.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",t.void()],["txTooLate",t.void()],["txMissingOperation",t.void()],["txBadSeq",t.void()],["txBadAuth",t.void()],["txInsufficientBalance",t.void()],["txNoAccount",t.void()],["txInsufficientFee",t.void()],["txBadAuthExtra",t.void()],["txInternalError",t.void()],["txNotSupported",t.void()],["txBadSponsorship",t.void()],["txBadMinSeqAgeOrGap",t.void()],["txMalformed",t.void()],["txSorobanInvalid",t.void()]],arms:{innerResultPair:t.lookup("InnerTransactionResultPair"),results:t.varArray(t.lookup("OperationResult"),2147483647)}}),t.union("TransactionResultExt",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.struct("TransactionResult",[["feeCharged",t.lookup("Int64")],["result",t.lookup("TransactionResultResult")],["ext",t.lookup("TransactionResultExt")]]),t.typedef("Hash",t.opaque(32)),t.typedef("Uint256",t.opaque(32)),t.typedef("Uint32",t.uint()),t.typedef("Int32",t.int()),t.typedef("Uint64",t.uhyper()),t.typedef("Int64",t.hyper()),t.typedef("TimePoint",t.lookup("Uint64")),t.typedef("Duration",t.lookup("Uint64")),t.union("ExtensionPoint",{switchOn:t.int(),switchName:"v",switches:[[0,t.void()]],arms:{}}),t.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),t.enum("PublicKeyType",{publicKeyTypeEd25519:0}),t.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),t.union("PublicKey",{switchOn:t.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:t.lookup("Uint256")}}),t.struct("SignerKeyEd25519SignedPayload",[["ed25519",t.lookup("Uint256")],["payload",t.varOpaque(64)]]),t.union("SignerKey",{switchOn:t.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:t.lookup("Uint256"),preAuthTx:t.lookup("Uint256"),hashX:t.lookup("Uint256"),ed25519SignedPayload:t.lookup("SignerKeyEd25519SignedPayload")}}),t.typedef("Signature",t.varOpaque(64)),t.typedef("SignatureHint",t.opaque(4)),t.typedef("NodeId",t.lookup("PublicKey")),t.typedef("AccountId",t.lookup("PublicKey")),t.typedef("ContractId",t.lookup("Hash")),t.struct("Curve25519Secret",[["key",t.opaque(32)]]),t.struct("Curve25519Public",[["key",t.opaque(32)]]),t.struct("HmacSha256Key",[["key",t.opaque(32)]]),t.struct("HmacSha256Mac",[["mac",t.opaque(32)]]),t.struct("ShortHashSeed",[["seed",t.opaque(16)]]),t.enum("BinaryFuseFilterType",{binaryFuseFilter8Bit:0,binaryFuseFilter16Bit:1,binaryFuseFilter32Bit:2}),t.struct("SerializedBinaryFuseFilter",[["type",t.lookup("BinaryFuseFilterType")],["inputHashSeed",t.lookup("ShortHashSeed")],["filterSeed",t.lookup("ShortHashSeed")],["segmentLength",t.lookup("Uint32")],["segementLengthMask",t.lookup("Uint32")],["segmentCount",t.lookup("Uint32")],["segmentCountLength",t.lookup("Uint32")],["fingerprintLength",t.lookup("Uint32")],["fingerprints",t.varOpaque()]]),t.typedef("PoolId",t.lookup("Hash")),t.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),t.union("ClaimableBalanceId",{switchOn:t.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:t.lookup("Hash")}}),t.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}),t.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),t.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),t.union("ScError",{switchOn:t.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:t.lookup("Uint32"),code:t.lookup("ScErrorCode")}}),t.struct("UInt128Parts",[["hi",t.lookup("Uint64")],["lo",t.lookup("Uint64")]]),t.struct("Int128Parts",[["hi",t.lookup("Int64")],["lo",t.lookup("Uint64")]]),t.struct("UInt256Parts",[["hiHi",t.lookup("Uint64")],["hiLo",t.lookup("Uint64")],["loHi",t.lookup("Uint64")],["loLo",t.lookup("Uint64")]]),t.struct("Int256Parts",[["hiHi",t.lookup("Int64")],["hiLo",t.lookup("Uint64")],["loHi",t.lookup("Uint64")],["loLo",t.lookup("Uint64")]]),t.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),t.union("ContractExecutable",{switchOn:t.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",t.void()]],arms:{wasmHash:t.lookup("Hash")}}),t.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1,scAddressTypeMuxedAccount:2,scAddressTypeClaimableBalance:3,scAddressTypeLiquidityPool:4}),t.struct("MuxedEd25519Account",[["id",t.lookup("Uint64")],["ed25519",t.lookup("Uint256")]]),t.union("ScAddress",{switchOn:t.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"],["scAddressTypeMuxedAccount","muxedAccount"],["scAddressTypeClaimableBalance","claimableBalanceId"],["scAddressTypeLiquidityPool","liquidityPoolId"]],arms:{accountId:t.lookup("AccountId"),contractId:t.lookup("ContractId"),muxedAccount:t.lookup("MuxedEd25519Account"),claimableBalanceId:t.lookup("ClaimableBalanceId"),liquidityPoolId:t.lookup("PoolId")}}),t.const("SCSYMBOL_LIMIT",32),t.typedef("ScVec",t.varArray(t.lookup("ScVal"),2147483647)),t.typedef("ScMap",t.varArray(t.lookup("ScMapEntry"),2147483647)),t.typedef("ScBytes",t.varOpaque()),t.typedef("ScString",t.string()),t.typedef("ScSymbol",t.string(32)),t.struct("ScNonceKey",[["nonce",t.lookup("Int64")]]),t.struct("ScContractInstance",[["executable",t.lookup("ContractExecutable")],["storage",t.option(t.lookup("ScMap"))]]),t.union("ScVal",{switchOn:t.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",t.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"],["scvContractInstance","instance"],["scvLedgerKeyContractInstance",t.void()],["scvLedgerKeyNonce","nonceKey"]],arms:{b:t.bool(),error:t.lookup("ScError"),u32:t.lookup("Uint32"),i32:t.lookup("Int32"),u64:t.lookup("Uint64"),i64:t.lookup("Int64"),timepoint:t.lookup("TimePoint"),duration:t.lookup("Duration"),u128:t.lookup("UInt128Parts"),i128:t.lookup("Int128Parts"),u256:t.lookup("UInt256Parts"),i256:t.lookup("Int256Parts"),bytes:t.lookup("ScBytes"),str:t.lookup("ScString"),sym:t.lookup("ScSymbol"),vec:t.option(t.lookup("ScVec")),map:t.option(t.lookup("ScMap")),address:t.lookup("ScAddress"),instance:t.lookup("ScContractInstance"),nonceKey:t.lookup("ScNonceKey")}}),t.struct("ScMapEntry",[["key",t.lookup("ScVal")],["val",t.lookup("ScVal")]]),t.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),t.struct("ScEnvMetaEntryInterfaceVersion",[["protocol",t.lookup("Uint32")],["preRelease",t.lookup("Uint32")]]),t.union("ScEnvMetaEntry",{switchOn:t.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:t.lookup("ScEnvMetaEntryInterfaceVersion")}}),t.struct("ScMetaV0",[["key",t.string()],["val",t.string()]]),t.enum("ScMetaKind",{scMetaV0:0}),t.union("ScMetaEntry",{switchOn:t.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:t.lookup("ScMetaV0")}}),t.const("SC_SPEC_DOC_LIMIT",1024),t.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,scSpecTypeMuxedAddress:20,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),t.struct("ScSpecTypeOption",[["valueType",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecTypeResult",[["okType",t.lookup("ScSpecTypeDef")],["errorType",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecTypeVec",[["elementType",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecTypeMap",[["keyType",t.lookup("ScSpecTypeDef")],["valueType",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecTypeTuple",[["valueTypes",t.varArray(t.lookup("ScSpecTypeDef"),12)]]),t.struct("ScSpecTypeBytesN",[["n",t.lookup("Uint32")]]),t.struct("ScSpecTypeUdt",[["name",t.string(60)]]),t.union("ScSpecTypeDef",{switchOn:t.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",t.void()],["scSpecTypeBool",t.void()],["scSpecTypeVoid",t.void()],["scSpecTypeError",t.void()],["scSpecTypeU32",t.void()],["scSpecTypeI32",t.void()],["scSpecTypeU64",t.void()],["scSpecTypeI64",t.void()],["scSpecTypeTimepoint",t.void()],["scSpecTypeDuration",t.void()],["scSpecTypeU128",t.void()],["scSpecTypeI128",t.void()],["scSpecTypeU256",t.void()],["scSpecTypeI256",t.void()],["scSpecTypeBytes",t.void()],["scSpecTypeString",t.void()],["scSpecTypeSymbol",t.void()],["scSpecTypeAddress",t.void()],["scSpecTypeMuxedAddress",t.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:t.lookup("ScSpecTypeOption"),result:t.lookup("ScSpecTypeResult"),vec:t.lookup("ScSpecTypeVec"),map:t.lookup("ScSpecTypeMap"),tuple:t.lookup("ScSpecTypeTuple"),bytesN:t.lookup("ScSpecTypeBytesN"),udt:t.lookup("ScSpecTypeUdt")}}),t.struct("ScSpecUdtStructFieldV0",[["doc",t.string(e)],["name",t.string(30)],["type",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecUdtStructV0",[["doc",t.string(e)],["lib",t.string(80)],["name",t.string(60)],["fields",t.varArray(t.lookup("ScSpecUdtStructFieldV0"),40)]]),t.struct("ScSpecUdtUnionCaseVoidV0",[["doc",t.string(e)],["name",t.string(60)]]),t.struct("ScSpecUdtUnionCaseTupleV0",[["doc",t.string(e)],["name",t.string(60)],["type",t.varArray(t.lookup("ScSpecTypeDef"),12)]]),t.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),t.union("ScSpecUdtUnionCaseV0",{switchOn:t.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:t.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:t.lookup("ScSpecUdtUnionCaseTupleV0")}}),t.struct("ScSpecUdtUnionV0",[["doc",t.string(e)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtUnionCaseV0"),50)]]),t.struct("ScSpecUdtEnumCaseV0",[["doc",t.string(e)],["name",t.string(60)],["value",t.lookup("Uint32")]]),t.struct("ScSpecUdtEnumV0",[["doc",t.string(e)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtEnumCaseV0"),50)]]),t.struct("ScSpecUdtErrorEnumCaseV0",[["doc",t.string(e)],["name",t.string(60)],["value",t.lookup("Uint32")]]),t.struct("ScSpecUdtErrorEnumV0",[["doc",t.string(e)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),t.struct("ScSpecFunctionInputV0",[["doc",t.string(e)],["name",t.string(30)],["type",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecFunctionV0",[["doc",t.string(e)],["name",t.lookup("ScSymbol")],["inputs",t.varArray(t.lookup("ScSpecFunctionInputV0"),10)],["outputs",t.varArray(t.lookup("ScSpecTypeDef"),1)]]),t.enum("ScSpecEventParamLocationV0",{scSpecEventParamLocationData:0,scSpecEventParamLocationTopicList:1}),t.struct("ScSpecEventParamV0",[["doc",t.string(e)],["name",t.string(30)],["type",t.lookup("ScSpecTypeDef")],["location",t.lookup("ScSpecEventParamLocationV0")]]),t.enum("ScSpecEventDataFormat",{scSpecEventDataFormatSingleValue:0,scSpecEventDataFormatVec:1,scSpecEventDataFormatMap:2}),t.struct("ScSpecEventV0",[["doc",t.string(e)],["lib",t.string(80)],["name",t.lookup("ScSymbol")],["prefixTopics",t.varArray(t.lookup("ScSymbol"),2)],["params",t.varArray(t.lookup("ScSpecEventParamV0"),50)],["dataFormat",t.lookup("ScSpecEventDataFormat")]]),t.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4,scSpecEntryEventV0:5}),t.union("ScSpecEntry",{switchOn:t.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"],["scSpecEntryEventV0","eventV0"]],arms:{functionV0:t.lookup("ScSpecFunctionV0"),udtStructV0:t.lookup("ScSpecUdtStructV0"),udtUnionV0:t.lookup("ScSpecUdtUnionV0"),udtEnumV0:t.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:t.lookup("ScSpecUdtErrorEnumV0"),eventV0:t.lookup("ScSpecEventV0")}}),t.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",t.lookup("Uint32")]]),t.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",t.lookup("Int64")],["txMaxInstructions",t.lookup("Int64")],["feeRatePerInstructionsIncrement",t.lookup("Int64")],["txMemoryLimit",t.lookup("Uint32")]]),t.struct("ConfigSettingContractParallelComputeV0",[["ledgerMaxDependentTxClusters",t.lookup("Uint32")]]),t.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxDiskReadEntries",t.lookup("Uint32")],["ledgerMaxDiskReadBytes",t.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",t.lookup("Uint32")],["ledgerMaxWriteBytes",t.lookup("Uint32")],["txMaxDiskReadEntries",t.lookup("Uint32")],["txMaxDiskReadBytes",t.lookup("Uint32")],["txMaxWriteLedgerEntries",t.lookup("Uint32")],["txMaxWriteBytes",t.lookup("Uint32")],["feeDiskReadLedgerEntry",t.lookup("Int64")],["feeWriteLedgerEntry",t.lookup("Int64")],["feeDiskRead1Kb",t.lookup("Int64")],["sorobanStateTargetSizeBytes",t.lookup("Int64")],["rentFee1KbSorobanStateSizeLow",t.lookup("Int64")],["rentFee1KbSorobanStateSizeHigh",t.lookup("Int64")],["sorobanStateRentFeeGrowthFactor",t.lookup("Uint32")]]),t.struct("ConfigSettingContractLedgerCostExtV0",[["txMaxFootprintEntries",t.lookup("Uint32")],["feeWrite1Kb",t.lookup("Int64")]]),t.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",t.lookup("Int64")]]),t.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",t.lookup("Uint32")],["feeContractEvents1Kb",t.lookup("Int64")]]),t.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",t.lookup("Uint32")],["txMaxSizeBytes",t.lookup("Uint32")],["feeTxSize1Kb",t.lookup("Int64")]]),t.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,bls12381EncodeFp:45,bls12381DecodeFp:46,bls12381G1CheckPointOnCurve:47,bls12381G1CheckPointInSubgroup:48,bls12381G2CheckPointOnCurve:49,bls12381G2CheckPointInSubgroup:50,bls12381G1ProjectiveToAffine:51,bls12381G2ProjectiveToAffine:52,bls12381G1Add:53,bls12381G1Mul:54,bls12381G1Msm:55,bls12381MapFpToG1:56,bls12381HashToG1:57,bls12381G2Add:58,bls12381G2Mul:59,bls12381G2Msm:60,bls12381MapFp2ToG2:61,bls12381HashToG2:62,bls12381Pairing:63,bls12381FrFromU256:64,bls12381FrToU256:65,bls12381FrAddSub:66,bls12381FrMul:67,bls12381FrPow:68,bls12381FrInv:69}),t.struct("ContractCostParamEntry",[["ext",t.lookup("ExtensionPoint")],["constTerm",t.lookup("Int64")],["linearTerm",t.lookup("Int64")]]),t.struct("StateArchivalSettings",[["maxEntryTtl",t.lookup("Uint32")],["minTemporaryTtl",t.lookup("Uint32")],["minPersistentTtl",t.lookup("Uint32")],["persistentRentRateDenominator",t.lookup("Int64")],["tempRentRateDenominator",t.lookup("Int64")],["maxEntriesToArchive",t.lookup("Uint32")],["liveSorobanStateSizeWindowSampleSize",t.lookup("Uint32")],["liveSorobanStateSizeWindowSamplePeriod",t.lookup("Uint32")],["evictionScanSize",t.lookup("Uint32")],["startingEvictionScanLevel",t.lookup("Uint32")]]),t.struct("EvictionIterator",[["bucketListLevel",t.lookup("Uint32")],["isCurrBucket",t.bool()],["bucketFileOffset",t.lookup("Uint64")]]),t.struct("ConfigSettingScpTiming",[["ledgerTargetCloseTimeMilliseconds",t.lookup("Uint32")],["nominationTimeoutInitialMilliseconds",t.lookup("Uint32")],["nominationTimeoutIncrementMilliseconds",t.lookup("Uint32")],["ballotTimeoutInitialMilliseconds",t.lookup("Uint32")],["ballotTimeoutIncrementMilliseconds",t.lookup("Uint32")]]),t.const("CONTRACT_COST_COUNT_LIMIT",1024),t.typedef("ContractCostParams",t.varArray(t.lookup("ContractCostParamEntry"),t.lookup("CONTRACT_COST_COUNT_LIMIT"))),t.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,configSettingLiveSorobanStateSizeWindow:12,configSettingEvictionIterator:13,configSettingContractParallelComputeV0:14,configSettingContractLedgerCostExtV0:15,configSettingScpTiming:16}),t.union("ConfigSettingEntry",{switchOn:t.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"],["configSettingLiveSorobanStateSizeWindow","liveSorobanStateSizeWindow"],["configSettingEvictionIterator","evictionIterator"],["configSettingContractParallelComputeV0","contractParallelCompute"],["configSettingContractLedgerCostExtV0","contractLedgerCostExt"],["configSettingScpTiming","contractScpTiming"]],arms:{contractMaxSizeBytes:t.lookup("Uint32"),contractCompute:t.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:t.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:t.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:t.lookup("ConfigSettingContractEventsV0"),contractBandwidth:t.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:t.lookup("ContractCostParams"),contractCostParamsMemBytes:t.lookup("ContractCostParams"),contractDataKeySizeBytes:t.lookup("Uint32"),contractDataEntrySizeBytes:t.lookup("Uint32"),stateArchivalSettings:t.lookup("StateArchivalSettings"),contractExecutionLanes:t.lookup("ConfigSettingContractExecutionLanesV0"),liveSorobanStateSizeWindow:t.varArray(t.lookup("Uint64"),2147483647),evictionIterator:t.lookup("EvictionIterator"),contractParallelCompute:t.lookup("ConfigSettingContractParallelComputeV0"),contractLedgerCostExt:t.lookup("ConfigSettingContractLedgerCostExtV0"),contractScpTiming:t.lookup("ConfigSettingScpTiming")}}),t.struct("LedgerCloseMetaBatch",[["startSequence",t.lookup("Uint32")],["endSequence",t.lookup("Uint32")],["ledgerCloseMeta",t.varArray(t.lookup("LedgerCloseMeta"),2147483647)]])});let o=S,A={XdrWriter:p.XdrWriter,XdrReader:p.XdrReader};var v=w(2802);function l(t){var e=new v.sha256;return e.update(t,"utf8"),e.digest()}let c=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function R(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function f(t,...e){if(!R(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function E(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function k(...t){for(let e=0;ee.toString(16).padStart(2,"0"));function z(t){if(f(t),_)return t.toHex();let e="";for(let r=0;r=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void 0}function L(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(_)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let s=new Uint8Array(r);for(let V=0,Tt=0;VV-Yt&&(this.process(s,0),Yt=0);for(let Ve=Yt;Ve>nr&fr),Nr=Number(ge&fr),Sr=Xe?4:0,sn=Xe?0:4;Ve.setUint32(ae+Sr,Or,Xe),Ve.setUint32(ae+sn,Nr,Xe)})(s,V-8,BigInt(8*this.length),Tt),this.process(s,0);let re=y(e),me=this.outputLen;if(me%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let Se=me/4,tr=this.get();if(Se>tr.length)throw new Error("_sha2: outputLen bigger than state");for(let Ve=0;Ve>i&ct)}:{h:0|Number(t>>i&ct),l:0|Number(t&ct)}}let N=(t,e,r)=>t>>>r,K=(t,e,r)=>t<<32-r|e>>>r,dt=(t,e,r)=>t>>>r|e<<32-r,j=(t,e,r)=>t<<32-r|e>>>r,pt=(t,e,r)=>t<<64-r|e>>>r-32,_t=(t,e,r)=>t>>>r-32|e<<64-r;function ot(t,e,r,s){let V=(e>>>0)+(s>>>0);return{h:t+r+(V/4294967296|0)|0,l:0|V}}let it=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Et=(t,e,r,s)=>e+r+s+(t/2**32|0)|0,jt=(t,e,r,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(s>>>0),et=(t,e,r,s,V)=>e+r+s+V+(t/2**32|0)|0,nt=(t,e,r,s,V)=>(t>>>0)+(e>>>0)+(r>>>0)+(s>>>0)+(V>>>0),rt=(t,e,r,s,V,Tt)=>e+r+s+V+Tt+(t/2**32|0)|0,F=(function(t,e=!1){let r=t.length,s=new Uint32Array(r),V=new Uint32Array(r);for(let Tt=0;TtBigInt(t))),lt=F[0],At=F[1],Mt=new Uint32Array(80),$t=new Uint32Array(80);class de extends Bt{constructor(e=64){super(128,e,16,!1),this.Ah=0|q[0],this.Al=0|q[1],this.Bh=0|q[2],this.Bl=0|q[3],this.Ch=0|q[4],this.Cl=0|q[5],this.Dh=0|q[6],this.Dl=0|q[7],this.Eh=0|q[8],this.El=0|q[9],this.Fh=0|q[10],this.Fl=0|q[11],this.Gh=0|q[12],this.Gl=0|q[13],this.Hh=0|q[14],this.Hl=0|q[15]}get(){let{Ah:e,Al:r,Bh:s,Bl:V,Ch:Tt,Cl:Yt,Dh:re,Dl:me,Eh:Se,El:tr,Fh:Ve,Fl:ae,Gh:ge,Gl:Xe,Hh:nr,Hl:fr}=this;return[e,r,s,V,Tt,Yt,re,me,Se,tr,Ve,ae,ge,Xe,nr,fr]}set(e,r,s,V,Tt,Yt,re,me,Se,tr,Ve,ae,ge,Xe,nr,fr){this.Ah=0|e,this.Al=0|r,this.Bh=0|s,this.Bl=0|V,this.Ch=0|Tt,this.Cl=0|Yt,this.Dh=0|re,this.Dl=0|me,this.Eh=0|Se,this.El=0|tr,this.Fh=0|Ve,this.Fl=0|ae,this.Gh=0|ge,this.Gl=0|Xe,this.Hh=0|nr,this.Hl=0|fr}process(e,r){for(let Sr=0;Sr<16;Sr++,r+=4)Mt[Sr]=e.getUint32(r),$t[Sr]=e.getUint32(r+=4);for(let Sr=16;Sr<80;Sr++){let sn=0|Mt[Sr-15],xr=0|$t[Sr-15],ar=dt(sn,xr,1)^dt(sn,xr,8)^N(sn,0,7),mr=j(sn,xr,1)^j(sn,xr,8)^K(sn,xr,7),er=0|Mt[Sr-2],Ar=0|$t[Sr-2],ze=dt(er,Ar,19)^pt(er,Ar,61)^N(er,0,6),tn=j(er,Ar,19)^_t(er,Ar,61)^K(er,Ar,6),Gr=jt(mr,tn,$t[Sr-7],$t[Sr-16]),nn=et(Gr,ar,ze,Mt[Sr-7],Mt[Sr-16]);Mt[Sr]=0|nn,$t[Sr]=0|Gr}let{Ah:s,Al:V,Bh:Tt,Bl:Yt,Ch:re,Cl:me,Dh:Se,Dl:tr,Eh:Ve,El:ae,Fh:ge,Fl:Xe,Gh:nr,Gl:fr,Hh:Or,Hl:Nr}=this;for(let Sr=0;Sr<80;Sr++){let sn=dt(Ve,ae,14)^dt(Ve,ae,18)^pt(Ve,ae,41),xr=j(Ve,ae,14)^j(Ve,ae,18)^_t(Ve,ae,41),ar=Ve&ge^~Ve&nr,mr=nt(Nr,xr,ae&Xe^~ae&fr,At[Sr],$t[Sr]),er=rt(mr,Or,sn,ar,lt[Sr],Mt[Sr]),Ar=0|mr,ze=dt(s,V,28)^pt(s,V,34)^pt(s,V,39),tn=j(s,V,28)^_t(s,V,34)^_t(s,V,39),Gr=s&Tt^s&re^Tt&re,nn=V&Yt^V&me^Yt&me;Or=0|nr,Nr=0|fr,nr=0|ge,fr=0|Xe,ge=0|Ve,Xe=0|ae,{h:Ve,l:ae}=ot(0|Se,0|tr,0|er,0|Ar),Se=0|re,tr=0|me,re=0|Tt,me=0|Yt,Tt=0|s,Yt=0|V;let Mr=it(Ar,tn,nn);s=Et(Mr,er,ze,Gr),V=0|Mr}({h:s,l:V}=ot(0|this.Ah,0|this.Al,0|s,0|V)),{h:Tt,l:Yt}=ot(0|this.Bh,0|this.Bl,0|Tt,0|Yt),{h:re,l:me}=ot(0|this.Ch,0|this.Cl,0|re,0|me),{h:Se,l:tr}=ot(0|this.Dh,0|this.Dl,0|Se,0|tr),{h:Ve,l:ae}=ot(0|this.Eh,0|this.El,0|Ve,0|ae),{h:ge,l:Xe}=ot(0|this.Fh,0|this.Fl,0|ge,0|Xe),{h:nr,l:fr}=ot(0|this.Gh,0|this.Gl,0|nr,0|fr),{h:Or,l:Nr}=ot(0|this.Hh,0|this.Hl,0|Or,0|Nr),this.set(s,V,Tt,Yt,re,me,Se,tr,Ve,ae,ge,Xe,nr,fr,Or,Nr)}roundClean(){k(Mt,$t)}destroy(){k(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let u=(function(t){let e=s=>t().update(ut(s)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e})(()=>new de),g=BigInt(0),I=BigInt(1);function W(t,e=""){if(typeof t!="boolean")throw new Error((e&&`"${e}"`)+"expected boolean, got type="+typeof t);return t}function Q(t,e,r=""){let s=R(t),V=t?.length,Tt=e!==void 0;if(!s||Tt&&V!==e)throw new Error((r&&`"${r}" `)+"expected Uint8Array"+(Tt?` of length ${e}`:"")+", got "+(s?`length=${V}`:"type="+typeof t));return t}function St(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?g:BigInt("0x"+t)}function d(t){return f(t),St(z(Uint8Array.from(t).reverse()))}function U(t,e){return L(t.toString(16).padStart(2*e,"0"))}function M(t,e,r){let s;if(typeof e=="string")try{s=L(e)}catch(Tt){throw new Error(t+" must be hex string or Uint8Array, cause: "+Tt)}else{if(!R(e))throw new Error(t+" must be hex string or Uint8Array");s=Uint8Array.from(e)}let V=s.length;if(typeof r=="number"&&V!==r)throw new Error(t+" of length "+r+" expected, got "+V);return s}function It(t){return Uint8Array.from(t)}let Jt=t=>typeof t=="bigint"&&g<=t;function Wt(t,e,r,s){if(!(function(V,Tt,Yt){return Jt(V)&&Jt(Tt)&&Jt(Yt)&&Tt<=V&&V(I<s(V,Tt,!1)),Object.entries(r).forEach(([V,Tt])=>s(V,Tt,!0))}let G=()=>{throw new Error("not implemented")};function at(t){let e=new WeakMap;return(r,...s)=>{let V=e.get(r);if(V!==void 0)return V;let Tt=t(r,...s);return e.set(r,Tt),Tt}}let Vt=BigInt(0),Pt=BigInt(1),D=BigInt(2),mt=BigInt(3),gt=BigInt(4),ft=BigInt(5),Gt=BigInt(7),Lt=BigInt(8),ie=BigInt(9),$e=BigInt(16);function Ce(t,e){let r=t%e;return r>=Vt?r:e+r}function He(t,e,r){let s=t;for(;e-- >Vt;)s*=s,s%=r;return s}function rr(t,e){if(t===Vt)throw new Error("invert: expected non-zero number");if(e<=Vt)throw new Error("invert: expected positive modulus, got "+e);let r=Ce(t,e),s=e,V=Vt,Tt=Pt,Yt=Pt,re=Vt;for(;r!==Vt;){let me=s/r,Se=s%r,tr=V-Yt*me,Ve=Tt-re*me;s=r,r=Se,V=Yt,Tt=re,Yt=tr,re=Ve}if(s!==Pt)throw new Error("invert: does not exist");return Ce(V,e)}function qe(t,e,r){if(!t.eql(t.sqr(e),r))throw new Error("Cannot find square root")}function pr(t,e){let r=(t.ORDER+Pt)/gt,s=t.pow(e,r);return qe(t,s,e),s}function De(t,e){let r=(t.ORDER-ft)/Lt,s=t.mul(e,D),V=t.pow(s,r),Tt=t.mul(e,V),Yt=t.mul(t.mul(Tt,D),V),re=t.mul(Tt,t.sub(Yt,t.ONE));return qe(t,re,e),re}function dr(t){if(t1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return pr;let Tt=V.pow(s,e),Yt=(e+Pt)/D;return function(re,me){if(re.is0(me))return me;if(En(re,me)!==1)throw new Error("Cannot find square root");let Se=r,tr=re.mul(re.ONE,Tt),Ve=re.pow(me,e),ae=re.pow(me,Yt);for(;!re.eql(Ve,re.ONE);){if(re.is0(Ve))return re.ZERO;let ge=1,Xe=re.sqr(Ve);for(;!re.eql(Xe,re.ONE);)if(ge++,Xe=re.sqr(Xe),ge===Se)throw new Error("Cannot find square root");let nr=Pt<(Ce(t,e)&Pt)===Pt,Zr=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function bn(t,e,r=!1){let s=new Array(e.length).fill(r?t.ZERO:void 0),V=e.reduce((Yt,re,me)=>t.is0(re)?Yt:(s[me]=Yt,t.mul(Yt,re)),t.ONE),Tt=t.inv(V);return e.reduceRight((Yt,re,me)=>t.is0(re)?Yt:(s[me]=t.mul(Yt,s[me]),t.mul(Yt,re)),Tt),s}function En(t,e){let r=(t.ORDER-Pt)/D,s=t.pow(e,r),V=t.eql(s,t.ONE),Tt=t.eql(s,t.ZERO),Yt=t.eql(s,t.neg(t.ONE));if(!V&&!Tt&&!Yt)throw new Error("invalid Legendre symbol result");return V?1:Tt?0:-1}function lo(t,e){e!==void 0&&(function(s){if(!Number.isSafeInteger(s)||s<0)throw new Error("positive integer expected, got "+s)})(e);let r=e!==void 0?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Zn(t,e,r=!1,s={}){if(t<=Vt)throw new Error("invalid field: expected ORDER > 0, got "+t);let V,Tt,Yt,re=!1;if(typeof e=="object"&&e!=null){if(s.sqrt||r)throw new Error("cannot specify opts in two arguments");let ae=e;ae.BITS&&(V=ae.BITS),ae.sqrt&&(Tt=ae.sqrt),typeof ae.isLE=="boolean"&&(r=ae.isLE),typeof ae.modFromBytes=="boolean"&&(re=ae.modFromBytes),Yt=ae.allowedLengths}else typeof e=="number"&&(V=e),s.sqrt&&(Tt=s.sqrt);let{nBitLength:me,nByteLength:Se}=lo(t,V);if(Se>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let tr,Ve=Object.freeze({ORDER:t,isLE:r,BITS:me,BYTES:Se,MASK:xe(me),ZERO:Vt,ONE:Pt,allowedLengths:Yt,create:ae=>Ce(ae,t),isValid:ae=>{if(typeof ae!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof ae);return Vt<=ae&&aeae===Vt,isValidNot0:ae=>!Ve.is0(ae)&&Ve.isValid(ae),isOdd:ae=>(ae&Pt)===Pt,neg:ae=>Ce(-ae,t),eql:(ae,ge)=>ae===ge,sqr:ae=>Ce(ae*ae,t),add:(ae,ge)=>Ce(ae+ge,t),sub:(ae,ge)=>Ce(ae-ge,t),mul:(ae,ge)=>Ce(ae*ge,t),pow:(ae,ge)=>(function(Xe,nr,fr){if(frVt;)fr&Pt&&(Or=Xe.mul(Or,Nr)),Nr=Xe.sqr(Nr),fr>>=Pt;return Or})(Ve,ae,ge),div:(ae,ge)=>Ce(ae*rr(ge,t),t),sqrN:ae=>ae*ae,addN:(ae,ge)=>ae+ge,subN:(ae,ge)=>ae-ge,mulN:(ae,ge)=>ae*ge,inv:ae=>rr(ae,t),sqrt:Tt||(ae=>(tr||(tr=(function(ge){return ge%gt===mt?pr:ge%Lt===ft?De:ge%$e===ie?(function(Xe){let nr=Zn(Xe),fr=dr(Xe),Or=fr(nr,nr.neg(nr.ONE)),Nr=fr(nr,Or),Sr=fr(nr,nr.neg(Or)),sn=(Xe+Gt)/$e;return(xr,ar)=>{let mr=xr.pow(ar,sn),er=xr.mul(mr,Or),Ar=xr.mul(mr,Nr),ze=xr.mul(mr,Sr),tn=xr.eql(xr.sqr(er),ar),Gr=xr.eql(xr.sqr(Ar),ar);mr=xr.cmov(mr,er,tn),er=xr.cmov(ze,Ar,Gr);let nn=xr.eql(xr.sqr(er),ar),Mr=xr.cmov(mr,er,nn);return qe(xr,Mr,ar),Mr}})(ge):dr(ge)})(t)),tr(Ve,ae))),toBytes:ae=>r?U(ae,Se).reverse():U(ae,Se),fromBytes:(ae,ge=!0)=>{if(Yt){if(!Yt.includes(ae.length)||ae.length>Se)throw new Error("Field.fromBytes: expected "+Yt+" bytes, got "+ae.length);let nr=new Uint8Array(Se);nr.set(ae,r?0:nr.length-ae.length),ae=nr}if(ae.length!==Se)throw new Error("Field.fromBytes: expected "+Se+" bytes, got "+ae.length);let Xe=r?d(ae):(function(nr){return St(z(nr))})(ae);if(re&&(Xe=Ce(Xe,t)),!ge&&!Ve.isValid(Xe))throw new Error("invalid field element: outside of range 0..ORDER");return Xe},invertBatch:ae=>bn(Ve,ae),cmov:(ae,ge,Xe)=>Xe?ge:ae});return Object.freeze(Ve)}let So=BigInt(0),Gn=BigInt(1);function ao(t,e){let r=e.negate();return t?r:e}function un(t,e){let r=bn(t.Fp,e.map(s=>s.Z));return e.map((s,V)=>t.fromAffine(s.toAffine(r[V])))}function zr(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw new Error("invalid window size, expected [1.."+e+"], got W="+t)}function cn(t,e){zr(t,e);let r=2**t;return{windows:Math.ceil(e/t)+1,windowSize:2**(t-1),mask:xe(t),maxNumber:r,shiftBy:BigInt(t)}}function Yn(t,e,r){let{windowSize:s,mask:V,maxNumber:Tt,shiftBy:Yt}=r,re=Number(t&V),me=t>>Yt;re>s&&(re-=Tt,me+=Gn);let Se=e*s;return{nextN:me,offset:Se+Math.abs(re)-1,isZero:re===0,isNeg:re<0,isNegF:e%2!=0,offsetF:Se}}let yo=new WeakMap,Un=new WeakMap;function ln(t){return Un.get(t)||1}function so(t){if(t!==So)throw new Error("invalid wNAF")}class Qr{constructor(e,r){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=r}_unsafeLadder(e,r,s=this.ZERO){let V=e;for(;r>So;)r&Gn&&(s=s.add(V)),V=V.double(),r>>=Gn;return s}precomputeWindow(e,r){let{windows:s,windowSize:V}=cn(r,this.bits),Tt=[],Yt=e,re=Yt;for(let me=0;me{if(!(Xe instanceof ge))throw new Error("invalid point at index "+nr)})})(r,t),(function(ae,ge){if(!Array.isArray(ae))throw new Error("array of scalars expected");ae.forEach((Xe,nr)=>{if(!ge.isValid(Xe))throw new Error("invalid scalar at index "+nr)})})(s,e);let V=r.length,Tt=s.length;if(V!==Tt)throw new Error("arrays of points and scalars must have equal length");let Yt=t.ZERO,re=(function(ae){let ge;for(ge=0;ae>g;ae>>=I,ge+=1);return ge})(BigInt(V)),me=1;re>12?me=re-3:re>4?me=re-2:re>0&&(me=2);let Se=xe(me),tr=new Array(Number(Se)+1).fill(Yt),Ve=Yt;for(let ae=Math.floor((e.BITS-1)/me)*me;ae>=0;ae-=me){tr.fill(Yt);for(let Xe=0;Xe>BigInt(ae)&Se);tr[fr]=tr[fr].add(r[Xe])}let ge=Yt;for(let Xe=tr.length-1,nr=Yt;Xe>0;Xe--)nr=nr.add(tr[Xe]),ge=ge.add(nr);if(Ve=Ve.add(ge),ae!==0)for(let Xe=0;Xe(V[Tt]="function",V),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"}))})(e),e}return Zn(t,{isLE:r})}let Dr=BigInt(0),mn=BigInt(1),$n=BigInt(2),fo=BigInt(8);class Ho{constructor(e){this.ep=e}static fromBytes(e){G()}static fromHex(e){G()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return z(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,r){return this.init(this.ep.precompute(e,r))}toRawBytes(){return this.toBytes()}}function $o(t){let{CURVE:e,curveOpts:r,hash:s,eddsaOpts:V}=(function(Tt){let Yt={a:Tt.a,d:Tt.d,p:Tt.Fp.ORDER,n:Tt.n,h:Tt.h,Gx:Tt.Gx,Gy:Tt.Gy},re={Fp:Tt.Fp,Fn:Zn(Yt.n,Tt.nBitLength,!0),uvRatio:Tt.uvRatio},me={randomBytes:Tt.randomBytes,adjustScalarBytes:Tt.adjustScalarBytes,domain:Tt.domain,prehash:Tt.prehash,mapToCurve:Tt.mapToCurve};return{CURVE:Yt,curveOpts:re,hash:Tt.hash,eddsaOpts:me}})(t);return(function(Tt,Yt){let re=Yt.Point;return Object.assign({},Yt,{ExtendedPoint:re,CURVE:Tt,nBitLength:re.Fn.BITS,nByteLength:re.Fn.BYTES})})(t,(function(Tt,Yt,re={}){if(typeof Yt!="function")throw new Error('"hash" function param is required');x(re,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});let{prehash:me}=re,{BASE:Se,Fp:tr,Fn:Ve}=Tt,ae=re.randomBytes||Zt,ge=re.adjustScalarBytes||(er=>er),Xe=re.domain||((er,Ar,ze)=>{if(W(ze,"phflag"),Ar.length||ze)throw new Error("Contexts/pre-hash are not supported");return er});function nr(er){return Ve.create(d(er))}function fr(er){let{head:Ar,prefix:ze,scalar:tn}=(function(Mr){let en=xr.secretKey;Mr=M("private key",Mr,en);let Rt=M("hashed private key",Yt(Mr),2*en),zt=ge(Rt.slice(0,en));return{head:zt,prefix:Rt.slice(en,2*en),scalar:nr(zt)}})(er),Gr=Se.multiply(tn),nn=Gr.toBytes();return{head:Ar,prefix:ze,scalar:tn,point:Gr,pointBytes:nn}}function Or(er){return fr(er).pointBytes}function Nr(er=Uint8Array.of(),...Ar){let ze=xt(...Ar);return nr(Yt(Xe(ze,M("context",er),!!me)))}let Sr={zip215:!0},sn=tr.BYTES,xr={secretKey:sn,publicKey:sn,signature:2*sn,seed:sn};function ar(er=ae(xr.seed)){return Q(er,xr.seed,"seed")}let mr={getExtendedPublicKey:fr,randomSecretKey:ar,isValidSecretKey:function(er){return R(er)&&er.length===Ve.BYTES},isValidPublicKey:function(er,Ar){try{return!!Tt.fromBytes(er,Ar)}catch{return!1}},toMontgomery(er){let{y:Ar}=Tt.fromBytes(er),ze=xr.publicKey,tn=ze===32;if(!tn&&ze!==57)throw new Error("only defined for 25519 and 448");let Gr=tn?tr.div(mn+Ar,mn-Ar):tr.div(Ar-mn,Ar+mn);return tr.toBytes(Gr)},toMontgomerySecret(er){let Ar=xr.secretKey;Q(er,Ar);let ze=Yt(er.subarray(0,Ar));return ge(ze).subarray(0,Ar)},randomPrivateKey:ar,precompute:(er=8,Ar=Tt.BASE)=>Ar.precompute(er,!1)};return Object.freeze({keygen:function(er){let Ar=mr.randomSecretKey(er);return{secretKey:Ar,publicKey:Or(Ar)}},getPublicKey:Or,sign:function(er,Ar,ze={}){er=M("message",er),me&&(er=me(er));let{prefix:tn,scalar:Gr,pointBytes:nn}=fr(Ar),Mr=Nr(ze.context,tn,er),en=Se.multiply(Mr).toBytes(),Rt=Nr(ze.context,en,nn,er),zt=Ve.create(Mr+Rt*Gr);if(!Ve.isValid(zt))throw new Error("sign failed: invalid s");return Q(xt(en,Ve.toBytes(zt)),xr.signature,"result")},verify:function(er,Ar,ze,tn=Sr){let{context:Gr,zip215:nn}=tn,Mr=xr.signature;er=M("signature",er,Mr),Ar=M("message",Ar),ze=M("publicKey",ze,xr.publicKey),nn!==void 0&&W(nn,"zip215"),me&&(Ar=me(Ar));let en=Mr/2,Rt=er.subarray(0,en),zt=d(er.subarray(en,Mr)),se,Pe,he;try{se=Tt.fromBytes(ze,nn),Pe=Tt.fromBytes(Rt,nn),he=Se.multiplyUnsafe(zt)}catch{return!1}if(!nn&&se.isSmallOrder())return!1;let we=Nr(Gr,Pe.toBytes(),se.toBytes(),Ar);return Pe.add(se.multiplyUnsafe(we)).subtract(he).clearCofactor().is0()},utils:mr,Point:Tt,lengths:xr})})((function(Tt,Yt={}){let re=(function(xr,ar,mr={},er){if(er===void 0&&(er=xr==="edwards"),!ar||typeof ar!="object")throw new Error(`expected valid ${xr} CURVE object`);for(let Gr of["p","n","h"]){let nn=ar[Gr];if(!(typeof nn=="bigint"&&nn>So))throw new Error(`CURVE.${Gr} must be positive bigint`)}let Ar=Pn(ar.p,mr.Fp,er),ze=Pn(ar.n,mr.Fn,er),tn=["Gx","Gy","a",xr==="weierstrass"?"b":"d"];for(let Gr of tn)if(!Ar.isValid(ar[Gr]))throw new Error(`CURVE.${Gr} must be valid field element of CURVE.Fp`);return{CURVE:ar=Object.freeze(Object.assign({},ar)),Fp:Ar,Fn:ze}})("edwards",Tt,Yt,Yt.FpFnLE),{Fp:me,Fn:Se}=re,tr=re.CURVE,{h:Ve}=tr;x(Yt,{},{uvRatio:"function"});let ae=$n<me.create(xr),Xe=Yt.uvRatio||((xr,ar)=>{try{return{isValid:!0,value:me.sqrt(me.div(xr,ar))}}catch{return{isValid:!1,value:Dr}}});if(!(function(xr,ar,mr,er){let Ar=xr.sqr(mr),ze=xr.sqr(er),tn=xr.add(xr.mul(ar.a,Ar),ze),Gr=xr.add(xr.ONE,xr.mul(ar.d,xr.mul(Ar,ze)));return xr.eql(tn,Gr)})(me,tr,tr.Gx,tr.Gy))throw new Error("bad curve params: generator point");function nr(xr,ar,mr=!1){return Wt("coordinate "+xr,ar,mr?mn:Dr,ae),ar}function fr(xr){if(!(xr instanceof Sr))throw new Error("ExtendedPoint expected")}let Or=at((xr,ar)=>{let{X:mr,Y:er,Z:Ar}=xr,ze=xr.is0();ar==null&&(ar=ze?fo:me.inv(Ar));let tn=ge(mr*ar),Gr=ge(er*ar),nn=me.mul(Ar,ar);if(ze)return{x:Dr,y:mn};if(nn!==mn)throw new Error("invZ was invalid");return{x:tn,y:Gr}}),Nr=at(xr=>{let{a:ar,d:mr}=tr;if(xr.is0())throw new Error("bad point: ZERO");let{X:er,Y:Ar,Z:ze,T:tn}=xr,Gr=ge(er*er),nn=ge(Ar*Ar),Mr=ge(ze*ze),en=ge(Mr*Mr),Rt=ge(Gr*ar);if(ge(Mr*ge(Rt+nn))!==ge(en+ge(mr*ge(Gr*nn))))throw new Error("bad point: equation left != right (1)");if(ge(er*Ar)!==ge(ze*tn))throw new Error("bad point: equation left != right (2)");return!0});class Sr{constructor(ar,mr,er,Ar){this.X=nr("x",ar),this.Y=nr("y",mr),this.Z=nr("z",er,!0),this.T=nr("t",Ar),Object.freeze(this)}static CURVE(){return tr}static fromAffine(ar){if(ar instanceof Sr)throw new Error("extended point not allowed");let{x:mr,y:er}=ar||{};return nr("x",mr),nr("y",er),new Sr(mr,er,mn,ge(mr*er))}static fromBytes(ar,mr=!1){let er=me.BYTES,{a:Ar,d:ze}=tr;ar=It(Q(ar,er,"point")),W(mr,"zip215");let tn=It(ar),Gr=ar[er-1];tn[er-1]=-129&Gr;let nn=d(tn),Mr=mr?ae:me.ORDER;Wt("point.y",nn,Dr,Mr);let en=ge(nn*nn),Rt=ge(en-mn),zt=ge(ze*en-Ar),{isValid:se,value:Pe}=Xe(Rt,zt);if(!se)throw new Error("bad point: invalid y coordinate");let he=(Pe&mn)===mn,we=!!(128&Gr);if(!mr&&Pe===Dr&&we)throw new Error("bad point: x=0 and x_0=1");return we!==he&&(Pe=ge(-Pe)),Sr.fromAffine({x:Pe,y:nn})}static fromHex(ar,mr=!1){return Sr.fromBytes(M("point",ar),mr)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(ar=8,mr=!0){return sn.createCache(this,ar),mr||this.multiply($n),this}assertValidity(){Nr(this)}equals(ar){fr(ar);let{X:mr,Y:er,Z:Ar}=this,{X:ze,Y:tn,Z:Gr}=ar,nn=ge(mr*Gr),Mr=ge(ze*Ar),en=ge(er*Gr),Rt=ge(tn*Ar);return nn===Mr&&en===Rt}is0(){return this.equals(Sr.ZERO)}negate(){return new Sr(ge(-this.X),this.Y,this.Z,ge(-this.T))}double(){let{a:ar}=tr,{X:mr,Y:er,Z:Ar}=this,ze=ge(mr*mr),tn=ge(er*er),Gr=ge($n*ge(Ar*Ar)),nn=ge(ar*ze),Mr=mr+er,en=ge(ge(Mr*Mr)-ze-tn),Rt=nn+tn,zt=Rt-Gr,se=nn-tn,Pe=ge(en*zt),he=ge(Rt*se),we=ge(en*se),Be=ge(zt*Rt);return new Sr(Pe,he,Be,we)}add(ar){fr(ar);let{a:mr,d:er}=tr,{X:Ar,Y:ze,Z:tn,T:Gr}=this,{X:nn,Y:Mr,Z:en,T:Rt}=ar,zt=ge(Ar*nn),se=ge(ze*Mr),Pe=ge(Gr*er*Rt),he=ge(tn*en),we=ge((Ar+ze)*(nn+Mr)-zt-se),Be=he-Pe,Ee=he+Pe,Ge=ge(se-mr*zt),Je=ge(we*Be),Fe=ge(Ee*Ge),Br=ge(we*Ge),Hr=ge(Be*Ee);return new Sr(Je,Fe,Hr,Br)}subtract(ar){return this.add(ar.negate())}multiply(ar){if(!Se.isValidNot0(ar))throw new Error("invalid scalar: expected 1 <= sc < curve.n");let{p:mr,f:er}=sn.cached(this,ar,Ar=>un(Sr,Ar));return un(Sr,[mr,er])[0]}multiplyUnsafe(ar,mr=Sr.ZERO){if(!Se.isValid(ar))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return ar===Dr?Sr.ZERO:this.is0()||ar===mn?this:sn.unsafe(this,ar,er=>un(Sr,er),mr)}isSmallOrder(){return this.multiplyUnsafe(Ve).is0()}isTorsionFree(){return sn.unsafe(this,tr.n).is0()}toAffine(ar){return Or(this,ar)}clearCofactor(){return Ve===mn?this:this.multiplyUnsafe(Ve)}toBytes(){let{x:ar,y:mr}=this.toAffine(),er=me.toBytes(mr);return er[er.length-1]|=ar&mn?128:0,er}toHex(){return z(this.toBytes())}toString(){return``}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(ar){return un(Sr,ar)}static msm(ar,mr){return Wr(Sr,Se,ar,mr)}_setWindowSize(ar){this.precompute(ar)}toRawBytes(){return this.toBytes()}}Sr.BASE=new Sr(tr.Gx,tr.Gy,mn,ge(tr.Gx*tr.Gy)),Sr.ZERO=new Sr(Dr,mn,mn,Dr),Sr.Fp=me,Sr.Fn=Se;let sn=new Qr(Sr,Se.BITS);return Sr.BASE.precompute(8),Sr})(e,r),s,V))}$("HashToScalar-");let Bo=BigInt(0),ro=BigInt(1),Lo=BigInt(2),Co=(BigInt(3),BigInt(5)),zo=BigInt(8),ht=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),J={p:ht,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:zo,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Ut(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}let ne=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Nt(t,e){let r=ht,s=Ce(e*e*e,r),V=Ce(s*s*e,r),Tt=Ce(t*s*(function(ae){let ge=BigInt(10),Xe=BigInt(20),nr=BigInt(40),fr=BigInt(80),Or=ht,Nr=ae*ae%Or*ae%Or,Sr=He(Nr,Lo,Or)*Nr%Or,sn=He(Sr,ro,Or)*ae%Or,xr=He(sn,Co,Or)*sn%Or,ar=He(xr,ge,Or)*xr%Or,mr=He(ar,Xe,Or)*ar%Or,er=He(mr,nr,Or)*mr%Or,Ar=He(er,fr,Or)*er%Or,ze=He(Ar,fr,Or)*er%Or,tn=He(ze,ge,Or)*xr%Or;return{pow_p_5_8:He(tn,Lo,Or)*ae%Or,b2:Nr}})(t*V).pow_p_5_8,r),Yt=Ce(e*Tt*Tt,r),re=Tt,me=Ce(Tt*ne,r),Se=Yt===t,tr=Yt===Ce(-t,r),Ve=Yt===Ce(-t*ne,r);return Se&&(Tt=re),(tr||Ve)&&(Tt=me),Pr(Tt,r)&&(Tt=Ce(-Tt,r)),{isValid:Se||tr,value:Tt}}let ce=Zn(J.p,{isLE:!0}),Ue=Zn(J.n,{isLE:!0}),Ne=$o({...J,Fp:ce,hash:u,adjustScalarBytes:Ut,uvRatio:Nt}),ue=ne,le=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),pe=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),We=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),n=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Z=t=>Nt(ro,t),bt=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),kt=t=>Ne.Point.Fp.create(d(t)&bt);function Qt(t){let{d:e}=J,r=ht,s=Or=>ce.create(Or),V=s(ue*t*t),Tt=s((V+ro)*We),Yt=BigInt(-1),re=s((Yt-e*V)*s(V+e)),{isValid:me,value:Se}=Nt(Tt,re),tr=s(Se*t);Pr(tr,r)||(tr=s(-tr)),me||(Se=tr),me||(Yt=V);let Ve=s(Yt*(V-ro)*n-re),ae=Se*Se,ge=s((Se+Se)*re),Xe=s(Ve*le),nr=s(ro-ae),fr=s(ro+ae);return new Ne.Point(s(ge*fr),s(nr*Xe),s(Xe*fr),s(ge*nr))}class te extends Ho{constructor(e){super(e)}static fromAffine(e){return new te(Ne.Point.fromAffine(e))}assertSame(e){if(!(e instanceof te))throw new Error("RistrettoPoint expected")}init(e){return new te(e)}static hashToCurve(e){return(function(r){f(r,64);let s=Qt(kt(r.subarray(0,32))),V=Qt(kt(r.subarray(32,64)));return new te(s.add(V))})(M("ristrettoHash",e,64))}static fromBytes(e){f(e,32);let{a:r,d:s}=J,V=ht,Tt=sn=>ce.create(sn),Yt=kt(e);if(!(function(sn,xr){if(sn.length!==xr.length)return!1;let ar=0;for(let mr=0;mrce.create(fr),re=Yt(Yt(s+r)*Yt(s-r)),me=Yt(e*r),Se=Yt(me*me),{value:tr}=Z(Yt(re*Se)),Ve=Yt(tr*re),ae=Yt(tr*me),ge=Yt(Ve*ae*V),Xe;if(Pr(V*ge,Tt)){let fr=Yt(r*ue),Or=Yt(e*ue);e=fr,r=Or,Xe=Yt(Ve*pe)}else Xe=ae;Pr(e*ge,Tt)&&(r=Yt(-r));let nr=Yt((s-r)*Xe);return Pr(nr,Tt)&&(nr=Yt(-nr)),ce.toBytes(nr)}equals(e){this.assertSame(e);let{X:r,Y:s}=this.ep,{X:V,Y:Tt}=e.ep,Yt=Se=>ce.create(Se),re=Yt(r*Tt)===Yt(s*V),me=Yt(s*Tt)===Yt(r*V);return re||me}is0(){return this.equals(te.ZERO)}}te.BASE=new te(Ne.Point.BASE),te.ZERO=new te(Ne.Point.ZERO),te.Fp=ce,te.Fn=Ue;var wt=w(8287).Buffer;function qt(t,e){return wt.from(Ne.sign(wt.from(t),e))}function _e(t,e,r){return Ne.verify(wt.from(e),wt.from(t),wt.from(r),{zip215:!1})}var Oe=function(t,e){for(var r=typeof t=="number",s=String(t);s.endsWith(e);)s=s.slice(0,-1);return r?Number(s):s},ke=w(5360),ee=w(8287).Buffer;function Re(t){return Re=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(t)}function hr(t,e){for(var r=0;r165)return!1;break;default:return!1}var r="";try{r=hn(t,e)}catch{return!1}switch(t){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":case"liquidityPool":return r.length===32;case"claimableBalance":return r.length===33;case"med25519PublicKey":return r.length===40;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function hn(t,e){if(typeof e!="string")throw new TypeError("encoded argument must be of type String");var r=ke.decode(e),s=r[0],V=r.slice(0,-2),Tt=V.slice(1),Yt=r.slice(-2);if(e!==ke.encode(r))throw new Error("invalid encoded string");var re=ur[t];if(re===void 0)throw new Error("".concat(t," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(ur).join(", ")));if(s!==re)throw new Error("invalid version byte. expected ".concat(re,", got ").concat(s));if(!(function(me,Se){if(me.length!==Se.length)return!1;if(me.length===0)return!0;for(var tr=0;tr>8^t[s]],r&=65535;var V=new Uint8Array(2);return V[0]=255&r,V[1]=r>>8&255,V}or=Ze,Cr=sr,(yr=wr(yr="types"))in or?Object.defineProperty(or,yr,{value:Cr,enumerable:!0,configurable:!0,writable:!0}):or[yr]=Cr;var Vn=w(8287).Buffer;function Xn(t){return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xn(t)}function Fo(t,e){for(var r=0;r0&&arguments[0]!==void 0?arguments[0]:o.Asset;if(this.isNative())return s.assetTypeNative();this.code.length<=4?(e=o.AlphaNum4,r="assetTypeCreditAlphanum4"):(e=o.AlphaNum12,r="assetTypeCreditAlphanum12");var V=this.code.length<=4?4:12;return new s(r,new e({assetCode:this.code.padEnd(V,"\0"),issuer:wn.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().value){case o.AssetType.assetTypeNative().value:return"native";case o.AssetType.assetTypeCreditAlphanum4().value:return"credit_alphanum4";case o.AssetType.assetTypeCreditAlphanum12().value:return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?o.AssetType.assetTypeNative():this.code.length<=4?o.AssetType.assetTypeCreditAlphanum4():o.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],[{key:"native",value:function(){return new t("XLM")}},{key:"fromOperation",value:function(e){var r,s;switch(e.switch()){case o.AssetType.assetTypeNative():return this.native();case o.AssetType.assetTypeCreditAlphanum4():r=e.alphaNum4();case o.AssetType.assetTypeCreditAlphanum12():return r=r||e.alphaNum12(),s=Ze.encodeEd25519PublicKey(r.issuer().ed25519()),new this(Oe(r.assetCode(),"\0"),s);default:throw new Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(e,r){if(!(e&&e instanceof t))throw new Error("assetA is invalid");if(!(r&&r instanceof t))throw new Error("assetB is invalid");if(e.equals(r))return 0;var s=e.getRawAssetType().value,V=r.getRawAssetType().value;if(s!==V)return s1&&arguments[1]!==void 0?arguments[1]:{};if(t!=="constant_product")throw new Error("liquidityPoolType is invalid");var r=e.assetA,s=e.assetB,V=e.fee;if(!(r&&r instanceof Xr))throw new Error("assetA is invalid");if(!(s&&s instanceof Xr))throw new Error("assetB is invalid");if(!V||V!==Rn)throw new Error("fee is invalid");if(Xr.compare(r,s)!==-1)throw new Error("Assets are not in lexicographic order");var Tt=o.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),Yt=new o.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:s.toXDRObject(),fee:V}).toXDR();return l(_r.concat([Tt,Yt]))}var Ro=w(8287).Buffer;function On(t){return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(t)}function pn(t,e){for(var r=0;r0&&arguments[0]!==void 0?arguments[0]:"",s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(!s||typeof s!="string")throw new Error("Invalid signature");if(!r||typeof r!="string")throw new Error("Invalid publicKey");var V=Ro.from(s,"base64");try{e=(t=wn.fromPublicKey(r)).signatureHint()}catch{throw new Error("Invalid publicKey")}if(!t.verify(this.hash(),V))throw new Error("Invalid signature");this.signatures.push(new o.DecoratedSignature({hint:e,signature:V}))}},{key:"addDecoratedSignature",value:function(t){this.signatures.push(t)}},{key:"signHashX",value:function(t){if(typeof t=="string"&&(t=Ro.from(t,"hex")),t.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var e=t,r=l(t),s=r.slice(r.length-4);this.signatures.push(new o.DecoratedSignature({hint:s,signature:e}))}},{key:"hash",value:function(){return l(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")}}]),Ko=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ei=Math.ceil,To=Math.floor,Sn="[BigNumber Error] ",tt=Sn+"Number primitive has more than 15 significant digits: ",Ft=1e14,Kt=14,Xt=9007199254740991,oe=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],be=1e7,ye=1e9;function gr(t){var e=0|t;return t>0||t===e?e:e-1}function vr(t){for(var e,r,s=1,V=t.length,Tt=t[0]+"";sSe^r?1:-1;for(re=(me=V.length)<(Se=Tt.length)?me:Se,Yt=0;YtTt[Yt]^r?1:-1;return me==Se?0:me>Se^r?1:-1}function br(t,e,r,s){if(tr||t!==To(t))throw Error(Sn+(s||"Argument")+(typeof t=="number"?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function Rr(t){var e=t.c.length-1;return gr(t.e/Kt)==e&&t.c[e]%2!=0}function cr(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function Jr(t,e,r){var s,V;if(e<0){for(V=r+".";++e;V+=r);t=V+t}else if(++e>(s=t.length)){for(V=r,e-=s;--e;V+=r);t+=V}else eSr?Fe.c=Fe.e=null:Rt.e=10;Be/=10,we++);return void(we>Sr?Fe.c=Fe.e=null:(Fe.e=we,Fe.c=[Rt]))}Je=String(Rt)}else{if(!Ko.test(Je=String(Rt)))return V(Fe,Je,Ee);Fe.s=Je.charCodeAt(0)==45?(Je=Je.slice(1),-1):1}(we=Je.indexOf("."))>-1&&(Je=Je.replace(".","")),(Be=Je.search(/e/i))>0?(we<0&&(we=Be),we+=+Je.slice(Be+1),Je=Je.substring(0,Be)):we<0&&(we=Je.length)}else{if(br(zt,2,er.length,"Base"),zt==10&&Ar)return Mr(Fe=new ze(Rt),Xe+Fe.e+1,nr);if(Je=String(Rt),Ee=typeof Rt=="number"){if(0*Rt!=0)return V(Fe,Je,Ee,zt);if(Fe.s=1/Rt<0?(Je=Je.slice(1),-1):1,ze.DEBUG&&Je.replace(/^0\.0*|\./,"").length>15)throw Error(tt+Rt)}else Fe.s=Je.charCodeAt(0)===45?(Je=Je.slice(1),-1):1;for(se=er.slice(0,zt),we=Be=0,Ge=Je.length;Bewe){we=Ge;continue}}else if(!he&&(Je==Je.toUpperCase()&&(Je=Je.toLowerCase())||Je==Je.toLowerCase()&&(Je=Je.toUpperCase()))){he=!0,Be=-1,we=0;continue}return V(Fe,String(Rt),Ee,zt)}Ee=!1,(we=(Je=s(Je,zt,10,Fe.s)).indexOf("."))>-1?Je=Je.replace(".",""):we=Je.length}for(Be=0;Je.charCodeAt(Be)===48;Be++);for(Ge=Je.length;Je.charCodeAt(--Ge)===48;);if(Je=Je.slice(Be,++Ge)){if(Ge-=Be,Ee&&ze.DEBUG&&Ge>15&&(Rt>Xt||Rt!==To(Rt)))throw Error(tt+Fe.s*Rt);if((we=we-Be-1)>Sr)Fe.c=Fe.e=null;else if(we=Or)?cr(Ge,Be):Jr(Ge,Be,"0");else if(we=(Rt=Mr(new ze(Rt),zt,se)).e,Ee=(Ge=vr(Rt.c)).length,Pe==1||Pe==2&&(zt<=we||we<=fr)){for(;EeBe),Ge=Jr(Ge,we,"0"),we+1>Ee){if(--zt>0)for(Ge+=".";zt--;Ge+="0");}else if((zt+=we-Ee)>0)for(we+1==Ee&&(Ge+=".");zt--;Ge+="0");return Rt.s<0&&he?"-"+Ge:Ge}function Gr(Rt,zt){for(var se,Pe,he=1,we=new ze(Rt[0]);he=10;he/=10,Pe++);return(se=Pe+se*Kt-1)>Sr?Rt.c=Rt.e=null:se=10;Ee/=10,he++);if((we=zt-he)<0)we+=Kt,Be=zt,Ge=Br[Je=0],Fe=To(Ge/Hr[he-Be-1]%10);else if((Je=ei((we+1)/Kt))>=Br.length){if(!Pe)break t;for(;Br.length<=Je;Br.push(0));Ge=Fe=0,he=1,Be=(we%=Kt)-Kt+1}else{for(Ge=Ee=Br[Je],he=1;Ee>=10;Ee/=10,he++);Fe=(Be=(we%=Kt)-Kt+he)<0?0:To(Ge/Hr[he-Be-1]%10)}if(Pe=Pe||zt<0||Br[Je+1]!=null||(Be<0?Ge:Ge%Hr[he-Be-1]),Pe=se<4?(Fe||Pe)&&(se==0||se==(Rt.s<0?3:2)):Fe>5||Fe==5&&(se==4||Pe||se==6&&(we>0?Be>0?Ge/Hr[he-Be]:0:Br[Je-1])%10&1||se==(Rt.s<0?8:7)),zt<1||!Br[0])return Br.length=0,Pe?(zt-=Rt.e+1,Br[0]=Hr[(Kt-zt%Kt)%Kt],Rt.e=-zt||0):Br[0]=Rt.e=0,Rt;if(we==0?(Br.length=Je,Ee=1,Je--):(Br.length=Je+1,Ee=Hr[Kt-we],Br[Je]=Be>0?To(Ge/Hr[he-Be]%Hr[Be])*Ee:0),Pe)for(;;){if(Je==0){for(we=1,Be=Br[0];Be>=10;Be/=10,we++);for(Be=Br[0]+=Ee,Ee=1;Be>=10;Be/=10,Ee++);we!=Ee&&(Rt.e++,Br[0]==Ft&&(Br[0]=1));break}if(Br[Je]+=Ee,Br[Je]!=Ft)break;Br[Je--]=0,Ee=1}for(we=Br.length;Br[--we]===0;Br.pop());}Rt.e>Sr?Rt.c=Rt.e=null:Rt.e=Or?cr(zt,se):Jr(zt,se,"0"),Rt.s<0?"-"+zt:zt)}return ze.clone=t,ze.ROUND_UP=0,ze.ROUND_DOWN=1,ze.ROUND_CEIL=2,ze.ROUND_FLOOR=3,ze.ROUND_HALF_UP=4,ze.ROUND_HALF_DOWN=5,ze.ROUND_HALF_EVEN=6,ze.ROUND_HALF_CEIL=7,ze.ROUND_HALF_FLOOR=8,ze.EUCLID=9,ze.config=ze.set=function(Rt){var zt,se;if(Rt!=null){if(typeof Rt!="object")throw Error(Sn+"Object expected: "+Rt);if(Rt.hasOwnProperty(zt="DECIMAL_PLACES")&&(br(se=Rt[zt],0,ye,zt),Xe=se),Rt.hasOwnProperty(zt="ROUNDING_MODE")&&(br(se=Rt[zt],0,8,zt),nr=se),Rt.hasOwnProperty(zt="EXPONENTIAL_AT")&&((se=Rt[zt])&&se.pop?(br(se[0],-ye,0,zt),br(se[1],0,ye,zt),fr=se[0],Or=se[1]):(br(se,-ye,ye,zt),fr=-(Or=se<0?-se:se))),Rt.hasOwnProperty(zt="RANGE"))if((se=Rt[zt])&&se.pop)br(se[0],-ye,-1,zt),br(se[1],1,ye,zt),Nr=se[0],Sr=se[1];else{if(br(se,-ye,ye,zt),!se)throw Error(Sn+zt+" cannot be zero: "+se);Nr=-(Sr=se<0?-se:se)}if(Rt.hasOwnProperty(zt="CRYPTO")){if((se=Rt[zt])!==!!se)throw Error(Sn+zt+" not true or false: "+se);if(se){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw sn=!se,Error(Sn+"crypto unavailable");sn=se}else sn=se}if(Rt.hasOwnProperty(zt="MODULO_MODE")&&(br(se=Rt[zt],0,9,zt),xr=se),Rt.hasOwnProperty(zt="POW_PRECISION")&&(br(se=Rt[zt],0,ye,zt),ar=se),Rt.hasOwnProperty(zt="FORMAT")){if(typeof(se=Rt[zt])!="object")throw Error(Sn+zt+" not an object: "+se);mr=se}if(Rt.hasOwnProperty(zt="ALPHABET")){if(typeof(se=Rt[zt])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(se))throw Error(Sn+zt+" invalid: "+se);Ar=se.slice(0,10)=="0123456789",er=se}}return{DECIMAL_PLACES:Xe,ROUNDING_MODE:nr,EXPONENTIAL_AT:[fr,Or],RANGE:[Nr,Sr],CRYPTO:sn,MODULO_MODE:xr,POW_PRECISION:ar,FORMAT:mr,ALPHABET:er}},ze.isBigNumber=function(Rt){if(!Rt||Rt._isBigNumber!==!0)return!1;if(!ze.DEBUG)return!0;var zt,se,Pe=Rt.c,he=Rt.e,we=Rt.s;t:if({}.toString.call(Pe)=="[object Array]"){if((we===1||we===-1)&&he>=-ye&&he<=ye&&he===To(he)){if(Pe[0]===0){if(he===0&&Pe.length===1)return!0;break t}if((zt=(he+1)%Kt)<1&&(zt+=Kt),String(Pe[0]).length==zt){for(zt=0;zt=Ft||se!==To(se))break t;if(se!==0)return!0}}}else if(Pe===null&&he===null&&(we===null||we===1||we===-1))return!0;throw Error(Sn+"Invalid BigNumber: "+Rt)},ze.maximum=ze.max=function(){return Gr(arguments,-1)},ze.minimum=ze.min=function(){return Gr(arguments,1)},ze.random=(Tt=9007199254740992,Yt=Math.random()*Tt&2097151?function(){return To(Math.random()*Tt)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(Rt){var zt,se,Pe,he,we,Be=0,Ee=[],Ge=new ze(ge);if(Rt==null?Rt=Xe:br(Rt,0,ye),he=ei(Rt/Kt),sn)if(crypto.getRandomValues){for(zt=crypto.getRandomValues(new Uint32Array(he*=2));Be>>11))>=9e15?(se=crypto.getRandomValues(new Uint32Array(2)),zt[Be]=se[0],zt[Be+1]=se[1]):(Ee.push(we%1e14),Be+=2);Be=he/2}else{if(!crypto.randomBytes)throw sn=!1,Error(Sn+"crypto unavailable");for(zt=crypto.randomBytes(he*=7);Be=9e15?crypto.randomBytes(7).copy(zt,Be):(Ee.push(we%1e14),Be+=7);Be=he/7}if(!sn)for(;Be=10;we/=10,Be++);Behe-1&&(Ge[Be+1]==null&&(Ge[Be+1]=0),Ge[Be+1]+=Ge[Be]/he|0,Ge[Be]%=he)}return Ge.reverse()}return function(se,Pe,he,we,Be){var Ee,Ge,Je,Fe,Br,Hr,rn,Cn,co=se.indexOf("."),bo=Xe,_n=nr;for(co>=0&&(Fe=ar,ar=0,se=se.replace(".",""),Hr=(Cn=new ze(Pe)).pow(se.length-co),ar=Fe,Cn.c=zt(Jr(vr(Hr.c),Hr.e,"0"),10,he,Rt),Cn.e=Cn.c.length),Je=Fe=(rn=zt(se,Pe,he,Be?(Ee=er,Rt):(Ee=Rt,er))).length;rn[--Fe]==0;rn.pop());if(!rn[0])return Ee.charAt(0);if(co<0?--Je:(Hr.c=rn,Hr.e=Je,Hr.s=we,rn=(Hr=r(Hr,Cn,bo,_n,he)).c,Br=Hr.r,Je=Hr.e),co=rn[Ge=Je+bo+1],Fe=he/2,Br=Br||Ge<0||rn[Ge+1]!=null,Br=_n<4?(co!=null||Br)&&(_n==0||_n==(Hr.s<0?3:2)):co>Fe||co==Fe&&(_n==4||Br||_n==6&&1&rn[Ge-1]||_n==(Hr.s<0?8:7)),Ge<1||!rn[0])se=Br?Jr(Ee.charAt(1),-bo,Ee.charAt(0)):Ee.charAt(0);else{if(rn.length=Ge,Br)for(--he;++rn[--Ge]>he;)rn[Ge]=0,Ge||(++Je,rn=[1].concat(rn));for(Fe=rn.length;!rn[--Fe];);for(co=0,se="";co<=Fe;se+=Ee.charAt(rn[co++]));se=Jr(se,Je,Ee.charAt(0))}return se}})(),r=(function(){function Rt(Pe,he,we){var Be,Ee,Ge,Je,Fe=0,Br=Pe.length,Hr=he%be,rn=he/be|0;for(Pe=Pe.slice();Br--;)Fe=((Ee=Hr*(Ge=Pe[Br]%be)+(Be=rn*Ge+(Je=Pe[Br]/be|0)*Hr)%be*be+Fe)/we|0)+(Be/be|0)+rn*Je,Pe[Br]=Ee%we;return Fe&&(Pe=[Fe].concat(Pe)),Pe}function zt(Pe,he,we,Be){var Ee,Ge;if(we!=Be)Ge=we>Be?1:-1;else for(Ee=Ge=0;Eehe[Ee]?1:-1;break}return Ge}function se(Pe,he,we,Be){for(var Ee=0;we--;)Pe[we]-=Ee,Ee=Pe[we]1;Pe.splice(0,1));}return function(Pe,he,we,Be,Ee){var Ge,Je,Fe,Br,Hr,rn,Cn,co,bo,_n,Fn,Io,Vi,aa,sa,ti,Ri,Wo=Pe.s==he.s?1:-1,No=Pe.c,oo=he.c;if(!(No&&No[0]&&oo&&oo[0]))return new ze(Pe.s&&he.s&&(No?!oo||No[0]!=oo[0]:oo)?No&&No[0]==0||!oo?0*Wo:Wo/0:NaN);for(bo=(co=new ze(Wo)).c=[],Wo=we+(Je=Pe.e-he.e)+1,Ee||(Ee=Ft,Je=gr(Pe.e/Kt)-gr(he.e/Kt),Wo=Wo/Kt|0),Fe=0;oo[Fe]==(No[Fe]||0);Fe++);if(oo[Fe]>(No[Fe]||0)&&Je--,Wo<0)bo.push(1),Br=!0;else{for(aa=No.length,ti=oo.length,Fe=0,Wo+=2,(Hr=To(Ee/(oo[0]+1)))>1&&(oo=Rt(oo,Hr,Ee),No=Rt(No,Hr,Ee),ti=oo.length,aa=No.length),Vi=ti,Fn=(_n=No.slice(0,ti)).length;Fn=Ee/2&&sa++;do{if(Hr=0,(Ge=zt(oo,_n,ti,Fn))<0){if(Io=_n[0],ti!=Fn&&(Io=Io*Ee+(_n[1]||0)),(Hr=To(Io/sa))>1)for(Hr>=Ee&&(Hr=Ee-1),Cn=(rn=Rt(oo,Hr,Ee)).length,Fn=_n.length;zt(rn,_n,Cn,Fn)==1;)Hr--,se(rn,ti=10;Wo/=10,Fe++);Mr(co,we+(co.e=Fe+Je*Kt-1)+1,Be,Br)}else co.e=Je,co.r=+Br;return co}})(),re=/^(-?)0([xbo])(?=\w[\w.]*$)/i,me=/^([^.]+)\.$/,Se=/^\.([^.]+)$/,tr=/^-?(Infinity|NaN)$/,Ve=/^\s*\+(?=[\w.])|^\s+|\s+$/g,V=function(Rt,zt,se,Pe){var he,we=se?zt:zt.replace(Ve,"");if(tr.test(we))Rt.s=isNaN(we)?null:we<0?-1:1;else{if(!se&&(we=we.replace(re,function(Be,Ee,Ge){return he=(Ge=Ge.toLowerCase())=="x"?16:Ge=="b"?2:8,Pe&&Pe!=he?Be:Ee}),Pe&&(he=Pe,we=we.replace(me,"$1").replace(Se,"0.$1")),zt!=we))return new ze(we,he);if(ze.DEBUG)throw Error(Sn+"Not a"+(Pe?" base "+Pe:"")+" number: "+zt);Rt.s=null}Rt.c=Rt.e=null},ae.absoluteValue=ae.abs=function(){var Rt=new ze(this);return Rt.s<0&&(Rt.s=1),Rt},ae.comparedTo=function(Rt,zt){return Ur(this,new ze(Rt,zt))},ae.decimalPlaces=ae.dp=function(Rt,zt){var se,Pe,he,we=this;if(Rt!=null)return br(Rt,0,ye),zt==null?zt=nr:br(zt,0,8),Mr(new ze(we),Rt+we.e+1,zt);if(!(se=we.c))return null;if(Pe=((he=se.length-1)-gr(this.e/Kt))*Kt,he=se[he])for(;he%10==0;he/=10,Pe--);return Pe<0&&(Pe=0),Pe},ae.dividedBy=ae.div=function(Rt,zt){return r(this,new ze(Rt,zt),Xe,nr)},ae.dividedToIntegerBy=ae.idiv=function(Rt,zt){return r(this,new ze(Rt,zt),0,1)},ae.exponentiatedBy=ae.pow=function(Rt,zt){var se,Pe,he,we,Be,Ee,Ge,Je,Fe=this;if((Rt=new ze(Rt)).c&&!Rt.isInteger())throw Error(Sn+"Exponent not an integer: "+en(Rt));if(zt!=null&&(zt=new ze(zt)),Be=Rt.e>14,!Fe.c||!Fe.c[0]||Fe.c[0]==1&&!Fe.e&&Fe.c.length==1||!Rt.c||!Rt.c[0])return Je=new ze(Math.pow(+en(Fe),Be?Rt.s*(2-Rr(Rt)):+en(Rt))),zt?Je.mod(zt):Je;if(Ee=Rt.s<0,zt){if(zt.c?!zt.c[0]:!zt.s)return new ze(NaN);(Pe=!Ee&&Fe.isInteger()&&zt.isInteger())&&(Fe=Fe.mod(zt))}else{if(Rt.e>9&&(Fe.e>0||Fe.e<-1||(Fe.e==0?Fe.c[0]>1||Be&&Fe.c[1]>=24e7:Fe.c[0]<8e13||Be&&Fe.c[0]<=9999975e7)))return we=Fe.s<0&&Rr(Rt)?-0:0,Fe.e>-1&&(we=1/we),new ze(Ee?1/we:we);ar&&(we=ei(ar/Kt+2))}for(Be?(se=new ze(.5),Ee&&(Rt.s=1),Ge=Rr(Rt)):Ge=(he=Math.abs(+en(Rt)))%2,Je=new ze(ge);;){if(Ge){if(!(Je=Je.times(Fe)).c)break;we?Je.c.length>we&&(Je.c.length=we):Pe&&(Je=Je.mod(zt))}if(he){if((he=To(he/2))===0)break;Ge=he%2}else if(Mr(Rt=Rt.times(se),Rt.e+1,1),Rt.e>14)Ge=Rr(Rt);else{if((he=+en(Rt))==0)break;Ge=he%2}Fe=Fe.times(Fe),we?Fe.c&&Fe.c.length>we&&(Fe.c.length=we):Pe&&(Fe=Fe.mod(zt))}return Pe?Je:(Ee&&(Je=ge.div(Je)),zt?Je.mod(zt):we?Mr(Je,ar,nr,void 0):Je)},ae.integerValue=function(Rt){var zt=new ze(this);return Rt==null?Rt=nr:br(Rt,0,8),Mr(zt,zt.e+1,Rt)},ae.isEqualTo=ae.eq=function(Rt,zt){return Ur(this,new ze(Rt,zt))===0},ae.isFinite=function(){return!!this.c},ae.isGreaterThan=ae.gt=function(Rt,zt){return Ur(this,new ze(Rt,zt))>0},ae.isGreaterThanOrEqualTo=ae.gte=function(Rt,zt){return(zt=Ur(this,new ze(Rt,zt)))===1||zt===0},ae.isInteger=function(){return!!this.c&&gr(this.e/Kt)>this.c.length-2},ae.isLessThan=ae.lt=function(Rt,zt){return Ur(this,new ze(Rt,zt))<0},ae.isLessThanOrEqualTo=ae.lte=function(Rt,zt){return(zt=Ur(this,new ze(Rt,zt)))===-1||zt===0},ae.isNaN=function(){return!this.s},ae.isNegative=function(){return this.s<0},ae.isPositive=function(){return this.s>0},ae.isZero=function(){return!!this.c&&this.c[0]==0},ae.minus=function(Rt,zt){var se,Pe,he,we,Be=this,Ee=Be.s;if(zt=(Rt=new ze(Rt,zt)).s,!Ee||!zt)return new ze(NaN);if(Ee!=zt)return Rt.s=-zt,Be.plus(Rt);var Ge=Be.e/Kt,Je=Rt.e/Kt,Fe=Be.c,Br=Rt.c;if(!Ge||!Je){if(!Fe||!Br)return Fe?(Rt.s=-zt,Rt):new ze(Br?Be:NaN);if(!Fe[0]||!Br[0])return Br[0]?(Rt.s=-zt,Rt):new ze(Fe[0]?Be:nr==3?-0:0)}if(Ge=gr(Ge),Je=gr(Je),Fe=Fe.slice(),Ee=Ge-Je){for((we=Ee<0)?(Ee=-Ee,he=Fe):(Je=Ge,he=Br),he.reverse(),zt=Ee;zt--;he.push(0));he.reverse()}else for(Pe=(we=(Ee=Fe.length)<(zt=Br.length))?Ee:zt,Ee=zt=0;zt0)for(;zt--;Fe[se++]=0);for(zt=Ft-1;Pe>Ee;){if(Fe[--Pe]=0;){for(se=0,Hr=Io[he]%bo,rn=Io[he]/bo|0,we=he+(Be=Ge);we>he;)se=((Je=Hr*(Je=Fn[--Be]%bo)+(Ee=rn*Je+(Fe=Fn[Be]/bo|0)*Hr)%bo*bo+Cn[we]+se)/co|0)+(Ee/bo|0)+rn*Fe,Cn[we--]=Je%co;Cn[we]=se}return se?++Pe:Cn.splice(0,1),nn(Rt,Cn,Pe)},ae.negated=function(){var Rt=new ze(this);return Rt.s=-Rt.s||null,Rt},ae.plus=function(Rt,zt){var se,Pe=this,he=Pe.s;if(zt=(Rt=new ze(Rt,zt)).s,!he||!zt)return new ze(NaN);if(he!=zt)return Rt.s=-zt,Pe.minus(Rt);var we=Pe.e/Kt,Be=Rt.e/Kt,Ee=Pe.c,Ge=Rt.c;if(!we||!Be){if(!Ee||!Ge)return new ze(he/0);if(!Ee[0]||!Ge[0])return Ge[0]?Rt:new ze(Ee[0]?Pe:0*he)}if(we=gr(we),Be=gr(Be),Ee=Ee.slice(),he=we-Be){for(he>0?(Be=we,se=Ge):(he=-he,se=Ee),se.reverse();he--;se.push(0));se.reverse()}for((he=Ee.length)-(zt=Ge.length)<0&&(se=Ge,Ge=Ee,Ee=se,zt=he),he=0;zt;)he=(Ee[--zt]=Ee[zt]+Ge[zt]+he)/Ft|0,Ee[zt]=Ft===Ee[zt]?0:Ee[zt]%Ft;return he&&(Ee=[he].concat(Ee),++Be),nn(Rt,Ee,Be)},ae.precision=ae.sd=function(Rt,zt){var se,Pe,he,we=this;if(Rt!=null&&Rt!==!!Rt)return br(Rt,1,ye),zt==null?zt=nr:br(zt,0,8),Mr(new ze(we),Rt,zt);if(!(se=we.c))return null;if(Pe=(he=se.length-1)*Kt+1,he=se[he]){for(;he%10==0;he/=10,Pe--);for(he=se[0];he>=10;he/=10,Pe++);}return Rt&&we.e+1>Pe&&(Pe=we.e+1),Pe},ae.shiftedBy=function(Rt){return br(Rt,-9007199254740991,Xt),this.times("1e"+Rt)},ae.squareRoot=ae.sqrt=function(){var Rt,zt,se,Pe,he,we=this,Be=we.c,Ee=we.s,Ge=we.e,Je=Xe+4,Fe=new ze("0.5");if(Ee!==1||!Be||!Be[0])return new ze(!Ee||Ee<0&&(!Be||Be[0])?NaN:Be?we:1/0);if((Ee=Math.sqrt(+en(we)))==0||Ee==1/0?(((zt=vr(Be)).length+Ge)%2==0&&(zt+="0"),Ee=Math.sqrt(+zt),Ge=gr((Ge+1)/2)-(Ge<0||Ge%2),se=new ze(zt=Ee==1/0?"5e"+Ge:(zt=Ee.toExponential()).slice(0,zt.indexOf("e")+1)+Ge)):se=new ze(Ee+""),se.c[0]){for((Ee=(Ge=se.e)+Je)<3&&(Ee=0);;)if(he=se,se=Fe.times(he.plus(r(we,he,Je,1))),vr(he.c).slice(0,Ee)===(zt=vr(se.c)).slice(0,Ee)){if(se.e0&&Cn>0){for(we=Cn%Ee||Ee,Fe=rn.substr(0,we);we0&&(Fe+=Je+rn.slice(we)),Hr&&(Fe="-"+Fe)}Pe=Br?Fe+(se.decimalSeparator||"")+((Ge=+se.fractionGroupSize)?Br.replace(new RegExp("\\d{"+Ge+"}\\B","g"),"$&"+(se.fractionGroupSeparator||"")):Br):Fe}return(se.prefix||"")+Pe+(se.suffix||"")},ae.toFraction=function(Rt){var zt,se,Pe,he,we,Be,Ee,Ge,Je,Fe,Br,Hr,rn=this,Cn=rn.c;if(Rt!=null&&(!(Ee=new ze(Rt)).isInteger()&&(Ee.c||Ee.s!==1)||Ee.lt(ge)))throw Error(Sn+"Argument "+(Ee.isInteger()?"out of range: ":"not an integer: ")+en(Ee));if(!Cn)return new ze(rn);for(zt=new ze(ge),Je=se=new ze(ge),Pe=Ge=new ze(ge),Hr=vr(Cn),we=zt.e=Hr.length-rn.e-1,zt.c[0]=oe[(Be=we%Kt)<0?Kt+Be:Be],Rt=!Rt||Ee.comparedTo(zt)>0?we>0?zt:Je:Ee,Be=Sr,Sr=1/0,Ee=new ze(Hr),Ge.c[0]=0;Fe=r(Ee,zt,0,1),(he=se.plus(Fe.times(Pe))).comparedTo(Rt)!=1;)se=Pe,Pe=he,Je=Ge.plus(Fe.times(he=Je)),Ge=he,zt=Ee.minus(Fe.times(he=zt)),Ee=he;return he=r(Rt.minus(se),Pe,0,1),Ge=Ge.plus(he.times(Je)),se=se.plus(he.times(Pe)),Ge.s=Je.s=rn.s,Br=r(Je,Pe,we*=2,nr).minus(rn).abs().comparedTo(r(Ge,se,we,nr).minus(rn).abs())<1?[Je,Pe]:[Ge,se],Sr=Be,Br},ae.toNumber=function(){return+en(this)},ae.toPrecision=function(Rt,zt){return Rt!=null&&br(Rt,1,ye),tn(this,Rt,zt,2)},ae.toString=function(Rt){var zt,se=this,Pe=se.s,he=se.e;return he===null?Pe?(zt="Infinity",Pe<0&&(zt="-"+zt)):zt="NaN":(Rt==null?zt=he<=fr||he>=Or?cr(vr(se.c),he):Jr(vr(se.c),he,"0"):Rt===10&&Ar?zt=Jr(vr((se=Mr(new ze(se),Xe+he+1,nr)).c),se.e,"0"):(br(Rt,2,er.length,"Base"),zt=s(Jr(vr(se.c),he,"0"),10,Rt,Pe,!0)),Pe<0&&se.c[0]&&(zt="-"+zt)),zt},ae.valueOf=ae.toJSON=function(){return en(this)},ae._isBigNumber=!0,ae[Symbol.toStringTag]="BigNumber",ae[Symbol.for("nodejs.util.inspect.custom")]=ae.valueOf,e!=null&&ze.set(e),ze})(),yn=kn.clone();yn.DEBUG=!0;let Vr=yn;function dn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r=0&&t<=255)return!0;throw new Error("".concat(e," value must be between 0 and 255"))}var b=w(8287).Buffer;function h(t){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(t)}var C=w(8287).Buffer;function st(t){return st=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(t)}function yt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,s=Array(e);r1&&arguments[1]!==void 0&&arguments[1];if(typeof t!="string")return!1;try{e=new Vr(t)}catch{return!1}return!(!r&&e.isZero()||e.isNegative()||e.times(In).gt(new Vr("9223372036854775807").toString())||e.decimalPlaces()>7||e.isNaN()||!e.isFinite())}},{key:"constructAmountRequirementsError",value:function(t){return"".concat(t," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(e!==void 0)switch(typeof e=="string"&&(e=parseFloat(e)),!0){case(typeof e!="number"||!Number.isFinite(e)||e%1!=0):throw new Error("".concat(t," value is invalid"));case e<0:throw new Error("".concat(t," value must be unsigned"));case(!r||r&&r(e,t)):return e;default:throw new Error("".concat(t," value is invalid"))}}},{key:"_toXDRAmount",value:function(t){var e=new Vr(t).times(In);return p.Hyper.fromString(e.toString())}},{key:"_fromXDRAmount",value:function(t){return new Vr(t).div(In).toFixed(7)}},{key:"_fromXDRPrice",value:function(t){return new Vr(t.n()).div(new Vr(t.d())).toString()}},{key:"_toXDRPrice",value:function(t){var e;if(t.n&&t.d)e=new o.Price(t);else{var r=(function(s){for(var V,Tt,Yt=new Vr(s),re=[[new Vr(0),new Vr(1)],[new Vr(1),new Vr(0)]],me=2;!Yt.gt(Nn);){V=Yt.integerValue(Vr.ROUND_FLOOR),Tt=Yt.minus(V);var Se=V.times(re[me-1][0]).plus(re[me-2][0]),tr=V.times(re[me-1][1]).plus(re[me-2][1]);if(Se.gt(Nn)||tr.gt(Nn)||(re.push([Se,tr]),Tt.eq(0)))break;Yt=new Vr(1).div(Tt),me+=1}var Ve=(function(Xe,nr){return(function(fr){if(Array.isArray(fr))return fr})(Xe)||(function(fr,Or){var Nr=fr==null?null:typeof Symbol<"u"&&fr[Symbol.iterator]||fr["@@iterator"];if(Nr!=null){var Sr,sn,xr,ar,mr=[],er=!0,Ar=!1;try{if(xr=(Nr=Nr.call(fr)).next,Or===0){if(Object(Nr)!==Nr)return;er=!1}else for(;!(er=(Sr=xr.call(Nr)).done)&&(mr.push(Sr.value),mr.length!==Or);er=!0);}catch(ze){Ar=!0,sn=ze}finally{try{if(!er&&Nr.return!=null&&(ar=Nr.return(),Object(ar)!==ar))return}finally{if(Ar)throw sn}}return mr}})(Xe,nr)||(function(fr,Or){if(fr){if(typeof fr=="string")return dn(fr,Or);var Nr={}.toString.call(fr).slice(8,-1);return Nr==="Object"&&fr.constructor&&(Nr=fr.constructor.name),Nr==="Map"||Nr==="Set"?Array.from(fr):Nr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nr)?dn(fr,Or):void 0}})(Xe,nr)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(re[re.length-1],2),ae=Ve[0],ge=Ve[1];if(ae.isZero()||ge.isZero())throw new Error("Couldn't find approximation");return[ae.toNumber(),ge.toNumber()]})(t);e=new o.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(e.n()<0||e.d()<0)throw new Error("price must be positive");return e}}]);function Bn(t){return Ze.encodeEd25519PublicKey(t.ed25519())}Fr.accountMerge=function(t){var e={};try{e.body=o.OperationBody.accountMerge(Mo(t.destination))}catch{throw new Error("destination is invalid")}return this.setSourceAccount(e,t),new o.Operation(e)},Fr.allowTrust=function(t){if(!Ze.isValidEd25519PublicKey(t.trustor))throw new Error("trustor is invalid");var e={};if(e.trustor=wn.fromPublicKey(t.trustor).xdrAccountId(),t.assetCode.length<=4){var r=t.assetCode.padEnd(4,"\0");e.asset=o.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(t.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var s=t.assetCode.padEnd(12,"\0");e.asset=o.AssetCode.assetTypeCreditAlphanum12(s)}typeof t.authorize=="boolean"?t.authorize?e.authorize=o.TrustLineFlags.authorizedFlag().value:e.authorize=0:e.authorize=t.authorize;var V=new o.AllowTrustOp(e),Tt={};return Tt.body=o.OperationBody.allowTrust(V),this.setSourceAccount(Tt,t),new o.Operation(Tt)},Fr.bumpSequence=function(t){var e={};if(typeof t.bumpTo!="string")throw new Error("bumpTo must be a string");try{new Vr(t.bumpTo)}catch{throw new Error("bumpTo must be a stringified number")}e.bumpTo=p.Hyper.fromString(t.bumpTo);var r=new o.BumpSequenceOp(e),s={};return s.body=o.OperationBody.bumpSequence(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.changeTrust=function(t){var e={};if(t.asset instanceof Xr)e.line=t.asset.toChangeTrustXDRObject();else{if(!(t.asset instanceof Kn))throw new TypeError("asset must be Asset or LiquidityPoolAsset");e.line=t.asset.toXDRObject()}if(t.limit!==void 0&&!this.isValidAmount(t.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));t.limit?e.limit=this._toXDRAmount(t.limit):e.limit=p.Hyper.fromString(new Vr("9223372036854775807").toString()),t.source&&(e.source=t.source.masterKeypair);var r=new o.ChangeTrustOp(e),s={};return s.body=o.OperationBody.changeTrust(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.createAccount=function(t){if(!Ze.isValidEd25519PublicKey(t.destination))throw new Error("destination is invalid");if(!this.isValidAmount(t.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var e={};e.destination=wn.fromPublicKey(t.destination).xdrAccountId(),e.startingBalance=this._toXDRAmount(t.startingBalance);var r=new o.CreateAccountOp(e),s={};return s.body=o.OperationBody.createAccount(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.createClaimableBalance=function(t){if(!(t.asset instanceof Xr))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(t.claimants)||t.claimants.length===0)throw new Error("must provide at least one claimant");var e={};e.asset=t.asset.toXDRObject(),e.amount=this._toXDRAmount(t.amount),e.claimants=Object.values(t.claimants).map(function(V){return V.toXDRObject()});var r=new o.CreateClaimableBalanceOp(e),s={};return s.body=o.OperationBody.createClaimableBalance(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.claimClaimableBalance=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Si(t.balanceId);var e={};e.balanceId=o.ClaimableBalanceId.fromXDR(t.balanceId,"hex");var r=new o.ClaimClaimableBalanceOp(e),s={};return s.body=o.OperationBody.claimClaimableBalance(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.clawbackClaimableBalance=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Si(t.balanceId);var e={balanceId:o.ClaimableBalanceId.fromXDR(t.balanceId,"hex")},r={body:o.OperationBody.clawbackClaimableBalance(new o.ClawbackClaimableBalanceOp(e))};return this.setSourceAccount(r,t),new o.Operation(r)},Fr.createPassiveSellOffer=function(t){var e={};if(e.selling=t.selling.toXDRObject(),e.buying=t.buying.toXDRObject(),!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(e.amount=this._toXDRAmount(t.amount),t.price===void 0)throw new TypeError("price argument is required");e.price=this._toXDRPrice(t.price);var r=new o.CreatePassiveSellOfferOp(e),s={};return s.body=o.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.inflation=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={};return e.body=o.OperationBody.inflation(),this.setSourceAccount(e,t),new o.Operation(e)},Fr.manageData=function(t){var e={};if(!(typeof t.name=="string"&&t.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(e.dataName=t.name,typeof t.value!="string"&&!Ci.isBuffer(t.value)&&t.value!==null)throw new Error("value must be a string, Buffer or null");if(typeof t.value=="string"?e.dataValue=Ci.from(t.value):e.dataValue=t.value,e.dataValue!==null&&e.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new o.ManageDataOp(e),s={};return s.body=o.OperationBody.manageData(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.manageSellOffer=function(t){var e={};if(e.selling=t.selling.toXDRObject(),e.buying=t.buying.toXDRObject(),!this.isValidAmount(t.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(e.amount=this._toXDRAmount(t.amount),t.price===void 0)throw new TypeError("price argument is required");e.price=this._toXDRPrice(t.price),t.offerId!==void 0?t.offerId=t.offerId.toString():t.offerId="0",e.offerId=p.Hyper.fromString(t.offerId);var r=new o.ManageSellOfferOp(e),s={};return s.body=o.OperationBody.manageSellOffer(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.manageBuyOffer=function(t){var e={};if(e.selling=t.selling.toXDRObject(),e.buying=t.buying.toXDRObject(),!this.isValidAmount(t.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(e.buyAmount=this._toXDRAmount(t.buyAmount),t.price===void 0)throw new TypeError("price argument is required");e.price=this._toXDRPrice(t.price),t.offerId!==void 0?t.offerId=t.offerId.toString():t.offerId="0",e.offerId=p.Hyper.fromString(t.offerId);var r=new o.ManageBuyOfferOp(e),s={};return s.body=o.OperationBody.manageBuyOffer(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.pathPaymentStrictReceive=function(t){switch(!0){case!t.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(t.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!t.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(t.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var e={};e.sendAsset=t.sendAsset.toXDRObject(),e.sendMax=this._toXDRAmount(t.sendMax);try{e.destination=Mo(t.destination)}catch{throw new Error("destination is invalid")}e.destAsset=t.destAsset.toXDRObject(),e.destAmount=this._toXDRAmount(t.destAmount);var r=t.path?t.path:[];e.path=r.map(function(Tt){return Tt.toXDRObject()});var s=new o.PathPaymentStrictReceiveOp(e),V={};return V.body=o.OperationBody.pathPaymentStrictReceive(s),this.setSourceAccount(V,t),new o.Operation(V)},Fr.pathPaymentStrictSend=function(t){switch(!0){case!t.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(t.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!t.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(t.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var e={};e.sendAsset=t.sendAsset.toXDRObject(),e.sendAmount=this._toXDRAmount(t.sendAmount);try{e.destination=Mo(t.destination)}catch{throw new Error("destination is invalid")}e.destAsset=t.destAsset.toXDRObject(),e.destMin=this._toXDRAmount(t.destMin);var r=t.path?t.path:[];e.path=r.map(function(Tt){return Tt.toXDRObject()});var s=new o.PathPaymentStrictSendOp(e),V={};return V.body=o.OperationBody.pathPaymentStrictSend(s),this.setSourceAccount(V,t),new o.Operation(V)},Fr.payment=function(t){if(!t.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var e={};try{e.destination=Mo(t.destination)}catch{throw new Error("destination is invalid")}e.asset=t.asset.toXDRObject(),e.amount=this._toXDRAmount(t.amount);var r=new o.PaymentOp(e),s={};return s.body=o.OperationBody.payment(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.setOptions=function(t){var e={};if(t.inflationDest){if(!Ze.isValidEd25519PublicKey(t.inflationDest))throw new Error("inflationDest is invalid");e.inflationDest=wn.fromPublicKey(t.inflationDest).xdrAccountId()}if(e.clearFlags=this._checkUnsignedIntValue("clearFlags",t.clearFlags),e.setFlags=this._checkUnsignedIntValue("setFlags",t.setFlags),e.masterWeight=this._checkUnsignedIntValue("masterWeight",t.masterWeight,H),e.lowThreshold=this._checkUnsignedIntValue("lowThreshold",t.lowThreshold,H),e.medThreshold=this._checkUnsignedIntValue("medThreshold",t.medThreshold,H),e.highThreshold=this._checkUnsignedIntValue("highThreshold",t.highThreshold,H),t.homeDomain!==void 0&&typeof t.homeDomain!="string")throw new TypeError("homeDomain argument must be of type String");if(e.homeDomain=t.homeDomain,t.signer){var r,s=this._checkUnsignedIntValue("signer.weight",t.signer.weight,H),V=0;if(t.signer.ed25519PublicKey){if(!Ze.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var Tt=Ze.decodeEd25519PublicKey(t.signer.ed25519PublicKey);r=new o.SignerKey.signerKeyTypeEd25519(Tt),V+=1}if(t.signer.preAuthTx){if(typeof t.signer.preAuthTx=="string"&&(t.signer.preAuthTx=di.from(t.signer.preAuthTx,"hex")),!di.isBuffer(t.signer.preAuthTx)||t.signer.preAuthTx.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new o.SignerKey.signerKeyTypePreAuthTx(t.signer.preAuthTx),V+=1}if(t.signer.sha256Hash){if(typeof t.signer.sha256Hash=="string"&&(t.signer.sha256Hash=di.from(t.signer.sha256Hash,"hex")),!di.isBuffer(t.signer.sha256Hash)||t.signer.sha256Hash.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new o.SignerKey.signerKeyTypeHashX(t.signer.sha256Hash),V+=1}if(t.signer.ed25519SignedPayload){if(!Ze.isValidSignedPayload(t.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var Yt=Ze.decodeSignedPayload(t.signer.ed25519SignedPayload),re=o.SignerKeyEd25519SignedPayload.fromXDR(Yt);r=o.SignerKey.signerKeyTypeEd25519SignedPayload(re),V+=1}if(V!==1)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");e.signer=new o.Signer({key:r,weight:s})}var me=new o.SetOptionsOp(e),Se={};return Se.body=o.OperationBody.setOptions(me),this.setSourceAccount(Se,t),new o.Operation(Se)},Fr.beginSponsoringFutureReserves=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.isValidEd25519PublicKey(t.sponsoredId))throw new Error("sponsoredId is invalid");var e=new o.BeginSponsoringFutureReservesOp({sponsoredId:wn.fromPublicKey(t.sponsoredId).xdrAccountId()}),r={};return r.body=o.OperationBody.beginSponsoringFutureReserves(e),this.setSourceAccount(r,t),new o.Operation(r)},Fr.endSponsoringFutureReserves=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={};return e.body=o.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(e,t),new o.Operation(e)},Fr.revokeAccountSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");var e=o.LedgerKey.account(new o.LedgerKeyAccount({accountId:wn.fromPublicKey(t.account).xdrAccountId()})),r=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(e),s={};return s.body=o.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.revokeTrustlineSponsorship=function(){var t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(e.asset instanceof Xr)t=e.asset.toTrustLineXDRObject();else{if(!(e.asset instanceof fi))throw new TypeError("asset must be an Asset or LiquidityPoolId");t=e.asset.toXDRObject()}var r=o.LedgerKey.trustline(new o.LedgerKeyTrustLine({accountId:wn.fromPublicKey(e.account).xdrAccountId(),asset:t})),s=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),V={};return V.body=o.OperationBody.revokeSponsorship(s),this.setSourceAccount(V,e),new o.Operation(V)},Fr.revokeOfferSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.isValidEd25519PublicKey(t.seller))throw new Error("seller is invalid");if(typeof t.offerId!="string")throw new Error("offerId is invalid");var e=o.LedgerKey.offer(new o.LedgerKeyOffer({sellerId:wn.fromPublicKey(t.seller).xdrAccountId(),offerId:o.Int64.fromString(t.offerId)})),r=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(e),s={};return s.body=o.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.revokeDataSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.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 e=o.LedgerKey.data(new o.LedgerKeyData({accountId:wn.fromPublicKey(t.account).xdrAccountId(),dataName:t.name})),r=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(e),s={};return s.body=o.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.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 e=o.LedgerKey.claimableBalance(new o.LedgerKeyClaimableBalance({balanceId:o.ClaimableBalanceId.fromXDR(t.balanceId,"hex")})),r=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(e),s={};return s.body=o.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,t),new o.Operation(s)},Fr.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 e=o.LedgerKey.liquidityPool(new o.LedgerKeyLiquidityPool({liquidityPoolId:o.PoolId.fromXDR(t.liquidityPoolId,"hex")})),r=o.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(e),s={body:o.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(s,t),new o.Operation(s)},Fr.revokeSignerSponsorship=function(){var t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ze.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(e.signer.ed25519PublicKey){if(!Ze.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=Ze.decodeEd25519PublicKey(e.signer.ed25519PublicKey);t=new o.SignerKey.signerKeyTypeEd25519(r)}else if(e.signer.preAuthTx){var s;if(s=typeof e.signer.preAuthTx=="string"?b.from(e.signer.preAuthTx,"hex"):e.signer.preAuthTx,!b.isBuffer(s)||s.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");t=new o.SignerKey.signerKeyTypePreAuthTx(s)}else{if(!e.signer.sha256Hash)throw new Error("signer is invalid");var V;if(V=typeof e.signer.sha256Hash=="string"?b.from(e.signer.sha256Hash,"hex"):e.signer.sha256Hash,!b.isBuffer(V)||V.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");t=new o.SignerKey.signerKeyTypeHashX(V)}var Tt=new o.RevokeSponsorshipOpSigner({accountId:wn.fromPublicKey(e.account).xdrAccountId(),signerKey:t}),Yt=o.RevokeSponsorshipOp.revokeSponsorshipSigner(Tt),re={};return re.body=o.OperationBody.revokeSponsorship(Yt),this.setSourceAccount(re,e),new o.Operation(re)},Fr.clawback=function(t){var e={};if(!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));e.amount=this._toXDRAmount(t.amount),e.asset=t.asset.toXDRObject();try{e.from=Mo(t.from)}catch{throw new Error("from address is invalid")}var r={body:o.OperationBody.clawback(new o.ClawbackOp(e))};return this.setSourceAccount(r,t),new o.Operation(r)},Fr.setTrustLineFlags=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={};if(h(t.flags)!=="object"||Object.keys(t.flags).length===0)throw new Error("opts.flags must be a map of boolean flags to modify");var r={authorized:o.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:o.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:o.TrustLineFlags.trustlineClawbackEnabledFlag()},s=0,V=0;Object.keys(t.flags).forEach(function(Yt){if(!Object.prototype.hasOwnProperty.call(r,Yt))throw new Error("unsupported flag name specified: ".concat(Yt));var re=t.flags[Yt],me=r[Yt].value;re===!0?V|=me:re===!1&&(s|=me)}),e.trustor=wn.fromPublicKey(t.trustor).xdrAccountId(),e.asset=t.asset.toXDRObject(),e.clearFlags=s,e.setFlags=V;var Tt={body:o.OperationBody.setTrustLineFlags(new o.SetTrustLineFlagsOp(e))};return this.setSourceAccount(Tt,t),new o.Operation(Tt)},Fr.liquidityPoolDeposit=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.liquidityPoolId,r=t.maxAmountA,s=t.maxAmountB,V=t.minPrice,Tt=t.maxPrice,Yt={};if(!e)throw new TypeError("liquidityPoolId argument is required");if(Yt.liquidityPoolId=o.PoolId.fromXDR(e,"hex"),!this.isValidAmount(r,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(Yt.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(s,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(Yt.maxAmountB=this._toXDRAmount(s),V===void 0)throw new TypeError("minPrice argument is required");if(Yt.minPrice=this._toXDRPrice(V),Tt===void 0)throw new TypeError("maxPrice argument is required");Yt.maxPrice=this._toXDRPrice(Tt);var re=new o.LiquidityPoolDepositOp(Yt),me={body:o.OperationBody.liquidityPoolDeposit(re)};return this.setSourceAccount(me,t),new o.Operation(me)},Fr.liquidityPoolWithdraw=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={};if(!t.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(e.liquidityPoolId=o.PoolId.fromXDR(t.liquidityPoolId,"hex"),!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(e.amount=this._toXDRAmount(t.amount),!this.isValidAmount(t.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(e.minAmountA=this._toXDRAmount(t.minAmountA),!this.isValidAmount(t.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));e.minAmountB=this._toXDRAmount(t.minAmountB);var r=new o.LiquidityPoolWithdrawOp(e),s={body:o.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(s,t),new o.Operation(s)},Fr.invokeHostFunction=function(t){if(!t.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(t),")"));t.func.switch().value===o.HostFunctionType.hostFunctionTypeInvokeContract().value&&t.func.invokeContract().args().forEach(function(s){var V;try{V=Ke.fromScVal(s)}catch{return}switch(V._type){case"claimableBalance":case"liquidityPool":throw new TypeError("claimable balances and liquidity pools cannot be arguments to invokeHostFunction")}});var e=new o.InvokeHostFunctionOp({hostFunction:t.func,auth:t.auth||[]}),r={body:o.OperationBody.invokeHostFunction(e)};return this.setSourceAccount(r,t),new o.Operation(r)},Fr.extendFootprintTtl=function(t){var e;if(((e=t.extendTo)!==null&&e!==void 0?e:-1)<=0)throw new RangeError("extendTo has to be positive");var r=new o.ExtendFootprintTtlOp({ext:new o.ExtensionPoint(0),extendTo:t.extendTo}),s={body:o.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(s,t),new o.Operation(s)},Fr.restoreFootprint=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=new o.RestoreFootprintOp({ext:new o.ExtensionPoint(0)}),r={body:o.OperationBody.restoreFootprint(e)};return this.setSourceAccount(r,t??{}),new o.Operation(r)},Fr.createStellarAssetContract=function(t){var e=t.asset;if(typeof e=="string"){var r=(function(Tt,Yt){return(function(re){if(Array.isArray(re))return re})(Tt)||(function(re,me){var Se=re==null?null:typeof Symbol<"u"&&re[Symbol.iterator]||re["@@iterator"];if(Se!=null){var tr,Ve,ae,ge,Xe=[],nr=!0,fr=!1;try{if(ae=(Se=Se.call(re)).next,me===0){if(Object(Se)!==Se)return;nr=!1}else for(;!(nr=(tr=ae.call(Se)).done)&&(Xe.push(tr.value),Xe.length!==me);nr=!0);}catch(Or){fr=!0,Ve=Or}finally{try{if(!nr&&Se.return!=null&&(ge=Se.return(),Object(ge)!==ge))return}finally{if(fr)throw Ve}}return Xe}})(Tt,Yt)||(function(re,me){if(re){if(typeof re=="string")return Tr(re,me);var Se={}.toString.call(re).slice(8,-1);return Se==="Object"&&re.constructor&&(Se=re.constructor.name),Se==="Map"||Se==="Set"?Array.from(re):Se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Se)?Tr(re,me):void 0}})(Tt,Yt)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(e.split(":"),2),s=r[0],V=r[1];e=new Xr(s,V)}if(!(e instanceof Xr))throw new TypeError("expected Asset in 'opts.asset', got ".concat(e));return this.invokeHostFunction({source:t.source,auth:t.auth,func:o.HostFunction.hostFunctionTypeCreateContract(new o.CreateContractArgs({executable:o.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:o.ContractIdPreimage.contractIdPreimageFromAsset(e.toXDRObject())}))})},Fr.invokeContractFunction=function(t){var e=new Ke(t.contract);if(e._type!=="contract")throw new TypeError("expected contract strkey instance, got ".concat(e));return this.invokeHostFunction({source:t.source,auth:t.auth,func:o.HostFunction.hostFunctionTypeInvokeContract(new o.InvokeContractArgs({contractAddress:e.toScAddress(),functionName:t.function,args:t.args}))})},Fr.createCustomContract=function(t){var e,r=ir.from(t.salt||wn.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(r.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:o.HostFunction.hostFunctionTypeCreateContractV2(new o.CreateContractArgsV2({executable:o.ContractExecutable.contractExecutableWasm(ir.from(t.wasmHash)),contractIdPreimage:o.ContractIdPreimage.contractIdPreimageFromAddress(new o.ContractIdPreimageFromAddress({address:t.address.toScAddress(),salt:r})),constructorArgs:(e=t.constructorArgs)!==null&&e!==void 0?e:[]}))})},Fr.uploadContractWasm=function(t){return this.invokeHostFunction({source:t.source,auth:t.auth,func:o.HostFunction.hostFunctionTypeUploadContractWasm(ir.from(t.wasm))})};var uo=w(8287).Buffer;function to(t){return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},to(t)}function gn(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:null;switch((function(s,V){if(!(s instanceof V))throw new TypeError("Cannot call a class as a function")})(this,t),this._type=e,this._value=r,this._type){case on:break;case eo:t._validateIdValue(r);break;case lr:t._validateTextValue(r);break;case Hn:case xn:t._validateHashValue(r),typeof r=="string"&&(this._value=uo.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}return(function(e,r,s){return r&&gn(e.prototype,r),s&&gn(e,s),Object.defineProperty(e,"prototype",{writable:!1}),e})(t,[{key:"type",get:function(){return this._type},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case on:return null;case eo:case lr:return this._value;case Hn:case xn:return uo.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case on:return o.Memo.memoNone();case eo:return o.Memo.memoId(p.UnsignedHyper.fromString(this._value));case lr:return o.Memo.memoText(this._value);case Hn:return o.Memo.memoHash(this._value);case xn:return o.Memo.memoReturn(this._value);default:return null}}}],[{key:"_validateIdValue",value:function(e){var r,s=new Error("Expects a int64 as a string. Got ".concat(e));if(typeof e!="string")throw s;try{r=new Vr(e)}catch{throw s}if(!r.isFinite()||r.isNaN())throw s}},{key:"_validateTextValue",value:function(e){if(!o.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var r,s=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(e));if(e==null)throw s;if(typeof e=="string"){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw s;r=uo.from(e,"hex")}else{if(!uo.isBuffer(e))throw s;r=uo.from(e)}if(!r.length||r.length!==32)throw s}},{key:"none",value:function(){return new t(on)}},{key:"text",value:function(e){return new t(lr,e)}},{key:"id",value:function(e){return new t(eo,e)}},{key:"hash",value:function(e){return new t(Hn,e)}},{key:"return",value:function(e){return new t(xn,e)}},{key:"fromXDRObject",value:function(e){switch(e.arm()){case"id":return t.id(e.value().toString());case"text":return t.text(e.value());case"hash":return t.hash(e.value());case"retHash":return t.return(e.value())}if(e.value()===void 0)return t.none();throw new Error("Unknown type")}}])})(),fn=w(8287).Buffer;function an(t){return an=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(t)}function Ct(t,e){for(var r=0;r=this.operations.length)throw new RangeError("invalid operation index");var s=this.operations[r];try{s=Fr.createClaimableBalance(s)}catch(Yt){throw new TypeError("expected createClaimableBalance, got ".concat(s.type,": ").concat(Yt))}var V=Ze.decodeEd25519PublicKey(pi(this.source)),Tt=l(o.HashIdPreimage.envelopeTypeOpId(new o.HashIdPreimageOperationId({sourceAccount:o.AccountId.publicKeyTypeEd25519(V),seqNum:o.SequenceNumber.fromString(this.sequence),opNum:r})).toXDR("raw"));return o.ClaimableBalanceId.claimableBalanceIdTypeV0(Tt).toXDR("hex")}}])})(Xo),Te=w(8287).Buffer;function Me(t){return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}function Qe(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,s=Array(e);r1&&arguments[1]!==void 0?arguments[1]:{};if((function(s,V){if(!(s instanceof V))throw new TypeError("Cannot call a class as a function")})(this,t),!e)throw new Error("must specify source account for the transaction");if(r.fee===void 0)throw new Error("must specify fee for the transaction (in stroops)");this.source=e,this.operations=[],this.baseFee=r.fee,this.timebounds=r.timebounds?Hi({},r.timebounds):null,this.ledgerbounds=r.ledgerbounds?Hi({},r.ledgerbounds):null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=r.extraSigners?fa(r.extraSigners):null,this.memo=r.memo||xo.none(),this.networkPassphrase=r.networkPassphrase||null,this.sorobanData=r.sorobanData?new qn(r.sorobanData).build():null}return(function(e,r,s){return r&&da(e.prototype,r),s&&da(e,s),Object.defineProperty(e,"prototype",{writable:!1}),e})(t,[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"addOperationAt",value:function(e,r){return this.operations.splice(r,0,e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"clearOperationAt",value:function(e){return this.operations.splice(e,1),this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(this.timebounds!==null&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var r=Math.floor(Date.now()/1e3)+e;this.timebounds===null?this.timebounds={minTime:0,maxTime:r}:this.timebounds={minTime:this.timebounds.minTime,maxTime:r}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(e,r){if(typeof e=="number"&&(e=new Date(1e3*e)),typeof r=="number"&&(r=new Date(1e3*r)),this.timebounds!==null)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var s=Math.floor(e.valueOf()/1e3),V=Math.floor(r.valueOf()/1e3);if(s<0)throw new Error("min_time cannot be negative");if(V<0)throw new Error("max_time cannot be negative");if(V>0&&s>V)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:s,maxTime:V},this}},{key:"setLedgerbounds",value:function(e,r){if(this.ledgerbounds!==null)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw new Error("min_ledger cannot be negative");if(r<0)throw new Error("max_ledger cannot be negative");if(r>0&&e>r)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:e,maxLedger:r},this}},{key:"setMinAccountSequence",value:function(e){if(this.minAccountSequence!==null)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=e,this}},{key:"setMinAccountSequenceAge",value:function(e){if(typeof e!="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(e<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){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(e<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))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(e.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=fa(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new qn(e).build(),this}},{key:"build",value:function(){var e=new Vr(this.source.sequenceNumber()).plus(1),r={fee:new Vr(this.baseFee).times(this.operations.length).toNumber(),seqNum:o.SequenceNumber.fromString(e.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).");ya(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),ya(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=p.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=p.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var s=new o.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var V=null;this.ledgerbounds!==null&&(V=new o.LedgerBounds(this.ledgerbounds));var Tt=this.minAccountSequence||"0";Tt=o.SequenceNumber.fromString(Tt);var Yt=p.UnsignedHyper.fromString(this.minAccountSequenceAge!==null?this.minAccountSequenceAge.toString():"0"),re=this.minAccountSequenceLedgerGap||0,me=this.extraSigners!==null?this.extraSigners.map(la.decodeAddress):[];r.cond=o.Preconditions.precondV2(new o.PreconditionsV2({timeBounds:s,ledgerBounds:V,minSeqNum:Tt,minSeqAge:Yt,minSeqLedgerGap:re,extraSigners:me}))}else r.cond=o.Preconditions.precondTime(s);r.sourceAccount=Mo(this.source.accountId()),this.sorobanData?r.ext=new o.TransactionExt(1,this.sorobanData):r.ext=new o.TransactionExt(0,o.Void);var Se=new o.Transaction(r);Se.operations(this.operations);var tr=new o.TransactionEnvelope.envelopeTypeTx(new o.TransactionV1Envelope({tx:Se})),Ve=new Ie(tr,this.networkPassphrase);return this.source.incrementSequenceNumber(),Ve}},{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(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(e instanceof Ie))throw new TypeError("expected a 'Transaction', got: ".concat(e));var s,V=(BigInt(e.sequence)-1n).toString();if(Ze.isValidMed25519PublicKey(e.source))s=qo.fromAddress(e.source,V);else{if(!Ze.isValidEd25519PublicKey(e.source))throw new TypeError("unsupported tx source account: ".concat(e.source));s=new ho(e.source,V)}var Tt=new t(s,Hi({fee:(parseInt(e.fee,10)/e.operations.length||zi).toString(),memo:e.memo,networkPassphrase:e.networkPassphrase,timebounds:e.timeBounds,ledgerbounds:e.ledgerBounds,minAccountSequence:e.minAccountSequence,minAccountSequenceAge:e.minAccountSequenceAge,minAccountSequenceLedgerGap:e.minAccountSequenceLedgerGap,extraSigners:e.extraSigners},r));return e._tx.operations().forEach(function(Yt){return Tt.addOperation(Yt)}),Tt}},{key:"buildFeeBumpTransaction",value:function(e,r,s,V){var Tt=s.operations.length,Yt=new Vr(zi),re=new Vr(s.fee).div(Tt),me=new Vr(0),Se=s.toEnvelope();if(Se.switch().value===o.EnvelopeType.envelopeTypeTx().value){var tr,Ve=Se.v1().tx().ext().value();me=new Vr((tr=Ve?.resourceFee())!==null&&tr!==void 0?tr:0),re=Vr.max(Yt,re.minus(me))}var ae=new Vr(r);if(ae.lt(re))throw new Error("Invalid baseFee, it should be at least ".concat(re," stroops."));if(ae.lt(Yt))throw new Error("Invalid baseFee, it should be at least ".concat(Yt," stroops."));var ge,Xe=s.toEnvelope();if(Xe.switch()===o.EnvelopeType.envelopeTypeTxV0()){var nr=Xe.v0().tx(),fr=new o.Transaction({sourceAccount:new o.MuxedAccount.keyTypeEd25519(nr.sourceAccountEd25519()),fee:nr.fee(),seqNum:nr.seqNum(),cond:o.Preconditions.precondTime(nr.timeBounds()),memo:nr.memo(),operations:nr.operations(),ext:new o.TransactionExt(0)});Xe=new o.TransactionEnvelope.envelopeTypeTx(new o.TransactionV1Envelope({tx:fr,signatures:Xe.v0().signatures()}))}ge=typeof e=="string"?Mo(e):e.xdrMuxedAccount();var Or=new o.FeeBumpTransaction({feeSource:ge,fee:o.Int64.fromString(ae.times(Tt+1).plus(me).toString()),innerTx:o.FeeBumpTransactionInnerTx.envelopeTypeTx(Xe.v1()),ext:new o.FeeBumpTransactionExt(0)}),Nr=new o.FeeBumpTransactionEnvelope({tx:Or,signatures:[]}),Sr=new o.TransactionEnvelope.envelopeTypeTxFeeBump(Nr);return new zn(Sr,V)}},{key:"fromXDR",value:function(e,r){return typeof e=="string"&&(e=o.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===o.EnvelopeType.envelopeTypeTxFeeBump()?new zn(e,r):new Ie(e,r)}}])})();function ya(t){return t instanceof Date&&!isNaN(t)}var Wi={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"};function Oi(t){return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oi(t)}function Xi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r0&&(r=e>r.length?["0",r.toString().padStart(e,"0")].join("."):[r.slice(0,-e),r.slice(-e)].join(".")),r.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,".0").replace(/^\./,"0.")}},{key:"parseTokenAmount",value:function(t,e){var r,s=(function(Yt){return(function(re){if(Array.isArray(re))return re})(Yt)||(function(re){if(typeof Symbol<"u"&&re[Symbol.iterator]!=null||re["@@iterator"]!=null)return Array.from(re)})(Yt)||(function(re,me){if(re){if(typeof re=="string")return Xi(re,me);var Se={}.toString.call(re).slice(8,-1);return Se==="Object"&&re.constructor&&(Se=re.constructor.name),Se==="Map"||Se==="Set"?Array.from(re):Se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Se)?Xi(re,me):void 0}})(Yt)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(t.split(".").slice()),V=s[0],Tt=s[1];if(Xi(s).slice(2).length)throw new Error("Invalid decimal value: ".concat(t));return BigInt(V+((r=Tt?.padEnd(e,"0"))!==null&&r!==void 0?r:"0".repeat(e))).toString()}}]);function ki(t){return ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ki(t)}function Ka(t,e){for(var r=0;r1?e-1:0),s=1;sNumber.MAX_SAFE_INTEGER||t>64n),r=BigInt.asUintN(64,t);return o.ScVal.scvI128(new o.Int128Parts({hi:new o.Int64(e),lo:new o.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var t=this.int.toBigInt();return o.ScVal.scvU128(new o.UInt128Parts({hi:new o.Uint64(BigInt.asUintN(64,t>>64n)),lo:new o.Uint64(BigInt.asUintN(64,t))}))}},{key:"toI256",value:function(){var t=this.int.toBigInt(),e=BigInt.asIntN(64,t>>192n),r=BigInt.asUintN(64,t>>128n),s=BigInt.asUintN(64,t>>64n),V=BigInt.asUintN(64,t);return o.ScVal.scvI256(new o.Int256Parts({hiHi:new o.Int64(e),hiLo:new o.Uint64(r),loHi:new o.Uint64(s),loLo:new o.Uint64(V)}))}},{key:"toU256",value:function(){var t=this.int.toBigInt(),e=BigInt.asUintN(64,t>>192n),r=BigInt.asUintN(64,t>>128n),s=BigInt.asUintN(64,t>>64n),V=BigInt.asUintN(64,t);return o.ScVal.scvU256(new o.UInt256Parts({hiHi:new o.Uint64(e),hiLo:new o.Uint64(r),loHi:new o.Uint64(s),loLo:new o.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();case"timepoint":return this.toTimepoint();case"duration":return this.toDuration();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(t){if(this.int.size>t)throw RangeError("value too large for ".concat(t," bits (").concat(this.type,")"))}}],[{key:"isType",value:function(t){switch(t){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":case"timepoint":case"duration":return!0;default:return!1}}},{key:"getType",value:function(t){return t.slice(3).toLowerCase()}}]);function ra(t){return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ra(t)}function us(t,e,r){return e=Fi(e),(function(s,V){if(V&&(ra(V)=="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(Tt){if(Tt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Tt})(s)})(t,Ta()?Reflect.construct(e,r||[],Fi(t).constructor):e.apply(t,r))}function Ta(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ta=function(){return!!t})()}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fi(t)}function na(t,e){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},na(t,e)}var Oa=(function(t){function e(r,s){var V;(function(me,Se){if(!(me instanceof Se))throw new TypeError("Cannot call a class as a function")})(this,e);var Tt=r<0,Yt=(V=s?.type)!==null&&V!==void 0?V:"";if(Yt.startsWith("u")&&Tt)throw TypeError("specified type ".concat(s.type," yet negative (").concat(r,")"));if(Yt===""){Yt=Tt?"i":"u";var re=(function(me){var Se,tr=me.toString(2).length;return(Se=[64,128,256].find(function(Ve){return tr<=Ve}))!==null&&Se!==void 0?Se:tr})(r);switch(re){case 64:case 128:case 256:Yt+=re.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(r,"), got ").concat(re))}}return us(this,e,[Yt,r])}return(function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),s&&na(r,s)})(e,t),(function(r){return Object.defineProperty(r,"prototype",{writable:!1}),r})(e)})(ui);function ka(t){var e=ui.getType(t.switch().name);switch(t.switch().name){case"scvU32":case"scvI32":return BigInt(t.value());case"scvU64":case"scvI64":case"scvTimepoint":case"scvDuration":return new ui(e,t.value()).toBigInt();case"scvU128":case"scvI128":return new ui(e,[t.value().lo(),t.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new ui(e,[t.value().loLo(),t.value().loHi(),t.value().hiLo(),t.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(t.switch()))}}var xa=w(8287).Buffer;function Di(t,e){return(function(r){if(Array.isArray(r))return r})(t)||(function(r,s){var V=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(V!=null){var Tt,Yt,re,me,Se=[],tr=!0,Ve=!1;try{if(re=(V=V.call(r)).next,s===0){if(Object(V)!==V)return;tr=!1}else for(;!(tr=(Tt=re.call(V)).done)&&(Se.push(Tt.value),Se.length!==s);tr=!0);}catch(ae){Ve=!0,Yt=ae}finally{try{if(!tr&&V.return!=null&&(me=V.return(),Object(me)!==me))return}finally{if(Ve)throw Yt}}return Se}})(t,e)||(function(r,s){if(r){if(typeof r=="string")return _a(r,s);var V={}.toString.call(r).slice(8,-1);return V==="Object"&&r.constructor&&(V=r.constructor.name),V==="Map"||V==="Set"?Array.from(r):V==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(V)?_a(r,s):void 0}})(t,e)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function _a(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r1&&arguments[1]!==void 0?arguments[1]:{};switch(ci(t)){case"object":var r,s,V;if(t===null)return o.ScVal.scvVoid();if(t instanceof o.ScVal)return t;if(t instanceof Ke)return t.toScVal();if(t instanceof wn)return li(t.publicKey(),{type:"address"});if(t instanceof ma)return t.address().toScVal();if(t instanceof Uint8Array||xa.isBuffer(t)){var Tt,Yt=Uint8Array.from(t);switch((Tt=e?.type)!==null&&Tt!==void 0?Tt:"bytes"){case"bytes":return o.ScVal.scvBytes(Yt);case"symbol":return o.ScVal.scvSymbol(Yt);case"string":return o.ScVal.scvString(Yt);default:throw new TypeError("invalid type (".concat(e.type,") specified for bytes-like value"))}}if(Array.isArray(t))return o.ScVal.scvVec(t.map(function(Se,tr){return Array.isArray(e.type)?li(Se,(function(Ve){for(var ae=1;aetr&&{type:e.type[tr]})):li(Se,e)}));if(((r=(s=t.constructor)===null||s===void 0?void 0:s.name)!==null&&r!==void 0?r:"")!=="Object")throw new TypeError("cannot interpret ".concat((V=t.constructor)===null||V===void 0?void 0:V.name," value as ScVal (").concat(JSON.stringify(t),")"));return o.ScVal.scvMap(Object.entries(t).sort(function(Se,tr){var Ve=Di(Se,1)[0],ae=Di(tr,1)[0];return Ve.localeCompare(ae)}).map(function(Se){var tr,Ve,ae=Di(Se,2),ge=ae[0],Xe=ae[1],nr=Di((tr=((Ve=e?.type)!==null&&Ve!==void 0?Ve:{})[ge])!==null&&tr!==void 0?tr:[null,null],2),fr=nr[0],Or=nr[1],Nr=fr?{type:fr}:{},Sr=Or?{type:Or}:{};return new o.ScMapEntry({key:li(ge,Nr),val:li(Xe,Sr)})}));case"number":case"bigint":switch(e?.type){case"u32":return o.ScVal.scvU32(t);case"i32":return o.ScVal.scvI32(t)}return new Oa(t,{type:e?.type}).toScVal();case"string":var re,me=(re=e?.type)!==null&&re!==void 0?re:"string";switch(me){case"string":return o.ScVal.scvString(t);case"symbol":return o.ScVal.scvSymbol(t);case"address":return new Ke(t).toScVal();case"u32":return o.ScVal.scvU32(parseInt(t,10));case"i32":return o.ScVal.scvI32(parseInt(t,10));default:if(ui.isType(me))return new ui(me,t).toScVal();throw new TypeError("invalid type (".concat(e.type,") specified for string value"))}case"boolean":return o.ScVal.scvBool(t);case"undefined":return o.ScVal.scvVoid();case"function":return li(t());default:throw new TypeError("failed to convert typeof ".concat(ci(t)," (").concat(t,")"))}}function Jo(t){var e,r;switch(t.switch().value){case o.ScValType.scvVoid().value:return null;case o.ScValType.scvU64().value:case o.ScValType.scvI64().value:return t.value().toBigInt();case o.ScValType.scvU128().value:case o.ScValType.scvI128().value:case o.ScValType.scvU256().value:case o.ScValType.scvI256().value:return ka(t);case o.ScValType.scvVec().value:return((e=t.vec())!==null&&e!==void 0?e:[]).map(Jo);case o.ScValType.scvAddress().value:return Ke.fromScVal(t).toString();case o.ScValType.scvMap().value:return Object.fromEntries(((r=t.map())!==null&&r!==void 0?r:[]).map(function(Tt){return[Jo(Tt.key()),Jo(Tt.val())]}));case o.ScValType.scvBool().value:case o.ScValType.scvU32().value:case o.ScValType.scvI32().value:case o.ScValType.scvBytes().value:return t.value();case o.ScValType.scvSymbol().value:case o.ScValType.scvString().value:var s=t.value();if(xa.isBuffer(s)||ArrayBuffer.isView(s))try{return new TextDecoder().decode(s)}catch{return new Uint8Array(s.buffer)}return s;case o.ScValType.scvTimepoint().value:case o.ScValType.scvDuration().value:return new o.Uint64(t.value()).toBigInt();case o.ScValType.scvError().value:if(t.error().switch().value===o.ScErrorType.sceContract().value)return{type:"contract",code:t.error().contractCode()};var V=t.error();return{type:"system",code:V.code().value,value:V.code().name};default:return t.value()}}function _i(t){return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_i(t)}function Ra(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(V){return Object.getOwnPropertyDescriptor(t,V).enumerable})),r.push.apply(r,s)}return r}function Ia(t){for(var e=1;e3?(Rt=Pe===en)&&(er=zt[(mr=zt[4])?5:(mr=3,3)],zt[4]=zt[5]=t):zt[0]<=se&&((Rt=Mr<2&&seen||en>Pe)&&(zt[4]=Mr,zt[5]=en,Gr.n=Pe,mr=0))}if(Rt||Mr>1)return Yt;throw tn=!0,en}return function(Mr,en,Rt){if(Ar>1)throw TypeError("Generator is already running");for(tn&&en===1&&nn(en,Rt),mr=en,er=Rt;(e=mr<2?t:er)||!tn;){ar||(mr?mr<3?(mr>1&&(Gr.n=-1),nn(mr,er)):Gr.n=er:Gr.v=er);try{if(Ar=2,ar){if(mr||(Mr="next"),e=ar[Mr]){if(!(e=e.call(ar,er)))throw TypeError("iterator result is not an object");if(!e.done)return e;er=e.value,mr<2&&(mr=0)}else mr===1&&(e=ar.return)&&e.call(ar),mr<2&&(er=TypeError("The iterator does not provide a '"+Mr+"' method"),mr=1);ar=t}else if((e=(tn=Gr.n<0)?er:Sr.call(sn,Gr))!==Yt)break}catch(zt){ar=t,mr=1,er=zt}finally{Ar=1}}return{value:e,done:tn}}})(ge,nr,fr),!0),Nr}var Yt={};function re(){}function me(){}function Se(){}e=Object.getPrototypeOf;var tr=[][s]?e(e([][s]())):(Go(e={},s,function(){return this}),e),Ve=Se.prototype=re.prototype=Object.create(tr);function ae(ge){return Object.setPrototypeOf?Object.setPrototypeOf(ge,Se):(ge.__proto__=Se,Go(ge,V,"GeneratorFunction")),ge.prototype=Object.create(Ve),ge}return me.prototype=Se,Go(Ve,"constructor",Se),Go(Se,"constructor",me),me.displayName="GeneratorFunction",Go(Se,V,"GeneratorFunction"),Go(Ve),Go(Ve,V,"Generator"),Go(Ve,s,function(){return this}),Go(Ve,"toString",function(){return"[object Generator]"}),(oa=function(){return{w:Tt,m:ae}})()}function Go(t,e,r,s){var V=Object.defineProperty;try{V({},"",{})}catch{V=0}Go=function(Tt,Yt,re,me){function Se(tr,Ve){Go(Tt,tr,function(ae){return this._invoke(tr,Ve,ae)})}Yt?V?V(Tt,Yt,{value:re,enumerable:!me,configurable:!me,writable:!me}):Tt[Yt]=re:(Se("next",0),Se("throw",1),Se("return",2))},Go(t,e,r,s)}function Ca(t,e,r,s,V,Tt,Yt){try{var re=t[Tt](Yt),me=re.value}catch(Se){return void r(Se)}re.done?e(me):Promise.resolve(me).then(s,V)}function ja(t,e,r){return ia.apply(this,arguments)}function ia(){var t;return t=oa().m(function e(r,s,V){var Tt,Yt,re,me,Se,tr,Ve,ae,ge,Xe,nr=arguments;return oa().w(function(fr){for(;;)switch(fr.n){case 0:if(Tt=nr.length>3&&nr[3]!==void 0?nr[3]:Wi.FUTURENET,r.credentials().switch().value===o.SorobanCredentialsType.sorobanCredentialsAddress().value){fr.n=1;break}return fr.a(2,r);case 1:if(Yt=o.SorobanAuthorizationEntry.fromXDR(r.toXDR()),(re=Yt.credentials().address()).signatureExpirationLedger(V),me=l(Mi.from(Tt)),Se=o.HashIdPreimage.envelopeTypeSorobanAuthorization(new o.HashIdPreimageSorobanAuthorization({networkId:me,nonce:re.nonce(),invocation:Yt.rootInvocation(),signatureExpirationLedger:re.signatureExpirationLedger()})),tr=l(Se.toXDR()),typeof s!="function"){fr.n=3;break}return fr.n=2,s(Se);case 2:(ge=fr.v)!=null&&ge.signature?(Ve=Mi.from(ge.signature),ae=ge.publicKey):(Ve=Mi.from(ge),ae=Ke.fromScAddress(re.address()).toString()),fr.n=4;break;case 3:Ve=Mi.from(s.sign(tr)),ae=s.publicKey();case 4:if(wn.fromPublicKey(ae).verify(tr,Ve)){fr.n=5;break}throw new Error("signature doesn't match payload");case 5:return Xe=li({public_key:Ze.decodeEd25519PublicKey(ae),signature:Ve},{type:{public_key:["symbol",null],signature:["symbol",null]}}),re.signature(o.ScVal.scvVec([Xe])),fr.a(2,Yt)}},e)}),ia=function(){var e=this,r=arguments;return new Promise(function(s,V){var Tt=t.apply(e,r);function Yt(me){Ca(Tt,s,V,Yt,re,"next",me)}function re(me){Ca(Tt,s,V,Yt,re,"throw",me)}Yt(void 0)})},ia.apply(this,arguments)}function ps(t,e,r){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",V=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Wi.FUTURENET,Tt=wn.random().rawPublicKey(),Yt=new o.Int64(Tt.subarray(0,8).reduce(function(me,Se){return me<<8|Se},0)),re=s||t.publicKey();if(!re)throw new Error("authorizeInvocation requires publicKey parameter");return ja(new o.SorobanAuthorizationEntry({rootInvocation:r,credentials:o.SorobanCredentials.sorobanCredentialsAddress(new o.SorobanAddressCredentials({address:new Ke(re).toScAddress(),nonce:Yt,signatureExpirationLedger:0,signature:o.ScVal.scvVec([])}))}),t,e,V)}function Pi(t){return Pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pi(t)}function Ua(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(V){return Object.getOwnPropertyDescriptor(t,V).enumerable})),r.push.apply(r,s)}return r}function ds(t,e,r){return(e=(function(s){var V=(function(Tt){if(Pi(Tt)!="object"||!Tt)return Tt;var Yt=Tt[Symbol.toPrimitive];if(Yt!==void 0){var re=Yt.call(Tt,"string");if(Pi(re)!="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Tt)})(s);return Pi(V)=="symbol"?V:V+""})(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Na(t){var e=t.function(),r={},s=e.value();switch(e.switch().value){case 0:r.type="execute",r.args={source:Ke.fromScAddress(s.contractAddress()).toString(),function:s.functionName(),args:s.args().map(function(Se){return Jo(Se)})};break;case 1:case 2:var V=e.switch().value===2;r.type="create",r.args={};var Tt=[s.executable(),s.contractIdPreimage()],Yt=Tt[0],re=Tt[1];if(!!Yt.switch().value!=!!re.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(s)," (should be wasm+address or token+asset)"));switch(Yt.switch().value){case 0:var me=re.fromAddress();r.args.type="wasm",r.args.wasm=(function(Se){for(var tr=1;tr"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":Bt&&q?q([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":K,"%AsyncGenerator%":K,"%AsyncGeneratorFunction%":K,"%AsyncIteratorPrototype%":K,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":A,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":L,"%GeneratorFunction%":K,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bt&&q?q(q([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map<"u"&&Bt&&q?q(new Map()[Symbol.iterator]()):p,"%Math%":Math,"%Number%":Number,"%Object%":S,"%Object.getOwnPropertyDescriptor%":ut,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":v,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set<"u"&&Bt&&q?q(new Set()[Symbol.iterator]()):p,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bt&&q?q(""[Symbol.iterator]()):p,"%Symbol%":Bt?Symbol:p,"%SyntaxError%":c,"%ThrowTypeError%":Zt,"%TypedArray%":dt,"%TypeError%":R,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":T,"%Object.defineProperty%":xt,"%Object.getPrototypeOf%":ct,"%Math.abs%":E,"%Math.floor%":k,"%Math.max%":y,"%Math.min%":_,"%Math.pow%":m,"%Math.round%":z,"%Math.sign%":X,"%Reflect.getPrototypeOf%":i};if(q)try{null.error}catch($t){var pt=q(q($t));j["%Error.prototype%"]=pt}var _t=function $t(de){var u;if(de==="%AsyncFunction%")u=$("async function () {}");else if(de==="%GeneratorFunction%")u=$("function* () {}");else if(de==="%AsyncGeneratorFunction%")u=$("async function* () {}");else if(de==="%AsyncGenerator%"){var g=$t("%AsyncGeneratorFunction%");g&&(u=g.prototype)}else if(de==="%AsyncIteratorPrototype%"){var I=$t("%AsyncGenerator%");I&&q&&(u=q(I.prototype))}return j[de]=u,u},ot={__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"]},it=w(6743),Et=w(9957),jt=it.call(N,Array.prototype.concat),et=it.call(T,Array.prototype.splice),nt=it.call(N,String.prototype.replace),rt=it.call(N,String.prototype.slice),F=it.call(N,RegExp.prototype.exec),lt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,At=/\\(\\)?/g,Mt=function($t,de){var u,g=$t;if(Et(ot,g)&&(g="%"+(u=ot[g])[0]+"%"),Et(j,g)){var I=j[g];if(I===K&&(I=_t(g)),I===void 0&&!de)throw new R("intrinsic "+$t+" exists, but is not available. Please file an issue!");return{alias:u,name:g,value:I}}throw new c("intrinsic "+$t+" does not exist!")};a.exports=function($t,de){if(typeof $t!="string"||$t.length===0)throw new R("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new R('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,$t)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var u=(function(x){var G=rt(x,0,1),at=rt(x,-1);if(G==="%"&&at!=="%")throw new c("invalid intrinsic syntax, expected closing `%`");if(at==="%"&&G!=="%")throw new c("invalid intrinsic syntax, expected opening `%`");var Vt=[];return nt(x,lt,function(Pt,D,mt,gt){Vt[Vt.length]=mt?nt(gt,At,"$1"):D||Pt}),Vt})($t),g=u.length>0?u[0]:"",I=Mt("%"+g+"%",de),W=I.name,Q=I.value,St=!1,d=I.alias;d&&(g=d[0],et(u,jt([0,1],d)));for(var U=1,M=!0;U=u.length){var xe=ut(Q,It);Q=(M=!!xe)&&"get"in xe&&!("originalValue"in xe.get)?xe.get:Q[It]}else M=Et(Q,It),Q=Q[It];M&&!St&&(j[W]=Q)}}return Q}},487(a,O,w){"use strict";var p=w(6897),S=w(655),o=w(3126),A=w(2205);a.exports=function(v){var l=o(arguments),c=v.length-(arguments.length-1);return p(l,1+(c>0?c:0),!0)},S?S(a.exports,"apply",{value:A}):a.exports.apply=A},537(a,O,w){var p=w(5606),S=w(6763),o=Object.getOwnPropertyDescriptors||function(j){for(var pt=Object.keys(j),_t={},ot=0;ot=it)return et;switch(et){case"%s":return String(ot[_t++]);case"%d":return Number(ot[_t++]);case"%j":try{return JSON.stringify(ot[_t++])}catch{return"[Circular]"}default:return et}}),jt=ot[_t];_t=3&&(_t.depth=arguments[2]),arguments.length>=4&&(_t.colors=arguments[3]),z(pt)?_t.showHidden=pt:pt&&O._extend(_t,pt),ut(_t.showHidden)&&(_t.showHidden=!1),ut(_t.depth)&&(_t.depth=2),ut(_t.colors)&&(_t.colors=!1),ut(_t.customInspect)&&(_t.customInspect=!0),_t.colors&&(_t.stylize=f),k(_t,j,_t.depth)}function f(j,pt){var _t=R.styles[pt];return _t?"\x1B["+R.colors[_t][0]+"m"+j+"\x1B["+R.colors[_t][1]+"m":j}function E(j,pt){return j}function k(j,pt,_t){if(j.customInspect&&pt&&q(pt.inspect)&&pt.inspect!==O.inspect&&(!pt.constructor||pt.constructor.prototype!==pt)){var ot=pt.inspect(_t,j);return $(ot)||(ot=k(j,ot,_t)),ot}var it=(function(At,Mt){if(ut(Mt))return At.stylize("undefined","undefined");if($(Mt)){var $t="'"+JSON.stringify(Mt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return At.stylize($t,"string")}return L(Mt)?At.stylize(""+Mt,"number"):z(Mt)?At.stylize(""+Mt,"boolean"):X(Mt)?At.stylize("null","null"):void 0})(j,pt);if(it)return it;var Et=Object.keys(pt),jt=(function(At){var Mt={};return At.forEach(function($t,de){Mt[$t]=!0}),Mt})(Et);if(j.showHidden&&(Et=Object.getOwnPropertyNames(pt)),Bt(pt)&&(Et.indexOf("message")>=0||Et.indexOf("description")>=0))return y(pt);if(Et.length===0){if(q(pt)){var et=pt.name?": "+pt.name:"";return j.stylize("[Function"+et+"]","special")}if(xt(pt))return j.stylize(RegExp.prototype.toString.call(pt),"regexp");if(Zt(pt))return j.stylize(Date.prototype.toString.call(pt),"date");if(Bt(pt))return y(pt)}var nt,rt="",F=!1,lt=["{","}"];return m(pt)&&(F=!0,lt=["[","]"]),q(pt)&&(rt=" [Function"+(pt.name?": "+pt.name:"")+"]"),xt(pt)&&(rt=" "+RegExp.prototype.toString.call(pt)),Zt(pt)&&(rt=" "+Date.prototype.toUTCString.call(pt)),Bt(pt)&&(rt=" "+y(pt)),Et.length!==0||F&&pt.length!=0?_t<0?xt(pt)?j.stylize(RegExp.prototype.toString.call(pt),"regexp"):j.stylize("[Object]","special"):(j.seen.push(pt),nt=F?(function(At,Mt,$t,de,u){for(var g=[],I=0,W=Mt.length;I60?$t[0]+(Mt===""?"":Mt+` + `)+" "+At.join(`, + `)+" "+$t[1]:$t[0]+Mt+" "+At.join(", ")+" "+$t[1]})(nt,rt,lt)):lt[0]+rt+lt[1]}function y(j){return"["+Error.prototype.toString.call(j)+"]"}function _(j,pt,_t,ot,it,Et){var jt,et,nt;if((nt=Object.getOwnPropertyDescriptor(pt,it)||{value:pt[it]}).get?et=nt.set?j.stylize("[Getter/Setter]","special"):j.stylize("[Getter]","special"):nt.set&&(et=j.stylize("[Setter]","special")),N(ot,it)||(jt="["+it+"]"),et||(j.seen.indexOf(nt.value)<0?(et=X(_t)?k(j,nt.value,null):k(j,nt.value,_t-1)).indexOf(` +`)>-1&&(et=Et?et.split(` +`).map(function(rt){return" "+rt}).join(` +`).slice(2):` +`+et.split(` +`).map(function(rt){return" "+rt}).join(` +`)):et=j.stylize("[Circular]","special")),ut(jt)){if(Et&&it.match(/^\d+$/))return et;(jt=JSON.stringify(""+it)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(jt=jt.slice(1,-1),jt=j.stylize(jt,"name")):(jt=jt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),jt=j.stylize(jt,"string"))}return jt+": "+et}function m(j){return Array.isArray(j)}function z(j){return typeof j=="boolean"}function X(j){return j===null}function L(j){return typeof j=="number"}function $(j){return typeof j=="string"}function ut(j){return j===void 0}function xt(j){return vt(j)&&ct(j)==="[object RegExp]"}function vt(j){return typeof j=="object"&&j!==null}function Zt(j){return vt(j)&&ct(j)==="[object Date]"}function Bt(j){return vt(j)&&(ct(j)==="[object Error]"||j instanceof Error)}function q(j){return typeof j=="function"}function ct(j){return Object.prototype.toString.call(j)}function i(j){return j<10?"0"+j.toString(10):j.toString(10)}O.debuglog=function(j){if(j=j.toUpperCase(),!v[j])if(l.test(j)){var pt=p.pid;v[j]=function(){var _t=O.format.apply(O,arguments);S.error("%s %d: %s",j,pt,_t)}}else v[j]=function(){};return v[j]},O.inspect=R,R.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]},R.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},O.types=w(9032),O.isArray=m,O.isBoolean=z,O.isNull=X,O.isNullOrUndefined=function(j){return j==null},O.isNumber=L,O.isString=$,O.isSymbol=function(j){return typeof j=="symbol"},O.isUndefined=ut,O.isRegExp=xt,O.types.isRegExp=xt,O.isObject=vt,O.isDate=Zt,O.types.isDate=Zt,O.isError=Bt,O.types.isNativeError=Bt,O.isFunction=q,O.isPrimitive=function(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||j===void 0},O.isBuffer=w(1135);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function N(j,pt){return Object.prototype.hasOwnProperty.call(j,pt)}O.log=function(){var j,pt;S.log("%s - %s",(pt=[i((j=new Date).getHours()),i(j.getMinutes()),i(j.getSeconds())].join(":"),[j.getDate(),T[j.getMonth()],pt].join(" ")),O.format.apply(O,arguments))},O.inherits=w(6698),O._extend=function(j,pt){if(!pt||!vt(pt))return j;for(var _t=Object.keys(pt),ot=_t.length;ot--;)j[_t[ot]]=pt[_t[ot]];return j};var K=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function dt(j,pt){if(!j){var _t=new Error("Promise was rejected with a falsy value");_t.reason=j,j=_t}return pt(j)}O.promisify=function(j){if(typeof j!="function")throw new TypeError('The "original" argument must be of type Function');if(K&&j[K]){var pt;if(typeof(pt=j[K])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(pt,K,{value:pt,enumerable:!1,writable:!1,configurable:!0}),pt}function pt(){for(var _t,ot,it=new Promise(function(et,nt){_t=et,ot=nt}),Et=[],jt=0;jt=0&&O.call(w.callee)==="[object Function]"),S}},1135(a){a.exports=function(O){return O&&typeof O=="object"&&typeof O.copy=="function"&&typeof O.fill=="function"&&typeof O.readUInt8=="function"}},1189(a,O,w){"use strict";var p=Array.prototype.slice,S=w(1093),o=Object.keys,A=o?function(l){return o(l)}:w(8875),v=Object.keys;A.shim=function(){if(Object.keys){var l=(function(){var c=Object.keys(arguments);return c&&c.length===arguments.length})(1,2);l||(Object.keys=function(c){return S(c)?v(p.call(c)):v(c)})}else Object.keys=A;return Object.keys||A},a.exports=A},1237(a){"use strict";a.exports=EvalError},1333(a){"use strict";a.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var O={},w=Symbol("test"),p=Object(w);if(typeof w=="string"||Object.prototype.toString.call(w)!=="[object Symbol]"||Object.prototype.toString.call(p)!=="[object Symbol]")return!1;for(var S in O[w]=42,O)return!1;if(typeof Object.keys=="function"&&Object.keys(O).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(O).length!==0)return!1;var o=Object.getOwnPropertySymbols(O);if(o.length!==1||o[0]!==w||!Object.prototype.propertyIsEnumerable.call(O,w))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var A=Object.getOwnPropertyDescriptor(O,w);if(A.value!==42||A.enumerable!==!0)return!1}return!0}},1514(a){"use strict";a.exports=Math.abs},2205(a,O,w){"use strict";var p=w(6743),S=w(1002),o=w(3144);a.exports=function(){return o(p,S,arguments)}},2299(a,O,w){"use strict";function p(F,lt){return(function(At){if(Array.isArray(At))return At})(F)||(function(At,Mt){var $t=At==null?null:typeof Symbol<"u"&&At[Symbol.iterator]||At["@@iterator"];if($t!=null){var de,u,g,I,W=[],Q=!0,St=!1;try{if(g=($t=$t.call(At)).next,Mt===0){if(Object($t)!==$t)return;Q=!1}else for(;!(Q=(de=g.call($t)).done)&&(W.push(de.value),W.length!==Mt);Q=!0);}catch(d){St=!0,u=d}finally{try{if(!Q&&$t.return!=null&&(I=$t.return(),Object(I)!==I))return}finally{if(St)throw u}}return W}})(F,lt)||(function(At,Mt){if(At){if(typeof At=="string")return S(At,Mt);var $t=Object.prototype.toString.call(At).slice(8,-1);return $t==="Object"&&At.constructor&&($t=At.constructor.name),$t==="Map"||$t==="Set"?Array.from(At):$t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($t)?S(At,Mt):void 0}})(F,lt)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function S(F,lt){(lt==null||lt>F.length)&&(lt=F.length);for(var At=0,Mt=new Array(lt);At10)return!0;for(var lt=0;lt57)return!0}return F.length===10&&F>=Math.pow(2,32)}function j(F){return Object.keys(F).filter(dt).concat(R(F).filter(Object.prototype.propertyIsEnumerable.bind(F)))}function pt(F,lt){if(F===lt)return 0;for(var At=F.length,Mt=lt.length,$t=0,de=Math.min(At,Mt);$t=3&&(c=l),R=A,S.call(R)==="[object Array]"?(function(f,E,k){for(var y=0,_=f.length;y<_;y++)o.call(f,y)&&(k==null?E(f[y],y,f):E.call(k,f[y],y,f))})(A,v,c):typeof A=="string"?(function(f,E,k){for(var y=0,_=f.length;y<_;y++)k==null?E(f.charAt(y),y,f):E.call(k,f.charAt(y),y,f)})(A,v,c):(function(f,E,k){for(var y in f)o.call(f,y)&&(k==null?E(f[y],y,f):E.call(k,f[y],y,f))})(A,v,c)}},2802(a,O,w){"use strict";a.exports=function(p){var S=p.toLowerCase(),o=a.exports[S];if(!o)throw new Error(S+" is not supported (we accept pull requests)");return new o},a.exports.sha=w(7816),a.exports.sha1=w(3737),a.exports.sha224=w(6710),a.exports.sha256=w(4107),a.exports.sha384=w(2827),a.exports.sha512=w(2890)},2827(a,O,w){"use strict";var p=w(6698),S=w(2890),o=w(392),A=w(2861).Buffer,v=new Array(160);function l(){this.init(),this._w=v,o.call(this,128,112)}p(l,S),l.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},l.prototype._hash=function(){var c=A.allocUnsafe(48);function R(f,E,k){c.writeInt32BE(f,k),c.writeInt32BE(E,k+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),c},a.exports=l},2861(a,O,w){var p=w(8287),S=p.Buffer;function o(v,l){for(var c in v)l[c]=v[c]}function A(v,l,c){return S(v,l,c)}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?a.exports=p:(o(p,O),O.Buffer=A),A.prototype=Object.create(S.prototype),o(S,A),A.from=function(v,l,c){if(typeof v=="number")throw new TypeError("Argument must not be a number");return S(v,l,c)},A.alloc=function(v,l,c){if(typeof v!="number")throw new TypeError("Argument must be a number");var R=S(v);return l!==void 0?typeof c=="string"?R.fill(l,c):R.fill(l):R.fill(0),R},A.allocUnsafe=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return S(v)},A.allocUnsafeSlow=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return p.SlowBuffer(v)}},2890(a,O,w){"use strict";var p=w(6698),S=w(392),o=w(2861).Buffer,A=[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],v=new Array(160);function l(){this.init(),this._w=v,S.call(this,128,112)}function c(X,L,$){return $^X&(L^$)}function R(X,L,$){return X&L|$&(X|L)}function f(X,L){return(X>>>28|L<<4)^(L>>>2|X<<30)^(L>>>7|X<<25)}function E(X,L){return(X>>>14|L<<18)^(X>>>18|L<<14)^(L>>>9|X<<23)}function k(X,L){return(X>>>1|L<<31)^(X>>>8|L<<24)^X>>>7}function y(X,L){return(X>>>1|L<<31)^(X>>>8|L<<24)^(X>>>7|L<<25)}function _(X,L){return(X>>>19|L<<13)^(L>>>29|X<<3)^X>>>6}function m(X,L){return(X>>>19|L<<13)^(L>>>29|X<<3)^(X>>>6|L<<26)}function z(X,L){return X>>>0>>0?1:0}p(l,S),l.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},l.prototype._update=function(X){for(var L=this._w,$=0|this._ah,ut=0|this._bh,xt=0|this._ch,vt=0|this._dh,Zt=0|this._eh,Bt=0|this._fh,q=0|this._gh,ct=0|this._hh,i=0|this._al,T=0|this._bl,N=0|this._cl,K=0|this._dl,dt=0|this._el,j=0|this._fl,pt=0|this._gl,_t=0|this._hl,ot=0;ot<32;ot+=2)L[ot]=X.readInt32BE(4*ot),L[ot+1]=X.readInt32BE(4*ot+4);for(;ot<160;ot+=2){var it=L[ot-30],Et=L[ot-30+1],jt=k(it,Et),et=y(Et,it),nt=_(it=L[ot-4],Et=L[ot-4+1]),rt=m(Et,it),F=L[ot-14],lt=L[ot-14+1],At=L[ot-32],Mt=L[ot-32+1],$t=et+lt|0,de=jt+F+z($t,et)|0;de=(de=de+nt+z($t=$t+rt|0,rt)|0)+At+z($t=$t+Mt|0,Mt)|0,L[ot]=de,L[ot+1]=$t}for(var u=0;u<160;u+=2){de=L[u],$t=L[u+1];var g=R($,ut,xt),I=R(i,T,N),W=f($,i),Q=f(i,$),St=E(Zt,dt),d=E(dt,Zt),U=A[u],M=A[u+1],It=c(Zt,Bt,q),Jt=c(dt,j,pt),Wt=_t+d|0,xe=ct+St+z(Wt,_t)|0;xe=(xe=(xe=xe+It+z(Wt=Wt+Jt|0,Jt)|0)+U+z(Wt=Wt+M|0,M)|0)+de+z(Wt=Wt+$t|0,$t)|0;var x=Q+I|0,G=W+g+z(x,Q)|0;ct=q,_t=pt,q=Bt,pt=j,Bt=Zt,j=dt,Zt=vt+xe+z(dt=K+Wt|0,K)|0,vt=xt,K=N,xt=ut,N=T,ut=$,T=i,$=xe+G+z(i=Wt+x|0,Wt)|0}this._al=this._al+i|0,this._bl=this._bl+T|0,this._cl=this._cl+N|0,this._dl=this._dl+K|0,this._el=this._el+dt|0,this._fl=this._fl+j|0,this._gl=this._gl+pt|0,this._hl=this._hl+_t|0,this._ah=this._ah+$+z(this._al,i)|0,this._bh=this._bh+ut+z(this._bl,T)|0,this._ch=this._ch+xt+z(this._cl,N)|0,this._dh=this._dh+vt+z(this._dl,K)|0,this._eh=this._eh+Zt+z(this._el,dt)|0,this._fh=this._fh+Bt+z(this._fl,j)|0,this._gh=this._gh+q+z(this._gl,pt)|0,this._hh=this._hh+ct+z(this._hl,_t)|0},l.prototype._hash=function(){var X=o.allocUnsafe(64);function L($,ut,xt){X.writeInt32BE($,xt),X.writeInt32BE(ut,xt+4)}return L(this._ah,this._al,0),L(this._bh,this._bl,8),L(this._ch,this._cl,16),L(this._dh,this._dl,24),L(this._eh,this._el,32),L(this._fh,this._fl,40),L(this._gh,this._gl,48),L(this._hh,this._hl,56),X},a.exports=l},3003(a){"use strict";a.exports=function(O){return O!=O}},3093(a,O,w){"use strict";var p=w(4459);a.exports=function(S){return p(S)||S===0?S:S<0?-1:1}},3126(a,O,w){"use strict";var p=w(6743),S=w(9675),o=w(76),A=w(3144);a.exports=function(v){if(v.length<1||typeof v[0]!="function")throw new S("a function is required");return A(p,o,v)}},3144(a,O,w){"use strict";var p=w(6743),S=w(1002),o=w(76),A=w(7119);a.exports=A||p.call(o,S)},3628(a,O,w){"use strict";var p=w(8648),S=w(1064),o=w(7176);a.exports=p?function(A){return p(A)}:S?function(A){if(!A||typeof A!="object"&&typeof A!="function")throw new TypeError("getProto: not an object");return S(A)}:o?function(A){return o(A)}:null},3737(a,O,w){"use strict";var p=w(6698),S=w(392),o=w(2861).Buffer,A=[1518500249,1859775393,-1894007588,-899497514],v=new Array(80);function l(){this.init(),this._w=v,S.call(this,64,56)}function c(k){return k<<1|k>>>31}function R(k){return k<<5|k>>>27}function f(k){return k<<30|k>>>2}function E(k,y,_,m){return k===0?y&_|~y&m:k===2?y&_|y&m|_&m:y^_^m}p(l,S),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(k){for(var y=this._w,_=0|this._a,m=0|this._b,z=0|this._c,X=0|this._d,L=0|this._e,$=0;$<16;++$)y[$]=k.readInt32BE(4*$);for(;$<80;++$)y[$]=c(y[$-3]^y[$-8]^y[$-14]^y[$-16]);for(var ut=0;ut<80;++ut){var xt=~~(ut/20),vt=R(_)+E(xt,m,z,X)+L+y[ut]+A[xt]|0;L=X,X=z,z=f(m),m=_,_=vt}this._a=_+this._a|0,this._b=m+this._b|0,this._c=z+this._c|0,this._d=X+this._d|0,this._e=L+this._e|0},l.prototype._hash=function(){var k=o.allocUnsafe(20);return k.writeInt32BE(0|this._a,0),k.writeInt32BE(0|this._b,4),k.writeInt32BE(0|this._c,8),k.writeInt32BE(0|this._d,12),k.writeInt32BE(0|this._e,16),k},a.exports=l},3740(a,O,w){var p,S=w(6763);p=()=>(()=>{var o={616:(l,c,R)=>{"use strict";R.d(c,{A:()=>E});var f=R(287);f.hp.alloc(1).subarray(0,1)instanceof f.hp||(f.hp.prototype.subarray=function(k,y){let _=Uint8Array.prototype.subarray.call(this,k,y);return Object.setPrototypeOf(_,f.hp.prototype),_});let E=f.hp},281:(l,c,R)=>{let f=R(164);l.exports=f},164:(l,c,R)=>{"use strict";R.r(c),R.d(c,{Array:()=>de,Bool:()=>nt,Double:()=>jt,Enum:()=>W,Float:()=>Et,Hyper:()=>pt,Int:()=>N,LargeInt:()=>j,Opaque:()=>At,Option:()=>g,Quadruple:()=>et,Reference:()=>Q,String:()=>F,Struct:()=>St,Union:()=>U,UnsignedHyper:()=>it,UnsignedInt:()=>ot,VarArray:()=>u,VarOpaque:()=>$t,Void:()=>I,XdrReader:()=>m,XdrWriter:()=>L,config:()=>Vt});class f extends TypeError{constructor(D){super(`XDR Write Error: ${D}`)}}class E extends TypeError{constructor(D){super(`XDR Read Error: ${D}`)}}class k extends TypeError{constructor(D){super(`XDR Type Definition Error: ${D}`)}}class y extends k{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var _=R(616).A;class m{constructor(D){if(!_.isBuffer(D)){if(!(D instanceof Array||Array.isArray(D)||ArrayBuffer.isView(D)))throw new E(`source invalid: ${D}`);D=_.from(D)}this._buffer=D,this._length=D.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(D){let mt=this._index;if(this._index+=D,this._length0){for(let ft=0;ft0){let ft=this.alloc(gt);this._buffer.fill(0,ft,this._index)}}writeInt32BE(D){let mt=this.alloc(4);this._buffer.writeInt32BE(D,mt)}writeUInt32BE(D){let mt=this.alloc(4);this._buffer.writeUInt32BE(D,mt)}writeBigInt64BE(D){let mt=this.alloc(8);this._buffer.writeBigInt64BE(D,mt)}writeBigUInt64BE(D){let mt=this.alloc(8);this._buffer.writeBigUInt64BE(D,mt)}writeFloatBE(D){let mt=this.alloc(4);this._buffer.writeFloatBE(D,mt)}writeDoubleBE(D){let mt=this.alloc(8);this._buffer.writeDoubleBE(D,mt)}static bufferChunkSize=X}var $=R(616).A;class ut{toXDR(D="raw"){if(!this.write)return this.constructor.toXDR(this,D);let mt=new L;return this.write(this,mt),Bt(mt.finalize(),D)}fromXDR(D,mt="raw"){if(!this.read)return this.constructor.fromXDR(D,mt);let gt=new m(q(D,mt)),ft=this.read(gt);return gt.ensureInputConsumed(),ft}validateXDR(D,mt="raw"){try{return this.fromXDR(D,mt),!0}catch{return!1}}static toXDR(D,mt="raw"){let gt=new L;return this.write(D,gt),Bt(gt.finalize(),mt)}static fromXDR(D,mt="raw"){let gt=new m(q(D,mt)),ft=this.read(gt);return gt.ensureInputConsumed(),ft}static validateXDR(D,mt="raw"){try{return this.fromXDR(D,mt),!0}catch{return!1}}}class xt extends ut{static read(D){throw new y}static write(D,mt){throw new y}static isValid(D){return!1}}class vt extends ut{isValid(D){return!1}}class Zt extends TypeError{constructor(D){super(`Invalid format ${D}, must be one of "raw", "hex", "base64"`)}}function Bt(Pt,D){switch(D){case"raw":return Pt;case"hex":return Pt.toString("hex");case"base64":return Pt.toString("base64");default:throw new Zt(D)}}function q(Pt,D){switch(D){case"raw":return Pt;case"hex":return $.from(Pt,"hex");case"base64":return $.from(Pt,"base64");default:throw new Zt(D)}}function ct(Pt,D){return Pt!=null&&(Pt instanceof D||i(Pt,D)&&typeof Pt.constructor.read=="function"&&typeof Pt.constructor.write=="function"&&i(Pt,"XdrType"))}function i(Pt,D){do if(Pt.constructor.name===D)return!0;while(Pt=Object.getPrototypeOf(Pt));return!1}let T=2147483647;class N extends xt{static read(D){return D.readInt32BE()}static write(D,mt){if(typeof D!="number")throw new f("not a number");if((0|D)!==D)throw new f("invalid i32 value");mt.writeInt32BE(D)}static isValid(D){return typeof D=="number"&&(0|D)===D&&D>=-2147483648&&D<=T}}function K(Pt,D,mt){if(typeof Pt!="bigint")throw new TypeError("Expected bigint 'value', got "+typeof Pt);let gt=D/mt;if(gt===1)return[Pt];if(mt<32||mt>128||gt!==2&>!==4&>!==8)throw new TypeError(`invalid bigint (${Pt}) and slice size (${D} -> ${mt}) combination`);let ft=BigInt(mt),Gt=new Array(gt);for(let Lt=0;Lt>=ft;return Gt}function dt(Pt,D){if(D)return[0n,(1n<=ie&&Lt<=$e)return Lt;throw new TypeError(`bigint values [${mt}] for ${(function(Ce,He){return`${He?"u":"i"}${Ce}`})(gt,ft)} out of range [${ie}, ${$e}]: ${Lt}`)})(D,this.size,this.unsigned)}get unsigned(){throw new y}get size(){throw new y}slice(D){return K(this._value,this.size,D)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(D){let{size:mt}=this.prototype;return mt===64?new this(D.readBigUInt64BE()):new this(...Array.from({length:mt/64},()=>D.readBigUInt64BE()).reverse())}static write(D,mt){if(D instanceof this)D=D._value;else if(typeof D!="bigint"||D>this.MAX_VALUE||D>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(D,mt){return new this(D,mt)}}pt.defineIntBoundaries();let _t=4294967295;class ot extends xt{static read(D){return D.readUInt32BE()}static write(D,mt){if(typeof D!="number"||!(D>=0&&D<=_t)||D%1!=0)throw new f("invalid u32 value");mt.writeUInt32BE(D)}static isValid(D){return typeof D=="number"&&D%1==0&&D>=0&&D<=_t}}ot.MAX_VALUE=_t,ot.MIN_VALUE=0;class it extends j{constructor(...D){super(D)}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(D,mt){return new this(D,mt)}}it.defineIntBoundaries();class Et extends xt{static read(D){return D.readFloatBE()}static write(D,mt){if(typeof D!="number")throw new f("not a number");mt.writeFloatBE(D)}static isValid(D){return typeof D=="number"}}class jt extends xt{static read(D){return D.readDoubleBE()}static write(D,mt){if(typeof D!="number")throw new f("not a number");mt.writeDoubleBE(D)}static isValid(D){return typeof D=="number"}}class et extends xt{static read(){throw new k("quadruple not supported")}static write(){throw new k("quadruple not supported")}static isValid(){return!1}}class nt extends xt{static read(D){let mt=N.read(D);switch(mt){case 0:return!1;case 1:return!0;default:throw new E(`got ${mt} when trying to read a bool`)}}static write(D,mt){let gt=D?1:0;N.write(gt,mt)}static isValid(D){return typeof D=="boolean"}}var rt=R(616).A;class F extends vt{constructor(D=ot.MAX_VALUE){super(),this._maxLength=D}read(D){let mt=ot.read(D);if(mt>this._maxLength)throw new E(`saw ${mt} length String, max allowed is ${this._maxLength}`);return D.read(mt)}readString(D){return this.read(D).toString("utf8")}write(D,mt){let gt=typeof D=="string"?rt.byteLength(D,"utf8"):D.length;if(gt>this._maxLength)throw new f(`got ${D.length} bytes, max allowed is ${this._maxLength}`);ot.write(gt,mt),mt.write(D,gt)}isValid(D){return typeof D=="string"?rt.byteLength(D,"utf8")<=this._maxLength:!!(D instanceof Array||rt.isBuffer(D))&&D.length<=this._maxLength}}var lt=R(616).A;class At extends vt{constructor(D){super(),this._length=D}read(D){return D.read(this._length)}write(D,mt){let{length:gt}=D;if(gt!==this._length)throw new f(`got ${D.length} bytes, expected ${this._length}`);mt.write(D,gt)}isValid(D){return lt.isBuffer(D)&&D.length===this._length}}var Mt=R(616).A;class $t extends vt{constructor(D=ot.MAX_VALUE){super(),this._maxLength=D}read(D){let mt=ot.read(D);if(mt>this._maxLength)throw new E(`saw ${mt} length VarOpaque, max allowed is ${this._maxLength}`);return D.read(mt)}write(D,mt){let{length:gt}=D;if(D.length>this._maxLength)throw new f(`got ${D.length} bytes, max allowed is ${this._maxLength}`);ot.write(gt,mt),mt.write(D,gt)}isValid(D){return Mt.isBuffer(D)&&D.length<=this._maxLength}}class de extends vt{constructor(D,mt){super(),this._childType=D,this._length=mt}read(D){let mt=new R.g.Array(this._length);for(let gt=0;gtthis._maxLength)throw new E(`saw ${mt} length VarArray, max allowed is ${this._maxLength}`);let gt=new Array(mt);for(let ft=0;ftthis._maxLength)throw new f(`got array of size ${D.length}, max allowed is ${this._maxLength}`);ot.write(D.length,mt);for(let gt of D)this._childType.write(gt,mt)}isValid(D){if(!(D instanceof Array)||D.length>this._maxLength)return!1;for(let mt of D)if(!this._childType.isValid(mt))return!1;return!0}}class g extends xt{constructor(D){super(),this._childType=D}read(D){if(nt.read(D))return this._childType.read(D)}write(D,mt){let gt=D!=null;nt.write(gt,mt),gt&&this._childType.write(D,mt)}isValid(D){return D==null||this._childType.isValid(D)}}class I extends xt{static read(){}static write(D){if(D!==void 0)throw new f("trying to write value to a void slot")}static isValid(D){return D===void 0}}class W extends xt{constructor(D,mt){super(),this.name=D,this.value=mt}static read(D){let mt=N.read(D),gt=this._byValue[mt];if(gt===void 0)throw new E(`unknown ${this.enumName} member for value ${mt}`);return gt}static write(D,mt){if(!this.isValid(D))throw new f(`${D} has enum name ${D?.enumName}, not ${this.enumName}: ${JSON.stringify(D)}`);N.write(D.value,mt)}static isValid(D){return D?.constructor?.enumName===this.enumName||ct(D,this)}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(D){let mt=this._members[D];if(!mt)throw new TypeError(`${D} is not a member of ${this.enumName}`);return mt}static fromValue(D){let mt=this._byValue[D];if(mt===void 0)throw new TypeError(`${D} is not a value of any member of ${this.enumName}`);return mt}static create(D,mt,gt){let ft=class extends W{};ft.enumName=mt,D.results[mt]=ft,ft._members={},ft._byValue={};for(let[Gt,Lt]of Object.entries(gt)){let ie=new ft(Gt,Lt);ft._members[Gt]=ie,ft._byValue[Lt]=ie,ft[Gt]=()=>ie}return ft}}class Q extends xt{resolve(){throw new k('"resolve" method should be implemented in the descendant class')}}class St extends vt{constructor(D){super(),this._attributes=D||{}}static read(D){let mt={};for(let[gt,ft]of this._fields)mt[gt]=ft.read(D);return new this(mt)}static write(D,mt){if(!this.isValid(D))throw new f(`${D} has struct name ${D?.constructor?.structName}, not ${this.structName}: ${JSON.stringify(D)}`);for(let[gt,ft]of this._fields){let Gt=D._attributes[gt];ft.write(Gt,mt)}}static isValid(D){return D?.constructor?.structName===this.structName||ct(D,this)}static create(D,mt,gt){let ft=class extends St{};ft.structName=mt,D.results[mt]=ft;let Gt=new Array(gt.length);for(let Lt=0;Lt{"use strict";c.byteLength=function(z){var X=_(z),L=X[0],$=X[1];return 3*(L+$)/4-$},c.toByteArray=function(z){var X,L,$=_(z),ut=$[0],xt=$[1],vt=new E((function(q,ct,i){return 3*(ct+i)/4-i})(0,ut,xt)),Zt=0,Bt=xt>0?ut-4:ut;for(L=0;L>16&255,vt[Zt++]=X>>8&255,vt[Zt++]=255&X;return xt===2&&(X=f[z.charCodeAt(L)]<<2|f[z.charCodeAt(L+1)]>>4,vt[Zt++]=255&X),xt===1&&(X=f[z.charCodeAt(L)]<<10|f[z.charCodeAt(L+1)]<<4|f[z.charCodeAt(L+2)]>>2,vt[Zt++]=X>>8&255,vt[Zt++]=255&X),vt},c.fromByteArray=function(z){for(var X,L=z.length,$=L%3,ut=[],xt=16383,vt=0,Zt=L-$;vtZt?Zt:vt+xt));return $===1?(X=z[L-1],ut.push(R[X>>2]+R[X<<4&63]+"==")):$===2&&(X=(z[L-2]<<8)+z[L-1],ut.push(R[X>>10]+R[X>>4&63]+R[X<<2&63]+"=")),ut.join("")};for(var R=[],f=[],E=typeof Uint8Array<"u"?Uint8Array:Array,k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0;y<64;++y)R[y]=k[y],f[k.charCodeAt(y)]=y;function _(z){var X=z.length;if(X%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var L=z.indexOf("=");return L===-1&&(L=X),[L,L===X?0:4-L%4]}function m(z,X,L){for(var $,ut,xt=[],vt=X;vt>18&63]+R[ut>>12&63]+R[ut>>6&63]+R[63&ut]);return xt.join("")}f[45]=62,f[95]=63},287:(l,c,R)=>{"use strict";let f=R(526),E=R(251),k=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;c.hp=m,c.IS=50;let y=2147483647;function _(x){if(x>y)throw new RangeError('The value "'+x+'" is invalid for option "size"');let G=new Uint8Array(x);return Object.setPrototypeOf(G,m.prototype),G}function m(x,G,at){if(typeof x=="number"){if(typeof G=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return L(x)}return z(x,G,at)}function z(x,G,at){if(typeof x=="string")return(function(D,mt){if(typeof mt=="string"&&mt!==""||(mt="utf8"),!m.isEncoding(mt))throw new TypeError("Unknown encoding: "+mt);let gt=0|vt(D,mt),ft=_(gt),Gt=ft.write(D,mt);return Gt!==gt&&(ft=ft.slice(0,Gt)),ft})(x,G);if(ArrayBuffer.isView(x))return(function(D){if(M(D,Uint8Array)){let mt=new Uint8Array(D);return ut(mt.buffer,mt.byteOffset,mt.byteLength)}return $(D)})(x);if(x==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x);if(M(x,ArrayBuffer)||x&&M(x.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(x,SharedArrayBuffer)||x&&M(x.buffer,SharedArrayBuffer)))return ut(x,G,at);if(typeof x=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Vt=x.valueOf&&x.valueOf();if(Vt!=null&&Vt!==x)return m.from(Vt,G,at);let Pt=(function(D){if(m.isBuffer(D)){let mt=0|xt(D.length),gt=_(mt);return gt.length===0||D.copy(gt,0,0,mt),gt}return D.length!==void 0?typeof D.length!="number"||It(D.length)?_(0):$(D):D.type==="Buffer"&&Array.isArray(D.data)?$(D.data):void 0})(x);if(Pt)return Pt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof x[Symbol.toPrimitive]=="function")return m.from(x[Symbol.toPrimitive]("string"),G,at);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof x)}function X(x){if(typeof x!="number")throw new TypeError('"size" argument must be of type number');if(x<0)throw new RangeError('The value "'+x+'" is invalid for option "size"')}function L(x){return X(x),_(x<0?0:0|xt(x))}function $(x){let G=x.length<0?0:0|xt(x.length),at=_(G);for(let Vt=0;Vt=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return 0|x}function vt(x,G){if(m.isBuffer(x))return x.length;if(ArrayBuffer.isView(x)||M(x,ArrayBuffer))return x.byteLength;if(typeof x!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof x);let at=x.length,Vt=arguments.length>2&&arguments[2]===!0;if(!Vt&&at===0)return 0;let Pt=!1;for(;;)switch(G){case"ascii":case"latin1":case"binary":return at;case"utf8":case"utf-8":return St(x).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*at;case"hex":return at>>>1;case"base64":return d(x).length;default:if(Pt)return Vt?-1:St(x).length;G=(""+G).toLowerCase(),Pt=!0}}function Zt(x,G,at){let Vt=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((at===void 0||at>this.length)&&(at=this.length),at<=0)||(at>>>=0)<=(G>>>=0))return"";for(x||(x="utf8");;)switch(x){case"hex":return Et(this,G,at);case"utf8":case"utf-8":return pt(this,G,at);case"ascii":return ot(this,G,at);case"latin1":case"binary":return it(this,G,at);case"base64":return j(this,G,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return jt(this,G,at);default:if(Vt)throw new TypeError("Unknown encoding: "+x);x=(x+"").toLowerCase(),Vt=!0}}function Bt(x,G,at){let Vt=x[G];x[G]=x[at],x[at]=Vt}function q(x,G,at,Vt,Pt){if(x.length===0)return-1;if(typeof at=="string"?(Vt=at,at=0):at>2147483647?at=2147483647:at<-2147483648&&(at=-2147483648),It(at=+at)&&(at=Pt?0:x.length-1),at<0&&(at=x.length+at),at>=x.length){if(Pt)return-1;at=x.length-1}else if(at<0){if(!Pt)return-1;at=0}if(typeof G=="string"&&(G=m.from(G,Vt)),m.isBuffer(G))return G.length===0?-1:ct(x,G,at,Vt,Pt);if(typeof G=="number")return G&=255,typeof Uint8Array.prototype.indexOf=="function"?Pt?Uint8Array.prototype.indexOf.call(x,G,at):Uint8Array.prototype.lastIndexOf.call(x,G,at):ct(x,[G],at,Vt,Pt);throw new TypeError("val must be string, number or Buffer")}function ct(x,G,at,Vt,Pt){let D,mt=1,gt=x.length,ft=G.length;if(Vt!==void 0&&((Vt=String(Vt).toLowerCase())==="ucs2"||Vt==="ucs-2"||Vt==="utf16le"||Vt==="utf-16le")){if(x.length<2||G.length<2)return-1;mt=2,gt/=2,ft/=2,at/=2}function Gt(Lt,ie){return mt===1?Lt[ie]:Lt.readUInt16BE(ie*mt)}if(Pt){let Lt=-1;for(D=at;Dgt&&(at=gt-ft),D=at;D>=0;D--){let Lt=!0;for(let ie=0;iePt&&(Vt=Pt):Vt=Pt;let D=G.length,mt;for(Vt>D/2&&(Vt=D/2),mt=0;mt>8,ft=mt%256,Gt.push(ft),Gt.push(gt);return Gt})(G,x.length-at),x,at,Vt)}function j(x,G,at){return G===0&&at===x.length?f.fromByteArray(x):f.fromByteArray(x.slice(G,at))}function pt(x,G,at){at=Math.min(x.length,at);let Vt=[],Pt=G;for(;Pt239?4:D>223?3:D>191?2:1;if(Pt+gt<=at){let ft,Gt,Lt,ie;switch(gt){case 1:D<128&&(mt=D);break;case 2:ft=x[Pt+1],(192&ft)==128&&(ie=(31&D)<<6|63&ft,ie>127&&(mt=ie));break;case 3:ft=x[Pt+1],Gt=x[Pt+2],(192&ft)==128&&(192&Gt)==128&&(ie=(15&D)<<12|(63&ft)<<6|63&Gt,ie>2047&&(ie<55296||ie>57343)&&(mt=ie));break;case 4:ft=x[Pt+1],Gt=x[Pt+2],Lt=x[Pt+3],(192&ft)==128&&(192&Gt)==128&&(192&Lt)==128&&(ie=(15&D)<<18|(63&ft)<<12|(63&Gt)<<6|63&Lt,ie>65535&&ie<1114112&&(mt=ie))}}mt===null?(mt=65533,gt=1):mt>65535&&(mt-=65536,Vt.push(mt>>>10&1023|55296),mt=56320|1023&mt),Vt.push(mt),Pt+=gt}return(function(D){let mt=D.length;if(mt<=_t)return String.fromCharCode.apply(String,D);let gt="",ft=0;for(;ftVt.length?(m.isBuffer(D)||(D=m.from(D)),D.copy(Vt,Pt)):Uint8Array.prototype.set.call(Vt,D,Pt);else{if(!m.isBuffer(D))throw new TypeError('"list" argument must be an Array of Buffers');D.copy(Vt,Pt)}Pt+=D.length}return Vt},m.byteLength=vt,m.prototype._isBuffer=!0,m.prototype.swap16=function(){let x=this.length;if(x%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let G=0;GG&&(x+=" ... "),""},k&&(m.prototype[k]=m.prototype.inspect),m.prototype.compare=function(x,G,at,Vt,Pt){if(M(x,Uint8Array)&&(x=m.from(x,x.offset,x.byteLength)),!m.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(G===void 0&&(G=0),at===void 0&&(at=x?x.length:0),Vt===void 0&&(Vt=0),Pt===void 0&&(Pt=this.length),G<0||at>x.length||Vt<0||Pt>this.length)throw new RangeError("out of range index");if(Vt>=Pt&&G>=at)return 0;if(Vt>=Pt)return-1;if(G>=at)return 1;if(this===x)return 0;let D=(Pt>>>=0)-(Vt>>>=0),mt=(at>>>=0)-(G>>>=0),gt=Math.min(D,mt),ft=this.slice(Vt,Pt),Gt=x.slice(G,at);for(let Lt=0;Lt>>=0,isFinite(at)?(at>>>=0,Vt===void 0&&(Vt="utf8")):(Vt=at,at=void 0)}let Pt=this.length-G;if((at===void 0||at>Pt)&&(at=Pt),x.length>0&&(at<0||G<0)||G>this.length)throw new RangeError("Attempt to write outside buffer bounds");Vt||(Vt="utf8");let D=!1;for(;;)switch(Vt){case"hex":return i(this,x,G,at);case"utf8":case"utf-8":return T(this,x,G,at);case"ascii":case"latin1":case"binary":return N(this,x,G,at);case"base64":return K(this,x,G,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,x,G,at);default:if(D)throw new TypeError("Unknown encoding: "+Vt);Vt=(""+Vt).toLowerCase(),D=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let _t=4096;function ot(x,G,at){let Vt="";at=Math.min(x.length,at);for(let Pt=G;PtVt)&&(at=Vt);let Pt="";for(let D=G;Dat)throw new RangeError("Trying to access beyond buffer length")}function nt(x,G,at,Vt,Pt,D){if(!m.isBuffer(x))throw new TypeError('"buffer" argument must be a Buffer instance');if(G>Pt||Gx.length)throw new RangeError("Index out of range")}function rt(x,G,at,Vt,Pt){g(G,Vt,Pt,x,at,7);let D=Number(G&BigInt(4294967295));x[at++]=D,D>>=8,x[at++]=D,D>>=8,x[at++]=D,D>>=8,x[at++]=D;let mt=Number(G>>BigInt(32)&BigInt(4294967295));return x[at++]=mt,mt>>=8,x[at++]=mt,mt>>=8,x[at++]=mt,mt>>=8,x[at++]=mt,at}function F(x,G,at,Vt,Pt){g(G,Vt,Pt,x,at,7);let D=Number(G&BigInt(4294967295));x[at+7]=D,D>>=8,x[at+6]=D,D>>=8,x[at+5]=D,D>>=8,x[at+4]=D;let mt=Number(G>>BigInt(32)&BigInt(4294967295));return x[at+3]=mt,mt>>=8,x[at+2]=mt,mt>>=8,x[at+1]=mt,mt>>=8,x[at]=mt,at+8}function lt(x,G,at,Vt,Pt,D){if(at+Vt>x.length)throw new RangeError("Index out of range");if(at<0)throw new RangeError("Index out of range")}function At(x,G,at,Vt,Pt){return G=+G,at>>>=0,Pt||lt(x,0,at,4),E.write(x,G,at,Vt,23,4),at+4}function Mt(x,G,at,Vt,Pt){return G=+G,at>>>=0,Pt||lt(x,0,at,8),E.write(x,G,at,Vt,52,8),at+8}m.prototype.slice=function(x,G){let at=this.length;(x=~~x)<0?(x+=at)<0&&(x=0):x>at&&(x=at),(G=G===void 0?at:~~G)<0?(G+=at)<0&&(G=0):G>at&&(G=at),G>>=0,G>>>=0,at||et(x,G,this.length);let Vt=this[x],Pt=1,D=0;for(;++D>>=0,G>>>=0,at||et(x,G,this.length);let Vt=this[x+--G],Pt=1;for(;G>0&&(Pt*=256);)Vt+=this[x+--G]*Pt;return Vt},m.prototype.readUint8=m.prototype.readUInt8=function(x,G){return x>>>=0,G||et(x,1,this.length),this[x]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(x,G){return x>>>=0,G||et(x,2,this.length),this[x]|this[x+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(x,G){return x>>>=0,G||et(x,2,this.length),this[x]<<8|this[x+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(x,G){return x>>>=0,G||et(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+16777216*this[x+3]},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(x,G){return x>>>=0,G||et(x,4,this.length),16777216*this[x]+(this[x+1]<<16|this[x+2]<<8|this[x+3])},m.prototype.readBigUInt64LE=Wt(function(x){I(x>>>=0,"offset");let G=this[x],at=this[x+7];G!==void 0&&at!==void 0||W(x,this.length-8);let Vt=G+256*this[++x]+65536*this[++x]+this[++x]*2**24,Pt=this[++x]+256*this[++x]+65536*this[++x]+at*2**24;return BigInt(Vt)+(BigInt(Pt)<>>=0,"offset");let G=this[x],at=this[x+7];G!==void 0&&at!==void 0||W(x,this.length-8);let Vt=G*2**24+65536*this[++x]+256*this[++x]+this[++x],Pt=this[++x]*2**24+65536*this[++x]+256*this[++x]+at;return(BigInt(Vt)<>>=0,G>>>=0,at||et(x,G,this.length);let Vt=this[x],Pt=1,D=0;for(;++D=Pt&&(Vt-=Math.pow(2,8*G)),Vt},m.prototype.readIntBE=function(x,G,at){x>>>=0,G>>>=0,at||et(x,G,this.length);let Vt=G,Pt=1,D=this[x+--Vt];for(;Vt>0&&(Pt*=256);)D+=this[x+--Vt]*Pt;return Pt*=128,D>=Pt&&(D-=Math.pow(2,8*G)),D},m.prototype.readInt8=function(x,G){return x>>>=0,G||et(x,1,this.length),128&this[x]?-1*(255-this[x]+1):this[x]},m.prototype.readInt16LE=function(x,G){x>>>=0,G||et(x,2,this.length);let at=this[x]|this[x+1]<<8;return 32768&at?4294901760|at:at},m.prototype.readInt16BE=function(x,G){x>>>=0,G||et(x,2,this.length);let at=this[x+1]|this[x]<<8;return 32768&at?4294901760|at:at},m.prototype.readInt32LE=function(x,G){return x>>>=0,G||et(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},m.prototype.readInt32BE=function(x,G){return x>>>=0,G||et(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},m.prototype.readBigInt64LE=Wt(function(x){I(x>>>=0,"offset");let G=this[x],at=this[x+7];G!==void 0&&at!==void 0||W(x,this.length-8);let Vt=this[x+4]+256*this[x+5]+65536*this[x+6]+(at<<24);return(BigInt(Vt)<>>=0,"offset");let G=this[x],at=this[x+7];G!==void 0&&at!==void 0||W(x,this.length-8);let Vt=(G<<24)+65536*this[++x]+256*this[++x]+this[++x];return(BigInt(Vt)<>>=0,G||et(x,4,this.length),E.read(this,x,!0,23,4)},m.prototype.readFloatBE=function(x,G){return x>>>=0,G||et(x,4,this.length),E.read(this,x,!1,23,4)},m.prototype.readDoubleLE=function(x,G){return x>>>=0,G||et(x,8,this.length),E.read(this,x,!0,52,8)},m.prototype.readDoubleBE=function(x,G){return x>>>=0,G||et(x,8,this.length),E.read(this,x,!1,52,8)},m.prototype.writeUintLE=m.prototype.writeUIntLE=function(x,G,at,Vt){x=+x,G>>>=0,at>>>=0,Vt||nt(this,x,G,at,Math.pow(2,8*at)-1,0);let Pt=1,D=0;for(this[G]=255&x;++D>>=0,at>>>=0,Vt||nt(this,x,G,at,Math.pow(2,8*at)-1,0);let Pt=at-1,D=1;for(this[G+Pt]=255&x;--Pt>=0&&(D*=256);)this[G+Pt]=x/D&255;return G+at},m.prototype.writeUint8=m.prototype.writeUInt8=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,1,255,0),this[G]=255&x,G+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,2,65535,0),this[G]=255&x,this[G+1]=x>>>8,G+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,2,65535,0),this[G]=x>>>8,this[G+1]=255&x,G+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,4,4294967295,0),this[G+3]=x>>>24,this[G+2]=x>>>16,this[G+1]=x>>>8,this[G]=255&x,G+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,4,4294967295,0),this[G]=x>>>24,this[G+1]=x>>>16,this[G+2]=x>>>8,this[G+3]=255&x,G+4},m.prototype.writeBigUInt64LE=Wt(function(x,G=0){return rt(this,x,G,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Wt(function(x,G=0){return F(this,x,G,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(x,G,at,Vt){if(x=+x,G>>>=0,!Vt){let gt=Math.pow(2,8*at-1);nt(this,x,G,at,gt-1,-gt)}let Pt=0,D=1,mt=0;for(this[G]=255&x;++Pt>>=0,!Vt){let gt=Math.pow(2,8*at-1);nt(this,x,G,at,gt-1,-gt)}let Pt=at-1,D=1,mt=0;for(this[G+Pt]=255&x;--Pt>=0&&(D*=256);)x<0&&mt===0&&this[G+Pt+1]!==0&&(mt=1),this[G+Pt]=(x/D|0)-mt&255;return G+at},m.prototype.writeInt8=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,1,127,-128),x<0&&(x=255+x+1),this[G]=255&x,G+1},m.prototype.writeInt16LE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,2,32767,-32768),this[G]=255&x,this[G+1]=x>>>8,G+2},m.prototype.writeInt16BE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,2,32767,-32768),this[G]=x>>>8,this[G+1]=255&x,G+2},m.prototype.writeInt32LE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,4,2147483647,-2147483648),this[G]=255&x,this[G+1]=x>>>8,this[G+2]=x>>>16,this[G+3]=x>>>24,G+4},m.prototype.writeInt32BE=function(x,G,at){return x=+x,G>>>=0,at||nt(this,x,G,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[G]=x>>>24,this[G+1]=x>>>16,this[G+2]=x>>>8,this[G+3]=255&x,G+4},m.prototype.writeBigInt64LE=Wt(function(x,G=0){return rt(this,x,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Wt(function(x,G=0){return F(this,x,G,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeFloatLE=function(x,G,at){return At(this,x,G,!0,at)},m.prototype.writeFloatBE=function(x,G,at){return At(this,x,G,!1,at)},m.prototype.writeDoubleLE=function(x,G,at){return Mt(this,x,G,!0,at)},m.prototype.writeDoubleBE=function(x,G,at){return Mt(this,x,G,!1,at)},m.prototype.copy=function(x,G,at,Vt){if(!m.isBuffer(x))throw new TypeError("argument should be a Buffer");if(at||(at=0),Vt||Vt===0||(Vt=this.length),G>=x.length&&(G=x.length),G||(G=0),Vt>0&&Vt=this.length)throw new RangeError("Index out of range");if(Vt<0)throw new RangeError("sourceEnd out of bounds");Vt>this.length&&(Vt=this.length),x.length-G>>=0,at=at===void 0?this.length:at>>>0,x||(x=0),typeof x=="number")for(Pt=G;Pt=Vt+4;at-=3)G=`_${x.slice(at-3,at)}${G}`;return`${x.slice(0,at)}${G}`}function g(x,G,at,Vt,Pt,D){if(x>at||x3?G===0||G===BigInt(0)?`>= 0${mt} and < 2${mt} ** ${8*(D+1)}${mt}`:`>= -(2${mt} ** ${8*(D+1)-1}${mt}) and < 2 ** ${8*(D+1)-1}${mt}`:`>= ${G}${mt} and <= ${at}${mt}`,new $t.ERR_OUT_OF_RANGE("value",gt,x)}(function(mt,gt,ft){I(gt,"offset"),mt[gt]!==void 0&&mt[gt+ft]!==void 0||W(gt,mt.length-(ft+1))})(Vt,Pt,D)}function I(x,G){if(typeof x!="number")throw new $t.ERR_INVALID_ARG_TYPE(G,"number",x)}function W(x,G,at){throw Math.floor(x)!==x?(I(x,at),new $t.ERR_OUT_OF_RANGE(at||"offset","an integer",x)):G<0?new $t.ERR_BUFFER_OUT_OF_BOUNDS:new $t.ERR_OUT_OF_RANGE(at||"offset",`>= ${at?1:0} and <= ${G}`,x)}de("ERR_BUFFER_OUT_OF_BOUNDS",function(x){return x?`${x} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),de("ERR_INVALID_ARG_TYPE",function(x,G){return`The "${x}" argument must be of type number. Received type ${typeof G}`},TypeError),de("ERR_OUT_OF_RANGE",function(x,G,at){let Vt=`The value of "${x}" is out of range.`,Pt=at;return Number.isInteger(at)&&Math.abs(at)>4294967296?Pt=u(String(at)):typeof at=="bigint"&&(Pt=String(at),(at>BigInt(2)**BigInt(32)||at<-(BigInt(2)**BigInt(32)))&&(Pt=u(Pt)),Pt+="n"),Vt+=` It must be ${G}. Received ${Pt}`,Vt},RangeError);let Q=/[^+/0-9A-Za-z-_]/g;function St(x,G){let at;G=G||1/0;let Vt=x.length,Pt=null,D=[];for(let mt=0;mt55295&&at<57344){if(!Pt){if(at>56319){(G-=3)>-1&&D.push(239,191,189);continue}if(mt+1===Vt){(G-=3)>-1&&D.push(239,191,189);continue}Pt=at;continue}if(at<56320){(G-=3)>-1&&D.push(239,191,189),Pt=at;continue}at=65536+(Pt-55296<<10|at-56320)}else Pt&&(G-=3)>-1&&D.push(239,191,189);if(Pt=null,at<128){if((G-=1)<0)break;D.push(at)}else if(at<2048){if((G-=2)<0)break;D.push(at>>6|192,63&at|128)}else if(at<65536){if((G-=3)<0)break;D.push(at>>12|224,at>>6&63|128,63&at|128)}else{if(!(at<1114112))throw new Error("Invalid code point");if((G-=4)<0)break;D.push(at>>18|240,at>>12&63|128,at>>6&63|128,63&at|128)}}return D}function d(x){return f.toByteArray((function(G){if((G=(G=G.split("=")[0]).trim().replace(Q,"")).length<2)return"";for(;G.length%4!=0;)G+="=";return G})(x))}function U(x,G,at,Vt){let Pt;for(Pt=0;Pt=G.length||Pt>=x.length);++Pt)G[Pt+at]=x[Pt];return Pt}function M(x,G){return x instanceof G||x!=null&&x.constructor!=null&&x.constructor.name!=null&&x.constructor.name===G.name}function It(x){return x!=x}let Jt=(function(){let x="0123456789abcdef",G=new Array(256);for(let at=0;at<16;++at){let Vt=16*at;for(let Pt=0;Pt<16;++Pt)G[Vt+Pt]=x[at]+x[Pt]}return G})();function Wt(x){return typeof BigInt>"u"?xe:x}function xe(){throw new Error("BigInt not supported")}},251:(l,c)=>{c.read=function(R,f,E,k,y){var _,m,z=8*y-k-1,X=(1<>1,$=-7,ut=E?y-1:0,xt=E?-1:1,vt=R[f+ut];for(ut+=xt,_=vt&(1<<-$)-1,vt>>=-$,$+=z;$>0;_=256*_+R[f+ut],ut+=xt,$-=8);for(m=_&(1<<-$)-1,_>>=-$,$+=k;$>0;m=256*m+R[f+ut],ut+=xt,$-=8);if(_===0)_=1-L;else{if(_===X)return m?NaN:1/0*(vt?-1:1);m+=Math.pow(2,k),_-=L}return(vt?-1:1)*m*Math.pow(2,_-k)},c.write=function(R,f,E,k,y,_){var m,z,X,L=8*_-y-1,$=(1<>1,xt=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,vt=k?0:_-1,Zt=k?1:-1,Bt=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(z=isNaN(f)?1:0,m=$):(m=Math.floor(Math.log(f)/Math.LN2),f*(X=Math.pow(2,-m))<1&&(m--,X*=2),(f+=m+ut>=1?xt/X:xt*Math.pow(2,1-ut))*X>=2&&(m++,X/=2),m+ut>=$?(z=0,m=$):m+ut>=1?(z=(f*X-1)*Math.pow(2,y),m+=ut):(z=f*Math.pow(2,ut-1)*Math.pow(2,y),m=0));y>=8;R[E+vt]=255&z,vt+=Zt,z/=256,y-=8);for(m=m<0;R[E+vt]=255&m,vt+=Zt,m/=256,L-=8);R[E+vt-Zt]|=128*Bt}}},A={};function v(l){var c=A[l];if(c!==void 0)return c.exports;var R=A[l]={exports:{}};return o[l](R,R.exports,v),R.exports}return v.d=(l,c)=>{for(var R in c)v.o(c,R)&&!v.o(l,R)&&Object.defineProperty(l,R,{enumerable:!0,get:c[R]})},v.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),v.o=(l,c)=>Object.prototype.hasOwnProperty.call(l,c),v.r=l=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},v(281)})(),a.exports=p()},3918(a,O,w){"use strict";var p=w(5606);function S(T,N){var K=Object.keys(T);if(Object.getOwnPropertySymbols){var dt=Object.getOwnPropertySymbols(T);N&&(dt=dt.filter(function(j){return Object.getOwnPropertyDescriptor(T,j).enumerable})),K.push.apply(K,dt)}return K}function o(T){for(var N=1;N"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function y(T,N){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(K,dt){return K.__proto__=dt,K},y(T,N)}function _(T){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(N){return N.__proto__||Object.getPrototypeOf(N)},_(T)}function m(T){return m=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},m(T)}var z=w(537).inspect,X=w(9597).codes.ERR_INVALID_ARG_TYPE;function L(T,N,K){return(K===void 0||K>T.length)&&(K=T.length),T.substring(K-N.length,K)===N}var $="",ut="",xt="",vt="",Zt={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function Bt(T){var N=Object.keys(T),K=Object.create(Object.getPrototypeOf(T));return N.forEach(function(dt){K[dt]=T[dt]}),Object.defineProperty(K,"message",{value:T.message}),K}function q(T){return z(T,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ct(T,N,K){var dt="",j="",pt=0,_t="",ot=!1,it=q(T),Et=it.split(` +`),jt=q(N).split(` +`),et=0,nt="";if(K==="strictEqual"&&m(T)==="object"&&m(N)==="object"&&T!==null&&N!==null&&(K="strictEqualObject"),Et.length===1&&jt.length===1&&Et[0]!==jt[0]){var rt=Et[0].length+jt[0].length;if(rt<=10){if(!(m(T)==="object"&&T!==null||m(N)==="object"&&N!==null||T===0&&N===0))return"".concat(Zt[K],` + +`)+"".concat(Et[0]," !== ").concat(jt[0],` +`)}else if(K!=="strictEqualObject"&&rt<(p.stderr&&p.stderr.isTTY?p.stderr.columns:80)){for(;Et[0][et]===jt[0][et];)et++;et>2&&(nt=` + `.concat((function(St,d){if(d=Math.floor(d),St.length==0||d==0)return"";var U=St.length*d;for(d=Math.floor(Math.log(d)/Math.log(2));d;)St+=St,d--;return St+St.substring(0,U-St.length)})(" ",et),"^"),et=0)}}for(var F=Et[Et.length-1],lt=jt[jt.length-1];F===lt&&(et++<2?_t=` + `.concat(F).concat(_t):dt=F,Et.pop(),jt.pop(),Et.length!==0&&jt.length!==0);)F=Et[Et.length-1],lt=jt[jt.length-1];var At=Math.max(Et.length,jt.length);if(At===0){var Mt=it.split(` +`);if(Mt.length>30)for(Mt[26]="".concat($,"...").concat(vt);Mt.length>27;)Mt.pop();return"".concat(Zt.notIdentical,` + +`).concat(Mt.join(` +`),` +`)}et>3&&(_t=` +`.concat($,"...").concat(vt).concat(_t),ot=!0),dt!==""&&(_t=` + `.concat(dt).concat(_t),dt="");var $t=0,de=Zt[K]+` +`.concat(ut,"+ actual").concat(vt," ").concat(xt,"- expected").concat(vt),u=" ".concat($,"...").concat(vt," Lines skipped");for(et=0;et1&&et>2&&(g>4?(j+=` +`.concat($,"...").concat(vt),ot=!0):g>3&&(j+=` + `.concat(jt[et-2]),$t++),j+=` + `.concat(jt[et-1]),$t++),pt=et,dt+=` +`.concat(xt,"-").concat(vt," ").concat(jt[et]),$t++;else if(jt.length1&&et>2&&(g>4?(j+=` +`.concat($,"...").concat(vt),ot=!0):g>3&&(j+=` + `.concat(Et[et-2]),$t++),j+=` + `.concat(Et[et-1]),$t++),pt=et,j+=` +`.concat(ut,"+").concat(vt," ").concat(Et[et]),$t++;else{var I=jt[et],W=Et[et],Q=W!==I&&(!L(W,",")||W.slice(0,-1)!==I);Q&&L(I,",")&&I.slice(0,-1)===W&&(Q=!1,W+=","),Q?(g>1&&et>2&&(g>4?(j+=` +`.concat($,"...").concat(vt),ot=!0):g>3&&(j+=` + `.concat(Et[et-2]),$t++),j+=` + `.concat(Et[et-1]),$t++),pt=et,j+=` +`.concat(ut,"+").concat(vt," ").concat(W),dt+=` +`.concat(xt,"-").concat(vt," ").concat(I),$t+=2):(j+=dt,dt="",g!==1&&et!==0||(j+=` + `.concat(W),$t++))}if($t>20&&et30)for(Mt[26]="".concat($,"...").concat(vt);Mt.length>27;)Mt.pop();Et=Mt.length===1?_t.call(this,"".concat(At," ").concat(Mt[0])):_t.call(this,"".concat(At,` + +`).concat(Mt.join(` +`),` +`))}else{var $t=q(rt),de="",u=Zt[et];et==="notDeepEqual"||et==="notEqual"?($t="".concat(Zt[et],` + +`).concat($t)).length>1024&&($t="".concat($t.slice(0,1021),"...")):(de="".concat(q(F)),$t.length>512&&($t="".concat($t.slice(0,509),"...")),de.length>512&&(de="".concat(de.slice(0,509),"...")),et==="deepEqual"||et==="equal"?$t="".concat(u,` + +`).concat($t,` + +should equal + +`):de=" ".concat(et," ").concat(de)),Et=_t.call(this,"".concat($t).concat(de))}return Error.stackTraceLimit=lt,Et.generatedMessage=!jt,Object.defineProperty(R(Et),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),Et.code="ERR_ASSERTION",Et.actual=rt,Et.expected=F,Et.operator=et,Error.captureStackTrace&&Error.captureStackTrace(R(Et),nt),Et.stack,Et.name="AssertionError",c(Et)}return j=ot,(pt=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:N,value:function(it,Et){return z(this,o(o({},Et),{},{customInspect:!1,depth:0}))}}])&&v(j.prototype,pt),Object.defineProperty(j,"prototype",{writable:!1}),ot})(f(Error),z.custom);a.exports=i},4035(a,O,w){"use strict";var p,S=w(6556),o=w(9092)(),A=w(9957),v=w(5795);if(o){var l=S("RegExp.prototype.exec"),c={},R=function(){throw c},f={toString:R,valueOf:R};typeof Symbol.toPrimitive=="symbol"&&(f[Symbol.toPrimitive]=R),p=function(k){if(!k||typeof k!="object")return!1;var y=v(k,"lastIndex");if(!y||!A(y,"value"))return!1;try{l(k,f)}catch(_){return _===c}}}else{var E=S("Object.prototype.toString");p=function(k){return!(!k||typeof k!="object"&&typeof k!="function")&&E(k)==="[object RegExp]"}}a.exports=p},4039(a,O,w){"use strict";var p=typeof Symbol<"u"&&Symbol,S=w(1333);a.exports=function(){return typeof p=="function"&&typeof Symbol=="function"&&typeof p("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&S()}},4107(a,O,w){"use strict";var p=w(6698),S=w(392),o=w(2861).Buffer,A=[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],v=new Array(64);function l(){this.init(),this._w=v,S.call(this,64,56)}function c(_,m,z){return z^_&(m^z)}function R(_,m,z){return _&m|z&(_|m)}function f(_){return(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10)}function E(_){return(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7)}function k(_){return(_>>>7|_<<25)^(_>>>18|_<<14)^_>>>3}function y(_){return(_>>>17|_<<15)^(_>>>19|_<<13)^_>>>10}p(l,S),l.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},l.prototype._update=function(_){for(var m=this._w,z=0|this._a,X=0|this._b,L=0|this._c,$=0|this._d,ut=0|this._e,xt=0|this._f,vt=0|this._g,Zt=0|this._h,Bt=0;Bt<16;++Bt)m[Bt]=_.readInt32BE(4*Bt);for(;Bt<64;++Bt)m[Bt]=y(m[Bt-2])+m[Bt-7]+k(m[Bt-15])+m[Bt-16]|0;for(var q=0;q<64;++q){var ct=Zt+E(ut)+c(ut,xt,vt)+A[q]+m[q]|0,i=f(z)+R(z,X,L)|0;Zt=vt,vt=xt,xt=ut,ut=$+ct|0,$=L,L=X,X=z,z=ct+i|0}this._a=z+this._a|0,this._b=X+this._b|0,this._c=L+this._c|0,this._d=$+this._d|0,this._e=ut+this._e|0,this._f=xt+this._f|0,this._g=vt+this._g|0,this._h=Zt+this._h|0},l.prototype._hash=function(){var _=o.allocUnsafe(32);return _.writeInt32BE(this._a,0),_.writeInt32BE(this._b,4),_.writeInt32BE(this._c,8),_.writeInt32BE(this._d,12),_.writeInt32BE(this._e,16),_.writeInt32BE(this._f,20),_.writeInt32BE(this._g,24),_.writeInt32BE(this._h,28),_},a.exports=l},4133(a,O,w){"use strict";var p=w(487),S=w(8452),o=w(3003),A=w(6642),v=w(2464),l=p(A(),Number);S(l,{getPolyfill:A,implementation:o,shim:v}),a.exports=l},4148(a,O,w){"use strict";var p=w(5606),S=w(6763);function o(et){return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},o(et)}function A(et,nt){for(var rt=0;rt1?rt-1:0),lt=1;lt1?rt-1:0),lt=1;lt1?rt-1:0),lt=1;lt1?rt-1:0),lt=1;ltO},4372(a,O,w){"use strict";var p=w(9675),S=w(6556)("TypedArray.prototype.buffer",!0),o=w(5680);a.exports=S||function(A){if(!o(A))throw new p("Not a Typed Array");return A.buffer}},4459(a){"use strict";a.exports=Number.isNaN||function(O){return O!=O}},4634(a){var O={}.toString;a.exports=Array.isArray||function(w){return O.call(w)=="[object Array]"}},5345(a){"use strict";a.exports=URIError},5360(a,O){"use strict";var w=function(l,c){return c||(c={}),l.split("").forEach(function(R,f){R in c||(c[R]=f)}),c},p={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};p.charmap=w(p.alphabet,p.charmap);var S={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};S.charmap=w(S.alphabet,S.charmap);var o={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function A(l){if(this.buf=[],this.shift=8,this.carry=0,l){switch(l.type){case"rfc4648":this.charmap=O.rfc4648.charmap;break;case"crockford":this.charmap=O.crockford.charmap;break;case"base32hex":this.charmap=O.base32hex.charmap;break;default:throw new Error("invalid type")}l.charmap&&(this.charmap=l.charmap)}}function v(l){if(this.buf="",this.shift=3,this.carry=0,l){switch(l.type){case"rfc4648":this.alphabet=O.rfc4648.alphabet;break;case"crockford":this.alphabet=O.crockford.alphabet;break;case"base32hex":this.alphabet=O.base32hex.alphabet;break;default:throw new Error("invalid type")}l.alphabet?this.alphabet=l.alphabet:l.lc&&(this.alphabet=this.alphabet.toLowerCase())}}o.charmap=w(o.alphabet,o.charmap),A.prototype.charmap=p.charmap,A.prototype.write=function(l){var c=this.charmap,R=this.buf,f=this.shift,E=this.carry;return l.toUpperCase().split("").forEach(function(k){if(k!="="){var y=255&c[k];(f-=5)>0?E|=y<>-f),E=y<<(f+=8)&255):(R.push(E|y),f=8,E=0)}}),this.shift=f,this.carry=E,this},A.prototype.finalize=function(l){return l&&this.write(l),this.shift!==8&&this.carry!==0&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},v.prototype.alphabet=p.alphabet,v.prototype.write=function(l){var c,R,f,E=this.shift,k=this.carry;for(f=0;f>E,this.buf+=this.alphabet[31&c],E>5&&(c=R>>(E-=5),this.buf+=this.alphabet[31&c]),k=R<<(E=5-E),E=8-E;return this.shift=E,this.carry=k,this},v.prototype.finalize=function(l){return l&&this.write(l),this.shift!==3&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},O.encode=function(l,c){return new v(c).finalize(l)},O.decode=function(l,c){return new A(c).finalize(l)},O.Decoder=A,O.Encoder=v,O.charmap=w,O.crockford=S,O.rfc4648=p,O.base32hex=o},5377(a,O,w){"use strict";var p=w(2861).Buffer,S=w(4634),o=w(4372),A=ArrayBuffer.isView||function(R){try{return o(R),!0}catch{return!1}},v=typeof Uint8Array<"u",l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c=l&&(p.prototype instanceof Uint8Array||p.TYPED_ARRAY_SUPPORT);a.exports=function(R,f){if(p.isBuffer(R))return R.constructor&&!("isBuffer"in R)?p.from(R):R;if(typeof R=="string")return p.from(R,f);if(l&&A(R)){if(R.byteLength===0)return p.alloc(0);if(c){var E=p.from(R.buffer,R.byteOffset,R.byteLength);if(E.byteLength===R.byteLength)return E}var k=R instanceof Uint8Array?R:new Uint8Array(R.buffer,R.byteOffset,R.byteLength),y=p.from(k);if(y.length===R.byteLength)return y}if(v&&R instanceof Uint8Array)return p.from(R);var _=S(R);if(_)for(var m=0;m255||~~z!==z)throw new RangeError("Array items must be numbers in the range 0-255.")}if(_||p.isBuffer(R)&&R.constructor&&typeof R.constructor.isBuffer=="function"&&R.constructor.isBuffer(R))return p.from(R);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},5606(a){var O,w,p=a.exports={};function S(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function A(_){if(O===setTimeout)return setTimeout(_,0);if((O===S||!O)&&setTimeout)return O=setTimeout,setTimeout(_,0);try{return O(_,0)}catch{try{return O.call(null,_,0)}catch{return O.call(this,_,0)}}}(function(){try{O=typeof setTimeout=="function"?setTimeout:S}catch{O=S}try{w=typeof clearTimeout=="function"?clearTimeout:o}catch{w=o}})();var v,l=[],c=!1,R=-1;function f(){c&&v&&(c=!1,v.length?l=v.concat(l):R=-1,l.length&&E())}function E(){if(!c){var _=A(f);c=!0;for(var m=l.length;m;){for(v=l,l=[];++R1)for(var z=1;z"u"?w.g:globalThis,E=S(),k=A("String.prototype.slice"),y=A("Array.prototype.indexOf",!0)||function(m,z){for(var X=0;X-1?z:z==="Object"&&(function(X){var L=!1;return p(_,function($,ut){if(!L)try{$(X),L=k(ut,1)}catch{}}),L})(m)}return v?(function(X){var L=!1;return p(_,function($,ut){if(!L)try{"$"+$(X)===ut&&(L=k(ut,1))}catch{}}),L})(m):null}},5795(a,O,w){"use strict";var p=w(6549);if(p)try{p([],"length")}catch{p=null}a.exports=p},5880(a){"use strict";a.exports=Math.pow},6188(a){"use strict";a.exports=Math.max},6549(a){"use strict";a.exports=Object.getOwnPropertyDescriptor},6556(a,O,w){"use strict";var p=w(453),S=w(3126),o=S([p("%String.prototype.indexOf%")]);a.exports=function(A,v){var l=p(A,!!v);return typeof l=="function"&&o(A,".prototype.")>-1?S([l]):l}},6576(a,O,w){"use strict";var p=w(9394),S=w(8452);a.exports=function(){var o=p();return S(Object,{is:o},{is:function(){return Object.is!==o}}),o}},6578(a){"use strict";a.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6642(a,O,w){"use strict";var p=w(3003);a.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:p}},6698(a){typeof Object.create=="function"?a.exports=function(O,w){w&&(O.super_=w,O.prototype=Object.create(w.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}))}:a.exports=function(O,w){if(w){O.super_=w;var p=function(){};p.prototype=w.prototype,O.prototype=new p,O.prototype.constructor=O}}},6710(a,O,w){"use strict";var p=w(6698),S=w(4107),o=w(392),A=w(2861).Buffer,v=new Array(64);function l(){this.init(),this._w=v,o.call(this,64,56)}p(l,S),l.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},l.prototype._hash=function(){var c=A.allocUnsafe(28);return c.writeInt32BE(this._a,0),c.writeInt32BE(this._b,4),c.writeInt32BE(this._c,8),c.writeInt32BE(this._d,12),c.writeInt32BE(this._e,16),c.writeInt32BE(this._f,20),c.writeInt32BE(this._g,24),c},a.exports=l},6743(a,O,w){"use strict";var p=w(9353);a.exports=Function.prototype.bind||p},6763(a,O,w){var p=w(537),S=w(4148);function o(){return new Date().getTime()}var A,v=Array.prototype.slice,l={};A=w.g!==void 0&&w.g.console?w.g.console:typeof window<"u"&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){A.log.apply(A,arguments)},"info"],[function(){A.log.apply(A,arguments)},"warn"],[function(){A.warn.apply(A,arguments)},"error"],[function(y){l[y]=o()},"time"],[function(y){var _=l[y];if(!_)throw new Error("No such label: "+y);delete l[y];var m=o()-_;A.log(y+": "+m+"ms")},"timeEnd"],[function(){var y=new Error;y.name="Trace",y.message=p.format.apply(null,arguments),A.error(y.stack)},"trace"],[function(y){A.log(p.inspect(y)+` +`)},"dir"],[function(y){if(!y){var _=v.call(arguments,1);S.ok(!1,p.format.apply(null,_))}},"assert"]],R=0;R4294967295||l(R)!==R)throw new v("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],E=!0,k=!0;if("length"in c&&A){var y=A(c,"length");y&&!y.configurable&&(E=!1),y&&!y.writable&&(k=!1)}return(E||k||!f)&&(o?S(c,"length",R,!0,!0):S(c,"length",R)),c}},7119(a){"use strict";a.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},7176(a,O,w){"use strict";var p,S=w(3126),o=w(5795);try{p=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var A=!!p&&o&&o(Object.prototype,"__proto__"),v=Object,l=v.getPrototypeOf;a.exports=A&&typeof A.get=="function"?S([A.get]):typeof l=="function"&&function(c){return l(c==null?c:v(c))}},7244(a,O,w){"use strict";var p=w(9092)(),S=w(6556)("Object.prototype.toString"),o=function(l){return!(p&&l&&typeof l=="object"&&Symbol.toStringTag in l)&&S(l)==="[object Arguments]"},A=function(l){return!!o(l)||l!==null&&typeof l=="object"&&"length"in l&&typeof l.length=="number"&&l.length>=0&&S(l)!=="[object Array]"&&"callee"in l&&S(l.callee)==="[object Function]"},v=(function(){return o(arguments)})();o.isLegacyArguments=A,a.exports=v?o:A},7526(a,O){"use strict";O.byteLength=function(R){var f=v(R),E=f[0],k=f[1];return 3*(E+k)/4-k},O.toByteArray=function(R){var f,E,k=v(R),y=k[0],_=k[1],m=new S((function(L,$,ut){return 3*($+ut)/4-ut})(0,y,_)),z=0,X=_>0?y-4:y;for(E=0;E>16&255,m[z++]=f>>8&255,m[z++]=255&f;return _===2&&(f=p[R.charCodeAt(E)]<<2|p[R.charCodeAt(E+1)]>>4,m[z++]=255&f),_===1&&(f=p[R.charCodeAt(E)]<<10|p[R.charCodeAt(E+1)]<<4|p[R.charCodeAt(E+2)]>>2,m[z++]=f>>8&255,m[z++]=255&f),m},O.fromByteArray=function(R){for(var f,E=R.length,k=E%3,y=[],_=16383,m=0,z=E-k;mz?z:m+_));return k===1?(f=R[E-1],y.push(w[f>>2]+w[f<<4&63]+"==")):k===2&&(f=(R[E-2]<<8)+R[E-1],y.push(w[f>>10]+w[f>>4&63]+w[f<<2&63]+"=")),y.join("")};for(var w=[],p=[],S=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0;A<64;++A)w[A]=o[A],p[o.charCodeAt(A)]=A;function v(R){var f=R.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=R.indexOf("=");return E===-1&&(E=f),[E,E===f?0:4-E%4]}function l(R){return w[R>>18&63]+w[R>>12&63]+w[R>>6&63]+w[63&R]}function c(R,f,E){for(var k,y=[],_=f;_>>27}function R(E){return E<<30|E>>>2}function f(E,k,y,_){return E===0?k&y|~k&_:E===2?k&y|k&_|y&_:k^y^_}p(l,S),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(E){for(var k=this._w,y=0|this._a,_=0|this._b,m=0|this._c,z=0|this._d,X=0|this._e,L=0;L<16;++L)k[L]=E.readInt32BE(4*L);for(;L<80;++L)k[L]=k[L-3]^k[L-8]^k[L-14]^k[L-16];for(var $=0;$<80;++$){var ut=~~($/20),xt=c(y)+f(ut,_,m,z)+X+k[$]+A[ut]|0;X=z,z=m,m=R(_),_=y,y=xt}this._a=y+this._a|0,this._b=_+this._b|0,this._c=m+this._c|0,this._d=z+this._d|0,this._e=X+this._e|0},l.prototype._hash=function(){var E=o.allocUnsafe(20);return E.writeInt32BE(0|this._a,0),E.writeInt32BE(0|this._b,4),E.writeInt32BE(0|this._c,8),E.writeInt32BE(0|this._d,12),E.writeInt32BE(0|this._e,16),E},a.exports=l},8002(a){"use strict";a.exports=Math.min},8068(a){"use strict";a.exports=SyntaxError},8075(a,O,w){"use strict";var p=w(453),S=w(487),o=S(p("String.prototype.indexOf"));a.exports=function(A,v){var l=p(A,!!v);return typeof l=="function"&&o(A,".prototype.")>-1?S(l):l}},8184(a,O,w){"use strict";var p=w(6556),S=w(9721)(/^\s*(?:function)?\*/),o=w(9092)(),A=w(3628),v=p("Object.prototype.toString"),l=p("Function.prototype.toString"),c=w(4233);a.exports=function(R){if(typeof R!="function")return!1;if(S(l(R)))return!0;if(!o)return v(R)==="[object GeneratorFunction]";if(!A)return!1;var f=c();return f&&A(R)===f.prototype}},8287(a,O,w){"use strict";var p=w(6763);let S=w(7526),o=w(251),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=c,O.SlowBuffer=function(d){return+d!=d&&(d=0),c.alloc(+d)},O.INSPECT_MAX_BYTES=50;let v=2147483647;function l(d){if(d>v)throw new RangeError('The value "'+d+'" is invalid for option "size"');let U=new Uint8Array(d);return Object.setPrototypeOf(U,c.prototype),U}function c(d,U,M){if(typeof d=="number"){if(typeof U=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(d)}return R(d,U,M)}function R(d,U,M){if(typeof d=="string")return(function(Wt,xe){if(typeof xe=="string"&&xe!==""||(xe="utf8"),!c.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);let x=0|m(Wt,xe),G=l(x),at=G.write(Wt,xe);return at!==x&&(G=G.slice(0,at)),G})(d,U);if(ArrayBuffer.isView(d))return(function(Wt){if(g(Wt,Uint8Array)){let xe=new Uint8Array(Wt);return y(xe.buffer,xe.byteOffset,xe.byteLength)}return k(Wt)})(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(g(d,ArrayBuffer)||d&&g(d.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(g(d,SharedArrayBuffer)||d&&g(d.buffer,SharedArrayBuffer)))return y(d,U,M);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let It=d.valueOf&&d.valueOf();if(It!=null&&It!==d)return c.from(It,U,M);let Jt=(function(Wt){if(c.isBuffer(Wt)){let xe=0|_(Wt.length),x=l(xe);return x.length===0||Wt.copy(x,0,0,xe),x}return Wt.length!==void 0?typeof Wt.length!="number"||I(Wt.length)?l(0):k(Wt):Wt.type==="Buffer"&&Array.isArray(Wt.data)?k(Wt.data):void 0})(d);if(Jt)return Jt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return c.from(d[Symbol.toPrimitive]("string"),U,M);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}function f(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function E(d){return f(d),l(d<0?0:0|_(d))}function k(d){let U=d.length<0?0:0|_(d.length),M=l(U);for(let It=0;It=v)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v.toString(16)+" bytes");return 0|d}function m(d,U){if(c.isBuffer(d))return d.length;if(ArrayBuffer.isView(d)||g(d,ArrayBuffer))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);let M=d.length,It=arguments.length>2&&arguments[2]===!0;if(!It&&M===0)return 0;let Jt=!1;for(;;)switch(U){case"ascii":case"latin1":case"binary":return M;case"utf8":case"utf-8":return $t(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*M;case"hex":return M>>>1;case"base64":return de(d).length;default:if(Jt)return It?-1:$t(d).length;U=(""+U).toLowerCase(),Jt=!0}}function z(d,U,M){let It=!1;if((U===void 0||U<0)&&(U=0),U>this.length||((M===void 0||M>this.length)&&(M=this.length),M<=0)||(M>>>=0)<=(U>>>=0))return"";for(d||(d="utf8");;)switch(d){case"hex":return K(this,U,M);case"utf8":case"utf-8":return ct(this,U,M);case"ascii":return T(this,U,M);case"latin1":case"binary":return N(this,U,M);case"base64":return q(this,U,M);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,U,M);default:if(It)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),It=!0}}function X(d,U,M){let It=d[U];d[U]=d[M],d[M]=It}function L(d,U,M,It,Jt){if(d.length===0)return-1;if(typeof M=="string"?(It=M,M=0):M>2147483647?M=2147483647:M<-2147483648&&(M=-2147483648),I(M=+M)&&(M=Jt?0:d.length-1),M<0&&(M=d.length+M),M>=d.length){if(Jt)return-1;M=d.length-1}else if(M<0){if(!Jt)return-1;M=0}if(typeof U=="string"&&(U=c.from(U,It)),c.isBuffer(U))return U.length===0?-1:$(d,U,M,It,Jt);if(typeof U=="number")return U&=255,typeof Uint8Array.prototype.indexOf=="function"?Jt?Uint8Array.prototype.indexOf.call(d,U,M):Uint8Array.prototype.lastIndexOf.call(d,U,M):$(d,[U],M,It,Jt);throw new TypeError("val must be string, number or Buffer")}function $(d,U,M,It,Jt){let Wt,xe=1,x=d.length,G=U.length;if(It!==void 0&&((It=String(It).toLowerCase())==="ucs2"||It==="ucs-2"||It==="utf16le"||It==="utf-16le")){if(d.length<2||U.length<2)return-1;xe=2,x/=2,G/=2,M/=2}function at(Vt,Pt){return xe===1?Vt[Pt]:Vt.readUInt16BE(Pt*xe)}if(Jt){let Vt=-1;for(Wt=M;Wtx&&(M=x-G),Wt=M;Wt>=0;Wt--){let Vt=!0;for(let Pt=0;PtJt&&(It=Jt):It=Jt;let Wt=U.length,xe;for(It>Wt/2&&(It=Wt/2),xe=0;xe>8,G=xe%256,at.push(G),at.push(x);return at})(U,d.length-M),d,M,It)}function q(d,U,M){return U===0&&M===d.length?S.fromByteArray(d):S.fromByteArray(d.slice(U,M))}function ct(d,U,M){M=Math.min(d.length,M);let It=[],Jt=U;for(;Jt239?4:Wt>223?3:Wt>191?2:1;if(Jt+x<=M){let G,at,Vt,Pt;switch(x){case 1:Wt<128&&(xe=Wt);break;case 2:G=d[Jt+1],(192&G)==128&&(Pt=(31&Wt)<<6|63&G,Pt>127&&(xe=Pt));break;case 3:G=d[Jt+1],at=d[Jt+2],(192&G)==128&&(192&at)==128&&(Pt=(15&Wt)<<12|(63&G)<<6|63&at,Pt>2047&&(Pt<55296||Pt>57343)&&(xe=Pt));break;case 4:G=d[Jt+1],at=d[Jt+2],Vt=d[Jt+3],(192&G)==128&&(192&at)==128&&(192&Vt)==128&&(Pt=(15&Wt)<<18|(63&G)<<12|(63&at)<<6|63&Vt,Pt>65535&&Pt<1114112&&(xe=Pt))}}xe===null?(xe=65533,x=1):xe>65535&&(xe-=65536,It.push(xe>>>10&1023|55296),xe=56320|1023&xe),It.push(xe),Jt+=x}return(function(Wt){let xe=Wt.length;if(xe<=i)return String.fromCharCode.apply(String,Wt);let x="",G=0;for(;GIt.length?(c.isBuffer(Wt)||(Wt=c.from(Wt)),Wt.copy(It,Jt)):Uint8Array.prototype.set.call(It,Wt,Jt);else{if(!c.isBuffer(Wt))throw new TypeError('"list" argument must be an Array of Buffers');Wt.copy(It,Jt)}Jt+=Wt.length}return It},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){let d=this.length;if(d%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;UU&&(d+=" ... "),""},A&&(c.prototype[A]=c.prototype.inspect),c.prototype.compare=function(d,U,M,It,Jt){if(g(d,Uint8Array)&&(d=c.from(d,d.offset,d.byteLength)),!c.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(U===void 0&&(U=0),M===void 0&&(M=d?d.length:0),It===void 0&&(It=0),Jt===void 0&&(Jt=this.length),U<0||M>d.length||It<0||Jt>this.length)throw new RangeError("out of range index");if(It>=Jt&&U>=M)return 0;if(It>=Jt)return-1;if(U>=M)return 1;if(this===d)return 0;let Wt=(Jt>>>=0)-(It>>>=0),xe=(M>>>=0)-(U>>>=0),x=Math.min(Wt,xe),G=this.slice(It,Jt),at=d.slice(U,M);for(let Vt=0;Vt>>=0,isFinite(M)?(M>>>=0,It===void 0&&(It="utf8")):(It=M,M=void 0)}let Jt=this.length-U;if((M===void 0||M>Jt)&&(M=Jt),d.length>0&&(M<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");It||(It="utf8");let Wt=!1;for(;;)switch(It){case"hex":return ut(this,d,U,M);case"utf8":case"utf-8":return xt(this,d,U,M);case"ascii":case"latin1":case"binary":return vt(this,d,U,M);case"base64":return Zt(this,d,U,M);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,d,U,M);default:if(Wt)throw new TypeError("Unknown encoding: "+It);It=(""+It).toLowerCase(),Wt=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let i=4096;function T(d,U,M){let It="";M=Math.min(d.length,M);for(let Jt=U;JtIt)&&(M=It);let Jt="";for(let Wt=U;WtM)throw new RangeError("Trying to access beyond buffer length")}function pt(d,U,M,It,Jt,Wt){if(!c.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>Jt||Ud.length)throw new RangeError("Index out of range")}function _t(d,U,M,It,Jt){F(U,It,Jt,d,M,7);let Wt=Number(U&BigInt(4294967295));d[M++]=Wt,Wt>>=8,d[M++]=Wt,Wt>>=8,d[M++]=Wt,Wt>>=8,d[M++]=Wt;let xe=Number(U>>BigInt(32)&BigInt(4294967295));return d[M++]=xe,xe>>=8,d[M++]=xe,xe>>=8,d[M++]=xe,xe>>=8,d[M++]=xe,M}function ot(d,U,M,It,Jt){F(U,It,Jt,d,M,7);let Wt=Number(U&BigInt(4294967295));d[M+7]=Wt,Wt>>=8,d[M+6]=Wt,Wt>>=8,d[M+5]=Wt,Wt>>=8,d[M+4]=Wt;let xe=Number(U>>BigInt(32)&BigInt(4294967295));return d[M+3]=xe,xe>>=8,d[M+2]=xe,xe>>=8,d[M+1]=xe,xe>>=8,d[M]=xe,M+8}function it(d,U,M,It,Jt,Wt){if(M+It>d.length)throw new RangeError("Index out of range");if(M<0)throw new RangeError("Index out of range")}function Et(d,U,M,It,Jt){return U=+U,M>>>=0,Jt||it(d,0,M,4),o.write(d,U,M,It,23,4),M+4}function jt(d,U,M,It,Jt){return U=+U,M>>>=0,Jt||it(d,0,M,8),o.write(d,U,M,It,52,8),M+8}c.prototype.slice=function(d,U){let M=this.length;(d=~~d)<0?(d+=M)<0&&(d=0):d>M&&(d=M),(U=U===void 0?M:~~U)<0?(U+=M)<0&&(U=0):U>M&&(U=M),U>>=0,U>>>=0,M||j(d,U,this.length);let It=this[d],Jt=1,Wt=0;for(;++Wt>>=0,U>>>=0,M||j(d,U,this.length);let It=this[d+--U],Jt=1;for(;U>0&&(Jt*=256);)It+=this[d+--U]*Jt;return It},c.prototype.readUint8=c.prototype.readUInt8=function(d,U){return d>>>=0,U||j(d,1,this.length),this[d]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(d,U){return d>>>=0,U||j(d,2,this.length),this[d]|this[d+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(d,U){return d>>>=0,U||j(d,2,this.length),this[d]<<8|this[d+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(d,U){return d>>>=0,U||j(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+16777216*this[d+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(d,U){return d>>>=0,U||j(d,4,this.length),16777216*this[d]+(this[d+1]<<16|this[d+2]<<8|this[d+3])},c.prototype.readBigUInt64LE=Q(function(d){lt(d>>>=0,"offset");let U=this[d],M=this[d+7];U!==void 0&&M!==void 0||At(d,this.length-8);let It=U+256*this[++d]+65536*this[++d]+this[++d]*2**24,Jt=this[++d]+256*this[++d]+65536*this[++d]+M*2**24;return BigInt(It)+(BigInt(Jt)<>>=0,"offset");let U=this[d],M=this[d+7];U!==void 0&&M!==void 0||At(d,this.length-8);let It=U*2**24+65536*this[++d]+256*this[++d]+this[++d],Jt=this[++d]*2**24+65536*this[++d]+256*this[++d]+M;return(BigInt(It)<>>=0,U>>>=0,M||j(d,U,this.length);let It=this[d],Jt=1,Wt=0;for(;++Wt=Jt&&(It-=Math.pow(2,8*U)),It},c.prototype.readIntBE=function(d,U,M){d>>>=0,U>>>=0,M||j(d,U,this.length);let It=U,Jt=1,Wt=this[d+--It];for(;It>0&&(Jt*=256);)Wt+=this[d+--It]*Jt;return Jt*=128,Wt>=Jt&&(Wt-=Math.pow(2,8*U)),Wt},c.prototype.readInt8=function(d,U){return d>>>=0,U||j(d,1,this.length),128&this[d]?-1*(255-this[d]+1):this[d]},c.prototype.readInt16LE=function(d,U){d>>>=0,U||j(d,2,this.length);let M=this[d]|this[d+1]<<8;return 32768&M?4294901760|M:M},c.prototype.readInt16BE=function(d,U){d>>>=0,U||j(d,2,this.length);let M=this[d+1]|this[d]<<8;return 32768&M?4294901760|M:M},c.prototype.readInt32LE=function(d,U){return d>>>=0,U||j(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},c.prototype.readInt32BE=function(d,U){return d>>>=0,U||j(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},c.prototype.readBigInt64LE=Q(function(d){lt(d>>>=0,"offset");let U=this[d],M=this[d+7];U!==void 0&&M!==void 0||At(d,this.length-8);let It=this[d+4]+256*this[d+5]+65536*this[d+6]+(M<<24);return(BigInt(It)<>>=0,"offset");let U=this[d],M=this[d+7];U!==void 0&&M!==void 0||At(d,this.length-8);let It=(U<<24)+65536*this[++d]+256*this[++d]+this[++d];return(BigInt(It)<>>=0,U||j(d,4,this.length),o.read(this,d,!0,23,4)},c.prototype.readFloatBE=function(d,U){return d>>>=0,U||j(d,4,this.length),o.read(this,d,!1,23,4)},c.prototype.readDoubleLE=function(d,U){return d>>>=0,U||j(d,8,this.length),o.read(this,d,!0,52,8)},c.prototype.readDoubleBE=function(d,U){return d>>>=0,U||j(d,8,this.length),o.read(this,d,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(d,U,M,It){d=+d,U>>>=0,M>>>=0,It||pt(this,d,U,M,Math.pow(2,8*M)-1,0);let Jt=1,Wt=0;for(this[U]=255&d;++Wt>>=0,M>>>=0,It||pt(this,d,U,M,Math.pow(2,8*M)-1,0);let Jt=M-1,Wt=1;for(this[U+Jt]=255&d;--Jt>=0&&(Wt*=256);)this[U+Jt]=d/Wt&255;return U+M},c.prototype.writeUint8=c.prototype.writeUInt8=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,1,255,0),this[U]=255&d,U+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,2,65535,0),this[U]=255&d,this[U+1]=d>>>8,U+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,2,65535,0),this[U]=d>>>8,this[U+1]=255&d,U+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,4,4294967295,0),this[U+3]=d>>>24,this[U+2]=d>>>16,this[U+1]=d>>>8,this[U]=255&d,U+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,4,4294967295,0),this[U]=d>>>24,this[U+1]=d>>>16,this[U+2]=d>>>8,this[U+3]=255&d,U+4},c.prototype.writeBigUInt64LE=Q(function(d,U=0){return _t(this,d,U,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(d,U=0){return ot(this,d,U,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(d,U,M,It){if(d=+d,U>>>=0,!It){let x=Math.pow(2,8*M-1);pt(this,d,U,M,x-1,-x)}let Jt=0,Wt=1,xe=0;for(this[U]=255&d;++Jt>>=0,!It){let x=Math.pow(2,8*M-1);pt(this,d,U,M,x-1,-x)}let Jt=M-1,Wt=1,xe=0;for(this[U+Jt]=255&d;--Jt>=0&&(Wt*=256);)d<0&&xe===0&&this[U+Jt+1]!==0&&(xe=1),this[U+Jt]=(d/Wt|0)-xe&255;return U+M},c.prototype.writeInt8=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,1,127,-128),d<0&&(d=255+d+1),this[U]=255&d,U+1},c.prototype.writeInt16LE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,2,32767,-32768),this[U]=255&d,this[U+1]=d>>>8,U+2},c.prototype.writeInt16BE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,2,32767,-32768),this[U]=d>>>8,this[U+1]=255&d,U+2},c.prototype.writeInt32LE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,4,2147483647,-2147483648),this[U]=255&d,this[U+1]=d>>>8,this[U+2]=d>>>16,this[U+3]=d>>>24,U+4},c.prototype.writeInt32BE=function(d,U,M){return d=+d,U>>>=0,M||pt(this,d,U,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[U]=d>>>24,this[U+1]=d>>>16,this[U+2]=d>>>8,this[U+3]=255&d,U+4},c.prototype.writeBigInt64LE=Q(function(d,U=0){return _t(this,d,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(d,U=0){return ot(this,d,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(d,U,M){return Et(this,d,U,!0,M)},c.prototype.writeFloatBE=function(d,U,M){return Et(this,d,U,!1,M)},c.prototype.writeDoubleLE=function(d,U,M){return jt(this,d,U,!0,M)},c.prototype.writeDoubleBE=function(d,U,M){return jt(this,d,U,!1,M)},c.prototype.copy=function(d,U,M,It){if(!c.isBuffer(d))throw new TypeError("argument should be a Buffer");if(M||(M=0),It||It===0||(It=this.length),U>=d.length&&(U=d.length),U||(U=0),It>0&&It=this.length)throw new RangeError("Index out of range");if(It<0)throw new RangeError("sourceEnd out of bounds");It>this.length&&(It=this.length),d.length-U>>=0,M=M===void 0?this.length:M>>>0,d||(d=0),typeof d=="number")for(Jt=U;Jt=It+4;M-=3)U=`_${d.slice(M-3,M)}${U}`;return`${d.slice(0,M)}${U}`}function F(d,U,M,It,Jt,Wt){if(d>M||d3?U===0||U===BigInt(0)?`>= 0${xe} and < 2${xe} ** ${8*(Wt+1)}${xe}`:`>= -(2${xe} ** ${8*(Wt+1)-1}${xe}) and < 2 ** ${8*(Wt+1)-1}${xe}`:`>= ${U}${xe} and <= ${M}${xe}`,new et.ERR_OUT_OF_RANGE("value",x,d)}(function(xe,x,G){lt(x,"offset"),xe[x]!==void 0&&xe[x+G]!==void 0||At(x,xe.length-(G+1))})(It,Jt,Wt)}function lt(d,U){if(typeof d!="number")throw new et.ERR_INVALID_ARG_TYPE(U,"number",d)}function At(d,U,M){throw Math.floor(d)!==d?(lt(d,M),new et.ERR_OUT_OF_RANGE(M||"offset","an integer",d)):U<0?new et.ERR_BUFFER_OUT_OF_BOUNDS:new et.ERR_OUT_OF_RANGE(M||"offset",`>= ${M?1:0} and <= ${U}`,d)}nt("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),nt("ERR_INVALID_ARG_TYPE",function(d,U){return`The "${d}" argument must be of type number. Received type ${typeof U}`},TypeError),nt("ERR_OUT_OF_RANGE",function(d,U,M){let It=`The value of "${d}" is out of range.`,Jt=M;return Number.isInteger(M)&&Math.abs(M)>4294967296?Jt=rt(String(M)):typeof M=="bigint"&&(Jt=String(M),(M>BigInt(2)**BigInt(32)||M<-(BigInt(2)**BigInt(32)))&&(Jt=rt(Jt)),Jt+="n"),It+=` It must be ${U}. Received ${Jt}`,It},RangeError);let Mt=/[^+/0-9A-Za-z-_]/g;function $t(d,U){let M;U=U||1/0;let It=d.length,Jt=null,Wt=[];for(let xe=0;xe55295&&M<57344){if(!Jt){if(M>56319){(U-=3)>-1&&Wt.push(239,191,189);continue}if(xe+1===It){(U-=3)>-1&&Wt.push(239,191,189);continue}Jt=M;continue}if(M<56320){(U-=3)>-1&&Wt.push(239,191,189),Jt=M;continue}M=65536+(Jt-55296<<10|M-56320)}else Jt&&(U-=3)>-1&&Wt.push(239,191,189);if(Jt=null,M<128){if((U-=1)<0)break;Wt.push(M)}else if(M<2048){if((U-=2)<0)break;Wt.push(M>>6|192,63&M|128)}else if(M<65536){if((U-=3)<0)break;Wt.push(M>>12|224,M>>6&63|128,63&M|128)}else{if(!(M<1114112))throw new Error("Invalid code point");if((U-=4)<0)break;Wt.push(M>>18|240,M>>12&63|128,M>>6&63|128,63&M|128)}}return Wt}function de(d){return S.toByteArray((function(U){if((U=(U=U.split("=")[0]).trim().replace(Mt,"")).length<2)return"";for(;U.length%4!=0;)U+="=";return U})(d))}function u(d,U,M,It){let Jt;for(Jt=0;Jt=U.length||Jt>=d.length);++Jt)U[Jt+M]=d[Jt];return Jt}function g(d,U){return d instanceof U||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===U.name}function I(d){return d!=d}let W=(function(){let d="0123456789abcdef",U=new Array(256);for(let M=0;M<16;++M){let It=16*M;for(let Jt=0;Jt<16;++Jt)U[It+Jt]=d[M]+d[Jt]}return U})();function Q(d){return typeof BigInt>"u"?St:d}function St(){throw new Error("BigInt not supported")}},8403(a,O,w){"use strict";var p=w(1189),S=w(1333)(),o=w(6556),A=w(9612),v=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),c=S?A.getOwnPropertySymbols:null;a.exports=function(R,f){if(R==null)throw new TypeError("target must be an object");var E=A(R);if(arguments.length===1)return E;for(var k=1;k2?arguments[2]:{},y=p(E);S&&(y=A.call(y,Object.getOwnPropertySymbols(E)));for(var _=0;_"u")return!1;for(var y in window)try{if(!E["$"+y]&&S.call(window,y)&&window[y]!==null&&typeof window[y]=="object")try{f(window[y])}catch{return!0}}catch{return!0}return!1})();p=function(y){var _=y!==null&&typeof y=="object",m=o.call(y)==="[object Function]",z=A(y),X=_&&o.call(y)==="[object String]",L=[];if(!_&&!m&&!z)throw new TypeError("Object.keys called on a non-object");var $=c&&m;if(X&&y.length>0&&!S.call(y,0))for(var ut=0;ut0)for(var xt=0;xt"u"||!k)return f(q);try{return f(q)}catch{return!1}})(y),Bt=0;Bt"u"?w.g:globalThis;a.exports=function(){for(var o=[],A=0;A"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}})();return function(){var y,_=A(E);if(k){var m=A(this).constructor;y=Reflect.construct(_,arguments,m)}else y=_.apply(this,arguments);return(function(z,X){if(X&&(p(X)==="object"||typeof X=="function"))return X;if(X!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L})(z)})(this,y)}}function A(E){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(k){return k.__proto__||Object.getPrototypeOf(k)},A(E)}var v,l,c={};function R(E,k,y){y||(y=Error);var _=(function(m){(function($,ut){if(typeof ut!="function"&&ut!==null)throw new TypeError("Super expression must either be null or a function");$.prototype=Object.create(ut&&ut.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),ut&&S($,ut)})(L,m);var z,X=o(L);function L($,ut,xt){var vt;return(function(Zt,Bt){if(!(Zt instanceof Bt))throw new TypeError("Cannot call a class as a function")})(this,L),vt=X.call(this,(function(Zt,Bt,q){return typeof k=="string"?k:k(Zt,Bt,q)})($,ut,xt)),vt.code=E,vt}return z=L,Object.defineProperty(z,"prototype",{writable:!1}),z})(y);c[E]=_}function f(E,k){if(Array.isArray(E)){var y=E.length;return E=E.map(function(_){return String(_)}),y>2?"one of ".concat(k," ").concat(E.slice(0,y-1).join(", "),", or ")+E[y-1]:y===2?"one of ".concat(k," ").concat(E[0]," or ").concat(E[1]):"of ".concat(k," ").concat(E[0])}return"of ".concat(k," ").concat(String(E))}R("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),R("ERR_INVALID_ARG_TYPE",function(E,k,y){var _,m,z;if(v===void 0&&(v=w(4148)),v(typeof E=="string","'name' must be a string"),typeof k=="string"&&(m="not ",k.substr(0,4)===m)?(_="must not be",k=k.replace(/^not /,"")):_="must be",(function(L,$,ut){return(ut===void 0||ut>L.length)&&(ut=L.length),L.substring(ut-9,ut)===$})(E," argument"))z="The ".concat(E," ").concat(_," ").concat(f(k,"type"));else{var X=(function(L,$,ut){return typeof ut!="number"&&(ut=0),!(ut+1>L.length)&&L.indexOf(".",ut)!==-1})(E)?"property":"argument";z='The "'.concat(E,'" ').concat(X," ").concat(_," ").concat(f(k,"type"))}return z+". Received type ".concat(p(y))},TypeError),R("ERR_INVALID_ARG_VALUE",function(E,k){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=w(537));var _=l.inspect(k);return _.length>128&&(_="".concat(_.slice(0,128),"...")),"The argument '".concat(E,"' ").concat(y,". Received ").concat(_)},TypeError,RangeError),R("ERR_INVALID_RETURN_VALUE",function(E,k,y){var _;return _=y&&y.constructor&&y.constructor.name?"instance of ".concat(y.constructor.name):"type ".concat(p(y)),"Expected ".concat(E,' to be returned from the "').concat(k,'"')+" function but got ".concat(_,".")},TypeError),R("ERR_MISSING_ARGS",function(){for(var E=arguments.length,k=new Array(E),y=0;y0,"At least one arg needs to be specified");var _="The ",m=k.length;switch(k=k.map(function(z){return'"'.concat(z,'"')}),m){case 1:_+="".concat(k[0]," argument");break;case 2:_+="".concat(k[0]," and ").concat(k[1]," arguments");break;default:_+=k.slice(0,m-1).join(", "),_+=", and ".concat(k[m-1]," arguments")}return"".concat(_," must be specified")},TypeError),a.exports.codes=c},9600(a){"use strict";var O,w,p=Function.prototype.toString,S=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof S=="function"&&typeof Object.defineProperty=="function")try{O=Object.defineProperty({},"length",{get:function(){throw w}}),w={},S(function(){throw 42},null,O)}catch(k){k!==w&&(S=null)}else S=null;var o=/^\s*class\b/,A=function(k){try{var y=p.call(k);return o.test(y)}catch{return!1}},v=function(k){try{return!A(k)&&(p.call(k),!0)}catch{return!1}},l=Object.prototype.toString,c=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),f=function(){return!1};if(typeof document=="object"){var E=document.all;l.call(E)===l.call(document.all)&&(f=function(k){if((R||!k)&&(k===void 0||typeof k=="object"))try{var y=l.call(k);return(y==="[object HTMLAllCollection]"||y==="[object HTML document.all class]"||y==="[object HTMLCollection]"||y==="[object Object]")&&k("")==null}catch{}return!1})}a.exports=S?function(k){if(f(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{S(k,null,O)}catch(y){if(y!==w)return!1}return!A(k)&&v(k)}:function(k){if(f(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(c)return v(k);if(A(k))return!1;var y=l.call(k);return!(y!=="[object Function]"&&y!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(y))&&v(k)}},9612(a){"use strict";a.exports=Object},9675(a){"use strict";a.exports=TypeError},9721(a,O,w){"use strict";var p=w(6556),S=w(4035),o=p("RegExp.prototype.exec"),A=w(9675);a.exports=function(v){if(!S(v))throw new A("`regex` must be a RegExp");return function(l){return o(v,l)!==null}}},9957(a,O,w){"use strict";var p=Function.prototype.call,S=Object.prototype.hasOwnProperty,o=w(6743);a.exports=o.call(p,S)}},P={};function Y(a){var O=P[a];if(O!==void 0)return O.exports;var w=P[a]={id:a,loaded:!1,exports:{}};return B[a].call(w.exports,w,w.exports,Y),w.loaded=!0,w.exports}return Y.d=(a,O)=>{for(var w in O)Y.o(O,w)&&!Y.o(a,w)&&Object.defineProperty(a,w,{enumerable:!0,get:O[w]})},Y.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),Y.hmd=a=>((a=Object.create(a)).children||(a.children=[]),Object.defineProperty(a,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+a.id)}}),a),Y.o=(a,O)=>Object.prototype.hasOwnProperty.call(a,O),Y.r=a=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},Y(448)})(),Dt.exports=Ot()},8968:Dt=>{"use strict";Dt.exports=Math.floor},9032:(Dt,Ot,B)=>{"use strict";var P=B(7244),Y=B(8184),a=B(5767),O=B(5680);function w(i){return i.call.bind(i)}var p=typeof BigInt<"u",S=typeof Symbol<"u",o=w(Object.prototype.toString),A=w(Number.prototype.valueOf),v=w(String.prototype.valueOf),l=w(Boolean.prototype.valueOf);if(p)var c=w(BigInt.prototype.valueOf);if(S)var R=w(Symbol.prototype.valueOf);function f(i,T){if(typeof i!="object")return!1;try{return T(i),!0}catch{return!1}}function E(i){return o(i)==="[object Map]"}function k(i){return o(i)==="[object Set]"}function y(i){return o(i)==="[object WeakMap]"}function _(i){return o(i)==="[object WeakSet]"}function m(i){return o(i)==="[object ArrayBuffer]"}function z(i){return typeof ArrayBuffer<"u"&&(m.working?m(i):i instanceof ArrayBuffer)}function X(i){return o(i)==="[object DataView]"}function L(i){return typeof DataView<"u"&&(X.working?X(i):i instanceof DataView)}Ot.isArgumentsObject=P,Ot.isGeneratorFunction=Y,Ot.isTypedArray=O,Ot.isPromise=function(i){return typeof Promise<"u"&&i instanceof Promise||i!==null&&typeof i=="object"&&typeof i.then=="function"&&typeof i.catch=="function"},Ot.isArrayBufferView=function(i){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(i):O(i)||L(i)},Ot.isUint8Array=function(i){return a(i)==="Uint8Array"},Ot.isUint8ClampedArray=function(i){return a(i)==="Uint8ClampedArray"},Ot.isUint16Array=function(i){return a(i)==="Uint16Array"},Ot.isUint32Array=function(i){return a(i)==="Uint32Array"},Ot.isInt8Array=function(i){return a(i)==="Int8Array"},Ot.isInt16Array=function(i){return a(i)==="Int16Array"},Ot.isInt32Array=function(i){return a(i)==="Int32Array"},Ot.isFloat32Array=function(i){return a(i)==="Float32Array"},Ot.isFloat64Array=function(i){return a(i)==="Float64Array"},Ot.isBigInt64Array=function(i){return a(i)==="BigInt64Array"},Ot.isBigUint64Array=function(i){return a(i)==="BigUint64Array"},E.working=typeof Map<"u"&&E(new Map),Ot.isMap=function(i){return typeof Map<"u"&&(E.working?E(i):i instanceof Map)},k.working=typeof Set<"u"&&k(new Set),Ot.isSet=function(i){return typeof Set<"u"&&(k.working?k(i):i instanceof Set)},y.working=typeof WeakMap<"u"&&y(new WeakMap),Ot.isWeakMap=function(i){return typeof WeakMap<"u"&&(y.working?y(i):i instanceof WeakMap)},_.working=typeof WeakSet<"u"&&_(new WeakSet),Ot.isWeakSet=function(i){return _(i)},m.working=typeof ArrayBuffer<"u"&&m(new ArrayBuffer),Ot.isArrayBuffer=z,X.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&X(new DataView(new ArrayBuffer(1),0,1)),Ot.isDataView=L;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ut(i){return o(i)==="[object SharedArrayBuffer]"}function xt(i){return $!==void 0&&(ut.working===void 0&&(ut.working=ut(new $)),ut.working?ut(i):i instanceof $)}function vt(i){return f(i,A)}function Zt(i){return f(i,v)}function Bt(i){return f(i,l)}function q(i){return p&&f(i,c)}function ct(i){return S&&f(i,R)}Ot.isSharedArrayBuffer=xt,Ot.isAsyncFunction=function(i){return o(i)==="[object AsyncFunction]"},Ot.isMapIterator=function(i){return o(i)==="[object Map Iterator]"},Ot.isSetIterator=function(i){return o(i)==="[object Set Iterator]"},Ot.isGeneratorObject=function(i){return o(i)==="[object Generator]"},Ot.isWebAssemblyCompiledModule=function(i){return o(i)==="[object WebAssembly.Module]"},Ot.isNumberObject=vt,Ot.isStringObject=Zt,Ot.isBooleanObject=Bt,Ot.isBigIntObject=q,Ot.isSymbolObject=ct,Ot.isBoxedPrimitive=function(i){return vt(i)||Zt(i)||Bt(i)||q(i)||ct(i)},Ot.isAnyArrayBuffer=function(i){return typeof Uint8Array<"u"&&(z(i)||xt(i))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(i){Object.defineProperty(Ot,i,{enumerable:!1,value:function(){throw new Error(i+" is not supported in userland")}})})},9092:(Dt,Ot,B)=>{"use strict";var P=B(1333);Dt.exports=function(){return P()&&!!Symbol.toStringTag}},9127:function(Dt,Ot,B){var P,Y,a;(function(O,w){"use strict";Dt.exports?Dt.exports=w(B(4193)):(Y=[B(4193)],(a=typeof(P=w)=="function"?P.apply(Ot,Y):P)===void 0||(Dt.exports=a))})(0,function(O,w){"use strict";var p=w&&w.URITemplate,S=Object.prototype.hasOwnProperty;function o(c){return o._cache[c]?o._cache[c]:this instanceof o?(this.expression=c,o._cache[c]=this,this):new o(c)}function A(c){this.data=c,this.cache={}}var v=o.prototype,l={"":{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 o._cache={},o.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,o.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/,o.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/,o.LITERAL_PATTERN=/[<>{}"`^| \\]/,o.expand=function(c,R,f){var E,k,y,_=l[c.operator],m=_.named?"Named":"Unnamed",z=c.variables,X=[];for(y=0;k=z[y];y++){if((E=R.get(k.name)).type===0&&f&&f.strict)throw new Error('Missing expansion value for variable "'+k.name+'"');if(E.val.length){if(E.type>1&&k.maxlength)throw new Error('Invalid expression: Prefix modifier not applicable to variable "'+k.name+'"');X.push(o["expand"+m](E,_,k.explode,k.explode&&_.separator||",",k.maxlength,k.name))}else E.type&&X.push("")}return X.length?_.prefix+X.join(_.separator):""},o.expandNamed=function(c,R,f,E,k,y){var _,m,z,X="",L=R.encode,$=R.empty_name_separator,ut=!c[L].length,xt=c.type===2?"":O[L](y);for(m=0,z=c.val.length;m{"use strict";B.d(Ot,{c:()=>P,u:()=>Y}),B(8950);var P=300,Y="GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"},9209:(Dt,Ot,B)=>{"use strict";var P=B(6578),Y=typeof globalThis>"u"?B.g:globalThis;Dt.exports=function(){for(var a=[],O=0;O{"use strict";Dt.exports=RangeError},9340:function(Dt,Ot,B){var P;Dt=B.nmd(Dt),(function(){Ot&&Ot.nodeType,Dt&&Dt.nodeType;var Y=typeof B.g=="object"&&B.g;Y.global!==Y&&Y.window!==Y&&Y.self;var a,O=2147483647,w=36,p=/^xn--/,S=/[^\x20-\x7E]/,o=/[\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"},v=Math.floor,l=String.fromCharCode;function c(L){throw new RangeError(A[L])}function R(L,$){for(var ut=L.length,xt=[];ut--;)xt[ut]=$(L[ut]);return xt}function f(L,$){var ut=L.split("@"),xt="";return ut.length>1&&(xt=ut[0]+"@",L=ut[1]),xt+R((L=L.replace(o,".")).split("."),$).join(".")}function E(L){for(var $,ut,xt=[],vt=0,Zt=L.length;vt=55296&&$<=56319&&vt65535&&(ut+=l(($-=65536)>>>10&1023|55296),$=56320|1023&$),ut+=l($)}).join("")}function y(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:w}function _(L,$){return L+22+75*(L<26)-(($!=0)<<5)}function m(L,$,ut){var xt=0;for(L=ut?v(L/700):L>>1,L+=v(L/$);L>455;xt+=w)L=v(L/35);return v(xt+36*L/(L+38))}function z(L){var $,ut,xt,vt,Zt,Bt,q,ct,i,T,N=[],K=L.length,dt=0,j=128,pt=72;for((ut=L.lastIndexOf("-"))<0&&(ut=0),xt=0;xt=128&&c("not-basic"),N.push(L.charCodeAt(xt));for(vt=ut>0?ut+1:0;vt=K&&c("invalid-input"),((ct=y(L.charCodeAt(vt++)))>=w||ct>v((O-dt)/Bt))&&c("overflow"),dt+=ct*Bt,!(ct<(i=q<=pt?1:q>=pt+26?26:q-pt));q+=w)Bt>v(O/(T=w-i))&&c("overflow"),Bt*=T;pt=m(dt-Zt,$=N.length+1,Zt==0),v(dt/$)>O-j&&c("overflow"),j+=v(dt/$),dt%=$,N.splice(dt++,0,j)}return k(N)}function X(L){var $,ut,xt,vt,Zt,Bt,q,ct,i,T,N,K,dt,j,pt,_t=[];for(K=(L=E(L)).length,$=128,ut=0,Zt=72,Bt=0;Bt=$&&Nv((O-ut)/(dt=xt+1))&&c("overflow"),ut+=(q-$)*dt,$=q,Bt=0;BtO&&c("overflow"),N==$){for(ct=ut,i=w;!(ct<(T=i<=Zt?1:i>=Zt+26?26:i-Zt));i+=w)pt=ct-T,j=w-T,_t.push(l(_(T+pt%j,0))),ct=v(pt/j);_t.push(l(_(ct,0))),Zt=m(ut,dt,xt==vt),ut=0,++xt}++ut,++$}return _t.join("")}a={version:"1.3.2",ucs2:{decode:E,encode:k},decode:z,encode:X,toASCII:function(L){return f(L,function($){return S.test($)?"xn--"+X($):$})},toUnicode:function(L){return f(L,function($){return p.test($)?z($.slice(4).toLowerCase()):$})}},(P=function(){return a}.call(Ot,B,Ot,Dt))===void 0||(Dt.exports=P)})()},9353:Dt=>{"use strict";var Ot=Object.prototype.toString,B=Math.max,P=function(Y,a){for(var O=[],w=0;w{"use strict";Dt.exports=Error},9538:Dt=>{"use strict";Dt.exports=ReferenceError},9600:Dt=>{"use strict";var Ot,B,P=Function.prototype.toString,Y=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof Y=="function"&&typeof Object.defineProperty=="function")try{Ot=Object.defineProperty({},"length",{get:function(){throw B}}),B={},Y(function(){throw 42},null,Ot)}catch(l){l!==B&&(Y=null)}else Y=null;var a=/^\s*class\b/,O=function(l){try{var c=P.call(l);return a.test(c)}catch{return!1}},w=function(l){try{return!O(l)&&(P.call(l),!0)}catch{return!1}},p=Object.prototype.toString,S=typeof Symbol=="function"&&!!Symbol.toStringTag,o=!(0 in[,]),A=function(){return!1};if(typeof document=="object"){var v=document.all;p.call(v)===p.call(document.all)&&(A=function(l){if((o||!l)&&(l===void 0||typeof l=="object"))try{var c=p.call(l);return(c==="[object HTMLAllCollection]"||c==="[object HTML document.all class]"||c==="[object HTMLCollection]"||c==="[object Object]")&&l("")==null}catch{}return!1})}Dt.exports=Y?function(l){if(A(l))return!0;if(!l||typeof l!="function"&&typeof l!="object")return!1;try{Y(l,null,Ot)}catch(c){if(c!==B)return!1}return!O(l)&&w(l)}:function(l){if(A(l))return!0;if(!l||typeof l!="function"&&typeof l!="object")return!1;if(S)return w(l);if(O(l))return!1;var c=p.call(l);return!(c!=="[object Function]"&&c!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(c))&&w(l)}},9612:Dt=>{"use strict";Dt.exports=Object},9675:Dt=>{"use strict";Dt.exports=TypeError},9721:(Dt,Ot,B)=>{"use strict";var P=B(6556),Y=B(4035),a=P("RegExp.prototype.exec"),O=B(9675);Dt.exports=function(w){if(!Y(w))throw new O("`regex` must be a RegExp");return function(p){return a(w,p)!==null}}},9838:()=>{},9957:(Dt,Ot,B)=>{"use strict";var P=Function.prototype.call,Y=Object.prototype.hasOwnProperty,a=B(6743);Dt.exports=a.call(P,Y)},9983:(Dt,Ot,B)=>{"use strict";function P(v){return P=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},P(v)}function Y(v,l){for(var c=0;co,ok:()=>S}),O=function v(l){var c,R=this;(function(f,E){if(!(f instanceof E))throw new TypeError("Cannot call a class as a function")})(this,v),this.promise=new Promise(function(f){c=f}),l(function(f){R.reason=f,c()})},(w=[{key:"throwIfRequested",value:function(){if(this.reason)throw new Error(this.reason)}}])&&Y(O.prototype,w),p&&Y(O,p),Object.defineProperty(O,"prototype",{writable:!1});var O,w,p,S,o,A=B(6121);S=A.axiosClient,o=A.create}},io={};function wo(Dt){var Ot=io[Dt];if(Ot!==void 0)return Ot.exports;var B=io[Dt]={id:Dt,loaded:!1,exports:{}};return _o[Dt].call(B.exports,B,B.exports,wo),B.loaded=!0,B.exports}return wo.n=Dt=>{var Ot=Dt&&Dt.__esModule?()=>Dt.default:()=>Dt;return wo.d(Ot,{a:Ot}),Ot},wo.d=(Dt,Ot)=>{for(var B in Ot)wo.o(Ot,B)&&!wo.o(Dt,B)&&Object.defineProperty(Dt,B,{enumerable:!0,get:Ot[B]})},wo.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),wo.hmd=Dt=>((Dt=Object.create(Dt)).children||(Dt.children=[]),Object.defineProperty(Dt,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+Dt.id)}}),Dt),wo.o=(Dt,Ot)=>Object.prototype.hasOwnProperty.call(Dt,Ot),wo.r=Dt=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(Dt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Dt,"__esModule",{value:!0})},wo.nmd=Dt=>(Dt.paths=[],Dt.children||(Dt.children=[]),Dt),wo(1924)})())});var ca=Es(Da()),Cs=ca.default??ca;export{Cs as default}; +/*! Bundled license information: + +@stellar/stellar-sdk/dist/stellar-sdk.min.js: + (*! For license information please see stellar-sdk.min.js.LICENSE.txt *) +*/ +//# sourceMappingURL=stellar-sdk.bundle.mjs.map \ No newline at end of file diff --git a/frontend/wallet.js b/frontend/wallet.js index 98f4628..f214a3f 100644 --- a/frontend/wallet.js +++ b/frontend/wallet.js @@ -7,15 +7,19 @@ const connectButton = document.querySelector("#connect-wallet"); const panelAction = document.querySelector("#wallet-panel-action"); const panelTitle = document.querySelector("#wallet-panel-title"); const panelDetail = document.querySelector("#wallet-panel-detail"); +const LOCAL_API_PATH = "./vendor/freighter-api.js"; +const CDN_API_URL = "https://esm.sh/@stellar/freighter-api@5.0.0?bundle"; let apiPromise; function loadApi() { if (!apiPromise) { - apiPromise = import("https://esm.sh/@stellar/freighter-api@5.0.0?bundle") - .catch(() => { + apiPromise = import(LOCAL_API_PATH).catch((localErr) => { + console.warn("Vendored Freighter API fallback to CDN:", localErr); + return import(CDN_API_URL).catch(() => { apiPromise = null; throw new Error("Wallet service could not load. Check your connection or browser privacy settings."); }); + }); } return apiPromise; } diff --git a/netlify.toml b/netlify.toml index 1973b44..3629bcc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,8 +5,10 @@ for = "/*" [headers.values] X-Content-Type-Options = "nosniff" + X-Frame-Options = "DENY" Referrer-Policy = "strict-origin-when-cross-origin" Permissions-Policy = "camera=(), microphone=(), geolocation=()" + Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' https://esm.sh; style-src 'self' 'unsafe-inline'; connect-src 'self' https://soroban-testnet.stellar.org https://horizon-testnet.stellar.org https://friendbot.stellar.org https://mainnet.sorobanrpc.com https://horizon.stellar.org; img-src 'self' data: https:; font-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none';" [[headers]] for = "/*.html" @@ -22,3 +24,8 @@ for = "/*.css" [headers.values] Cache-Control = "public, max-age=3600" + +[[headers]] + for = "/vendor/*" + [headers.values] + Cache-Control = "public, max-age=31536000, immutable" diff --git a/scripts/validate-frontend.mjs b/scripts/validate-frontend.mjs index 20039bb..c527fe0 100644 --- a/scripts/validate-frontend.mjs +++ b/scripts/validate-frontend.mjs @@ -17,7 +17,7 @@ function report(file, message) { failures.push(`${relative(repositoryRoot, file)}: ${message}`); } -const files = walk(frontendRoot).filter((file) => supportedExtensions.has(extname(file))); +const files = walk(frontendRoot).filter((file) => supportedExtensions.has(extname(file))).filter((file) => !file.includes("/vendor/")); const htmlFiles = files.filter((file) => extname(file) === ".html"); for (const file of files) { From 6528f71917f6565834ef981aace164b7668d6e00 Mon Sep 17 00:00:00 2001 From: guptakumarranjeet150 Date: Wed, 9 Sep 2026 20:12:51 +0545 Subject: [PATCH 2/2] fix(ci): make Soroban contracts gate conditional on contracts directory --- .github/workflows/ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b385f..2e0100f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,14 +47,23 @@ jobs: name: Soroban contracts runs-on: ubuntu-latest timeout-minutes: 30 - defaults: - run: - working-directory: contracts steps: - name: Check out repository uses: actions/checkout@v4 + - name: Check if contracts exist + id: check_contracts + shell: bash + run: | + if [ -d "contracts" ] && [ -f "contracts/Cargo.toml" ]; then + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "Soroban contracts moved to dedicated repo; skipping contracts gate." + echo "exists=false" >> $GITHUB_OUTPUT + fi + - name: Install pinned Rust toolchain + if: steps.check_contracts.outputs.exists == 'true' uses: dtolnay/rust-toolchain@master with: toolchain: 1.91.0 @@ -62,6 +71,7 @@ jobs: targets: wasm32v1-none - name: Cache Cargo dependencies + if: steps.check_contracts.outputs.exists == 'true' uses: actions/cache@v4 with: path: | @@ -72,13 +82,21 @@ jobs: restore-keys: ${{ runner.os }}-cargo- - name: Check formatting + if: steps.check_contracts.outputs.exists == 'true' + working-directory: contracts run: cargo fmt --all -- --check - name: Run Clippy + if: steps.check_contracts.outputs.exists == 'true' + working-directory: contracts run: cargo clippy --workspace --all-targets --locked -- -D warnings - name: Run contract tests + if: steps.check_contracts.outputs.exists == 'true' + working-directory: contracts run: cargo test --workspace --locked - name: Build release WASM + if: steps.check_contracts.outputs.exists == 'true' + working-directory: contracts run: cargo build --workspace --locked --release --target wasm32v1-none