From 7f5ac2844ba5e49c2391f75f17b5b85467b49c48 Mon Sep 17 00:00:00 2001 From: Caesarr Date: Tue, 23 Jun 2026 18:37:56 +0100 Subject: [PATCH 1/2] Lockup / Vesting Schedule View I built a page that shows token lockup and vesting schedule information for the bc-forge dashboard. The work covers three parts of the codebase. In the SDK package, I added a VestingClient class that lets you call vesting contract functions like create vesting, release tokens, revoke schedules, and query vesting info. I also added methods to check locked token balances. In the React package, I added a new provider for the vesting client and 8 new hooks - 4 for token lockup (locked balance, lockup info, lock tokens, withdraw locked) and 4 for vesting (get schedules, create vesting, release, revoke). In the frontend app folder, I created a full Vite + React + TypeScript app with Tailwind CSS. The main page lets you enter a beneficiary address, shows loading skeletons while fetching data, displays vesting schedule cards with progress bars and status labels, and handles empty and error states. It works on mobile, tablet, and desktop. It's also set up for Vercel deployment. Closes #258 --- apps/frontend/dist/assets/index-Bti8qPJ1.js | 231 ++ apps/frontend/dist/assets/index-MLcLqgAM.css | 1 + apps/frontend/dist/index.html | 14 + apps/frontend/index.html | 13 + apps/frontend/package-lock.json | 2859 +++++++++++++++++ apps/frontend/package.json | 29 + apps/frontend/src/App.tsx | 14 + apps/frontend/src/__types__/react.d.ts | 48 + apps/frontend/src/__types__/sdk.d.ts | 65 + apps/frontend/src/components/EmptyState.tsx | 31 + apps/frontend/src/components/ErrorState.tsx | 36 + apps/frontend/src/components/Layout.tsx | 29 + .../src/components/LoadingSkeleton.tsx | 35 + .../src/components/VestingScheduleCard.tsx | 128 + apps/frontend/src/index.css | 1 + apps/frontend/src/jsx-augment.d.ts | 12 + apps/frontend/src/main.tsx | 30 + .../src/pages/VestingScheduleView.tsx | 121 + apps/frontend/src/vite-env.d.ts | 1 + apps/frontend/tsconfig.json | 21 + apps/frontend/vercel.json | 9 + apps/frontend/vite.config.ts | 31 + react/package-lock.json | 1644 ++++++++++ react/src/context.tsx | 30 +- react/src/hooks.ts | 226 +- react/src/index.ts | 27 +- sdk/src/client.ts | 31 + sdk/src/index.ts | 2 + sdk/src/vestingClient.ts | 281 ++ 29 files changed, 5996 insertions(+), 4 deletions(-) create mode 100644 apps/frontend/dist/assets/index-Bti8qPJ1.js create mode 100644 apps/frontend/dist/assets/index-MLcLqgAM.css create mode 100644 apps/frontend/dist/index.html create mode 100644 apps/frontend/index.html create mode 100644 apps/frontend/package-lock.json create mode 100644 apps/frontend/package.json create mode 100644 apps/frontend/src/App.tsx create mode 100644 apps/frontend/src/__types__/react.d.ts create mode 100644 apps/frontend/src/__types__/sdk.d.ts create mode 100644 apps/frontend/src/components/EmptyState.tsx create mode 100644 apps/frontend/src/components/ErrorState.tsx create mode 100644 apps/frontend/src/components/Layout.tsx create mode 100644 apps/frontend/src/components/LoadingSkeleton.tsx create mode 100644 apps/frontend/src/components/VestingScheduleCard.tsx create mode 100644 apps/frontend/src/index.css create mode 100644 apps/frontend/src/jsx-augment.d.ts create mode 100644 apps/frontend/src/main.tsx create mode 100644 apps/frontend/src/pages/VestingScheduleView.tsx create mode 100644 apps/frontend/src/vite-env.d.ts create mode 100644 apps/frontend/tsconfig.json create mode 100644 apps/frontend/vercel.json create mode 100644 apps/frontend/vite.config.ts create mode 100644 react/package-lock.json create mode 100644 sdk/src/vestingClient.ts diff --git a/apps/frontend/dist/assets/index-Bti8qPJ1.js b/apps/frontend/dist/assets/index-Bti8qPJ1.js new file mode 100644 index 0000000..b684111 --- /dev/null +++ b/apps/frontend/dist/assets/index-Bti8qPJ1.js @@ -0,0 +1,231 @@ +var dv=Object.defineProperty;var hv=(e,r,o)=>r in e?dv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o;var oa=(e,r,o)=>hv(e,typeof r!="symbol"?r+"":r,o);function yv(e,r){for(var o=0;oa[b]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const b of document.querySelectorAll('link[rel="modulepreload"]'))a(b);new MutationObserver(b=>{for(const I of b)if(I.type==="childList")for(const P of I.addedNodes)P.tagName==="LINK"&&P.rel==="modulepreload"&&a(P)}).observe(document,{childList:!0,subtree:!0});function o(b){const I={};return b.integrity&&(I.integrity=b.integrity),b.referrerPolicy&&(I.referrerPolicy=b.referrerPolicy),b.crossOrigin==="use-credentials"?I.credentials="include":b.crossOrigin==="anonymous"?I.credentials="omit":I.credentials="same-origin",I}function a(b){if(b.ep)return;b.ep=!0;const I=o(b);fetch(b.href,I)}})();function mv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uy={exports:{}},sl={},cy={exports:{}},Cn={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Gu=Symbol.for("react.element"),gv=Symbol.for("react.portal"),vv=Symbol.for("react.fragment"),bv=Symbol.for("react.strict_mode"),wv=Symbol.for("react.profiler"),Sv=Symbol.for("react.provider"),Av=Symbol.for("react.context"),Ev=Symbol.for("react.forward_ref"),kv=Symbol.for("react.suspense"),Tv=Symbol.for("react.memo"),xv=Symbol.for("react.lazy"),qd=Symbol.iterator;function Ov(e){return e===null||typeof e!="object"?null:(e=qd&&e[qd]||e["@@iterator"],typeof e=="function"?e:null)}var ly={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fy=Object.assign,py={};function qs(e,r,o){this.props=e,this.context=r,this.refs=py,this.updater=o||ly}qs.prototype.isReactComponent={};qs.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dy(){}dy.prototype=qs.prototype;function yp(e,r,o){this.props=e,this.context=r,this.refs=py,this.updater=o||ly}var mp=yp.prototype=new dy;mp.constructor=yp;fy(mp,qs.prototype);mp.isPureReactComponent=!0;var Hd=Array.isArray,hy=Object.prototype.hasOwnProperty,gp={current:null},yy={key:!0,ref:!0,__self:!0,__source:!0};function my(e,r,o){var a,b={},I=null,P=null;if(r!=null)for(a in r.ref!==void 0&&(P=r.ref),r.key!==void 0&&(I=""+r.key),r)hy.call(r,a)&&!yy.hasOwnProperty(a)&&(b[a]=r[a]);var M=arguments.length-2;if(M===1)b.children=o;else if(1>>1,At=pt[J];if(0>>1;Jb(G,Rt))ttb(Et,G)?(pt[J]=Et,pt[tt]=Rt,J=tt):(pt[J]=G,pt[N]=Rt,J=N);else if(ttb(Et,Rt))pt[J]=Et,pt[tt]=Rt,J=tt;else break t}}return Bt}function b(pt,Bt){var Rt=pt.sortIndex-Bt.sortIndex;return Rt!==0?Rt:pt.id-Bt.id}if(typeof performance=="object"&&typeof performance.now=="function"){var I=performance;e.unstable_now=function(){return I.now()}}else{var P=Date,M=P.now();e.unstable_now=function(){return P.now()-M}}var l=[],v=[],z=1,s=null,E=3,k=!1,y=!1,O=!1,u=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(pt){for(var Bt=o(v);Bt!==null;){if(Bt.callback===null)a(v);else if(Bt.startTime<=pt)a(v),Bt.sortIndex=Bt.expirationTime,r(l,Bt);else break;Bt=o(v)}}function h(pt){if(O=!1,f(pt),!y)if(o(l)!==null)y=!0,ut(A);else{var Bt=o(v);Bt!==null&&Ut(h,Bt.startTime-pt)}}function A(pt,Bt){y=!1,O&&(O=!1,m(R),R=-1),k=!0;var Rt=E;try{for(f(Bt),s=o(l);s!==null&&(!(s.expirationTime>Bt)||pt&&!x());){var J=s.callback;if(typeof J=="function"){s.callback=null,E=s.priorityLevel;var At=J(s.expirationTime<=Bt);Bt=e.unstable_now(),typeof At=="function"?s.callback=At:s===o(l)&&a(l),f(Bt)}else a(l);s=o(l)}if(s!==null)var c=!0;else{var N=o(v);N!==null&&Ut(h,N.startTime-Bt),c=!1}return c}finally{s=null,E=Rt,k=!1}}var g=!1,w=null,R=-1,S=5,C=-1;function x(){return!(e.unstable_now()-Cpt||125J?(pt.sortIndex=Rt,r(v,pt),o(l)===null&&pt===o(v)&&(O?(m(R),R=-1):O=!0,Ut(h,Rt-J))):(pt.sortIndex=At,r(l,pt),y||k||(y=!0,ut(A))),pt},e.unstable_shouldYield=x,e.unstable_wrapCallback=function(pt){var Bt=E;return function(){var Rt=E;E=Bt;try{return pt.apply(this,arguments)}finally{E=Rt}}}})(Sy);wy.exports=Sy;var Mv=wy.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vv=Lr,Bi=Mv;function xr(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=Object.prototype.hasOwnProperty,zv=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wd={},Xd={};function qv(e){return Sf.call(Xd,e)?!0:Sf.call(Wd,e)?!1:zv.test(e)?Xd[e]=!0:(Wd[e]=!0,!1)}function Hv(e,r,o,a){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return a?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Gv(e,r,o,a){if(r===null||typeof r>"u"||Hv(e,r,o,a))return!0;if(a)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function vi(e,r,o,a,b,I,P){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=a,this.attributeNamespace=b,this.mustUseProperty=o,this.propertyName=e,this.type=r,this.sanitizeURL=I,this.removeEmptyString=P}var ri={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ri[e]=new vi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];ri[r]=new vi(r,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ri[e]=new vi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ri[e]=new vi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ri[e]=new vi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ri[e]=new vi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ri[e]=new vi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ri[e]=new vi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ri[e]=new vi(e,5,!1,e.toLowerCase(),null,!1,!1)});var bp=/[\-:]([a-z])/g;function wp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(bp,wp);ri[r]=new vi(r,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(bp,wp);ri[r]=new vi(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(bp,wp);ri[r]=new vi(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ri[e]=new vi(e,1,!1,e.toLowerCase(),null,!1,!1)});ri.xlinkHref=new vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ri[e]=new vi(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sp(e,r,o,a){var b=ri.hasOwnProperty(r)?ri[r]:null;(b!==null?b.type!==0:a||!(2M||b[P]!==I[M]){var l=` +`+b[P].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=P&&0<=M);break}}}finally{Kl=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?du(e):""}function Wv(e){switch(e.tag){case 5:return du(e.type);case 16:return du("Lazy");case 13:return du("Suspense");case 19:return du("SuspenseList");case 0:case 2:case 15:return e=Zl(e.type,!1),e;case 11:return e=Zl(e.type.render,!1),e;case 1:return e=Zl(e.type,!0),e;default:return""}}function Tf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bs:return"Fragment";case vs:return"Portal";case Af:return"Profiler";case Ap:return"StrictMode";case Ef:return"Suspense";case kf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ky:return(e.displayName||"Context")+".Consumer";case Ey:return(e._context.displayName||"Context")+".Provider";case Ep:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case kp:return r=e.displayName||null,r!==null?r:Tf(e.type)||"Memo";case Pa:r=e._payload,e=e._init;try{return Tf(e(r))}catch{}}return null}function Xv(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Tf(r);case 8:return r===Ap?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Ha(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xy(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Kv(e){var r=xy(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),a=""+e[r];if(!e.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var b=o.get,I=o.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return b.call(this)},set:function(P){a=""+P,I.call(this,P)}}),Object.defineProperty(e,r,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(P){a=""+P},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function cc(e){e._valueTracker||(e._valueTracker=Kv(e))}function Oy(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var o=r.getValue(),a="";return e&&(a=xy(e)?e.checked?"true":"false":e.value),e=a,e!==o?(r.setValue(e),!0):!1}function Lc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xf(e,r){var o=r.checked;return ko({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Zd(e,r){var o=r.defaultValue==null?"":r.defaultValue,a=r.checked!=null?r.checked:r.defaultChecked;o=Ha(r.value!=null?r.value:o),e._wrapperState={initialChecked:a,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function _y(e,r){r=r.checked,r!=null&&Sp(e,"checked",r,!1)}function Of(e,r){_y(e,r);var o=Ha(r.value),a=r.type;if(o!=null)a==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?_f(e,r.type,o):r.hasOwnProperty("defaultValue")&&_f(e,r.type,Ha(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function $d(e,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var a=r.type;if(!(a!=="submit"&&a!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,o||r===e.value||(e.value=r),e.defaultValue=r}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function _f(e,r,o){(r!=="number"||Lc(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var hu=Array.isArray;function Rs(e,r,o,a){if(e=e.options,r){r={};for(var b=0;b"+r.valueOf().toString()+"",r=lc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Ou(e,r){if(r){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=r;return}}e.textContent=r}var gu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zv=["Webkit","ms","Moz","O"];Object.keys(gu).forEach(function(e){Zv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),gu[r]=gu[e]})});function Iy(e,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||gu.hasOwnProperty(e)&&gu[e]?(""+r).trim():r+"px"}function By(e,r){e=e.style;for(var o in r)if(r.hasOwnProperty(o)){var a=o.indexOf("--")===0,b=Iy(o,r[o],a);o==="float"&&(o="cssFloat"),a?e.setProperty(o,b):e[o]=b}}var $v=ko({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Cf(e,r){if(r){if($v[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(xr(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(xr(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(xr(61))}if(r.style!=null&&typeof r.style!="object")throw Error(xr(62))}}function If(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bf=null;function Tp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jf=null,Cs=null,Is=null;function Jd(e){if(e=Ku(e)){if(typeof jf!="function")throw Error(xr(280));var r=e.stateNode;r&&(r=pl(r),jf(e.stateNode,e.type,r))}}function jy(e){Cs?Is?Is.push(e):Is=[e]:Cs=e}function Ny(){if(Cs){var e=Cs,r=Is;if(Is=Cs=null,Jd(e),r)for(e=0;e>>=0,e===0?32:31-(sb(e)/ub|0)|0}var fc=64,pc=4194304;function yu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vc(e,r){var o=e.pendingLanes;if(o===0)return 0;var a=0,b=e.suspendedLanes,I=e.pingedLanes,P=o&268435455;if(P!==0){var M=P&~b;M!==0?a=yu(M):(I&=P,I!==0&&(a=yu(I)))}else P=o&~b,P!==0?a=yu(P):I!==0&&(a=yu(I));if(a===0)return 0;if(r!==0&&r!==a&&!(r&b)&&(b=a&-a,I=r&-r,b>=I||b===16&&(I&4194240)!==0))return r;if(a&4&&(a|=o&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=a;0o;o++)r.push(e);return r}function Wu(e,r,o){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-$i(r),e[r]=o}function pb(e,r){var o=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0=bu),uh=" ",ch=!1;function em(e,r){switch(e){case"keyup":return Mb.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ws=!1;function zb(e,r){switch(e){case"compositionend":return rm(r);case"keypress":return r.which!==32?null:(ch=!0,uh);case"textInput":return e=r.data,e===uh&&ch?null:e;default:return null}}function qb(e,r){if(ws)return e==="compositionend"||!Bp&&em(e,r)?(e=Jy(),Oc=Rp=Ba=null,ws=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:o,offset:r-e};e=a}t:{for(;o;){if(o.nextSibling){o=o.nextSibling;break t}o=o.parentNode}o=void 0}o=dh(o)}}function am(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?am(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function sm(){for(var e=window,r=Lc();r instanceof e.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)e=r.contentWindow;else break;r=Lc(e.document)}return r}function jp(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function Yb(e){var r=sm(),o=e.focusedElem,a=e.selectionRange;if(r!==o&&o&&o.ownerDocument&&am(o.ownerDocument.documentElement,o)){if(a!==null&&jp(o)){if(r=a.start,e=a.end,e===void 0&&(e=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(e,o.value.length);else if(e=(r=o.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var b=o.textContent.length,I=Math.min(a.start,b);a=a.end===void 0?I:Math.min(a.end,b),!e.extend&&I>a&&(b=a,a=I,I=b),b=hh(o,I);var P=hh(o,a);b&&P&&(e.rangeCount!==1||e.anchorNode!==b.node||e.anchorOffset!==b.offset||e.focusNode!==P.node||e.focusOffset!==P.offset)&&(r=r.createRange(),r.setStart(b.node,b.offset),e.removeAllRanges(),I>a?(e.addRange(r),e.extend(P.node,P.offset)):(r.setEnd(P.node,P.offset),e.addRange(r)))}}for(r=[],e=o;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Ss=null,Mf=null,Su=null,Vf=!1;function yh(e,r,o){var a=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Vf||Ss==null||Ss!==Lc(a)||(a=Ss,"selectionStart"in a&&jp(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Su&&Bu(Su,a)||(Su=a,a=Hc(Mf,"onSelect"),0ks||(e.current=Xf[ks],Xf[ks]=null,ks--)}function oo(e,r){ks++,Xf[ks]=e.current,e.current=r}var Ga={},fi=Xa(Ga),Ei=Xa(!1),is=Ga;function Ls(e,r){var o=e.type.contextTypes;if(!o)return Ga;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===r)return a.__reactInternalMemoizedMaskedChildContext;var b={},I;for(I in o)b[I]=r[I];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=b),b}function ki(e){return e=e.childContextTypes,e!=null}function Wc(){ho(Ei),ho(fi)}function Ah(e,r,o){if(fi.current!==Ga)throw Error(xr(168));oo(fi,r),oo(Ei,o)}function mm(e,r,o){var a=e.stateNode;if(r=r.childContextTypes,typeof a.getChildContext!="function")return o;a=a.getChildContext();for(var b in a)if(!(b in r))throw Error(xr(108,Xv(e)||"Unknown",b));return ko({},o,a)}function Xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ga,is=fi.current,oo(fi,e),oo(Ei,Ei.current),!0}function Eh(e,r,o){var a=e.stateNode;if(!a)throw Error(xr(169));o?(e=mm(e,r,is),a.__reactInternalMemoizedMergedChildContext=e,ho(Ei),ho(fi),oo(fi,e)):ho(Ei),oo(Ei,o)}var da=null,dl=!1,lf=!1;function gm(e){da===null?da=[e]:da.push(e)}function l0(e){dl=!0,gm(e)}function Ka(){if(!lf&&da!==null){lf=!0;var e=0,r=Zn;try{var o=da;for(Zn=1;e>=P,b-=P,ha=1<<32-$i(r)+b|o<R?(S=w,w=null):S=w.sibling;var C=E(m,w,f[R],h);if(C===null){w===null&&(w=S);break}e&&w&&C.alternate===null&&r(m,w),p=I(C,p,R),g===null?A=C:g.sibling=C,g=C,w=S}if(R===f.length)return o(m,w),mo&&Qa(m,R),A;if(w===null){for(;RR?(S=w,w=null):S=w.sibling;var x=E(m,w,C.value,h);if(x===null){w===null&&(w=S);break}e&&w&&x.alternate===null&&r(m,w),p=I(x,p,R),g===null?A=x:g.sibling=x,g=x,w=S}if(C.done)return o(m,w),mo&&Qa(m,R),A;if(w===null){for(;!C.done;R++,C=f.next())C=s(m,C.value,h),C!==null&&(p=I(C,p,R),g===null?A=C:g.sibling=C,g=C);return mo&&Qa(m,R),A}for(w=a(m,w);!C.done;R++,C=f.next())C=k(w,m,R,C.value,h),C!==null&&(e&&C.alternate!==null&&w.delete(C.key===null?R:C.key),p=I(C,p,R),g===null?A=C:g.sibling=C,g=C);return e&&w.forEach(function(ot){return r(m,ot)}),mo&&Qa(m,R),A}function u(m,p,f,h){if(typeof f=="object"&&f!==null&&f.type===bs&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case uc:t:{for(var A=f.key,g=p;g!==null;){if(g.key===A){if(A=f.type,A===bs){if(g.tag===7){o(m,g.sibling),p=b(g,f.props.children),p.return=m,m=p;break t}}else if(g.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Pa&&xh(A)===g.type){o(m,g.sibling),p=b(g,f.props),p.ref=lu(m,g,f),p.return=m,m=p;break t}o(m,g);break}else r(m,g);g=g.sibling}f.type===bs?(p=ns(f.props.children,m.mode,h,f.key),p.return=m,m=p):(h=Nc(f.type,f.key,f.props,null,m.mode,h),h.ref=lu(m,p,f),h.return=m,m=h)}return P(m);case vs:t:{for(g=f.key;p!==null;){if(p.key===g)if(p.tag===4&&p.stateNode.containerInfo===f.containerInfo&&p.stateNode.implementation===f.implementation){o(m,p.sibling),p=b(p,f.children||[]),p.return=m,m=p;break t}else{o(m,p);break}else r(m,p);p=p.sibling}p=vf(f,m.mode,h),p.return=m,m=p}return P(m);case Pa:return g=f._init,u(m,p,g(f._payload),h)}if(hu(f))return y(m,p,f,h);if(iu(f))return O(m,p,f,h);bc(m,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,p!==null&&p.tag===6?(o(m,p.sibling),p=b(p,f),p.return=m,m=p):(o(m,p),p=gf(f,m.mode,h),p.return=m,m=p),P(m)):o(m,p)}return u}var Ds=Sm(!0),Am=Sm(!1),$c=Xa(null),Qc=null,Os=null,Fp=null;function Dp(){Fp=Os=Qc=null}function Mp(e){var r=$c.current;ho($c),e._currentValue=r}function $f(e,r,o){for(;e!==null;){var a=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,a!==null&&(a.childLanes|=r)):a!==null&&(a.childLanes&r)!==r&&(a.childLanes|=r),e===o)break;e=e.return}}function js(e,r){Qc=e,Fp=Os=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&r&&(Ai=!0),e.firstContext=null)}function zi(e){var r=e._currentValue;if(Fp!==e)if(e={context:e,memoizedValue:r,next:null},Os===null){if(Qc===null)throw Error(xr(308));Os=e,Qc.dependencies={lanes:0,firstContext:e}}else Os=Os.next=e;return r}var ts=null;function Vp(e){ts===null?ts=[e]:ts.push(e)}function Em(e,r,o,a){var b=r.interleaved;return b===null?(o.next=o,Vp(r)):(o.next=b.next,b.next=o),r.interleaved=o,ba(e,a)}function ba(e,r){e.lanes|=r;var o=e.alternate;for(o!==null&&(o.lanes|=r),o=e,e=e.return;e!==null;)e.childLanes|=r,o=e.alternate,o!==null&&(o.childLanes|=r),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Ra=!1;function zp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function km(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ma(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Ma(e,r,o){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,Ln&2){var b=a.pending;return b===null?r.next=r:(r.next=b.next,b.next=r),a.pending=r,ba(e,o)}return b=a.interleaved,b===null?(r.next=r,Vp(a)):(r.next=b.next,b.next=r),a.interleaved=r,ba(e,o)}function Pc(e,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var a=r.lanes;a&=e.pendingLanes,o|=a,r.lanes=o,Op(e,o)}}function Oh(e,r){var o=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,o===a)){var b=null,I=null;if(o=o.firstBaseUpdate,o!==null){do{var P={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};I===null?b=I=P:I=I.next=P,o=o.next}while(o!==null);I===null?b=I=r:I=I.next=r}else b=I=r;o={baseState:a.baseState,firstBaseUpdate:b,lastBaseUpdate:I,shared:a.shared,effects:a.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=r:e.next=r,o.lastBaseUpdate=r}function Yc(e,r,o,a){var b=e.updateQueue;Ra=!1;var I=b.firstBaseUpdate,P=b.lastBaseUpdate,M=b.shared.pending;if(M!==null){b.shared.pending=null;var l=M,v=l.next;l.next=null,P===null?I=v:P.next=v,P=l;var z=e.alternate;z!==null&&(z=z.updateQueue,M=z.lastBaseUpdate,M!==P&&(M===null?z.firstBaseUpdate=v:M.next=v,z.lastBaseUpdate=l))}if(I!==null){var s=b.baseState;P=0,z=v=l=null,M=I;do{var E=M.lane,k=M.eventTime;if((a&E)===E){z!==null&&(z=z.next={eventTime:k,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});t:{var y=e,O=M;switch(E=r,k=o,O.tag){case 1:if(y=O.payload,typeof y=="function"){s=y.call(k,s,E);break t}s=y;break t;case 3:y.flags=y.flags&-65537|128;case 0:if(y=O.payload,E=typeof y=="function"?y.call(k,s,E):y,E==null)break t;s=ko({},s,E);break t;case 2:Ra=!0}}M.callback!==null&&M.lane!==0&&(e.flags|=64,E=b.effects,E===null?b.effects=[M]:E.push(M))}else k={eventTime:k,lane:E,tag:M.tag,payload:M.payload,callback:M.callback,next:null},z===null?(v=z=k,l=s):z=z.next=k,P|=E;if(M=M.next,M===null){if(M=b.shared.pending,M===null)break;E=M,M=E.next,E.next=null,b.lastBaseUpdate=E,b.shared.pending=null}}while(!0);if(z===null&&(l=s),b.baseState=l,b.firstBaseUpdate=v,b.lastBaseUpdate=z,r=b.shared.interleaved,r!==null){b=r;do P|=b.lane,b=b.next;while(b!==r)}else I===null&&(b.shared.lanes=0);us|=P,e.lanes=P,e.memoizedState=s}}function _h(e,r,o){if(e=r.effects,r.effects=null,e!==null)for(r=0;ro?o:4,e(!0);var a=pf.transition;pf.transition={};try{e(!1),r()}finally{Zn=o,pf.transition=a}}function Vm(){return qi().memoizedState}function h0(e,r,o){var a=za(e);if(o={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null},zm(e))qm(r,o);else if(o=Em(e,r,o,a),o!==null){var b=mi();Qi(o,e,a,b),Hm(o,r,a)}}function y0(e,r,o){var a=za(e),b={lane:a,action:o,hasEagerState:!1,eagerState:null,next:null};if(zm(e))qm(r,b);else{var I=e.alternate;if(e.lanes===0&&(I===null||I.lanes===0)&&(I=r.lastRenderedReducer,I!==null))try{var P=r.lastRenderedState,M=I(P,o);if(b.hasEagerState=!0,b.eagerState=M,Yi(M,P)){var l=r.interleaved;l===null?(b.next=b,Vp(r)):(b.next=l.next,l.next=b),r.interleaved=b;return}}catch{}finally{}o=Em(e,r,b,a),o!==null&&(b=mi(),Qi(o,e,a,b),Hm(o,r,a))}}function zm(e){var r=e.alternate;return e===Eo||r!==null&&r===Eo}function qm(e,r){Au=tl=!0;var o=e.pending;o===null?r.next=r:(r.next=o.next,o.next=r),e.pending=r}function Hm(e,r,o){if(o&4194240){var a=r.lanes;a&=e.pendingLanes,o|=a,r.lanes=o,Op(e,o)}}var el={readContext:zi,useCallback:ui,useContext:ui,useEffect:ui,useImperativeHandle:ui,useInsertionEffect:ui,useLayoutEffect:ui,useMemo:ui,useReducer:ui,useRef:ui,useState:ui,useDebugValue:ui,useDeferredValue:ui,useTransition:ui,useMutableSource:ui,useSyncExternalStore:ui,useId:ui,unstable_isNewReconciler:!1},m0={readContext:zi,useCallback:function(e,r){return aa().memoizedState=[e,r===void 0?null:r],e},useContext:zi,useEffect:Rh,useImperativeHandle:function(e,r,o){return o=o!=null?o.concat([e]):null,Cc(4194308,4,Um.bind(null,r,e),o)},useLayoutEffect:function(e,r){return Cc(4194308,4,e,r)},useInsertionEffect:function(e,r){return Cc(4,2,e,r)},useMemo:function(e,r){var o=aa();return r=r===void 0?null:r,e=e(),o.memoizedState=[e,r],e},useReducer:function(e,r,o){var a=aa();return r=o!==void 0?o(r):r,a.memoizedState=a.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=h0.bind(null,Eo,e),[a.memoizedState,e]},useRef:function(e){var r=aa();return e={current:e},r.memoizedState=e},useState:Ph,useDebugValue:$p,useDeferredValue:function(e){return aa().memoizedState=e},useTransition:function(){var e=Ph(!1),r=e[0];return e=d0.bind(null,e[1]),aa().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,o){var a=Eo,b=aa();if(mo){if(o===void 0)throw Error(xr(407));o=o()}else{if(o=r(),$o===null)throw Error(xr(349));ss&30||_m(a,r,o)}b.memoizedState=o;var I={value:o,getSnapshot:r};return b.queue=I,Rh(Rm.bind(null,a,I,e),[e]),a.flags|=2048,Vu(9,Pm.bind(null,a,I,o,r),void 0,null),o},useId:function(){var e=aa(),r=$o.identifierPrefix;if(mo){var o=ya,a=ha;o=(a&~(1<<32-$i(a)-1)).toString(32)+o,r=":"+r+"R"+o,o=Du++,0<\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=P.createElement(o,{is:a.is}):(e=P.createElement(o),o==="select"&&(P=e,a.multiple?P.multiple=!0:a.size&&(P.size=a.size))):e=P.createElementNS(e,o),e[sa]=r,e[Uu]=a,tg(e,r,!1,!1),r.stateNode=e;t:{switch(P=If(o,a),o){case"dialog":po("cancel",e),po("close",e),b=a;break;case"iframe":case"object":case"embed":po("load",e),b=a;break;case"video":case"audio":for(b=0;bzs&&(r.flags|=128,a=!0,fu(I,!1),r.lanes=4194304)}else{if(!a)if(e=Jc(P),e!==null){if(r.flags|=128,a=!0,o=e.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),fu(I,!0),I.tail===null&&I.tailMode==="hidden"&&!P.alternate&&!mo)return ci(r),null}else 2*Io()-I.renderingStartTime>zs&&o!==1073741824&&(r.flags|=128,a=!0,fu(I,!1),r.lanes=4194304);I.isBackwards?(P.sibling=r.child,r.child=P):(o=I.last,o!==null?o.sibling=P:r.child=P,I.last=P)}return I.tail!==null?(r=I.tail,I.rendering=r,I.tail=r.sibling,I.renderingStartTime=Io(),r.sibling=null,o=Ao.current,oo(Ao,a?o&1|2:o&1),r):(ci(r),null);case 22:case 23:return rd(),a=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(r.flags|=8192),a&&r.mode&1?Ri&1073741824&&(ci(r),r.subtreeFlags&6&&(r.flags|=8192)):ci(r),null;case 24:return null;case 25:return null}throw Error(xr(156,r.tag))}function k0(e,r){switch(Up(r),r.tag){case 1:return ki(r.type)&&Wc(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return Ms(),ho(Ei),ho(fi),Gp(),e=r.flags,e&65536&&!(e&128)?(r.flags=e&-65537|128,r):null;case 5:return Hp(r),null;case 13:if(ho(Ao),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(xr(340));Fs()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return ho(Ao),null;case 4:return Ms(),null;case 10:return Mp(r.type._context),null;case 22:case 23:return rd(),null;case 24:return null;default:return null}}var Sc=!1,li=!1,T0=typeof WeakSet=="function"?WeakSet:Set,Gr=null;function _s(e,r){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(a){_o(e,r,a)}else o.current=null}function ip(e,r,o){try{o()}catch(a){_o(e,r,a)}}var Vh=!1;function x0(e,r){if(zf=zc,e=sm(),jp(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else t:{o=(o=e.ownerDocument)&&o.defaultView||window;var a=o.getSelection&&o.getSelection();if(a&&a.rangeCount!==0){o=a.anchorNode;var b=a.anchorOffset,I=a.focusNode;a=a.focusOffset;try{o.nodeType,I.nodeType}catch{o=null;break t}var P=0,M=-1,l=-1,v=0,z=0,s=e,E=null;e:for(;;){for(var k;s!==o||b!==0&&s.nodeType!==3||(M=P+b),s!==I||a!==0&&s.nodeType!==3||(l=P+a),s.nodeType===3&&(P+=s.nodeValue.length),(k=s.firstChild)!==null;)E=s,s=k;for(;;){if(s===e)break e;if(E===o&&++v===b&&(M=P),E===I&&++z===a&&(l=P),(k=s.nextSibling)!==null)break;s=E,E=s.parentNode}s=k}o=M===-1||l===-1?null:{start:M,end:l}}else o=null}o=o||{start:0,end:0}}else o=null;for(qf={focusedElem:e,selectionRange:o},zc=!1,Gr=r;Gr!==null;)if(r=Gr,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,Gr=e;else for(;Gr!==null;){r=Gr;try{var y=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var O=y.memoizedProps,u=y.memoizedState,m=r.stateNode,p=m.getSnapshotBeforeUpdate(r.elementType===r.type?O:Xi(r.type,O),u);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var f=r.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xr(163))}}catch(h){_o(r,r.return,h)}if(e=r.sibling,e!==null){e.return=r.return,Gr=e;break}Gr=r.return}return y=Vh,Vh=!1,y}function Eu(e,r,o){var a=r.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var b=a=a.next;do{if((b.tag&e)===e){var I=b.destroy;b.destroy=void 0,I!==void 0&&ip(r,o,I)}b=b.next}while(b!==a)}}function ml(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var a=o.create;o.destroy=a()}o=o.next}while(o!==r)}}function ap(e){var r=e.ref;if(r!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof r=="function"?r(e):r.current=e}}function ng(e){var r=e.alternate;r!==null&&(e.alternate=null,ng(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[sa],delete r[Uu],delete r[Wf],delete r[u0],delete r[c0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function og(e){return e.tag===5||e.tag===3||e.tag===4}function zh(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||og(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sp(e,r,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(e,r):o.insertBefore(e,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(e,o)):(r=o,r.appendChild(e)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Gc));else if(a!==4&&(e=e.child,e!==null))for(sp(e,r,o),e=e.sibling;e!==null;)sp(e,r,o),e=e.sibling}function up(e,r,o){var a=e.tag;if(a===5||a===6)e=e.stateNode,r?o.insertBefore(e,r):o.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(up(e,r,o),e=e.sibling;e!==null;)up(e,r,o),e=e.sibling}var ti=null,Ki=!1;function _a(e,r,o){for(o=o.child;o!==null;)ig(e,r,o),o=o.sibling}function ig(e,r,o){if(ua&&typeof ua.onCommitFiberUnmount=="function")try{ua.onCommitFiberUnmount(ul,o)}catch{}switch(o.tag){case 5:li||_s(o,r);case 6:var a=ti,b=Ki;ti=null,_a(e,r,o),ti=a,Ki=b,ti!==null&&(Ki?(e=ti,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):ti.removeChild(o.stateNode));break;case 18:ti!==null&&(Ki?(e=ti,o=o.stateNode,e.nodeType===8?cf(e.parentNode,o):e.nodeType===1&&cf(e,o),Cu(e)):cf(ti,o.stateNode));break;case 4:a=ti,b=Ki,ti=o.stateNode.containerInfo,Ki=!0,_a(e,r,o),ti=a,Ki=b;break;case 0:case 11:case 14:case 15:if(!li&&(a=o.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){b=a=a.next;do{var I=b,P=I.destroy;I=I.tag,P!==void 0&&(I&2||I&4)&&ip(o,r,P),b=b.next}while(b!==a)}_a(e,r,o);break;case 1:if(!li&&(_s(o,r),a=o.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(M){_o(o,r,M)}_a(e,r,o);break;case 21:_a(e,r,o);break;case 22:o.mode&1?(li=(a=li)||o.memoizedState!==null,_a(e,r,o),li=a):_a(e,r,o);break;default:_a(e,r,o)}}function qh(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new T0),r.forEach(function(a){var b=N0.bind(null,e,a);o.has(a)||(o.add(a),a.then(b,b))})}}function Wi(e,r){var o=r.deletions;if(o!==null)for(var a=0;ab&&(b=P),a&=~I}if(a=b,a=Io()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*_0(a/1960))-a,10e?16:e,ja===null)var a=!1;else{if(e=ja,ja=null,ol=0,Ln&6)throw Error(xr(331));var b=Ln;for(Ln|=4,Gr=e.current;Gr!==null;){var I=Gr,P=I.child;if(Gr.flags&16){var M=I.deletions;if(M!==null){for(var l=0;lIo()-td?rs(e,0):Jp|=o),Ti(e,r)}function dg(e,r){r===0&&(e.mode&1?(r=pc,pc<<=1,!(pc&130023424)&&(pc=4194304)):r=1);var o=mi();e=ba(e,r),e!==null&&(Wu(e,r,o),Ti(e,o))}function j0(e){var r=e.memoizedState,o=0;r!==null&&(o=r.retryLane),dg(e,o)}function N0(e,r){var o=0;switch(e.tag){case 13:var a=e.stateNode,b=e.memoizedState;b!==null&&(o=b.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(xr(314))}a!==null&&a.delete(r),dg(e,o)}var hg;hg=function(e,r,o){if(e!==null)if(e.memoizedProps!==r.pendingProps||Ei.current)Ai=!0;else{if(!(e.lanes&o)&&!(r.flags&128))return Ai=!1,A0(e,r,o);Ai=!!(e.flags&131072)}else Ai=!1,mo&&r.flags&1048576&&vm(r,Zc,r.index);switch(r.lanes=0,r.tag){case 2:var a=r.type;Ic(e,r),e=r.pendingProps;var b=Ls(r,fi.current);js(r,o),b=Xp(null,r,a,e,b,o);var I=Kp();return r.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,ki(a)?(I=!0,Xc(r)):I=!1,r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,zp(r),b.updater=yl,r.stateNode=b,b._reactInternals=r,Yf(r,a,e,o),r=ep(null,r,a,!0,I,o)):(r.tag=0,mo&&I&&Np(r),yi(null,r,b,o),r=r.child),r;case 16:a=r.elementType;t:{switch(Ic(e,r),e=r.pendingProps,b=a._init,a=b(a._payload),r.type=a,b=r.tag=L0(a),e=Xi(a,e),b){case 0:r=tp(null,r,a,e,o);break t;case 1:r=Fh(null,r,a,e,o);break t;case 11:r=Uh(null,r,a,e,o);break t;case 14:r=Lh(null,r,a,Xi(a.type,e),o);break t}throw Error(xr(306,a,""))}return r;case 0:return a=r.type,b=r.pendingProps,b=r.elementType===a?b:Xi(a,b),tp(e,r,a,b,o);case 1:return a=r.type,b=r.pendingProps,b=r.elementType===a?b:Xi(a,b),Fh(e,r,a,b,o);case 3:t:{if(Qm(r),e===null)throw Error(xr(387));a=r.pendingProps,I=r.memoizedState,b=I.element,km(e,r),Yc(r,a,null,o);var P=r.memoizedState;if(a=P.element,I.isDehydrated)if(I={element:a,isDehydrated:!1,cache:P.cache,pendingSuspenseBoundaries:P.pendingSuspenseBoundaries,transitions:P.transitions},r.updateQueue.baseState=I,r.memoizedState=I,r.flags&256){b=Vs(Error(xr(423)),r),r=Dh(e,r,a,o,b);break t}else if(a!==b){b=Vs(Error(xr(424)),r),r=Dh(e,r,a,o,b);break t}else for(Ci=Da(r.stateNode.containerInfo.firstChild),Ii=r,mo=!0,Zi=null,o=Am(r,null,a,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Fs(),a===b){r=wa(e,r,o);break t}yi(e,r,a,o)}r=r.child}return r;case 5:return Tm(r),e===null&&Zf(r),a=r.type,b=r.pendingProps,I=e!==null?e.memoizedProps:null,P=b.children,Hf(a,b)?P=null:I!==null&&Hf(a,I)&&(r.flags|=32),$m(e,r),yi(e,r,P,o),r.child;case 6:return e===null&&Zf(r),null;case 13:return Ym(e,r,o);case 4:return qp(r,r.stateNode.containerInfo),a=r.pendingProps,e===null?r.child=Ds(r,null,a,o):yi(e,r,a,o),r.child;case 11:return a=r.type,b=r.pendingProps,b=r.elementType===a?b:Xi(a,b),Uh(e,r,a,b,o);case 7:return yi(e,r,r.pendingProps,o),r.child;case 8:return yi(e,r,r.pendingProps.children,o),r.child;case 12:return yi(e,r,r.pendingProps.children,o),r.child;case 10:t:{if(a=r.type._context,b=r.pendingProps,I=r.memoizedProps,P=b.value,oo($c,a._currentValue),a._currentValue=P,I!==null)if(Yi(I.value,P)){if(I.children===b.children&&!Ei.current){r=wa(e,r,o);break t}}else for(I=r.child,I!==null&&(I.return=r);I!==null;){var M=I.dependencies;if(M!==null){P=I.child;for(var l=M.firstContext;l!==null;){if(l.context===a){if(I.tag===1){l=ma(-1,o&-o),l.tag=2;var v=I.updateQueue;if(v!==null){v=v.shared;var z=v.pending;z===null?l.next=l:(l.next=z.next,z.next=l),v.pending=l}}I.lanes|=o,l=I.alternate,l!==null&&(l.lanes|=o),$f(I.return,o,r),M.lanes|=o;break}l=l.next}}else if(I.tag===10)P=I.type===r.type?null:I.child;else if(I.tag===18){if(P=I.return,P===null)throw Error(xr(341));P.lanes|=o,M=P.alternate,M!==null&&(M.lanes|=o),$f(P,o,r),P=I.sibling}else P=I.child;if(P!==null)P.return=I;else for(P=I;P!==null;){if(P===r){P=null;break}if(I=P.sibling,I!==null){I.return=P.return,P=I;break}P=P.return}I=P}yi(e,r,b.children,o),r=r.child}return r;case 9:return b=r.type,a=r.pendingProps.children,js(r,o),b=zi(b),a=a(b),r.flags|=1,yi(e,r,a,o),r.child;case 14:return a=r.type,b=Xi(a,r.pendingProps),b=Xi(a.type,b),Lh(e,r,a,b,o);case 15:return Km(e,r,r.type,r.pendingProps,o);case 17:return a=r.type,b=r.pendingProps,b=r.elementType===a?b:Xi(a,b),Ic(e,r),r.tag=1,ki(a)?(e=!0,Xc(r)):e=!1,js(r,o),Gm(r,a,b),Yf(r,a,b,o),ep(null,r,a,!0,e,o);case 19:return Jm(e,r,o);case 22:return Zm(e,r,o)}throw Error(xr(156,r.tag))};function yg(e,r){return zy(e,r)}function U0(e,r,o,a){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(e,r,o,a){return new U0(e,r,o,a)}function od(e){return e=e.prototype,!(!e||!e.isReactComponent)}function L0(e){if(typeof e=="function")return od(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ep)return 11;if(e===kp)return 14}return 2}function qa(e,r){var o=e.alternate;return o===null?(o=Mi(e.tag,r,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=r,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,r=e.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Nc(e,r,o,a,b,I){var P=2;if(a=e,typeof e=="function")od(e)&&(P=1);else if(typeof e=="string")P=5;else t:switch(e){case bs:return ns(o.children,b,I,r);case Ap:P=8,b|=8;break;case Af:return e=Mi(12,o,r,b|2),e.elementType=Af,e.lanes=I,e;case Ef:return e=Mi(13,o,r,b),e.elementType=Ef,e.lanes=I,e;case kf:return e=Mi(19,o,r,b),e.elementType=kf,e.lanes=I,e;case Ty:return vl(o,b,I,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ey:P=10;break t;case ky:P=9;break t;case Ep:P=11;break t;case kp:P=14;break t;case Pa:P=16,a=null;break t}throw Error(xr(130,e==null?e:typeof e,""))}return r=Mi(P,o,r,b),r.elementType=e,r.type=a,r.lanes=I,r}function ns(e,r,o,a){return e=Mi(7,e,a,r),e.lanes=o,e}function vl(e,r,o,a){return e=Mi(22,e,a,r),e.elementType=Ty,e.lanes=o,e.stateNode={isHidden:!1},e}function gf(e,r,o){return e=Mi(6,e,null,r),e.lanes=o,e}function vf(e,r,o){return r=Mi(4,e.children!==null?e.children:[],e.key,r),r.lanes=o,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function F0(e,r,o,a,b){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=a,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function id(e,r,o,a,b,I,P,M,l){return e=new F0(e,r,o,M,l),r===1?(r=1,I===!0&&(r|=8)):r=0,I=Mi(3,null,null,r),e.current=I,I.stateNode=e,I.memoizedState={element:a,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},zp(I),e}function D0(e,r,o){var a=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bg)}catch(e){console.error(e)}}bg(),by.exports=ji;var H0=by.exports,wg,Qh=H0;wg=Qh.createRoot,Qh.hydrateRoot;/** + * @remix-run/router v1.23.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function qu(){return qu=Object.assign?Object.assign.bind():function(e){for(var r=1;r"u")throw new Error(r)}function cd(e,r){if(!e){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function W0(){return Math.random().toString(36).substr(2,8)}function Jh(e,r){return{usr:e.state,key:e.key,idx:r}}function dp(e,r,o,a){return o===void 0&&(o=null),qu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof r=="string"?Ws(r):r,{state:o,key:r&&r.key||a||W0()})}function Sg(e){let{pathname:r="/",search:o="",hash:a=""}=e;return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function Ws(e){let r={};if(e){let o=e.indexOf("#");o>=0&&(r.hash=e.substr(o),e=e.substr(0,o));let a=e.indexOf("?");a>=0&&(r.search=e.substr(a),e=e.substr(0,a)),e&&(r.pathname=e)}return r}function X0(e,r,o,a){a===void 0&&(a={});let{window:b=document.defaultView,v5Compat:I=!1}=a,P=b.history,M=Na.Pop,l=null,v=z();v==null&&(v=0,P.replaceState(qu({},P.state,{idx:v}),""));function z(){return(P.state||{idx:null}).idx}function s(){M=Na.Pop;let u=z(),m=u==null?null:u-v;v=u,l&&l({action:M,location:O.location,delta:m})}function E(u,m){M=Na.Push;let p=dp(O.location,u,m);v=z()+1;let f=Jh(p,v),h=O.createHref(p);try{P.pushState(f,"",h)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;b.location.assign(h)}I&&l&&l({action:M,location:O.location,delta:1})}function k(u,m){M=Na.Replace;let p=dp(O.location,u,m);v=z();let f=Jh(p,v),h=O.createHref(p);P.replaceState(f,"",h),I&&l&&l({action:M,location:O.location,delta:0})}function y(u){let m=b.location.origin!=="null"?b.location.origin:b.location.href,p=typeof u=="string"?u:Sg(u);return p=p.replace(/ $/,"%20"),Fo(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let O={get action(){return M},get location(){return e(b,P)},listen(u){if(l)throw new Error("A history only accepts one active listener");return b.addEventListener(Yh,s),l=u,()=>{b.removeEventListener(Yh,s),l=null}},createHref(u){return r(b,u)},createURL:y,encodeLocation(u){let m=y(u);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:E,replace:k,go(u){return P.go(u)}};return O}var ty;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ty||(ty={}));function K0(e,r,o){return o===void 0&&(o="/"),Z0(e,r,o)}function Z0(e,r,o,a){let b=typeof r=="string"?Ws(r):r,I=kg(b.pathname||"/",o);if(I==null)return null;let P=Ag(e);$0(P);let M=null,l=uw(I);for(let v=0;M==null&&v{let l={relativePath:M===void 0?I.path||"":M,caseSensitive:I.caseSensitive===!0,childrenIndex:P,route:I};l.relativePath.startsWith("/")&&(Fo(l.relativePath.startsWith(a),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(a.length));let v=os([a,l.relativePath]),z=o.concat(l);I.children&&I.children.length>0&&(Fo(I.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),Ag(I.children,r,z,v)),!(I.path==null&&!I.index)&&r.push({path:v,score:nw(v,I.index),routesMeta:z})};return e.forEach((I,P)=>{var M;if(I.path===""||!((M=I.path)!=null&&M.includes("?")))b(I,P);else for(let l of Eg(I.path))b(I,P,l)}),r}function Eg(e){let r=e.split("/");if(r.length===0)return[];let[o,...a]=r,b=o.endsWith("?"),I=o.replace(/\?$/,"");if(a.length===0)return b?[I,""]:[I];let P=Eg(a.join("/")),M=[];return M.push(...P.map(l=>l===""?I:[I,l].join("/"))),b&&M.push(...P),M.map(l=>e.startsWith("/")&&l===""?"/":l)}function $0(e){e.sort((r,o)=>r.score!==o.score?o.score-r.score:ow(r.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}const Q0=/^:[\w-]+$/,Y0=3,J0=2,tw=1,ew=10,rw=-2,ey=e=>e==="*";function nw(e,r){let o=e.split("/"),a=o.length;return o.some(ey)&&(a+=rw),r&&(a+=J0),o.filter(b=>!ey(b)).reduce((b,I)=>b+(Q0.test(I)?Y0:I===""?tw:ew),a)}function ow(e,r){return e.length===r.length&&e.slice(0,-1).every((a,b)=>a===r[b])?e[e.length-1]-r[r.length-1]:0}function iw(e,r,o){let{routesMeta:a}=e,b={},I="/",P=[];for(let M=0;M{let{paramName:E,isOptional:k}=z;if(E==="*"){let O=M[s]||"";P=I.slice(0,I.length-O.length).replace(/(.)\/+$/,"$1")}const y=M[s];return k&&!y?v[E]=void 0:v[E]=(y||"").replace(/%2F/g,"/"),v},{}),pathname:I,pathnameBase:P,pattern:e}}function sw(e,r,o){r===void 0&&(r=!1),o===void 0&&(o=!0),cd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let a=[],b="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(P,M,l)=>(a.push({paramName:M,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),b+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?b+="\\/*$":e!==""&&e!=="/"&&(b+="(?:(?=\\/|$))"),[new RegExp(b,r?void 0:"i"),a]}function uw(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return cd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+r+").")),e}}function kg(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,a=e.charAt(o);return a&&a!=="/"?null:e.slice(o)||"/"}const cw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lw=e=>cw.test(e);function fw(e,r){r===void 0&&(r="/");let{pathname:o,search:a="",hash:b=""}=typeof e=="string"?Ws(e):e,I;if(o)if(lw(o))I=o;else{if(o.includes("//")){let P=o;o=Og(o),cd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(P+" -> "+o))}o.startsWith("/")?I=ry(o.substring(1),"/"):I=ry(o,r)}else I=r;return{pathname:I,search:hw(a),hash:yw(b)}}function ry(e,r){let o=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(b=>{b===".."?o.length>1&&o.pop():b!=="."&&o.push(b)}),o.length>1?o.join("/"):"/"}function bf(e,r,o,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+r+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+o+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function pw(e){return e.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Tg(e,r){let o=pw(e);return r?o.map((a,b)=>b===o.length-1?a.pathname:a.pathnameBase):o.map(a=>a.pathnameBase)}function xg(e,r,o,a){a===void 0&&(a=!1);let b;typeof e=="string"?b=Ws(e):(b=qu({},e),Fo(!b.pathname||!b.pathname.includes("?"),bf("?","pathname","search",b)),Fo(!b.pathname||!b.pathname.includes("#"),bf("#","pathname","hash",b)),Fo(!b.search||!b.search.includes("#"),bf("#","search","hash",b)));let I=e===""||b.pathname==="",P=I?"/":b.pathname,M;if(P==null)M=o;else{let s=r.length-1;if(!a&&P.startsWith("..")){let E=P.split("/");for(;E[0]==="..";)E.shift(),s-=1;b.pathname=E.join("/")}M=s>=0?r[s]:"/"}let l=fw(b,M),v=P&&P!=="/"&&P.endsWith("/"),z=(I||P===".")&&o.endsWith("/");return!l.pathname.endsWith("/")&&(v||z)&&(l.pathname+="/"),l}const Og=e=>e.replace(/\/\/+/g,"/"),os=e=>Og(e.join("/")),dw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function mw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const _g=["post","put","patch","delete"];new Set(_g);const gw=["get",..._g];new Set(gw);/** + * React Router v6.30.4 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var r=1;r{M.current=!0}),Lr.useCallback(function(v,z){if(z===void 0&&(z={}),!M.current)return;if(typeof v=="number"){a.go(v);return}let s=xg(v,JSON.parse(P),I,z.relative==="path");e==null&&r!=="/"&&(s.pathname=s.pathname==="/"?r:os([r,s.pathname])),(z.replace?a.replace:a.push)(s,z.state,z)},[r,a,P,I,e])}const Sw=Lr.createContext(null);function Aw(e){let r=Lr.useContext(Za).outlet;return r&&Lr.createElement(Sw.Provider,{value:e},r)}function Ew(e,r){return kw(e,r)}function kw(e,r,o,a){Qu()||Fo(!1);let{navigator:b}=Lr.useContext($u),{matches:I}=Lr.useContext(Za),P=I[I.length-1],M=P?P.params:{};P&&P.pathname;let l=P?P.pathnameBase:"/";P&&P.route;let v=fd(),z;if(r){var s;let u=typeof r=="string"?Ws(r):r;l==="/"||(s=u.pathname)!=null&&s.startsWith(l)||Fo(!1),z=u}else z=v;let E=z.pathname||"/",k=E;if(l!=="/"){let u=l.replace(/^\//,"").split("/");k="/"+E.replace(/^\//,"").split("/").slice(u.length).join("/")}let y=K0(e,{pathname:k}),O=Pw(y&&y.map(u=>Object.assign({},u,{params:Object.assign({},M,u.params),pathname:os([l,b.encodeLocation?b.encodeLocation(u.pathname).pathname:u.pathname]),pathnameBase:u.pathnameBase==="/"?l:os([l,b.encodeLocation?b.encodeLocation(u.pathnameBase).pathname:u.pathnameBase])})),I,o,a);return r&&O?Lr.createElement(El.Provider,{value:{location:Hu({pathname:"/",search:"",hash:"",state:null,key:"default"},z),navigationType:Na.Pop}},O):O}function Tw(){let e=Bw(),r=mw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),o=e instanceof Error?e.stack:null,b={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return Lr.createElement(Lr.Fragment,null,Lr.createElement("h2",null,"Unexpected Application Error!"),Lr.createElement("h3",{style:{fontStyle:"italic"}},r),o?Lr.createElement("pre",{style:b},o):null,null)}const xw=Lr.createElement(Tw,null);class Ow extends Lr.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){console.error("React Router caught the following error during render",r,o)}render(){return this.state.error!==void 0?Lr.createElement(Za.Provider,{value:this.props.routeContext},Lr.createElement(Pg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _w(e){let{routeContext:r,match:o,children:a}=e,b=Lr.useContext(ld);return b&&b.static&&b.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(b.staticContext._deepestRenderedBoundaryId=o.route.id),Lr.createElement(Za.Provider,{value:r},a)}function Pw(e,r,o,a){var b;if(r===void 0&&(r=[]),o===void 0&&(o=null),a===void 0&&(a=null),e==null){var I;if(!o)return null;if(o.errors)e=o.matches;else if((I=a)!=null&&I.v7_partialHydration&&r.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let P=e,M=(b=o)==null?void 0:b.errors;if(M!=null){let z=P.findIndex(s=>s.route.id&&(M==null?void 0:M[s.route.id])!==void 0);z>=0||Fo(!1),P=P.slice(0,Math.min(P.length,z+1))}let l=!1,v=-1;if(o&&a&&a.v7_partialHydration)for(let z=0;z=0?P=P.slice(0,v+1):P=[P[0]];break}}}return P.reduceRight((z,s,E)=>{let k,y=!1,O=null,u=null;o&&(k=M&&s.route.id?M[s.route.id]:void 0,O=s.route.errorElement||xw,l&&(v<0&&E===0?(Nw("route-fallback"),y=!0,u=null):v===E&&(y=!0,u=s.route.hydrateFallbackElement||null)));let m=r.concat(P.slice(0,E+1)),p=()=>{let f;return k?f=O:y?f=u:s.route.Component?f=Lr.createElement(s.route.Component,null):s.route.element?f=s.route.element:f=z,Lr.createElement(_w,{match:s,routeContext:{outlet:z,matches:m,isDataRoute:o!=null},children:f})};return o&&(s.route.ErrorBoundary||s.route.errorElement||E===0)?Lr.createElement(Ow,{location:o.location,revalidation:o.revalidation,component:O,error:k,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var Cg=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cg||{}),Ig=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ig||{});function Rw(e){let r=Lr.useContext(ld);return r||Fo(!1),r}function Cw(e){let r=Lr.useContext(vw);return r||Fo(!1),r}function Iw(e){let r=Lr.useContext(Za);return r||Fo(!1),r}function Bg(e){let r=Iw(),o=r.matches[r.matches.length-1];return o.route.id||Fo(!1),o.route.id}function Bw(){var e;let r=Lr.useContext(Pg),o=Cw(),a=Bg();return r!==void 0?r:(e=o.errors)==null?void 0:e[a]}function jw(){let{router:e}=Rw(Cg.UseNavigateStable),r=Bg(Ig.UseNavigateStable),o=Lr.useRef(!1);return Rg(()=>{o.current=!0}),Lr.useCallback(function(b,I){I===void 0&&(I={}),o.current&&(typeof b=="number"?e.navigate(b):e.navigate(b,Hu({fromRouteId:r},I)))},[e,r])}const ny={};function Nw(e,r,o){ny[e]||(ny[e]=!0)}function Uw(e,r){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Lw(e){let{to:r,replace:o,state:a,relative:b}=e;Qu()||Fo(!1);let{future:I,static:P}=Lr.useContext($u),{matches:M}=Lr.useContext(Za),{pathname:l}=fd(),v=bw(),z=xg(r,Tg(M,I.v7_relativeSplatPath),l,b==="path"),s=JSON.stringify(z);return Lr.useEffect(()=>v(JSON.parse(s),{replace:o,state:a,relative:b}),[v,s,b,o,a]),null}function Fw(e){return Aw(e.context)}function Uc(e){Fo(!1)}function Dw(e){let{basename:r="/",children:o=null,location:a,navigationType:b=Na.Pop,navigator:I,static:P=!1,future:M}=e;Qu()&&Fo(!1);let l=r.replace(/^\/*/,"/"),v=Lr.useMemo(()=>({basename:l,navigator:I,static:P,future:Hu({v7_relativeSplatPath:!1},M)}),[l,M,I,P]);typeof a=="string"&&(a=Ws(a));let{pathname:z="/",search:s="",hash:E="",state:k=null,key:y="default"}=a,O=Lr.useMemo(()=>{let u=kg(z,l);return u==null?null:{location:{pathname:u,search:s,hash:E,state:k,key:y},navigationType:b}},[l,z,s,E,k,y,b]);return O==null?null:Lr.createElement($u.Provider,{value:v},Lr.createElement(El.Provider,{children:o,value:O}))}function Mw(e){let{children:r,location:o}=e;return Ew(hp(r),o)}new Promise(()=>{});function hp(e,r){r===void 0&&(r=[]);let o=[];return Lr.Children.forEach(e,(a,b)=>{if(!Lr.isValidElement(a))return;let I=[...r,b];if(a.type===Lr.Fragment){o.push.apply(o,hp(a.props.children,I));return}a.type!==Uc&&Fo(!1),!a.props.index||!a.props.children||Fo(!1);let P={id:a.props.id||I.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(P.children=hp(a.props.children,I)),o.push(P)}),o}/** + * React Router DOM v6.30.4 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */const Vw="6";try{window.__reactRouterVersion=Vw}catch{}const zw="startTransition",oy=Bv[zw];function qw(e){let{basename:r,children:o,future:a,window:b}=e,I=Lr.useRef();I.current==null&&(I.current=G0({window:b,v5Compat:!0}));let P=I.current,[M,l]=Lr.useState({action:P.action,location:P.location}),{v7_startTransition:v}=a||{},z=Lr.useCallback(s=>{v&&oy?oy(()=>l(s)):l(s)},[l,v]);return Lr.useLayoutEffect(()=>P.listen(z),[P,z]),Lr.useEffect(()=>Uw(a),[a]),Lr.createElement(Dw,{basename:r,children:o,location:M.location,navigationType:M.action,navigator:P,future:a})}var iy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(iy||(iy={}));var ay;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ay||(ay={}));function Hw(){return vr.jsxs("div",{className:"min-h-screen flex flex-col",children:[vr.jsx("header",{className:"bg-white border-b border-gray-200",children:vr.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex items-center justify-between",children:[vr.jsxs("div",{className:"flex items-center gap-3",children:[vr.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-600 flex items-center justify-center",children:vr.jsx("span",{className:"text-white font-bold text-sm",children:"BF"})}),vr.jsx("h1",{className:"text-lg font-semibold text-gray-900",children:"bc-forge"})]}),vr.jsx("nav",{className:"flex items-center gap-6 text-sm",children:vr.jsx("a",{href:"/vesting",className:"text-indigo-600 font-medium border-b-2 border-indigo-600 pb-1",children:"Lockup & Vesting"})})]})}),vr.jsx("main",{className:"flex-1",children:vr.jsx(Fw,{})})]})}var Gw={exports:{}};(function(e,r){var o={};/*! For license information please see stellar-sdk.min.js.LICENSE.txt */(function(a,b){e.exports=b()})(self,()=>(()=>{var a={8950(P){var M;M=()=>(()=>{var l={41(s,E,k){var y=k(655),O=k(8068),u=k(9675),m=k(5795);s.exports=function(p,f,h){if(!p||typeof p!="object"&&typeof p!="function")throw new u("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new u("`loose`, if provided, must be a boolean");var A=arguments.length>3?arguments[3]:null,g=arguments.length>4?arguments[4]:null,w=arguments.length>5?arguments[5]:null,R=arguments.length>6&&arguments[6],S=!!m&&m(p,f);if(y)y(p,f,{configurable:w===null&&S?S.configurable:!w,enumerable:A===null&&S?S.enumerable:!A,value:h,writable:g===null&&S?S.writable:!g});else{if(!R&&(A||g||w))throw new O("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");p[f]=h}}},76(s){s.exports=Function.prototype.call},251(s,E){E.read=function(k,y,O,u,m){var p,f,h=8*m-u-1,A=(1<>1,w=-7,R=O?m-1:0,S=O?-1:1,C=k[y+R];for(R+=S,p=C&(1<<-w)-1,C>>=-w,w+=h;w>0;p=256*p+k[y+R],R+=S,w-=8);for(f=p&(1<<-w)-1,p>>=-w,w+=u;w>0;f=256*f+k[y+R],R+=S,w-=8);if(p===0)p=1-g;else{if(p===A)return f?NaN:1/0*(C?-1:1);f+=Math.pow(2,u),p-=g}return(C?-1:1)*f*Math.pow(2,p-u)},E.write=function(k,y,O,u,m,p){var f,h,A,g=8*p-m-1,w=(1<>1,S=m===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=u?0:p-1,x=u?1:-1,ot=y<0||y===0&&1/y<0?1:0;for(y=Math.abs(y),isNaN(y)||y===1/0?(h=isNaN(y)?1:0,f=w):(f=Math.floor(Math.log(y)/Math.LN2),y*(A=Math.pow(2,-f))<1&&(f--,A*=2),(y+=f+R>=1?S/A:S*Math.pow(2,1-R))*A>=2&&(f++,A/=2),f+R>=w?(h=0,f=w):f+R>=1?(h=(y*A-1)*Math.pow(2,m),f+=R):(h=y*Math.pow(2,R-1)*Math.pow(2,m),f=0));m>=8;k[O+C]=255&h,C+=x,h/=256,m-=8);for(f=f<0;k[O+C]=255&f,C+=x,f/=256,g-=8);k[O+C-x]|=128*ot}},392(s,E,k){var y=k(2861).Buffer,O=k(5377);function u(m,p){this._block=y.alloc(m),this._finalSize=p,this._blockSize=m,this._len=0}u.prototype.update=function(m,p){m=O(m,p||"utf8");for(var f=this._block,h=this._blockSize,A=m.length,g=this._len,w=0;w=this._finalSize&&(this._update(this._block),this._block.fill(0));var f=8*this._len;if(f<=4294967295)this._block.writeUInt32BE(f,this._blockSize-4);else{var h=(4294967295&f)>>>0,A=(f-h)/4294967296;this._block.writeUInt32BE(A,this._blockSize-8),this._block.writeUInt32BE(h,this._blockSize-4)}this._update(this._block);var g=this._hash();return m?g.toString(m):g},u.prototype._update=function(){throw new Error("_update must be implemented by subclass")},s.exports=u},414(s){s.exports=Math.round},448(s,E,k){k.r(E),k.d(E,{Account:()=>kl,Address:()=>Dn,Asset:()=>bn,AuthClawbackEnabledFlag:()=>Qn,AuthImmutableFlag:()=>Ro,AuthRequiredFlag:()=>Vo,AuthRevocableFlag:()=>Ar,BASE_FEE:()=>Dl,Claimant:()=>Yu,Contract:()=>md,FeeBumpTransaction:()=>zo,Hyper:()=>y.Hyper,Int128:()=>Il,Int256:()=>jl,Keypair:()=>Bn,LiquidityPoolAsset:()=>fa,LiquidityPoolFeeV18:()=>Vn,LiquidityPoolId:()=>j,Memo:()=>Ke,MemoHash:()=>Ve,MemoID:()=>Te,MemoNone:()=>Me,MemoReturn:()=>Ie,MemoText:()=>Re,MuxedAccount:()=>dd,Networks:()=>Ml,Operation:()=>$r,ScInt:()=>Td,SignerKey:()=>xl,Soroban:()=>av,SorobanDataBuilder:()=>Tl,StrKey:()=>ar,TimeoutInfinite:()=>rv,Transaction:()=>On,TransactionBase:()=>ii,TransactionBuilder:()=>nv,Uint128:()=>_l,Uint256:()=>Rl,UnsignedHyper:()=>y.UnsignedHyper,XdrLargeInt:()=>xa,authorizeEntry:()=>Dd,authorizeInvocation:()=>cv,buildInvocationTree:()=>Vd,cereal:()=>m,decodeAddressToMuxedAccount:()=>jt,default:()=>pv,encodeMuxedAccount:()=>er,encodeMuxedAccountToAddress:()=>_t,extractBaseAddress:()=>mr,getLiquidityPoolId:()=>Xo,hash:()=>f,humanizeEvents:()=>uv,nativeToScVal:()=>_i,scValToBigInt:()=>xd,scValToNative:()=>ra,sign:()=>Mt,verify:()=>oe,walkInvocationTree:()=>fv,xdr:()=>u});var y=k(3740),O=y.config(function(t){var n=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,claimClaimableBalanceTrustlineFrozen:-6}),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()],["claimClaimableBalanceTrustlineFrozen",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,liquidityPoolDepositTrustlineFrozen:-8}),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()],["liquidityPoolDepositTrustlineFrozen",t.void()]],arms:{}}),t.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5,liquidityPoolWithdrawTrustlineFrozen:-6}),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()],["liquidityPoolWithdrawTrustlineFrozen",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,txFrozenKeyAccessed:-18}),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()],["txFrozenKeyAccessed",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()],["txFrozenKeyAccessed",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(n)],["name",t.string(30)],["type",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecUdtStructV0",[["doc",t.string(n)],["lib",t.string(80)],["name",t.string(60)],["fields",t.varArray(t.lookup("ScSpecUdtStructFieldV0"),2147483647)]]),t.struct("ScSpecUdtUnionCaseVoidV0",[["doc",t.string(n)],["name",t.string(60)]]),t.struct("ScSpecUdtUnionCaseTupleV0",[["doc",t.string(n)],["name",t.string(60)],["type",t.varArray(t.lookup("ScSpecTypeDef"),2147483647)]]),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(n)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtUnionCaseV0"),2147483647)]]),t.struct("ScSpecUdtEnumCaseV0",[["doc",t.string(n)],["name",t.string(60)],["value",t.lookup("Uint32")]]),t.struct("ScSpecUdtEnumV0",[["doc",t.string(n)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtEnumCaseV0"),2147483647)]]),t.struct("ScSpecUdtErrorEnumCaseV0",[["doc",t.string(n)],["name",t.string(60)],["value",t.lookup("Uint32")]]),t.struct("ScSpecUdtErrorEnumV0",[["doc",t.string(n)],["lib",t.string(80)],["name",t.string(60)],["cases",t.varArray(t.lookup("ScSpecUdtErrorEnumCaseV0"),2147483647)]]),t.struct("ScSpecFunctionInputV0",[["doc",t.string(n)],["name",t.string(30)],["type",t.lookup("ScSpecTypeDef")]]),t.struct("ScSpecFunctionV0",[["doc",t.string(n)],["name",t.lookup("ScSymbol")],["inputs",t.varArray(t.lookup("ScSpecFunctionInputV0"),2147483647)],["outputs",t.varArray(t.lookup("ScSpecTypeDef"),1)]]),t.enum("ScSpecEventParamLocationV0",{scSpecEventParamLocationData:0,scSpecEventParamLocationTopicList:1}),t.struct("ScSpecEventParamV0",[["doc",t.string(n)],["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(n)],["lib",t.string(80)],["name",t.lookup("ScSymbol")],["prefixTopics",t.varArray(t.lookup("ScSymbol"),2)],["params",t.varArray(t.lookup("ScSpecEventParamV0"),2147483647)],["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.typedef("EncodedLedgerKey",t.varOpaque()),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,bn254EncodeFp:70,bn254DecodeFp:71,bn254G1CheckPointOnCurve:72,bn254G2CheckPointOnCurve:73,bn254G2CheckPointInSubgroup:74,bn254G1ProjectiveToAffine:75,bn254G1Add:76,bn254G1Mul:77,bn254Pairing:78,bn254FrFromU256:79,bn254FrToU256:80,bn254FrAddSub:81,bn254FrMul:82,bn254FrPow:83,bn254FrInv:84,bn254G1Msm:85}),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.struct("FrozenLedgerKeys",[["keys",t.varArray(t.lookup("EncodedLedgerKey"),2147483647)]]),t.struct("FrozenLedgerKeysDelta",[["keysToFreeze",t.varArray(t.lookup("EncodedLedgerKey"),2147483647)],["keysToUnfreeze",t.varArray(t.lookup("EncodedLedgerKey"),2147483647)]]),t.struct("FreezeBypassTxes",[["txHashes",t.varArray(t.lookup("Hash"),2147483647)]]),t.struct("FreezeBypassTxsDelta",[["addTxes",t.varArray(t.lookup("Hash"),2147483647)],["removeTxes",t.varArray(t.lookup("Hash"),2147483647)]]),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,configSettingFrozenLedgerKeys:17,configSettingFrozenLedgerKeysDelta:18,configSettingFreezeBypassTxes:19,configSettingFreezeBypassTxsDelta:20}),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"],["configSettingFrozenLedgerKeys","frozenLedgerKeys"],["configSettingFrozenLedgerKeysDelta","frozenLedgerKeysDelta"],["configSettingFreezeBypassTxes","freezeBypassTxes"],["configSettingFreezeBypassTxsDelta","freezeBypassTxsDelta"]],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"),frozenLedgerKeys:t.lookup("FrozenLedgerKeys"),frozenLedgerKeysDelta:t.lookup("FrozenLedgerKeysDelta"),freezeBypassTxes:t.lookup("FreezeBypassTxes"),freezeBypassTxsDelta:t.lookup("FreezeBypassTxsDelta")}}),t.struct("LedgerCloseMetaBatch",[["startSequence",t.lookup("Uint32")],["endSequence",t.lookup("Uint32")],["ledgerCloseMeta",t.varArray(t.lookup("LedgerCloseMeta"),2147483647)]])});const u=O,m={XdrWriter:y.XdrWriter,XdrReader:y.XdrReader};var p=k(2802);function f(t){var n=new p.sha256;return n.update(t,"utf8"),n.digest()}const h=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function A(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function g(t,...n){if(!A(t))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw new Error("Uint8Array expected of length "+n+", got length="+t.length)}function w(t,n=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(n&&t.finished)throw new Error("Hash#digest() has already been called")}function R(...t){for(let n=0;nn.toString(16).padStart(2,"0"));function ot(t){if(g(t),C)return t.toHex();let n="";for(let i=0;i=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void 0}function V(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(C)return Uint8Array.fromHex(t);const n=t.length,i=n/2;if(n%2)throw new Error("hex string expected, got unpadded hex of length "+n);const d=new Uint8Array(i);for(let Z=0,Lt=0;ZZ-ne&&(this.process(d,0),ne=0);for(let Ge=ne;Ge>lr&Sr),Hr=Number(Se&Sr),Ir=Je?4:0,hn=Je?0:4;Ge.setUint32(ue+Ir,Pr,Je),Ge.setUint32(ue+hn,Hr,Je)})(d,Z-8,BigInt(8*this.length),Lt),this.process(d,0);const se=S(n),ke=this.outputLen;if(ke%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const Pe=ke/4,rr=this.get();if(Pe>rr.length)throw new Error("_sha2: outputLen bigger than state");for(let Ge=0;Ge>c&At)}:{h:0|Number(t>>c&At),l:0|Number(t&At)}}const G=(t,n,i)=>t>>>i,tt=(t,n,i)=>t<<32-i|n>>>i,Et=(t,n,i)=>t>>>i|n<<32-i,q=(t,n,i)=>t<<32-i|n>>>i,Tt=(t,n,i)=>t<<64-i|n>>>i-32,Ft=(t,n,i)=>t>>>i-32|n<<64-i;function vt(t,n,i,d){const Z=(n>>>0)+(d>>>0);return{h:t+i+(Z/4294967296|0)|0,l:0|Z}}const bt=(t,n,i)=>(t>>>0)+(n>>>0)+(i>>>0),yt=(t,n,i,d)=>n+i+d+(t/2**32|0)|0,dt=(t,n,i,d)=>(t>>>0)+(n>>>0)+(i>>>0)+(d>>>0),lt=(t,n,i,d,Z)=>n+i+d+Z+(t/2**32|0)|0,xt=(t,n,i,d,Z)=>(t>>>0)+(n>>>0)+(i>>>0)+(d>>>0)+(Z>>>0),Ot=(t,n,i,d,Z,Lt)=>n+i+d+Z+Lt+(t/2**32|0)|0,kt=function(t,n=!1){const i=t.length;let d=new Uint32Array(i),Z=new Uint32Array(i);for(let Lt=0;LtBigInt(t))),Ct=kt[0],H=kt[1],it=new Uint32Array(80),mt=new Uint32Array(80);class Dt extends Rt{constructor(n=64){super(128,n,16,!1),this.Ah=0|J[0],this.Al=0|J[1],this.Bh=0|J[2],this.Bl=0|J[3],this.Ch=0|J[4],this.Cl=0|J[5],this.Dh=0|J[6],this.Dl=0|J[7],this.Eh=0|J[8],this.El=0|J[9],this.Fh=0|J[10],this.Fl=0|J[11],this.Gh=0|J[12],this.Gl=0|J[13],this.Hh=0|J[14],this.Hl=0|J[15]}get(){const{Ah:n,Al:i,Bh:d,Bl:Z,Ch:Lt,Cl:ne,Dh:se,Dl:ke,Eh:Pe,El:rr,Fh:Ge,Fl:ue,Gh:Se,Gl:Je,Hh:lr,Hl:Sr}=this;return[n,i,d,Z,Lt,ne,se,ke,Pe,rr,Ge,ue,Se,Je,lr,Sr]}set(n,i,d,Z,Lt,ne,se,ke,Pe,rr,Ge,ue,Se,Je,lr,Sr){this.Ah=0|n,this.Al=0|i,this.Bh=0|d,this.Bl=0|Z,this.Ch=0|Lt,this.Cl=0|ne,this.Dh=0|se,this.Dl=0|ke,this.Eh=0|Pe,this.El=0|rr,this.Fh=0|Ge,this.Fl=0|ue,this.Gh=0|Se,this.Gl=0|Je,this.Hh=0|lr,this.Hl=0|Sr}process(n,i){for(let Ir=0;Ir<16;Ir++,i+=4)it[Ir]=n.getUint32(i),mt[Ir]=n.getUint32(i+=4);for(let Ir=16;Ir<80;Ir++){const hn=0|it[Ir-15],Dr=0|mt[Ir-15],gr=Et(hn,Dr,1)^Et(hn,Dr,8)^G(hn,0,7),Or=q(hn,Dr,1)^q(hn,Dr,8)^tt(hn,Dr,7),cr=0|it[Ir-2],Br=0|mt[Ir-2],Ye=Et(cr,Br,19)^Tt(cr,Br,61)^G(cr,0,6),ln=q(cr,Br,19)^Ft(cr,Br,61)^tt(cr,Br,6),tn=dt(Or,ln,mt[Ir-7],mt[Ir-16]),vn=lt(tn,gr,Ye,it[Ir-7],it[Ir-16]);it[Ir]=0|vn,mt[Ir]=0|tn}let{Ah:d,Al:Z,Bh:Lt,Bl:ne,Ch:se,Cl:ke,Dh:Pe,Dl:rr,Eh:Ge,El:ue,Fh:Se,Fl:Je,Gh:lr,Gl:Sr,Hh:Pr,Hl:Hr}=this;for(let Ir=0;Ir<80;Ir++){const hn=Et(Ge,ue,14)^Et(Ge,ue,18)^Tt(Ge,ue,41),Dr=q(Ge,ue,14)^q(Ge,ue,18)^Ft(Ge,ue,41),gr=Ge&Se^~Ge&lr,Or=xt(Hr,Dr,ue&Je^~ue&Sr,H[Ir],mt[Ir]),cr=Ot(Or,Pr,hn,gr,Ct[Ir],it[Ir]),Br=0|Or,Ye=Et(d,Z,28)^Tt(d,Z,34)^Tt(d,Z,39),ln=q(d,Z,28)^Ft(d,Z,34)^Ft(d,Z,39),tn=d&Lt^d&se^Lt&se,vn=Z&ne^Z&ke^ne&ke;Pr=0|lr,Hr=0|Sr,lr=0|Se,Sr=0|Je,Se=0|Ge,Je=0|ue,{h:Ge,l:ue}=vt(0|Pe,0|rr,0|cr,0|Br),Pe=0|se,rr=0|ke,se=0|Lt,ke=0|ne,Lt=0|d,ne=0|Z;const Qr=bt(Br,ln,vn);d=yt(Qr,cr,Ye,tn),Z=0|Qr}({h:d,l:Z}=vt(0|this.Ah,0|this.Al,0|d,0|Z)),{h:Lt,l:ne}=vt(0|this.Bh,0|this.Bl,0|Lt,0|ne),{h:se,l:ke}=vt(0|this.Ch,0|this.Cl,0|se,0|ke),{h:Pe,l:rr}=vt(0|this.Dh,0|this.Dl,0|Pe,0|rr),{h:Ge,l:ue}=vt(0|this.Eh,0|this.El,0|Ge,0|ue),{h:Se,l:Je}=vt(0|this.Fh,0|this.Fl,0|Se,0|Je),{h:lr,l:Sr}=vt(0|this.Gh,0|this.Gl,0|lr,0|Sr),{h:Pr,l:Hr}=vt(0|this.Hh,0|this.Hl,0|Pr,0|Hr),this.set(d,Z,Lt,ne,se,ke,Pe,rr,Ge,ue,Se,Je,lr,Sr,Pr,Hr)}roundClean(){R(it,mt)}destroy(){R(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const T=function(t){const n=d=>t().update(ut(d)).digest(),i=t();return n.outputLen=i.outputLen,n.blockLen=i.blockLen,n.create=()=>t(),n}(()=>new Dt),L=BigInt(0),$=BigInt(1);function St(t,n=""){if(typeof t!="boolean")throw new Error((n&&`"${n}"`)+"expected boolean, got type="+typeof t);return t}function ft(t,n,i=""){const d=A(t),Z=t==null?void 0:t.length,Lt=n!==void 0;if(!d||Lt&&Z!==n)throw new Error((i&&`"${i}" `)+"expected Uint8Array"+(Lt?` of length ${n}`:"")+", got "+(d?`length=${Z}`:"type="+typeof t));return t}function ee(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?L:BigInt("0x"+t)}function _(t){return g(t),ee(ot(Uint8Array.from(t).reverse()))}function W(t,n){return V(t.toString(16).padStart(2*n,"0"))}function at(t,n,i){let d;if(typeof n=="string")try{d=V(n)}catch(Lt){throw new Error(t+" must be hex string or Uint8Array, cause: "+Lt)}else{if(!A(n))throw new Error(t+" must be hex string or Uint8Array");d=Uint8Array.from(n)}const Z=d.length;if(typeof i=="number"&&Z!==i)throw new Error(t+" of length "+i+" expected, got "+Z);return d}function Xt(t){return Uint8Array.from(t)}const ae=t=>typeof t=="bigint"&&L<=t;function Kt(t,n,i,d){if(!function(Z,Lt,ne){return ae(Z)&&ae(Lt)&&ae(ne)&&Lt<=Z&&Z($<d(Z,Lt,!1)),Object.entries(i).forEach(([Z,Lt])=>d(Z,Lt,!0))}const et=()=>{throw new Error("not implemented")};function gt(t){const n=new WeakMap;return(i,...d)=>{const Z=n.get(i);if(Z!==void 0)return Z;const Lt=t(i,...d);return n.set(i,Lt),Lt}}const Yt=BigInt(0),le=BigInt(1),we=BigInt(2),ie=BigInt(3),U=BigInt(4),X=BigInt(5),Pt=BigInt(7),Ht=BigInt(8),re=BigInt(9),We=BigInt(16);function xe(t,n){const i=t%n;return i>=Yt?i:n+i}function je(t,n,i){let d=t;for(;n-- >Yt;)d*=d,d%=i;return d}function Qe(t,n){if(t===Yt)throw new Error("invert: expected non-zero number");if(n<=Yt)throw new Error("invert: expected positive modulus, got "+n);let i=xe(t,n),d=n,Z=Yt,Lt=le;for(;i!==Yt;){const ne=d/i,se=d%i,ke=Z-Lt*ne;d=i,i=se,Z=Lt,Lt=ke}if(d!==le)throw new Error("invert: does not exist");return xe(Z,n)}function Oe(t,n,i){if(!t.eql(t.sqr(n),i))throw new Error("Cannot find square root")}function Cr(t,n){const i=(t.ORDER+le)/U,d=t.pow(n,i);return Oe(t,d,n),d}function ur(t,n){const i=(t.ORDER-X)/Ht,d=t.mul(n,we),Z=t.pow(d,i),Lt=t.mul(n,Z),ne=t.mul(t.mul(Lt,we),Z),se=t.mul(Lt,t.sub(ne,t.ONE));return Oe(t,se,n),se}function jr(t){if(t1e3)throw new Error("Cannot find square root: probably non-prime P");if(i===1)return Cr;let Lt=Z.pow(d,n);const ne=(n+le)/we;return function(se,ke){if(se.is0(ke))return ke;if(qn(se,ke)!==1)throw new Error("Cannot find square root");let Pe=i,rr=se.mul(se.ONE,Lt),Ge=se.pow(ke,n),ue=se.pow(ke,ne);for(;!se.eql(Ge,se.ONE);){if(se.is0(Ge))return se.ZERO;let Se=1,Je=se.sqr(Ge);for(;!se.eql(Je,se.ONE);)if(Se++,Je=se.sqr(Je),Se===Pe)throw new Error("Cannot find square root");const lr=le<(xe(t,n)&le)===le,_n=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function io(t,n,i=!1){const d=new Array(n.length).fill(i?t.ZERO:void 0),Z=n.reduce((ne,se,ke)=>t.is0(se)?ne:(d[ke]=ne,t.mul(ne,se)),t.ONE),Lt=t.inv(Z);return n.reduceRight((ne,se,ke)=>t.is0(se)?ne:(d[ke]=t.mul(ne,d[ke]),t.mul(ne,se)),Lt),d}function qn(t,n){const i=(t.ORDER-le)/we,d=t.pow(n,i),Z=t.eql(d,t.ONE),Lt=t.eql(d,t.ZERO),ne=t.eql(d,t.neg(t.ONE));if(!Z&&!Lt&&!ne)throw new Error("invalid Legendre symbol result");return Z?1:Lt?0:-1}function ao(t,n){n!==void 0&&function(d){if(!Number.isSafeInteger(d)||d<0)throw new Error("positive integer expected, got "+d)}(n);const i=n!==void 0?n:t.toString(2).length;return{nBitLength:i,nByteLength:Math.ceil(i/8)}}function so(t,n,i=!1,d={}){if(t<=Yt)throw new Error("invalid field: expected ORDER > 0, got "+t);let Z,Lt,ne,se=!1;if(typeof n=="object"&&n!=null){if(d.sqrt||i)throw new Error("cannot specify opts in two arguments");const ue=n;ue.BITS&&(Z=ue.BITS),ue.sqrt&&(Lt=ue.sqrt),typeof ue.isLE=="boolean"&&(i=ue.isLE),typeof ue.modFromBytes=="boolean"&&(se=ue.modFromBytes),ne=ue.allowedLengths}else typeof n=="number"&&(Z=n),d.sqrt&&(Lt=d.sqrt);const{nBitLength:ke,nByteLength:Pe}=ao(t,Z);if(Pe>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let rr;const Ge=Object.freeze({ORDER:t,isLE:i,BITS:ke,BYTES:Pe,MASK:Ne(ke),ZERO:Yt,ONE:le,allowedLengths:ne,create:ue=>xe(ue,t),isValid:ue=>{if(typeof ue!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof ue);return Yt<=ue&&ueue===Yt,isValidNot0:ue=>!Ge.is0(ue)&&Ge.isValid(ue),isOdd:ue=>(ue&le)===le,neg:ue=>xe(-ue,t),eql:(ue,Se)=>ue===Se,sqr:ue=>xe(ue*ue,t),add:(ue,Se)=>xe(ue+Se,t),sub:(ue,Se)=>xe(ue-Se,t),mul:(ue,Se)=>xe(ue*Se,t),pow:(ue,Se)=>function(Je,lr,Sr){if(SrYt;)Sr&le&&(Pr=Je.mul(Pr,Hr)),Hr=Je.sqr(Hr),Sr>>=le;return Pr}(Ge,ue,Se),div:(ue,Se)=>xe(ue*Qe(Se,t),t),sqrN:ue=>ue*ue,addN:(ue,Se)=>ue+Se,subN:(ue,Se)=>ue-Se,mulN:(ue,Se)=>ue*Se,inv:ue=>Qe(ue,t),sqrt:Lt||(ue=>(rr||(rr=function(Se){return Se%U===ie?Cr:Se%Ht===X?ur:Se%We===re?function(Je){const lr=so(Je),Sr=jr(Je),Pr=Sr(lr,lr.neg(lr.ONE)),Hr=Sr(lr,Pr),Ir=Sr(lr,lr.neg(Pr)),hn=(Je+Pt)/We;return(Dr,gr)=>{let Or=Dr.pow(gr,hn),cr=Dr.mul(Or,Pr);const Br=Dr.mul(Or,Hr),Ye=Dr.mul(Or,Ir),ln=Dr.eql(Dr.sqr(cr),gr),tn=Dr.eql(Dr.sqr(Br),gr);Or=Dr.cmov(Or,cr,ln),cr=Dr.cmov(Ye,Br,tn);const vn=Dr.eql(Dr.sqr(cr),gr),Qr=Dr.cmov(Or,cr,vn);return Oe(Dr,Qr,gr),Qr}}(Se):jr(Se)}(t)),rr(Ge,ue))),toBytes:ue=>i?W(ue,Pe).reverse():W(ue,Pe),fromBytes:(ue,Se=!0)=>{if(ne){if(!ne.includes(ue.length)||ue.length>Pe)throw new Error("Field.fromBytes: expected "+ne+" bytes, got "+ue.length);const lr=new Uint8Array(Pe);lr.set(ue,i?0:lr.length-ue.length),ue=lr}if(ue.length!==Pe)throw new Error("Field.fromBytes: expected "+Pe+" bytes, got "+ue.length);let Je=i?_(ue):function(lr){return ee(ot(lr))}(ue);if(se&&(Je=xe(Je,t)),!Se&&!Ge.isValid(Je))throw new Error("invalid field element: outside of range 0..ORDER");return Je},invertBatch:ue=>io(Ge,ue),cmov:(ue,Se,Je)=>Je?Se:ue});return Object.freeze(Ge)}const Qo=BigInt(0),uo=BigInt(1);function ni(t,n){const i=n.negate();return t?i:n}function kn(t,n){const i=io(t.Fp,n.map(d=>d.Z));return n.map((d,Z)=>t.fromAffine(d.toAffine(i[Z])))}function Yr(t,n){if(!Number.isSafeInteger(t)||t<=0||t>n)throw new Error("invalid window size, expected [1.."+n+"], got W="+t)}function mn(t,n){Yr(t,n);const i=2**t;return{windows:Math.ceil(n/t)+1,windowSize:2**(t-1),mask:Ne(t),maxNumber:i,shiftBy:BigInt(t)}}function to(t,n,i){const{windowSize:d,mask:Z,maxNumber:Lt,shiftBy:ne}=i;let se=Number(t&Z),ke=t>>ne;se>d&&(se-=Lt,ke+=uo);const Pe=n*d;return{nextN:ke,offset:Pe+Math.abs(se)-1,isZero:se===0,isNeg:se<0,isNegF:n%2!=0,offsetF:Pe}}const Yo=new WeakMap,co=new WeakMap;function pn(t){return co.get(t)||1}function jn(t){if(t!==Qo)throw new Error("invalid wNAF")}class Tn{constructor(n,i){this.BASE=n.BASE,this.ZERO=n.ZERO,this.Fn=n.Fn,this.bits=i}_unsafeLadder(n,i,d=this.ZERO){let Z=n;for(;i>Qo;)i&uo&&(d=d.add(Z)),Z=Z.double(),i>>=uo;return d}precomputeWindow(n,i){const{windows:d,windowSize:Z}=mn(i,this.bits),Lt=[];let ne=n,se=ne;for(let ke=0;ke{if(!(Je instanceof Se))throw new Error("invalid point at index "+lr)})})(i,t),function(ue,Se){if(!Array.isArray(ue))throw new Error("array of scalars expected");ue.forEach((Je,lr)=>{if(!Se.isValid(Je))throw new Error("invalid scalar at index "+lr)})}(d,n);const Z=i.length,Lt=d.length;if(Z!==Lt)throw new Error("arrays of points and scalars must have equal length");const ne=t.ZERO,se=function(ue){let Se;for(Se=0;ue>L;ue>>=$,Se+=1);return Se}(BigInt(Z));let ke=1;se>12?ke=se-3:se>4?ke=se-2:se>0&&(ke=2);const Pe=Ne(ke),rr=new Array(Number(Pe)+1).fill(ne);let Ge=ne;for(let ue=Math.floor((n.BITS-1)/ke)*ke;ue>=0;ue-=ke){rr.fill(ne);for(let Je=0;Je>BigInt(ue)&Pe);rr[Sr]=rr[Sr].add(i[Je])}let Se=ne;for(let Je=rr.length-1,lr=ne;Je>0;Je--)lr=lr.add(rr[Je]),Se=Se.add(lr);if(Ge=Ge.add(Se),ue!==0)for(let Je=0;Je(Z[Lt]="function",Z),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"}))}(n),n}return so(t,{isLE:i})}const un=BigInt(0),xn=BigInt(1),yo=BigInt(2),bi=BigInt(8);class pi{constructor(n){this.ep=n}static fromBytes(n){et()}static fromHex(n){et()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(n){return this.ep.toAffine(n)}toHex(){return ot(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(n){return this.assertSame(n),this.init(this.ep.add(n.ep))}subtract(n){return this.assertSame(n),this.init(this.ep.subtract(n.ep))}multiply(n){return this.init(this.ep.multiply(n))}multiplyUnsafe(n){return this.init(this.ep.multiplyUnsafe(n))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(n,i){return this.init(this.ep.precompute(n,i))}toRawBytes(){return this.toBytes()}}function Ui(t){const{CURVE:n,curveOpts:i,hash:d,eddsaOpts:Z}=function(Lt){const ne={a:Lt.a,d:Lt.d,p:Lt.Fp.ORDER,n:Lt.n,h:Lt.h,Gx:Lt.Gx,Gy:Lt.Gy},se={Fp:Lt.Fp,Fn:so(ne.n,Lt.nBitLength,!0),uvRatio:Lt.uvRatio},ke={randomBytes:Lt.randomBytes,adjustScalarBytes:Lt.adjustScalarBytes,domain:Lt.domain,prehash:Lt.prehash,mapToCurve:Lt.mapToCurve};return{CURVE:ne,curveOpts:se,hash:Lt.hash,eddsaOpts:ke}}(t);return function(Lt,ne){const se=ne.Point;return Object.assign({},ne,{ExtendedPoint:se,CURVE:Lt,nBitLength:se.Fn.BITS,nByteLength:se.Fn.BYTES})}(t,function(Lt,ne,se={}){if(typeof ne!="function")throw new Error('"hash" function param is required');D(se,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:ke}=se,{BASE:Pe,Fp:rr,Fn:Ge}=Lt,ue=se.randomBytes||Bt,Se=se.adjustScalarBytes||(cr=>cr),Je=se.domain||((cr,Br,Ye)=>{if(St(Ye,"phflag"),Br.length||Ye)throw new Error("Contexts/pre-hash are not supported");return cr});function lr(cr){return Ge.create(_(cr))}function Sr(cr){const{head:Br,prefix:Ye,scalar:ln}=function(Qr){const fn=Dr.secretKey;Qr=at("private key",Qr,fn);const Vt=at("hashed private key",ne(Qr),2*fn),Qt=Se(Vt.slice(0,fn));return{head:Qt,prefix:Vt.slice(fn,2*fn),scalar:lr(Qt)}}(cr),tn=Pe.multiply(ln),vn=tn.toBytes();return{head:Br,prefix:Ye,scalar:ln,point:tn,pointBytes:vn}}function Pr(cr){return Sr(cr).pointBytes}function Hr(cr=Uint8Array.of(),...Br){const Ye=Ut(...Br);return lr(ne(Je(Ye,at("context",cr),!!ke)))}const Ir={zip215:!0},hn=rr.BYTES,Dr={secretKey:hn,publicKey:hn,signature:2*hn,seed:hn};function gr(cr=ue(Dr.seed)){return ft(cr,Dr.seed,"seed")}const Or={getExtendedPublicKey:Sr,randomSecretKey:gr,isValidSecretKey:function(cr){return A(cr)&&cr.length===Ge.BYTES},isValidPublicKey:function(cr,Br){try{return!!Lt.fromBytes(cr,Br)}catch{return!1}},toMontgomery(cr){const{y:Br}=Lt.fromBytes(cr),Ye=Dr.publicKey,ln=Ye===32;if(!ln&&Ye!==57)throw new Error("only defined for 25519 and 448");const tn=ln?rr.div(xn+Br,xn-Br):rr.div(Br-xn,Br+xn);return rr.toBytes(tn)},toMontgomerySecret(cr){const Br=Dr.secretKey;ft(cr,Br);const Ye=ne(cr.subarray(0,Br));return Se(Ye).subarray(0,Br)},randomPrivateKey:gr,precompute:(cr=8,Br=Lt.BASE)=>Br.precompute(cr,!1)};return Object.freeze({keygen:function(cr){const Br=Or.randomSecretKey(cr);return{secretKey:Br,publicKey:Pr(Br)}},getPublicKey:Pr,sign:function(cr,Br,Ye={}){cr=at("message",cr),ke&&(cr=ke(cr));const{prefix:ln,scalar:tn,pointBytes:vn}=Sr(Br),Qr=Hr(Ye.context,ln,cr),fn=Pe.multiply(Qr).toBytes(),Vt=Hr(Ye.context,fn,vn,cr),Qt=Ge.create(Qr+Vt*tn);if(!Ge.isValid(Qt))throw new Error("sign failed: invalid s");return ft(Ut(fn,Ge.toBytes(Qt)),Dr.signature,"result")},verify:function(cr,Br,Ye,ln=Ir){const{context:tn,zip215:vn}=ln,Qr=Dr.signature;cr=at("signature",cr,Qr),Br=at("message",Br),Ye=at("publicKey",Ye,Dr.publicKey),vn!==void 0&&St(vn,"zip215"),ke&&(Br=ke(Br));const fn=Qr/2,Vt=cr.subarray(0,fn),Qt=_(cr.subarray(fn,Qr));let ye,Ue,Ae;try{ye=Lt.fromBytes(Ye,vn),Ue=Lt.fromBytes(Vt,vn),Ae=Pe.multiplyUnsafe(Qt)}catch{return!1}if(!vn&&ye.isSmallOrder())return!1;const _e=Hr(tn,Ue.toBytes(),ye.toBytes(),Br);return Ue.add(ye.multiplyUnsafe(_e)).subtract(Ae).clearCofactor().is0()},utils:Or,Point:Lt,lengths:Dr})}(function(Lt,ne={}){const se=function(Dr,gr,Or={},cr){if(cr===void 0&&(cr=Dr==="edwards"),!gr||typeof gr!="object")throw new Error(`expected valid ${Dr} CURVE object`);for(const tn of["p","n","h"]){const vn=gr[tn];if(!(typeof vn=="bigint"&&vn>Qo))throw new Error(`CURVE.${tn} must be positive bigint`)}const Br=Wn(gr.p,Or.Fp,cr),Ye=Wn(gr.n,Or.Fn,cr),ln=["Gx","Gy","a","d"];for(const tn of ln)if(!Br.isValid(gr[tn]))throw new Error(`CURVE.${tn} must be valid field element of CURVE.Fp`);return{CURVE:gr=Object.freeze(Object.assign({},gr)),Fp:Br,Fn:Ye}}("edwards",Lt,ne,ne.FpFnLE),{Fp:ke,Fn:Pe}=se;let rr=se.CURVE;const{h:Ge}=rr;D(ne,{},{uvRatio:"function"});const ue=yo<ke.create(Dr),Je=ne.uvRatio||((Dr,gr)=>{try{return{isValid:!0,value:ke.sqrt(ke.div(Dr,gr))}}catch{return{isValid:!1,value:un}}});if(!function(Dr,gr,Or,cr){const Br=Dr.sqr(Or),Ye=Dr.sqr(cr),ln=Dr.add(Dr.mul(gr.a,Br),Ye),tn=Dr.add(Dr.ONE,Dr.mul(gr.d,Dr.mul(Br,Ye)));return Dr.eql(ln,tn)}(ke,rr,rr.Gx,rr.Gy))throw new Error("bad curve params: generator point");function lr(Dr,gr,Or=!1){return Kt("coordinate "+Dr,gr,Or?xn:un,ue),gr}function Sr(Dr){if(!(Dr instanceof Ir))throw new Error("ExtendedPoint expected")}const Pr=gt((Dr,gr)=>{const{X:Or,Y:cr,Z:Br}=Dr,Ye=Dr.is0();gr==null&&(gr=Ye?bi:ke.inv(Br));const ln=Se(Or*gr),tn=Se(cr*gr),vn=ke.mul(Br,gr);if(Ye)return{x:un,y:xn};if(vn!==xn)throw new Error("invZ was invalid");return{x:ln,y:tn}}),Hr=gt(Dr=>{const{a:gr,d:Or}=rr;if(Dr.is0())throw new Error("bad point: ZERO");const{X:cr,Y:Br,Z:Ye,T:ln}=Dr,tn=Se(cr*cr),vn=Se(Br*Br),Qr=Se(Ye*Ye),fn=Se(Qr*Qr),Vt=Se(tn*gr);if(Se(Qr*Se(Vt+vn))!==Se(fn+Se(Or*Se(tn*vn))))throw new Error("bad point: equation left != right (1)");if(Se(cr*Br)!==Se(Ye*ln))throw new Error("bad point: equation left != right (2)");return!0});class Ir{constructor(gr,Or,cr,Br){this.X=lr("x",gr),this.Y=lr("y",Or),this.Z=lr("z",cr,!0),this.T=lr("t",Br),Object.freeze(this)}static CURVE(){return rr}static fromAffine(gr){if(gr instanceof Ir)throw new Error("extended point not allowed");const{x:Or,y:cr}=gr||{};return lr("x",Or),lr("y",cr),new Ir(Or,cr,xn,Se(Or*cr))}static fromBytes(gr,Or=!1){const cr=ke.BYTES,{a:Br,d:Ye}=rr;gr=Xt(ft(gr,cr,"point")),St(Or,"zip215");const ln=Xt(gr),tn=gr[cr-1];ln[cr-1]=-129&tn;const vn=_(ln),Qr=Or?ue:ke.ORDER;Kt("point.y",vn,un,Qr);const fn=Se(vn*vn),Vt=Se(fn-xn),Qt=Se(Ye*fn-Br);let{isValid:ye,value:Ue}=Je(Vt,Qt);if(!ye)throw new Error("bad point: invalid y coordinate");const Ae=(Ue&xn)===xn,_e=!!(128&tn);if(!Or&&Ue===un&&_e)throw new Error("bad point: x=0 and x_0=1");return _e!==Ae&&(Ue=Se(-Ue)),Ir.fromAffine({x:Ue,y:vn})}static fromHex(gr,Or=!1){return Ir.fromBytes(at("point",gr),Or)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(gr=8,Or=!0){return hn.createCache(this,gr),Or||this.multiply(yo),this}assertValidity(){Hr(this)}equals(gr){Sr(gr);const{X:Or,Y:cr,Z:Br}=this,{X:Ye,Y:ln,Z:tn}=gr,vn=Se(Or*tn),Qr=Se(Ye*Br),fn=Se(cr*tn),Vt=Se(ln*Br);return vn===Qr&&fn===Vt}is0(){return this.equals(Ir.ZERO)}negate(){return new Ir(Se(-this.X),this.Y,this.Z,Se(-this.T))}double(){const{a:gr}=rr,{X:Or,Y:cr,Z:Br}=this,Ye=Se(Or*Or),ln=Se(cr*cr),tn=Se(yo*Se(Br*Br)),vn=Se(gr*Ye),Qr=Or+cr,fn=Se(Se(Qr*Qr)-Ye-ln),Vt=vn+ln,Qt=Vt-tn,ye=vn-ln,Ue=Se(fn*Qt),Ae=Se(Vt*ye),_e=Se(fn*ye),ze=Se(Qt*Vt);return new Ir(Ue,Ae,ze,_e)}add(gr){Sr(gr);const{a:Or,d:cr}=rr,{X:Br,Y:Ye,Z:ln,T:tn}=this,{X:vn,Y:Qr,Z:fn,T:Vt}=gr,Qt=Se(Br*vn),ye=Se(Ye*Qr),Ue=Se(tn*cr*Vt),Ae=Se(ln*fn),_e=Se((Br+Ye)*(vn+Qr)-Qt-ye),ze=Ae-Ue,Be=Ae+Ue,$e=Se(ye-Or*Qt),ir=Se(_e*ze),Xe=Se(Be*$e),zr=Se(_e*$e),en=Se(ze*Be);return new Ir(ir,Xe,en,zr)}subtract(gr){return this.add(gr.negate())}multiply(gr){if(!Pe.isValidNot0(gr))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:Or,f:cr}=hn.cached(this,gr,Br=>kn(Ir,Br));return kn(Ir,[Or,cr])[0]}multiplyUnsafe(gr,Or=Ir.ZERO){if(!Pe.isValid(gr))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return gr===un?Ir.ZERO:this.is0()||gr===xn?this:hn.unsafe(this,gr,cr=>kn(Ir,cr),Or)}isSmallOrder(){return this.multiplyUnsafe(Ge).is0()}isTorsionFree(){return hn.unsafe(this,rr.n).is0()}toAffine(gr){return Pr(this,gr)}clearCofactor(){return Ge===xn?this:this.multiplyUnsafe(Ge)}toBytes(){const{x:gr,y:Or}=this.toAffine(),cr=ke.toBytes(Or);return cr[cr.length-1]|=gr&xn?128:0,cr}toHex(){return ot(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(gr){return kn(Ir,gr)}static msm(gr,Or){return Xr(Ir,Pe,gr,Or)}_setWindowSize(gr){this.precompute(gr)}toRawBytes(){return this.toBytes()}}Ir.BASE=new Ir(rr.Gx,rr.Gy,xn,Se(rr.Gx*rr.Gy)),Ir.ZERO=new Ir(un,xn,xn,un),Ir.Fp=ke,Ir.Fn=Pe;const hn=new Tn(Ir,Pe.BITS);return Ir.BASE.precompute(8),Ir}(n,i),d,Z))}Y("HashToScalar-");const Jo=BigInt(0),Bo=BigInt(1),Ji=BigInt(2),It=(BigInt(3),BigInt(5)),ct=BigInt(8),Zt=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),pe={p:Zt,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:ct,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Gt(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}const be=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function Le(t,n){const i=Zt,d=xe(n*n*n,i),Z=xe(d*d*n,i);let Lt=xe(t*d*function(ue){const Se=BigInt(10),Je=BigInt(20),lr=BigInt(40),Sr=BigInt(80),Pr=Zt,Hr=ue*ue%Pr*ue%Pr,Ir=je(Hr,Ji,Pr)*Hr%Pr,hn=je(Ir,Bo,Pr)*ue%Pr,Dr=je(hn,It,Pr)*hn%Pr,gr=je(Dr,Se,Pr)*Dr%Pr,Or=je(gr,Je,Pr)*gr%Pr,cr=je(Or,lr,Pr)*Or%Pr,Br=je(cr,Sr,Pr)*cr%Pr,Ye=je(Br,Sr,Pr)*cr%Pr,ln=je(Ye,Se,Pr)*Dr%Pr;return{pow_p_5_8:je(ln,Ji,Pr)*ue%Pr,b2:Hr}}(t*Z).pow_p_5_8,i);const ne=xe(n*Lt*Lt,i),se=Lt,ke=xe(Lt*be,i),Pe=ne===t,rr=ne===xe(-t,i),Ge=ne===xe(-t*be,i);return Pe&&(Lt=se),(rr||Ge)&&(Lt=ke),rn(Lt,i)&&(Lt=xe(-Lt,i)),{isValid:Pe||rr,value:Lt}}const De=so(pe.p,{isLE:!0}),he=so(pe.n,{isLE:!0}),ve=Ui({...pe,Fp:De,hash:T,adjustScalarBytes:Gt,uvRatio:Le}),me=be,Ze=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Er=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),fr=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),F=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),nr=t=>Le(Bo,t),Ur=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),rt=t=>ve.Point.Fp.create(_(t)&Ur);function ht(t){const{d:n}=pe,i=Zt,d=Pr=>De.create(Pr),Z=d(me*t*t),Lt=d((Z+Bo)*fr);let ne=BigInt(-1);const se=d((ne-n*Z)*d(Z+n));let{isValid:ke,value:Pe}=Le(Lt,se),rr=d(Pe*t);rn(rr,i)||(rr=d(-rr)),ke||(Pe=rr),ke||(ne=Z);const Ge=d(ne*(Z-Bo)*F-se),ue=Pe*Pe,Se=d((Pe+Pe)*se),Je=d(Ge*Ze),lr=d(Bo-ue),Sr=d(Bo+ue);return new ve.Point(d(Se*Sr),d(lr*Je),d(Je*Sr),d(Se*lr))}class Nt extends pi{constructor(n){super(n)}static fromAffine(n){return new Nt(ve.Point.fromAffine(n))}assertSame(n){if(!(n instanceof Nt))throw new Error("RistrettoPoint expected")}init(n){return new Nt(n)}static hashToCurve(n){return function(i){g(i,64);const d=ht(rt(i.subarray(0,32))),Z=ht(rt(i.subarray(32,64)));return new Nt(d.add(Z))}(at("ristrettoHash",n,64))}static fromBytes(n){g(n,32);const{a:i,d}=pe,Z=Zt,Lt=hn=>De.create(hn),ne=rt(n);if(!function(hn,Dr){if(hn.length!==Dr.length)return!1;let gr=0;for(let Or=0;OrDe.create(Sr),se=ne(ne(d+i)*ne(d-i)),ke=ne(n*i),Pe=ne(ke*ke),{value:rr}=nr(ne(se*Pe)),Ge=ne(rr*se),ue=ne(rr*ke),Se=ne(Ge*ue*Z);let Je;if(rn(Z*Se,Lt)){let Sr=ne(i*me),Pr=ne(n*me);n=Sr,i=Pr,Je=ne(Ge*Er)}else Je=ue;rn(n*Se,Lt)&&(i=ne(-i));let lr=ne((d-i)*Je);return rn(lr,Lt)&&(lr=ne(-lr)),De.toBytes(lr)}equals(n){this.assertSame(n);const{X:i,Y:d}=this.ep,{X:Z,Y:Lt}=n.ep,ne=Pe=>De.create(Pe),se=ne(i*Lt)===ne(d*Z),ke=ne(d*Lt)===ne(i*Z);return se||ke}is0(){return this.equals(Nt.ZERO)}}Nt.BASE=new Nt(ve.Point.BASE),Nt.ZERO=new Nt(ve.Point.ZERO),Nt.Fp=De,Nt.Fn=he;var wt=k(8287).Buffer;function Mt(t,n){return wt.from(ve.sign(wt.from(t),n))}function oe(t,n,i){return ve.verify(wt.from(n),wt.from(t),wt.from(i),{zip215:!1})}var qt=function(t,n){for(var i=typeof t=="number",d=String(t);d.endsWith(n);)d=d.slice(0,-1);return i?Number(d):d},de=k(5360),fe=k(8287).Buffer;function Fe(t){return Fe=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},Fe(t)}function tr(t,n){for(var i=0;i165)return!1;break;default:return!1}var i="";try{i=In(t,n)}catch{return!1}switch(t){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":case"liquidityPool":return i.length===32;case"claimableBalance":return i.length===33;case"med25519PublicKey":return i.length===40;case"signedPayload":return i.length>=40&&i.length<=100;default:return!1}}function In(t,n){if(typeof n!="string")throw new TypeError("encoded argument must be of type String");var i=de.decode(n),d=i[0],Z=i.slice(0,-2),Lt=Z.slice(1),ne=i.slice(-2);if(n!==de.encode(i))throw new Error("invalid encoded string");var se=sr[t];if(se===void 0)throw new Error("".concat(t," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(sr).join(", ")));if(d!==se)throw new Error("invalid version byte. expected ".concat(se,", got ").concat(d));if(!function(ke,Pe){if(ke.length!==Pe.length)return!1;if(ke.length===0)return!0;for(var rr=0;rr>8^t[d]],i&=65535;var Z=new Uint8Array(2);return Z[0]=255&i,Z[1]=i>>8&255,Z}yr=ar,qe=br,(hr=dr(hr="types"))in yr?Object.defineProperty(yr,hr,{value:qe,enumerable:!0,configurable:!0,writable:!0}):yr[hr]=qe;var jo=k(8287).Buffer;function go(t){return go=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},go(t)}function oi(t,n){for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:u.Asset;if(this.isNative())return d.assetTypeNative();this.code.length<=4?(n=u.AlphaNum4,i="assetTypeCreditAlphanum4"):(n=u.AlphaNum12,i="assetTypeCreditAlphanum12");var Z=this.code.length<=4?4:12;return new d(i,new n({assetCode:this.code.padEnd(Z,"\0"),issuer:Bn.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 u.AssetType.assetTypeNative().value:return"native";case u.AssetType.assetTypeCreditAlphanum4().value:return"credit_alphanum4";case u.AssetType.assetTypeCreditAlphanum12().value:return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?u.AssetType.assetTypeNative():this.code.length<=4?u.AssetType.assetTypeCreditAlphanum4():u.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(n){return this.code===n.getCode()&&this.issuer===n.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],[{key:"native",value:function(){return new t("XLM")}},{key:"fromOperation",value:function(n){var i,d;switch(n.switch()){case u.AssetType.assetTypeNative():return this.native();case u.AssetType.assetTypeCreditAlphanum4():i=n.alphaNum4();case u.AssetType.assetTypeCreditAlphanum12():return i=i||n.alphaNum12(),d=ar.encodeEd25519PublicKey(i.issuer().ed25519()),new this(qt(i.assetCode(),"\0"),d);default:throw new Error("Invalid asset type: ".concat(n.switch().name))}}},{key:"compare",value:function(n,i){if(!(n&&n instanceof t))throw new Error("assetA is invalid");if(!(i&&i instanceof t))throw new Error("assetB is invalid");if(n.equals(i))return 0;var d=n.getRawAssetType().value,Z=i.getRawAssetType().value;if(d!==Z)return d1&&arguments[1]!==void 0?arguments[1]:{};if(t!=="constant_product")throw new Error("liquidityPoolType is invalid");var i=n.assetA,d=n.assetB,Z=n.fee;if(!(i&&i instanceof bn))throw new Error("assetA is invalid");if(!(d&&d instanceof bn))throw new Error("assetB is invalid");if(!Z||Z!==Vn)throw new Error("fee is invalid");if(bn.compare(i,d)!==-1)throw new Error("Assets are not in lexicographic order");var Lt=u.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),ne=new u.LiquidityPoolConstantProductParameters({assetA:i.toXDRObject(),assetB:d.toXDRObject(),fee:Z}).toXDR();return f(Mr.concat([Lt,ne]))}var xi=k(8287).Buffer;function Xn(t){return Xn=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},Xn(t)}function Sn(t,n){for(var i=0;i0&&arguments[0]!==void 0?arguments[0]:"",d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(!d||typeof d!="string")throw new Error("Invalid signature");if(!i||typeof i!="string")throw new Error("Invalid publicKey");var Z=xi.from(d,"base64");try{n=(t=Bn.fromPublicKey(i)).signatureHint()}catch{throw new Error("Invalid publicKey")}if(!t.verify(this.hash(),Z))throw new Error("Invalid signature");this.signatures.push(new u.DecoratedSignature({hint:n,signature:Z}))}},{key:"addDecoratedSignature",value:function(t){this.signatures.push(t)}},{key:"signHashX",value:function(t){if(typeof t=="string"&&(t=xi.from(t,"hex")),t.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var n=t,i=f(t),d=i.slice(i.length-4);this.signatures.push(new u.DecoratedSignature({hint:d,signature:n}))}},{key:"hash",value:function(){return f(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")}}]),la=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Aa=Math.ceil,Do=Math.floor,Pn="[BigNumber Error] ",st=Pn+"Number primitive has more than 15 significant digits: ",Wt=1e14,Jt=14,te=9007199254740991,ce=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ce=1e7,Ee=1e9;function kr(t){var n=0|t;return t>0||t===n?n:n-1}function Tr(t){for(var n,i,d=1,Z=t.length,Lt=t[0]+"";dPe^i?1:-1;for(se=(ke=Z.length)<(Pe=Lt.length)?ke:Pe,ne=0;neLt[ne]^i?1:-1;return ke==Pe?0:ke>Pe^i?1:-1}function _r(t,n,i,d){if(ti||t!==Do(t))throw Error(Pn+(d||"Argument")+(typeof t=="number"?ti?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function qr(t){var n=t.c.length-1;return kr(t.e/Jt)==n&&t.c[n]%2!=0}function wr(t,n){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(n<0?"e":"e+")+n}function An(t,n,i){var d,Z;if(n<0){for(Z=i+".";++n;Z+=i);t=Z+t}else if(++n>(d=t.length)){for(Z=i,n-=d;--n;Z+=i);t+=Z}else nIr?Xe.c=Xe.e=null:Vt.e=10;ze/=10,_e++);return void(_e>Ir?Xe.c=Xe.e=null:(Xe.e=_e,Xe.c=[Vt]))}ir=String(Vt)}else{if(!la.test(ir=String(Vt)))return Z(Xe,ir,Be);Xe.s=ir.charCodeAt(0)==45?(ir=ir.slice(1),-1):1}(_e=ir.indexOf("."))>-1&&(ir=ir.replace(".","")),(ze=ir.search(/e/i))>0?(_e<0&&(_e=ze),_e+=+ir.slice(ze+1),ir=ir.substring(0,ze)):_e<0&&(_e=ir.length)}else{if(_r(Qt,2,cr.length,"Base"),Qt==10&&Br)return Qr(Xe=new Ye(Vt),Je+Xe.e+1,lr);if(ir=String(Vt),Be=typeof Vt=="number"){if(0*Vt!=0)return Z(Xe,ir,Be,Qt);if(Xe.s=1/Vt<0?(ir=ir.slice(1),-1):1,Ye.DEBUG&&ir.replace(/^0\.0*|\./,"").length>15)throw Error(st+Vt)}else Xe.s=ir.charCodeAt(0)===45?(ir=ir.slice(1),-1):1;for(ye=cr.slice(0,Qt),_e=ze=0,$e=ir.length;ze<$e;ze++)if(ye.indexOf(Ue=ir.charAt(ze))<0){if(Ue=="."){if(ze>_e){_e=$e;continue}}else if(!Ae&&(ir==ir.toUpperCase()&&(ir=ir.toLowerCase())||ir==ir.toLowerCase()&&(ir=ir.toUpperCase()))){Ae=!0,ze=-1,_e=0;continue}return Z(Xe,String(Vt),Be,Qt)}Be=!1,(_e=(ir=d(ir,Qt,10,Xe.s)).indexOf("."))>-1?ir=ir.replace(".",""):_e=ir.length}for(ze=0;ir.charCodeAt(ze)===48;ze++);for($e=ir.length;ir.charCodeAt(--$e)===48;);if(ir=ir.slice(ze,++$e)){if($e-=ze,Be&&Ye.DEBUG&&$e>15&&(Vt>te||Vt!==Do(Vt)))throw Error(st+Xe.s*Vt);if((_e=_e-ze-1)>Ir)Xe.c=Xe.e=null;else if(_e=Pr)?wr($e,ze):An($e,ze,"0");else if(_e=(Vt=Qr(new Ye(Vt),Qt,ye)).e,Be=($e=Tr(Vt.c)).length,Ue==1||Ue==2&&(Qt<=_e||_e<=Sr)){for(;Beze),$e=An($e,_e,"0"),_e+1>Be){if(--Qt>0)for($e+=".";Qt--;$e+="0");}else if((Qt+=_e-Be)>0)for(_e+1==Be&&($e+=".");Qt--;$e+="0");return Vt.s<0&&Ae?"-"+$e:$e}function tn(Vt,Qt){for(var ye,Ue,Ae=1,_e=new Ye(Vt[0]);Ae=10;Ae/=10,Ue++);return(ye=Ue+ye*Jt-1)>Ir?Vt.c=Vt.e=null:ye=10;Be/=10,Ae++);if((_e=Qt-Ae)<0)_e+=Jt,ze=Qt,$e=zr[ir=0],Xe=Do($e/en[Ae-ze-1]%10);else if((ir=Aa((_e+1)/Jt))>=zr.length){if(!Ue)break t;for(;zr.length<=ir;zr.push(0));$e=Xe=0,Ae=1,ze=(_e%=Jt)-Jt+1}else{for($e=Be=zr[ir],Ae=1;Be>=10;Be/=10,Ae++);Xe=(ze=(_e%=Jt)-Jt+Ae)<0?0:Do($e/en[Ae-ze-1]%10)}if(Ue=Ue||Qt<0||zr[ir+1]!=null||(ze<0?$e:$e%en[Ae-ze-1]),Ue=ye<4?(Xe||Ue)&&(ye==0||ye==(Vt.s<0?3:2)):Xe>5||Xe==5&&(ye==4||Ue||ye==6&&(_e>0?ze>0?$e/en[Ae-ze]:0:zr[ir-1])%10&1||ye==(Vt.s<0?8:7)),Qt<1||!zr[0])return zr.length=0,Ue?(Qt-=Vt.e+1,zr[0]=en[(Jt-Qt%Jt)%Jt],Vt.e=-Qt||0):zr[0]=Vt.e=0,Vt;if(_e==0?(zr.length=ir,Be=1,ir--):(zr.length=ir+1,Be=en[Jt-_e],zr[ir]=ze>0?Do($e/en[Ae-ze]%en[ze])*Be:0),Ue)for(;;){if(ir==0){for(_e=1,ze=zr[0];ze>=10;ze/=10,_e++);for(ze=zr[0]+=Be,Be=1;ze>=10;ze/=10,Be++);_e!=Be&&(Vt.e++,zr[0]==Wt&&(zr[0]=1));break}if(zr[ir]+=Be,zr[ir]!=Wt)break;zr[ir--]=0,Be=1}for(_e=zr.length;zr[--_e]===0;zr.pop());}Vt.e>Ir?Vt.c=Vt.e=null:Vt.e=Pr?wr(Qt,ye):An(Qt,ye,"0"),Vt.s<0?"-"+Qt:Qt)}return Ye.clone=t,Ye.ROUND_UP=0,Ye.ROUND_DOWN=1,Ye.ROUND_CEIL=2,Ye.ROUND_FLOOR=3,Ye.ROUND_HALF_UP=4,Ye.ROUND_HALF_DOWN=5,Ye.ROUND_HALF_EVEN=6,Ye.ROUND_HALF_CEIL=7,Ye.ROUND_HALF_FLOOR=8,Ye.EUCLID=9,Ye.config=Ye.set=function(Vt){var Qt,ye;if(Vt!=null){if(typeof Vt!="object")throw Error(Pn+"Object expected: "+Vt);if(Vt.hasOwnProperty(Qt="DECIMAL_PLACES")&&(_r(ye=Vt[Qt],0,Ee,Qt),Je=ye),Vt.hasOwnProperty(Qt="ROUNDING_MODE")&&(_r(ye=Vt[Qt],0,8,Qt),lr=ye),Vt.hasOwnProperty(Qt="EXPONENTIAL_AT")&&((ye=Vt[Qt])&&ye.pop?(_r(ye[0],-Ee,0,Qt),_r(ye[1],0,Ee,Qt),Sr=ye[0],Pr=ye[1]):(_r(ye,-Ee,Ee,Qt),Sr=-(Pr=ye<0?-ye:ye))),Vt.hasOwnProperty(Qt="RANGE"))if((ye=Vt[Qt])&&ye.pop)_r(ye[0],-Ee,-1,Qt),_r(ye[1],1,Ee,Qt),Hr=ye[0],Ir=ye[1];else{if(_r(ye,-Ee,Ee,Qt),!ye)throw Error(Pn+Qt+" cannot be zero: "+ye);Hr=-(Ir=ye<0?-ye:ye)}if(Vt.hasOwnProperty(Qt="CRYPTO")){if((ye=Vt[Qt])!==!!ye)throw Error(Pn+Qt+" not true or false: "+ye);if(ye){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw hn=!ye,Error(Pn+"crypto unavailable");hn=ye}else hn=ye}if(Vt.hasOwnProperty(Qt="MODULO_MODE")&&(_r(ye=Vt[Qt],0,9,Qt),Dr=ye),Vt.hasOwnProperty(Qt="POW_PRECISION")&&(_r(ye=Vt[Qt],0,Ee,Qt),gr=ye),Vt.hasOwnProperty(Qt="FORMAT")){if(typeof(ye=Vt[Qt])!="object")throw Error(Pn+Qt+" not an object: "+ye);Or=ye}if(Vt.hasOwnProperty(Qt="ALPHABET")){if(typeof(ye=Vt[Qt])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(ye))throw Error(Pn+Qt+" invalid: "+ye);Br=ye.slice(0,10)=="0123456789",cr=ye}}return{DECIMAL_PLACES:Je,ROUNDING_MODE:lr,EXPONENTIAL_AT:[Sr,Pr],RANGE:[Hr,Ir],CRYPTO:hn,MODULO_MODE:Dr,POW_PRECISION:gr,FORMAT:Or,ALPHABET:cr}},Ye.isBigNumber=function(Vt){if(!Vt||Vt._isBigNumber!==!0)return!1;if(!Ye.DEBUG)return!0;var Qt,ye,Ue=Vt.c,Ae=Vt.e,_e=Vt.s;t:if({}.toString.call(Ue)=="[object Array]"){if((_e===1||_e===-1)&&Ae>=-Ee&&Ae<=Ee&&Ae===Do(Ae)){if(Ue[0]===0){if(Ae===0&&Ue.length===1)return!0;break t}if((Qt=(Ae+1)%Jt)<1&&(Qt+=Jt),String(Ue[0]).length==Qt){for(Qt=0;Qt=Wt||ye!==Do(ye))break t;if(ye!==0)return!0}}}else if(Ue===null&&Ae===null&&(_e===null||_e===1||_e===-1))return!0;throw Error(Pn+"Invalid BigNumber: "+Vt)},Ye.maximum=Ye.max=function(){return tn(arguments,-1)},Ye.minimum=Ye.min=function(){return tn(arguments,1)},Ye.random=(Lt=9007199254740992,ne=Math.random()*Lt&2097151?function(){return Do(Math.random()*Lt)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(Vt){var Qt,ye,Ue,Ae,_e,ze=0,Be=[],$e=new Ye(Se);if(Vt==null?Vt=Je:_r(Vt,0,Ee),Ae=Aa(Vt/Jt),hn)if(crypto.getRandomValues){for(Qt=crypto.getRandomValues(new Uint32Array(Ae*=2));ze>>11))>=9e15?(ye=crypto.getRandomValues(new Uint32Array(2)),Qt[ze]=ye[0],Qt[ze+1]=ye[1]):(Be.push(_e%1e14),ze+=2);ze=Ae/2}else{if(!crypto.randomBytes)throw hn=!1,Error(Pn+"crypto unavailable");for(Qt=crypto.randomBytes(Ae*=7);ze=9e15?crypto.randomBytes(7).copy(Qt,ze):(Be.push(_e%1e14),ze+=7);ze=Ae/7}if(!hn)for(;ze=10;_e/=10,ze++);zeAe-1&&($e[ze+1]==null&&($e[ze+1]=0),$e[ze+1]+=$e[ze]/Ae|0,$e[ze]%=Ae)}return $e.reverse()}return function(ye,Ue,Ae,_e,ze){var Be,$e,ir,Xe,zr,en,yn,zn,Co=ye.indexOf("."),qo=Je,Mn=lr;for(Co>=0&&(Xe=gr,gr=0,ye=ye.replace(".",""),en=(zn=new Ye(Ue)).pow(ye.length-Co),gr=Xe,zn.c=Qt(An(Tr(en.c),en.e,"0"),10,Ae,Vt),zn.e=zn.c.length),ir=Xe=(yn=Qt(ye,Ue,Ae,ze?(Be=cr,Vt):(Be=Vt,cr))).length;yn[--Xe]==0;yn.pop());if(!yn[0])return Be.charAt(0);if(Co<0?--ir:(en.c=yn,en.e=ir,en.s=_e,yn=(en=i(en,zn,qo,Mn,Ae)).c,zr=en.r,ir=en.e),Co=yn[$e=ir+qo+1],Xe=Ae/2,zr=zr||$e<0||yn[$e+1]!=null,zr=Mn<4?(Co!=null||zr)&&(Mn==0||Mn==(en.s<0?3:2)):Co>Xe||Co==Xe&&(Mn==4||zr||Mn==6&&1&yn[$e-1]||Mn==(en.s<0?8:7)),$e<1||!yn[0])ye=zr?An(Be.charAt(1),-qo,Be.charAt(0)):Be.charAt(0);else{if(yn.length=$e,zr)for(--Ae;++yn[--$e]>Ae;)yn[$e]=0,$e||(++ir,yn=[1].concat(yn));for(Xe=yn.length;!yn[--Xe];);for(Co=0,ye="";Co<=Xe;ye+=Be.charAt(yn[Co++]));ye=An(ye,ir,Be.charAt(0))}return ye}}(),i=function(){function Vt(Ue,Ae,_e){var ze,Be,$e,ir,Xe=0,zr=Ue.length,en=Ae%Ce,yn=Ae/Ce|0;for(Ue=Ue.slice();zr--;)Xe=((Be=en*($e=Ue[zr]%Ce)+(ze=yn*$e+(ir=Ue[zr]/Ce|0)*en)%Ce*Ce+Xe)/_e|0)+(ze/Ce|0)+yn*ir,Ue[zr]=Be%_e;return Xe&&(Ue=[Xe].concat(Ue)),Ue}function Qt(Ue,Ae,_e,ze){var Be,$e;if(_e!=ze)$e=_e>ze?1:-1;else for(Be=$e=0;Be<_e;Be++)if(Ue[Be]!=Ae[Be]){$e=Ue[Be]>Ae[Be]?1:-1;break}return $e}function ye(Ue,Ae,_e,ze){for(var Be=0;_e--;)Ue[_e]-=Be,Be=Ue[_e]1;Ue.splice(0,1));}return function(Ue,Ae,_e,ze,Be){var $e,ir,Xe,zr,en,yn,zn,Co,qo,Mn,Jn,si,ac,Hl,Gl,na,ou,Li=Ue.s==Ae.s?1:-1,hi=Ue.c,Oo=Ae.c;if(!(hi&&hi[0]&&Oo&&Oo[0]))return new Ye(Ue.s&&Ae.s&&(hi?!Oo||hi[0]!=Oo[0]:Oo)?hi&&hi[0]==0||!Oo?0*Li:Li/0:NaN);for(qo=(Co=new Ye(Li)).c=[],Li=_e+(ir=Ue.e-Ae.e)+1,Be||(Be=Wt,ir=kr(Ue.e/Jt)-kr(Ae.e/Jt),Li=Li/Jt|0),Xe=0;Oo[Xe]==(hi[Xe]||0);Xe++);if(Oo[Xe]>(hi[Xe]||0)&&ir--,Li<0)qo.push(1),zr=!0;else{for(Hl=hi.length,na=Oo.length,Xe=0,Li+=2,(en=Do(Be/(Oo[0]+1)))>1&&(Oo=Vt(Oo,en,Be),hi=Vt(hi,en,Be),na=Oo.length,Hl=hi.length),ac=na,Jn=(Mn=hi.slice(0,na)).length;Jn=Be/2&&Gl++;do{if(en=0,($e=Qt(Oo,Mn,na,Jn))<0){if(si=Mn[0],na!=Jn&&(si=si*Be+(Mn[1]||0)),(en=Do(si/Gl))>1)for(en>=Be&&(en=Be-1),zn=(yn=Vt(Oo,en,Be)).length,Jn=Mn.length;Qt(yn,Mn,zn,Jn)==1;)en--,ye(yn,na=10;Li/=10,Xe++);Qr(Co,_e+(Co.e=Xe+ir*Jt-1)+1,ze,zr)}else Co.e=ir,Co.r=+zr;return Co}}(),se=/^(-?)0([xbo])(?=\w[\w.]*$)/i,ke=/^([^.]+)\.$/,Pe=/^\.([^.]+)$/,rr=/^-?(Infinity|NaN)$/,Ge=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Z=function(Vt,Qt,ye,Ue){var Ae,_e=ye?Qt:Qt.replace(Ge,"");if(rr.test(_e))Vt.s=isNaN(_e)?null:_e<0?-1:1;else{if(!ye&&(_e=_e.replace(se,function(ze,Be,$e){return Ae=($e=$e.toLowerCase())=="x"?16:$e=="b"?2:8,Ue&&Ue!=Ae?ze:Be}),Ue&&(Ae=Ue,_e=_e.replace(ke,"$1").replace(Pe,"0.$1")),Qt!=_e))return new Ye(_e,Ae);if(Ye.DEBUG)throw Error(Pn+"Not a"+(Ue?" base "+Ue:"")+" number: "+Qt);Vt.s=null}Vt.c=Vt.e=null},ue.absoluteValue=ue.abs=function(){var Vt=new Ye(this);return Vt.s<0&&(Vt.s=1),Vt},ue.comparedTo=function(Vt,Qt){return Wr(this,new Ye(Vt,Qt))},ue.decimalPlaces=ue.dp=function(Vt,Qt){var ye,Ue,Ae,_e=this;if(Vt!=null)return _r(Vt,0,Ee),Qt==null?Qt=lr:_r(Qt,0,8),Qr(new Ye(_e),Vt+_e.e+1,Qt);if(!(ye=_e.c))return null;if(Ue=((Ae=ye.length-1)-kr(this.e/Jt))*Jt,Ae=ye[Ae])for(;Ae%10==0;Ae/=10,Ue--);return Ue<0&&(Ue=0),Ue},ue.dividedBy=ue.div=function(Vt,Qt){return i(this,new Ye(Vt,Qt),Je,lr)},ue.dividedToIntegerBy=ue.idiv=function(Vt,Qt){return i(this,new Ye(Vt,Qt),0,1)},ue.exponentiatedBy=ue.pow=function(Vt,Qt){var ye,Ue,Ae,_e,ze,Be,$e,ir,Xe=this;if((Vt=new Ye(Vt)).c&&!Vt.isInteger())throw Error(Pn+"Exponent not an integer: "+fn(Vt));if(Qt!=null&&(Qt=new Ye(Qt)),ze=Vt.e>14,!Xe.c||!Xe.c[0]||Xe.c[0]==1&&!Xe.e&&Xe.c.length==1||!Vt.c||!Vt.c[0])return ir=new Ye(Math.pow(+fn(Xe),ze?Vt.s*(2-qr(Vt)):+fn(Vt))),Qt?ir.mod(Qt):ir;if(Be=Vt.s<0,Qt){if(Qt.c?!Qt.c[0]:!Qt.s)return new Ye(NaN);(Ue=!Be&&Xe.isInteger()&&Qt.isInteger())&&(Xe=Xe.mod(Qt))}else{if(Vt.e>9&&(Xe.e>0||Xe.e<-1||(Xe.e==0?Xe.c[0]>1||ze&&Xe.c[1]>=24e7:Xe.c[0]<8e13||ze&&Xe.c[0]<=9999975e7)))return _e=Xe.s<0&&qr(Vt)?-0:0,Xe.e>-1&&(_e=1/_e),new Ye(Be?1/_e:_e);gr&&(_e=Aa(gr/Jt+2))}for(ze?(ye=new Ye(.5),Be&&(Vt.s=1),$e=qr(Vt)):$e=(Ae=Math.abs(+fn(Vt)))%2,ir=new Ye(Se);;){if($e){if(!(ir=ir.times(Xe)).c)break;_e?ir.c.length>_e&&(ir.c.length=_e):Ue&&(ir=ir.mod(Qt))}if(Ae){if((Ae=Do(Ae/2))===0)break;$e=Ae%2}else if(Qr(Vt=Vt.times(ye),Vt.e+1,1),Vt.e>14)$e=qr(Vt);else{if((Ae=+fn(Vt))==0)break;$e=Ae%2}Xe=Xe.times(Xe),_e?Xe.c&&Xe.c.length>_e&&(Xe.c.length=_e):Ue&&(Xe=Xe.mod(Qt))}return Ue?ir:(Be&&(ir=Se.div(ir)),Qt?ir.mod(Qt):_e?Qr(ir,gr,lr,void 0):ir)},ue.integerValue=function(Vt){var Qt=new Ye(this);return Vt==null?Vt=lr:_r(Vt,0,8),Qr(Qt,Qt.e+1,Vt)},ue.isEqualTo=ue.eq=function(Vt,Qt){return Wr(this,new Ye(Vt,Qt))===0},ue.isFinite=function(){return!!this.c},ue.isGreaterThan=ue.gt=function(Vt,Qt){return Wr(this,new Ye(Vt,Qt))>0},ue.isGreaterThanOrEqualTo=ue.gte=function(Vt,Qt){return(Qt=Wr(this,new Ye(Vt,Qt)))===1||Qt===0},ue.isInteger=function(){return!!this.c&&kr(this.e/Jt)>this.c.length-2},ue.isLessThan=ue.lt=function(Vt,Qt){return Wr(this,new Ye(Vt,Qt))<0},ue.isLessThanOrEqualTo=ue.lte=function(Vt,Qt){return(Qt=Wr(this,new Ye(Vt,Qt)))===-1||Qt===0},ue.isNaN=function(){return!this.s},ue.isNegative=function(){return this.s<0},ue.isPositive=function(){return this.s>0},ue.isZero=function(){return!!this.c&&this.c[0]==0},ue.minus=function(Vt,Qt){var ye,Ue,Ae,_e,ze=this,Be=ze.s;if(Qt=(Vt=new Ye(Vt,Qt)).s,!Be||!Qt)return new Ye(NaN);if(Be!=Qt)return Vt.s=-Qt,ze.plus(Vt);var $e=ze.e/Jt,ir=Vt.e/Jt,Xe=ze.c,zr=Vt.c;if(!$e||!ir){if(!Xe||!zr)return Xe?(Vt.s=-Qt,Vt):new Ye(zr?ze:NaN);if(!Xe[0]||!zr[0])return zr[0]?(Vt.s=-Qt,Vt):new Ye(Xe[0]?ze:lr==3?-0:0)}if($e=kr($e),ir=kr(ir),Xe=Xe.slice(),Be=$e-ir){for((_e=Be<0)?(Be=-Be,Ae=Xe):(ir=$e,Ae=zr),Ae.reverse(),Qt=Be;Qt--;Ae.push(0));Ae.reverse()}else for(Ue=(_e=(Be=Xe.length)<(Qt=zr.length))?Be:Qt,Be=Qt=0;Qt0)for(;Qt--;Xe[ye++]=0);for(Qt=Wt-1;Ue>Be;){if(Xe[--Ue]=0;){for(ye=0,en=si[Ae]%qo,yn=si[Ae]/qo|0,_e=Ae+(ze=$e);_e>Ae;)ye=((ir=en*(ir=Jn[--ze]%qo)+(Be=yn*ir+(Xe=Jn[ze]/qo|0)*en)%qo*qo+zn[_e]+ye)/Co|0)+(Be/qo|0)+yn*Xe,zn[_e--]=ir%Co;zn[_e]=ye}return ye?++Ue:zn.splice(0,1),vn(Vt,zn,Ue)},ue.negated=function(){var Vt=new Ye(this);return Vt.s=-Vt.s||null,Vt},ue.plus=function(Vt,Qt){var ye,Ue=this,Ae=Ue.s;if(Qt=(Vt=new Ye(Vt,Qt)).s,!Ae||!Qt)return new Ye(NaN);if(Ae!=Qt)return Vt.s=-Qt,Ue.minus(Vt);var _e=Ue.e/Jt,ze=Vt.e/Jt,Be=Ue.c,$e=Vt.c;if(!_e||!ze){if(!Be||!$e)return new Ye(Ae/0);if(!Be[0]||!$e[0])return $e[0]?Vt:new Ye(Be[0]?Ue:0*Ae)}if(_e=kr(_e),ze=kr(ze),Be=Be.slice(),Ae=_e-ze){for(Ae>0?(ze=_e,ye=$e):(Ae=-Ae,ye=Be),ye.reverse();Ae--;ye.push(0));ye.reverse()}for((Ae=Be.length)-(Qt=$e.length)<0&&(ye=$e,$e=Be,Be=ye,Qt=Ae),Ae=0;Qt;)Ae=(Be[--Qt]=Be[Qt]+$e[Qt]+Ae)/Wt|0,Be[Qt]=Wt===Be[Qt]?0:Be[Qt]%Wt;return Ae&&(Be=[Ae].concat(Be),++ze),vn(Vt,Be,ze)},ue.precision=ue.sd=function(Vt,Qt){var ye,Ue,Ae,_e=this;if(Vt!=null&&Vt!==!!Vt)return _r(Vt,1,Ee),Qt==null?Qt=lr:_r(Qt,0,8),Qr(new Ye(_e),Vt,Qt);if(!(ye=_e.c))return null;if(Ue=(Ae=ye.length-1)*Jt+1,Ae=ye[Ae]){for(;Ae%10==0;Ae/=10,Ue--);for(Ae=ye[0];Ae>=10;Ae/=10,Ue++);}return Vt&&_e.e+1>Ue&&(Ue=_e.e+1),Ue},ue.shiftedBy=function(Vt){return _r(Vt,-9007199254740991,te),this.times("1e"+Vt)},ue.squareRoot=ue.sqrt=function(){var Vt,Qt,ye,Ue,Ae,_e=this,ze=_e.c,Be=_e.s,$e=_e.e,ir=Je+4,Xe=new Ye("0.5");if(Be!==1||!ze||!ze[0])return new Ye(!Be||Be<0&&(!ze||ze[0])?NaN:ze?_e:1/0);if((Be=Math.sqrt(+fn(_e)))==0||Be==1/0?(((Qt=Tr(ze)).length+$e)%2==0&&(Qt+="0"),Be=Math.sqrt(+Qt),$e=kr(($e+1)/2)-($e<0||$e%2),ye=new Ye(Qt=Be==1/0?"5e"+$e:(Qt=Be.toExponential()).slice(0,Qt.indexOf("e")+1)+$e)):ye=new Ye(Be+""),ye.c[0]){for((Be=($e=ye.e)+ir)<3&&(Be=0);;)if(Ae=ye,ye=Xe.times(Ae.plus(i(_e,Ae,ir,1))),Tr(Ae.c).slice(0,Be)===(Qt=Tr(ye.c)).slice(0,Be)){if(ye.e<$e&&--Be,(Qt=Qt.slice(Be-3,Be+1))!="9999"&&(Ue||Qt!="4999")){+Qt&&(+Qt.slice(1)||Qt.charAt(0)!="5")||(Qr(ye,ye.e+Je+2,1),Vt=!ye.times(ye).eq(_e));break}if(!Ue&&(Qr(Ae,Ae.e+Je+2,0),Ae.times(Ae).eq(_e))){ye=Ae;break}ir+=4,Be+=4,Ue=1}}return Qr(ye,ye.e+Je+1,lr,Vt)},ue.toExponential=function(Vt,Qt){return Vt!=null&&(_r(Vt,0,Ee),Vt++),ln(this,Vt,Qt,1)},ue.toFixed=function(Vt,Qt){return Vt!=null&&(_r(Vt,0,Ee),Vt=Vt+this.e+1),ln(this,Vt,Qt)},ue.toFormat=function(Vt,Qt,ye){var Ue,Ae=this;if(ye==null)Vt!=null&&Qt&&typeof Qt=="object"?(ye=Qt,Qt=null):Vt&&typeof Vt=="object"?(ye=Vt,Vt=Qt=null):ye=Or;else if(typeof ye!="object")throw Error(Pn+"Argument not an object: "+ye);if(Ue=Ae.toFixed(Vt,Qt),Ae.c){var _e,ze=Ue.split("."),Be=+ye.groupSize,$e=+ye.secondaryGroupSize,ir=ye.groupSeparator||"",Xe=ze[0],zr=ze[1],en=Ae.s<0,yn=en?Xe.slice(1):Xe,zn=yn.length;if($e&&(_e=Be,Be=$e,$e=_e,zn-=_e),Be>0&&zn>0){for(_e=zn%Be||Be,Xe=yn.substr(0,_e);_e0&&(Xe+=ir+yn.slice(_e)),en&&(Xe="-"+Xe)}Ue=zr?Xe+(ye.decimalSeparator||"")+(($e=+ye.fractionGroupSize)?zr.replace(new RegExp("\\d{"+$e+"}\\B","g"),"$&"+(ye.fractionGroupSeparator||"")):zr):Xe}return(ye.prefix||"")+Ue+(ye.suffix||"")},ue.toFraction=function(Vt){var Qt,ye,Ue,Ae,_e,ze,Be,$e,ir,Xe,zr,en,yn=this,zn=yn.c;if(Vt!=null&&(!(Be=new Ye(Vt)).isInteger()&&(Be.c||Be.s!==1)||Be.lt(Se)))throw Error(Pn+"Argument "+(Be.isInteger()?"out of range: ":"not an integer: ")+fn(Be));if(!zn)return new Ye(yn);for(Qt=new Ye(Se),ir=ye=new Ye(Se),Ue=$e=new Ye(Se),en=Tr(zn),_e=Qt.e=en.length-yn.e-1,Qt.c[0]=ce[(ze=_e%Jt)<0?Jt+ze:ze],Vt=!Vt||Be.comparedTo(Qt)>0?_e>0?Qt:ir:Be,ze=Ir,Ir=1/0,Be=new Ye(en),$e.c[0]=0;Xe=i(Be,Qt,0,1),(Ae=ye.plus(Xe.times(Ue))).comparedTo(Vt)!=1;)ye=Ue,Ue=Ae,ir=$e.plus(Xe.times(Ae=ir)),$e=Ae,Qt=Be.minus(Xe.times(Ae=Qt)),Be=Ae;return Ae=i(Vt.minus(ye),Ue,0,1),$e=$e.plus(Ae.times(ir)),ye=ye.plus(Ae.times(Ue)),$e.s=ir.s=yn.s,zr=i(ir,Ue,_e*=2,lr).minus(yn).abs().comparedTo(i($e,ye,_e,lr).minus(yn).abs())<1?[ir,Ue]:[$e,ye],Ir=ze,zr},ue.toNumber=function(){return+fn(this)},ue.toPrecision=function(Vt,Qt){return Vt!=null&&_r(Vt,1,Ee),ln(this,Vt,Qt,2)},ue.toString=function(Vt){var Qt,ye=this,Ue=ye.s,Ae=ye.e;return Ae===null?Ue?(Qt="Infinity",Ue<0&&(Qt="-"+Qt)):Qt="NaN":(Vt==null?Qt=Ae<=Sr||Ae>=Pr?wr(Tr(ye.c),Ae):An(Tr(ye.c),Ae,"0"):Vt===10&&Br?Qt=An(Tr((ye=Qr(new Ye(ye),Je+Ae+1,lr)).c),ye.e,"0"):(_r(Vt,2,cr.length,"Base"),Qt=d(An(Tr(ye.c),Ae,"0"),10,Vt,Ue,!0)),Ue<0&&ye.c[0]&&(Qt="-"+Qt)),Qt},ue.valueOf=ue.toJSON=function(){return fn(this)},ue._isBigNumber=!0,ue[Symbol.toStringTag]="BigNumber",ue[Symbol.for("nodejs.util.inspect.custom")]=ue.valueOf,n!=null&&Ye.set(n),Ye}(),nn=cn.clone();nn.DEBUG=!0;const Kr=nn;function dn(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,d=Array(n);i=0&&t<=255)return!0;throw new Error("".concat(n," value must be between 0 and 255"))}var Rr=k(8287).Buffer;function Rn(t){return Rn=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},Rn(t)}var Kn=k(8287).Buffer;function Fn(t){return Fn=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},Fn(t)}function Uo(t,n){for(var i=0;it.length)&&(n=t.length);for(var i=0,d=Array(n);i1&&arguments[1]!==void 0&&arguments[1];if(typeof t!="string")return!1;try{n=new Kr(t)}catch{return!1}return!(!i&&n.isZero()||n.isNegative()||n.times(En).gt(new Kr("9223372036854775807").toString())||n.decimalPlaces()>7||n.isNaN()||!n.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,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(n!==void 0)switch(typeof n=="string"&&(n=parseFloat(n)),!0){case(typeof n!="number"||!Number.isFinite(n)||n%1!=0):throw new Error("".concat(t," value is invalid"));case n<0:throw new Error("".concat(t," value must be unsigned"));case(!i||i&&i(n,t)):return n;default:throw new Error("".concat(t," value is invalid"))}}},{key:"_toXDRAmount",value:function(t){var n=new Kr(t).times(En);return y.Hyper.fromString(n.toString())}},{key:"_fromXDRAmount",value:function(t){return new Kr(t).div(En).toFixed(7)}},{key:"_fromXDRPrice",value:function(t){return new Kr(t.n()).div(new Kr(t.d())).toString()}},{key:"_toXDRPrice",value:function(t){var n;if(t.n!==void 0&&t.d!==void 0)n=new u.Price(t);else{var i=function(d){for(var Z,Lt,ne=new Kr(d),se=[[new Kr(0),new Kr(1)],[new Kr(1),new Kr(0)]],ke=2;!ne.gt(fo);){Z=ne.integerValue(Kr.ROUND_FLOOR),Lt=ne.minus(Z);var Pe=Z.times(se[ke-1][0]).plus(se[ke-2][0]),rr=Z.times(se[ke-1][1]).plus(se[ke-2][1]);if(Pe.gt(fo)||rr.gt(fo)||(se.push([Pe,rr]),Lt.eq(0)))break;ne=new Kr(1).div(Lt),ke+=1}var Ge=function(Je,lr){return function(Sr){if(Array.isArray(Sr))return Sr}(Je)||function(Sr,Pr){var Hr=Sr==null?null:typeof Symbol<"u"&&Sr[Symbol.iterator]||Sr["@@iterator"];if(Hr!=null){var Ir,hn,Dr,gr,Or=[],cr=!0,Br=!1;try{if(Dr=(Hr=Hr.call(Sr)).next,Pr!==0)for(;!(cr=(Ir=Dr.call(Hr)).done)&&(Or.push(Ir.value),Or.length!==Pr);cr=!0);}catch(Ye){Br=!0,hn=Ye}finally{try{if(!cr&&Hr.return!=null&&(gr=Hr.return(),Object(gr)!==gr))return}finally{if(Br)throw hn}}return Or}}(Je,lr)||function(Sr,Pr){if(Sr){if(typeof Sr=="string")return dn(Sr,Pr);var Hr={}.toString.call(Sr).slice(8,-1);return Hr==="Object"&&Sr.constructor&&(Hr=Sr.constructor.name),Hr==="Map"||Hr==="Set"?Array.from(Sr):Hr==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Hr)?dn(Sr,Pr):void 0}}(Je,lr)||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.`)}()}(se[se.length-1],2),ue=Ge[0],Se=Ge[1];if(ue.isZero()||Se.isZero())throw new Error("Couldn't find approximation");return[ue.toNumber(),Se.toNumber()]}(t);n=new u.Price({n:parseInt(i[0],10),d:parseInt(i[1],10)})}if(n.n()<0||n.d()<0)throw new Error("price must be positive");return n}}]);function on(t){return ar.encodeEd25519PublicKey(t.ed25519())}$r.accountMerge=function(t){var n={};try{n.body=u.OperationBody.accountMerge(jt(t.destination))}catch{throw new Error("destination is invalid")}return this.setSourceAccount(n,t),new u.Operation(n)},$r.allowTrust=function(t){if(!ar.isValidEd25519PublicKey(t.trustor))throw new Error("trustor is invalid");var n={};if(n.trustor=Bn.fromPublicKey(t.trustor).xdrAccountId(),t.assetCode.length<=4){var i=t.assetCode.padEnd(4,"\0");n.asset=u.AssetCode.assetTypeCreditAlphanum4(i)}else{if(!(t.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var d=t.assetCode.padEnd(12,"\0");n.asset=u.AssetCode.assetTypeCreditAlphanum12(d)}typeof t.authorize=="boolean"?t.authorize?n.authorize=u.TrustLineFlags.authorizedFlag().value:n.authorize=0:n.authorize=t.authorize;var Z=new u.AllowTrustOp(n),Lt={};return Lt.body=u.OperationBody.allowTrust(Z),this.setSourceAccount(Lt,t),new u.Operation(Lt)},$r.bumpSequence=function(t){var n={};if(typeof t.bumpTo!="string")throw new Error("bumpTo must be a string");try{new Kr(t.bumpTo)}catch{throw new Error("bumpTo must be a stringified number")}n.bumpTo=y.Hyper.fromString(t.bumpTo);var i=new u.BumpSequenceOp(n),d={};return d.body=u.OperationBody.bumpSequence(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.changeTrust=function(t){var n={};if(t.asset instanceof bn)n.line=t.asset.toChangeTrustXDRObject();else{if(!(t.asset instanceof fa))throw new TypeError("asset must be Asset or LiquidityPoolAsset");n.line=t.asset.toXDRObject()}if(t.limit!==void 0&&!this.isValidAmount(t.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));t.limit?n.limit=this._toXDRAmount(t.limit):n.limit=y.Hyper.fromString(new Kr("9223372036854775807").toString()),t.source&&(n.source=t.source.masterKeypair);var i=new u.ChangeTrustOp(n),d={};return d.body=u.OperationBody.changeTrust(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.createAccount=function(t){if(!ar.isValidEd25519PublicKey(t.destination))throw new Error("destination is invalid");if(!this.isValidAmount(t.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var n={};n.destination=Bn.fromPublicKey(t.destination).xdrAccountId(),n.startingBalance=this._toXDRAmount(t.startingBalance);var i=new u.CreateAccountOp(n),d={};return d.body=u.OperationBody.createAccount(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.createClaimableBalance=function(t){if(!(t.asset instanceof bn))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 n={};n.asset=t.asset.toXDRObject(),n.amount=this._toXDRAmount(t.amount),n.claimants=Object.values(t.claimants).map(function(Z){return Z.toXDRObject()});var i=new u.CreateClaimableBalanceOp(n),d={};return d.body=u.OperationBody.createClaimableBalance(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.claimClaimableBalance=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pr(t.balanceId);var n={};n.balanceId=u.ClaimableBalanceId.fromXDR(t.balanceId,"hex");var i=new u.ClaimClaimableBalanceOp(n),d={};return d.body=u.OperationBody.claimClaimableBalance(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.clawbackClaimableBalance=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pr(t.balanceId);var n={balanceId:u.ClaimableBalanceId.fromXDR(t.balanceId,"hex")},i={body:u.OperationBody.clawbackClaimableBalance(new u.ClawbackClaimableBalanceOp(n))};return this.setSourceAccount(i,t),new u.Operation(i)},$r.createPassiveSellOffer=function(t){var n={};if(n.selling=t.selling.toXDRObject(),n.buying=t.buying.toXDRObject(),!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(n.amount=this._toXDRAmount(t.amount),t.price===void 0)throw new TypeError("price argument is required");n.price=this._toXDRPrice(t.price);var i=new u.CreatePassiveSellOfferOp(n),d={};return d.body=u.OperationBody.createPassiveSellOffer(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.inflation=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n={};return n.body=u.OperationBody.inflation(),this.setSourceAccount(n,t),new u.Operation(n)},$r.manageData=function(t){var n={};if(!(typeof t.name=="string"&&t.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(n.dataName=t.name,typeof t.value!="string"&&!Fr.isBuffer(t.value)&&t.value!==null)throw new Error("value must be a string, Buffer or null");if(typeof t.value=="string"?n.dataValue=Fr.from(t.value):n.dataValue=t.value,n.dataValue!==null&&n.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var i=new u.ManageDataOp(n),d={};return d.body=u.OperationBody.manageData(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.manageSellOffer=function(t){var n={};if(n.selling=t.selling.toXDRObject(),n.buying=t.buying.toXDRObject(),!this.isValidAmount(t.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(n.amount=this._toXDRAmount(t.amount),t.price===void 0)throw new TypeError("price argument is required");n.price=this._toXDRPrice(t.price),t.offerId!==void 0?t.offerId=t.offerId.toString():t.offerId="0",n.offerId=y.Hyper.fromString(t.offerId);var i=new u.ManageSellOfferOp(n),d={};return d.body=u.OperationBody.manageSellOffer(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.manageBuyOffer=function(t){var n={};if(n.selling=t.selling.toXDRObject(),n.buying=t.buying.toXDRObject(),!this.isValidAmount(t.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(n.buyAmount=this._toXDRAmount(t.buyAmount),t.price===void 0)throw new TypeError("price argument is required");n.price=this._toXDRPrice(t.price),t.offerId!==void 0?t.offerId=t.offerId.toString():t.offerId="0",n.offerId=y.Hyper.fromString(t.offerId);var i=new u.ManageBuyOfferOp(n),d={};return d.body=u.OperationBody.manageBuyOffer(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.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 n={};n.sendAsset=t.sendAsset.toXDRObject(),n.sendMax=this._toXDRAmount(t.sendMax);try{n.destination=jt(t.destination)}catch{throw new Error("destination is invalid")}n.destAsset=t.destAsset.toXDRObject(),n.destAmount=this._toXDRAmount(t.destAmount);var i=t.path?t.path:[];n.path=i.map(function(Lt){return Lt.toXDRObject()});var d=new u.PathPaymentStrictReceiveOp(n),Z={};return Z.body=u.OperationBody.pathPaymentStrictReceive(d),this.setSourceAccount(Z,t),new u.Operation(Z)},$r.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 n={};n.sendAsset=t.sendAsset.toXDRObject(),n.sendAmount=this._toXDRAmount(t.sendAmount);try{n.destination=jt(t.destination)}catch{throw new Error("destination is invalid")}n.destAsset=t.destAsset.toXDRObject(),n.destMin=this._toXDRAmount(t.destMin);var i=t.path?t.path:[];n.path=i.map(function(Lt){return Lt.toXDRObject()});var d=new u.PathPaymentStrictSendOp(n),Z={};return Z.body=u.OperationBody.pathPaymentStrictSend(d),this.setSourceAccount(Z,t),new u.Operation(Z)},$r.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 n={};try{n.destination=jt(t.destination)}catch{throw new Error("destination is invalid")}n.asset=t.asset.toXDRObject(),n.amount=this._toXDRAmount(t.amount);var i=new u.PaymentOp(n),d={};return d.body=u.OperationBody.payment(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.setOptions=function(t){var n={};if(t.inflationDest){if(!ar.isValidEd25519PublicKey(t.inflationDest))throw new Error("inflationDest is invalid");n.inflationDest=Bn.fromPublicKey(t.inflationDest).xdrAccountId()}if(n.clearFlags=this._checkUnsignedIntValue("clearFlags",t.clearFlags),n.setFlags=this._checkUnsignedIntValue("setFlags",t.setFlags),n.masterWeight=this._checkUnsignedIntValue("masterWeight",t.masterWeight,gn),n.lowThreshold=this._checkUnsignedIntValue("lowThreshold",t.lowThreshold,gn),n.medThreshold=this._checkUnsignedIntValue("medThreshold",t.medThreshold,gn),n.highThreshold=this._checkUnsignedIntValue("highThreshold",t.highThreshold,gn),t.homeDomain!==void 0&&typeof t.homeDomain!="string")throw new TypeError("homeDomain argument must be of type String");if(n.homeDomain=t.homeDomain,t.signer){var i,d=this._checkUnsignedIntValue("signer.weight",t.signer.weight,gn),Z=0;if(t.signer.ed25519PublicKey){if(!ar.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var Lt=ar.decodeEd25519PublicKey(t.signer.ed25519PublicKey);i=new u.SignerKey.signerKeyTypeEd25519(Lt),Z+=1}if(t.signer.preAuthTx){if(typeof t.signer.preAuthTx=="string"&&(t.signer.preAuthTx=Zr.from(t.signer.preAuthTx,"hex")),!Zr.isBuffer(t.signer.preAuthTx)||t.signer.preAuthTx.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");i=new u.SignerKey.signerKeyTypePreAuthTx(t.signer.preAuthTx),Z+=1}if(t.signer.sha256Hash){if(typeof t.signer.sha256Hash=="string"&&(t.signer.sha256Hash=Zr.from(t.signer.sha256Hash,"hex")),!Zr.isBuffer(t.signer.sha256Hash)||t.signer.sha256Hash.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");i=new u.SignerKey.signerKeyTypeHashX(t.signer.sha256Hash),Z+=1}if(t.signer.ed25519SignedPayload){if(!ar.isValidSignedPayload(t.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var ne=ar.decodeSignedPayload(t.signer.ed25519SignedPayload),se=u.SignerKeyEd25519SignedPayload.fromXDR(ne);i=u.SignerKey.signerKeyTypeEd25519SignedPayload(se),Z+=1}if(Z!==1)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");n.signer=new u.Signer({key:i,weight:d})}var ke=new u.SetOptionsOp(n),Pe={};return Pe.body=u.OperationBody.setOptions(ke),this.setSourceAccount(Pe,t),new u.Operation(Pe)},$r.beginSponsoringFutureReserves=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.isValidEd25519PublicKey(t.sponsoredId))throw new Error("sponsoredId is invalid");var n=new u.BeginSponsoringFutureReservesOp({sponsoredId:Bn.fromPublicKey(t.sponsoredId).xdrAccountId()}),i={};return i.body=u.OperationBody.beginSponsoringFutureReserves(n),this.setSourceAccount(i,t),new u.Operation(i)},$r.endSponsoringFutureReserves=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n={};return n.body=u.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(n,t),new u.Operation(n)},$r.revokeAccountSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");var n=u.LedgerKey.account(new u.LedgerKeyAccount({accountId:Bn.fromPublicKey(t.account).xdrAccountId()})),i=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),d={};return d.body=u.OperationBody.revokeSponsorship(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.revokeTrustlineSponsorship=function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.isValidEd25519PublicKey(n.account))throw new Error("account is invalid");if(n.asset instanceof bn)t=n.asset.toTrustLineXDRObject();else{if(!(n.asset instanceof j))throw new TypeError("asset must be an Asset or LiquidityPoolId");t=n.asset.toXDRObject()}var i=u.LedgerKey.trustline(new u.LedgerKeyTrustLine({accountId:Bn.fromPublicKey(n.account).xdrAccountId(),asset:t})),d=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(i),Z={};return Z.body=u.OperationBody.revokeSponsorship(d),this.setSourceAccount(Z,n),new u.Operation(Z)},$r.revokeOfferSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.isValidEd25519PublicKey(t.seller))throw new Error("seller is invalid");if(typeof t.offerId!="string")throw new Error("offerId is invalid");var n=u.LedgerKey.offer(new u.LedgerKeyOffer({sellerId:Bn.fromPublicKey(t.seller).xdrAccountId(),offerId:u.Int64.fromString(t.offerId)})),i=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),d={};return d.body=u.OperationBody.revokeSponsorship(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.revokeDataSponsorship=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.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 n=u.LedgerKey.data(new u.LedgerKeyData({accountId:Bn.fromPublicKey(t.account).xdrAccountId(),dataName:t.name})),i=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),d={};return d.body=u.OperationBody.revokeSponsorship(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.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 n=u.LedgerKey.claimableBalance(new u.LedgerKeyClaimableBalance({balanceId:u.ClaimableBalanceId.fromXDR(t.balanceId,"hex")})),i=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),d={};return d.body=u.OperationBody.revokeSponsorship(i),this.setSourceAccount(d,t),new u.Operation(d)},$r.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 n=u.LedgerKey.liquidityPool(new u.LedgerKeyLiquidityPool({liquidityPoolId:u.PoolId.fromXDR(t.liquidityPoolId,"hex")})),i=u.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),d={body:u.OperationBody.revokeSponsorship(i)};return this.setSourceAccount(d,t),new u.Operation(d)},$r.revokeSignerSponsorship=function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!ar.isValidEd25519PublicKey(n.account))throw new Error("account is invalid");if(n.signer.ed25519PublicKey){if(!ar.isValidEd25519PublicKey(n.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var i=ar.decodeEd25519PublicKey(n.signer.ed25519PublicKey);t=new u.SignerKey.signerKeyTypeEd25519(i)}else if(n.signer.preAuthTx){var d;if(d=typeof n.signer.preAuthTx=="string"?Rr.from(n.signer.preAuthTx,"hex"):n.signer.preAuthTx,!Rr.isBuffer(d)||d.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");t=new u.SignerKey.signerKeyTypePreAuthTx(d)}else{if(!n.signer.sha256Hash)throw new Error("signer is invalid");var Z;if(Z=typeof n.signer.sha256Hash=="string"?Rr.from(n.signer.sha256Hash,"hex"):n.signer.sha256Hash,!Rr.isBuffer(Z)||Z.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");t=new u.SignerKey.signerKeyTypeHashX(Z)}var Lt=new u.RevokeSponsorshipOpSigner({accountId:Bn.fromPublicKey(n.account).xdrAccountId(),signerKey:t}),ne=u.RevokeSponsorshipOp.revokeSponsorshipSigner(Lt),se={};return se.body=u.OperationBody.revokeSponsorship(ne),this.setSourceAccount(se,n),new u.Operation(se)},$r.clawback=function(t){var n={};if(!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));n.amount=this._toXDRAmount(t.amount),n.asset=t.asset.toXDRObject();try{n.from=jt(t.from)}catch{throw new Error("from address is invalid")}var i={body:u.OperationBody.clawback(new u.ClawbackOp(n))};return this.setSourceAccount(i,t),new u.Operation(i)},$r.setTrustLineFlags=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n={};if(Rn(t.flags)!=="object"||Object.keys(t.flags).length===0)throw new Error("opts.flags must be a map of boolean flags to modify");var i={authorized:u.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:u.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:u.TrustLineFlags.trustlineClawbackEnabledFlag()},d=0,Z=0;Object.keys(t.flags).forEach(function(ne){if(!Object.prototype.hasOwnProperty.call(i,ne))throw new Error("unsupported flag name specified: ".concat(ne));var se=t.flags[ne],ke=i[ne].value;se===!0?Z|=ke:se===!1&&(d|=ke)}),n.trustor=Bn.fromPublicKey(t.trustor).xdrAccountId(),n.asset=t.asset.toXDRObject(),n.clearFlags=d,n.setFlags=Z;var Lt={body:u.OperationBody.setTrustLineFlags(new u.SetTrustLineFlagsOp(n))};return this.setSourceAccount(Lt,t),new u.Operation(Lt)},$r.liquidityPoolDeposit=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.liquidityPoolId,i=t.maxAmountA,d=t.maxAmountB,Z=t.minPrice,Lt=t.maxPrice,ne={};if(!n)throw new TypeError("liquidityPoolId argument is required");if(ne.liquidityPoolId=u.PoolId.fromXDR(n,"hex"),!this.isValidAmount(i,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(ne.maxAmountA=this._toXDRAmount(i),!this.isValidAmount(d,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(ne.maxAmountB=this._toXDRAmount(d),Z===void 0)throw new TypeError("minPrice argument is required");if(ne.minPrice=this._toXDRPrice(Z),Lt===void 0)throw new TypeError("maxPrice argument is required");ne.maxPrice=this._toXDRPrice(Lt);var se=new u.LiquidityPoolDepositOp(ne),ke={body:u.OperationBody.liquidityPoolDeposit(se)};return this.setSourceAccount(ke,t),new u.Operation(ke)},$r.liquidityPoolWithdraw=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n={};if(!t.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(n.liquidityPoolId=u.PoolId.fromXDR(t.liquidityPoolId,"hex"),!this.isValidAmount(t.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(n.amount=this._toXDRAmount(t.amount),!this.isValidAmount(t.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(n.minAmountA=this._toXDRAmount(t.minAmountA),!this.isValidAmount(t.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));n.minAmountB=this._toXDRAmount(t.minAmountB);var i=new u.LiquidityPoolWithdrawOp(n),d={body:u.OperationBody.liquidityPoolWithdraw(i)};return this.setSourceAccount(d,t),new u.Operation(d)},$r.invokeHostFunction=function(t){if(!t.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(t),")"));t.func.switch().value===u.HostFunctionType.hostFunctionTypeInvokeContract().value&&t.func.invokeContract().args().forEach(function(d){var Z;try{Z=Dn.fromScVal(d)}catch{return}switch(Z._type){case"claimableBalance":case"liquidityPool":throw new TypeError("claimable balances and liquidity pools cannot be arguments to invokeHostFunction")}});var n=new u.InvokeHostFunctionOp({hostFunction:t.func,auth:t.auth||[]}),i={body:u.OperationBody.invokeHostFunction(n)};return this.setSourceAccount(i,t),new u.Operation(i)},$r.extendFootprintTtl=function(t){var n;if(((n=t.extendTo)!==null&&n!==void 0?n:-1)<=0)throw new RangeError("extendTo has to be positive");var i=new u.ExtendFootprintTtlOp({ext:new u.ExtensionPoint(0),extendTo:t.extendTo}),d={body:u.OperationBody.extendFootprintTtl(i)};return this.setSourceAccount(d,t),new u.Operation(d)},$r.restoreFootprint=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=new u.RestoreFootprintOp({ext:new u.ExtensionPoint(0)}),i={body:u.OperationBody.restoreFootprint(n)};return this.setSourceAccount(i,t??{}),new u.Operation(i)},$r.createStellarAssetContract=function(t){var n=t.asset;if(typeof n=="string"){var i=function(Lt,ne){return function(se){if(Array.isArray(se))return se}(Lt)||function(se,ke){var Pe=se==null?null:typeof Symbol<"u"&&se[Symbol.iterator]||se["@@iterator"];if(Pe!=null){var rr,Ge,ue,Se,Je=[],lr=!0,Sr=!1;try{if(ue=(Pe=Pe.call(se)).next,ke!==0)for(;!(lr=(rr=ue.call(Pe)).done)&&(Je.push(rr.value),Je.length!==ke);lr=!0);}catch(Pr){Sr=!0,Ge=Pr}finally{try{if(!lr&&Pe.return!=null&&(Se=Pe.return(),Object(Se)!==Se))return}finally{if(Sr)throw Ge}}return Je}}(Lt,ne)||function(se,ke){if(se){if(typeof se=="string")return Ko(se,ke);var Pe={}.toString.call(se).slice(8,-1);return Pe==="Object"&&se.constructor&&(Pe=se.constructor.name),Pe==="Map"||Pe==="Set"?Array.from(se):Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe)?Ko(se,ke):void 0}}(Lt,ne)||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.`)}()}(n.split(":"),2),d=i[0],Z=i[1];n=new bn(d,Z)}if(!(n instanceof bn))throw new TypeError("expected Asset in 'opts.asset', got ".concat(n));return this.invokeHostFunction({source:t.source,auth:t.auth,func:u.HostFunction.hostFunctionTypeCreateContract(new u.CreateContractArgs({executable:u.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:u.ContractIdPreimage.contractIdPreimageFromAsset(n.toXDRObject())}))})},$r.invokeContractFunction=function(t){var n=new Dn(t.contract);if(n._type!=="contract")throw new TypeError("expected contract strkey instance, got ".concat(n));return this.invokeHostFunction({source:t.source,auth:t.auth,func:u.HostFunction.hostFunctionTypeInvokeContract(new u.InvokeContractArgs({contractAddress:n.toScAddress(),functionName:t.function,args:t.args}))})},$r.createCustomContract=function(t){var n,i=vo.from(t.salt||Bn.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(i.length!==32)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(t.wasmHash));return this.invokeHostFunction({source:t.source,auth:t.auth,func:u.HostFunction.hostFunctionTypeCreateContractV2(new u.CreateContractArgsV2({executable:u.ContractExecutable.contractExecutableWasm(vo.from(t.wasmHash)),contractIdPreimage:u.ContractIdPreimage.contractIdPreimageFromAddress(new u.ContractIdPreimageFromAddress({address:t.address.toScAddress(),salt:i})),constructorArgs:(n=t.constructorArgs)!==null&&n!==void 0?n:[]}))})},$r.uploadContractWasm=function(t){return this.invokeHostFunction({source:t.source,auth:t.auth,func:u.HostFunction.hostFunctionTypeUploadContractWasm(vo.from(t.wasm))})};var wn=k(8287).Buffer;function zt(t){return zt=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},zt(t)}function $t(t,n){for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:null;switch(function(d,Z){if(!(d instanceof Z))throw new TypeError("Cannot call a class as a function")}(this,t),this._type=n,this._value=i,this._type){case Me:break;case Te:t._validateIdValue(i);break;case Re:t._validateTextValue(i);break;case Ve:case Ie:t._validateHashValue(i),typeof i=="string"&&(this._value=wn.from(i,"hex"));break;default:throw new Error("Invalid memo type")}}return function(n,i,d){return i&&$t(n.prototype,i),d&&$t(n,d),Object.defineProperty(n,"prototype",{writable:!1}),n}(t,[{key:"type",get:function(){return this._type},set:function(n){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case Me:return null;case Te:case Re:return this._value;case Ve:case Ie:return wn.from(this._value);default:throw new Error("Invalid memo type")}},set:function(n){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case Me:return u.Memo.memoNone();case Te:return u.Memo.memoId(y.UnsignedHyper.fromString(this._value));case Re:return u.Memo.memoText(this._value);case Ve:return u.Memo.memoHash(this._value);case Ie:return u.Memo.memoReturn(this._value);default:return null}}}],[{key:"_validateIdValue",value:function(n){var i,d=new Error("Expects a uint64 as a string. Got ".concat(n));if(typeof n!="string")throw d;try{i=new Kr(n)}catch{throw d}if(!i.isFinite()||i.isNaN()||i.isNegative()||!i.isInteger()||i.isGreaterThan("18446744073709551615"))throw d}},{key:"_validateTextValue",value:function(n){if(!u.Memo.armTypeForArm("text").isValid(n))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(n){var i,d=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(n));if(n==null)throw d;if(typeof n=="string"){if(!/^[0-9A-Fa-f]{64}$/g.test(n))throw d;i=wn.from(n,"hex")}else{if(!wn.isBuffer(n))throw d;i=wn.from(n)}if(!i.length||i.length!==32)throw d}},{key:"none",value:function(){return new t(Me)}},{key:"text",value:function(n){return new t(Re,n)}},{key:"id",value:function(n){return new t(Te,n)}},{key:"hash",value:function(n){return new t(Ve,n)}},{key:"return",value:function(n){return new t(Ie,n)}},{key:"fromXDRObject",value:function(n){switch(n.arm()){case"id":return t.id(n.value().toString());case"text":return t.text(n.value());case"hash":return t.hash(n.value());case"retHash":return t.return(n.value())}if(n.value()===void 0)return t.none();throw new Error("Unknown type")}}])}(),or=k(8287).Buffer;function He(t){return He=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},He(t)}function Vr(t,n){for(var i=0;i=this.operations.length)throw new RangeError("invalid operation index");var d=this.operations[i];try{d=$r.createClaimableBalance(d)}catch(ne){throw new TypeError("expected createClaimableBalance, got ".concat(d.type,": ").concat(ne))}var Z=ar.decodeEd25519PublicKey(mr(this.source)),Lt=f(u.HashIdPreimage.envelopeTypeOpId(new u.HashIdPreimageOperationId({sourceAccount:u.AccountId.publicKeyTypeEd25519(Z),seqNum:u.SequenceNumber.fromString(this.sequence),opNum:i})).toXDR("raw"));return u.ClaimableBalanceId.claimableBalanceIdTypeV0(Lt).toXDR("hex")}}])}(ii),Gn=k(8287).Buffer;function So(t){return So=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},So(t)}function ps(t,n){for(var i=0;i1?n-1:0),d=1;dNumber.MAX_SAFE_INTEGER||t>64n),i=BigInt.asUintN(64,t);return u.ScVal.scvI128(new u.Int128Parts({hi:new u.Int64(n),lo:new u.Uint64(i)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var t=this.int.toBigInt();return u.ScVal.scvU128(new u.UInt128Parts({hi:new u.Uint64(BigInt.asUintN(64,t>>64n)),lo:new u.Uint64(BigInt.asUintN(64,t))}))}},{key:"toI256",value:function(){var t=this.int.toBigInt(),n=BigInt.asIntN(64,t>>192n),i=BigInt.asUintN(64,t>>128n),d=BigInt.asUintN(64,t>>64n),Z=BigInt.asUintN(64,t);return u.ScVal.scvI256(new u.Int256Parts({hiHi:new u.Int64(n),hiLo:new u.Uint64(i),loHi:new u.Uint64(d),loLo:new u.Uint64(Z)}))}},{key:"toU256",value:function(){var t=this.int.toBigInt(),n=BigInt.asUintN(64,t>>192n),i=BigInt.asUintN(64,t>>128n),d=BigInt.asUintN(64,t>>64n),Z=BigInt.asUintN(64,t);return u.ScVal.scvU256(new u.UInt256Parts({hiHi:new u.Uint64(n),hiLo:new u.Uint64(i),loHi:new u.Uint64(d),loLo:new u.Uint64(Z)}))}},{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 Nl(t){return Nl=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},Nl(t)}function Jg(t,n,i){return n=nc(n),function(d,Z){if(Z&&(Nl(Z)=="object"||typeof Z=="function"))return Z;if(Z!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Lt){if(Lt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Lt}(d)}(t,kd()?Reflect.construct(n,i||[],nc(t).constructor):n.apply(t,i))}function kd(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kd=function(){return!!t})()}function nc(t){return nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nc(t)}function Ul(t,n){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,d){return i.__proto__=d,i},Ul(t,n)}var Td=function(t){function n(i,d){var Z;(function(Pe,rr){if(!(Pe instanceof rr))throw new TypeError("Cannot call a class as a function")})(this,n);var Lt=BigInt(i),ne=Lt<0n,se=(Z=d==null?void 0:d.type)!==null&&Z!==void 0?Z:"";if(se.startsWith("u")&&ne)throw TypeError("specified type ".concat(d.type," yet negative (").concat(i,")"));if(se===""){se=ne?"i":"u";var ke=function(Pe){var rr,Ge=Pe.toString(2).length;return(rr=[64,128,256].find(function(ue){return Ge<=ue}))!==null&&rr!==void 0?rr:Ge}(Lt);switch(ke){case 64:case 128:case 256:se+=ke.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(i,"), got ").concat(ke))}}return Jg(this,n,[se,Lt])}return function(i,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(d&&d.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),d&&Ul(i,d)}(n,t),function(i){return Object.defineProperty(i,"prototype",{writable:!1}),i}(n)}(xa);function xd(t){var n=xa.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 xa(n,t.value()).toBigInt();case"scvU128":case"scvI128":return new xa(n,[t.value().lo(),t.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new xa(n,[t.value().loLo(),t.value().loHi(),t.value().hiLo(),t.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(t.switch()))}}var Od=k(8287).Buffer;function oc(t,n){return function(i){if(Array.isArray(i))return i}(t)||function(i,d){var Z=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(Z!=null){var Lt,ne,se,ke,Pe=[],rr=!0,Ge=!1;try{if(se=(Z=Z.call(i)).next,d===0){if(Object(Z)!==Z)return;rr=!1}else for(;!(rr=(Lt=se.call(Z)).done)&&(Pe.push(Lt.value),Pe.length!==d);rr=!0);}catch(ue){Ge=!0,ne=ue}finally{try{if(!rr&&Z.return!=null&&(ke=Z.return(),Object(ke)!==ke))return}finally{if(Ge)throw ne}}return Pe}}(t,n)||function(i,d){if(i){if(typeof i=="string")return _d(i,d);var Z={}.toString.call(i).slice(8,-1);return Z==="Object"&&i.constructor&&(Z=i.constructor.name),Z==="Map"||Z==="Set"?Array.from(i):Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)?_d(i,d):void 0}}(t,n)||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 _d(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,d=Array(n);i1&&arguments[1]!==void 0?arguments[1]:{};switch(Oa(t)){case"object":var i,d,Z;if(t===null)return u.ScVal.scvVoid();if(t instanceof u.ScVal)return t;if(t instanceof Dn)return t.toScVal();if(t instanceof Bn)return _i(t.publicKey(),{type:"address"});if(t instanceof md)return t.address().toScVal();if(t instanceof Uint8Array||Od.isBuffer(t)){var Lt,ne=Uint8Array.from(t);switch((Lt=n==null?void 0:n.type)!==null&&Lt!==void 0?Lt:"bytes"){case"bytes":return u.ScVal.scvBytes(ne);case"symbol":return u.ScVal.scvSymbol(ne);case"string":return u.ScVal.scvString(ne);default:throw new TypeError("invalid type (".concat(n.type,") specified for bytes-like value"))}}if(Array.isArray(t))return u.ScVal.scvVec(t.map(function(Pe,rr){return Array.isArray(n.type)?_i(Pe,function(Ge){for(var ue=1;uerr&&{type:n.type[rr]})):_i(Pe,n)}));if(((i=(d=t.constructor)===null||d===void 0?void 0:d.name)!==null&&i!==void 0?i:"")!=="Object")throw new TypeError("cannot interpret ".concat((Z=t.constructor)===null||Z===void 0?void 0:Z.name," value as ScVal (").concat(JSON.stringify(t),")"));return u.ScVal.scvMap(Object.entries(t).sort(function(Pe,rr){var Ge=oc(Pe,1)[0],ue=oc(rr,1)[0];return Ge.localeCompare(ue)}).map(function(Pe){var rr,Ge,ue=oc(Pe,2),Se=ue[0],Je=ue[1],lr=oc((rr=((Ge=n==null?void 0:n.type)!==null&&Ge!==void 0?Ge:{})[Se])!==null&&rr!==void 0?rr:[null,null],2),Sr=lr[0],Pr=lr[1],Hr=Sr?{type:Sr}:{},Ir=Pr?{type:Pr}:{};return new u.ScMapEntry({key:_i(Se,Hr),val:_i(Je,Ir)})}));case"number":case"bigint":switch(n==null?void 0:n.type){case"u32":return u.ScVal.scvU32(t);case"i32":return u.ScVal.scvI32(t)}return new Td(t,{type:n==null?void 0:n.type}).toScVal();case"string":var se,ke=(se=n==null?void 0:n.type)!==null&&se!==void 0?se:"string";switch(ke){case"string":return u.ScVal.scvString(t);case"symbol":return u.ScVal.scvSymbol(t);case"address":return new Dn(t).toScVal();case"u32":return u.ScVal.scvU32(parseInt(t,10));case"i32":return u.ScVal.scvI32(parseInt(t,10));default:if(xa.isType(ke))return new xa(ke,t).toScVal();throw new TypeError("invalid type (".concat(n.type,") specified for string value"))}case"boolean":return u.ScVal.scvBool(t);case"undefined":return u.ScVal.scvVoid();case"function":return _i(t());default:throw new TypeError("failed to convert typeof ".concat(Oa(t)," (").concat(t,")"))}}function ra(t){var n,i;switch(t.switch().value){case u.ScValType.scvVoid().value:return null;case u.ScValType.scvU64().value:case u.ScValType.scvI64().value:return t.value().toBigInt();case u.ScValType.scvU128().value:case u.ScValType.scvI128().value:case u.ScValType.scvU256().value:case u.ScValType.scvI256().value:return xd(t);case u.ScValType.scvVec().value:return((n=t.vec())!==null&&n!==void 0?n:[]).map(ra);case u.ScValType.scvAddress().value:return Dn.fromScVal(t).toString();case u.ScValType.scvMap().value:return Object.fromEntries(((i=t.map())!==null&&i!==void 0?i:[]).map(function(Lt){return[ra(Lt.key()),ra(Lt.val())]}));case u.ScValType.scvBool().value:case u.ScValType.scvU32().value:case u.ScValType.scvI32().value:case u.ScValType.scvBytes().value:return t.value();case u.ScValType.scvSymbol().value:case u.ScValType.scvString().value:var d=t.value();if(Od.isBuffer(d)||ArrayBuffer.isView(d))try{return new TextDecoder().decode(d)}catch{return new Uint8Array(d.buffer)}return d;case u.ScValType.scvTimepoint().value:case u.ScValType.scvDuration().value:return new u.Uint64(t.value()).toBigInt();case u.ScValType.scvError().value:if(t.error().switch().value===u.ScErrorType.sceContract().value)return{type:"contract",code:t.error().contractCode()};var Z=t.error();return{type:"system",code:Z.code().value,value:Z.code().name};default:return t.value()}}function tu(t){return tu=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},tu(t)}function Rd(t){return function(n){if(Array.isArray(n))return Ll(n)}(t)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(t)||function(n,i){if(n){if(typeof n=="string")return Ll(n,i);var d={}.toString.call(n).slice(8,-1);return d==="Object"&&n.constructor&&(d=n.constructor.name),d==="Map"||d==="Set"?Array.from(n):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Ll(n,i):void 0}}(t)||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 Ll(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,d=Array(n);i1&&arguments[1]!==void 0?arguments[1]:{};if(function(d,Z){if(!(d instanceof Z))throw new TypeError("Cannot call a class as a function")}(this,t),!n)throw new Error("must specify source account for the transaction");if(i.fee===void 0)throw new Error("must specify fee for the transaction (in stroops)");this.source=n,this.operations=[],this.baseFee=i.fee,this.timebounds=i.timebounds?Fl({},i.timebounds):null,this.ledgerbounds=i.ledgerbounds?Fl({},i.ledgerbounds):null,this.minAccountSequence=i.minAccountSequence||null,this.minAccountSequenceAge=i.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=i.minAccountSequenceLedgerGap||null,this.extraSigners=i.extraSigners?Rd(i.extraSigners):null,this.memo=i.memo||Ke.none(),this.networkPassphrase=i.networkPassphrase||null,this.sorobanData=i.sorobanData?new Tl(i.sorobanData).build():null}return function(n,i,d){return i&&Id(n.prototype,i),d&&Id(n,d),Object.defineProperty(n,"prototype",{writable:!1}),n}(t,[{key:"addOperation",value:function(n){return this.operations.push(n),this}},{key:"addOperationAt",value:function(n,i){return this.operations.splice(i,0,n),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"clearOperationAt",value:function(n){return this.operations.splice(n,1),this}},{key:"addMemo",value:function(n){return this.memo=n,this}},{key:"setTimeout",value:function(n){if(this.timebounds!==null&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(n<0)throw new Error("timeout cannot be negative");if(n>0){var i=Math.floor(Date.now()/1e3)+n;this.timebounds===null?this.timebounds={minTime:0,maxTime:i}:this.timebounds={minTime:this.timebounds.minTime,maxTime:i}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(n,i){if(typeof n=="number"&&(n=new Date(1e3*n)),typeof i=="number"&&(i=new Date(1e3*i)),this.timebounds!==null)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var d=Math.floor(n.valueOf()/1e3),Z=Math.floor(i.valueOf()/1e3);if(d<0)throw new Error("min_time cannot be negative");if(Z<0)throw new Error("max_time cannot be negative");if(Z>0&&d>Z)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:d,maxTime:Z},this}},{key:"setLedgerbounds",value:function(n,i){if(this.ledgerbounds!==null)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(n<0)throw new Error("min_ledger cannot be negative");if(i<0)throw new Error("max_ledger cannot be negative");if(i>0&&n>i)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:n,maxLedger:i},this}},{key:"setMinAccountSequence",value:function(n){if(this.minAccountSequence!==null)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=n,this}},{key:"setMinAccountSequenceAge",value:function(n){if(typeof n!="number")throw new Error("min_account_sequence_age must be a number");if(this.minAccountSequenceAge!==null)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(n<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=n,this}},{key:"setMinAccountSequenceLedgerGap",value:function(n){if(this.minAccountSequenceLedgerGap!==null)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(n<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=n,this}},{key:"setExtraSigners",value:function(n){if(!Array.isArray(n))throw new Error("extra_signers must be an array of strings.");if(this.extraSigners!==null)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(n.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=Rd(n),this}},{key:"setNetworkPassphrase",value:function(n){return this.networkPassphrase=n,this}},{key:"setSorobanData",value:function(n){return this.sorobanData=new Tl(n).build(),this}},{key:"addSacTransferOperation",value:function(n,i,d,Z){if(BigInt(d)<=0n)throw new Error("Amount must be a positive integer");if(BigInt(d)>y.Hyper.MAX_VALUE)throw new Error("Amount exceeds maximum value for i64");if(Z){var Lt=Z.instructions,ne=Z.readBytes,se=Z.writeBytes,ke=Z.resourceFee,Pe=4294967295;if(Lt<=0||Lt>Pe)throw new Error("instructions must be greater than 0 and at most ".concat(Pe));if(ne<=0||ne>Pe)throw new Error("readBytes must be greater than 0 and at most ".concat(Pe));if(se<=0||se>Pe)throw new Error("writeBytes must be greater than 0 and at most ".concat(Pe));if(ke<=0n||ke>y.Hyper.MAX_VALUE)throw new Error("resourceFee must be greater than 0 and at most i64 max")}var rr=ar.isValidContract(n);if(!rr&&!ar.isValidEd25519PublicKey(n)&&!ar.isValidMed25519PublicKey(n))throw new Error("Invalid destination address. Must be a valid Stellar address or contract ID.");if(n===this.source.accountId())throw new Error("Destination cannot be the same as the source account.");var Ge=i.contractId(this.networkPassphrase),ue="transfer",Se=this.source.accountId(),Je=[_i(Se,{type:"address"}),_i(n,{type:"address"}),_i(d,{type:"i128"})],lr=i.isNative(),Sr=new u.SorobanAuthorizationEntry({credentials:u.SorobanCredentials.sorobanCredentialsSourceAccount(),rootInvocation:new u.SorobanAuthorizedInvocation({function:u.SorobanAuthorizedFunction.sorobanAuthorizedFunctionTypeContractFn(new u.InvokeContractArgs({contractAddress:Dn.fromString(Ge).toScAddress(),functionName:ue,args:Je})),subInvocations:[]})}),Pr=new u.LedgerFootprint({readOnly:[u.LedgerKey.contractData(new u.LedgerKeyContractData({contract:Dn.fromString(Ge).toScAddress(),key:u.ScVal.scvLedgerKeyContractInstance(),durability:u.ContractDataDurability.persistent()}))],readWrite:[]});rr?(Pr.readWrite().push(u.LedgerKey.contractData(new u.LedgerKeyContractData({contract:Dn.fromString(Ge).toScAddress(),key:u.ScVal.scvVec([_i("Balance",{type:"symbol"}),_i(n,{type:"address"})]),durability:u.ContractDataDurability.persistent()}))),lr||Pr.readOnly().push(u.LedgerKey.account(new u.LedgerKeyAccount({accountId:Bn.fromPublicKey(i.getIssuer()).xdrPublicKey()})))):lr?Pr.readWrite().push(u.LedgerKey.account(new u.LedgerKeyAccount({accountId:Bn.fromPublicKey(n).xdrPublicKey()}))):i.getIssuer()!==n&&Pr.readWrite().push(u.LedgerKey.trustline(new u.LedgerKeyTrustLine({accountId:Bn.fromPublicKey(n).xdrPublicKey(),asset:i.toTrustLineXDRObject()}))),i.isNative()?Pr.readWrite().push(u.LedgerKey.account(new u.LedgerKeyAccount({accountId:Bn.fromPublicKey(Se).xdrPublicKey()}))):i.getIssuer()!==Se&&Pr.readWrite().push(u.LedgerKey.trustline(new u.LedgerKeyTrustLine({accountId:Bn.fromPublicKey(Se).xdrPublicKey(),asset:i.toTrustLineXDRObject()})));var Hr={instructions:4e5,readBytes:1e3,writeBytes:1e3,resourceFee:BigInt(5e6)},Ir=new u.SorobanTransactionData({resources:new u.SorobanResources({footprint:Pr,instructions:Z?Z.instructions:Hr.instructions,diskReadBytes:Z?Z.readBytes:Hr.readBytes,writeBytes:Z?Z.writeBytes:Hr.writeBytes}),ext:new u.SorobanTransactionDataExt(0),resourceFee:new u.Int64(Z?Z.resourceFee:Hr.resourceFee)}),hn=$r.invokeContractFunction({contract:Ge,function:ue,args:Je,auth:[Sr]});return this.setSorobanData(Ir),this.addOperation(hn)}},{key:"build",value:function(){var n=new Kr(this.source.sequenceNumber()).plus(1),i={fee:new Kr(this.baseFee).times(this.operations.length).toNumber(),seqNum:u.SequenceNumber.fromString(n.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).");jd(this.timebounds.minTime)&&(this.timebounds.minTime=Math.floor(this.timebounds.minTime.getTime()/1e3)),jd(this.timebounds.maxTime)&&(this.timebounds.maxTime=Math.floor(this.timebounds.maxTime.getTime()/1e3)),this.timebounds.minTime=y.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=y.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var d=new u.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var Z=null;this.ledgerbounds!==null&&(Z=new u.LedgerBounds(this.ledgerbounds));var Lt=this.minAccountSequence||"0";Lt=u.SequenceNumber.fromString(Lt);var ne=y.UnsignedHyper.fromString(this.minAccountSequenceAge!==null?this.minAccountSequenceAge.toString():"0"),se=this.minAccountSequenceLedgerGap||0,ke=this.extraSigners!==null?this.extraSigners.map(xl.decodeAddress):[];i.cond=u.Preconditions.precondV2(new u.PreconditionsV2({timeBounds:d,ledgerBounds:Z,minSeqNum:Lt,minSeqAge:ne,minSeqLedgerGap:se,extraSigners:ke}))}else i.cond=u.Preconditions.precondTime(d);i.sourceAccount=jt(this.source.accountId()),this.sorobanData?(i.ext=new u.TransactionExt(1,this.sorobanData),i.fee=new Kr(i.fee).plus(this.sorobanData.resourceFee()).toNumber()):i.ext=new u.TransactionExt(0,u.Void);var Pe=new u.Transaction(i);Pe.operations(this.operations);var rr=new u.TransactionEnvelope.envelopeTypeTx(new u.TransactionV1Envelope({tx:Pe})),Ge=new On(rr,this.networkPassphrase);return this.source.incrementSequenceNumber(),Ge}},{key:"hasV2Preconditions",value:function(){return this.ledgerbounds!==null||this.minAccountSequence!==null||this.minAccountSequenceAge!==null||this.minAccountSequenceLedgerGap!==null||this.extraSigners!==null&&this.extraSigners.length>0}}],[{key:"cloneFrom",value:function(n){var i,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(n instanceof On))throw new TypeError("expected a 'Transaction', got: ".concat(n));var Z,Lt=(BigInt(n.sequence)-1n).toString();if(ar.isValidMed25519PublicKey(n.source))Z=dd.fromAddress(n.source,Lt);else{if(!ar.isValidEd25519PublicKey(n.source))throw new TypeError("unsupported tx source account: ".concat(n.source));Z=new kl(n.source,Lt)}var ne=new t(Z,Fl({fee:(Math.floor(parseInt(n.fee,10)/n.operations.length)||Dl).toString(),memo:n.memo,networkPassphrase:n.networkPassphrase,timebounds:n.timeBounds,ledgerbounds:n.ledgerBounds,minAccountSequence:n.minAccountSequence,minAccountSequenceAge:n.minAccountSequenceAge,minAccountSequenceLedgerGap:n.minAccountSequenceLedgerGap,extraSigners:(i=n.extraSigners)===null||i===void 0?void 0:i.map(xl.encodeSignerKey)},d));return n._tx.operations().forEach(function(se){return ne.addOperation(se)}),ne}},{key:"buildFeeBumpTransaction",value:function(n,i,d,Z){var Lt=d.operations.length,ne=new Kr(Dl),se=new Kr(0),ke=d.toEnvelope();if(ke.switch().value===u.EnvelopeType.envelopeTypeTx().value){var Pe,rr=ke.v1().tx().ext().value();se=new Kr((Pe=rr==null?void 0:rr.resourceFee())!==null&&Pe!==void 0?Pe:0)}var Ge=new Kr(d.fee).minus(se).div(Lt),ue=new Kr(i);if(ue.lt(Ge))throw new Error("Invalid baseFee, it should be at least ".concat(Ge," stroops."));if(ue.lt(ne))throw new Error("Invalid baseFee, it should be at least ".concat(ne," stroops."));var Se,Je=d.toEnvelope();if(Je.switch()===u.EnvelopeType.envelopeTypeTxV0()){var lr=Je.v0().tx(),Sr=new u.Transaction({sourceAccount:new u.MuxedAccount.keyTypeEd25519(lr.sourceAccountEd25519()),fee:lr.fee(),seqNum:lr.seqNum(),cond:u.Preconditions.precondTime(lr.timeBounds()),memo:lr.memo(),operations:lr.operations(),ext:new u.TransactionExt(0)});Je=new u.TransactionEnvelope.envelopeTypeTx(new u.TransactionV1Envelope({tx:Sr,signatures:Je.v0().signatures()}))}Se=typeof n=="string"?jt(n):n.xdrMuxedAccount();var Pr=new u.FeeBumpTransaction({feeSource:Se,fee:u.Int64.fromString(ue.times(Lt+1).plus(se).toString()),innerTx:u.FeeBumpTransactionInnerTx.envelopeTypeTx(Je.v1()),ext:new u.FeeBumpTransactionExt(0)}),Hr=new u.FeeBumpTransactionEnvelope({tx:Pr,signatures:[]}),Ir=new u.TransactionEnvelope.envelopeTypeTxFeeBump(Hr);return new zo(Ir,Z)}},{key:"fromXDR",value:function(n,i){return typeof n=="string"&&(n=u.TransactionEnvelope.fromXDR(n,"base64")),n.switch()===u.EnvelopeType.envelopeTypeTxFeeBump()?new zo(n,i):new On(n,i)}}])}();function jd(t){return t instanceof Date&&!isNaN(t)}var Ml={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 eu(t){return eu=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},eu(t)}function Vl(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,d=Array(n);i0&&(i=n>i.length?["0",i.toString().padStart(n,"0")].join("."):[i.slice(0,-n),i.slice(-n)].join(".")),i.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,".0").replace(/^\./,"0.")}},{key:"parseTokenAmount",value:function(t,n){var i,d=function(ne){return function(se){if(Array.isArray(se))return se}(ne)||function(se){if(typeof Symbol<"u"&&se[Symbol.iterator]!=null||se["@@iterator"]!=null)return Array.from(se)}(ne)||function(se,ke){if(se){if(typeof se=="string")return Vl(se,ke);var Pe={}.toString.call(se).slice(8,-1);return Pe==="Object"&&se.constructor&&(Pe=se.constructor.name),Pe==="Map"||Pe==="Set"?Array.from(se):Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe)?Vl(se,ke):void 0}}(ne)||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()),Z=d[0],Lt=d[1];if(Vl(d).slice(2).length)throw new Error("Invalid decimal value: ".concat(t));if((Lt==null?void 0:Lt.length)>n)throw new Error('Too many decimal places in "'.concat(t,'": expected at most ').concat(n,", got ").concat(Lt.length));return BigInt(Z+((i=Lt==null?void 0:Lt.padEnd(n,"0"))!==null&&i!==void 0?i:"0".repeat(n))).toString()}}]);function ru(t){return ru=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},ru(t)}function Nd(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);n&&(d=d.filter(function(Z){return Object.getOwnPropertyDescriptor(t,Z).enumerable})),i.push.apply(i,d)}return i}function Ud(t){for(var n=1;n3?(Vt=Ue===fn)&&(cr=Qt[(Or=Qt[4])?5:(Or=3,3)],Qt[4]=Qt[5]=t):Qt[0]<=ye&&((Vt=Qr<2&&yefn||fn>Ue)&&(Qt[4]=Qr,Qt[5]=fn,tn.n=Ue,Or=0))}if(Vt||Qr>1)return ne;throw ln=!0,fn}return function(Qr,fn,Vt){if(Br>1)throw TypeError("Generator is already running");for(ln&&fn===1&&vn(fn,Vt),Or=fn,cr=Vt;(n=Or<2?t:cr)||!ln;){gr||(Or?Or<3?(Or>1&&(tn.n=-1),vn(Or,cr)):tn.n=cr:tn.v=cr);try{if(Br=2,gr){if(Or||(Qr="next"),n=gr[Qr]){if(!(n=n.call(gr,cr)))throw TypeError("iterator result is not an object");if(!n.done)return n;cr=n.value,Or<2&&(Or=0)}else Or===1&&(n=gr.return)&&n.call(gr),Or<2&&(cr=TypeError("The iterator does not provide a '"+Qr+"' method"),Or=1);gr=t}else if((n=(ln=tn.n<0)?cr:Ir.call(hn,tn))!==ne)break}catch(Qt){gr=t,Or=1,cr=Qt}finally{Br=1}}return{value:n,done:ln}}}(Se,lr,Sr),!0),Hr}var ne={};function se(){}function ke(){}function Pe(){}n=Object.getPrototypeOf;var rr=[][d]?n(n([][d]())):(Pi(n={},d,function(){return this}),n),Ge=Pe.prototype=se.prototype=Object.create(rr);function ue(Se){return Object.setPrototypeOf?Object.setPrototypeOf(Se,Pe):(Se.__proto__=Pe,Pi(Se,Z,"GeneratorFunction")),Se.prototype=Object.create(Ge),Se}return ke.prototype=Pe,Pi(Ge,"constructor",Pe),Pi(Pe,"constructor",ke),ke.displayName="GeneratorFunction",Pi(Pe,Z,"GeneratorFunction"),Pi(Ge),Pi(Ge,Z,"Generator"),Pi(Ge,d,function(){return this}),Pi(Ge,"toString",function(){return"[object Generator]"}),(zl=function(){return{w:Lt,m:ue}})()}function Pi(t,n,i,d){var Z=Object.defineProperty;try{Z({},"",{})}catch{Z=0}Pi=function(Lt,ne,se,ke){function Pe(rr,Ge){Pi(Lt,rr,function(ue){return this._invoke(rr,Ge,ue)})}ne?Z?Z(Lt,ne,{value:se,enumerable:!ke,configurable:!ke,writable:!ke}):Lt[ne]=se:(Pe("next",0),Pe("throw",1),Pe("return",2))},Pi(t,n,i,d)}function Fd(t,n,i,d,Z,Lt,ne){try{var se=t[Lt](ne),ke=se.value}catch(Pe){return void i(Pe)}se.done?n(ke):Promise.resolve(ke).then(d,Z)}function Dd(t,n,i){return ql.apply(this,arguments)}function ql(){var t;return t=zl().m(function n(i,d,Z){var Lt,ne,se,ke,Pe,rr,Ge,ue,Se,Je,lr=arguments;return zl().w(function(Sr){for(;;)switch(Sr.n){case 0:if(Lt=lr.length>3&&lr[3]!==void 0?lr[3]:Ml.FUTURENET,i.credentials().switch().value===u.SorobanCredentialsType.sorobanCredentialsAddress().value){Sr.n=1;break}return Sr.a(2,i);case 1:if(ne=u.SorobanAuthorizationEntry.fromXDR(i.toXDR()),(se=ne.credentials().address()).signatureExpirationLedger(Z),ke=f(ic.from(Lt)),Pe=u.HashIdPreimage.envelopeTypeSorobanAuthorization(new u.HashIdPreimageSorobanAuthorization({networkId:ke,nonce:se.nonce(),invocation:ne.rootInvocation(),signatureExpirationLedger:se.signatureExpirationLedger()})),rr=f(Pe.toXDR()),typeof d!="function"){Sr.n=3;break}return Sr.n=2,d(Pe);case 2:(Se=Sr.v)!=null&&Se.signature?(Ge=ic.from(Se.signature),ue=Se.publicKey):(Ge=ic.from(Se),ue=Dn.fromScAddress(se.address()).toString()),Sr.n=4;break;case 3:Ge=ic.from(d.sign(rr)),ue=d.publicKey();case 4:if(Bn.fromPublicKey(ue).verify(rr,Ge)){Sr.n=5;break}throw new Error("signature doesn't match payload");case 5:return Je=_i({public_key:ar.decodeEd25519PublicKey(ue),signature:Ge},{type:{public_key:["symbol",null],signature:["symbol",null]}}),se.signature(u.ScVal.scvVec([Je])),Sr.a(2,ne)}},n)}),ql=function(){var n=this,i=arguments;return new Promise(function(d,Z){var Lt=t.apply(n,i);function ne(ke){Fd(Lt,d,Z,ne,se,"next",ke)}function se(ke){Fd(Lt,d,Z,ne,se,"throw",ke)}ne(void 0)})},ql.apply(this,arguments)}function cv(t,n,i){var d,Z,Lt,ne,se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",ke=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Ml.FUTURENET,Pe=Bn.random().rawPublicKey(),rr=new u.Int64((Z=(d=Pe.subarray(0,8))[0]<<24|d[1]<<16|d[2]<<8|d[3],Lt=d[4]<<24|d[5]<<16|d[6]<<8|d[7],ne=BigInt(Z>>>0)*BigInt(Math.pow(2,32))+BigInt(Lt>>>0),BigInt.asIntN(64,ne))),Ge=se||t.publicKey();if(!Ge)throw new Error("authorizeInvocation requires publicKey parameter");return Dd(new u.SorobanAuthorizationEntry({rootInvocation:i,credentials:u.SorobanCredentials.sorobanCredentialsAddress(new u.SorobanAddressCredentials({address:new Dn(Ge).toScAddress(),nonce:rr,signatureExpirationLedger:0,signature:u.ScVal.scvVec([])}))}),t,n,ke)}function nu(t){return nu=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},nu(t)}function Md(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(t);n&&(d=d.filter(function(Z){return Object.getOwnPropertyDescriptor(t,Z).enumerable})),i.push.apply(i,d)}return i}function lv(t,n,i){return(n=function(d){var Z=function(Lt){if(nu(Lt)!="object"||!Lt)return Lt;var ne=Lt[Symbol.toPrimitive];if(ne!==void 0){var se=ne.call(Lt,"string");if(nu(se)!="object")return se;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Lt)}(d);return nu(Z)=="symbol"?Z:Z+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Vd(t){var n=t.function(),i={},d=n.value();switch(n.switch().value){case 0:i.type="execute",i.args={source:Dn.fromScAddress(d.contractAddress()).toString(),function:d.functionName(),args:d.args().map(function(Pe){return ra(Pe)})};break;case 1:case 2:var Z=n.switch().value===2;i.type="create",i.args={};var Lt=[d.executable(),d.contractIdPreimage()],ne=Lt[0],se=Lt[1];if(!!ne.switch().value!=!!se.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(d)," (should be wasm+address or token+asset)"));switch(ne.switch().value){case 0:var ke=se.fromAddress();i.args.type="wasm",i.args.wasm=function(Pe){for(var rr=1;rr"u"?y:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?y:ArrayBuffer,"%ArrayIteratorPrototype%":Rt&&J?J([][Symbol.iterator]()):y,"%AsyncFromSyncIteratorPrototype%":y,"%AsyncFunction%":tt,"%AsyncGenerator%":tt,"%AsyncGeneratorFunction%":tt,"%AsyncIteratorPrototype%":tt,"%Atomics%":typeof Atomics>"u"?y:Atomics,"%BigInt%":typeof BigInt>"u"?y:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?y:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?y:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?y:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":u,"%eval%":eval,"%EvalError%":m,"%Float16Array%":typeof Float16Array>"u"?y:Float16Array,"%Float32Array%":typeof Float32Array>"u"?y:Float32Array,"%Float64Array%":typeof Float64Array>"u"?y:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?y:FinalizationRegistry,"%Function%":V,"%GeneratorFunction%":tt,"%Int8Array%":typeof Int8Array>"u"?y:Int8Array,"%Int16Array%":typeof Int16Array>"u"?y:Int16Array,"%Int32Array%":typeof Int32Array>"u"?y:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rt&&J?J(J([][Symbol.iterator]())):y,"%JSON%":typeof JSON=="object"?JSON:y,"%Map%":typeof Map>"u"?y:Map,"%MapIteratorPrototype%":typeof Map<"u"&&Rt&&J?J(new Map()[Symbol.iterator]()):y,"%Math%":Math,"%Number%":Number,"%Object%":O,"%Object.getOwnPropertyDescriptor%":ut,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?y:Promise,"%Proxy%":typeof Proxy>"u"?y:Proxy,"%RangeError%":p,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?y:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?y:Set,"%SetIteratorPrototype%":typeof Set<"u"&&Rt&&J?J(new Set()[Symbol.iterator]()):y,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?y:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rt&&J?J(""[Symbol.iterator]()):y,"%Symbol%":Rt?Symbol:y,"%SyntaxError%":h,"%ThrowTypeError%":Bt,"%TypedArray%":Et,"%TypeError%":A,"%Uint8Array%":typeof Uint8Array>"u"?y:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?y:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?y:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?y:Uint32Array,"%URIError%":g,"%WeakMap%":typeof WeakMap>"u"?y:WeakMap,"%WeakRef%":typeof WeakRef>"u"?y:WeakRef,"%WeakSet%":typeof WeakSet>"u"?y:WeakSet,"%Function.prototype.call%":G,"%Function.prototype.apply%":N,"%Object.defineProperty%":Ut,"%Object.getPrototypeOf%":At,"%Math.abs%":w,"%Math.floor%":R,"%Math.max%":S,"%Math.min%":C,"%Math.pow%":x,"%Math.round%":ot,"%Math.sign%":Q,"%Reflect.getPrototypeOf%":c};if(J)try{null.error}catch(mt){var Tt=J(J(mt));q["%Error.prototype%"]=Tt}var Ft=function mt(Dt){var T;if(Dt==="%AsyncFunction%")T=Y("async function () {}");else if(Dt==="%GeneratorFunction%")T=Y("function* () {}");else if(Dt==="%AsyncGeneratorFunction%")T=Y("async function* () {}");else if(Dt==="%AsyncGenerator%"){var L=mt("%AsyncGeneratorFunction%");L&&(T=L.prototype)}else if(Dt==="%AsyncIteratorPrototype%"){var $=mt("%AsyncGenerator%");$&&J&&(T=J($.prototype))}return q[Dt]=T,T},vt={__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"]},bt=k(6743),yt=k(9957),dt=bt.call(G,Array.prototype.concat),lt=bt.call(N,Array.prototype.splice),xt=bt.call(G,String.prototype.replace),Ot=bt.call(G,String.prototype.slice),kt=bt.call(G,RegExp.prototype.exec),Ct=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,it=function(mt,Dt){var T,L=mt;if(yt(vt,L)&&(L="%"+(T=vt[L])[0]+"%"),yt(q,L)){var $=q[L];if($===tt&&($=Ft(L)),$===void 0&&!Dt)throw new A("intrinsic "+mt+" exists, but is not available. Please file an issue!");return{alias:T,name:L,value:$}}throw new h("intrinsic "+mt+" does not exist!")};s.exports=function(mt,Dt){if(typeof mt!="string"||mt.length===0)throw new A("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Dt!="boolean")throw new A('"allowMissing" argument must be a boolean');if(kt(/^%?[^%]*%?$/,mt)===null)throw new h("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var T=function(D){var et=Ot(D,0,1),gt=Ot(D,-1);if(et==="%"&>!=="%")throw new h("invalid intrinsic syntax, expected closing `%`");if(gt==="%"&&et!=="%")throw new h("invalid intrinsic syntax, expected opening `%`");var Yt=[];return xt(D,Ct,function(le,we,ie,U){Yt[Yt.length]=ie?xt(U,H,"$1"):we||le}),Yt}(mt),L=T.length>0?T[0]:"",$=it("%"+L+"%",Dt),St=$.name,ft=$.value,ee=!1,_=$.alias;_&&(L=_[0],lt(T,dt([0,1],_)));for(var W=1,at=!0;W=T.length){var Ne=ut(ft,Xt);ft=(at=!!Ne)&&"get"in Ne&&!("originalValue"in Ne.get)?Ne.get:ft[Xt]}else at=yt(ft,Xt),ft=ft[Xt];at&&!ee&&(q[St]=ft)}}return ft}},487(s,E,k){var y=k(6897),O=k(655),u=k(3126),m=k(2205);s.exports=function(p){var f=u(arguments),h=p.length-(arguments.length-1);return y(f,1+(h>0?h:0),!0)},O?O(s.exports,"apply",{value:m}):s.exports.apply=m},537(s,E,k){var y=k(5606),O=k(6763),u=Object.getOwnPropertyDescriptors||function(q){for(var Tt=Object.keys(q),Ft={},vt=0;vt=bt)return lt;switch(lt){case"%s":return String(vt[Ft++]);case"%d":return Number(vt[Ft++]);case"%j":try{return JSON.stringify(vt[Ft++])}catch{return"[Circular]"}default:return lt}}),dt=vt[Ft];Ft=3&&(Ft.depth=arguments[2]),arguments.length>=4&&(Ft.colors=arguments[3]),ot(Tt)?Ft.showHidden=Tt:Tt&&E._extend(Ft,Tt),ut(Ft.showHidden)&&(Ft.showHidden=!1),ut(Ft.depth)&&(Ft.depth=2),ut(Ft.colors)&&(Ft.colors=!1),ut(Ft.customInspect)&&(Ft.customInspect=!0),Ft.colors&&(Ft.stylize=g),R(Ft,q,Ft.depth)}function g(q,Tt){var Ft=A.styles[Tt];return Ft?"\x1B["+A.colors[Ft][0]+"m"+q+"\x1B["+A.colors[Ft][1]+"m":q}function w(q,Tt){return q}function R(q,Tt,Ft){if(q.customInspect&&Tt&&J(Tt.inspect)&&Tt.inspect!==E.inspect&&(!Tt.constructor||Tt.constructor.prototype!==Tt)){var vt=Tt.inspect(Ft,q);return Y(vt)||(vt=R(q,vt,Ft)),vt}var bt=function(H,it){if(ut(it))return H.stylize("undefined","undefined");if(Y(it)){var mt="'"+JSON.stringify(it).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return H.stylize(mt,"string")}return V(it)?H.stylize(""+it,"number"):ot(it)?H.stylize(""+it,"boolean"):Q(it)?H.stylize("null","null"):void 0}(q,Tt);if(bt)return bt;var yt=Object.keys(Tt),dt=function(H){var it={};return H.forEach(function(mt,Dt){it[mt]=!0}),it}(yt);if(q.showHidden&&(yt=Object.getOwnPropertyNames(Tt)),Rt(Tt)&&(yt.indexOf("message")>=0||yt.indexOf("description")>=0))return S(Tt);if(yt.length===0){if(J(Tt)){var lt=Tt.name?": "+Tt.name:"";return q.stylize("[Function"+lt+"]","special")}if(Ut(Tt))return q.stylize(RegExp.prototype.toString.call(Tt),"regexp");if(Bt(Tt))return q.stylize(Date.prototype.toString.call(Tt),"date");if(Rt(Tt))return S(Tt)}var xt,Ot="",kt=!1,Ct=["{","}"];return x(Tt)&&(kt=!0,Ct=["[","]"]),J(Tt)&&(Ot=" [Function"+(Tt.name?": "+Tt.name:"")+"]"),Ut(Tt)&&(Ot=" "+RegExp.prototype.toString.call(Tt)),Bt(Tt)&&(Ot=" "+Date.prototype.toUTCString.call(Tt)),Rt(Tt)&&(Ot=" "+S(Tt)),yt.length!==0||kt&&Tt.length!=0?Ft<0?Ut(Tt)?q.stylize(RegExp.prototype.toString.call(Tt),"regexp"):q.stylize("[Object]","special"):(q.seen.push(Tt),xt=kt?function(H,it,mt,Dt,T){for(var L=[],$=0,St=it.length;$60?mt[0]+(it===""?"":it+` + `)+" "+H.join(`, + `)+" "+mt[1]:mt[0]+it+" "+H.join(", ")+" "+mt[1]}(xt,Ot,Ct)):Ct[0]+Ot+Ct[1]}function S(q){return"["+Error.prototype.toString.call(q)+"]"}function C(q,Tt,Ft,vt,bt,yt){var dt,lt,xt;if((xt=Object.getOwnPropertyDescriptor(Tt,bt)||{value:Tt[bt]}).get?lt=xt.set?q.stylize("[Getter/Setter]","special"):q.stylize("[Getter]","special"):xt.set&&(lt=q.stylize("[Setter]","special")),G(vt,bt)||(dt="["+bt+"]"),lt||(q.seen.indexOf(xt.value)<0?(lt=Q(Ft)?R(q,xt.value,null):R(q,xt.value,Ft-1)).indexOf(` +`)>-1&&(lt=yt?lt.split(` +`).map(function(Ot){return" "+Ot}).join(` +`).slice(2):` +`+lt.split(` +`).map(function(Ot){return" "+Ot}).join(` +`)):lt=q.stylize("[Circular]","special")),ut(dt)){if(yt&&bt.match(/^\d+$/))return lt;(dt=JSON.stringify(""+bt)).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+": "+lt}function x(q){return Array.isArray(q)}function ot(q){return typeof q=="boolean"}function Q(q){return q===null}function V(q){return typeof q=="number"}function Y(q){return typeof q=="string"}function ut(q){return q===void 0}function Ut(q){return pt(q)&&At(q)==="[object RegExp]"}function pt(q){return typeof q=="object"&&q!==null}function Bt(q){return pt(q)&&At(q)==="[object Date]"}function Rt(q){return pt(q)&&(At(q)==="[object Error]"||q instanceof Error)}function J(q){return typeof q=="function"}function At(q){return Object.prototype.toString.call(q)}function c(q){return q<10?"0"+q.toString(10):q.toString(10)}E.debuglog=function(q){if(q=q.toUpperCase(),!p[q])if(f.test(q)){var Tt=y.pid;p[q]=function(){var Ft=E.format.apply(E,arguments);O.error("%s %d: %s",q,Tt,Ft)}}else p[q]=function(){};return p[q]},E.inspect=A,A.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]},A.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.types=k(9032),E.isArray=x,E.isBoolean=ot,E.isNull=Q,E.isNullOrUndefined=function(q){return q==null},E.isNumber=V,E.isString=Y,E.isSymbol=function(q){return typeof q=="symbol"},E.isUndefined=ut,E.isRegExp=Ut,E.types.isRegExp=Ut,E.isObject=pt,E.isDate=Bt,E.types.isDate=Bt,E.isError=Rt,E.types.isNativeError=Rt,E.isFunction=J,E.isPrimitive=function(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||q===void 0},E.isBuffer=k(1135);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(q,Tt){return Object.prototype.hasOwnProperty.call(q,Tt)}E.log=function(){var q,Tt;O.log("%s - %s",(Tt=[c((q=new Date).getHours()),c(q.getMinutes()),c(q.getSeconds())].join(":"),[q.getDate(),N[q.getMonth()],Tt].join(" ")),E.format.apply(E,arguments))},E.inherits=k(6698),E._extend=function(q,Tt){if(!Tt||!pt(Tt))return q;for(var Ft=Object.keys(Tt),vt=Ft.length;vt--;)q[Ft[vt]]=Tt[Ft[vt]];return q};var tt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function Et(q,Tt){if(!q){var Ft=new Error("Promise was rejected with a falsy value");Ft.reason=q,q=Ft}return Tt(q)}E.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(tt&&q[tt]){var Tt;if(typeof(Tt=q[tt])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Tt,tt,{value:Tt,enumerable:!1,writable:!1,configurable:!0}),Tt}function Tt(){for(var Ft,vt,bt=new Promise(function(lt,xt){Ft=lt,vt=xt}),yt=[],dt=0;dt=0&&E.call(k.callee)==="[object Function]"),O}},1135(s){s.exports=function(E){return E&&typeof E=="object"&&typeof E.copy=="function"&&typeof E.fill=="function"&&typeof E.readUInt8=="function"}},1189(s,E,k){var y=Array.prototype.slice,O=k(1093),u=Object.keys,m=u?function(f){return u(f)}:k(8875),p=Object.keys;m.shim=function(){if(Object.keys){var f=function(){var h=Object.keys(arguments);return h&&h.length===arguments.length}(1,2);f||(Object.keys=function(h){return O(h)?p(y.call(h)):p(h)})}else Object.keys=m;return Object.keys||m},s.exports=m},1237(s){s.exports=EvalError},1333(s){s.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var E={},k=Symbol("test"),y=Object(k);if(typeof k=="string"||Object.prototype.toString.call(k)!=="[object Symbol]"||Object.prototype.toString.call(y)!=="[object Symbol]")return!1;for(var O in E[k]=42,E)return!1;if(typeof Object.keys=="function"&&Object.keys(E).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(E).length!==0)return!1;var u=Object.getOwnPropertySymbols(E);if(u.length!==1||u[0]!==k||!Object.prototype.propertyIsEnumerable.call(E,k))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(E,k);if(m.value!==42||m.enumerable!==!0)return!1}return!0}},1514(s){s.exports=Math.abs},2205(s,E,k){var y=k(6743),O=k(1002),u=k(3144);s.exports=function(){return u(y,O,arguments)}},2299(s,E,k){function y(kt,Ct){return function(H){if(Array.isArray(H))return H}(kt)||function(H,it){var mt=H==null?null:typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(mt!=null){var Dt,T,L,$,St=[],ft=!0,ee=!1;try{if(L=(mt=mt.call(H)).next,it!==0)for(;!(ft=(Dt=L.call(mt)).done)&&(St.push(Dt.value),St.length!==it);ft=!0);}catch(_){ee=!0,T=_}finally{try{if(!ft&&mt.return!=null&&($=mt.return(),Object($)!==$))return}finally{if(ee)throw T}}return St}}(kt,Ct)||function(H,it){if(H){if(typeof H=="string")return O(H,it);var mt=Object.prototype.toString.call(H).slice(8,-1);return mt==="Object"&&H.constructor&&(mt=H.constructor.name),mt==="Map"||mt==="Set"?Array.from(H):mt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mt)?O(H,it):void 0}}(kt,Ct)||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(kt,Ct){(Ct==null||Ct>kt.length)&&(Ct=kt.length);for(var H=0,it=new Array(Ct);H10)return!0;for(var Ct=0;Ct57)return!0}return kt.length===10&&kt>=Math.pow(2,32)}function q(kt){return Object.keys(kt).filter(Et).concat(A(kt).filter(Object.prototype.propertyIsEnumerable.bind(kt)))}function Tt(kt,Ct){if(kt===Ct)return 0;for(var H=kt.length,it=Ct.length,mt=0,Dt=Math.min(H,it);mt=3&&(h=f),A=m,O.call(A)==="[object Array]"?function(g,w,R){for(var S=0,C=g.length;S>>28|V<<4)^(V>>>2|Q<<30)^(V>>>7|Q<<25)}function w(Q,V){return(Q>>>14|V<<18)^(Q>>>18|V<<14)^(V>>>9|Q<<23)}function R(Q,V){return(Q>>>1|V<<31)^(Q>>>8|V<<24)^Q>>>7}function S(Q,V){return(Q>>>1|V<<31)^(Q>>>8|V<<24)^(Q>>>7|V<<25)}function C(Q,V){return(Q>>>19|V<<13)^(V>>>29|Q<<3)^Q>>>6}function x(Q,V){return(Q>>>19|V<<13)^(V>>>29|Q<<3)^(Q>>>6|V<<26)}function ot(Q,V){return Q>>>0>>0?1:0}y(f,O),f.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},f.prototype._update=function(Q){for(var V=this._w,Y=0|this._ah,ut=0|this._bh,Ut=0|this._ch,pt=0|this._dh,Bt=0|this._eh,Rt=0|this._fh,J=0|this._gh,At=0|this._hh,c=0|this._al,N=0|this._bl,G=0|this._cl,tt=0|this._dl,Et=0|this._el,q=0|this._fl,Tt=0|this._gl,Ft=0|this._hl,vt=0;vt<32;vt+=2)V[vt]=Q.readInt32BE(4*vt),V[vt+1]=Q.readInt32BE(4*vt+4);for(;vt<160;vt+=2){var bt=V[vt-30],yt=V[vt-30+1],dt=R(bt,yt),lt=S(yt,bt),xt=C(bt=V[vt-4],yt=V[vt-4+1]),Ot=x(yt,bt),kt=V[vt-14],Ct=V[vt-14+1],H=V[vt-32],it=V[vt-32+1],mt=lt+Ct|0,Dt=dt+kt+ot(mt,lt)|0;Dt=(Dt=Dt+xt+ot(mt=mt+Ot|0,Ot)|0)+H+ot(mt=mt+it|0,it)|0,V[vt]=Dt,V[vt+1]=mt}for(var T=0;T<160;T+=2){Dt=V[T],mt=V[T+1];var L=A(Y,ut,Ut),$=A(c,N,G),St=g(Y,c),ft=g(c,Y),ee=w(Bt,Et),_=w(Et,Bt),W=m[T],at=m[T+1],Xt=h(Bt,Rt,J),ae=h(Et,q,Tt),Kt=Ft+_|0,Ne=At+ee+ot(Kt,Ft)|0;Ne=(Ne=(Ne=Ne+Xt+ot(Kt=Kt+ae|0,ae)|0)+W+ot(Kt=Kt+at|0,at)|0)+Dt+ot(Kt=Kt+mt|0,mt)|0;var D=ft+$|0,et=St+L+ot(D,ft)|0;At=J,Ft=Tt,J=Rt,Tt=q,Rt=Bt,q=Et,Bt=pt+Ne+ot(Et=tt+Kt|0,tt)|0,pt=Ut,tt=G,Ut=ut,G=N,ut=Y,N=c,Y=Ne+et+ot(c=Kt+D|0,Kt)|0}this._al=this._al+c|0,this._bl=this._bl+N|0,this._cl=this._cl+G|0,this._dl=this._dl+tt|0,this._el=this._el+Et|0,this._fl=this._fl+q|0,this._gl=this._gl+Tt|0,this._hl=this._hl+Ft|0,this._ah=this._ah+Y+ot(this._al,c)|0,this._bh=this._bh+ut+ot(this._bl,N)|0,this._ch=this._ch+Ut+ot(this._cl,G)|0,this._dh=this._dh+pt+ot(this._dl,tt)|0,this._eh=this._eh+Bt+ot(this._el,Et)|0,this._fh=this._fh+Rt+ot(this._fl,q)|0,this._gh=this._gh+J+ot(this._gl,Tt)|0,this._hh=this._hh+At+ot(this._hl,Ft)|0},f.prototype._hash=function(){var Q=u.allocUnsafe(64);function V(Y,ut,Ut){Q.writeInt32BE(Y,Ut),Q.writeInt32BE(ut,Ut+4)}return V(this._ah,this._al,0),V(this._bh,this._bl,8),V(this._ch,this._cl,16),V(this._dh,this._dl,24),V(this._eh,this._el,32),V(this._fh,this._fl,40),V(this._gh,this._gl,48),V(this._hh,this._hl,56),Q},s.exports=f},3003(s){s.exports=function(E){return E!=E}},3093(s,E,k){var y=k(4459);s.exports=function(O){return y(O)||O===0?O:O<0?-1:1}},3126(s,E,k){var y=k(6743),O=k(9675),u=k(76),m=k(3144);s.exports=function(p){if(p.length<1||typeof p[0]!="function")throw new O("a function is required");return m(y,u,p)}},3144(s,E,k){var y=k(6743),O=k(1002),u=k(76),m=k(7119);s.exports=m||y.call(u,O)},3628(s,E,k){var y=k(8648),O=k(1064),u=k(7176);s.exports=y?function(m){return y(m)}:O?function(m){if(!m||typeof m!="object"&&typeof m!="function")throw new TypeError("getProto: not an object");return O(m)}:u?function(m){return u(m)}:null},3737(s,E,k){var y=k(6698),O=k(392),u=k(2861).Buffer,m=[1518500249,1859775393,-1894007588,-899497514],p=new Array(80);function f(){this.init(),this._w=p,O.call(this,64,56)}function h(R){return R<<1|R>>>31}function A(R){return R<<5|R>>>27}function g(R){return R<<30|R>>>2}function w(R,S,C,x){return R===0?S&C|~S&x:R===2?S&C|S&x|C&x:S^C^x}y(f,O),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(R){for(var S=this._w,C=0|this._a,x=0|this._b,ot=0|this._c,Q=0|this._d,V=0|this._e,Y=0;Y<16;++Y)S[Y]=R.readInt32BE(4*Y);for(;Y<80;++Y)S[Y]=h(S[Y-3]^S[Y-8]^S[Y-14]^S[Y-16]);for(var ut=0;ut<80;++ut){var Ut=~~(ut/20),pt=A(C)+w(Ut,x,ot,Q)+V+S[ut]+m[Ut]|0;V=Q,Q=ot,ot=g(x),x=C,C=pt}this._a=C+this._a|0,this._b=x+this._b|0,this._c=ot+this._c|0,this._d=Q+this._d|0,this._e=V+this._e|0},f.prototype._hash=function(){var R=u.allocUnsafe(20);return R.writeInt32BE(0|this._a,0),R.writeInt32BE(0|this._b,4),R.writeInt32BE(0|this._c,8),R.writeInt32BE(0|this._d,12),R.writeInt32BE(0|this._e,16),R},s.exports=f},3740(s,E,k){var y,O=k(6763);y=()=>(()=>{var u={348(f,h,A){const g=A(928);f.exports=g},350(f,h){h.byteLength=function(Q){var V=C(Q),Y=V[0],ut=V[1];return 3*(Y+ut)/4-ut},h.toByteArray=function(Q){var V,Y,ut=C(Q),Ut=ut[0],pt=ut[1],Bt=new w(function(At,c,N){return 3*(c+N)/4-N}(0,Ut,pt)),Rt=0,J=pt>0?Ut-4:Ut;for(Y=0;Y>16&255,Bt[Rt++]=V>>8&255,Bt[Rt++]=255&V;return pt===2&&(V=g[Q.charCodeAt(Y)]<<2|g[Q.charCodeAt(Y+1)]>>4,Bt[Rt++]=255&V),pt===1&&(V=g[Q.charCodeAt(Y)]<<10|g[Q.charCodeAt(Y+1)]<<4|g[Q.charCodeAt(Y+2)]>>2,Bt[Rt++]=V>>8&255,Bt[Rt++]=255&V),Bt},h.fromByteArray=function(Q){for(var V,Y=Q.length,ut=Y%3,Ut=[],pt=16383,Bt=0,Rt=Y-ut;BtRt?Rt:Bt+pt));return ut===1?(V=Q[Y-1],Ut.push(A[V>>2]+A[V<<4&63]+"==")):ut===2&&(V=(Q[Y-2]<<8)+Q[Y-1],Ut.push(A[V>>10]+A[V>>4&63]+A[V<<2&63]+"=")),Ut.join("")};for(var A=[],g=[],w=typeof Uint8Array<"u"?Uint8Array:Array,R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0;S<64;++S)A[S]=R[S],g[R.charCodeAt(S)]=S;function C(Q){var V=Q.length;if(V%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Y=Q.indexOf("=");return Y===-1&&(Y=V),[Y,Y===V?0:4-Y%4]}function x(Q){return A[Q>>18&63]+A[Q>>12&63]+A[Q>>6&63]+A[63&Q]}function ot(Q,V,Y){for(var ut,Ut=[],pt=V;ptS)throw new RangeError('The value "'+D+'" is invalid for option "size"');const et=new Uint8Array(D);return Object.setPrototypeOf(et,x.prototype),et}function x(D,et,gt){if(typeof D=="number"){if(typeof et=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return V(D)}return ot(D,et,gt)}function ot(D,et,gt){if(typeof D=="string")return function(we,ie){if(typeof ie=="string"&&ie!==""||(ie="utf8"),!x.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie);const U=0|pt(we,ie);let X=C(U);const Pt=X.write(we,ie);return Pt!==U&&(X=X.slice(0,Pt)),X}(D,et);if(ArrayBuffer.isView(D))return function(we){if(at(we,Uint8Array)){const ie=new Uint8Array(we);return ut(ie.buffer,ie.byteOffset,ie.byteLength)}return Y(we)}(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(at(D,ArrayBuffer)||D&&at(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(at(D,SharedArrayBuffer)||D&&at(D.buffer,SharedArrayBuffer)))return ut(D,et,gt);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Yt=D.valueOf&&D.valueOf();if(Yt!=null&&Yt!==D)return x.from(Yt,et,gt);const le=function(we){if(x.isBuffer(we)){const ie=0|Ut(we.length),U=C(ie);return U.length===0||we.copy(U,0,0,ie),U}return we.length!==void 0?typeof we.length!="number"||Xt(we.length)?C(0):Y(we):we.type==="Buffer"&&Array.isArray(we.data)?Y(we.data):void 0}(D);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return x.from(D[Symbol.toPrimitive]("string"),et,gt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}function Q(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 V(D){return Q(D),C(D<0?0:0|Ut(D))}function Y(D){const et=D.length<0?0:0|Ut(D.length),gt=C(et);for(let Yt=0;Yt=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return 0|D}function pt(D,et){if(x.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||at(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);const gt=D.length,Yt=arguments.length>2&&arguments[2]===!0;if(!Yt&>===0)return 0;let le=!1;for(;;)switch(et){case"ascii":case"latin1":case"binary":return gt;case"utf8":case"utf-8":return ee(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*gt;case"hex":return gt>>>1;case"base64":return _(D).length;default:if(le)return Yt?-1:ee(D).length;et=(""+et).toLowerCase(),le=!0}}function Bt(D,et,gt){let Yt=!1;if((et===void 0||et<0)&&(et=0),et>this.length||((gt===void 0||gt>this.length)&&(gt=this.length),gt<=0)||(gt>>>=0)<=(et>>>=0))return"";for(D||(D="utf8");;)switch(D){case"hex":return yt(this,et,gt);case"utf8":case"utf-8":return Tt(this,et,gt);case"ascii":return vt(this,et,gt);case"latin1":case"binary":return bt(this,et,gt);case"base64":return q(this,et,gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,et,gt);default:if(Yt)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),Yt=!0}}function Rt(D,et,gt){const Yt=D[et];D[et]=D[gt],D[gt]=Yt}function J(D,et,gt,Yt,le){if(D.length===0)return-1;if(typeof gt=="string"?(Yt=gt,gt=0):gt>2147483647?gt=2147483647:gt<-2147483648&&(gt=-2147483648),Xt(gt=+gt)&&(gt=le?0:D.length-1),gt<0&&(gt=D.length+gt),gt>=D.length){if(le)return-1;gt=D.length-1}else if(gt<0){if(!le)return-1;gt=0}if(typeof et=="string"&&(et=x.from(et,Yt)),x.isBuffer(et))return et.length===0?-1:At(D,et,gt,Yt,le);if(typeof et=="number")return et&=255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(D,et,gt):Uint8Array.prototype.lastIndexOf.call(D,et,gt):At(D,[et],gt,Yt,le);throw new TypeError("val must be string, number or Buffer")}function At(D,et,gt,Yt,le){let we,ie=1,U=D.length,X=et.length;if(Yt!==void 0&&((Yt=String(Yt).toLowerCase())==="ucs2"||Yt==="ucs-2"||Yt==="utf16le"||Yt==="utf-16le")){if(D.length<2||et.length<2)return-1;ie=2,U/=2,X/=2,gt/=2}function Pt(Ht,re){return ie===1?Ht[re]:Ht.readUInt16BE(re*ie)}if(le){let Ht=-1;for(we=gt;weU&&(gt=U-X),we=gt;we>=0;we--){let Ht=!0;for(let re=0;rele&&(Yt=le):Yt=le;const we=et.length;let ie;for(Yt>we/2&&(Yt=we/2),ie=0;ie>8,X=ie%256,Pt.push(X),Pt.push(U);return Pt}(et,D.length-gt),D,gt,Yt)}function q(D,et,gt){return et===0&>===D.length?g.fromByteArray(D):g.fromByteArray(D.slice(et,gt))}function Tt(D,et,gt){gt=Math.min(D.length,gt);const Yt=[];let le=et;for(;le239?4:we>223?3:we>191?2:1;if(le+U<=gt){let X,Pt,Ht,re;switch(U){case 1:we<128&&(ie=we);break;case 2:X=D[le+1],(192&X)==128&&(re=(31&we)<<6|63&X,re>127&&(ie=re));break;case 3:X=D[le+1],Pt=D[le+2],(192&X)==128&&(192&Pt)==128&&(re=(15&we)<<12|(63&X)<<6|63&Pt,re>2047&&(re<55296||re>57343)&&(ie=re));break;case 4:X=D[le+1],Pt=D[le+2],Ht=D[le+3],(192&X)==128&&(192&Pt)==128&&(192&Ht)==128&&(re=(15&we)<<18|(63&X)<<12|(63&Pt)<<6|63&Ht,re>65535&&re<1114112&&(ie=re))}}ie===null?(ie=65533,U=1):ie>65535&&(ie-=65536,Yt.push(ie>>>10&1023|55296),ie=56320|1023&ie),Yt.push(ie),le+=U}return function(we){const ie=we.length;if(ie<=Ft)return String.fromCharCode.apply(String,we);let U="",X=0;for(;XYt.length?(x.isBuffer(we)||(we=x.from(we)),we.copy(Yt,le)):Uint8Array.prototype.set.call(Yt,we,le);else{if(!x.isBuffer(we))throw new TypeError('"list" argument must be an Array of Buffers');we.copy(Yt,le)}le+=we.length}return Yt},x.byteLength=pt,x.prototype._isBuffer=!0,x.prototype.swap16=function(){const D=this.length;if(D%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let et=0;etet&&(D+=" ... "),""},R&&(x.prototype[R]=x.prototype.inspect),x.prototype.compare=function(D,et,gt,Yt,le){if(at(D,Uint8Array)&&(D=x.from(D,D.offset,D.byteLength)),!x.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(et===void 0&&(et=0),gt===void 0&&(gt=D?D.length:0),Yt===void 0&&(Yt=0),le===void 0&&(le=this.length),et<0||gt>D.length||Yt<0||le>this.length)throw new RangeError("out of range index");if(Yt>=le&&et>=gt)return 0;if(Yt>=le)return-1;if(et>=gt)return 1;if(this===D)return 0;let we=(le>>>=0)-(Yt>>>=0),ie=(gt>>>=0)-(et>>>=0);const U=Math.min(we,ie),X=this.slice(Yt,le),Pt=D.slice(et,gt);for(let Ht=0;Ht>>=0,isFinite(gt)?(gt>>>=0,Yt===void 0&&(Yt="utf8")):(Yt=gt,gt=void 0)}const le=this.length-et;if((gt===void 0||gt>le)&&(gt=le),D.length>0&&(gt<0||et<0)||et>this.length)throw new RangeError("Attempt to write outside buffer bounds");Yt||(Yt="utf8");let we=!1;for(;;)switch(Yt){case"hex":return c(this,D,et,gt);case"utf8":case"utf-8":return N(this,D,et,gt);case"ascii":case"latin1":case"binary":return G(this,D,et,gt);case"base64":return tt(this,D,et,gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,D,et,gt);default:if(we)throw new TypeError("Unknown encoding: "+Yt);Yt=(""+Yt).toLowerCase(),we=!0}},x.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Ft=4096;function vt(D,et,gt){let Yt="";gt=Math.min(D.length,gt);for(let le=et;leYt)&&(gt=Yt);let le="";for(let we=et;wegt)throw new RangeError("Trying to access beyond buffer length")}function xt(D,et,gt,Yt,le,we){if(!x.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(et>le||etD.length)throw new RangeError("Index out of range")}function Ot(D,et,gt,Yt,le){L(et,Yt,le,D,gt,7);let we=Number(et&BigInt(4294967295));D[gt++]=we,we>>=8,D[gt++]=we,we>>=8,D[gt++]=we,we>>=8,D[gt++]=we;let ie=Number(et>>BigInt(32)&BigInt(4294967295));return D[gt++]=ie,ie>>=8,D[gt++]=ie,ie>>=8,D[gt++]=ie,ie>>=8,D[gt++]=ie,gt}function kt(D,et,gt,Yt,le){L(et,Yt,le,D,gt,7);let we=Number(et&BigInt(4294967295));D[gt+7]=we,we>>=8,D[gt+6]=we,we>>=8,D[gt+5]=we,we>>=8,D[gt+4]=we;let ie=Number(et>>BigInt(32)&BigInt(4294967295));return D[gt+3]=ie,ie>>=8,D[gt+2]=ie,ie>>=8,D[gt+1]=ie,ie>>=8,D[gt]=ie,gt+8}function Ct(D,et,gt,Yt,le,we){if(gt+Yt>D.length)throw new RangeError("Index out of range");if(gt<0)throw new RangeError("Index out of range")}function H(D,et,gt,Yt,le){return et=+et,gt>>>=0,le||Ct(D,0,gt,4),w.write(D,et,gt,Yt,23,4),gt+4}function it(D,et,gt,Yt,le){return et=+et,gt>>>=0,le||Ct(D,0,gt,8),w.write(D,et,gt,Yt,52,8),gt+8}x.prototype.slice=function(D,et){const gt=this.length;(D=~~D)<0?(D+=gt)<0&&(D=0):D>gt&&(D=gt),(et=et===void 0?gt:~~et)<0?(et+=gt)<0&&(et=0):et>gt&&(et=gt),et>>=0,et>>>=0,gt||lt(D,et,this.length);let Yt=this[D],le=1,we=0;for(;++we>>=0,et>>>=0,gt||lt(D,et,this.length);let Yt=this[D+--et],le=1;for(;et>0&&(le*=256);)Yt+=this[D+--et]*le;return Yt},x.prototype.readUint8=x.prototype.readUInt8=function(D,et){return D>>>=0,et||lt(D,1,this.length),this[D]},x.prototype.readUint16LE=x.prototype.readUInt16LE=function(D,et){return D>>>=0,et||lt(D,2,this.length),this[D]|this[D+1]<<8},x.prototype.readUint16BE=x.prototype.readUInt16BE=function(D,et){return D>>>=0,et||lt(D,2,this.length),this[D]<<8|this[D+1]},x.prototype.readUint32LE=x.prototype.readUInt32LE=function(D,et){return D>>>=0,et||lt(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+16777216*this[D+3]},x.prototype.readUint32BE=x.prototype.readUInt32BE=function(D,et){return D>>>=0,et||lt(D,4,this.length),16777216*this[D]+(this[D+1]<<16|this[D+2]<<8|this[D+3])},x.prototype.readBigUInt64LE=Kt(function(D){$(D>>>=0,"offset");const et=this[D],gt=this[D+7];et!==void 0&>!==void 0||St(D,this.length-8);const Yt=et+256*this[++D]+65536*this[++D]+this[++D]*2**24,le=this[++D]+256*this[++D]+65536*this[++D]+gt*2**24;return BigInt(Yt)+(BigInt(le)<>>=0,"offset");const et=this[D],gt=this[D+7];et!==void 0&>!==void 0||St(D,this.length-8);const Yt=et*2**24+65536*this[++D]+256*this[++D]+this[++D],le=this[++D]*2**24+65536*this[++D]+256*this[++D]+gt;return(BigInt(Yt)<>>=0,et>>>=0,gt||lt(D,et,this.length);let Yt=this[D],le=1,we=0;for(;++we=le&&(Yt-=Math.pow(2,8*et)),Yt},x.prototype.readIntBE=function(D,et,gt){D>>>=0,et>>>=0,gt||lt(D,et,this.length);let Yt=et,le=1,we=this[D+--Yt];for(;Yt>0&&(le*=256);)we+=this[D+--Yt]*le;return le*=128,we>=le&&(we-=Math.pow(2,8*et)),we},x.prototype.readInt8=function(D,et){return D>>>=0,et||lt(D,1,this.length),128&this[D]?-1*(255-this[D]+1):this[D]},x.prototype.readInt16LE=function(D,et){D>>>=0,et||lt(D,2,this.length);const gt=this[D]|this[D+1]<<8;return 32768>?4294901760|gt:gt},x.prototype.readInt16BE=function(D,et){D>>>=0,et||lt(D,2,this.length);const gt=this[D+1]|this[D]<<8;return 32768>?4294901760|gt:gt},x.prototype.readInt32LE=function(D,et){return D>>>=0,et||lt(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},x.prototype.readInt32BE=function(D,et){return D>>>=0,et||lt(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},x.prototype.readBigInt64LE=Kt(function(D){$(D>>>=0,"offset");const et=this[D],gt=this[D+7];et!==void 0&>!==void 0||St(D,this.length-8);const Yt=this[D+4]+256*this[D+5]+65536*this[D+6]+(gt<<24);return(BigInt(Yt)<>>=0,"offset");const et=this[D],gt=this[D+7];et!==void 0&>!==void 0||St(D,this.length-8);const Yt=(et<<24)+65536*this[++D]+256*this[++D]+this[++D];return(BigInt(Yt)<>>=0,et||lt(D,4,this.length),w.read(this,D,!0,23,4)},x.prototype.readFloatBE=function(D,et){return D>>>=0,et||lt(D,4,this.length),w.read(this,D,!1,23,4)},x.prototype.readDoubleLE=function(D,et){return D>>>=0,et||lt(D,8,this.length),w.read(this,D,!0,52,8)},x.prototype.readDoubleBE=function(D,et){return D>>>=0,et||lt(D,8,this.length),w.read(this,D,!1,52,8)},x.prototype.writeUintLE=x.prototype.writeUIntLE=function(D,et,gt,Yt){D=+D,et>>>=0,gt>>>=0,Yt||xt(this,D,et,gt,Math.pow(2,8*gt)-1,0);let le=1,we=0;for(this[et]=255&D;++we>>=0,gt>>>=0,Yt||xt(this,D,et,gt,Math.pow(2,8*gt)-1,0);let le=gt-1,we=1;for(this[et+le]=255&D;--le>=0&&(we*=256);)this[et+le]=D/we&255;return et+gt},x.prototype.writeUint8=x.prototype.writeUInt8=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,1,255,0),this[et]=255&D,et+1},x.prototype.writeUint16LE=x.prototype.writeUInt16LE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,2,65535,0),this[et]=255&D,this[et+1]=D>>>8,et+2},x.prototype.writeUint16BE=x.prototype.writeUInt16BE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,2,65535,0),this[et]=D>>>8,this[et+1]=255&D,et+2},x.prototype.writeUint32LE=x.prototype.writeUInt32LE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,4,4294967295,0),this[et+3]=D>>>24,this[et+2]=D>>>16,this[et+1]=D>>>8,this[et]=255&D,et+4},x.prototype.writeUint32BE=x.prototype.writeUInt32BE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,4,4294967295,0),this[et]=D>>>24,this[et+1]=D>>>16,this[et+2]=D>>>8,this[et+3]=255&D,et+4},x.prototype.writeBigUInt64LE=Kt(function(D,et=0){return Ot(this,D,et,BigInt(0),BigInt("0xffffffffffffffff"))}),x.prototype.writeBigUInt64BE=Kt(function(D,et=0){return kt(this,D,et,BigInt(0),BigInt("0xffffffffffffffff"))}),x.prototype.writeIntLE=function(D,et,gt,Yt){if(D=+D,et>>>=0,!Yt){const U=Math.pow(2,8*gt-1);xt(this,D,et,gt,U-1,-U)}let le=0,we=1,ie=0;for(this[et]=255&D;++le>>=0,!Yt){const U=Math.pow(2,8*gt-1);xt(this,D,et,gt,U-1,-U)}let le=gt-1,we=1,ie=0;for(this[et+le]=255&D;--le>=0&&(we*=256);)D<0&&ie===0&&this[et+le+1]!==0&&(ie=1),this[et+le]=(D/we|0)-ie&255;return et+gt},x.prototype.writeInt8=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,1,127,-128),D<0&&(D=255+D+1),this[et]=255&D,et+1},x.prototype.writeInt16LE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,2,32767,-32768),this[et]=255&D,this[et+1]=D>>>8,et+2},x.prototype.writeInt16BE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,2,32767,-32768),this[et]=D>>>8,this[et+1]=255&D,et+2},x.prototype.writeInt32LE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,4,2147483647,-2147483648),this[et]=255&D,this[et+1]=D>>>8,this[et+2]=D>>>16,this[et+3]=D>>>24,et+4},x.prototype.writeInt32BE=function(D,et,gt){return D=+D,et>>>=0,gt||xt(this,D,et,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[et]=D>>>24,this[et+1]=D>>>16,this[et+2]=D>>>8,this[et+3]=255&D,et+4},x.prototype.writeBigInt64LE=Kt(function(D,et=0){return Ot(this,D,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),x.prototype.writeBigInt64BE=Kt(function(D,et=0){return kt(this,D,et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),x.prototype.writeFloatLE=function(D,et,gt){return H(this,D,et,!0,gt)},x.prototype.writeFloatBE=function(D,et,gt){return H(this,D,et,!1,gt)},x.prototype.writeDoubleLE=function(D,et,gt){return it(this,D,et,!0,gt)},x.prototype.writeDoubleBE=function(D,et,gt){return it(this,D,et,!1,gt)},x.prototype.copy=function(D,et,gt,Yt){if(!x.isBuffer(D))throw new TypeError("argument should be a Buffer");if(gt||(gt=0),Yt||Yt===0||(Yt=this.length),et>=D.length&&(et=D.length),et||(et=0),Yt>0&&Yt=this.length)throw new RangeError("Index out of range");if(Yt<0)throw new RangeError("sourceEnd out of bounds");Yt>this.length&&(Yt=this.length),D.length-et>>=0,gt=gt===void 0?this.length:gt>>>0,D||(D=0),typeof D=="number")for(le=et;le=Yt+4;gt-=3)et=`_${D.slice(gt-3,gt)}${et}`;return`${D.slice(0,gt)}${et}`}function L(D,et,gt,Yt,le,we){if(D>gt||D= 0${ie} and < 2${ie} ** ${8*(we+1)}${ie}`:`>= -(2${ie} ** ${8*(we+1)-1}${ie}) and < 2 ** ${8*(we+1)-1}${ie}`,new mt.ERR_OUT_OF_RANGE("value",U,D)}(function(ie,U,X){$(U,"offset"),ie[U]!==void 0&&ie[U+X]!==void 0||St(U,ie.length-(X+1))})(Yt,le,we)}function $(D,et){if(typeof D!="number")throw new mt.ERR_INVALID_ARG_TYPE(et,"number",D)}function St(D,et,gt){throw Math.floor(D)!==D?($(D,gt),new mt.ERR_OUT_OF_RANGE("offset","an integer",D)):et<0?new mt.ERR_BUFFER_OUT_OF_BOUNDS:new mt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${et}`,D)}Dt("ERR_BUFFER_OUT_OF_BOUNDS",function(D){return D?`${D} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Dt("ERR_INVALID_ARG_TYPE",function(D,et){return`The "${D}" argument must be of type number. Received type ${typeof et}`},TypeError),Dt("ERR_OUT_OF_RANGE",function(D,et,gt){let Yt=`The value of "${D}" is out of range.`,le=gt;return Number.isInteger(gt)&&Math.abs(gt)>4294967296?le=T(String(gt)):typeof gt=="bigint"&&(le=String(gt),(gt>BigInt(2)**BigInt(32)||gt<-(BigInt(2)**BigInt(32)))&&(le=T(le)),le+="n"),Yt+=` It must be ${et}. Received ${le}`,Yt},RangeError);const ft=/[^+/0-9A-Za-z-_]/g;function ee(D,et){let gt;et=et||1/0;const Yt=D.length;let le=null;const we=[];for(let ie=0;ie55295&><57344){if(!le){if(gt>56319){(et-=3)>-1&&we.push(239,191,189);continue}if(ie+1===Yt){(et-=3)>-1&&we.push(239,191,189);continue}le=gt;continue}if(gt<56320){(et-=3)>-1&&we.push(239,191,189),le=gt;continue}gt=65536+(le-55296<<10|gt-56320)}else le&&(et-=3)>-1&&we.push(239,191,189);if(le=null,gt<128){if((et-=1)<0)break;we.push(gt)}else if(gt<2048){if((et-=2)<0)break;we.push(gt>>6|192,63>|128)}else if(gt<65536){if((et-=3)<0)break;we.push(gt>>12|224,gt>>6&63|128,63>|128)}else{if(!(gt<1114112))throw new Error("Invalid code point");if((et-=4)<0)break;we.push(gt>>18|240,gt>>12&63|128,gt>>6&63|128,63>|128)}}return we}function _(D){return g.toByteArray(function(et){if((et=(et=et.split("=")[0]).trim().replace(ft,"")).length<2)return"";for(;et.length%4!=0;)et+="=";return et}(D))}function W(D,et,gt,Yt){let le;for(le=0;le=et.length||le>=D.length);++le)et[le+gt]=D[le];return le}function at(D,et){return D instanceof et||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===et.name}function Xt(D){return D!=D}const ae=function(){const D="0123456789abcdef",et=new Array(256);for(let gt=0;gt<16;++gt){const Yt=16*gt;for(let le=0;le<16;++le)et[Yt+le]=D[gt]+D[le]}return et}();function Kt(D){return typeof BigInt>"u"?Ne:D}function Ne(){throw new Error("BigInt not supported")}},928(f,h,A){A.r(h),A.d(h,{Array:()=>L,Bool:()=>kt,Double:()=>xt,Enum:()=>ee,Float:()=>lt,Hyper:()=>vt,Int:()=>tt,LargeInt:()=>Ft,Opaque:()=>mt,Option:()=>St,Quadruple:()=>Ot,Reference:()=>_,String:()=>H,Struct:()=>W,Union:()=>Xt,UnsignedHyper:()=>dt,UnsignedInt:()=>yt,VarArray:()=>$,VarOpaque:()=>T,Void:()=>ft,XdrReader:()=>x,XdrWriter:()=>V,config:()=>we});class g extends TypeError{constructor(U){super(`XDR Write Error: ${U}`)}}class w extends TypeError{constructor(U){super(`XDR Read Error: ${U}`)}}class R extends TypeError{constructor(U){super(`XDR Type Definition Error: ${U}`)}}class S extends R{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var C=A(686).hp;class x{constructor(U){oa(this,"_buffer");oa(this,"_length");oa(this,"_index");if(!C.isBuffer(U)){if(!(U instanceof Array||Array.isArray(U)||ArrayBuffer.isView(U)))throw new w(`source invalid: ${U}`);U=C.from(U)}this._buffer=U,this._length=U.length,this._index=0}get eof(){return this._index===this._length}advance(U){const X=this._index;if(this._index+=U,this._length0){for(let Ht=0;Ht0){const Ht=this.alloc(Pt);this._buffer.fill(0,Ht,this._index)}}writeInt32BE(U){const X=this.alloc(4);this._buffer.writeInt32BE(U,X)}writeUInt32BE(U){const X=this.alloc(4);this._buffer.writeUInt32BE(U,X)}writeBigInt64BE(U){const X=this.alloc(8);this._buffer.writeBigInt64BE(U,X)}writeBigUInt64BE(U){const X=this.alloc(8);this._buffer.writeBigUInt64BE(U,X)}writeFloatBE(U){const X=this.alloc(4);this._buffer.writeFloatBE(U,X)}writeDoubleBE(U){const X=this.alloc(8);this._buffer.writeDoubleBE(U,X)}}oa(V,"bufferChunkSize",Q);var Y=A(686).hp;class ut{toXDR(U="raw"){if(!this.write)return this.constructor.toXDR(this,U);const X=new V;return this.write(this,X),J(X.finalize(),U)}fromXDR(U,X="raw"){if(!this.read)return this.constructor.fromXDR(U,X);const Pt=new x(At(U,X)),Ht=this.read(Pt);return Pt.ensureInputConsumed(),Ht}validateXDR(U,X="raw"){try{return this.fromXDR(U,X),!0}catch{return!1}}static toXDR(U,X="raw"){const Pt=new V;return this.write(U,Pt),J(Pt.finalize(),X)}static fromXDR(U,X="raw"){const Pt=new x(At(U,X)),Ht=this.read(Pt);return Pt.ensureInputConsumed(),Ht}static validateXDR(U,X="raw"){try{return this.fromXDR(U,X),!0}catch{return!1}}}class Ut extends ut{static read(U){throw new S}static write(U,X){throw new S}static isValid(U){return!1}}class pt extends ut{isValid(U){return!1}}class Bt extends pt{constructor(U){super(),this._maxDepth=U??Bt.DEFAULT_MAX_DEPTH}static checkDepth(U){if(U!==void 0){if(!Number.isFinite(U))throw new TypeError(`remainingDepth (current remaining decoding depth budget) must be a finite number, got ${typeof U}: ${U}`);if(U<0)throw new w("exceeded max decoding depth")}}}Bt.DEFAULT_MAX_DEPTH=200,Bt._maxDepth=Bt.DEFAULT_MAX_DEPTH;class Rt extends TypeError{constructor(U){super(`Invalid format ${U}, must be one of "raw", "hex", "base64"`)}}function J(ie,U){switch(U){case"raw":return ie;case"hex":return ie.toString("hex");case"base64":return ie.toString("base64");default:throw new Rt(U)}}function At(ie,U){switch(U){case"raw":return ie;case"hex":return Y.from(ie,"hex");case"base64":return Y.from(ie,"base64");default:throw new Rt(U)}}function c(ie,U){return ie!=null&&(ie instanceof U||N(ie,U)&&typeof ie.constructor.read=="function"&&typeof ie.constructor.write=="function"&&N(ie,"XdrType"))}function N(ie,U){do if(ie.constructor.name===U)return!0;while(ie=Object.getPrototypeOf(ie));return!1}const G=2147483647;class tt extends Ut{static read(U){return U.readInt32BE()}static write(U,X){if(typeof U!="number")throw new g("not a number");if((0|U)!==U)throw new g("invalid i32 value");X.writeInt32BE(U)}static isValid(U){return typeof U=="number"&&(0|U)===U&&U>=-2147483648&&U<=G}}function Et(ie,U){return`${U?"u":"i"}${ie}`}function q(ie,U){if(U)return[0n,(1n<Cr)throw new RangeError(`bigint value ${Qe} for ${Et(Pt,Ht)} out of range [${Oe}, ${Cr}]`);return Qe}let We=0n;for(let Qe=0;Qe=xe&&We<=je)return We;throw new RangeError(`bigint values [${X}] for ${Et(Pt,Ht)} out of range [${xe}, ${je}]: ${We}`)}(U,this.size,this.unsigned)}get unsigned(){throw new S}get size(){throw new S}slice(U){return function(X,Pt,Ht){if(typeof X!="bigint")throw new TypeError("Expected bigint 'value', got "+typeof X);const re=Pt/Ht;if(re===1)return[X];if(Ht<32||Ht>128||re!==2&&re!==4&&re!==8)throw new TypeError(`invalid bigint (${X}) and slice size (${Pt} -> ${Ht}) combination`);const We=BigInt(Ht),xe=new Array(re);for(let je=0;je>=We;return xe}(this._value,this.size,U)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(U){const{size:X,unsigned:Pt}=this.prototype;return X===64?new this(Pt?U.readBigUInt64BE():U.readBigInt64BE()):new this(...Array.from({length:X/64},()=>U.readBigUInt64BE()).reverse())}static write(U,X){if(U instanceof this)U=U._value;else if(typeof U!="bigint"||U>this.MAX_VALUE||U=0;We--)X.writeBigUInt64BE(re>>BigInt(64*We)&0xffffffffffffffffn)}}static isValid(U){return U instanceof this||typeof U=="bigint"&&U>=this.MIN_VALUE&&U<=this.MAX_VALUE}static fromString(U){return new this(U)}static defineIntBoundaries(){const[U,X]=q(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=U,this.MAX_VALUE=X}}oa(Ft,"MAX_VALUE",0n),oa(Ft,"MIN_VALUE",0n);class vt extends Ft{constructor(...U){super(U)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(U,X){return new this(U,X)}}vt.defineIntBoundaries();const bt=4294967295;class yt extends Ut{static read(U){return U.readUInt32BE()}static write(U,X){if(typeof U!="number"||!(U>=0&&U<=bt)||U%1!=0)throw new g("invalid u32 value");X.writeUInt32BE(U)}static isValid(U){return typeof U=="number"&&U%1==0&&U>=0&&U<=bt}}yt.MAX_VALUE=bt,yt.MIN_VALUE=0;class dt extends Ft{constructor(...U){super(U)}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(U,X){return new this(U,X)}}dt.defineIntBoundaries();class lt extends Ut{static read(U){return U.readFloatBE()}static write(U,X){if(typeof U!="number")throw new g("not a number");X.writeFloatBE(U)}static isValid(U){return typeof U=="number"}}class xt extends Ut{static read(U){return U.readDoubleBE()}static write(U,X){if(typeof U!="number")throw new g("not a number");X.writeDoubleBE(U)}static isValid(U){return typeof U=="number"}}class Ot extends Ut{static read(){throw new R("quadruple not supported")}static write(){throw new R("quadruple not supported")}static isValid(){return!1}}class kt extends Ut{static read(U){const X=tt.read(U);switch(X){case 0:return!1;case 1:return!0;default:throw new w(`got ${X} when trying to read a bool`)}}static write(U,X){const Pt=U?1:0;tt.write(Pt,X)}static isValid(U){return typeof U=="boolean"}}var Ct=A(686).hp;class H extends pt{constructor(U=yt.MAX_VALUE){super(),this._maxLength=U}read(U){const X=yt.read(U);if(X>this._maxLength)throw new w(`saw ${X} length String, max allowed is ${this._maxLength}`);return U.read(X)}readString(U){return this.read(U).toString("utf8")}write(U,X){const Pt=typeof U=="string"?Ct.byteLength(U,"utf8"):U.length;if(Pt>this._maxLength)throw new g(`got ${U.length} bytes, max allowed is ${this._maxLength}`);yt.write(Pt,X),X.write(U,Pt)}isValid(U){return typeof U=="string"?Ct.byteLength(U,"utf8")<=this._maxLength:!!(U instanceof Array||Ct.isBuffer(U))&&U.length<=this._maxLength}}var it=A(686).hp;class mt extends pt{constructor(U){super(),this._length=U}read(U){return U.read(this._length)}write(U,X){const{length:Pt}=U;if(Pt!==this._length)throw new g(`got ${U.length} bytes, expected ${this._length}`);X.write(U,Pt)}isValid(U){return it.isBuffer(U)&&U.length===this._length}}var Dt=A(686).hp;class T extends pt{constructor(U=yt.MAX_VALUE){super(),this._maxLength=U}read(U){const X=yt.read(U);if(X>this._maxLength)throw new w(`saw ${X} length VarOpaque, max allowed is ${this._maxLength}`);return U.read(X)}write(U,X){const{length:Pt}=U;if(U.length>this._maxLength)throw new g(`got ${U.length} bytes, max allowed is ${this._maxLength}`);yt.write(Pt,X),X.write(U,Pt)}isValid(U){return Dt.isBuffer(U)&&U.length<=this._maxLength}}class L extends Bt{constructor(U,X,Pt=Bt.DEFAULT_MAX_DEPTH){super(Pt),this._childType=U,this._length=X}read(U,X=this._maxDepth){if(this._length>U.remainingBytes())throw new w(`Array length ${this._length} exceeds remaining ${U.remainingBytes()} bytes`);Bt.checkDepth(X);const Pt=[];for(let Ht=0;Htthis._maxLength)throw new w(`saw ${Pt} length VarArray, max allowed is ${this._maxLength}`);if(Pt>U.remainingBytes())throw new w(`VarArray length ${Pt} exceeds remaining ${U.remainingBytes()} bytes`);const Ht=[];for(let re=0;rethis._maxLength)throw new g(`got array of size ${U.length}, max allowed is ${this._maxLength}`);yt.write(U.length,X);for(const Pt of U)this._childType.write(Pt,X)}isValid(U){if(!(U instanceof Array)||U.length>this._maxLength)return!1;for(const X of U)if(!this._childType.isValid(X))return!1;return!0}}class St extends Bt{constructor(U,X=Bt.DEFAULT_MAX_DEPTH){super(X),this._childType=U}read(U,X=this._maxDepth){if(Bt.checkDepth(X),kt.read(U))return this._childType.read(U,X-1)}write(U,X){const Pt=U!=null;kt.write(Pt,X),Pt&&this._childType.write(U,X)}isValid(U){return U==null||this._childType.isValid(U)}}class ft extends Ut{static read(){}static write(U){if(U!==void 0)throw new g("trying to write value to a void slot")}static isValid(U){return U===void 0}}class ee extends Ut{constructor(U,X){super(),this.name=U,this.value=X}static read(U){const X=tt.read(U),Pt=this._byValue[X];if(Pt===void 0)throw new w(`unknown ${this.enumName} member for value ${X}`);return Pt}static write(U,X){if(!this.isValid(U))throw new g(`${U} has enum name ${U==null?void 0:U.enumName}, not ${this.enumName}: ${JSON.stringify(U)}`);tt.write(U.value,X)}static isValid(U){var X;return((X=U==null?void 0:U.constructor)==null?void 0:X.enumName)===this.enumName||c(U,this)}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(U){const X=this._members[U];if(!X)throw new TypeError(`${U} is not a member of ${this.enumName}`);return X}static fromValue(U){const X=this._byValue[U];if(X===void 0)throw new TypeError(`${U} is not a value of any member of ${this.enumName}`);return X}static create(U,X,Pt){const Ht=class extends ee{};Ht.enumName=X,U.results[X]=Ht,Ht._members={},Ht._byValue={};for(const[re,We]of Object.entries(Pt)){const xe=new Ht(re,We);Ht._members[re]=xe,Ht._byValue[We]=xe,Ht[re]=()=>xe}return Ht}}class _ extends Ut{resolve(){throw new R('"resolve" method should be implemented in the descendant class')}}class W extends Bt{constructor(U,X){var Pt;super(X??((Pt=new.target)==null?void 0:Pt._maxDepth)),this._attributes=U||{}}static read(U,X=this._maxDepth){Bt.checkDepth(X);const Pt={};for(const[Ht,re]of this._fields)Pt[Ht]=re.read(U,X-1);return new this(Pt,this._maxDepth)}static write(U,X){var Pt;if(!this.isValid(U))throw new g(`${U} has struct name ${(Pt=U==null?void 0:U.constructor)==null?void 0:Pt.structName}, not ${this.structName}: ${JSON.stringify(U)}`);for(const[Ht,re]of this._fields){const We=U._attributes[Ht];re.write(We,X)}}static isValid(U){var X;return((X=U==null?void 0:U.constructor)==null?void 0:X.structName)===this.structName||c(U,this)}static create(U,X,Pt,Ht=Bt.DEFAULT_MAX_DEPTH){const re=class extends W{};re.structName=X,re._maxDepth=Ht,U.results[X]=re;const We=new Array(Pt.length);for(let xe=0;xe>1,Y=-7,ut=w?S-1:0,Ut=w?-1:1,pt=A[g+ut];for(ut+=Ut,C=pt&(1<<-Y)-1,pt>>=-Y,Y+=ot;Y>0;C=256*C+A[g+ut],ut+=Ut,Y-=8);for(x=C&(1<<-Y)-1,C>>=-Y,Y+=R;Y>0;x=256*x+A[g+ut],ut+=Ut,Y-=8);if(C===0)C=1-V;else{if(C===Q)return x?NaN:1/0*(pt?-1:1);x+=Math.pow(2,R),C-=V}return(pt?-1:1)*x*Math.pow(2,C-R)},h.write=function(A,g,w,R,S,C){var x,ot,Q,V=8*C-S-1,Y=(1<>1,Ut=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,pt=R?0:C-1,Bt=R?1:-1,Rt=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(ot=isNaN(g)?1:0,x=Y):(x=Math.floor(Math.log(g)/Math.LN2),g*(Q=Math.pow(2,-x))<1&&(x--,Q*=2),(g+=x+ut>=1?Ut/Q:Ut*Math.pow(2,1-ut))*Q>=2&&(x++,Q/=2),x+ut>=Y?(ot=0,x=Y):x+ut>=1?(ot=(g*Q-1)*Math.pow(2,S),x+=ut):(ot=g*Math.pow(2,ut-1)*Math.pow(2,S),x=0));S>=8;A[w+pt]=255&ot,pt+=Bt,ot/=256,S-=8);for(x=x<0;A[w+pt]=255&x,pt+=Bt,x/=256,V-=8);A[w+pt-Bt]|=128*Rt}}},m={};function p(f){var h=m[f];if(h!==void 0)return h.exports;var A=m[f]={exports:{}};return u[f](A,A.exports,p),A.exports}return p.d=(f,h)=>{for(var A in h)p.o(h,A)&&!p.o(f,A)&&Object.defineProperty(f,A,{enumerable:!0,get:h[A]})},p.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),p.o=(f,h)=>Object.prototype.hasOwnProperty.call(f,h),p.r=f=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(f,"__esModule",{value:!0})},p(348)})(),s.exports=y()},3918(s,E,k){var y=k(5606);function O(N,G){var tt=Object.keys(N);if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(N);G&&(Et=Et.filter(function(q){return Object.getOwnPropertyDescriptor(N,q).enumerable})),tt.push.apply(tt,Et)}return tt}function u(N){for(var G=1;G"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 S(N,G){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(tt,Et){return tt.__proto__=Et,tt},S(N,G)}function C(N){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},C(N)}function x(N){return x=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},x(N)}var ot=k(537).inspect,Q=k(9597).codes.ERR_INVALID_ARG_TYPE;function V(N,G,tt){return(tt===void 0||tt>N.length)&&(tt=N.length),N.substring(tt-G.length,tt)===G}var Y="",ut="",Ut="",pt="",Bt={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 Rt(N){var G=Object.keys(N),tt=Object.create(Object.getPrototypeOf(N));return G.forEach(function(Et){tt[Et]=N[Et]}),Object.defineProperty(tt,"message",{value:N.message}),tt}function J(N){return ot(N,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function At(N,G,tt){var Et="",q="",Tt=0,Ft="",vt=!1,bt=J(N),yt=bt.split(` +`),dt=J(G).split(` +`),lt=0,xt="";if(tt==="strictEqual"&&x(N)==="object"&&x(G)==="object"&&N!==null&&G!==null&&(tt="strictEqualObject"),yt.length===1&&dt.length===1&&yt[0]!==dt[0]){var Ot=yt[0].length+dt[0].length;if(Ot<=10){if(!(x(N)==="object"&&N!==null||x(G)==="object"&&G!==null||N===0&&G===0))return"".concat(Bt[tt],` + +`)+"".concat(yt[0]," !== ").concat(dt[0],` +`)}else if(tt!=="strictEqualObject"&&Ot<(y.stderr&&y.stderr.isTTY?y.stderr.columns:80)){for(;yt[0][lt]===dt[0][lt];)lt++;lt>2&&(xt=` + `.concat(function(ee,_){if(_=Math.floor(_),ee.length==0||_==0)return"";var W=ee.length*_;for(_=Math.floor(Math.log(_)/Math.log(2));_;)ee+=ee,_--;return ee+ee.substring(0,W-ee.length)}(" ",lt),"^"),lt=0)}}for(var kt=yt[yt.length-1],Ct=dt[dt.length-1];kt===Ct&&(lt++<2?Ft=` + `.concat(kt).concat(Ft):Et=kt,yt.pop(),dt.pop(),yt.length!==0&&dt.length!==0);)kt=yt[yt.length-1],Ct=dt[dt.length-1];var H=Math.max(yt.length,dt.length);if(H===0){var it=bt.split(` +`);if(it.length>30)for(it[26]="".concat(Y,"...").concat(pt);it.length>27;)it.pop();return"".concat(Bt.notIdentical,` + +`).concat(it.join(` +`),` +`)}lt>3&&(Ft=` +`.concat(Y,"...").concat(pt).concat(Ft),vt=!0),Et!==""&&(Ft=` + `.concat(Et).concat(Ft),Et="");var mt=0,Dt=Bt[tt]+` +`.concat(ut,"+ actual").concat(pt," ").concat(Ut,"- expected").concat(pt),T=" ".concat(Y,"...").concat(pt," Lines skipped");for(lt=0;lt1&<>2&&(L>4?(q+=` +`.concat(Y,"...").concat(pt),vt=!0):L>3&&(q+=` + `.concat(dt[lt-2]),mt++),q+=` + `.concat(dt[lt-1]),mt++),Tt=lt,Et+=` +`.concat(Ut,"-").concat(pt," ").concat(dt[lt]),mt++;else if(dt.length1&<>2&&(L>4?(q+=` +`.concat(Y,"...").concat(pt),vt=!0):L>3&&(q+=` + `.concat(yt[lt-2]),mt++),q+=` + `.concat(yt[lt-1]),mt++),Tt=lt,q+=` +`.concat(ut,"+").concat(pt," ").concat(yt[lt]),mt++;else{var $=dt[lt],St=yt[lt],ft=St!==$&&(!V(St,",")||St.slice(0,-1)!==$);ft&&V($,",")&&$.slice(0,-1)===St&&(ft=!1,St+=","),ft?(L>1&<>2&&(L>4?(q+=` +`.concat(Y,"...").concat(pt),vt=!0):L>3&&(q+=` + `.concat(yt[lt-2]),mt++),q+=` + `.concat(yt[lt-1]),mt++),Tt=lt,q+=` +`.concat(ut,"+").concat(pt," ").concat(St),Et+=` +`.concat(Ut,"-").concat(pt," ").concat($),mt+=2):(q+=Et,Et="",L!==1&<!==0||(q+=` + `.concat(St),mt++))}if(mt>20&<30)for(it[26]="".concat(Y,"...").concat(pt);it.length>27;)it.pop();yt=it.length===1?Ft.call(this,"".concat(H," ").concat(it[0])):Ft.call(this,"".concat(H,` + +`).concat(it.join(` +`),` +`))}else{var mt=J(Ot),Dt="",T=Bt[lt];lt==="notDeepEqual"||lt==="notEqual"?(mt="".concat(Bt[lt],` + +`).concat(mt)).length>1024&&(mt="".concat(mt.slice(0,1021),"...")):(Dt="".concat(J(kt)),mt.length>512&&(mt="".concat(mt.slice(0,509),"...")),Dt.length>512&&(Dt="".concat(Dt.slice(0,509),"...")),lt==="deepEqual"||lt==="equal"?mt="".concat(T,` + +`).concat(mt,` + +should equal + +`):Dt=" ".concat(lt," ").concat(Dt)),yt=Ft.call(this,"".concat(mt).concat(Dt))}return Error.stackTraceLimit=Ct,yt.generatedMessage=!dt,Object.defineProperty(A(yt),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),yt.code="ERR_ASSERTION",yt.actual=Ot,yt.expected=kt,yt.operator=lt,Error.captureStackTrace&&Error.captureStackTrace(A(yt),xt),yt.stack,yt.name="AssertionError",h(yt)}return q=vt,(Tt=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:G,value:function(bt,yt){return ot(this,u(u({},yt),{},{customInspect:!1,depth:0}))}}])&&p(q.prototype,Tt),Object.defineProperty(q,"prototype",{writable:!1}),vt}(g(Error),ot.custom);s.exports=c},4035(s,E,k){var y,O=k(6556),u=k(9092)(),m=k(9957),p=k(5795);if(u){var f=O("RegExp.prototype.exec"),h={},A=function(){throw h},g={toString:A,valueOf:A};typeof Symbol.toPrimitive=="symbol"&&(g[Symbol.toPrimitive]=A),y=function(R){if(!R||typeof R!="object")return!1;var S=p(R,"lastIndex");if(!S||!m(S,"value"))return!1;try{f(R,g)}catch(C){return C===h}}}else{var w=O("Object.prototype.toString");y=function(R){return!(!R||typeof R!="object"&&typeof R!="function")&&w(R)==="[object RegExp]"}}s.exports=y},4039(s,E,k){var y=typeof Symbol<"u"&&Symbol,O=k(1333);s.exports=function(){return typeof y=="function"&&typeof Symbol=="function"&&typeof y("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&O()}},4107(s,E,k){var y=k(6698),O=k(392),u=k(2861).Buffer,m=[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],p=new Array(64);function f(){this.init(),this._w=p,O.call(this,64,56)}function h(C,x,ot){return ot^C&(x^ot)}function A(C,x,ot){return C&x|ot&(C|x)}function g(C){return(C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10)}function w(C){return(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7)}function R(C){return(C>>>7|C<<25)^(C>>>18|C<<14)^C>>>3}function S(C){return(C>>>17|C<<15)^(C>>>19|C<<13)^C>>>10}y(f,O),f.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},f.prototype._update=function(C){for(var x=this._w,ot=0|this._a,Q=0|this._b,V=0|this._c,Y=0|this._d,ut=0|this._e,Ut=0|this._f,pt=0|this._g,Bt=0|this._h,Rt=0;Rt<16;++Rt)x[Rt]=C.readInt32BE(4*Rt);for(;Rt<64;++Rt)x[Rt]=S(x[Rt-2])+x[Rt-7]+R(x[Rt-15])+x[Rt-16]|0;for(var J=0;J<64;++J){var At=Bt+w(ut)+h(ut,Ut,pt)+m[J]+x[J]|0,c=g(ot)+A(ot,Q,V)|0;Bt=pt,pt=Ut,Ut=ut,ut=Y+At|0,Y=V,V=Q,Q=ot,ot=At+c|0}this._a=ot+this._a|0,this._b=Q+this._b|0,this._c=V+this._c|0,this._d=Y+this._d|0,this._e=ut+this._e|0,this._f=Ut+this._f|0,this._g=pt+this._g|0,this._h=Bt+this._h|0},f.prototype._hash=function(){var C=u.allocUnsafe(32);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.writeInt32BE(this._h,28),C},s.exports=f},4133(s,E,k){var y=k(487),O=k(8452),u=k(3003),m=k(6642),p=k(2464),f=y(m(),Number);O(f,{getPolyfill:m,implementation:u,shim:p}),s.exports=f},4148(s,E,k){var y=k(5606),O=k(6763);function u(yt){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(dt){return typeof dt}:function(dt){return dt&&typeof Symbol=="function"&&dt.constructor===Symbol&&dt!==Symbol.prototype?"symbol":typeof dt},u(yt)}var m,p,f=k(9597).codes,h=f.ERR_AMBIGUOUS_ARGUMENT,A=f.ERR_INVALID_ARG_TYPE,g=f.ERR_INVALID_ARG_VALUE,w=f.ERR_INVALID_RETURN_VALUE,R=f.ERR_MISSING_ARGS,S=k(3918),C=k(537).inspect,x=k(537).types,ot=x.isPromise,Q=x.isRegExp,V=k(9133)(),Y=k(9394)(),ut=k(8075)("RegExp.prototype.test");function Ut(){var yt=k(2299);m=yt.isDeepEqual,p=yt.isDeepStrictEqual}var pt=!1,Bt=s.exports=c,Rt={};function J(yt){throw yt.message instanceof Error?yt.message:new S(yt)}function At(yt,dt,lt,xt){if(!lt){var Ot=!1;if(dt===0)Ot=!0,xt="No value argument passed to `assert.ok()`";else if(xt instanceof Error)throw xt;var kt=new S({actual:lt,expected:!0,message:xt,operator:"==",stackStartFn:yt});throw kt.generatedMessage=Ot,kt}}function c(){for(var yt=arguments.length,dt=new Array(yt),lt=0;lt1?lt-1:0),Ot=1;Ot1?lt-1:0),Ot=1;Ot1?lt-1:0),Ot=1;Ot1?lt-1:0),Ot=1;OtE},4372(s,E,k){var y=k(9675),O=k(6556)("TypedArray.prototype.buffer",!0),u=k(5680);s.exports=O||function(m){if(!u(m))throw new y("Not a Typed Array");return m.buffer}},4459(s){s.exports=Number.isNaN||function(E){return E!=E}},4634(s){var E={}.toString;s.exports=Array.isArray||function(k){return E.call(k)=="[object Array]"}},5345(s){s.exports=URIError},5360(s,E){var k=function(f,h){return h||(h={}),f.split("").forEach(function(A,g){A in h||(h[A]=g)}),h},y={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};y.charmap=k(y.alphabet,y.charmap);var O={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};O.charmap=k(O.alphabet,O.charmap);var u={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function m(f){if(this.buf=[],this.shift=8,this.carry=0,f){switch(f.type){case"rfc4648":this.charmap=E.rfc4648.charmap;break;case"crockford":this.charmap=E.crockford.charmap;break;case"base32hex":this.charmap=E.base32hex.charmap;break;default:throw new Error("invalid type")}f.charmap&&(this.charmap=f.charmap)}}function p(f){if(this.buf="",this.shift=3,this.carry=0,f){switch(f.type){case"rfc4648":this.alphabet=E.rfc4648.alphabet;break;case"crockford":this.alphabet=E.crockford.alphabet;break;case"base32hex":this.alphabet=E.base32hex.alphabet;break;default:throw new Error("invalid type")}f.alphabet?this.alphabet=f.alphabet:f.lc&&(this.alphabet=this.alphabet.toLowerCase())}}u.charmap=k(u.alphabet,u.charmap),m.prototype.charmap=y.charmap,m.prototype.write=function(f){var h=this.charmap,A=this.buf,g=this.shift,w=this.carry;return f.toUpperCase().split("").forEach(function(R){if(R!="="){var S=255&h[R];(g-=5)>0?w|=S<>-g),w=S<<(g+=8)&255):(A.push(w|S),g=8,w=0)}}),this.shift=g,this.carry=w,this},m.prototype.finalize=function(f){return f&&this.write(f),this.shift!==8&&this.carry!==0&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},p.prototype.alphabet=y.alphabet,p.prototype.write=function(f){var h,A,g,w=this.shift,R=this.carry;for(g=0;g>w,this.buf+=this.alphabet[31&h],w>5&&(h=A>>(w-=5),this.buf+=this.alphabet[31&h]),R=A<<(w=5-w),w=8-w;return this.shift=w,this.carry=R,this},p.prototype.finalize=function(f){return f&&this.write(f),this.shift!==3&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},E.encode=function(f,h){return new p(h).finalize(f)},E.decode=function(f,h){return new m(h).finalize(f)},E.Decoder=m,E.Encoder=p,E.charmap=k,E.crockford=O,E.rfc4648=y,E.base32hex=u},5377(s,E,k){var y=k(2861).Buffer,O=k(4634),u=k(4372),m=ArrayBuffer.isView||function(A){try{return u(A),!0}catch{return!1}},p=typeof Uint8Array<"u",f=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",h=f&&(y.prototype instanceof Uint8Array||y.TYPED_ARRAY_SUPPORT);s.exports=function(A,g){if(y.isBuffer(A))return A.constructor&&!("isBuffer"in A)?y.from(A):A;if(typeof A=="string")return y.from(A,g);if(f&&m(A)){if(A.byteLength===0)return y.alloc(0);if(h){var w=y.from(A.buffer,A.byteOffset,A.byteLength);if(w.byteLength===A.byteLength)return w}var R=A instanceof Uint8Array?A:new Uint8Array(A.buffer,A.byteOffset,A.byteLength),S=y.from(R);if(S.length===A.byteLength)return S}if(p&&A instanceof Uint8Array)return y.from(A);var C=O(A);if(C)for(var x=0;x255||~~ot!==ot)throw new RangeError("Array items must be numbers in the range 0-255.")}if(C||y.isBuffer(A)&&A.constructor&&typeof A.constructor.isBuffer=="function"&&A.constructor.isBuffer(A))return y.from(A);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},5606(s){var E,k,y=s.exports={};function O(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function m(C){if(E===setTimeout)return setTimeout(C,0);if((E===O||!E)&&setTimeout)return E=setTimeout,setTimeout(C,0);try{return E(C,0)}catch{try{return E.call(null,C,0)}catch{return E.call(this,C,0)}}}(function(){try{E=typeof setTimeout=="function"?setTimeout:O}catch{E=O}try{k=typeof clearTimeout=="function"?clearTimeout:u}catch{k=u}})();var p,f=[],h=!1,A=-1;function g(){h&&p&&(h=!1,p.length?f=p.concat(f):A=-1,f.length&&w())}function w(){if(!h){var C=m(g);h=!0;for(var x=f.length;x;){for(p=f,f=[];++A1)for(var ot=1;ot"u"?k.g:globalThis,w=O(),R=m("String.prototype.slice"),S=m("Array.prototype.indexOf",!0)||function(x,ot){for(var Q=0;Q-1?ot:ot==="Object"&&function(Q){var V=!1;return y(C,function(Y,ut){if(!V)try{Y(Q),V=R(ut,1)}catch{}}),V}(x)}return p?function(Q){var V=!1;return y(C,function(Y,ut){if(!V)try{"$"+Y(Q)===ut&&(V=R(ut,1))}catch{}}),V}(x):null}},5795(s,E,k){var y=k(6549);if(y)try{y([],"length")}catch{y=null}s.exports=y},5880(s){s.exports=Math.pow},6188(s){s.exports=Math.max},6549(s){s.exports=Object.getOwnPropertyDescriptor},6556(s,E,k){var y=k(453),O=k(3126),u=O([y("%String.prototype.indexOf%")]);s.exports=function(m,p){var f=y(m,!!p);return typeof f=="function"&&u(m,".prototype.")>-1?O([f]):f}},6576(s,E,k){var y=k(9394),O=k(8452);s.exports=function(){var u=y();return O(Object,{is:u},{is:function(){return Object.is!==u}}),u}},6578(s){s.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6642(s,E,k){var y=k(3003);s.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:y}},6698(s){typeof Object.create=="function"?s.exports=function(E,k){k&&(E.super_=k,E.prototype=Object.create(k.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function(E,k){if(k){E.super_=k;var y=function(){};y.prototype=k.prototype,E.prototype=new y,E.prototype.constructor=E}}},6710(s,E,k){var y=k(6698),O=k(4107),u=k(392),m=k(2861).Buffer,p=new Array(64);function f(){this.init(),this._w=p,u.call(this,64,56)}y(f,O),f.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},f.prototype._hash=function(){var h=m.allocUnsafe(28);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h},s.exports=f},6743(s,E,k){var y=k(9353);s.exports=Function.prototype.bind||y},6763(s,E,k){var y=k(537),O=k(4148);function u(){return new Date().getTime()}var m,p=Array.prototype.slice,f={};m=k.g!==void 0&&k.g.console?k.g.console:typeof window<"u"&&window.console?window.console:{};for(var h=[[function(){},"log"],[function(){m.log.apply(m,arguments)},"info"],[function(){m.log.apply(m,arguments)},"warn"],[function(){m.warn.apply(m,arguments)},"error"],[function(S){f[S]=u()},"time"],[function(S){var C=f[S];if(!C)throw new Error("No such label: "+S);delete f[S];var x=u()-C;m.log(S+": "+x+"ms")},"timeEnd"],[function(){var S=new Error;S.name="Trace",S.message=y.format.apply(null,arguments),m.error(S.stack)},"trace"],[function(S){m.log(y.inspect(S)+` +`)},"dir"],[function(S){if(!S){var C=p.call(arguments,1);O.ok(!1,y.format.apply(null,C))}},"assert"]],A=0;A4294967295||f(A)!==A)throw new p("`length` must be a positive 32-bit integer");var g=arguments.length>2&&!!arguments[2],w=!0,R=!0;if("length"in h&&m){var S=m(h,"length");S&&!S.configurable&&(w=!1),S&&!S.writable&&(R=!1)}return(w||R||!g)&&(u?O(h,"length",A,!0,!0):O(h,"length",A)),h}},7119(s){s.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},7176(s,E,k){var y,O=k(3126),u=k(5795);try{y=[].__proto__===Array.prototype}catch(h){if(!h||typeof h!="object"||!("code"in h)||h.code!=="ERR_PROTO_ACCESS")throw h}var m=!!y&&u&&u(Object.prototype,"__proto__"),p=Object,f=p.getPrototypeOf;s.exports=m&&typeof m.get=="function"?O([m.get]):typeof f=="function"&&function(h){return f(h==null?h:p(h))}},7244(s,E,k){var y=k(9092)(),O=k(6556)("Object.prototype.toString"),u=function(f){return!(y&&f&&typeof f=="object"&&Symbol.toStringTag in f)&&O(f)==="[object Arguments]"},m=function(f){return!!u(f)||f!==null&&typeof f=="object"&&"length"in f&&typeof f.length=="number"&&f.length>=0&&O(f)!=="[object Array]"&&"callee"in f&&O(f.callee)==="[object Function]"},p=function(){return u(arguments)}();u.isLegacyArguments=m,s.exports=p?u:m},7526(s,E){E.byteLength=function(A){var g=p(A),w=g[0],R=g[1];return 3*(w+R)/4-R},E.toByteArray=function(A){var g,w,R=p(A),S=R[0],C=R[1],x=new O(function(V,Y,ut){return 3*(Y+ut)/4-ut}(0,S,C)),ot=0,Q=C>0?S-4:S;for(w=0;w>16&255,x[ot++]=g>>8&255,x[ot++]=255&g;return C===2&&(g=y[A.charCodeAt(w)]<<2|y[A.charCodeAt(w+1)]>>4,x[ot++]=255&g),C===1&&(g=y[A.charCodeAt(w)]<<10|y[A.charCodeAt(w+1)]<<4|y[A.charCodeAt(w+2)]>>2,x[ot++]=g>>8&255,x[ot++]=255&g),x},E.fromByteArray=function(A){for(var g,w=A.length,R=w%3,S=[],C=16383,x=0,ot=w-R;xot?ot:x+C));return R===1?(g=A[w-1],S.push(k[g>>2]+k[g<<4&63]+"==")):R===2&&(g=(A[w-2]<<8)+A[w-1],S.push(k[g>>10]+k[g>>4&63]+k[g<<2&63]+"=")),S.join("")};for(var k=[],y=[],O=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0;m<64;++m)k[m]=u[m],y[u.charCodeAt(m)]=m;function p(A){var g=A.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=A.indexOf("=");return w===-1&&(w=g),[w,w===g?0:4-w%4]}function f(A){return k[A>>18&63]+k[A>>12&63]+k[A>>6&63]+k[63&A]}function h(A,g,w){for(var R,S=[],C=g;C>>27}function A(w){return w<<30|w>>>2}function g(w,R,S,C){return w===0?R&S|~R&C:w===2?R&S|R&C|S&C:R^S^C}y(f,O),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(w){for(var R=this._w,S=0|this._a,C=0|this._b,x=0|this._c,ot=0|this._d,Q=0|this._e,V=0;V<16;++V)R[V]=w.readInt32BE(4*V);for(;V<80;++V)R[V]=R[V-3]^R[V-8]^R[V-14]^R[V-16];for(var Y=0;Y<80;++Y){var ut=~~(Y/20),Ut=h(S)+g(ut,C,x,ot)+Q+R[Y]+m[ut]|0;Q=ot,ot=x,x=A(C),C=S,S=Ut}this._a=S+this._a|0,this._b=C+this._b|0,this._c=x+this._c|0,this._d=ot+this._d|0,this._e=Q+this._e|0},f.prototype._hash=function(){var w=u.allocUnsafe(20);return w.writeInt32BE(0|this._a,0),w.writeInt32BE(0|this._b,4),w.writeInt32BE(0|this._c,8),w.writeInt32BE(0|this._d,12),w.writeInt32BE(0|this._e,16),w},s.exports=f},8002(s){s.exports=Math.min},8068(s){s.exports=SyntaxError},8075(s,E,k){var y=k(453),O=k(487),u=O(y("String.prototype.indexOf"));s.exports=function(m,p){var f=y(m,!!p);return typeof f=="function"&&u(m,".prototype.")>-1?O(f):f}},8184(s,E,k){var y=k(6556),O=k(9721)(/^\s*(?:function)?\*/),u=k(9092)(),m=k(3628),p=y("Object.prototype.toString"),f=y("Function.prototype.toString"),h=k(4233);s.exports=function(A){if(typeof A!="function")return!1;if(O(f(A)))return!0;if(!u)return p(A)==="[object GeneratorFunction]";if(!m)return!1;var g=h();return g&&m(A)===g.prototype}},8287(s,E,k){var y=k(6763);const O=k(7526),u=k(251),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;E.Buffer=h,E.SlowBuffer=function(_){return+_!=_&&(_=0),h.alloc(+_)},E.INSPECT_MAX_BYTES=50;const p=2147483647;function f(_){if(_>p)throw new RangeError('The value "'+_+'" is invalid for option "size"');const W=new Uint8Array(_);return Object.setPrototypeOf(W,h.prototype),W}function h(_,W,at){if(typeof _=="number"){if(typeof W=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(_)}return A(_,W,at)}function A(_,W,at){if(typeof _=="string")return function(Kt,Ne){if(typeof Ne=="string"&&Ne!==""||(Ne="utf8"),!h.isEncoding(Ne))throw new TypeError("Unknown encoding: "+Ne);const D=0|x(Kt,Ne);let et=f(D);const gt=et.write(Kt,Ne);return gt!==D&&(et=et.slice(0,gt)),et}(_,W);if(ArrayBuffer.isView(_))return function(Kt){if(L(Kt,Uint8Array)){const Ne=new Uint8Array(Kt);return S(Ne.buffer,Ne.byteOffset,Ne.byteLength)}return R(Kt)}(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(L(_,ArrayBuffer)||_&&L(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(L(_,SharedArrayBuffer)||_&&L(_.buffer,SharedArrayBuffer)))return S(_,W,at);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Xt=_.valueOf&&_.valueOf();if(Xt!=null&&Xt!==_)return h.from(Xt,W,at);const ae=function(Kt){if(h.isBuffer(Kt)){const Ne=0|C(Kt.length),D=f(Ne);return D.length===0||Kt.copy(D,0,0,Ne),D}return Kt.length!==void 0?typeof Kt.length!="number"||$(Kt.length)?f(0):R(Kt):Kt.type==="Buffer"&&Array.isArray(Kt.data)?R(Kt.data):void 0}(_);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return h.from(_[Symbol.toPrimitive]("string"),W,at);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}function g(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function w(_){return g(_),f(_<0?0:0|C(_))}function R(_){const W=_.length<0?0:0|C(_.length),at=f(W);for(let Xt=0;Xt=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|_}function x(_,W){if(h.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||L(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const at=_.length,Xt=arguments.length>2&&arguments[2]===!0;if(!Xt&&at===0)return 0;let ae=!1;for(;;)switch(W){case"ascii":case"latin1":case"binary":return at;case"utf8":case"utf-8":return mt(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*at;case"hex":return at>>>1;case"base64":return Dt(_).length;default:if(ae)return Xt?-1:mt(_).length;W=(""+W).toLowerCase(),ae=!0}}function ot(_,W,at){let Xt=!1;if((W===void 0||W<0)&&(W=0),W>this.length||((at===void 0||at>this.length)&&(at=this.length),at<=0)||(at>>>=0)<=(W>>>=0))return"";for(_||(_="utf8");;)switch(_){case"hex":return tt(this,W,at);case"utf8":case"utf-8":return At(this,W,at);case"ascii":return N(this,W,at);case"latin1":case"binary":return G(this,W,at);case"base64":return J(this,W,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,W,at);default:if(Xt)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),Xt=!0}}function Q(_,W,at){const Xt=_[W];_[W]=_[at],_[at]=Xt}function V(_,W,at,Xt,ae){if(_.length===0)return-1;if(typeof at=="string"?(Xt=at,at=0):at>2147483647?at=2147483647:at<-2147483648&&(at=-2147483648),$(at=+at)&&(at=ae?0:_.length-1),at<0&&(at=_.length+at),at>=_.length){if(ae)return-1;at=_.length-1}else if(at<0){if(!ae)return-1;at=0}if(typeof W=="string"&&(W=h.from(W,Xt)),h.isBuffer(W))return W.length===0?-1:Y(_,W,at,Xt,ae);if(typeof W=="number")return W&=255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(_,W,at):Uint8Array.prototype.lastIndexOf.call(_,W,at):Y(_,[W],at,Xt,ae);throw new TypeError("val must be string, number or Buffer")}function Y(_,W,at,Xt,ae){let Kt,Ne=1,D=_.length,et=W.length;if(Xt!==void 0&&((Xt=String(Xt).toLowerCase())==="ucs2"||Xt==="ucs-2"||Xt==="utf16le"||Xt==="utf-16le")){if(_.length<2||W.length<2)return-1;Ne=2,D/=2,et/=2,at/=2}function gt(Yt,le){return Ne===1?Yt[le]:Yt.readUInt16BE(le*Ne)}if(ae){let Yt=-1;for(Kt=at;KtD&&(at=D-et),Kt=at;Kt>=0;Kt--){let Yt=!0;for(let le=0;leae&&(Xt=ae):Xt=ae;const Kt=W.length;let Ne;for(Xt>Kt/2&&(Xt=Kt/2),Ne=0;Ne>8,et=Ne%256,gt.push(et),gt.push(D);return gt}(W,_.length-at),_,at,Xt)}function J(_,W,at){return W===0&&at===_.length?O.fromByteArray(_):O.fromByteArray(_.slice(W,at))}function At(_,W,at){at=Math.min(_.length,at);const Xt=[];let ae=W;for(;ae239?4:Kt>223?3:Kt>191?2:1;if(ae+D<=at){let et,gt,Yt,le;switch(D){case 1:Kt<128&&(Ne=Kt);break;case 2:et=_[ae+1],(192&et)==128&&(le=(31&Kt)<<6|63&et,le>127&&(Ne=le));break;case 3:et=_[ae+1],gt=_[ae+2],(192&et)==128&&(192>)==128&&(le=(15&Kt)<<12|(63&et)<<6|63>,le>2047&&(le<55296||le>57343)&&(Ne=le));break;case 4:et=_[ae+1],gt=_[ae+2],Yt=_[ae+3],(192&et)==128&&(192>)==128&&(192&Yt)==128&&(le=(15&Kt)<<18|(63&et)<<12|(63>)<<6|63&Yt,le>65535&&le<1114112&&(Ne=le))}}Ne===null?(Ne=65533,D=1):Ne>65535&&(Ne-=65536,Xt.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),Xt.push(Ne),ae+=D}return function(Kt){const Ne=Kt.length;if(Ne<=c)return String.fromCharCode.apply(String,Kt);let D="",et=0;for(;etXt.length?(h.isBuffer(Kt)||(Kt=h.from(Kt)),Kt.copy(Xt,ae)):Uint8Array.prototype.set.call(Xt,Kt,ae);else{if(!h.isBuffer(Kt))throw new TypeError('"list" argument must be an Array of Buffers');Kt.copy(Xt,ae)}ae+=Kt.length}return Xt},h.byteLength=x,h.prototype._isBuffer=!0,h.prototype.swap16=function(){const _=this.length;if(_%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let W=0;W<_;W+=2)Q(this,W,W+1);return this},h.prototype.swap32=function(){const _=this.length;if(_%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let W=0;W<_;W+=4)Q(this,W,W+3),Q(this,W+1,W+2);return this},h.prototype.swap64=function(){const _=this.length;if(_%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let W=0;W<_;W+=8)Q(this,W,W+7),Q(this,W+1,W+6),Q(this,W+2,W+5),Q(this,W+3,W+4);return this},h.prototype.toString=function(){const _=this.length;return _===0?"":arguments.length===0?At(this,0,_):ot.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(_){if(!h.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_||h.compare(this,_)===0},h.prototype.inspect=function(){let _="";const W=E.INSPECT_MAX_BYTES;return _=this.toString("hex",0,W).replace(/(.{2})/g,"$1 ").trim(),this.length>W&&(_+=" ... "),""},m&&(h.prototype[m]=h.prototype.inspect),h.prototype.compare=function(_,W,at,Xt,ae){if(L(_,Uint8Array)&&(_=h.from(_,_.offset,_.byteLength)),!h.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(W===void 0&&(W=0),at===void 0&&(at=_?_.length:0),Xt===void 0&&(Xt=0),ae===void 0&&(ae=this.length),W<0||at>_.length||Xt<0||ae>this.length)throw new RangeError("out of range index");if(Xt>=ae&&W>=at)return 0;if(Xt>=ae)return-1;if(W>=at)return 1;if(this===_)return 0;let Kt=(ae>>>=0)-(Xt>>>=0),Ne=(at>>>=0)-(W>>>=0);const D=Math.min(Kt,Ne),et=this.slice(Xt,ae),gt=_.slice(W,at);for(let Yt=0;Yt>>=0,isFinite(at)?(at>>>=0,Xt===void 0&&(Xt="utf8")):(Xt=at,at=void 0)}const ae=this.length-W;if((at===void 0||at>ae)&&(at=ae),_.length>0&&(at<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");Xt||(Xt="utf8");let Kt=!1;for(;;)switch(Xt){case"hex":return ut(this,_,W,at);case"utf8":case"utf-8":return Ut(this,_,W,at);case"ascii":case"latin1":case"binary":return pt(this,_,W,at);case"base64":return Bt(this,_,W,at);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rt(this,_,W,at);default:if(Kt)throw new TypeError("Unknown encoding: "+Xt);Xt=(""+Xt).toLowerCase(),Kt=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const c=4096;function N(_,W,at){let Xt="";at=Math.min(_.length,at);for(let ae=W;aeXt)&&(at=Xt);let ae="";for(let Kt=W;Ktat)throw new RangeError("Trying to access beyond buffer length")}function Tt(_,W,at,Xt,ae,Kt){if(!h.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(W>ae||W_.length)throw new RangeError("Index out of range")}function Ft(_,W,at,Xt,ae){kt(W,Xt,ae,_,at,7);let Kt=Number(W&BigInt(4294967295));_[at++]=Kt,Kt>>=8,_[at++]=Kt,Kt>>=8,_[at++]=Kt,Kt>>=8,_[at++]=Kt;let Ne=Number(W>>BigInt(32)&BigInt(4294967295));return _[at++]=Ne,Ne>>=8,_[at++]=Ne,Ne>>=8,_[at++]=Ne,Ne>>=8,_[at++]=Ne,at}function vt(_,W,at,Xt,ae){kt(W,Xt,ae,_,at,7);let Kt=Number(W&BigInt(4294967295));_[at+7]=Kt,Kt>>=8,_[at+6]=Kt,Kt>>=8,_[at+5]=Kt,Kt>>=8,_[at+4]=Kt;let Ne=Number(W>>BigInt(32)&BigInt(4294967295));return _[at+3]=Ne,Ne>>=8,_[at+2]=Ne,Ne>>=8,_[at+1]=Ne,Ne>>=8,_[at]=Ne,at+8}function bt(_,W,at,Xt,ae,Kt){if(at+Xt>_.length)throw new RangeError("Index out of range");if(at<0)throw new RangeError("Index out of range")}function yt(_,W,at,Xt,ae){return W=+W,at>>>=0,ae||bt(_,0,at,4),u.write(_,W,at,Xt,23,4),at+4}function dt(_,W,at,Xt,ae){return W=+W,at>>>=0,ae||bt(_,0,at,8),u.write(_,W,at,Xt,52,8),at+8}h.prototype.slice=function(_,W){const at=this.length;(_=~~_)<0?(_+=at)<0&&(_=0):_>at&&(_=at),(W=W===void 0?at:~~W)<0?(W+=at)<0&&(W=0):W>at&&(W=at),W<_&&(W=_);const Xt=this.subarray(_,W);return Object.setPrototypeOf(Xt,h.prototype),Xt},h.prototype.readUintLE=h.prototype.readUIntLE=function(_,W,at){_>>>=0,W>>>=0,at||q(_,W,this.length);let Xt=this[_],ae=1,Kt=0;for(;++Kt>>=0,W>>>=0,at||q(_,W,this.length);let Xt=this[_+--W],ae=1;for(;W>0&&(ae*=256);)Xt+=this[_+--W]*ae;return Xt},h.prototype.readUint8=h.prototype.readUInt8=function(_,W){return _>>>=0,W||q(_,1,this.length),this[_]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(_,W){return _>>>=0,W||q(_,2,this.length),this[_]|this[_+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(_,W){return _>>>=0,W||q(_,2,this.length),this[_]<<8|this[_+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(_,W){return _>>>=0,W||q(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+16777216*this[_+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(_,W){return _>>>=0,W||q(_,4,this.length),16777216*this[_]+(this[_+1]<<16|this[_+2]<<8|this[_+3])},h.prototype.readBigUInt64LE=ft(function(_){Ct(_>>>=0,"offset");const W=this[_],at=this[_+7];W!==void 0&&at!==void 0||H(_,this.length-8);const Xt=W+256*this[++_]+65536*this[++_]+this[++_]*2**24,ae=this[++_]+256*this[++_]+65536*this[++_]+at*2**24;return BigInt(Xt)+(BigInt(ae)<>>=0,"offset");const W=this[_],at=this[_+7];W!==void 0&&at!==void 0||H(_,this.length-8);const Xt=W*2**24+65536*this[++_]+256*this[++_]+this[++_],ae=this[++_]*2**24+65536*this[++_]+256*this[++_]+at;return(BigInt(Xt)<>>=0,W>>>=0,at||q(_,W,this.length);let Xt=this[_],ae=1,Kt=0;for(;++Kt=ae&&(Xt-=Math.pow(2,8*W)),Xt},h.prototype.readIntBE=function(_,W,at){_>>>=0,W>>>=0,at||q(_,W,this.length);let Xt=W,ae=1,Kt=this[_+--Xt];for(;Xt>0&&(ae*=256);)Kt+=this[_+--Xt]*ae;return ae*=128,Kt>=ae&&(Kt-=Math.pow(2,8*W)),Kt},h.prototype.readInt8=function(_,W){return _>>>=0,W||q(_,1,this.length),128&this[_]?-1*(255-this[_]+1):this[_]},h.prototype.readInt16LE=function(_,W){_>>>=0,W||q(_,2,this.length);const at=this[_]|this[_+1]<<8;return 32768&at?4294901760|at:at},h.prototype.readInt16BE=function(_,W){_>>>=0,W||q(_,2,this.length);const at=this[_+1]|this[_]<<8;return 32768&at?4294901760|at:at},h.prototype.readInt32LE=function(_,W){return _>>>=0,W||q(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},h.prototype.readInt32BE=function(_,W){return _>>>=0,W||q(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},h.prototype.readBigInt64LE=ft(function(_){Ct(_>>>=0,"offset");const W=this[_],at=this[_+7];W!==void 0&&at!==void 0||H(_,this.length-8);const Xt=this[_+4]+256*this[_+5]+65536*this[_+6]+(at<<24);return(BigInt(Xt)<>>=0,"offset");const W=this[_],at=this[_+7];W!==void 0&&at!==void 0||H(_,this.length-8);const Xt=(W<<24)+65536*this[++_]+256*this[++_]+this[++_];return(BigInt(Xt)<>>=0,W||q(_,4,this.length),u.read(this,_,!0,23,4)},h.prototype.readFloatBE=function(_,W){return _>>>=0,W||q(_,4,this.length),u.read(this,_,!1,23,4)},h.prototype.readDoubleLE=function(_,W){return _>>>=0,W||q(_,8,this.length),u.read(this,_,!0,52,8)},h.prototype.readDoubleBE=function(_,W){return _>>>=0,W||q(_,8,this.length),u.read(this,_,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(_,W,at,Xt){_=+_,W>>>=0,at>>>=0,Xt||Tt(this,_,W,at,Math.pow(2,8*at)-1,0);let ae=1,Kt=0;for(this[W]=255&_;++Kt>>=0,at>>>=0,Xt||Tt(this,_,W,at,Math.pow(2,8*at)-1,0);let ae=at-1,Kt=1;for(this[W+ae]=255&_;--ae>=0&&(Kt*=256);)this[W+ae]=_/Kt&255;return W+at},h.prototype.writeUint8=h.prototype.writeUInt8=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,1,255,0),this[W]=255&_,W+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,2,65535,0),this[W]=255&_,this[W+1]=_>>>8,W+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,2,65535,0),this[W]=_>>>8,this[W+1]=255&_,W+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,4,4294967295,0),this[W+3]=_>>>24,this[W+2]=_>>>16,this[W+1]=_>>>8,this[W]=255&_,W+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,4,4294967295,0),this[W]=_>>>24,this[W+1]=_>>>16,this[W+2]=_>>>8,this[W+3]=255&_,W+4},h.prototype.writeBigUInt64LE=ft(function(_,W=0){return Ft(this,_,W,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=ft(function(_,W=0){return vt(this,_,W,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(_,W,at,Xt){if(_=+_,W>>>=0,!Xt){const D=Math.pow(2,8*at-1);Tt(this,_,W,at,D-1,-D)}let ae=0,Kt=1,Ne=0;for(this[W]=255&_;++ae>>=0,!Xt){const D=Math.pow(2,8*at-1);Tt(this,_,W,at,D-1,-D)}let ae=at-1,Kt=1,Ne=0;for(this[W+ae]=255&_;--ae>=0&&(Kt*=256);)_<0&&Ne===0&&this[W+ae+1]!==0&&(Ne=1),this[W+ae]=(_/Kt|0)-Ne&255;return W+at},h.prototype.writeInt8=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,1,127,-128),_<0&&(_=255+_+1),this[W]=255&_,W+1},h.prototype.writeInt16LE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,2,32767,-32768),this[W]=255&_,this[W+1]=_>>>8,W+2},h.prototype.writeInt16BE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,2,32767,-32768),this[W]=_>>>8,this[W+1]=255&_,W+2},h.prototype.writeInt32LE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,4,2147483647,-2147483648),this[W]=255&_,this[W+1]=_>>>8,this[W+2]=_>>>16,this[W+3]=_>>>24,W+4},h.prototype.writeInt32BE=function(_,W,at){return _=+_,W>>>=0,at||Tt(this,_,W,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[W]=_>>>24,this[W+1]=_>>>16,this[W+2]=_>>>8,this[W+3]=255&_,W+4},h.prototype.writeBigInt64LE=ft(function(_,W=0){return Ft(this,_,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=ft(function(_,W=0){return vt(this,_,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(_,W,at){return yt(this,_,W,!0,at)},h.prototype.writeFloatBE=function(_,W,at){return yt(this,_,W,!1,at)},h.prototype.writeDoubleLE=function(_,W,at){return dt(this,_,W,!0,at)},h.prototype.writeDoubleBE=function(_,W,at){return dt(this,_,W,!1,at)},h.prototype.copy=function(_,W,at,Xt){if(!h.isBuffer(_))throw new TypeError("argument should be a Buffer");if(at||(at=0),Xt||Xt===0||(Xt=this.length),W>=_.length&&(W=_.length),W||(W=0),Xt>0&&Xt=this.length)throw new RangeError("Index out of range");if(Xt<0)throw new RangeError("sourceEnd out of bounds");Xt>this.length&&(Xt=this.length),_.length-W>>=0,at=at===void 0?this.length:at>>>0,_||(_=0),typeof _=="number")for(ae=W;ae=Xt+4;at-=3)W=`_${_.slice(at-3,at)}${W}`;return`${_.slice(0,at)}${W}`}function kt(_,W,at,Xt,ae,Kt){if(_>at||_= 0${Ne} and < 2${Ne} ** ${8*(Kt+1)}${Ne}`:`>= -(2${Ne} ** ${8*(Kt+1)-1}${Ne}) and < 2 ** ${8*(Kt+1)-1}${Ne}`,new lt.ERR_OUT_OF_RANGE("value",D,_)}(function(Ne,D,et){Ct(D,"offset"),Ne[D]!==void 0&&Ne[D+et]!==void 0||H(D,Ne.length-(et+1))})(Xt,ae,Kt)}function Ct(_,W){if(typeof _!="number")throw new lt.ERR_INVALID_ARG_TYPE(W,"number",_)}function H(_,W,at){throw Math.floor(_)!==_?(Ct(_,at),new lt.ERR_OUT_OF_RANGE("offset","an integer",_)):W<0?new lt.ERR_BUFFER_OUT_OF_BOUNDS:new lt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${W}`,_)}xt("ERR_BUFFER_OUT_OF_BOUNDS",function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),xt("ERR_INVALID_ARG_TYPE",function(_,W){return`The "${_}" argument must be of type number. Received type ${typeof W}`},TypeError),xt("ERR_OUT_OF_RANGE",function(_,W,at){let Xt=`The value of "${_}" is out of range.`,ae=at;return Number.isInteger(at)&&Math.abs(at)>4294967296?ae=Ot(String(at)):typeof at=="bigint"&&(ae=String(at),(at>BigInt(2)**BigInt(32)||at<-(BigInt(2)**BigInt(32)))&&(ae=Ot(ae)),ae+="n"),Xt+=` It must be ${W}. Received ${ae}`,Xt},RangeError);const it=/[^+/0-9A-Za-z-_]/g;function mt(_,W){let at;W=W||1/0;const Xt=_.length;let ae=null;const Kt=[];for(let Ne=0;Ne55295&&at<57344){if(!ae){if(at>56319){(W-=3)>-1&&Kt.push(239,191,189);continue}if(Ne+1===Xt){(W-=3)>-1&&Kt.push(239,191,189);continue}ae=at;continue}if(at<56320){(W-=3)>-1&&Kt.push(239,191,189),ae=at;continue}at=65536+(ae-55296<<10|at-56320)}else ae&&(W-=3)>-1&&Kt.push(239,191,189);if(ae=null,at<128){if((W-=1)<0)break;Kt.push(at)}else if(at<2048){if((W-=2)<0)break;Kt.push(at>>6|192,63&at|128)}else if(at<65536){if((W-=3)<0)break;Kt.push(at>>12|224,at>>6&63|128,63&at|128)}else{if(!(at<1114112))throw new Error("Invalid code point");if((W-=4)<0)break;Kt.push(at>>18|240,at>>12&63|128,at>>6&63|128,63&at|128)}}return Kt}function Dt(_){return O.toByteArray(function(W){if((W=(W=W.split("=")[0]).trim().replace(it,"")).length<2)return"";for(;W.length%4!=0;)W+="=";return W}(_))}function T(_,W,at,Xt){let ae;for(ae=0;ae=W.length||ae>=_.length);++ae)W[ae+at]=_[ae];return ae}function L(_,W){return _ instanceof W||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===W.name}function $(_){return _!=_}const St=function(){const _="0123456789abcdef",W=new Array(256);for(let at=0;at<16;++at){const Xt=16*at;for(let ae=0;ae<16;++ae)W[Xt+ae]=_[at]+_[ae]}return W}();function ft(_){return typeof BigInt>"u"?ee:_}function ee(){throw new Error("BigInt not supported")}},8403(s,E,k){var y=k(1189),O=k(1333)(),u=k(6556),m=k(9612),p=u("Array.prototype.push"),f=u("Object.prototype.propertyIsEnumerable"),h=O?m.getOwnPropertySymbols:null;s.exports=function(A,g){if(A==null)throw new TypeError("target must be an object");var w=m(A);if(arguments.length===1)return w;for(var R=1;R2?arguments[2]:{},S=y(w);O&&(S=m.call(S,Object.getOwnPropertySymbols(w)));for(var C=0;C"u")return!1;for(var S in window)try{if(!w["$"+S]&&O.call(window,S)&&window[S]!==null&&typeof window[S]=="object")try{g(window[S])}catch{return!0}}catch{return!0}return!1}();y=function(S){var C=S!==null&&typeof S=="object",x=u.call(S)==="[object Function]",ot=m(S),Q=C&&u.call(S)==="[object String]",V=[];if(!C&&!x&&!ot)throw new TypeError("Object.keys called on a non-object");var Y=h&&x;if(Q&&S.length>0&&!O.call(S,0))for(var ut=0;ut0)for(var Ut=0;Ut"u"||!R)return g(J);try{return g(J)}catch{return!1}}(S),Rt=0;Rt"u"?k.g:globalThis;s.exports=function(){for(var u=[],m=0;m"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 S,C=m(w);if(R){var x=m(this).constructor;S=Reflect.construct(C,arguments,x)}else S=C.apply(this,arguments);return function(ot,Q){if(Q&&(y(Q)==="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(V){if(V===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V}(ot)}(this,S)}}function m(w){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},m(w)}var p,f,h={};function A(w,R,S){S||(S=Error);var C=function(x){(function(Y,ut){if(typeof ut!="function"&&ut!==null)throw new TypeError("Super expression must either be null or a function");Y.prototype=Object.create(ut&&ut.prototype,{constructor:{value:Y,writable:!0,configurable:!0}}),Object.defineProperty(Y,"prototype",{writable:!1}),ut&&O(Y,ut)})(V,x);var ot,Q=u(V);function V(Y,ut,Ut){var pt;return function(Bt,Rt){if(!(Bt instanceof Rt))throw new TypeError("Cannot call a class as a function")}(this,V),pt=Q.call(this,function(Bt,Rt,J){return typeof R=="string"?R:R(Bt,Rt,J)}(Y,ut,Ut)),pt.code=w,pt}return ot=V,Object.defineProperty(ot,"prototype",{writable:!1}),ot}(S);h[w]=C}function g(w,R){if(Array.isArray(w)){var S=w.length;return w=w.map(function(C){return String(C)}),S>2?"one of ".concat(R," ").concat(w.slice(0,S-1).join(", "),", or ")+w[S-1]:S===2?"one of ".concat(R," ").concat(w[0]," or ").concat(w[1]):"of ".concat(R," ").concat(w[0])}return"of ".concat(R," ").concat(String(w))}A("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),A("ERR_INVALID_ARG_TYPE",function(w,R,S){var C,x,ot;if(p===void 0&&(p=k(4148)),p(typeof w=="string","'name' must be a string"),typeof R=="string"&&(x="not ",R.substr(0,4)===x)?(C="must not be",R=R.replace(/^not /,"")):C="must be",function(V,Y,ut){return(ut===void 0||ut>V.length)&&(ut=V.length),V.substring(ut-9,ut)===Y}(w," argument"))ot="The ".concat(w," ").concat(C," ").concat(g(R,"type"));else{var Q=function(V,Y,ut){return typeof ut!="number"&&(ut=0),!(ut+1>V.length)&&V.indexOf(".",ut)!==-1}(w)?"property":"argument";ot='The "'.concat(w,'" ').concat(Q," ").concat(C," ").concat(g(R,"type"))}return ot+". Received type ".concat(y(S))},TypeError),A("ERR_INVALID_ARG_VALUE",function(w,R){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";f===void 0&&(f=k(537));var C=f.inspect(R);return C.length>128&&(C="".concat(C.slice(0,128),"...")),"The argument '".concat(w,"' ").concat(S,". Received ").concat(C)},TypeError),A("ERR_INVALID_RETURN_VALUE",function(w,R,S){var C;return C=S&&S.constructor&&S.constructor.name?"instance of ".concat(S.constructor.name):"type ".concat(y(S)),"Expected ".concat(w,' to be returned from the "').concat(R,'"')+" function but got ".concat(C,".")},TypeError),A("ERR_MISSING_ARGS",function(){for(var w=arguments.length,R=new Array(w),S=0;S0,"At least one arg needs to be specified");var C="The ",x=R.length;switch(R=R.map(function(ot){return'"'.concat(ot,'"')}),x){case 1:C+="".concat(R[0]," argument");break;case 2:C+="".concat(R[0]," and ").concat(R[1]," arguments");break;default:C+=R.slice(0,x-1).join(", "),C+=", and ".concat(R[x-1]," arguments")}return"".concat(C," must be specified")},TypeError),s.exports.codes=h},9600(s){var E,k,y=Function.prototype.toString,O=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof O=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},O(function(){throw 42},null,E)}catch(R){R!==k&&(O=null)}else O=null;var u=/^\s*class\b/,m=function(R){try{var S=y.call(R);return u.test(S)}catch{return!1}},p=function(R){try{return!m(R)&&(y.call(R),!0)}catch{return!1}},f=Object.prototype.toString,h=typeof Symbol=="function"&&!!Symbol.toStringTag,A=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var w=document.all;f.call(w)===f.call(document.all)&&(g=function(R){if((A||!R)&&(R===void 0||typeof R=="object"))try{var S=f.call(R);return(S==="[object HTMLAllCollection]"||S==="[object HTML document.all class]"||S==="[object HTMLCollection]"||S==="[object Object]")&&R("")==null}catch{}return!1})}s.exports=O?function(R){if(g(R))return!0;if(!R||typeof R!="function"&&typeof R!="object")return!1;try{O(R,null,E)}catch(S){if(S!==k)return!1}return!m(R)&&p(R)}:function(R){if(g(R))return!0;if(!R||typeof R!="function"&&typeof R!="object")return!1;if(h)return p(R);if(m(R))return!1;var S=f.call(R);return!(S!=="[object Function]"&&S!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(S))&&p(R)}},9612(s){s.exports=Object},9675(s){s.exports=TypeError},9721(s,E,k){var y=k(6556),O=k(4035),u=y("RegExp.prototype.exec"),m=k(9675);s.exports=function(p){if(!O(p))throw new m("`regex` must be a RegExp");return function(f){return u(p,f)!==null}}},9957(s,E,k){var y=Function.prototype.call,O=Object.prototype.hasOwnProperty,u=k(6743);s.exports=u.call(y,O)}},v={};function z(s){var E=v[s];if(E!==void 0)return E.exports;var k=v[s]={id:s,loaded:!1,exports:{}};return l[s].call(k.exports,k,k.exports,z),k.loaded=!0,k.exports}return z.d=(s,E)=>{for(var k in E)z.o(E,k)&&!z.o(s,k)&&Object.defineProperty(s,k,{enumerable:!0,get:E[k]})},z.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),z.hmd=s=>((s=Object.create(s)).children||(s.children=[]),Object.defineProperty(s,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+s.id)}}),s),z.o=(s,E)=>Object.prototype.hasOwnProperty.call(s,E),z.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},z(448)})(),P.exports=M()},6682(P,M,l){l.d(M,{fe:()=>Ct});var v=l(8250);function z(H){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},z(H)}function s(H,it){for(var mt=0;mt0?"".concat((0,m.SB)(L.doc,2),' { tag: "').concat((0,m.c0)(L.name),'"; values: readonly [').concat(L.types.join(", "),"] }"):"".concat((0,m.SB)(L.doc,2),' { tag: "').concat((0,m.c0)(L.name),'"; values: void }')}).join(` | +`);return"".concat(Dt," export type ").concat(mt,` = +`).concat(T,";")}},{key:"generateEnum",value:function(H){var it=(0,m.ff)(H.name().toString()),mt=(0,m.SB)(H.doc().toString()||"Enum: ".concat(it),0),Dt=H.cases().map(function(T){var L=(0,m.ff)(T.name().toString()),$=T.value(),St=T.doc().toString()||"Enum Case: ".concat(L);return"".concat((0,m.SB)(St,2)," ").concat(L," = ").concat($)}).join(`, +`);return"".concat(mt,"export enum ").concat(it,` { +`).concat(Dt,` +}`)}},{key:"generateErrorEnum",value:function(H){var it=this,mt=(0,m.ff)(H.name().toString()),Dt=(0,m.SB)(H.doc().toString()||"Error Enum: ".concat(mt),0),T=H.cases().map(function(L){return it.generateEnumCase(L)}).map(function(L){return"".concat((0,m.SB)(L.doc,2)," ").concat(L.value,' : { message: "').concat((0,m.c0)(L.name),'" }')}).join(`, +`);return"".concat(Dt,"export const ").concat(mt,` = { +`).concat(T,` +}`)}},{key:"generateUnionCase",value:function(H){switch(H.switch()){case u.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():var it=H.voidCase();return{doc:it.doc().toString(),name:it.name().toString(),types:[]};case u.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var mt=H.tupleCase();return{doc:mt.doc().toString(),name:mt.name().toString(),types:mt.type().map(function(Dt){return(0,m.z0)(Dt)})};default:throw new Error("Unknown union case kind: ".concat(H.switch()))}}},{key:"generateEnumCase",value:function(H){return{doc:H.doc().toString(),name:H.name().toString(),value:H.value()}}},{key:"generateTupleStruct",value:function(H){var it=(0,m.ff)(H.name().toString()),mt=(0,m.SB)(H.doc().toString()||"Tuple Struct: ".concat(it),0),Dt=H.fields().map(function(T){return(0,m.z0)(T.type())}).join(", ");return"".concat(mt,"export type ").concat(it," = readonly [").concat(Dt,"];")}}]);function g(H){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},g(H)}function w(H,it){for(var mt=0;mt0?(0,m.z0)(H.outputs()[0]):"void",T=(0,m.SB)(H.doc().toString(),2),L=this.formatMethodParameters(mt);return"".concat(T," ").concat(it,"(").concat(L,"): Promise>;")}},{key:"generateFromJSONMethod",value:function(H){var it=(0,m.ff)(H.name().toString()),mt=H.outputs().length>0?(0,m.z0)(H.outputs()[0]):"void";return" ".concat(it," : this.txFromJSON<").concat(mt,">")}},{key:"generateDeployMethod",value:function(H){if(!H){var it=this.formatConstructorParameters([]);return" static deploy(".concat(it,`): Promise> { + return ContractClient.deploy(null, options); + }`)}var mt=H.inputs().map(function(L){return{name:(0,m.ff)(L.name().toString()),type:(0,m.z0)(L.type(),!0)}}),Dt=this.formatConstructorParameters(mt),T=mt.length>0?"{ ".concat(mt.map(function(L){return L.name}).join(", ")," }, "):"";return" static deploy(".concat(Dt,`): Promise> { + return ContractClient.deploy(`).concat(T,`options); + }`)}},{key:"formatMethodParameters",value:function(H){var it=[];if(H.length>0){var mt="{ ".concat(H.map(function(Dt){return"".concat(Dt.name,": ").concat(Dt.type)}).join("; ")," }");it.push("{ ".concat(H.map(function(Dt){return Dt.name}).join(", ")," }: ").concat(mt))}return it.push("options?: MethodOptions"),it.join(", ")}},{key:"formatConstructorParameters",value:function(H){var it=[];if(H.length>0){var mt="{ ".concat(H.map(function(Dt){return"".concat(Dt.name,": ").concat(Dt.type)}).join("; ")," }");it.push("{ ".concat(H.map(function(Dt){return Dt.name}).join(", ")," }: ").concat(mt))}return it.push(`options: MethodOptions & Omit & { wasmHash: Buffer | string; salt?: Buffer | Uint8Array; format?: "hex" | "base64"; address?: string; }`),it.join(", ")}}]),C=l(8451),x=l(8287).Buffer;function ot(H){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},ot(H)}function Q(){var H,it,mt=typeof Symbol=="function"?Symbol:{},Dt=mt.iterator||"@@iterator",T=mt.toStringTag||"@@toStringTag";function L(Xt,ae,Kt,Ne){var D=ae&&ae.prototype instanceof St?ae:St,et=Object.create(D.prototype);return V(et,"_invoke",function(gt,Yt,le){var we,ie,U,X=0,Pt=le||[],Ht=!1,re={p:0,n:0,v:H,a:We,f:We.bind(H,4),d:function(xe,je){return we=xe,ie=0,U=H,re.n=je,$}};function We(xe,je){for(ie=xe,U=je,it=0;!Ht&&X&&!Qe&&it3?(Qe=ur===je)&&(U=Oe[(ie=Oe[4])?5:(ie=3,3)],Oe[4]=Oe[5]=H):Oe[0]<=Cr&&((Qe=xe<2&&Crje||je>ur)&&(Oe[4]=xe,Oe[5]=je,re.n=ur,ie=0))}if(Qe||xe>1)return $;throw Ht=!0,je}return function(xe,je,Qe){if(X>1)throw TypeError("Generator is already running");for(Ht&&je===1&&We(je,Qe),ie=je,U=Qe;(it=ie<2?H:U)||!Ht;){we||(ie?ie<3?(ie>1&&(re.n=-1),We(ie,U)):re.n=U:re.v=U);try{if(X=2,we){if(ie||(xe="next"),it=we[xe]){if(!(it=it.call(we,U)))throw TypeError("iterator result is not an object");if(!it.done)return it;U=it.value,ie<2&&(ie=0)}else ie===1&&(it=we.return)&&it.call(we),ie<2&&(U=TypeError("The iterator does not provide a '"+xe+"' method"),ie=1);we=H}else if((it=(Ht=re.n<0)?U:gt.call(Yt,re))!==$)break}catch(Oe){we=H,ie=1,U=Oe}finally{X=1}}return{value:it,done:Ht}}}(Xt,Kt,Ne),!0),et}var $={};function St(){}function ft(){}function ee(){}it=Object.getPrototypeOf;var _=[][Dt]?it(it([][Dt]())):(V(it={},Dt,function(){return this}),it),W=ee.prototype=St.prototype=Object.create(_);function at(Xt){return Object.setPrototypeOf?Object.setPrototypeOf(Xt,ee):(Xt.__proto__=ee,V(Xt,T,"GeneratorFunction")),Xt.prototype=Object.create(W),Xt}return ft.prototype=ee,V(W,"constructor",ee),V(ee,"constructor",ft),ft.displayName="GeneratorFunction",V(ee,T,"GeneratorFunction"),V(W),V(W,T,"Generator"),V(W,Dt,function(){return this}),V(W,"toString",function(){return"[object Generator]"}),(Q=function(){return{w:L,m:at}})()}function V(H,it,mt,Dt){var T=Object.defineProperty;try{T({},"",{})}catch{T=0}V=function(L,$,St,ft){function ee(_,W){V(L,_,function(at){return this._invoke(_,W,at)})}$?T?T(L,$,{value:St,enumerable:!ft,configurable:!ft,writable:!ft}):L[$]=St:(ee("next",0),ee("throw",1),ee("return",2))},V(H,it,mt,Dt)}function Y(H,it,mt,Dt,T,L,$){try{var St=H[L]($),ft=St.value}catch(ee){return void mt(ee)}St.done?it(ft):Promise.resolve(ft).then(Dt,T)}function ut(H){return function(){var it=this,mt=arguments;return new Promise(function(Dt,T){var L=H.apply(it,mt);function $(ft){Y(L,Dt,T,$,St,"next",ft)}function St(ft){Y(L,Dt,T,$,St,"throw",ft)}$(void 0)})}}function Ut(H,it,mt){return it=J(it),function(Dt,T){if(T&&(ot(T)=="object"||typeof T=="function"))return T;if(T!==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}(Dt)}(H,Bt()?Reflect.construct(it,mt||[],J(H).constructor):it.apply(H,mt))}function pt(H){var it=typeof Map=="function"?new Map:void 0;return pt=function(mt){if(mt===null||!function(T){try{return Function.toString.call(T).indexOf("[native code]")!==-1}catch{return typeof T=="function"}}(mt))return mt;if(typeof mt!="function")throw new TypeError("Super expression must either be null or a function");if(it!==void 0){if(it.has(mt))return it.get(mt);it.set(mt,Dt)}function Dt(){return function(T,L,$){if(Bt())return Reflect.construct.apply(null,arguments);var St=[null];St.push.apply(St,L);var ft=new(T.bind.apply(T,St));return $&&Rt(ft,$.prototype),ft}(mt,arguments,J(this).constructor)}return Dt.prototype=Object.create(mt.prototype,{constructor:{value:Dt,enumerable:!1,writable:!0,configurable:!0}}),Rt(Dt,mt)},pt(H)}function Bt(){try{var H=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bt=function(){return!!H})()}function Rt(H,it){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(mt,Dt){return mt.__proto__=Dt,mt},Rt(H,it)}function J(H){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(it){return it.__proto__||Object.getPrototypeOf(it)},J(H)}var At=function(H){function it(mt,Dt){var T;return function(L,$){if(!(L instanceof $))throw new TypeError("Cannot call a class as a function")}(this,it),(T=Ut(this,it,[mt])).cause=Dt,T.name="WasmFetchError",T}return function(mt,Dt){if(typeof Dt!="function"&&Dt!==null)throw new TypeError("Super expression must either be null or a function");mt.prototype=Object.create(Dt&&Dt.prototype,{constructor:{value:mt,writable:!0,configurable:!0}}),Object.defineProperty(mt,"prototype",{writable:!1}),Dt&&Rt(mt,Dt)}(it,H),function(mt,Dt,T){return Object.defineProperty(mt,"prototype",{writable:!1}),mt}(it)}(pt(Error));function c(H,it){return N.apply(this,arguments)}function N(){return(N=ut(Q().m(function H(it,mt){var Dt,T,L,$,St;return Q().w(function(ft){for(;;)switch(ft.p=ft.n){case 0:return ft.p=0,Dt=u.xdr.LedgerKey.contractCode(new u.xdr.LedgerKeyContractCode({hash:u.xdr.Hash.fromXDR(mt,"raw")})),ft.n=1,it.getLedgerEntries(Dt);case 1:if((T=ft.v).entries&&T.entries.length!==0){ft.n=2;break}throw new At("WASM not found for the given hash");case 2:if((L=T.entries[0]).key.switch()===u.xdr.LedgerEntryType.contractCode()){ft.n=3;break}throw new At("Invalid ledger entry type returned");case 3:return $=L.val.contractCode(),ft.a(2,x.from($.code()));case 4:if(ft.p=4,!((St=ft.v)instanceof At)){ft.n=5;break}throw St;case 5:throw new At("Failed to fetch WASM from hash",St);case 6:return ft.a(2)}},H,null,[[0,4]])}))).apply(this,arguments)}function G(H){return H.executable().switch()===u.xdr.ContractExecutableType.contractExecutableStellarAsset()}function tt(H,it){return Et.apply(this,arguments)}function Et(){return Et=ut(Q().m(function H(it,mt){var Dt,T,L,$,St,ft,ee,_;return Q().w(function(W){for(;;)switch(W.p=W.n){case 0:return W.p=0,Dt=new u.Contract(mt.toString()),W.n=1,it.getLedgerEntries(Dt.getFootprint());case 1:if((T=W.v).entries&&T.entries.length!==0){W.n=2;break}throw new At("Contract instance not found");case 2:if((L=T.entries[0]).key.switch()===u.xdr.LedgerEntryType.contractData()){W.n=3;break}throw new At("Invalid ledger entry type returned");case 3:if($=L.val.contractData(),!G(St=$.val().instance())){W.n=4;break}return W.a(2,{type:"stellar-asset-contract"});case 4:return ft=St.executable().wasmHash(),W.n=5,c(it,ft);case 5:return ee=W.v,W.a(2,{type:"wasm",wasmBytes:ee});case 6:if(W.p=6,!((_=W.v)instanceof At)){W.n=7;break}throw _;case 7:throw new At("Failed to fetch WASM from contract",_);case 8:return W.a(2)}},H,null,[[0,6]])})),Et.apply(this,arguments)}function q(H,it){return Tt.apply(this,arguments)}function Tt(){return(Tt=ut(Q().m(function H(it,mt){var Dt,T,L;return Q().w(function($){for(;;)switch($.p=$.n){case 0:if($.p=0,(Dt=x.from(it,"hex")).length===32){$.n=1;break}throw new At("Invalid WASM hash length: expected 32 bytes, got ".concat(Dt.length));case 1:return $.n=2,c(mt,Dt);case 2:return T=$.v,$.a(2,{type:"wasm",wasmBytes:T});case 3:throw $.p=3,L=$.v,new At("Failed to fetch WASM from hash ".concat(it),L);case 4:return $.a(2)}},H,null,[[0,3]])}))).apply(this,arguments)}function Ft(H,it){return vt.apply(this,arguments)}function vt(){return(vt=ut(Q().m(function H(it,mt){var Dt,T;return Q().w(function(L){for(;;)switch(L.p=L.n){case 0:if(L.p=0,u.StrKey.isValidContract(it)){L.n=1;break}throw new At("Invalid contract ID: ".concat(it));case 1:return Dt=u.Address.fromString(it),L.n=2,tt(mt,Dt);case 2:return L.a(2,L.v);case 3:throw L.p=3,T=L.v,new At("Failed to fetch WASM from contract ".concat(it),T);case 4:return L.a(2)}},H,null,[[0,3]])}))).apply(this,arguments)}function bt(H){return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},bt(H)}function yt(){var H,it,mt=typeof Symbol=="function"?Symbol:{},Dt=mt.iterator||"@@iterator",T=mt.toStringTag||"@@toStringTag";function L(Xt,ae,Kt,Ne){var D=ae&&ae.prototype instanceof St?ae:St,et=Object.create(D.prototype);return dt(et,"_invoke",function(gt,Yt,le){var we,ie,U,X=0,Pt=le||[],Ht=!1,re={p:0,n:0,v:H,a:We,f:We.bind(H,4),d:function(xe,je){return we=xe,ie=0,U=H,re.n=je,$}};function We(xe,je){for(ie=xe,U=je,it=0;!Ht&&X&&!Qe&&it3?(Qe=ur===je)&&(U=Oe[(ie=Oe[4])?5:(ie=3,3)],Oe[4]=Oe[5]=H):Oe[0]<=Cr&&((Qe=xe<2&&Crje||je>ur)&&(Oe[4]=xe,Oe[5]=je,re.n=ur,ie=0))}if(Qe||xe>1)return $;throw Ht=!0,je}return function(xe,je,Qe){if(X>1)throw TypeError("Generator is already running");for(Ht&&je===1&&We(je,Qe),ie=je,U=Qe;(it=ie<2?H:U)||!Ht;){we||(ie?ie<3?(ie>1&&(re.n=-1),We(ie,U)):re.n=U:re.v=U);try{if(X=2,we){if(ie||(xe="next"),it=we[xe]){if(!(it=it.call(we,U)))throw TypeError("iterator result is not an object");if(!it.done)return it;U=it.value,ie<2&&(ie=0)}else ie===1&&(it=we.return)&&it.call(we),ie<2&&(U=TypeError("The iterator does not provide a '"+xe+"' method"),ie=1);we=H}else if((it=(Ht=re.n<0)?U:gt.call(Yt,re))!==$)break}catch(Oe){we=H,ie=1,U=Oe}finally{X=1}}return{value:it,done:Ht}}}(Xt,Kt,Ne),!0),et}var $={};function St(){}function ft(){}function ee(){}it=Object.getPrototypeOf;var _=[][Dt]?it(it([][Dt]())):(dt(it={},Dt,function(){return this}),it),W=ee.prototype=St.prototype=Object.create(_);function at(Xt){return Object.setPrototypeOf?Object.setPrototypeOf(Xt,ee):(Xt.__proto__=ee,dt(Xt,T,"GeneratorFunction")),Xt.prototype=Object.create(W),Xt}return ft.prototype=ee,dt(W,"constructor",ee),dt(ee,"constructor",ft),ft.displayName="GeneratorFunction",dt(ee,T,"GeneratorFunction"),dt(W),dt(W,T,"Generator"),dt(W,Dt,function(){return this}),dt(W,"toString",function(){return"[object Generator]"}),(yt=function(){return{w:L,m:at}})()}function dt(H,it,mt,Dt){var T=Object.defineProperty;try{T({},"",{})}catch{T=0}dt=function(L,$,St,ft){function ee(_,W){dt(L,_,function(at){return this._invoke(_,W,at)})}$?T?T(L,$,{value:St,enumerable:!ft,configurable:!ft,writable:!ft}):L[$]=St:(ee("next",0),ee("throw",1),ee("return",2))},dt(H,it,mt,Dt)}function lt(H,it,mt,Dt,T,L,$){try{var St=H[L]($),ft=St.value}catch(ee){return void mt(ee)}St.done?it(ft):Promise.resolve(ft).then(Dt,T)}function xt(H){return function(){var it=this,mt=arguments;return new Promise(function(Dt,T){var L=H.apply(it,mt);function $(ft){lt(L,Dt,T,$,St,"next",ft)}function St(ft){lt(L,Dt,T,$,St,"throw",ft)}$(void 0)})}}function Ot(H,it){for(var mt=0;mtf,SB:()=>p,Sq:()=>m,c0:()=>k,ch:()=>u,ff:()=>E,z0:()=>y});var v=l(8950);function z(h){return function(A){if(Array.isArray(A))return s(A)}(h)||function(A){if(typeof Symbol<"u"&&A[Symbol.iterator]!=null||A["@@iterator"]!=null)return Array.from(A)}(h)||function(A,g){if(A){if(typeof A=="string")return s(A,g);var w={}.toString.call(A).slice(8,-1);return w==="Object"&&A.constructor&&(w=A.constructor.name),w==="Map"||w==="Set"?Array.from(A):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?s(A,g):void 0}}(h)||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 s(h,A){(A==null||A>h.length)&&(A=h.length);for(var g=0,w=Array(A);g1&&arguments[1]!==void 0&&arguments[1];switch(h.switch()){case v.xdr.ScSpecType.scSpecTypeVal():return"any";case v.xdr.ScSpecType.scSpecTypeBool():return"boolean";case v.xdr.ScSpecType.scSpecTypeVoid():return"null";case v.xdr.ScSpecType.scSpecTypeError():return"Error";case v.xdr.ScSpecType.scSpecTypeU32():case v.xdr.ScSpecType.scSpecTypeI32():return"number";case v.xdr.ScSpecType.scSpecTypeU64():case v.xdr.ScSpecType.scSpecTypeI64():case v.xdr.ScSpecType.scSpecTypeTimepoint():case v.xdr.ScSpecType.scSpecTypeDuration():case v.xdr.ScSpecType.scSpecTypeU128():case v.xdr.ScSpecType.scSpecTypeI128():case v.xdr.ScSpecType.scSpecTypeU256():case v.xdr.ScSpecType.scSpecTypeI256():return"bigint";case v.xdr.ScSpecType.scSpecTypeBytes():case v.xdr.ScSpecType.scSpecTypeBytesN():return"Buffer";case v.xdr.ScSpecType.scSpecTypeString():case v.xdr.ScSpecType.scSpecTypeSymbol():return"string";case v.xdr.ScSpecType.scSpecTypeAddress():case v.xdr.ScSpecType.scSpecTypeMuxedAddress():return A?"string | Address":"string";case v.xdr.ScSpecType.scSpecTypeVec():var g=y(h.vec().elementType(),A);return"Array<".concat(g,">");case v.xdr.ScSpecType.scSpecTypeMap():var w=y(h.map().keyType(),A),R=y(h.map().valueType(),A);return"Map<".concat(w,", ").concat(R,">");case v.xdr.ScSpecType.scSpecTypeTuple():var S=h.tuple().valueTypes().map(function(Q){return y(Q,A)});return"[".concat(S.join(", "),"]");case v.xdr.ScSpecType.scSpecTypeOption():for(;h.option().valueType().switch()===v.xdr.ScSpecType.scSpecTypeOption();)h=h.option().valueType();var C=y(h.option().valueType(),A);return"".concat(C," | null");case v.xdr.ScSpecType.scSpecTypeResult():var x=y(h.result().okType(),A),ot=y(h.result().errorType(),A);return"Result<".concat(x,", ").concat(ot,">");case v.xdr.ScSpecType.scSpecTypeUdt():return E(h.udt().name().toString());default:return"unknown"}}function O(h,A){switch(h.switch()){case v.xdr.ScSpecType.scSpecTypeUdt():return void A.typeFileImports.add(E(h.udt().name().toString()));case v.xdr.ScSpecType.scSpecTypeAddress():case v.xdr.ScSpecType.scSpecTypeMuxedAddress():return void A.stellarImports.add("Address");case v.xdr.ScSpecType.scSpecTypeBytes():case v.xdr.ScSpecType.scSpecTypeBytesN():return void(A.needsBufferImport=!0);case v.xdr.ScSpecType.scSpecTypeVal():return void A.stellarImports.add("xdr");case v.xdr.ScSpecType.scSpecTypeResult():A.stellarContractImports.add("Result");break;case v.xdr.ScSpecType.scSpecTypeBool():case v.xdr.ScSpecType.scSpecTypeVoid():case v.xdr.ScSpecType.scSpecTypeError():case v.xdr.ScSpecType.scSpecTypeU32():case v.xdr.ScSpecType.scSpecTypeI32():case v.xdr.ScSpecType.scSpecTypeU64():case v.xdr.ScSpecType.scSpecTypeI64():case v.xdr.ScSpecType.scSpecTypeTimepoint():case v.xdr.ScSpecType.scSpecTypeDuration():case v.xdr.ScSpecType.scSpecTypeU128():case v.xdr.ScSpecType.scSpecTypeI128():case v.xdr.ScSpecType.scSpecTypeU256():case v.xdr.ScSpecType.scSpecTypeI256():case v.xdr.ScSpecType.scSpecTypeString():case v.xdr.ScSpecType.scSpecTypeSymbol():return}var g=function(w){switch(w.switch()){case v.xdr.ScSpecType.scSpecTypeVec():return[w.vec().elementType()];case v.xdr.ScSpecType.scSpecTypeMap():return[w.map().keyType(),w.map().valueType()];case v.xdr.ScSpecType.scSpecTypeTuple():return w.tuple().valueTypes();case v.xdr.ScSpecType.scSpecTypeOption():return[w.option().valueType()];case v.xdr.ScSpecType.scSpecTypeResult():return[w.result().okType(),w.result().errorType()];default:return[]}}(h);g.forEach(function(w){return O(w,A)})}function u(h){var A={typeFileImports:new Set,stellarContractImports:new Set,stellarImports:new Set,needsBufferImport:!1};return h.forEach(function(g){return O(g,A)}),A}function m(h,A){var g=[],w=h.typeFileImports,R=[].concat(z(h.stellarContractImports),z((A==null?void 0:A.additionalStellarContractImports)||[])),S=[].concat(z(h.stellarImports),z((A==null?void 0:A.additionalStellarImports)||[]));if(A!=null&&A.includeTypeFileImports&&w.size>0&&g.push("import {".concat(Array.from(w).join(", "),"} from './types.js';")),R.length>0){var C=Array.from(new Set(R));g.push("import {".concat(C.join(", "),"} from '@stellar/stellar-sdk/contract';"))}if(S.length>0){var x=Array.from(new Set(S));g.push("import {".concat(x.join(", "),"} from '@stellar/stellar-sdk';"))}return h.needsBufferImport&&g.push("import { Buffer } from 'buffer';"),g.join(` +`)}function p(h){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(h.trim()==="")return"";var g=" ".repeat(A),w=h.replace(/\*\//g,"* /").replace(/@(?!(param|returns?|type|throws?|example|deprecated|see|link|since|author|version|description|summary)\b)/g,"\\@").split(` +`).map(function(R){return"".concat(g," * ").concat(R).trimEnd()});return"".concat(g,`/** +`).concat(w.join(` +`),` +`).concat(g,` */ +`)}function f(h){return h.fields().every(function(A,g){return A.name().toString().trim()===g.toString()})}},1924(P,M,l){l.r(M),l.d(M,{StellarBase:()=>E,default:()=>k,httpClient:()=>v.ok});var v=l(9983),z=l(4356),s={};for(const y in z)["default","StellarBase","httpClient"].indexOf(y)<0&&(s[y]=()=>z[y]);l.d(M,s);var E=l(8950);const k=(P=l.hmd(P)).exports},8732(P,M,l){function v(A){return v=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},v(A)}function z(A,g){for(var w=0;wh});var O,u,m,p={allowHttp:!1,timeout:0},f=E({},p),h=(O=function A(){(function(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")})(this,A)},m=[{key:"setAllowHttp",value:function(A){f.allowHttp=A}},{key:"setTimeout",value:function(A){f.timeout=A}},{key:"isAllowHttp",value:function(){return f.allowHttp}},{key:"getTimeout",value:function(){return f.timeout}},{key:"setDefault",value:function(){f=E({},p)}}],(u=null)&&z(O.prototype,u),m&&z(O,m),Object.defineProperty(O,"prototype",{writable:!1}),O)},8250(P,M,l){l.r(M),l.d(M,{AssembledTransaction:()=>X,Client:()=>Ji,DEFAULT_TIMEOUT:()=>g.c,Err:()=>h,NULL_ACCOUNT:()=>g.u,Ok:()=>f,SentTransaction:()=>N,Spec:()=>kn,Watcher:()=>G,basicNodeSigner:()=>je});var v=l(8950),z=l(3496),s=l(4076),E=l(8680);function k(It){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ct){return typeof ct}:function(ct){return ct&&typeof Symbol=="function"&&ct.constructor===Symbol&&ct!==Symbol.prototype?"symbol":typeof ct},k(It)}function y(It,ct){if(!(It instanceof ct))throw new TypeError("Cannot call a class as a function")}function O(It,ct){for(var Zt=0;Zt3?(sr=Nr===qe)&&(de=br[(qt=br[4])?5:(qt=3,3)],br[4]=br[5]=It):br[0]<=ar&&((sr=hr<2&&arqe||qe>Nr)&&(br[4]=hr,br[5]=qe,dr.n=Nr,qt=0))}if(sr||hr>1)return Le;throw tr=!0,qe}return function(hr,qe,sr){if(fe>1)throw TypeError("Generator is already running");for(tr&&qe===1&&yr(qe,sr),qt=qe,de=sr;(ct=qt<2?It:de)||!tr;){oe||(qt?qt<3?(qt>1&&(dr.n=-1),yr(qt,de)):dr.n=de:dr.v=de);try{if(fe=2,oe){if(qt||(hr="next"),ct=oe[hr]){if(!(ct=ct.call(oe,de)))throw TypeError("iterator result is not an object");if(!ct.done)return ct;de=ct.value,qt<2&&(qt=0)}else qt===1&&(ct=oe.return)&&ct.call(oe),qt<2&&(de=TypeError("The iterator does not provide a '"+hr+"' method"),qt=1);oe=It}else if((ct=(tr=dr.n<0)?de:Nt.call(wt,dr))!==Le)break}catch(br){oe=It,qt=1,de=br}finally{fe=1}}return{value:ct,done:tr}}}(fr,nr,Ur),!0),ht}var Le={};function De(){}function he(){}function ve(){}ct=Object.getPrototypeOf;var me=[][pe]?ct(ct([][pe]())):(Y(ct={},pe,function(){return this}),ct),Ze=ve.prototype=De.prototype=Object.create(me);function Er(fr){return Object.setPrototypeOf?Object.setPrototypeOf(fr,ve):(fr.__proto__=ve,Y(fr,Gt,"GeneratorFunction")),fr.prototype=Object.create(Ze),fr}return he.prototype=ve,Y(Ze,"constructor",ve),Y(ve,"constructor",he),he.displayName="GeneratorFunction",Y(ve,Gt,"GeneratorFunction"),Y(Ze),Y(Ze,Gt,"Generator"),Y(Ze,pe,function(){return this}),Y(Ze,"toString",function(){return"[object Generator]"}),(V=function(){return{w:be,m:Er}})()}function Y(It,ct,Zt,pe){var Gt=Object.defineProperty;try{Gt({},"",{})}catch{Gt=0}Y=function(be,Le,De,he){function ve(me,Ze){Y(be,me,function(Er){return this._invoke(me,Ze,Er)})}Le?Gt?Gt(be,Le,{value:De,enumerable:!he,configurable:!he,writable:!he}):be[Le]=De:(ve("next",0),ve("throw",1),ve("return",2))},Y(It,ct,Zt,pe)}function ut(It,ct,Zt,pe,Gt,be,Le){try{var De=It[be](Le),he=De.value}catch(ve){return void Zt(ve)}De.done?ct(he):Promise.resolve(he).then(pe,Gt)}function Ut(It){return function(){var ct=this,Zt=arguments;return new Promise(function(pe,Gt){var be=It.apply(ct,Zt);function Le(he){ut(be,pe,Gt,Le,De,"next",he)}function De(he){ut(be,pe,Gt,Le,De,"throw",he)}Le(void 0)})}}function pt(It,ct){if(!(It instanceof ct))throw new TypeError("Cannot call a class as a function")}function Bt(It,ct){for(var Zt=0;Zt=It.length&&(It=void 0),{value:It&&It[Zt++],done:!It}}}}throw new TypeError(ee(It)+" is not iterable")}function W(It,ct){return function(Zt){if(Array.isArray(Zt))return Zt}(It)||function(Zt,pe){var Gt=Zt==null?null:typeof Symbol<"u"&&Zt[Symbol.iterator]||Zt["@@iterator"];if(Gt!=null){var be,Le,De,he,ve=[],me=!0,Ze=!1;try{if(De=(Gt=Gt.call(Zt)).next,pe!==0)for(;!(me=(be=De.call(Gt)).done)&&(ve.push(be.value),ve.length!==pe);me=!0);}catch(Er){Ze=!0,Le=Er}finally{try{if(!me&&Gt.return!=null&&(he=Gt.return(),Object(he)!==he))return}finally{if(Ze)throw Le}}return ve}}(It,ct)||et(It,ct)||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 at(It,ct){var Zt=typeof Symbol<"u"&&It[Symbol.iterator]||It["@@iterator"];if(!Zt){if(Array.isArray(It)||(Zt=et(It))||ct){Zt&&(It=Zt);var pe=0,Gt=function(){};return{s:Gt,n:function(){return pe>=It.length?{done:!0}:{done:!1,value:It[pe++]}},e:function(he){throw he},f:Gt}}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 be,Le=!0,De=!1;return{s:function(){Zt=Zt.call(It)},n:function(){var he=Zt.next();return Le=he.done,he},e:function(he){De=!0,be=he},f:function(){try{Le||Zt.return==null||Zt.return()}finally{if(De)throw be}}}}function Xt(It,ct){var Zt=Object.keys(It);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(It);ct&&(pe=pe.filter(function(Gt){return Object.getOwnPropertyDescriptor(It,Gt).enumerable})),Zt.push.apply(Zt,pe)}return Zt}function ae(It){for(var ct=1;ct3?(sr=Nr===qe)&&(de=br[(qt=br[4])?5:(qt=3,3)],br[4]=br[5]=It):br[0]<=ar&&((sr=hr<2&&arqe||qe>Nr)&&(br[4]=hr,br[5]=qe,dr.n=Nr,qt=0))}if(sr||hr>1)return Le;throw tr=!0,qe}return function(hr,qe,sr){if(fe>1)throw TypeError("Generator is already running");for(tr&&qe===1&&yr(qe,sr),qt=qe,de=sr;(ct=qt<2?It:de)||!tr;){oe||(qt?qt<3?(qt>1&&(dr.n=-1),yr(qt,de)):dr.n=de:dr.v=de);try{if(fe=2,oe){if(qt||(hr="next"),ct=oe[hr]){if(!(ct=ct.call(oe,de)))throw TypeError("iterator result is not an object");if(!ct.done)return ct;de=ct.value,qt<2&&(qt=0)}else qt===1&&(ct=oe.return)&&ct.call(oe),qt<2&&(de=TypeError("The iterator does not provide a '"+hr+"' method"),qt=1);oe=It}else if((ct=(tr=dr.n<0)?de:Nt.call(wt,dr))!==Le)break}catch(br){oe=It,qt=1,de=br}finally{fe=1}}return{value:ct,done:tr}}}(fr,nr,Ur),!0),ht}var Le={};function De(){}function he(){}function ve(){}ct=Object.getPrototypeOf;var me=[][pe]?ct(ct([][pe]())):(Ne(ct={},pe,function(){return this}),ct),Ze=ve.prototype=De.prototype=Object.create(me);function Er(fr){return Object.setPrototypeOf?Object.setPrototypeOf(fr,ve):(fr.__proto__=ve,Ne(fr,Gt,"GeneratorFunction")),fr.prototype=Object.create(Ze),fr}return he.prototype=ve,Ne(Ze,"constructor",ve),Ne(ve,"constructor",he),he.displayName="GeneratorFunction",Ne(ve,Gt,"GeneratorFunction"),Ne(Ze),Ne(Ze,Gt,"Generator"),Ne(Ze,pe,function(){return this}),Ne(Ze,"toString",function(){return"[object Generator]"}),(Kt=function(){return{w:be,m:Er}})()}function Ne(It,ct,Zt,pe){var Gt=Object.defineProperty;try{Gt({},"",{})}catch{Gt=0}Ne=function(be,Le,De,he){function ve(me,Ze){Ne(be,me,function(Er){return this._invoke(me,Ze,Er)})}Le?Gt?Gt(be,Le,{value:De,enumerable:!he,configurable:!he,writable:!he}):be[Le]=De:(ve("next",0),ve("throw",1),ve("return",2))},Ne(It,ct,Zt,pe)}function D(It){return function(ct){if(Array.isArray(ct))return gt(ct)}(It)||function(ct){if(typeof Symbol<"u"&&ct[Symbol.iterator]!=null||ct["@@iterator"]!=null)return Array.from(ct)}(It)||et(It)||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 et(It,ct){if(It){if(typeof It=="string")return gt(It,ct);var Zt={}.toString.call(It).slice(8,-1);return Zt==="Object"&&It.constructor&&(Zt=It.constructor.name),Zt==="Map"||Zt==="Set"?Array.from(It):Zt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Zt)?gt(It,ct):void 0}}function gt(It,ct){(ct==null||ct>It.length)&&(ct=It.length);for(var Zt=0,pe=Array(ct);Zt0&&fe[0]!==void 0?fe[0]:{}).restore,me.built){Fe.n=2;break}if(me.raw){Fe.n=1;break}throw new Error("Transaction has not yet been assembled; call `AssembledTransaction.build` first.");case 1:me.built=me.raw.build();case 2:return rt=rt??me.options.restore,delete me.simulationResult,delete me.simulationTransactionData,Fe.n=3,me.server.simulateTransaction(me.built);case 3:if(me.simulation=Fe.v,!rt||!s.j.isSimulationRestore(me.simulation)){Fe.n=8;break}return Fe.n=4,(0,A.sU)(me.options,me.server);case 4:return ht=Fe.v,Fe.n=5,me.restoreFootprint(me.simulation.restorePreamble,ht);case 5:if((Nt=Fe.v).status!==s.j.GetTransactionStatus.SUCCESS){Fe.n=7;break}return de=me.originalOp?me.originalOp:(wt=new v.Contract(me.options.contractId)).call.apply(wt,[me.options.method].concat(D((Mt=me.options.args)!==null&&Mt!==void 0?Mt:[]))),me.raw=new v.TransactionBuilder(ht,{fee:(oe=me.options.fee)!==null&&oe!==void 0?oe:v.BASE_FEE,networkPassphrase:me.options.networkPassphrase}).addOperation(de).setTimeout((qt=me.options.timeoutInSeconds)!==null&&qt!==void 0?qt:g.c),delete me.built,Fe.n=6,me.simulate();case 6:return Fe.a(2,me);case 7:throw new It.Errors.RestorationFailure(`Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result: +`.concat(JSON.stringify(Nt)));case 8:return s.j.isSimulationSuccess(me.simulation)&&(me.built=(0,E.X)(me.built,me.simulation).build()),Fe.a(2,me)}},Ur)}))),ie(this,"sign",le(Kt().m(function Ur(){var rt,ht,Nt,wt,Mt,oe,qt,de,fe,Fe,tr,dr,yr=arguments;return Kt().w(function(hr){for(;;)switch(hr.n){case 0:if(Nt=(ht=yr.length>0&&yr[0]!==void 0?yr[0]:{}).force,wt=Nt!==void 0&&Nt,Mt=ht.signTransaction,oe=Mt===void 0?me.options.signTransaction:Mt,me.built){hr.n=1;break}throw new Error("Transaction has not yet been simulated");case 1:if(wt||!me.isReadCall){hr.n=2;break}throw new It.Errors.NoSignatureNeeded("This is a read call. It requires no signature or sending. Use `force: true` to sign and send anyway.");case 2:if(oe){hr.n=3;break}throw new It.Errors.NoSigner("You must provide a signTransaction function, either when calling `signAndSend` or when initializing your Client");case 3:if(me.options.publicKey){hr.n=4;break}throw new It.Errors.FakeAccount("This transaction was constructed using a default account. Provide a valid publicKey in the AssembledTransactionOptions.");case 4:if(!(qt=me.needsNonInvokerSigningBy().filter(function(qe){return!qe.startsWith("C")})).length){hr.n=5;break}throw new It.Errors.NeedsMoreSignatures("Transaction requires signatures from ".concat(qt,". ")+"See `needsNonInvokerSigningBy` for details.");case 5:return de=(rt=me.options.timeoutInSeconds)!==null&&rt!==void 0?rt:g.c,me.built=v.TransactionBuilder.cloneFrom(me.built,{fee:me.built.fee,timebounds:void 0,sorobanData:me.simulationData.transactionData}).setTimeout(de).build(),fe={networkPassphrase:me.options.networkPassphrase},me.options.address&&(fe.address=me.options.address),me.options.submit!==void 0&&(fe.submit=me.options.submit),me.options.submitUrl&&(fe.submitUrl=me.options.submitUrl),hr.n=6,oe(me.built.toXDR(),fe);case 6:Fe=hr.v,tr=Fe.signedTxXdr,dr=Fe.error,me.handleWalletError(dr),me.signed=v.TransactionBuilder.fromXDR(tr,me.options.networkPassphrase);case 7:return hr.a(2)}},Ur)}))),ie(this,"signAndSend",le(Kt().m(function Ur(){var rt,ht,Nt,wt,Mt,oe,qt,de,fe=arguments;return Kt().w(function(Fe){for(;;)switch(Fe.n){case 0:if(ht=(rt=fe.length>0&&fe[0]!==void 0?fe[0]:{}).force,Nt=ht!==void 0&&ht,wt=rt.signTransaction,Mt=wt===void 0?me.options.signTransaction:wt,oe=rt.watcher,me.signed){Fe.n=1;break}return qt=Mt||me.options.signTransaction,de=me.options.submit&&qt?function(tr,dr){return qt(tr,ae(ae({},dr),{},{submit:!1}))}:Mt,Fe.n=1,me.sign({force:Nt,signTransaction:de});case 1:return Fe.a(2,me.send(oe))}},Ur)}))),ie(this,"needsNonInvokerSigningBy",function(){var Ur,rt=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeAlreadySigned,ht=rt!==void 0&&rt;if(!me.built)throw new Error("Transaction has not yet been simulated");if(!("operations"in me.built))throw new Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(me.built)));var Nt=me.built.operations[0];return D(new Set(((Ur=Nt.auth)!==null&&Ur!==void 0?Ur:[]).filter(function(wt){return wt.credentials().switch()===v.xdr.SorobanCredentialsType.sorobanCredentialsAddress()&&(ht||wt.credentials().address().signature().switch().name==="scvVoid")}).map(function(wt){return v.Address.fromScAddress(wt.credentials().address().address()).toString()})))}),ie(this,"signAuthEntries",le(Kt().m(function Ur(){var rt,ht,Nt,wt,Mt,oe,qt,de,fe,Fe,tr,dr,yr,hr,qe,sr,br,ar=arguments;return Kt().w(function(Nr){for(;;)switch(Nr.p=Nr.n){case 0:if(Nt=(ht=ar.length>0&&ar[0]!==void 0?ar[0]:{}).expiration,wt=Nt===void 0?le(Kt().m(function In(){var $n;return Kt().w(function(To){for(;;)switch(To.n){case 0:return To.n=1,me.server.getLatestLedger();case 1:return $n=To.v.sequence,To.a(2,$n+100)}},In)}))():Nt,Mt=ht.signAuthEntry,oe=Mt===void 0?me.options.signAuthEntry:Mt,qt=ht.address,de=qt===void 0?me.options.publicKey:qt,fe=ht.authorizeEntry,Fe=fe===void 0?v.authorizeEntry:fe,me.built){Nr.n=1;break}throw new Error("Transaction has not yet been assembled or simulated");case 1:if(Fe!==v.authorizeEntry){Nr.n=4;break}if((tr=me.needsNonInvokerSigningBy()).length!==0){Nr.n=2;break}throw new It.Errors.NoUnsignedNonInvokerAuthEntries("No unsigned non-invoker auth entries; maybe you already signed?");case 2:if(tr.indexOf(de??"")!==-1){Nr.n=3;break}throw new It.Errors.NoSignatureNeeded('No auth entries for public key "'.concat(de,'"'));case 3:if(oe){Nr.n=4;break}throw new It.Errors.NoSigner("You must provide `signAuthEntry` or a custom `authorizeEntry`");case 4:dr=me.built.operations[0],yr=(rt=dr.auth)!==null&&rt!==void 0?rt:[],hr=at(yr.entries()),Nr.p=5,sr=Kt().m(function In(){var $n,To,jo,go,oi,wi,Bn,Wo;return Kt().w(function(Hn){for(;;)switch(Hn.n){case 0:if($n=W(qe.value,2),To=$n[0],jo=$n[1],(go=v.xdr.SorobanCredentials.fromXDR(jo.credentials().toXDR())).switch()===v.xdr.SorobanCredentialsType.sorobanCredentialsAddress()){Hn.n=1;break}return Hn.a(2,0);case 1:if(v.Address.fromScAddress(go.address().address()).toString()===de){Hn.n=2;break}return Hn.a(2,0);case 2:return oi=oe??Promise.resolve,wi=Fe,Bn=jo,Wo=function(){var lo=le(Kt().m(function xo(bn){var eo,Mr,Vn;return Kt().w(function(Xo){for(;;)switch(Xo.n){case 0:return Xo.n=1,oi(bn.toXDR("base64"),{address:de});case 1:return eo=Xo.v,Mr=eo.signedAuthEntry,Vn=eo.error,me.handleWalletError(Vn),Xo.a(2,ft.from(Mr,"base64"))}},xo)}));return function(xo){return lo.apply(this,arguments)}}(),Hn.n=3,wt;case 3:return Hn.n=4,wi(Bn,Wo,Hn.v,me.options.networkPassphrase);case 4:yr[To]=Hn.v;case 5:return Hn.a(2)}},In)}),hr.s();case 6:if((qe=hr.n()).done){Nr.n=9;break}return Nr.d(_(sr()),7);case 7:if(Nr.v!==0){Nr.n=8;break}return Nr.a(3,8);case 8:Nr.n=6;break;case 9:Nr.n=11;break;case 10:Nr.p=10,br=Nr.v,hr.e(br);case 11:return Nr.p=11,hr.f(),Nr.f(11);case 12:return Nr.a(2)}},Ur,null,[[5,10,11,12]])}))),this.options=he,this.options.simulate=(ve=this.options.simulate)===null||ve===void 0||ve;var Ze=this.options,Er=Ze.server,fr=Ze.allowHttp,F=Ze.headers,nr=Ze.rpcUrl;this.server=Er??new z.Server(nr,{allowHttp:fr,headers:F})}return ct=It,Zt=[{key:"toJSON",value:function(){var he;return JSON.stringify({method:this.options.method,tx:(he=this.built)===null||he===void 0?void 0:he.toXDR(),simulationResult:{auth:this.simulationData.result.auth.map(function(ve){return ve.toXDR("base64")}),retval:this.simulationData.result.retval.toXDR("base64")},simulationTransactionData:this.simulationData.transactionData.toXDR("base64")})}},{key:"toXDR",value:function(){var he;if(!this.built)throw new Error("Transaction has not yet been simulated; call `AssembledTransaction.simulate` first.");return(he=this.built)===null||he===void 0?void 0:he.toEnvelope().toXDR("base64")}},{key:"handleWalletError",value:function(he){if(he){var ve=he.message,me=he.code,Ze="".concat(ve).concat(he.ext?" (".concat(he.ext.join(", "),")"):"");switch(me){case-1:throw new It.Errors.InternalWalletError(Ze);case-2:throw new It.Errors.ExternalServiceError(Ze);case-3:throw new It.Errors.InvalidClientRequest(Ze);case-4:throw new It.Errors.UserRejected(Ze);default:throw new Error("Unhandled error: ".concat(Ze))}}}},{key:"simulationData",get:function(){var he;if(this.simulationResult&&this.simulationTransactionData)return{result:this.simulationResult,transactionData:this.simulationTransactionData};var ve=this.simulation;if(!ve)throw new It.Errors.NotYetSimulated("Transaction has not yet been simulated");if(s.j.isSimulationError(ve))throw new It.Errors.SimulationFailed('Transaction simulation failed: "'.concat(ve.error,'"'));if(s.j.isSimulationRestore(ve))throw new It.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=(he=ve.result)!==null&&he!==void 0?he:{auth:[],retval:v.xdr.ScVal.scvVoid()},this.simulationTransactionData=ve.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(ve){if(!(0,A.pp)(ve))throw ve;var he=this.parseError(ve.toString());if(he)return he;throw ve}}},{key:"parseError",value:function(he){if(this.options.errorTypes){var ve=he.match(A.X8);if(ve){var me=parseInt(ve[1],10),Ze=this.options.errorTypes[me];if(Ze)return new h(Ze)}}}},{key:"send",value:(De=le(Kt().m(function he(ve){var me;return Kt().w(function(Ze){for(;;)switch(Ze.n){case 0:if(this.signed){Ze.n=1;break}throw new Error("The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.");case 1:return Ze.n=2,N.init(this,ve);case 2:return me=Ze.v,Ze.a(2,me)}},he,this)})),function(he){return De.apply(this,arguments)})},{key:"isReadCall",get:function(){var he=this.simulationData.result.auth.length,ve=this.simulationData.transactionData.resources().footprint().readWrite().length;return he===0&&ve===0}},{key:"restoreFootprint",value:(Le=le(Kt().m(function he(ve,me){var Ze,Er,fr;return Kt().w(function(F){for(;;)switch(F.n){case 0:if(this.options.signTransaction){F.n=1;break}throw new Error("For automatic restore to work you must provide a signTransaction function when initializing your Client");case 1:if(me==null){F.n=2;break}fr=me,F.n=4;break;case 2:return F.n=3,(0,A.sU)(this.options,this.server);case 3:fr=F.v;case 4:return me=fr,F.n=5,It.buildFootprintRestoreTransaction(ae({},this.options),ve.transactionData,me,ve.minResourceFee);case 5:return Ze=F.v,F.n=6,Ze.signAndSend();case 6:if((Er=F.v).getTransactionResponse){F.n=7;break}throw new It.Errors.RestorationFailure(`The attempt at automatic restore failed. +`.concat(JSON.stringify(Er)));case 7:return F.a(2,Er.getTransactionResponse)}},he,this)})),function(he,ve){return Le.apply(this,arguments)})}],pe=[{key:"validateInvokeContractOp",value:function(he,ve){if(he.operations.length!==1)throw new Error("Transaction envelope must contain exactly one operation.");var me=he.operations[0];if(me.type!=="invokeHostFunction")throw new Error("Transaction envelope does not contain an invokeHostFunction operation.");var Ze=me;if(Ze.func.switch().name!=="hostFunctionTypeInvokeContract")throw new Error("Transaction envelope does not contain an invokeContract host function.");var Er,fr,F=Ze.func.value();try{Er=F.contractAddress(),fr=F.functionName().toString("utf-8")}catch{throw new Error("Could not extract contract address or method name from the transaction envelope.")}if(!Er||!fr)throw new Error("Could not extract contract address or method name from the transaction envelope.");var nr=v.Address.fromScAddress(Er).toString();if(nr!==ve)throw new Error("Transaction envelope targets contract ".concat(nr,", but this Client is configured for ").concat(ve,"."));return F}},{key:"fromJSON",value:function(he,ve){var me=ve.tx,Ze=ve.simulationResult,Er=ve.simulationTransactionData,fr=new It(he);fr.built=v.TransactionBuilder.fromXDR(me,he.networkPassphrase);var F=It.validateInvokeContractOp(fr.built,he.contractId).functionName().toString("utf-8");if(F!==he.method)throw new Error("Transaction envelope calls method '".concat(F,"', but the provided method is '").concat(he.method,"'."));return fr.simulationResult={auth:Ze.auth.map(function(nr){return v.xdr.SorobanAuthorizationEntry.fromXDR(nr,"base64")}),retval:v.xdr.ScVal.fromXDR(Ze.retval,"base64")},fr.simulationTransactionData=v.xdr.SorobanTransactionData.fromXDR(Er,"base64"),fr}},{key:"fromXDR",value:function(he,ve,me){var Ze=v.xdr.TransactionEnvelope.fromXDR(ve,"base64"),Er=v.TransactionBuilder.fromXDR(Ze,he.networkPassphrase),fr=It.validateInvokeContractOp(Er,he.contractId).functionName().toString("utf-8"),F=new It(ae(ae({},he),{},{method:fr,parseResultXdr:function(nr){return me.funcResToNative(fr,nr)}}));return F.built=Er,F}},{key:"build",value:function(he){var ve,me=new v.Contract(he.contractId);return It.buildWithOp(me.call.apply(me,[he.method].concat(D((ve=he.args)!==null&&ve!==void 0?ve:[]))),he)}},{key:"buildWithOp",value:(be=le(Kt().m(function he(ve,me){var Ze,Er,fr,F;return Kt().w(function(nr){for(;;)switch(nr.n){case 0:return(fr=new It(me)).originalOp=ve,nr.n=1,(0,A.sU)(me,fr.server);case 1:if(F=nr.v,fr.raw=new v.TransactionBuilder(F,{fee:(Ze=me.fee)!==null&&Ze!==void 0?Ze:v.BASE_FEE,networkPassphrase:me.networkPassphrase}).setTimeout((Er=me.timeoutInSeconds)!==null&&Er!==void 0?Er:g.c).addOperation(ve),!me.simulate){nr.n=2;break}return nr.n=2,fr.simulate();case 2:return nr.a(2,fr)}},he)})),function(he,ve){return be.apply(this,arguments)})},{key:"buildFootprintRestoreTransaction",value:(Gt=le(Kt().m(function he(ve,me,Ze,Er){var fr,F;return Kt().w(function(nr){for(;;)switch(nr.n){case 0:return(F=new It(ve)).raw=new v.TransactionBuilder(Ze,{fee:Er,networkPassphrase:ve.networkPassphrase}).setSorobanData(me instanceof v.SorobanDataBuilder?me.build():me).addOperation(v.Operation.restoreFootprint({})).setTimeout((fr=ve.timeoutInSeconds)!==null&&fr!==void 0?fr:g.c),nr.n=1,F.simulate({restore:!1});case 1:return nr.a(2,F)}},he)})),function(he,ve,me,Ze){return Gt.apply(this,arguments)})}],Zt&&we(ct.prototype,Zt),pe&&we(ct,pe),Object.defineProperty(ct,"prototype",{writable:!1}),ct;var ct,Zt,pe,Gt,be,Le,De}();ie(X,"Errors",{ExpiredState:lt,RestorationFailure:xt,NeedsMoreSignatures:Ot,NoSignatureNeeded:kt,NoUnsignedNonInvokerAuthEntries:Ct,NoSigner:H,NotYetSimulated:it,FakeAccount:mt,SimulationFailed:Dt,InternalWalletError:T,ExternalServiceError:L,InvalidClientRequest:$,UserRejected:St});var Pt=l(8287).Buffer;function Ht(){var It,ct,Zt=typeof Symbol=="function"?Symbol:{},pe=Zt.iterator||"@@iterator",Gt=Zt.toStringTag||"@@toStringTag";function be(fr,F,nr,Ur){var rt=F&&F.prototype instanceof De?F:De,ht=Object.create(rt.prototype);return re(ht,"_invoke",function(Nt,wt,Mt){var oe,qt,de,fe=0,Fe=Mt||[],tr=!1,dr={p:0,n:0,v:It,a:yr,f:yr.bind(It,4),d:function(hr,qe){return oe=hr,qt=0,de=It,dr.n=qe,Le}};function yr(hr,qe){for(qt=hr,de=qe,ct=0;!tr&&fe&&!sr&&ct3?(sr=Nr===qe)&&(de=br[(qt=br[4])?5:(qt=3,3)],br[4]=br[5]=It):br[0]<=ar&&((sr=hr<2&&arqe||qe>Nr)&&(br[4]=hr,br[5]=qe,dr.n=Nr,qt=0))}if(sr||hr>1)return Le;throw tr=!0,qe}return function(hr,qe,sr){if(fe>1)throw TypeError("Generator is already running");for(tr&&qe===1&&yr(qe,sr),qt=qe,de=sr;(ct=qt<2?It:de)||!tr;){oe||(qt?qt<3?(qt>1&&(dr.n=-1),yr(qt,de)):dr.n=de:dr.v=de);try{if(fe=2,oe){if(qt||(hr="next"),ct=oe[hr]){if(!(ct=ct.call(oe,de)))throw TypeError("iterator result is not an object");if(!ct.done)return ct;de=ct.value,qt<2&&(qt=0)}else qt===1&&(ct=oe.return)&&ct.call(oe),qt<2&&(de=TypeError("The iterator does not provide a '"+hr+"' method"),qt=1);oe=It}else if((ct=(tr=dr.n<0)?de:Nt.call(wt,dr))!==Le)break}catch(br){oe=It,qt=1,de=br}finally{fe=1}}return{value:ct,done:tr}}}(fr,nr,Ur),!0),ht}var Le={};function De(){}function he(){}function ve(){}ct=Object.getPrototypeOf;var me=[][pe]?ct(ct([][pe]())):(re(ct={},pe,function(){return this}),ct),Ze=ve.prototype=De.prototype=Object.create(me);function Er(fr){return Object.setPrototypeOf?Object.setPrototypeOf(fr,ve):(fr.__proto__=ve,re(fr,Gt,"GeneratorFunction")),fr.prototype=Object.create(Ze),fr}return he.prototype=ve,re(Ze,"constructor",ve),re(ve,"constructor",he),he.displayName="GeneratorFunction",re(ve,Gt,"GeneratorFunction"),re(Ze),re(Ze,Gt,"Generator"),re(Ze,pe,function(){return this}),re(Ze,"toString",function(){return"[object Generator]"}),(Ht=function(){return{w:be,m:Er}})()}function re(It,ct,Zt,pe){var Gt=Object.defineProperty;try{Gt({},"",{})}catch{Gt=0}re=function(be,Le,De,he){function ve(me,Ze){re(be,me,function(Er){return this._invoke(me,Ze,Er)})}Le?Gt?Gt(be,Le,{value:De,enumerable:!he,configurable:!he,writable:!he}):be[Le]=De:(ve("next",0),ve("throw",1),ve("return",2))},re(It,ct,Zt,pe)}function We(It,ct,Zt,pe,Gt,be,Le){try{var De=It[be](Le),he=De.value}catch(ve){return void Zt(ve)}De.done?ct(he):Promise.resolve(he).then(pe,Gt)}function xe(It){return function(){var ct=this,Zt=arguments;return new Promise(function(pe,Gt){var be=It.apply(ct,Zt);function Le(he){We(be,pe,Gt,Le,De,"next",he)}function De(he){We(be,pe,Gt,Le,De,"throw",he)}Le(void 0)})}}var je=function(It,ct){return{signTransaction:(pe=xe(Ht().m(function Gt(be,Le){var De;return Ht().w(function(he){for(;;)if(he.n===0)return(De=v.TransactionBuilder.fromXDR(be,(Le==null?void 0:Le.networkPassphrase)||ct)).sign(It),he.a(2,{signedTxXdr:De.toXDR(),signerAddress:It.publicKey()})},Gt)})),function(Gt,be){return pe.apply(this,arguments)}),signAuthEntry:(Zt=xe(Ht().m(function Gt(be){var Le;return Ht().w(function(De){for(;;)if(De.n===0)return Le=It.sign((0,v.hash)(Pt.from(be,"base64"))).toString("base64"),De.a(2,{signedAuthEntry:Le,signerAddress:It.publicKey()})},Gt)})),function(Gt){return Zt.apply(this,arguments)})};var Zt,pe},Qe=l(8451),Oe=l(8287).Buffer;function Cr(It,ct){var Zt=Object.keys(It);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(It);ct&&(pe=pe.filter(function(Gt){return Object.getOwnPropertyDescriptor(It,Gt).enumerable})),Zt.push.apply(Zt,pe)}return Zt}function ur(It){for(var ct=1;ctIt.length)&&(ct=It.length);for(var Zt=0,pe=Array(ct);Zt0&&(pe.required=Zt),pe}var kn=function(){function It(Gt){if(function(Le,De){if(!(Le instanceof De))throw new TypeError("Cannot call a class as a function")}(this,It),_n(this,"entries",[]),Oe.isBuffer(Gt))this.entries=(0,A.ns)(Gt);else if(typeof Gt=="string")this.entries=(0,A.ns)(Oe.from(Gt,"base64"));else{if(Gt.length===0)throw new Error("Contract spec must have at least one entry");var be=Gt[0];this.entries=typeof be=="string"?Gt.map(function(Le){return v.xdr.ScSpecEntry.fromXDR(Le,"base64")}):Gt}}return ct=It,Zt=[{key:"funcs",value:function(){return this.entries.filter(function(Gt){return Gt.switch().value===v.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value}).map(function(Gt){return Gt.functionV0()})}},{key:"getFunc",value:function(Gt){var be=this.findEntry(Gt);if(be.switch().value!==v.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value)throw new Error("".concat(Gt," is not a function"));return be.functionV0()}},{key:"funcArgsToScVals",value:function(Gt,be){var Le=this;return this.getFunc(Gt).inputs().map(function(De){return Le.nativeToScVal(function(he,ve){var me=ve.name().toString(),Ze=Object.entries(he).find(function(Er){return qn(Er,1)[0]===me});if(!Ze)throw new Error("Missing field ".concat(me));return Ze[1]}(be,De),De.type())})}},{key:"funcResToNative",value:function(Gt,be){var Le=typeof be=="string"?v.xdr.ScVal.fromXDR(be,"base64"):be,De=this.getFunc(Gt).outputs();if(De.length===0){var he=Le.switch();if(he.value!==v.xdr.ScValType.scvVoid().value)throw new Error("Expected void, got ".concat(he.name));return null}if(De.length>1)throw new Error("Multiple outputs not supported");var ve=De[0];return ve.switch().value===v.xdr.ScSpecType.scSpecTypeResult().value?Le.switch().value===v.xdr.ScValType.scvError().value?new h({message:Le.error().toXDR("base64")}):new f(this.scValToNative(Le,ve.result().okType())):this.scValToNative(Le,ve)}},{key:"findEntry",value:function(Gt){var be=this.entries.find(function(Le){return Le.value().name().toString()===Gt});if(!be)throw new Error("no such entry: ".concat(Gt));return be}},{key:"nativeToScVal",value:function(Gt,be){var Le=this,De=be.switch(),he=De.value;if(De.value===v.xdr.ScSpecType.scSpecTypeUdt().value){var ve=be.udt();return this.nativeToUdt(Gt,ve.name().toString())}if(he===v.xdr.ScSpecType.scSpecTypeOption().value){var me=be.option();return Gt==null?v.xdr.ScVal.scvVoid():this.nativeToScVal(Gt,me.valueType())}switch(jr(Gt)){case"object":var Ze,Er,fr;if(Gt===null){if(he===v.xdr.ScSpecType.scSpecTypeVoid().value)return v.xdr.ScVal.scvVoid();throw new TypeError("Type ".concat(be," was not void, but value was null"))}if(Gt instanceof v.xdr.ScVal)return Gt;if(Gt instanceof v.Address){if(be.switch().value!==v.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(be," was not address, but value was Address"));return Gt.toScVal()}if(Gt instanceof v.Contract){if(be.switch().value!==v.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(be," was not address, but value was Address"));return Gt.address().toScVal()}if(Gt instanceof Uint8Array||Oe.isBuffer(Gt)){var F=Uint8Array.from(Gt);switch(he){case v.xdr.ScSpecType.scSpecTypeBytesN().value:var nr=be.bytesN();if(F.length!==nr.n())throw new TypeError("expected ".concat(nr.n()," bytes, but got ").concat(F.length));return v.xdr.ScVal.scvBytes(F);case v.xdr.ScSpecType.scSpecTypeBytes().value:return v.xdr.ScVal.scvBytes(F);default:throw new TypeError("invalid type (".concat(be,") specified for Bytes and BytesN"))}}if(Array.isArray(Gt))switch(he){case v.xdr.ScSpecType.scSpecTypeVec().value:var Ur=be.vec().elementType();return v.xdr.ScVal.scvVec(Gt.map(function(qe){return Le.nativeToScVal(qe,Ur)}));case v.xdr.ScSpecType.scSpecTypeTuple().value:var rt=be.tuple().valueTypes();if(Gt.length!==rt.length)throw new TypeError("Tuple expects ".concat(rt.length," values, but ").concat(Gt.length," were provided"));return v.xdr.ScVal.scvVec(Gt.map(function(qe,sr){return Le.nativeToScVal(qe,rt[sr])}));case v.xdr.ScSpecType.scSpecTypeMap().value:var ht=be.map(),Nt=ht.keyType(),wt=ht.valueType();return v.xdr.ScVal.scvMap(Gt.map(function(qe){var sr=Le.nativeToScVal(qe[0],Nt),br=Le.nativeToScVal(qe[1],wt);return new v.xdr.ScMapEntry({key:sr,val:br})}));default:throw new TypeError("Type ".concat(be," was not vec, but value was Array"))}if(Gt.constructor===Map){if(he!==v.xdr.ScSpecType.scSpecTypeMap().value)throw new TypeError("Type ".concat(be," was not map, but value was Map"));for(var Mt=be.map(),oe=[],qt=Gt.entries(),de=qt.next();!de.done;){var fe=qn(de.value,2),Fe=fe[0],tr=fe[1],dr=this.nativeToScVal(Fe,Mt.keyType()),yr=this.nativeToScVal(tr,Mt.valueType());oe.push(new v.xdr.ScMapEntry({key:dr,val:yr})),de=qt.next()}return v.xdr.ScVal.scvMap(oe)}throw((Ze=(Er=Gt.constructor)===null||Er===void 0?void 0:Er.name)!==null&&Ze!==void 0?Ze:"")!=="Object"?new TypeError("cannot interpret ".concat((fr=Gt.constructor)===null||fr===void 0?void 0:fr.name," value as ScVal (").concat(JSON.stringify(Gt),")")):new TypeError("Received object ".concat(Gt," did not match the provided type ").concat(be));case"number":case"bigint":switch(he){case v.xdr.ScSpecType.scSpecTypeU32().value:if(BigInt(Gt)BigInt(v.xdr.Uint32.MAX_VALUE))throw new RangeError("Value ".concat(Gt," is out of range for U32"));return v.xdr.ScVal.scvU32(Number(Gt));case v.xdr.ScSpecType.scSpecTypeI32().value:if(BigInt(Gt)<-BigInt(v.xdr.Int32.MIN_VALUE)||BigInt(Gt)>BigInt(v.xdr.Int32.MAX_VALUE))throw new RangeError("Value ".concat(Gt," is out of range for I32"));return v.xdr.ScVal.scvI32(Number(Gt));case v.xdr.ScSpecType.scSpecTypeU64().value:case v.xdr.ScSpecType.scSpecTypeI64().value:case v.xdr.ScSpecType.scSpecTypeU128().value:case v.xdr.ScSpecType.scSpecTypeI128().value:case v.xdr.ScSpecType.scSpecTypeU256().value:case v.xdr.ScSpecType.scSpecTypeI256().value:case v.xdr.ScSpecType.scSpecTypeTimepoint().value:case v.xdr.ScSpecType.scSpecTypeDuration().value:var hr=De.name.substring(10).toLowerCase();return new v.XdrLargeInt(hr,Gt).toScVal();default:throw new TypeError("invalid type (".concat(be,") specified for integer"))}case"string":return function(qe,sr){switch(sr.value){case v.xdr.ScSpecType.scSpecTypeString().value:return v.xdr.ScVal.scvString(qe);case v.xdr.ScSpecType.scSpecTypeSymbol().value:return v.xdr.ScVal.scvSymbol(qe);case v.xdr.ScSpecType.scSpecTypeAddress().value:case v.xdr.ScSpecType.scSpecTypeMuxedAddress().value:return v.Address.fromString(qe).toScVal();case v.xdr.ScSpecType.scSpecTypeU64().value:return new v.XdrLargeInt("u64",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeI64().value:return new v.XdrLargeInt("i64",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeU128().value:return new v.XdrLargeInt("u128",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeI128().value:return new v.XdrLargeInt("i128",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeU256().value:return new v.XdrLargeInt("u256",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeI256().value:return new v.XdrLargeInt("i256",qe).toScVal();case v.xdr.ScSpecType.scSpecTypeBytes().value:case v.xdr.ScSpecType.scSpecTypeBytesN().value:return v.xdr.ScVal.scvBytes(Oe.from(qe,"base64"));case v.xdr.ScSpecType.scSpecTypeTimepoint().value:return v.xdr.ScVal.scvTimepoint(new v.xdr.Uint64(qe));case v.xdr.ScSpecType.scSpecTypeDuration().value:return v.xdr.ScVal.scvDuration(new v.xdr.Uint64(qe));default:throw new TypeError("invalid type ".concat(sr.name," specified for string value"))}}(Gt,De);case"boolean":if(he!==v.xdr.ScSpecType.scSpecTypeBool().value)throw TypeError("Type ".concat(be," was not bool, but value was bool"));return v.xdr.ScVal.scvBool(Gt);case"undefined":if(!be)return v.xdr.ScVal.scvVoid();switch(he){case v.xdr.ScSpecType.scSpecTypeVoid().value:case v.xdr.ScSpecType.scSpecTypeOption().value:return v.xdr.ScVal.scvVoid();default:throw new TypeError("Type ".concat(be," was not void, but value was undefined"))}case"function":return this.nativeToScVal(Gt(),be);default:throw new TypeError("failed to convert typeof ".concat(jr(Gt)," (").concat(Gt,")"))}}},{key:"nativeToUdt",value:function(Gt,be){var Le=this.findEntry(be);switch(Le.switch()){case v.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():if(typeof Gt!="number")throw new TypeError("expected number for enum ".concat(be,", but got ").concat(jr(Gt)));return this.nativeToEnum(Gt,Le.udtEnumV0());case v.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.nativeToStruct(Gt,Le.udtStructV0());case v.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.nativeToUnion(Gt,Le.udtUnionV0());default:throw new Error("failed to parse udt ".concat(be))}}},{key:"nativeToUnion",value:function(Gt,be){var Le=this,De=Gt.tag,he=be.cases().find(function(Er){return Er.value().name().toString()===De});if(!he)throw new TypeError("no such enum entry: ".concat(De," in ").concat(be));var ve=v.xdr.ScVal.scvSymbol(De);switch(he.switch()){case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():return v.xdr.ScVal.scvVec([ve]);case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var me=he.tupleCase().type();if(Array.isArray(Gt.values)){if(Gt.values.length!==me.length)throw new TypeError("union ".concat(be," expects ").concat(me.length," values, but got ").concat(Gt.values.length));var Ze=Gt.values.map(function(Er,fr){return Le.nativeToScVal(Er,me[fr])});return Ze.unshift(ve),v.xdr.ScVal.scvVec(Ze)}throw new Error("failed to parse union case ".concat(he," with ").concat(Gt));default:throw new Error("failed to parse union ".concat(be," with ").concat(Gt))}}},{key:"nativeToStruct",value:function(Gt,be){var Le=this,De=be.fields();if(De.some(so)){if(!De.every(so))throw new Error("mixed numeric and non-numeric field names are not allowed");return v.xdr.ScVal.scvVec(De.map(function(he,ve){return Le.nativeToScVal(Gt[ve],De[ve].type())}))}return v.xdr.ScVal.scvMap(De.map(function(he){var ve=he.name().toString();return new v.xdr.ScMapEntry({key:Le.nativeToScVal(ve,v.xdr.ScSpecTypeDef.scSpecTypeSymbol()),val:Le.nativeToScVal(Gt[ve],he.type())})}))}},{key:"nativeToEnum",value:function(Gt,be){if(be.cases().some(function(Le){return Le.value()===Gt}))return v.xdr.ScVal.scvU32(Gt);throw new TypeError("no such enum entry: ".concat(Gt," in ").concat(be))}},{key:"scValStrToNative",value:function(Gt,be){return this.scValToNative(v.xdr.ScVal.fromXDR(Gt,"base64"),be)}},{key:"scValToNative",value:function(Gt,be){var Le=this,De=be.switch(),he=De.value;if(he===v.xdr.ScSpecType.scSpecTypeOption().value)return Gt.switch().value===v.xdr.ScValType.scvVoid().value?null:this.scValToNative(Gt,be.option().valueType());if(he===v.xdr.ScSpecType.scSpecTypeUdt().value)return this.scValUdtToNative(Gt,be.udt());switch(Gt.switch().value){case v.xdr.ScValType.scvVoid().value:return null;case v.xdr.ScValType.scvU64().value:case v.xdr.ScValType.scvI64().value:case v.xdr.ScValType.scvTimepoint().value:case v.xdr.ScValType.scvDuration().value:case v.xdr.ScValType.scvU128().value:case v.xdr.ScValType.scvI128().value:case v.xdr.ScValType.scvU256().value:case v.xdr.ScValType.scvI256().value:return(0,v.scValToBigInt)(Gt);case v.xdr.ScValType.scvVec().value:if(he===v.xdr.ScSpecType.scSpecTypeVec().value){var ve,me=be.vec();return((ve=Gt.vec())!==null&&ve!==void 0?ve:[]).map(function(Nt){return Le.scValToNative(Nt,me.elementType())})}if(he===v.xdr.ScSpecType.scSpecTypeTuple().value){var Ze,Er=be.tuple().valueTypes();return((Ze=Gt.vec())!==null&&Ze!==void 0?Ze:[]).map(function(Nt,wt){return Le.scValToNative(Nt,Er[wt])})}throw new TypeError("Type ".concat(be," was not vec, but ").concat(Gt," is"));case v.xdr.ScValType.scvAddress().value:return v.Address.fromScVal(Gt).toString();case v.xdr.ScValType.scvMap().value:var fr,F=(fr=Gt.map())!==null&&fr!==void 0?fr:[];if(he===v.xdr.ScSpecType.scSpecTypeMap().value){var nr=be.map(),Ur=nr.keyType(),rt=nr.valueType();return F.map(function(Nt){return[Le.scValToNative(Nt.key(),Ur),Le.scValToNative(Nt.val(),rt)]})}throw new TypeError("ScSpecType ".concat(De.name," was not map, but ").concat(JSON.stringify(Gt,null,2)," is"));case v.xdr.ScValType.scvBool().value:case v.xdr.ScValType.scvU32().value:case v.xdr.ScValType.scvI32().value:case v.xdr.ScValType.scvBytes().value:return Gt.value();case v.xdr.ScValType.scvString().value:case v.xdr.ScValType.scvSymbol().value:var ht;if(he!==v.xdr.ScSpecType.scSpecTypeString().value&&he!==v.xdr.ScSpecType.scSpecTypeSymbol().value)throw new Error("ScSpecType ".concat(De.name," was not string or symbol, but ").concat(JSON.stringify(Gt,null,2)," is"));return(ht=Gt.value())===null||ht===void 0?void 0:ht.toString();default:throw new TypeError("failed to convert ".concat(JSON.stringify(Gt,null,2)," to native type from type ").concat(De.name))}}},{key:"scValUdtToNative",value:function(Gt,be){var Le=this.findEntry(be.name().toString());switch(Le.switch()){case v.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():return this.enumToNative(Gt);case v.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.structToNative(Gt,Le.udtStructV0());case v.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.unionToNative(Gt,Le.udtUnionV0());default:throw new Error("failed to parse udt ".concat(be.name().toString(),": ").concat(Le))}}},{key:"unionToNative",value:function(Gt,be){var Le=this,De=Gt.vec();if(!De)throw new Error("".concat(JSON.stringify(Gt,null,2)," is not a vec"));if(De.length===0&&be.cases.length!==0)throw new Error("".concat(Gt," has length 0, but the there are at least one case in the union"));var he=De[0].sym().toString();if(De[0].switch().value!==v.xdr.ScValType.scvSymbol().value)throw new Error("".concat(De[0]," is not a symbol"));var ve=be.cases().find(function(Er){return function(fr){switch(fr.switch().value){case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:return fr.tupleCase().name().toString()===Er;case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:return fr.voidCase().name().toString()===Er;default:return!1}}}(he));if(!ve)throw new Error("failed to find entry ".concat(he," in union ").concat(be.name().toString()));var me={tag:he};if(ve.switch().value===v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value){var Ze=ve.tupleCase().type().map(function(Er,fr){return Le.scValToNative(De[fr+1],Er)});me.values=Ze}return me}},{key:"structToNative",value:function(Gt,be){var Le,De,he=this,ve={},me=be.fields();return me.some(so)?(De=Gt.vec())===null||De===void 0?void 0:De.map(function(Ze,Er){return he.scValToNative(Ze,me[Er].type())}):((Le=Gt.map())===null||Le===void 0||Le.forEach(function(Ze,Er){var fr=me[Er];ve[fr.name().toString()]=he.scValToNative(Ze.val(),fr.type())}),ve)}},{key:"enumToNative",value:function(Gt){if(Gt.switch().value!==v.xdr.ScValType.scvU32().value)throw new Error("Enum must have a u32 value");return Gt.u32()}},{key:"errorCases",value:function(){return this.entries.filter(function(Gt){return Gt.switch().value===v.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value}).flatMap(function(Gt){return Gt.value().cases()})}},{key:"jsonSchema",value:function(Gt){var be={};this.entries.forEach(function(De){switch(De.switch().value){case v.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value:var he=De.udtEnumV0();be[he.name().toString()]=function(nr){var Ur=nr.doc().toString(),rt=nr.cases(),ht=[];rt.forEach(function(wt){var Mt=wt.name().toString(),oe=wt.doc().toString();ht.push({description:oe,title:Mt,enum:[wt.value()],type:"number"})});var Nt={oneOf:ht};return Ur.length>0&&(Nt.description=Ur),Nt}(he);break;case v.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value:var ve=De.udtStructV0();be[ve.name().toString()]=function(nr){var Ur=nr.fields();if(Ur.some(so)){if(!Ur.every(so))throw new Error("mixed numeric and non-numeric field names are not allowed");return{type:"array",items:Ur.map(function(Nt,wt){return uo(Ur[wt].type())}),minItems:Ur.length,maxItems:Ur.length}}var rt=nr.doc().toString(),ht=ni(Ur);return{description:rt,properties:ht.properties,required:ht.required,additionalProperties:!1,type:"object"}}(ve);break;case v.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value:var me=De.udtUnionV0();be[me.name().toString()]=function(nr){var Ur=nr.doc().toString(),rt=nr.cases(),ht=[];rt.forEach(function(wt){switch(wt.switch().value){case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:var Mt=wt.voidCase().name().toString();ht.push({type:"object",title:Mt,properties:{tag:Mt},additionalProperties:!1,required:["tag"]});break;case v.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:var oe=wt.tupleCase(),qt=oe.name().toString();ht.push({type:"object",title:qt,properties:{tag:qt,values:{type:"array",items:oe.type().map(uo)}},required:["tag","values"],additionalProperties:!1})}});var Nt={oneOf:ht};return Ur.length>0&&(Nt.description=Ur),Nt}(me);break;case v.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value:var Ze=De.functionV0(),Er=Ze.name().toString(),fr=function(nr){var Ur=ni(nr.inputs()),rt=Ur.properties,ht=Ur.required,Nt={additionalProperties:!1,properties:rt,type:"object"};(ht==null?void 0:ht.length)>0&&(Nt.required=ht);var wt={properties:{args:Nt}},Mt=nr.outputs(),oe=Mt.length>0?uo(Mt[0]):uo(v.xdr.ScSpecTypeDef.scSpecTypeVoid()),qt=nr.doc().toString();return qt.length>0&&(wt.description=qt),wt.additionalProperties=!1,oe.additionalProperties=!1,{input:wt,output:oe}}(Ze),F=fr.input;be[Er]=F;case v.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value:}});var Le={$schema:"http://json-schema.org/draft-07/schema#",definitions:ur(ur({},Qo),be)};return Gt&&(Le.$ref="#/definitions/".concat(Gt)),Le}}],pe=[{key:"fromWasm",value:function(Gt){return new It((0,Qe.U)(Gt))}}],Zt&&rn(ct.prototype,Zt),pe&&rn(ct,pe),Object.defineProperty(ct,"prototype",{writable:!1}),ct;var ct,Zt,pe}(),Yr=l(4366),mn=l(8287).Buffer;function to(It){return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ct){return typeof ct}:function(ct){return ct&&typeof Symbol=="function"&&ct.constructor===Symbol&&ct!==Symbol.prototype?"symbol":typeof ct},to(It)}var Yo=["method"],co=["wasmHash","salt","format","fee","timeoutInSeconds","simulate"];function pn(){var It,ct,Zt=typeof Symbol=="function"?Symbol:{},pe=Zt.iterator||"@@iterator",Gt=Zt.toStringTag||"@@toStringTag";function be(fr,F,nr,Ur){var rt=F&&F.prototype instanceof De?F:De,ht=Object.create(rt.prototype);return jn(ht,"_invoke",function(Nt,wt,Mt){var oe,qt,de,fe=0,Fe=Mt||[],tr=!1,dr={p:0,n:0,v:It,a:yr,f:yr.bind(It,4),d:function(hr,qe){return oe=hr,qt=0,de=It,dr.n=qe,Le}};function yr(hr,qe){for(qt=hr,de=qe,ct=0;!tr&&fe&&!sr&&ct3?(sr=Nr===qe)&&(de=br[(qt=br[4])?5:(qt=3,3)],br[4]=br[5]=It):br[0]<=ar&&((sr=hr<2&&arqe||qe>Nr)&&(br[4]=hr,br[5]=qe,dr.n=Nr,qt=0))}if(sr||hr>1)return Le;throw tr=!0,qe}return function(hr,qe,sr){if(fe>1)throw TypeError("Generator is already running");for(tr&&qe===1&&yr(qe,sr),qt=qe,de=sr;(ct=qt<2?It:de)||!tr;){oe||(qt?qt<3?(qt>1&&(dr.n=-1),yr(qt,de)):dr.n=de:dr.v=de);try{if(fe=2,oe){if(qt||(hr="next"),ct=oe[hr]){if(!(ct=ct.call(oe,de)))throw TypeError("iterator result is not an object");if(!ct.done)return ct;de=ct.value,qt<2&&(qt=0)}else qt===1&&(ct=oe.return)&&ct.call(oe),qt<2&&(de=TypeError("The iterator does not provide a '"+hr+"' method"),qt=1);oe=It}else if((ct=(tr=dr.n<0)?de:Nt.call(wt,dr))!==Le)break}catch(br){oe=It,qt=1,de=br}finally{fe=1}}return{value:ct,done:tr}}}(fr,nr,Ur),!0),ht}var Le={};function De(){}function he(){}function ve(){}ct=Object.getPrototypeOf;var me=[][pe]?ct(ct([][pe]())):(jn(ct={},pe,function(){return this}),ct),Ze=ve.prototype=De.prototype=Object.create(me);function Er(fr){return Object.setPrototypeOf?Object.setPrototypeOf(fr,ve):(fr.__proto__=ve,jn(fr,Gt,"GeneratorFunction")),fr.prototype=Object.create(Ze),fr}return he.prototype=ve,jn(Ze,"constructor",ve),jn(ve,"constructor",he),he.displayName="GeneratorFunction",jn(ve,Gt,"GeneratorFunction"),jn(Ze),jn(Ze,Gt,"Generator"),jn(Ze,pe,function(){return this}),jn(Ze,"toString",function(){return"[object Generator]"}),(pn=function(){return{w:be,m:Er}})()}function jn(It,ct,Zt,pe){var Gt=Object.defineProperty;try{Gt({},"",{})}catch{Gt=0}jn=function(be,Le,De,he){function ve(me,Ze){jn(be,me,function(Er){return this._invoke(me,Ze,Er)})}Le?Gt?Gt(be,Le,{value:De,enumerable:!he,configurable:!he,writable:!he}):be[Le]=De:(ve("next",0),ve("throw",1),ve("return",2))},jn(It,ct,Zt,pe)}function Tn(It,ct){var Zt=Object.keys(It);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(It);ct&&(pe=pe.filter(function(Gt){return Object.getOwnPropertyDescriptor(It,Gt).enumerable})),Zt.push.apply(Zt,pe)}return Zt}function Xr(It){for(var ct=1;ct2&&me[2]!==void 0?me[2]:"hex",Zt&&Zt.rpcUrl){Ze.n=1;break}throw new TypeError("options must contain rpcUrl");case 1:return Gt=Zt.rpcUrl,be=Zt.allowHttp,Le=Zt.headers,De={allowHttp:be,headers:Le},he=new z.Server(Gt,De),Ze.n=2,he.getContractWasmByHash(ct,pe);case 2:return ve=Ze.v,Ze.a(2,kn.fromWasm(ve))}},It)})),Bo.apply(this,arguments)}var Ji=function(){function It(he,ve){var me=this;if(function(fr,F){if(!(fr instanceof F))throw new TypeError("Cannot call a class as a function")}(this,It),xn(this,"txFromJSON",function(fr){var F=JSON.parse(fr),nr=F.method,Ur=Wn(F,Yo);return X.fromJSON(Xr(Xr({},me.options),{},{method:nr,parseResultXdr:function(rt){return me.spec.funcResToNative(nr,rt)}}),Ur)}),xn(this,"txFromXDR",function(fr){return X.fromXDR(me.options,fr,me.spec)}),this.spec=he,this.options=ve,ve.server===void 0){var Ze=ve.allowHttp,Er=ve.headers;ve.server=new z.Server(ve.rpcUrl,{allowHttp:Ze,headers:Er})}this.spec.funcs().forEach(function(fr){var F=fr.name().toString();if(F!==Ui){var nr=function(Ur,rt){return X.build(Xr(Xr(Xr({method:F,args:Ur&&he.funcArgsToScVals(F,Ur)},ve),rt),{},{errorTypes:he.errorCases().reduce(function(ht,Nt){return Xr(Xr({},ht),{},xn({},Nt.value(),{message:Nt.doc().toString()}))},{}),parseResultXdr:function(ht){return he.funcResToNative(F,ht)}}))};me[(0,Yr.ff)(F)]=he.getFunc(F).inputs().length===0?function(Ur){return nr(void 0,Ur)}:nr}})}return ct=It,Zt=null,pe=[{key:"deploy",value:(De=pi(pn().m(function he(ve,me){var Ze,Er,fr,F,nr,Ur,rt,ht,Nt;return pn().w(function(wt){for(;;)switch(wt.n){case 0:return Ze=me.wasmHash,Er=me.salt,fr=me.format,F=me.fee,nr=me.timeoutInSeconds,Ur=me.simulate,rt=Wn(me,co),wt.n=1,Jo(Ze,rt,fr);case 1:return ht=wt.v,Nt=v.Operation.createCustomContract({address:new v.Address(me.address||me.publicKey),wasmHash:typeof Ze=="string"?mn.from(Ze,fr??"hex"):Ze,salt:Er,constructorArgs:ve?ht.funcArgsToScVals(Ui,ve):[]}),wt.a(2,X.buildWithOp(Nt,Xr(Xr({fee:F,timeoutInSeconds:nr,simulate:Ur},rt),{},{contractId:"ignored",method:Ui,parseResultXdr:function(Mt){return new It(ht,Xr(Xr({},rt),{},{contractId:v.Address.fromScVal(Mt).toString()}))}})))}},he)})),function(he,ve){return De.apply(this,arguments)})},{key:"fromWasmHash",value:(Le=pi(pn().m(function he(ve,me){var Ze,Er,fr,F,nr,Ur,rt,ht=arguments;return pn().w(function(Nt){for(;;)switch(Nt.n){case 0:if(Er=ht.length>2&&ht[2]!==void 0?ht[2]:"hex",me&&me.rpcUrl){Nt.n=1;break}throw new TypeError("options must contain rpcUrl");case 1:return fr=me.rpcUrl,F=me.allowHttp,nr=me.headers,Ur=(Ze=me.server)!==null&&Ze!==void 0?Ze:new z.Server(fr,{allowHttp:F,headers:nr}),Nt.n=2,Ur.getContractWasmByHash(ve,Er);case 2:return rt=Nt.v,Nt.a(2,It.fromWasm(rt,me))}},he)})),function(he,ve){return Le.apply(this,arguments)})},{key:"fromWasm",value:(be=pi(pn().m(function he(ve,me){var Ze;return pn().w(function(Er){for(;;)switch(Er.n){case 0:return Er.n=1,kn.fromWasm(ve);case 1:return Ze=Er.v,Er.a(2,new It(Ze,me))}},he)})),function(he,ve){return be.apply(this,arguments)})},{key:"from",value:(Gt=pi(pn().m(function he(ve){var me,Ze,Er,fr,F,nr;return pn().w(function(Ur){for(;;)switch(Ur.n){case 0:if(ve&&ve.rpcUrl&&ve.contractId){Ur.n=1;break}throw new TypeError("options must contain rpcUrl and contractId");case 1:return me=ve.rpcUrl,Ze=ve.contractId,Er=ve.allowHttp,fr=ve.headers,F=new z.Server(me,{allowHttp:Er,headers:fr}),Ur.n=2,F.getContractWasmByContractId(Ze);case 2:return nr=Ur.v,Ur.a(2,It.fromWasm(nr,ve))}},he)})),function(he){return Gt.apply(this,arguments)})}],Zt&&un(ct.prototype,Zt),pe&&un(ct,pe),Object.defineProperty(ct,"prototype",{writable:!1}),ct;var ct,Zt,pe,Gt,be,Le,De}()},9138(P,M,l){l.d(M,{c:()=>v,u:()=>z}),l(8950);var v=300,z="GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"},8302(P,M,l){l.d(M,{X8:()=>h,cF:()=>p,ns:()=>w,ph:()=>g,pp:()=>A,sU:()=>R});var v=l(8950),z=l(9138);function s(){var C,x,ot=typeof Symbol=="function"?Symbol:{},Q=ot.iterator||"@@iterator",V=ot.toStringTag||"@@toStringTag";function Y(c,N,G,tt){var Et=N&&N.prototype instanceof Ut?N:Ut,q=Object.create(Et.prototype);return E(q,"_invoke",function(Tt,Ft,vt){var bt,yt,dt,lt=0,xt=vt||[],Ot=!1,kt={p:0,n:0,v:C,a:Ct,f:Ct.bind(C,4),d:function(H,it){return bt=H,yt=0,dt=C,kt.n=it,ut}};function Ct(H,it){for(yt=H,dt=it,x=0;!Ot&<&&!mt&&x3?(mt=L===it)&&(dt=Dt[(yt=Dt[4])?5:(yt=3,3)],Dt[4]=Dt[5]=C):Dt[0]<=T&&((mt=H<2&&Tit||it>L)&&(Dt[4]=H,Dt[5]=it,kt.n=L,yt=0))}if(mt||H>1)return ut;throw Ot=!0,it}return function(H,it,mt){if(lt>1)throw TypeError("Generator is already running");for(Ot&&it===1&&Ct(it,mt),yt=it,dt=mt;(x=yt<2?C:dt)||!Ot;){bt||(yt?yt<3?(yt>1&&(kt.n=-1),Ct(yt,dt)):kt.n=dt:kt.v=dt);try{if(lt=2,bt){if(yt||(H="next"),x=bt[H]){if(!(x=x.call(bt,dt)))throw TypeError("iterator result is not an object");if(!x.done)return x;dt=x.value,yt<2&&(yt=0)}else yt===1&&(x=bt.return)&&x.call(bt),yt<2&&(dt=TypeError("The iterator does not provide a '"+H+"' method"),yt=1);bt=C}else if((x=(Ot=kt.n<0)?dt:Tt.call(Ft,kt))!==ut)break}catch(Dt){bt=C,yt=1,dt=Dt}finally{lt=1}}return{value:x,done:Ot}}}(c,G,tt),!0),q}var ut={};function Ut(){}function pt(){}function Bt(){}x=Object.getPrototypeOf;var Rt=[][Q]?x(x([][Q]())):(E(x={},Q,function(){return this}),x),J=Bt.prototype=Ut.prototype=Object.create(Rt);function At(c){return Object.setPrototypeOf?Object.setPrototypeOf(c,Bt):(c.__proto__=Bt,E(c,V,"GeneratorFunction")),c.prototype=Object.create(J),c}return pt.prototype=Bt,E(J,"constructor",Bt),E(Bt,"constructor",pt),pt.displayName="GeneratorFunction",E(Bt,V,"GeneratorFunction"),E(J),E(J,V,"Generator"),E(J,Q,function(){return this}),E(J,"toString",function(){return"[object Generator]"}),(s=function(){return{w:Y,m:At}})()}function E(C,x,ot,Q){var V=Object.defineProperty;try{V({},"",{})}catch{V=0}E=function(Y,ut,Ut,pt){function Bt(Rt,J){E(Y,Rt,function(At){return this._invoke(Rt,J,At)})}ut?V?V(Y,ut,{value:Ut,enumerable:!pt,configurable:!pt,writable:!pt}):Y[ut]=Ut:(Bt("next",0),Bt("throw",1),Bt("return",2))},E(C,x,ot,Q)}function k(C){return function(x){if(Array.isArray(x))return y(x)}(C)||function(x){if(typeof Symbol<"u"&&x[Symbol.iterator]!=null||x["@@iterator"]!=null)return Array.from(x)}(C)||function(x,ot){if(x){if(typeof x=="string")return y(x,ot);var Q={}.toString.call(x).slice(8,-1);return Q==="Object"&&x.constructor&&(Q=x.constructor.name),Q==="Map"||Q==="Set"?Array.from(x):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?y(x,ot):void 0}}(C)||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 y(C,x){(x==null||x>C.length)&&(x=C.length);for(var ot=0,Q=Array(x);ot3&&c[3]!==void 0?c[3]:1.5,Y=c.length>4&&c[4]!==void 0&&c[4],Ut=0,J=ut=[],N.n=1,x();case 1:if(J.push.call(J,N.v),ot(ut[ut.length-1])){N.n=2;break}return N.a(2,ut);case 2:pt=new Date(Date.now()+1e3*Q).valueOf(),Rt=Bt=1e3;case 3:if(!(Date.now()pt&&(Bt=pt-Date.now(),Y&&console.info("was gonna wait too long; new waitTime: ".concat(Bt,"ms"))),Rt=Bt+Rt,At=ut,N.n=5,x(ut[ut.length-1]);case 5:At.push.call(At,N.v),Y&&ot(ut[ut.length-1])&&console.info("".concat(Ut,". Called ").concat(x,"; ").concat(ut.length," prev attempts. Most recent: ").concat(JSON.stringify(ut[ut.length-1],null,2))),N.n=3;break;case 6:return N.a(2,ut)}},C)})),f.apply(this,arguments)}var h=/Error\(Contract, #(\d+)\)/;function A(C){return O(C)==="object"&&C!==null&&"toString"in C}function g(C){var x=new Map,ot=C.buffer.slice(C.byteOffset,C.byteOffset+C.byteLength),Q=0,V=function(c){if(Q+c>C.byteLength)throw new Error("Buffer overflow");var N=new Uint8Array(ot,Q,c);return Q+=c,N};function Y(){for(var c=0,N=0;;){var G=V(1)[0];if(c|=(127&G)<=32)throw new Error("Invalid WASM value")}return c>>>0}if(k(V(4)).join()!=="0,97,115,109")throw new Error("Invalid WASM magic");if(k(V(4)).join()!=="1,0,0,0")throw new Error("Invalid WASM version");for(;Q0&&Q+Bt<=pt+Ut){var Rt=V(Bt),J=V(Ut-(Q-pt));try{var At=new TextDecoder("utf-8",{fatal:!0}).decode(Rt);J.length>0&&x.set(At,(x.get(At)||[]).concat(J))}catch{}}}Q=pt+Ut}return x}function w(C){for(var x=new v.cereal.XdrReader(C),ot=[];!x.eof;)ot.push(v.xdr.ScSpecEntry.read(x));return ot}function R(C,x){return S.apply(this,arguments)}function S(){return(S=m(s().m(function C(x,ot){return s().w(function(Q){for(;;)if(Q.n===0)return Q.a(2,x.publicKey?ot.getAccount(x.publicKey):new v.Account(z.u,"0"))},C)}))).apply(this,arguments)}},8451(P,M,l){l.d(M,{U:()=>s});var v=l(8302),z=l(8287).Buffer;function s(E){var k=(0,v.ph)(E).get("contractspecv0");if(!k||k.length===0)throw new Error("Could not obtain contract spec from wasm");return z.from(k[0])}},5976(P,M,l){function v(lt){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xt){return typeof xt}:function(xt){return xt&&typeof Symbol=="function"&&xt.constructor===Symbol&&xt!==Symbol.prototype?"symbol":typeof xt},v(lt)}function z(lt,xt){for(var Ot=0;Otdt,v7:()=>Ut,nS:()=>G,Dr:()=>m,m_:()=>S});var m=function(lt){function xt(H,it){var mt;return function(Dt,T){if(!(Dt instanceof T))throw new TypeError("Cannot call a class as a function")}(this,xt),(mt=E(this,xt,[H])).response=it,mt}return function(H,it){if(typeof it!="function"&&it!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(it&&it.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),it&&O(H,it)}(xt,lt),Ot=xt,(kt=[{key:"getResponse",value:function(){return this.response}}])&&z(Ot.prototype,kt),Ct&&z(Ot,Ct),Object.defineProperty(Ot,"prototype",{writable:!1}),Ot;var Ot,kt,Ct}(k(Error));function p(lt){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(xt){return typeof xt}:function(xt){return xt&&typeof Symbol=="function"&&xt.constructor===Symbol&&xt!==Symbol.prototype?"symbol":typeof xt},p(lt)}function f(lt,xt){for(var Ot=0;Ot{},FEDERATION_RESPONSE_MAX_SIZE:()=>C,Server:()=>x});var v=l(8950),z=l(4193),s=l.n(z),E=l(8732),k=l(5976),y=l(3898),O=l(9983);function u(ot){if(!/^(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)*[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?::\d+)?$/.test(ot))throw new Error("The provided domain is invalid. Ensure that the domain adheres to RFC 1035")}function m(ot){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},m(ot)}function p(ot,Q){return function(V){if(Array.isArray(V))return V}(ot)||function(V,Y){var ut=V==null?null:typeof Symbol<"u"&&V[Symbol.iterator]||V["@@iterator"];if(ut!=null){var Ut,pt,Bt,Rt,J=[],At=!0,c=!1;try{if(Bt=(ut=ut.call(V)).next,Y!==0)for(;!(At=(Ut=Bt.call(ut)).done)&&(J.push(Ut.value),J.length!==Y);At=!0);}catch(N){c=!0,pt=N}finally{try{if(!At&&ut.return!=null&&(Rt=ut.return(),Object(Rt)!==Rt))return}finally{if(c)throw pt}}return J}}(ot,Q)||function(V,Y){if(V){if(typeof V=="string")return f(V,Y);var ut={}.toString.call(V).slice(8,-1);return ut==="Object"&&V.constructor&&(ut=V.constructor.name),ut==="Map"||ut==="Set"?Array.from(V):ut==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ut)?f(V,Y):void 0}}(ot,Q)||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 f(ot,Q){(Q==null||Q>ot.length)&&(Q=ot.length);for(var V=0,Y=Array(Q);V3?(T=St===Dt)&&(xt=L[(lt=L[4])?5:(lt=3,3)],L[4]=L[5]=ot):L[0]<=$&&((T=mt<2&&$Dt||Dt>St)&&(L[4]=mt,L[5]=Dt,H.n=St,lt=0))}if(T||mt>1)return pt;throw Ct=!0,Dt}return function(mt,Dt,T){if(Ot>1)throw TypeError("Generator is already running");for(Ct&&Dt===1&&it(Dt,T),lt=Dt,xt=T;(Q=lt<2?ot:xt)||!Ct;){dt||(lt?lt<3?(lt>1&&(H.n=-1),it(lt,xt)):H.n=xt:H.v=xt);try{if(Ot=2,dt){if(lt||(mt="next"),Q=dt[mt]){if(!(Q=Q.call(dt,xt)))throw TypeError("iterator result is not an object");if(!Q.done)return Q;xt=Q.value,lt<2&&(lt=0)}else lt===1&&(Q=dt.return)&&Q.call(dt),lt<2&&(xt=TypeError("The iterator does not provide a '"+mt+"' method"),lt=1);dt=ot}else if((Q=(Ct=H.n<0)?xt:vt.call(bt,H))!==pt)break}catch(L){dt=ot,lt=1,xt=L}finally{Ot=1}}return{value:Q,done:Ct}}}(G,Et,q),!0),Ft}var pt={};function Bt(){}function Rt(){}function J(){}Q=Object.getPrototypeOf;var At=[][Y]?Q(Q([][Y]())):(A(Q={},Y,function(){return this}),Q),c=J.prototype=Bt.prototype=Object.create(At);function N(G){return Object.setPrototypeOf?Object.setPrototypeOf(G,J):(G.__proto__=J,A(G,ut,"GeneratorFunction")),G.prototype=Object.create(c),G}return Rt.prototype=J,A(c,"constructor",J),A(J,"constructor",Rt),Rt.displayName="GeneratorFunction",A(J,ut,"GeneratorFunction"),A(c),A(c,ut,"Generator"),A(c,Y,function(){return this}),A(c,"toString",function(){return"[object Generator]"}),(h=function(){return{w:Ut,m:N}})()}function A(ot,Q,V,Y){var ut=Object.defineProperty;try{ut({},"",{})}catch{ut=0}A=function(Ut,pt,Bt,Rt){function J(At,c){A(Ut,At,function(N){return this._invoke(At,c,N)})}pt?ut?ut(Ut,pt,{value:Bt,enumerable:!Rt,configurable:!Rt,writable:!Rt}):Ut[pt]=Bt:(J("next",0),J("throw",1),J("return",2))},A(ot,Q,V,Y)}function g(ot,Q,V,Y,ut,Ut,pt){try{var Bt=ot[Ut](pt),Rt=Bt.value}catch(J){return void V(J)}Bt.done?Q(Rt):Promise.resolve(Rt).then(Y,ut)}function w(ot){return function(){var Q=this,V=arguments;return new Promise(function(Y,ut){var Ut=ot.apply(Q,V);function pt(Rt){g(Ut,Y,ut,pt,Bt,"next",Rt)}function Bt(Rt){g(Ut,Y,ut,pt,Bt,"throw",Rt)}pt(void 0)})}}function R(ot,Q){for(var V=0;V2&&arguments[2]!==void 0?arguments[2]:{};(function(tt,Et){if(!(tt instanceof Et))throw new TypeError("Cannot call a class as a function")})(this,ot),this.serverURL=s()(At),this.domain=c,u(c);var G=N.allowHttp===void 0?E.T.isAllowHttp():N.allowHttp;if(this.timeout=N.timeout===void 0?E.T.getTimeout():N.timeout,this.serverURL.protocol()!=="https"&&!G)throw new Error("Cannot connect to insecure federation server")}return Q=ot,V=[{key:"resolveAddress",value:(J=w(h().m(function At(c){var N,G;return h().w(function(tt){for(;;)switch(tt.n){case 0:if(N=c,!(c.indexOf("*")<0)){tt.n=2;break}if(this.domain){tt.n=1;break}return tt.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:N="".concat(c,"*").concat(this.domain);case 2:return G=this.serverURL.clone().query({type:"name",q:N}),tt.a(2,this._sendRequest(G))}},At,this)})),function(At){return J.apply(this,arguments)})},{key:"resolveAccountId",value:(Rt=w(h().m(function At(c){var N;return h().w(function(G){for(;;)if(G.n===0)return N=this.serverURL.clone().query({type:"id",q:c}),G.a(2,this._sendRequest(N))},At,this)})),function(At){return Rt.apply(this,arguments)})},{key:"resolveTransactionId",value:(Bt=w(h().m(function At(c){var N;return h().w(function(G){for(;;)if(G.n===0)return N=this.serverURL.clone().query({type:"txid",q:c}),G.a(2,this._sendRequest(N))},At,this)})),function(At){return Bt.apply(this,arguments)})},{key:"_sendRequest",value:(pt=w(h().m(function At(c){var N;return h().w(function(G){for(;;)if(G.n===0)return N=this.timeout,G.a(2,O.ok.get(c.toString(),{maxContentLength:C,timeout:N}).then(function(tt){if(tt.data.memo!==void 0&&typeof tt.data.memo!="string")throw new Error("memo value should be of type string");return tt.data}).catch(function(tt){if(tt instanceof Error){if(tt.message.match(/^maxContentLength size/))throw new Error("federation response exceeds allowed size of ".concat(C));return Promise.reject(tt)}return Promise.reject(new k.nS("Server query failed. Server responded: ".concat(tt.status," ").concat(tt.statusText),tt.data))}))},At,this)})),function(At){return pt.apply(this,arguments)})}],Y=[{key:"resolve",value:(Ut=w(h().m(function At(c){var N,G,tt,Et,q,Tt=arguments;return h().w(function(Ft){for(;;)switch(Ft.n){case 0:if(N=Tt.length>1&&Tt[1]!==void 0?Tt[1]:{},!(c.indexOf("*")<0)){Ft.n=2;break}if(v.StrKey.isValidEd25519PublicKey(c)){Ft.n=1;break}return Ft.a(2,Promise.reject(new Error("Invalid Account ID")));case 1:return Ft.a(2,Promise.resolve({account_id:c}));case 2:if(G=c.split("*"),tt=p(G,2),Et=tt[1],G.length===2&&Et){Ft.n=3;break}return Ft.a(2,Promise.reject(new Error("Invalid Stellar address")));case 3:return Ft.n=4,ot.createForDomain(Et,N);case 4:return q=Ft.v,Ft.a(2,q.resolveAddress(c))}},At)})),function(At){return Ut.apply(this,arguments)})},{key:"createForDomain",value:(ut=w(h().m(function At(c){var N,G,tt=arguments;return h().w(function(Et){for(;;)switch(Et.n){case 0:return N=tt.length>1&&tt[1]!==void 0?tt[1]:{},u(c),Et.n=1,y.Resolver.resolve(c,N);case 1:if((G=Et.v).FEDERATION_SERVER){Et.n=2;break}return Et.a(2,Promise.reject(new Error("stellar.toml does not contain FEDERATION_SERVER field")));case 2:return Et.a(2,new ot(G.FEDERATION_SERVER,c,N))}},At)})),function(At){return ut.apply(this,arguments)})}],V&&R(Q.prototype,V),Y&&R(Q,Y),Object.defineProperty(Q,"prototype",{writable:!1}),Q;var Q,V,Y,ut,Ut,pt,Bt,Rt,J}()},8242(P,M,l){l.r(M),l.d(M,{Api:()=>{}})},8733(P,M,l){var v;l.r(M),l.d(M,{AccountResponse:()=>f,HorizonApi:()=>v,SERVER_TIME_MAP:()=>lt,Server:()=>Yu,ServerApi:()=>s,default:()=>$a,getCurrentServerTime:()=>Ot}),function(nt){var B=function(_t){return _t.constantProduct="constant_product",_t}({});nt.LiquidityPoolType=B;var j=function(_t){return _t.createAccount="create_account",_t.payment="payment",_t.pathPayment="path_payment_strict_receive",_t.createPassiveOffer="create_passive_sell_offer",_t.manageOffer="manage_sell_offer",_t.setOptions="set_options",_t.changeTrust="change_trust",_t.allowTrust="allow_trust",_t.accountMerge="account_merge",_t.inflation="inflation",_t.manageData="manage_data",_t.bumpSequence="bump_sequence",_t.manageBuyOffer="manage_buy_offer",_t.pathPaymentStrictSend="path_payment_strict_send",_t.createClaimableBalance="create_claimable_balance",_t.claimClaimableBalance="claim_claimable_balance",_t.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",_t.endSponsoringFutureReserves="end_sponsoring_future_reserves",_t.revokeSponsorship="revoke_sponsorship",_t.clawback="clawback",_t.clawbackClaimableBalance="clawback_claimable_balance",_t.setTrustLineFlags="set_trust_line_flags",_t.liquidityPoolDeposit="liquidity_pool_deposit",_t.liquidityPoolWithdraw="liquidity_pool_withdraw",_t.invokeHostFunction="invoke_host_function",_t.bumpFootprintExpiration="bump_footprint_expiration",_t.restoreFootprint="restore_footprint",_t}({});nt.OperationResponseType=j;var K=function(_t){return _t[_t.createAccount=0]="createAccount",_t[_t.payment=1]="payment",_t[_t.pathPayment=2]="pathPayment",_t[_t.createPassiveOffer=3]="createPassiveOffer",_t[_t.manageOffer=4]="manageOffer",_t[_t.setOptions=5]="setOptions",_t[_t.changeTrust=6]="changeTrust",_t[_t.allowTrust=7]="allowTrust",_t[_t.accountMerge=8]="accountMerge",_t[_t.inflation=9]="inflation",_t[_t.manageData=10]="manageData",_t[_t.bumpSequence=11]="bumpSequence",_t[_t.manageBuyOffer=12]="manageBuyOffer",_t[_t.pathPaymentStrictSend=13]="pathPaymentStrictSend",_t[_t.createClaimableBalance=14]="createClaimableBalance",_t[_t.claimClaimableBalance=15]="claimClaimableBalance",_t[_t.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",_t[_t.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",_t[_t.revokeSponsorship=18]="revokeSponsorship",_t[_t.clawback=19]="clawback",_t[_t.clawbackClaimableBalance=20]="clawbackClaimableBalance",_t[_t.setTrustLineFlags=21]="setTrustLineFlags",_t[_t.liquidityPoolDeposit=22]="liquidityPoolDeposit",_t[_t.liquidityPoolWithdraw=23]="liquidityPoolWithdraw",_t[_t.invokeHostFunction=24]="invokeHostFunction",_t[_t.bumpFootprintExpiration=25]="bumpFootprintExpiration",_t[_t.restoreFootprint=26]="restoreFootprint",_t}({});nt.OperationResponseTypeI=K;var jt=function(_t){return _t.TX_FAILED="tx_failed",_t.TX_BAD_SEQ="tx_bad_seq",_t.TX_BAD_AUTH="tx_bad_auth",_t.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra",_t.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",_t.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",_t.TX_NOT_SUPPORTED="tx_not_supported",_t.TX_SUCCESS="tx_success",_t.TX_TOO_EARLY="tx_too_early",_t.TX_TOO_LATE="tx_too_late",_t.TX_MISSING_OPERATION="tx_missing_operation",_t.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",_t.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",_t.TX_INSUFFICIENT_FEE="tx_insufficient_fee",_t.TX_INTERNAL_ERROR="tx_internal_error",_t}({});nt.TransactionFailedResultCodes=jt}(v||(v={}));var z,s,E=((z={})[z.account_created=0]="account_created",z[z.account_removed=1]="account_removed",z[z.account_credited=2]="account_credited",z[z.account_debited=3]="account_debited",z[z.account_thresholds_updated=4]="account_thresholds_updated",z[z.account_home_domain_updated=5]="account_home_domain_updated",z[z.account_flags_updated=6]="account_flags_updated",z[z.account_inflation_destination_updated=7]="account_inflation_destination_updated",z[z.signer_created=10]="signer_created",z[z.signer_removed=11]="signer_removed",z[z.signer_updated=12]="signer_updated",z[z.trustline_created=20]="trustline_created",z[z.trustline_removed=21]="trustline_removed",z[z.trustline_updated=22]="trustline_updated",z[z.trustline_authorized=23]="trustline_authorized",z[z.trustline_deauthorized=24]="trustline_deauthorized",z[z.trustline_authorized_to_maintain_liabilities=25]="trustline_authorized_to_maintain_liabilities",z[z.trustline_flags_updated=26]="trustline_flags_updated",z[z.offer_created=30]="offer_created",z[z.offer_removed=31]="offer_removed",z[z.offer_updated=32]="offer_updated",z[z.trade=33]="trade",z[z.data_created=40]="data_created",z[z.data_removed=41]="data_removed",z[z.data_updated=42]="data_updated",z[z.sequence_bumped=43]="sequence_bumped",z[z.claimable_balance_created=50]="claimable_balance_created",z[z.claimable_balance_claimant_created=51]="claimable_balance_claimant_created",z[z.claimable_balance_claimed=52]="claimable_balance_claimed",z[z.account_sponsorship_created=60]="account_sponsorship_created",z[z.account_sponsorship_updated=61]="account_sponsorship_updated",z[z.account_sponsorship_removed=62]="account_sponsorship_removed",z[z.trustline_sponsorship_created=63]="trustline_sponsorship_created",z[z.trustline_sponsorship_updated=64]="trustline_sponsorship_updated",z[z.trustline_sponsorship_removed=65]="trustline_sponsorship_removed",z[z.data_sponsorship_created=66]="data_sponsorship_created",z[z.data_sponsorship_updated=67]="data_sponsorship_updated",z[z.data_sponsorship_removed=68]="data_sponsorship_removed",z[z.claimable_balance_sponsorship_created=69]="claimable_balance_sponsorship_created",z[z.claimable_balance_sponsorship_updated=70]="claimable_balance_sponsorship_updated",z[z.claimable_balance_sponsorship_removed=71]="claimable_balance_sponsorship_removed",z[z.signer_sponsorship_created=72]="signer_sponsorship_created",z[z.signer_sponsorship_updated=73]="signer_sponsorship_updated",z[z.signer_sponsorship_removed=74]="signer_sponsorship_removed",z[z.claimable_balance_clawed_back=80]="claimable_balance_clawed_back",z[z.liquidity_pool_deposited=90]="liquidity_pool_deposited",z[z.liquidity_pool_withdrew=91]="liquidity_pool_withdrew",z[z.liquidity_pool_trade=92]="liquidity_pool_trade",z[z.liquidity_pool_created=93]="liquidity_pool_created",z[z.liquidity_pool_removed=94]="liquidity_pool_removed",z[z.liquidity_pool_revoked=95]="liquidity_pool_revoked",z[z.contract_credited=96]="contract_credited",z[z.contract_debited=97]="contract_debited",z);(function(nt){nt.EffectType=E;var B=function(j){return j.all="all",j.liquidityPools="liquidity_pool",j.orderbook="orderbook",j}({});nt.TradeType=B,v.OperationResponseType,v.OperationResponseTypeI})(s||(s={}));var k=l(8950);function y(nt){return y=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},y(nt)}function O(nt,B){for(var j=0;j0||nt===B?B:B-1}function ut(nt){for(var B,j,K=1,jt=nt.length,_t=nt[0]+"";KFr^j?1:-1;for(mr=(pr=jt.length)<(Fr=_t.length)?pr:Fr,er=0;er_t[er]^j?1:-1;return pr==Fr?0:pr>Fr^j?1:-1}function pt(nt,B,j,K){if(ntj||nt!==g(nt))throw Error(w+(K||"Argument")+(typeof nt=="number"?ntj?" out of range: ":" not an integer: ":" not a primitive number: ")+String(nt))}function Bt(nt){var B=nt.c.length-1;return Y(nt.e/C)==B&&nt.c[B]%2!=0}function Rt(nt,B){return(nt.length>1?nt.charAt(0)+"."+nt.slice(1):nt)+(B<0?"e":"e+")+B}function J(nt,B,j){var K,jt;if(B<0){for(jt=j+".";++B;jt+=j);nt=jt+nt}else if(++B>(K=nt.length)){for(jt=j,B-=K;--B;jt+=j);nt+=jt}else Bvo?He.c=He.e=null:zt.e=10;Ve/=10,Re++);return void(Re>vo?He.c=He.e=null:(He.e=Re,He.c=[zt]))}or=String(zt)}else{if(!h.test(or=String(zt)))return jt(He,or,Ie);He.s=or.charCodeAt(0)==45?(or=or.slice(1),-1):1}(Re=or.indexOf("."))>-1&&(or=or.replace(".","")),(Ve=or.search(/e/i))>0?(Re<0&&(Re=Ve),Re+=+or.slice(Ve+1),or=or.substring(0,Ve)):Re<0&&(Re=or.length)}else{if(pt($t,2,En.length,"Base"),$t==10&&Vo)return on(He=new Ar(zt),Kn+He.e+1,Fn);if(or=String(zt),Ie=typeof zt=="number"){if(0*zt!=0)return jt(He,or,Ie,$t);if(He.s=1/zt<0?(or=or.slice(1),-1):1,Ar.DEBUG&&or.replace(/^0\.0*|\./,"").length>15)throw Error(R+zt)}else He.s=or.charCodeAt(0)===45?(or=or.slice(1),-1):1;for(ge=En.slice(0,$t),Re=Ve=0,Ke=or.length;VeRe){Re=Ke;continue}}else if(!Te&&(or==or.toUpperCase()&&(or=or.toLowerCase())||or==or.toLowerCase()&&(or=or.toUpperCase()))){Te=!0,Ve=-1,Re=0;continue}return jt(He,String(zt),Ie,$t)}Ie=!1,(Re=(or=K(or,$t,10,He.s)).indexOf("."))>-1?or=or.replace(".",""):Re=or.length}for(Ve=0;or.charCodeAt(Ve)===48;Ve++);for(Ke=or.length;or.charCodeAt(--Ke)===48;);if(or=or.slice(Ve,++Ke)){if(Ke-=Ve,Ie&&Ar.DEBUG&&Ke>15&&(zt>x||zt!==g(zt)))throw Error(R+He.s*zt);if((Re=Re-Ve-1)>vo)He.c=He.e=null;else if(Re=Mo)?Rt(Ke,Ve):J(Ke,Ve,"0");else if(Re=(zt=on(new Ar(zt),$t,ge)).e,Ie=(Ke=ut(zt.c)).length,Me==1||Me==2&&($t<=Re||Re<=Uo)){for(;Ie<$t;Ke+="0",Ie++);Ke=Rt(Ke,Re)}else if($t-=Ve+(Me===2&&Re>Ve),Ke=J(Ke,Re,"0"),Re+1>Ie){if(--$t>0)for(Ke+=".";$t--;Ke+="0");}else if(($t+=Re-Ie)>0)for(Re+1==Ie&&(Ke+=".");$t--;Ke+="0");return zt.s<0&&Te?"-"+Ke:Ke}function Qn(zt,$t){for(var ge,Me,Te=1,Re=new Ar(zt[0]);Te=10;Te/=10,Me++);return(ge=Me+ge*C-1)>vo?zt.c=zt.e=null:ge=10;Ie/=10,Te++);if((Re=$t-Te)<0)Re+=C,Ve=$t,Ke=Vr[or=0],He=g(Ke/Jr[Te-Ve-1]%10);else if((or=A((Re+1)/C))>=Vr.length){if(!Me)break t;for(;Vr.length<=or;Vr.push(0));Ke=He=0,Te=1,Ve=(Re%=C)-C+1}else{for(Ke=Ie=Vr[or],Te=1;Ie>=10;Ie/=10,Te++);He=(Ve=(Re%=C)-C+Te)<0?0:g(Ke/Jr[Te-Ve-1]%10)}if(Me=Me||$t<0||Vr[or+1]!=null||(Ve<0?Ke:Ke%Jr[Te-Ve-1]),Me=ge<4?(He||Me)&&(ge==0||ge==(zt.s<0?3:2)):He>5||He==5&&(ge==4||Me||ge==6&&(Re>0?Ve>0?Ke/Jr[Te-Ve]:0:Vr[or-1])%10&1||ge==(zt.s<0?8:7)),$t<1||!Vr[0])return Vr.length=0,Me?($t-=zt.e+1,Vr[0]=Jr[(C-$t%C)%C],zt.e=-$t||0):Vr[0]=zt.e=0,zt;if(Re==0?(Vr.length=or,Ie=1,or--):(Vr.length=or+1,Ie=Jr[C-Re],Vr[or]=Ve>0?g(Ke/Jr[Te-Ve]%Jr[Ve])*Ie:0),Me)for(;;){if(or==0){for(Re=1,Ve=Vr[0];Ve>=10;Ve/=10,Re++);for(Ve=Vr[0]+=Ie,Ie=1;Ve>=10;Ve/=10,Ie++);Re!=Ie&&(zt.e++,Vr[0]==S&&(Vr[0]=1));break}if(Vr[or]+=Ie,Vr[or]!=S)break;Vr[or--]=0,Ie=1}for(Re=Vr.length;Vr[--Re]===0;Vr.pop());}zt.e>vo?zt.c=zt.e=null:zt.e=Mo?Rt($t,ge):J($t,ge,"0"),zt.s<0?"-"+$t:$t)}return Ar.clone=nt,Ar.ROUND_UP=0,Ar.ROUND_DOWN=1,Ar.ROUND_CEIL=2,Ar.ROUND_FLOOR=3,Ar.ROUND_HALF_UP=4,Ar.ROUND_HALF_DOWN=5,Ar.ROUND_HALF_EVEN=6,Ar.ROUND_HALF_CEIL=7,Ar.ROUND_HALF_FLOOR=8,Ar.EUCLID=9,Ar.config=Ar.set=function(zt){var $t,ge;if(zt!=null){if(typeof zt!="object")throw Error(w+"Object expected: "+zt);if(zt.hasOwnProperty($t="DECIMAL_PLACES")&&(pt(ge=zt[$t],0,V,$t),Kn=ge),zt.hasOwnProperty($t="ROUNDING_MODE")&&(pt(ge=zt[$t],0,8,$t),Fn=ge),zt.hasOwnProperty($t="EXPONENTIAL_AT")&&((ge=zt[$t])&&ge.pop?(pt(ge[0],-V,0,$t),pt(ge[1],0,V,$t),Uo=ge[0],Mo=ge[1]):(pt(ge,-V,V,$t),Uo=-(Mo=ge<0?-ge:ge))),zt.hasOwnProperty($t="RANGE"))if((ge=zt[$t])&&ge.pop)pt(ge[0],-V,-1,$t),pt(ge[1],1,V,$t),Dn=ge[0],vo=ge[1];else{if(pt(ge,-V,V,$t),!ge)throw Error(w+$t+" cannot be zero: "+ge);Dn=-(vo=ge<0?-ge:ge)}if(zt.hasOwnProperty($t="CRYPTO")){if((ge=zt[$t])!==!!ge)throw Error(w+$t+" not true or false: "+ge);if(ge){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Ko=!ge,Error(w+"crypto unavailable");Ko=ge}else Ko=ge}if(zt.hasOwnProperty($t="MODULO_MODE")&&(pt(ge=zt[$t],0,9,$t),bo=ge),zt.hasOwnProperty($t="POW_PRECISION")&&(pt(ge=zt[$t],0,V,$t),Nn=ge),zt.hasOwnProperty($t="FORMAT")){if(typeof(ge=zt[$t])!="object")throw Error(w+$t+" not an object: "+ge);an=ge}if(zt.hasOwnProperty($t="ALPHABET")){if(typeof(ge=zt[$t])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(ge))throw Error(w+$t+" invalid: "+ge);Vo=ge.slice(0,10)=="0123456789",En=ge}}return{DECIMAL_PLACES:Kn,ROUNDING_MODE:Fn,EXPONENTIAL_AT:[Uo,Mo],RANGE:[Dn,vo],CRYPTO:Ko,MODULO_MODE:bo,POW_PRECISION:Nn,FORMAT:an,ALPHABET:En}},Ar.isBigNumber=function(zt){if(!zt||zt._isBigNumber!==!0)return!1;if(!Ar.DEBUG)return!0;var $t,ge,Me=zt.c,Te=zt.e,Re=zt.s;t:if({}.toString.call(Me)=="[object Array]"){if((Re===1||Re===-1)&&Te>=-V&&Te<=V&&Te===g(Te)){if(Me[0]===0){if(Te===0&&Me.length===1)return!0;break t}if(($t=(Te+1)%C)<1&&($t+=C),String(Me[0]).length==$t){for($t=0;$t=S||ge!==g(ge))break t;if(ge!==0)return!0}}}else if(Me===null&&Te===null&&(Re===null||Re===1||Re===-1))return!0;throw Error(w+"Invalid BigNumber: "+zt)},Ar.maximum=Ar.max=function(){return Qn(arguments,-1)},Ar.minimum=Ar.min=function(){return Qn(arguments,1)},Ar.random=(_t=9007199254740992,er=Math.random()*_t&2097151?function(){return g(Math.random()*_t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(zt){var $t,ge,Me,Te,Re,Ve=0,Ie=[],Ke=new Ar(Rn);if(zt==null?zt=Kn:pt(zt,0,V),Te=A(zt/C),Ko)if(crypto.getRandomValues){for($t=crypto.getRandomValues(new Uint32Array(Te*=2));Ve>>11))>=9e15?(ge=crypto.getRandomValues(new Uint32Array(2)),$t[Ve]=ge[0],$t[Ve+1]=ge[1]):(Ie.push(Re%1e14),Ve+=2);Ve=Te/2}else{if(!crypto.randomBytes)throw Ko=!1,Error(w+"crypto unavailable");for($t=crypto.randomBytes(Te*=7);Ve=9e15?crypto.randomBytes(7).copy($t,Ve):(Ie.push(Re%1e14),Ve+=7);Ve=Te/7}if(!Ko)for(;Ve=10;Re/=10,Ve++);VeTe-1&&(Ke[Ve+1]==null&&(Ke[Ve+1]=0),Ke[Ve+1]+=Ke[Ve]/Te|0,Ke[Ve]%=Te)}return Ke.reverse()}return function(ge,Me,Te,Re,Ve){var Ie,Ke,or,He,Vr,Jr,sn,Un,no=ge.indexOf("."),wo=Kn,On=Fn;for(no>=0&&(He=Nn,Nn=0,ge=ge.replace(".",""),Jr=(Un=new Ar(Me)).pow(ge.length-no),Nn=He,Un.c=$t(J(ut(Jr.c),Jr.e,"0"),10,Te,zt),Un.e=Un.c.length),or=He=(sn=$t(ge,Me,Te,Ve?(Ie=En,zt):(Ie=zt,En))).length;sn[--He]==0;sn.pop());if(!sn[0])return Ie.charAt(0);if(no<0?--or:(Jr.c=sn,Jr.e=or,Jr.s=Re,sn=(Jr=j(Jr,Un,wo,On,Te)).c,Vr=Jr.r,or=Jr.e),no=sn[Ke=or+wo+1],He=Te/2,Vr=Vr||Ke<0||sn[Ke+1]!=null,Vr=On<4?(no!=null||Vr)&&(On==0||On==(Jr.s<0?3:2)):no>He||no==He&&(On==4||Vr||On==6&&1&sn[Ke-1]||On==(Jr.s<0?8:7)),Ke<1||!sn[0])ge=Vr?J(Ie.charAt(1),-wo,Ie.charAt(0)):Ie.charAt(0);else{if(sn.length=Ke,Vr)for(--Te;++sn[--Ke]>Te;)sn[Ke]=0,Ke||(++or,sn=[1].concat(sn));for(He=sn.length;!sn[--He];);for(no=0,ge="";no<=He;ge+=Ie.charAt(sn[no++]));ge=J(ge,or,Ie.charAt(0))}return ge}}(),j=function(){function zt(Me,Te,Re){var Ve,Ie,Ke,or,He=0,Vr=Me.length,Jr=Te%Q,sn=Te/Q|0;for(Me=Me.slice();Vr--;)He=((Ie=Jr*(Ke=Me[Vr]%Q)+(Ve=sn*Ke+(or=Me[Vr]/Q|0)*Jr)%Q*Q+He)/Re|0)+(Ve/Q|0)+sn*or,Me[Vr]=Ie%Re;return He&&(Me=[He].concat(Me)),Me}function $t(Me,Te,Re,Ve){var Ie,Ke;if(Re!=Ve)Ke=Re>Ve?1:-1;else for(Ie=Ke=0;IeTe[Ie]?1:-1;break}return Ke}function ge(Me,Te,Re,Ve){for(var Ie=0;Re--;)Me[Re]-=Ie,Ie=Me[Re]1;Me.splice(0,1));}return function(Me,Te,Re,Ve,Ie){var Ke,or,He,Vr,Jr,sn,Un,no,wo,On,Gn,So,ps,Xs,Ks,Oi,ea,ai=Me.s==Te.s?1:-1,zo=Me.c,Yn=Te.c;if(!(zo&&zo[0]&&Yn&&Yn[0]))return new Ar(Me.s&&Te.s&&(zo?!Yn||zo[0]!=Yn[0]:Yn)?zo&&zo[0]==0||!Yn?0*ai:ai/0:NaN);for(wo=(no=new Ar(ai)).c=[],ai=Re+(or=Me.e-Te.e)+1,Ie||(Ie=S,or=Y(Me.e/C)-Y(Te.e/C),ai=ai/C|0),He=0;Yn[He]==(zo[He]||0);He++);if(Yn[He]>(zo[He]||0)&&or--,ai<0)wo.push(1),Vr=!0;else{for(Xs=zo.length,Oi=Yn.length,He=0,ai+=2,(Jr=g(Ie/(Yn[0]+1)))>1&&(Yn=zt(Yn,Jr,Ie),zo=zt(zo,Jr,Ie),Oi=Yn.length,Xs=zo.length),ps=Oi,Gn=(On=zo.slice(0,Oi)).length;Gn=Ie/2&&Ks++;do{if(Jr=0,(Ke=$t(Yn,On,Oi,Gn))<0){if(So=On[0],Oi!=Gn&&(So=So*Ie+(On[1]||0)),(Jr=g(So/Ks))>1)for(Jr>=Ie&&(Jr=Ie-1),Un=(sn=zt(Yn,Jr,Ie)).length,Gn=On.length;$t(sn,On,Un,Gn)==1;)Jr--,ge(sn,Oi=10;ai/=10,He++);on(no,Re+(no.e=He+or*C-1)+1,Ve,Vr)}else no.e=or,no.r=+Vr;return no}}(),mr=/^(-?)0([xbo])(?=\w[\w.]*$)/i,pr=/^([^.]+)\.$/,Fr=/^\.([^.]+)$/,Zr=/^-?(Infinity|NaN)$/,gn=/^\s*\+(?=[\w.])|^\s+|\s+$/g,jt=function(zt,$t,ge,Me){var Te,Re=ge?$t:$t.replace(gn,"");if(Zr.test(Re))zt.s=isNaN(Re)?null:Re<0?-1:1;else{if(!ge&&(Re=Re.replace(mr,function(Ve,Ie,Ke){return Te=(Ke=Ke.toLowerCase())=="x"?16:Ke=="b"?2:8,Me&&Me!=Te?Ve:Ie}),Me&&(Te=Me,Re=Re.replace(pr,"$1").replace(Fr,"0.$1")),$t!=Re))return new Ar(Re,Te);if(Ar.DEBUG)throw Error(w+"Not a"+(Me?" base "+Me:"")+" number: "+$t);zt.s=null}zt.c=zt.e=null},Rr.absoluteValue=Rr.abs=function(){var zt=new Ar(this);return zt.s<0&&(zt.s=1),zt},Rr.comparedTo=function(zt,$t){return Ut(this,new Ar(zt,$t))},Rr.decimalPlaces=Rr.dp=function(zt,$t){var ge,Me,Te,Re=this;if(zt!=null)return pt(zt,0,V),$t==null?$t=Fn:pt($t,0,8),on(new Ar(Re),zt+Re.e+1,$t);if(!(ge=Re.c))return null;if(Me=((Te=ge.length-1)-Y(this.e/C))*C,Te=ge[Te])for(;Te%10==0;Te/=10,Me--);return Me<0&&(Me=0),Me},Rr.dividedBy=Rr.div=function(zt,$t){return j(this,new Ar(zt,$t),Kn,Fn)},Rr.dividedToIntegerBy=Rr.idiv=function(zt,$t){return j(this,new Ar(zt,$t),0,1)},Rr.exponentiatedBy=Rr.pow=function(zt,$t){var ge,Me,Te,Re,Ve,Ie,Ke,or,He=this;if((zt=new Ar(zt)).c&&!zt.isInteger())throw Error(w+"Exponent not an integer: "+wn(zt));if($t!=null&&($t=new Ar($t)),Ve=zt.e>14,!He.c||!He.c[0]||He.c[0]==1&&!He.e&&He.c.length==1||!zt.c||!zt.c[0])return or=new Ar(Math.pow(+wn(He),Ve?zt.s*(2-Bt(zt)):+wn(zt))),$t?or.mod($t):or;if(Ie=zt.s<0,$t){if($t.c?!$t.c[0]:!$t.s)return new Ar(NaN);(Me=!Ie&&He.isInteger()&&$t.isInteger())&&(He=He.mod($t))}else{if(zt.e>9&&(He.e>0||He.e<-1||(He.e==0?He.c[0]>1||Ve&&He.c[1]>=24e7:He.c[0]<8e13||Ve&&He.c[0]<=9999975e7)))return Re=He.s<0&&Bt(zt)?-0:0,He.e>-1&&(Re=1/Re),new Ar(Ie?1/Re:Re);Nn&&(Re=A(Nn/C+2))}for(Ve?(ge=new Ar(.5),Ie&&(zt.s=1),Ke=Bt(zt)):Ke=(Te=Math.abs(+wn(zt)))%2,or=new Ar(Rn);;){if(Ke){if(!(or=or.times(He)).c)break;Re?or.c.length>Re&&(or.c.length=Re):Me&&(or=or.mod($t))}if(Te){if((Te=g(Te/2))===0)break;Ke=Te%2}else if(on(zt=zt.times(ge),zt.e+1,1),zt.e>14)Ke=Bt(zt);else{if((Te=+wn(zt))==0)break;Ke=Te%2}He=He.times(He),Re?He.c&&He.c.length>Re&&(He.c.length=Re):Me&&(He=He.mod($t))}return Me?or:(Ie&&(or=Rn.div(or)),$t?or.mod($t):Re?on(or,Nn,Fn,void 0):or)},Rr.integerValue=function(zt){var $t=new Ar(this);return zt==null?zt=Fn:pt(zt,0,8),on($t,$t.e+1,zt)},Rr.isEqualTo=Rr.eq=function(zt,$t){return Ut(this,new Ar(zt,$t))===0},Rr.isFinite=function(){return!!this.c},Rr.isGreaterThan=Rr.gt=function(zt,$t){return Ut(this,new Ar(zt,$t))>0},Rr.isGreaterThanOrEqualTo=Rr.gte=function(zt,$t){return($t=Ut(this,new Ar(zt,$t)))===1||$t===0},Rr.isInteger=function(){return!!this.c&&Y(this.e/C)>this.c.length-2},Rr.isLessThan=Rr.lt=function(zt,$t){return Ut(this,new Ar(zt,$t))<0},Rr.isLessThanOrEqualTo=Rr.lte=function(zt,$t){return($t=Ut(this,new Ar(zt,$t)))===-1||$t===0},Rr.isNaN=function(){return!this.s},Rr.isNegative=function(){return this.s<0},Rr.isPositive=function(){return this.s>0},Rr.isZero=function(){return!!this.c&&this.c[0]==0},Rr.minus=function(zt,$t){var ge,Me,Te,Re,Ve=this,Ie=Ve.s;if($t=(zt=new Ar(zt,$t)).s,!Ie||!$t)return new Ar(NaN);if(Ie!=$t)return zt.s=-$t,Ve.plus(zt);var Ke=Ve.e/C,or=zt.e/C,He=Ve.c,Vr=zt.c;if(!Ke||!or){if(!He||!Vr)return He?(zt.s=-$t,zt):new Ar(Vr?Ve:NaN);if(!He[0]||!Vr[0])return Vr[0]?(zt.s=-$t,zt):new Ar(He[0]?Ve:Fn==3?-0:0)}if(Ke=Y(Ke),or=Y(or),He=He.slice(),Ie=Ke-or){for((Re=Ie<0)?(Ie=-Ie,Te=He):(or=Ke,Te=Vr),Te.reverse(),$t=Ie;$t--;Te.push(0));Te.reverse()}else for(Me=(Re=(Ie=He.length)<($t=Vr.length))?Ie:$t,Ie=$t=0;$t0)for(;$t--;He[ge++]=0);for($t=S-1;Me>Ie;){if(He[--Me]=0;){for(ge=0,Jr=So[Te]%wo,sn=So[Te]/wo|0,Re=Te+(Ve=Ke);Re>Te;)ge=((or=Jr*(or=Gn[--Ve]%wo)+(Ie=sn*or+(He=Gn[Ve]/wo|0)*Jr)%wo*wo+Un[Re]+ge)/no|0)+(Ie/wo|0)+sn*He,Un[Re--]=or%no;Un[Re]=ge}return ge?++Me:Un.splice(0,1),$r(zt,Un,Me)},Rr.negated=function(){var zt=new Ar(this);return zt.s=-zt.s||null,zt},Rr.plus=function(zt,$t){var ge,Me=this,Te=Me.s;if($t=(zt=new Ar(zt,$t)).s,!Te||!$t)return new Ar(NaN);if(Te!=$t)return zt.s=-$t,Me.minus(zt);var Re=Me.e/C,Ve=zt.e/C,Ie=Me.c,Ke=zt.c;if(!Re||!Ve){if(!Ie||!Ke)return new Ar(Te/0);if(!Ie[0]||!Ke[0])return Ke[0]?zt:new Ar(Ie[0]?Me:0*Te)}if(Re=Y(Re),Ve=Y(Ve),Ie=Ie.slice(),Te=Re-Ve){for(Te>0?(Ve=Re,ge=Ke):(Te=-Te,ge=Ie),ge.reverse();Te--;ge.push(0));ge.reverse()}for((Te=Ie.length)-($t=Ke.length)<0&&(ge=Ke,Ke=Ie,Ie=ge,$t=Te),Te=0;$t;)Te=(Ie[--$t]=Ie[$t]+Ke[$t]+Te)/S|0,Ie[$t]=S===Ie[$t]?0:Ie[$t]%S;return Te&&(Ie=[Te].concat(Ie),++Ve),$r(zt,Ie,Ve)},Rr.precision=Rr.sd=function(zt,$t){var ge,Me,Te,Re=this;if(zt!=null&&zt!==!!zt)return pt(zt,1,V),$t==null?$t=Fn:pt($t,0,8),on(new Ar(Re),zt,$t);if(!(ge=Re.c))return null;if(Me=(Te=ge.length-1)*C+1,Te=ge[Te]){for(;Te%10==0;Te/=10,Me--);for(Te=ge[0];Te>=10;Te/=10,Me++);}return zt&&Re.e+1>Me&&(Me=Re.e+1),Me},Rr.shiftedBy=function(zt){return pt(zt,-9007199254740991,x),this.times("1e"+zt)},Rr.squareRoot=Rr.sqrt=function(){var zt,$t,ge,Me,Te,Re=this,Ve=Re.c,Ie=Re.s,Ke=Re.e,or=Kn+4,He=new Ar("0.5");if(Ie!==1||!Ve||!Ve[0])return new Ar(!Ie||Ie<0&&(!Ve||Ve[0])?NaN:Ve?Re:1/0);if((Ie=Math.sqrt(+wn(Re)))==0||Ie==1/0?((($t=ut(Ve)).length+Ke)%2==0&&($t+="0"),Ie=Math.sqrt(+$t),Ke=Y((Ke+1)/2)-(Ke<0||Ke%2),ge=new Ar($t=Ie==1/0?"5e"+Ke:($t=Ie.toExponential()).slice(0,$t.indexOf("e")+1)+Ke)):ge=new Ar(Ie+""),ge.c[0]){for((Ie=(Ke=ge.e)+or)<3&&(Ie=0);;)if(Te=ge,ge=He.times(Te.plus(j(Re,Te,or,1))),ut(Te.c).slice(0,Ie)===($t=ut(ge.c)).slice(0,Ie)){if(ge.e0&&Un>0){for(Re=Un%Ie||Ie,He=sn.substr(0,Re);Re0&&(He+=or+sn.slice(Re)),Jr&&(He="-"+He)}Me=Vr?He+(ge.decimalSeparator||"")+((Ke=+ge.fractionGroupSize)?Vr.replace(new RegExp("\\d{"+Ke+"}\\B","g"),"$&"+(ge.fractionGroupSeparator||"")):Vr):He}return(ge.prefix||"")+Me+(ge.suffix||"")},Rr.toFraction=function(zt){var $t,ge,Me,Te,Re,Ve,Ie,Ke,or,He,Vr,Jr,sn=this,Un=sn.c;if(zt!=null&&(!(Ie=new Ar(zt)).isInteger()&&(Ie.c||Ie.s!==1)||Ie.lt(Rn)))throw Error(w+"Argument "+(Ie.isInteger()?"out of range: ":"not an integer: ")+wn(Ie));if(!Un)return new Ar(sn);for($t=new Ar(Rn),or=ge=new Ar(Rn),Me=Ke=new Ar(Rn),Jr=ut(Un),Re=$t.e=Jr.length-sn.e-1,$t.c[0]=ot[(Ve=Re%C)<0?C+Ve:Ve],zt=!zt||Ie.comparedTo($t)>0?Re>0?$t:or:Ie,Ve=vo,vo=1/0,Ie=new Ar(Jr),Ke.c[0]=0;He=j(Ie,$t,0,1),(Te=ge.plus(He.times(Me))).comparedTo(zt)!=1;)ge=Me,Me=Te,or=Ke.plus(He.times(Te=or)),Ke=Te,$t=Ie.minus(He.times(Te=$t)),Ie=Te;return Te=j(zt.minus(ge),Me,0,1),Ke=Ke.plus(Te.times(or)),ge=ge.plus(Te.times(Me)),Ke.s=or.s=sn.s,Vr=j(or,Me,Re*=2,Fn).minus(sn).abs().comparedTo(j(Ke,ge,Re,Fn).minus(sn).abs())<1?[or,Me]:[Ke,ge],vo=Ve,Vr},Rr.toNumber=function(){return+wn(this)},Rr.toPrecision=function(zt,$t){return zt!=null&&pt(zt,1,V),Ro(this,zt,$t,2)},Rr.toString=function(zt){var $t,ge=this,Me=ge.s,Te=ge.e;return Te===null?Me?($t="Infinity",Me<0&&($t="-"+$t)):$t="NaN":(zt==null?$t=Te<=Uo||Te>=Mo?Rt(ut(ge.c),Te):J(ut(ge.c),Te,"0"):zt===10&&Vo?$t=J(ut((ge=on(new Ar(ge),Kn+Te+1,Fn)).c),ge.e,"0"):(pt(zt,2,En.length,"Base"),$t=K(J(ut(ge.c),Te,"0"),10,zt,Me,!0)),Me<0&&ge.c[0]&&($t="-"+$t)),$t},Rr.valueOf=Rr.toJSON=function(){return wn(this)},Rr._isBigNumber=!0,Rr[Symbol.toStringTag]="BigNumber",Rr[Symbol.for("nodejs.util.inspect.custom")]=Rr.valueOf,B!=null&&Ar.set(B),Ar}();const c=At;var N=l(4193),G=l.n(N),tt=l(9127),Et=l.n(tt),q=l(5976),Tt=l(9983);function Ft(nt){return Ft=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},Ft(nt)}function vt(nt,B){var j=Object.keys(nt);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(nt);B&&(K=K.filter(function(jt){return Object.getOwnPropertyDescriptor(nt,jt).enumerable})),j.push.apply(j,K)}return j}function bt(nt){for(var B=1;B300?null:jt-K+j}function kt(nt){return kt=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},kt(nt)}function Ct(){var nt,B,j=typeof Symbol=="function"?Symbol:{},K=j.iterator||"@@iterator",jt=j.toStringTag||"@@toStringTag";function _t(Rn,Kn,Fn,Uo){var Mo=Kn&&Kn.prototype instanceof mr?Kn:mr,Dn=Object.create(Mo.prototype);return H(Dn,"_invoke",function(vo,Ko,bo){var Nn,an,En,Vo=0,Ar=bo||[],Ro=!1,Qn={p:0,n:0,v:nt,a:$r,f:$r.bind(nt,4),d:function(on,wn){return Nn=on,an=0,En=nt,Qn.n=wn,er}};function $r(on,wn){for(an=on,En=wn,B=0;!Ro&&Vo&&!zt&&B3?(zt=Me===wn)&&(En=$t[(an=$t[4])?5:(an=3,3)],$t[4]=$t[5]=nt):$t[0]<=ge&&((zt=on<2&&ge<$t[1])?(an=0,Qn.v=wn,Qn.n=$t[1]):gewn||wn>Me)&&($t[4]=on,$t[5]=wn,Qn.n=Me,an=0))}if(zt||on>1)return er;throw Ro=!0,wn}return function(on,wn,zt){if(Vo>1)throw TypeError("Generator is already running");for(Ro&&wn===1&&$r(wn,zt),an=wn,En=zt;(B=an<2?nt:En)||!Ro;){Nn||(an?an<3?(an>1&&(Qn.n=-1),$r(an,En)):Qn.n=En:Qn.v=En);try{if(Vo=2,Nn){if(an||(on="next"),B=Nn[on]){if(!(B=B.call(Nn,En)))throw TypeError("iterator result is not an object");if(!B.done)return B;En=B.value,an<2&&(an=0)}else an===1&&(B=Nn.return)&&B.call(Nn),an<2&&(En=TypeError("The iterator does not provide a '"+on+"' method"),an=1);Nn=nt}else if((B=(Ro=Qn.n<0)?En:vo.call(Ko,Qn))!==er)break}catch($t){Nn=nt,an=1,En=$t}finally{Vo=1}}return{value:B,done:Ro}}}(Rn,Fn,Uo),!0),Dn}var er={};function mr(){}function pr(){}function Fr(){}B=Object.getPrototypeOf;var Zr=[][K]?B(B([][K]())):(H(B={},K,function(){return this}),B),gn=Fr.prototype=mr.prototype=Object.create(Zr);function Rr(Rn){return Object.setPrototypeOf?Object.setPrototypeOf(Rn,Fr):(Rn.__proto__=Fr,H(Rn,jt,"GeneratorFunction")),Rn.prototype=Object.create(gn),Rn}return pr.prototype=Fr,H(gn,"constructor",Fr),H(Fr,"constructor",pr),pr.displayName="GeneratorFunction",H(Fr,jt,"GeneratorFunction"),H(gn),H(gn,jt,"Generator"),H(gn,K,function(){return this}),H(gn,"toString",function(){return"[object Generator]"}),(Ct=function(){return{w:_t,m:Rr}})()}function H(nt,B,j,K){var jt=Object.defineProperty;try{jt({},"",{})}catch{jt=0}H=function(_t,er,mr,pr){function Fr(Zr,gn){H(_t,Zr,function(Rr){return this._invoke(Zr,gn,Rr)})}er?jt?jt(_t,er,{value:mr,enumerable:!pr,configurable:!pr,writable:!pr}):_t[er]=mr:(Fr("next",0),Fr("throw",1),Fr("return",2))},H(nt,B,j,K)}function it(nt,B,j,K,jt,_t,er){try{var mr=nt[_t](er),pr=mr.value}catch(Fr){return void j(Fr)}mr.done?B(pr):Promise.resolve(pr).then(K,jt)}function mt(nt){return function(){var B=this,j=arguments;return new Promise(function(K,jt){var _t=nt.apply(B,j);function er(pr){it(_t,K,jt,er,mr,"next",pr)}function mr(pr){it(_t,K,jt,er,mr,"throw",pr)}er(void 0)})}}function Dt(nt,B){return function(j){if(Array.isArray(j))return j}(nt)||function(j,K){var jt=j==null?null:typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(jt!=null){var _t,er,mr,pr,Fr=[],Zr=!0,gn=!1;try{if(mr=(jt=jt.call(j)).next,K!==0)for(;!(Zr=(_t=mr.call(jt)).done)&&(Fr.push(_t.value),Fr.length!==K);Zr=!0);}catch(Rr){gn=!0,er=Rr}finally{try{if(!Zr&&jt.return!=null&&(pr=jt.return(),Object(pr)!==pr))return}finally{if(gn)throw er}}return Fr}}(nt,B)||function(j,K){if(j){if(typeof j=="string")return T(j,K);var jt={}.toString.call(j).slice(8,-1);return jt==="Object"&&j.constructor&&(jt=j.constructor.name),jt==="Map"||jt==="Set"?Array.from(j):jt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(jt)?T(j,K):void 0}}(nt,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 T(nt,B){(B==null||B>nt.length)&&(B=nt.length);for(var j=0,K=Array(B);j2&&arguments[2]!==void 0?arguments[2]:"";(function(jt,_t){if(!(jt instanceof _t))throw new TypeError("Cannot call a class as a function")})(this,nt),this.url=B.clone(),this.filter=[],this.originalSegments=this.url.segment()||[],this.neighborRoot=K,this.httpClient=j},[{key:"call",value:function(){var nt=this;return this.checkFilter(),this._sendNormalRequest(this.url).then(function(B){return nt._parseResponse(B)})}},{key:"stream",value:function(){var nt=this,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(St===void 0)throw new Error("Streaming requires eventsource to be enabled. If you need this functionality, compile with USE_EVENTSOURCE=true.");this.checkFilter();var j=this.url.clone();j.setQuery("X-Client-Name","js-stellar-sdk"),j.setQuery("X-Client-Version",dt);var K,jt,_t=this.httpClient.defaults.headers;_t&&["X-App-Name","X-App-Version"].forEach(function(pr){var Fr,Zr;if(_t instanceof Headers)Fr=(Zr=_t.get(pr))!==null&&Zr!==void 0?Zr:void 0;else if(Array.isArray(_t)){var gn=_t.find(function(Rr){return Dt(Rr,1)[0]===pr});Fr=gn==null?void 0:gn[1]}else Fr=_t[pr];Fr&&j.setQuery(pr,Fr)});var er=function(){jt=setTimeout(function(){var pr;(pr=K)===null||pr===void 0||pr.close(),K=mr()},B.reconnectTimeout||15e3)},mr=function(){try{K=new St(j.toString())}catch(Rr){B.onerror&&B.onerror(Rr)}if(er(),!K)return K;var pr=!1,Fr=function(){pr||(clearTimeout(jt),K.close(),mr(),pr=!0)},Zr=function(Rr){if(Rr.type!=="close"){var Rn=Rr.data?nt._parseRecord(JSON.parse(Rr.data)):Rr;Rn.paging_token&&j.setQuery("cursor",Rn.paging_token),clearTimeout(jt),er(),B.onmessage!==void 0&&B.onmessage(Rn)}else Fr()},gn=function(Rr){B.onerror&&B.onerror(Rr)};return K.addEventListener?(K.addEventListener("message",Zr.bind(nt)),K.addEventListener("error",gn.bind(nt)),K.addEventListener("close",Fr.bind(nt))):(K.onmessage=Zr.bind(nt),K.onerror=gn.bind(nt)),K};return mr(),function(){var pr;clearTimeout(jt),(pr=K)===null||pr===void 0||pr.close()}}},{key:"cursor",value:function(nt){return this.url.setQuery("cursor",nt),this}},{key:"limit",value:function(nt){return this.url.setQuery("limit",nt.toString()),this}},{key:"order",value:function(nt){return this.url.setQuery("order",nt),this}},{key:"join",value:function(nt){return this.url.setQuery("join",nt),this}},{key:"forEndpoint",value:function(nt,B){if(this.neighborRoot==="")throw new Error("Invalid usage: neighborRoot not set in constructor");return this.filter.push([nt,B,this.neighborRoot]),this}},{key:"checkFilter",value:function(){if(this.filter.length>=2)throw new q.v7("Too many filters specified",this.filter);if(this.filter.length===1){var nt=this.originalSegments.concat(this.filter[0]);this.url.segment(nt)}}},{key:"_requestFnForLink",value:function(nt){var B=this;return mt(Ct().m(function j(){var K,jt,_t,er,mr=arguments;return Ct().w(function(pr){for(;;)switch(pr.n){case 0:return K=mr.length>0&&mr[0]!==void 0?mr[0]:{},nt.templated?(_t=Et()(nt.href),jt=G()(_t.expand(K))):jt=G()(nt.href),pr.n=1,B._sendNormalRequest(jt);case 1:return er=pr.v,pr.a(2,B._parseResponse(er))}},j)}))}},{key:"_parseRecord",value:function(nt){var B=this;return nt._links&&Object.keys(nt._links).forEach(function(j){var K=nt._links[j],jt=!1;if(nt[j]!==void 0&&(nt["".concat(j,"_attr")]=nt[j],jt=!0),jt&&W.indexOf(j)>=0){var _t=B._parseRecord(nt[j]);nt[j]=mt(Ct().m(function er(){return Ct().w(function(mr){for(;;)if(mr.n===0)return mr.a(2,_t)},er)}))}else nt[j]=B._requestFnForLink(K)}),nt}},{key:"_sendNormalRequest",value:(ae=mt(Ct().m(function nt(B){var j;return Ct().w(function(K){for(;;)if(K.n===0)return j=(j=B).authority(this.url.authority()).protocol(this.url.protocol()),K.a(2,this.httpClient.get(j.toString()).then(function(jt){return jt.data}).catch(this._handleNetworkError))},nt,this)})),function(nt){return ae.apply(this,arguments)})},{key:"_parseResponse",value:function(nt){return nt._embedded&&nt._embedded.records?this._toCollectionPage(nt):this._parseRecord(nt)}},{key:"_toCollectionPage",value:function(nt){for(var B,j,K=this,jt=0;jtK||j>=24*jt||j%jt!==0)}}])}(Kt);function di(nt){return di=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},di(nt)}function ii(nt,B){for(var j=0;j3?(zt=Me===wn)&&(En=$t[(an=$t[4])?5:(an=3,3)],$t[4]=$t[5]=nt):$t[0]<=ge&&((zt=on<2&&ge<$t[1])?(an=0,Qn.v=wn,Qn.n=$t[1]):gewn||wn>Me)&&($t[4]=on,$t[5]=wn,Qn.n=Me,an=0))}if(zt||on>1)return er;throw Ro=!0,wn}return function(on,wn,zt){if(Vo>1)throw TypeError("Generator is already running");for(Ro&&wn===1&&$r(wn,zt),an=wn,En=zt;(B=an<2?nt:En)||!Ro;){Nn||(an?an<3?(an>1&&(Qn.n=-1),$r(an,En)):Qn.n=En:Qn.v=En);try{if(Vo=2,Nn){if(an||(on="next"),B=Nn[on]){if(!(B=B.call(Nn,En)))throw TypeError("iterator result is not an object");if(!B.done)return B;En=B.value,an<2&&(an=0)}else an===1&&(B=Nn.return)&&B.call(Nn),an<2&&(En=TypeError("The iterator does not provide a '"+on+"' method"),an=1);Nn=nt}else if((B=(Ro=Qn.n<0)?En:vo.call(Ko,Qn))!==er)break}catch($t){Nn=nt,an=1,En=$t}finally{Vo=1}}return{value:B,done:Ro}}}(Rn,Fn,Uo),!0),Dn}var er={};function mr(){}function pr(){}function Fr(){}B=Object.getPrototypeOf;var Zr=[][K]?B(B([][K]())):(nn(B={},K,function(){return this}),B),gn=Fr.prototype=mr.prototype=Object.create(Zr);function Rr(Rn){return Object.setPrototypeOf?Object.setPrototypeOf(Rn,Fr):(Rn.__proto__=Fr,nn(Rn,jt,"GeneratorFunction")),Rn.prototype=Object.create(gn),Rn}return pr.prototype=Fr,nn(gn,"constructor",Fr),nn(Fr,"constructor",pr),pr.displayName="GeneratorFunction",nn(Fr,jt,"GeneratorFunction"),nn(gn),nn(gn,jt,"Generator"),nn(gn,K,function(){return this}),nn(gn,"toString",function(){return"[object Generator]"}),(cn=function(){return{w:_t,m:Rr}})()}function nn(nt,B,j,K){var jt=Object.defineProperty;try{jt({},"",{})}catch{jt=0}nn=function(_t,er,mr,pr){function Fr(Zr,gn){nn(_t,Zr,function(Rr){return this._invoke(Zr,gn,Rr)})}er?jt?jt(_t,er,{value:mr,enumerable:!pr,configurable:!pr,writable:!pr}):_t[er]=mr:(Fr("next",0),Fr("throw",1),Fr("return",2))},nn(nt,B,j,K)}function Kr(nt,B,j,K,jt,_t,er){try{var mr=nt[_t](er),pr=mr.value}catch(Fr){return void j(Fr)}mr.done?B(pr):Promise.resolve(pr).then(K,jt)}function dn(nt){return function(){var B=this,j=arguments;return new Promise(function(K,jt){var _t=nt.apply(B,j);function er(pr){Kr(_t,K,jt,er,mr,"next",pr)}function mr(pr){Kr(_t,K,jt,er,mr,"throw",pr)}er(void 0)})}}function fo(nt,B){for(var j=0;j1&&arguments[1]!==void 0?arguments[1]:{};(function(mr,pr){if(!(mr instanceof pr))throw new TypeError("Cannot call a class as a function")})(this,nt),this.serverURL=G()(B);var K,jt,_t=j.allowHttp===void 0?Ne.T.isAllowHttp():j.allowHttp,er={};if(j.appName&&(er["X-App-Name"]=j.appName),j.appVersion&&(er["X-App-Version"]=j.appVersion),j.authToken&&(er["X-Auth-Token"]=j.authToken),j.headers&&Object.assign(er,j.headers),this.httpClient=(K=er,(jt=(0,Tt.vt)({headers:bt(bt({},K),{},{"X-Client-Name":"js-stellar-sdk","X-Client-Version":dt})})).interceptors.response.use(function(mr){var pr=G()(mr.config.url),Fr=pr.port()?"".concat(pr.hostname(),":").concat(pr.port()):pr.hostname(),Zr=0;if(mr.headers instanceof Headers){var gn=mr.headers.get("date");gn&&(Zr=xt(Date.parse(gn)))}else if(Ft(mr.headers)==="object"&&"date"in mr.headers){var Rr=mr.headers;typeof Rr.date=="string"&&(Zr=xt(Date.parse(Rr.date)))}var Rn=xt(new Date().getTime());return Number.isNaN(Zr)||(lt[Fr]={serverTime:Zr,localTimeRecorded:Rn}),mr}),jt),this.serverURL.protocol()!=="https"&&!_t)throw new Error("Cannot connect to insecure horizon server")},[{key:"fetchTimebounds",value:(Ta=dn(cn().m(function nt(B){var j,K,jt,_t=arguments;return cn().w(function(er){for(;;)switch(er.n){case 0:if(j=_t.length>1&&_t[1]!==void 0&&_t[1],K=this.serverURL.port()?"".concat(this.serverURL.hostname(),":").concat(this.serverURL.port()):this.serverURL.hostname(),!(jt=Ot(K))){er.n=1;break}return er.a(2,{minTime:0,maxTime:jt+B});case 1:if(!j){er.n=2;break}return er.a(2,{minTime:0,maxTime:Math.floor(new Date().getTime()/1e3)+B});case 2:return er.n=3,this.httpClient.get(this.serverURL.toString());case 3:return er.a(2,this.fetchTimebounds(B,!0))}},nt,this)})),function(nt){return Ta.apply(this,arguments)})},{key:"fetchBaseFee",value:(ka=dn(cn().m(function nt(){var B;return cn().w(function(j){for(;;)switch(j.n){case 0:return j.n=1,this.feeStats();case 1:return B=j.v,j.a(2,parseInt(B.last_ledger_base_fee,10)||100)}},nt,this)})),function(){return ka.apply(this,arguments)})},{key:"feeStats",value:(Gi=dn(cn().m(function nt(){var B;return cn().w(function(j){for(;;)if(j.n===0)return(B=new Kt(this.serverURL,this.httpClient)).filter.push(["fee_stats"]),j.a(2,B.call())},nt,this)})),function(){return Gi.apply(this,arguments)})},{key:"root",value:(fa=dn(cn().m(function nt(){var B;return cn().w(function(j){for(;;)if(j.n===0)return B=new Kt(this.serverURL,this.httpClient),j.a(2,B.call())},nt,this)})),function(){return fa.apply(this,arguments)})},{key:"submitTransaction",value:(ta=dn(cn().m(function nt(B){var j,K=arguments;return cn().w(function(jt){for(;;)switch(jt.n){case 0:if((K.length>1&&K[1]!==void 0?K[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){jt.n=1;break}return jt.n=1,this.checkMemoRequired(B);case 1:return j=encodeURIComponent(B.toEnvelope().toXDR().toString("base64")),jt.a(2,this.httpClient.post(this.serverURL.clone().segment("transactions").toString(),"tx=".concat(j),{timeout:6e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(_t){if(!_t.data.result_xdr)return _t.data;var er,mr,pr=k.xdr.TransactionResult.fromXDR(_t.data.result_xdr,"base64").result().value();return pr.length&&(er=pr.map(function(Fr,Zr){if(Fr.value().switch().name!=="manageBuyOffer"&&Fr.value().switch().name!=="manageSellOffer")return null;mr=!0;var gn,Rr=new c(0),Rn=new c(0),Kn=Fr.value().value().success(),Fn=Kn.offersClaimed().map(function(Ko){var bo=Ko.value(),Nn="";switch(Ko.switch()){case k.xdr.ClaimAtomType.claimAtomTypeV0():Nn=k.StrKey.encodeEd25519PublicKey(bo.sellerEd25519());break;case k.xdr.ClaimAtomType.claimAtomTypeOrderBook():Nn=k.StrKey.encodeEd25519PublicKey(bo.sellerId().ed25519());break;default:throw new Error("Invalid offer result type: ".concat(Ko.switch()))}var an=new c(bo.amountBought().toString()),En=new c(bo.amountSold().toString());Rr=Rr.plus(En),Rn=Rn.plus(an);var Vo=k.Asset.fromOperation(bo.assetSold()),Ar=k.Asset.fromOperation(bo.assetBought()),Ro={type:Vo.getAssetType(),assetCode:Vo.getCode(),issuer:Vo.getIssuer()},Qn={type:Ar.getAssetType(),assetCode:Ar.getCode(),issuer:Ar.getIssuer()};return{sellerId:Nn,offerId:bo.offerId().toString(),assetSold:Ro,amountSold:Po(En),assetBought:Qn,amountBought:Po(an)}}),Uo=Kn.offer().switch().name;if(typeof Kn.offer().value=="function"&&Kn.offer().value()){var Mo=Kn.offer().value();gn={offerId:Mo.offerId().toString(),selling:{},buying:{},amount:Po(Mo.amount().toString()),price:{n:Mo.price().n(),d:Mo.price().d()}};var Dn=k.Asset.fromOperation(Mo.selling());gn.selling={type:Dn.getAssetType(),assetCode:Dn.getCode(),issuer:Dn.getIssuer()};var vo=k.Asset.fromOperation(Mo.buying());gn.buying={type:vo.getAssetType(),assetCode:vo.getCode(),issuer:vo.getIssuer()}}return{offersClaimed:Fn,effect:Uo,operationIndex:Zr,currentOffer:gn,amountBought:Po(Rr),amountSold:Po(Rn),isFullyOpen:!Fn.length&&Uo!=="manageOfferDeleted",wasPartiallyFilled:!!Fn.length&&Uo!=="manageOfferDeleted",wasImmediatelyFilled:!!Fn.length&&Uo==="manageOfferDeleted",wasImmediatelyDeleted:!Fn.length&&Uo==="manageOfferDeleted"}}).filter(function(Fr){return!!Fr})),wr(wr({},_t.data),{},{offerResults:mr?er:void 0})}).catch(function(_t){return _t instanceof Error?Promise.reject(_t):Promise.reject(new q.nS("Transaction submission failed. Server responded: ".concat(_t.status," ").concat(_t.statusText),_t.data))}))}},nt,this)})),function(nt){return ta.apply(this,arguments)})},{key:"submitAsyncTransaction",value:(Ea=dn(cn().m(function nt(B){var j,K=arguments;return cn().w(function(jt){for(;;)switch(jt.n){case 0:if((K.length>1&&K[1]!==void 0?K[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){jt.n=1;break}return jt.n=1,this.checkMemoRequired(B);case 1:return j=encodeURIComponent(B.toEnvelope().toXDR().toString("base64")),jt.a(2,this.httpClient.post(this.serverURL.clone().segment("transactions_async").toString(),"tx=".concat(j),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(_t){return _t.data}).catch(function(_t){return _t instanceof Error?Promise.reject(_t):Promise.reject(new q.nS("Transaction submission failed. Server responded: ".concat(_t.status," ").concat(_t.statusText),_t.data))}))}},nt,this)})),function(nt){return Ea.apply(this,arguments)})},{key:"accounts",value:function(){return new U(this.serverURL,this.httpClient)}},{key:"claimableBalances",value:function(){return new qn(this.serverURL,this.httpClient)}},{key:"ledgers",value:function(){return new Ui(this.serverURL,this.httpClient)}},{key:"transactions",value:function(){return new Wr(this.serverURL,this.httpClient)}},{key:"offers",value:function(){return new Er(this.serverURL,this.httpClient)}},{key:"orderbook",value:function(nt,B){return new Fe(this.serverURL,this.httpClient,nt,B)}},{key:"trades",value:function(){return new Wt(this.serverURL,this.httpClient)}},{key:"operations",value:function(){return new wt(this.serverURL,this.httpClient)}},{key:"liquidityPools",value:function(){return new Gt(this.serverURL,this.httpClient)}},{key:"strictReceivePaths",value:function(nt,B,j){return new go(this.serverURL,this.httpClient,nt,B,j)}},{key:"strictSendPaths",value:function(nt,B,j){return new lo(this.serverURL,this.httpClient,nt,B,j)}},{key:"payments",value:function(){return new ar(this.serverURL,this.httpClient)}},{key:"effects",value:function(){return new mn(this.serverURL,this.httpClient)}},{key:"friendbot",value:function(nt){return new Tn(this.serverURL,this.httpClient,nt)}},{key:"assets",value:function(){return new Qe(this.serverURL,this.httpClient)}},{key:"loadAccount",value:(Hi=dn(cn().m(function nt(B){var j;return cn().w(function(K){for(;;)switch(K.n){case 0:return K.n=1,this.accounts().accountId(B).call();case 1:return j=K.v,K.a(2,new f(j))}},nt,this)})),function(nt){return Hi.apply(this,arguments)})},{key:"tradeAggregation",value:function(nt,B,j,K,jt,_t){return new Sn(this.serverURL,this.httpClient,nt,B,j,K,jt,_t)}},{key:"checkMemoRequired",value:(No=dn(cn().m(function nt(B){var j,K,jt,_t,er,mr;return cn().w(function(pr){for(;;)switch(pr.p=pr.n){case 0:if(B instanceof k.FeeBumpTransaction&&(B=B.innerTransaction),B.memo.type==="none"){pr.n=1;break}return pr.a(2);case 1:j=new Set,K=0;case 2:if(!(Knr,create:()=>Ur});var v={};function z(rt,ht){return function(){return rt.apply(ht,arguments)}}l.r(v),l.d(v,{hasBrowserEnv:()=>et,hasStandardBrowserEnv:()=>Yt,hasStandardBrowserWebWorkerEnv:()=>le,navigator:()=>gt,origin:()=>we});const{toString:s}=Object.prototype,{getPrototypeOf:E}=Object,{iterator:k,toStringTag:y}=Symbol,O=(u=Object.create(null),rt=>{const ht=s.call(rt);return u[ht]||(u[ht]=ht.slice(8,-1).toLowerCase())});var u;const m=rt=>(rt=rt.toLowerCase(),ht=>O(ht)===rt),p=rt=>ht=>typeof ht===rt,{isArray:f}=Array,h=p("undefined");function A(rt){return rt!==null&&!h(rt)&&rt.constructor!==null&&!h(rt.constructor)&&R(rt.constructor.isBuffer)&&rt.constructor.isBuffer(rt)}const g=m("ArrayBuffer"),w=p("string"),R=p("function"),S=p("number"),C=rt=>rt!==null&&typeof rt=="object",x=rt=>{if(O(rt)!=="object")return!1;const ht=E(rt);return!(ht!==null&&ht!==Object.prototype&&Object.getPrototypeOf(ht)!==null||y in rt||k in rt)},ot=m("Date"),Q=m("File"),V=m("Blob"),Y=m("FileList"),ut=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:l.g!==void 0?l.g:{},Ut=ut.FormData!==void 0?ut.FormData:void 0,pt=m("URLSearchParams"),[Bt,Rt,J,At]=["ReadableStream","Request","Response","Headers"].map(m);function c(rt,ht,{allOwnKeys:Nt=!1}={}){if(rt==null)return;let wt,Mt;if(typeof rt!="object"&&(rt=[rt]),f(rt))for(wt=0,Mt=rt.length;wt0;)if(wt=Nt[Mt],ht===wt.toLowerCase())return wt;return null}const G=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:l.g,tt=rt=>!h(rt)&&rt!==G,Et=(q=typeof Uint8Array<"u"&&E(Uint8Array),rt=>q&&rt instanceof q);var q;const Tt=m("HTMLFormElement"),Ft=(({hasOwnProperty:rt})=>(ht,Nt)=>rt.call(ht,Nt))(Object.prototype),vt=m("RegExp"),bt=(rt,ht)=>{const Nt=Object.getOwnPropertyDescriptors(rt),wt={};c(Nt,(Mt,oe)=>{let qt;(qt=ht(Mt,oe,rt))!==!1&&(wt[oe]=qt||Mt)}),Object.defineProperties(rt,wt)},yt=m("AsyncFunction"),dt=(lt=typeof setImmediate=="function",xt=R(G.postMessage),lt?setImmediate:xt?(Ot=`axios@${Math.random()}`,kt=[],G.addEventListener("message",({source:rt,data:ht})=>{rt===G&&ht===Ot&&kt.length&&kt.shift()()},!1),rt=>{kt.push(rt),G.postMessage(Ot,"*")}):rt=>setTimeout(rt));var lt,xt,Ot,kt;const Ct=typeof queueMicrotask<"u"?queueMicrotask.bind(G):typeof process<"u"&&process.nextTick||dt,H={isArray:f,isArrayBuffer:g,isBuffer:A,isFormData:rt=>{let ht;return rt&&(Ut&&rt instanceof Ut||R(rt.append)&&((ht=O(rt))==="formdata"||ht==="object"&&R(rt.toString)&&rt.toString()==="[object FormData]"))},isArrayBufferView:function(rt){let ht;return ht=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(rt):rt&&rt.buffer&&g(rt.buffer),ht},isString:w,isNumber:S,isBoolean:rt=>rt===!0||rt===!1,isObject:C,isPlainObject:x,isEmptyObject:rt=>{if(!C(rt)||A(rt))return!1;try{return Object.keys(rt).length===0&&Object.getPrototypeOf(rt)===Object.prototype}catch{return!1}},isReadableStream:Bt,isRequest:Rt,isResponse:J,isHeaders:At,isUndefined:h,isDate:ot,isFile:Q,isReactNativeBlob:rt=>!(!rt||rt.uri===void 0),isReactNative:rt=>rt&&rt.getParts!==void 0,isBlob:V,isRegExp:vt,isFunction:R,isStream:rt=>C(rt)&&R(rt.pipe),isURLSearchParams:pt,isTypedArray:Et,isFileList:Y,forEach:c,merge:function rt(){const{caseless:ht,skipUndefined:Nt}=tt(this)&&this||{},wt={},Mt=(oe,qt)=>{if(qt==="__proto__"||qt==="constructor"||qt==="prototype")return;const de=ht&&N(wt,qt)||qt;x(wt[de])&&x(oe)?wt[de]=rt(wt[de],oe):x(oe)?wt[de]=rt({},oe):f(oe)?wt[de]=oe.slice():Nt&&h(oe)||(wt[de]=oe)};for(let oe=0,qt=arguments.length;oe(c(ht,(Mt,oe)=>{Nt&&R(Mt)?Object.defineProperty(rt,oe,{value:z(Mt,Nt),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(rt,oe,{value:Mt,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:wt}),rt),trim:rt=>rt.trim?rt.trim():rt.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:rt=>(rt.charCodeAt(0)===65279&&(rt=rt.slice(1)),rt),inherits:(rt,ht,Nt,wt)=>{rt.prototype=Object.create(ht.prototype,wt),Object.defineProperty(rt.prototype,"constructor",{value:rt,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(rt,"super",{value:ht.prototype}),Nt&&Object.assign(rt.prototype,Nt)},toFlatObject:(rt,ht,Nt,wt)=>{let Mt,oe,qt;const de={};if(ht=ht||{},rt==null)return ht;do{for(Mt=Object.getOwnPropertyNames(rt),oe=Mt.length;oe-- >0;)qt=Mt[oe],wt&&!wt(qt,rt,ht)||de[qt]||(ht[qt]=rt[qt],de[qt]=!0);rt=Nt!==!1&&E(rt)}while(rt&&(!Nt||Nt(rt,ht))&&rt!==Object.prototype);return ht},kindOf:O,kindOfTest:m,endsWith:(rt,ht,Nt)=>{rt=String(rt),(Nt===void 0||Nt>rt.length)&&(Nt=rt.length),Nt-=ht.length;const wt=rt.indexOf(ht,Nt);return wt!==-1&&wt===Nt},toArray:rt=>{if(!rt)return null;if(f(rt))return rt;let ht=rt.length;if(!S(ht))return null;const Nt=new Array(ht);for(;ht-- >0;)Nt[ht]=rt[ht];return Nt},forEachEntry:(rt,ht)=>{const Nt=(rt&&rt[k]).call(rt);let wt;for(;(wt=Nt.next())&&!wt.done;){const Mt=wt.value;ht.call(rt,Mt[0],Mt[1])}},matchAll:(rt,ht)=>{let Nt;const wt=[];for(;(Nt=rt.exec(ht))!==null;)wt.push(Nt);return wt},isHTMLForm:Tt,hasOwnProperty:Ft,hasOwnProp:Ft,reduceDescriptors:bt,freezeMethods:rt=>{bt(rt,(ht,Nt)=>{if(R(rt)&&["arguments","caller","callee"].indexOf(Nt)!==-1)return!1;const wt=rt[Nt];R(wt)&&(ht.enumerable=!1,"writable"in ht?ht.writable=!1:ht.set||(ht.set=()=>{throw Error("Can not rewrite read-only method '"+Nt+"'")}))})},toObjectSet:(rt,ht)=>{const Nt={},wt=Mt=>{Mt.forEach(oe=>{Nt[oe]=!0})};return f(rt)?wt(rt):wt(String(rt).split(ht)),Nt},toCamelCase:rt=>rt.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(ht,Nt,wt){return Nt.toUpperCase()+wt}),noop:()=>{},toFiniteNumber:(rt,ht)=>rt!=null&&Number.isFinite(rt=+rt)?rt:ht,findKey:N,global:G,isContextDefined:tt,isSpecCompliantForm:function(rt){return!!(rt&&R(rt.append)&&rt[y]==="FormData"&&rt[k])},toJSONObject:rt=>{const ht=new Array(10),Nt=(wt,Mt)=>{if(C(wt)){if(ht.indexOf(wt)>=0)return;if(A(wt))return wt;if(!("toJSON"in wt)){ht[Mt]=wt;const oe=f(wt)?[]:{};return c(wt,(qt,de)=>{const fe=Nt(qt,Mt+1);!h(fe)&&(oe[de]=fe)}),ht[Mt]=void 0,oe}}return wt};return Nt(rt,0)},isAsyncFn:yt,isThenable:rt=>rt&&(C(rt)||R(rt))&&R(rt.then)&&R(rt.catch),setImmediate:dt,asap:Ct,isIterable:rt=>rt!=null&&R(rt[k])};class it extends Error{static from(ht,Nt,wt,Mt,oe,qt){const de=new it(ht.message,Nt||ht.code,wt,Mt,oe);return de.cause=ht,de.name=ht.name,ht.status!=null&&de.status==null&&(de.status=ht.status),qt&&Object.assign(de,qt),de}constructor(ht,Nt,wt,Mt,oe){super(ht),Object.defineProperty(this,"message",{value:ht,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Nt&&(this.code=Nt),wt&&(this.config=wt),Mt&&(this.request=Mt),oe&&(this.response=oe,this.status=oe.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:H.toJSONObject(this.config),code:this.code,status:this.status}}}it.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",it.ERR_BAD_OPTION="ERR_BAD_OPTION",it.ECONNABORTED="ECONNABORTED",it.ETIMEDOUT="ETIMEDOUT",it.ERR_NETWORK="ERR_NETWORK",it.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",it.ERR_DEPRECATED="ERR_DEPRECATED",it.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",it.ERR_BAD_REQUEST="ERR_BAD_REQUEST",it.ERR_CANCELED="ERR_CANCELED",it.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",it.ERR_INVALID_URL="ERR_INVALID_URL";const mt=it;var Dt=l(8287).Buffer;function T(rt){return H.isPlainObject(rt)||H.isArray(rt)}function L(rt){return H.endsWith(rt,"[]")?rt.slice(0,-2):rt}function $(rt,ht,Nt){return rt?rt.concat(ht).map(function(wt,Mt){return wt=L(wt),!Nt&&Mt?"["+wt+"]":wt}).join(Nt?".":""):ht}const St=H.toFlatObject(H,{},null,function(rt){return/^is[A-Z]/.test(rt)}),ft=function(rt,ht,Nt){if(!H.isObject(rt))throw new TypeError("target must be an object");ht=ht||new FormData;const wt=(Nt=H.toFlatObject(Nt,{metaTokens:!0,dots:!1,indexes:!1},!1,function(yr,hr){return!H.isUndefined(hr[yr])})).metaTokens,Mt=Nt.visitor||Fe,oe=Nt.dots,qt=Nt.indexes,de=(Nt.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(ht);if(!H.isFunction(Mt))throw new TypeError("visitor must be a function");function fe(yr){if(yr===null)return"";if(H.isDate(yr))return yr.toISOString();if(H.isBoolean(yr))return yr.toString();if(!de&&H.isBlob(yr))throw new mt("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(yr)||H.isTypedArray(yr)?de&&typeof Blob=="function"?new Blob([yr]):Dt.from(yr):yr}function Fe(yr,hr,qe){let sr=yr;if(H.isReactNative(ht)&&H.isReactNativeBlob(yr))return ht.append($(qe,hr,oe),fe(yr)),!1;if(yr&&!qe&&typeof yr=="object"){if(H.endsWith(hr,"{}"))hr=wt?hr:hr.slice(0,-2),yr=JSON.stringify(yr);else if(H.isArray(yr)&&function(br){return H.isArray(br)&&!br.some(T)}(yr)||(H.isFileList(yr)||H.endsWith(hr,"[]"))&&(sr=H.toArray(yr)))return hr=L(hr),sr.forEach(function(br,ar){!H.isUndefined(br)&&br!==null&&ht.append(qt===!0?$([hr],ar,oe):qt===null?hr:hr+"[]",fe(br))}),!1}return!!T(yr)||(ht.append($(qe,hr,oe),fe(yr)),!1)}const tr=[],dr=Object.assign(St,{defaultVisitor:Fe,convertValue:fe,isVisitable:T});if(!H.isObject(rt))throw new TypeError("data must be an object");return function yr(hr,qe){if(!H.isUndefined(hr)){if(tr.indexOf(hr)!==-1)throw Error("Circular reference detected in "+qe.join("."));tr.push(hr),H.forEach(hr,function(sr,br){(!(H.isUndefined(sr)||sr===null)&&Mt.call(ht,sr,H.isString(br)?br.trim():br,qe,dr))===!0&&yr(sr,qe?qe.concat(br):[br])}),tr.pop()}}(rt),ht};function ee(rt){const ht={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(rt).replace(/[!'()~]|%20|%00/g,function(Nt){return ht[Nt]})}function _(rt,ht){this._pairs=[],rt&&ft(rt,this,ht)}const W=_.prototype;W.append=function(rt,ht){this._pairs.push([rt,ht])},W.toString=function(rt){const ht=rt?function(Nt){return rt.call(this,Nt,ee)}:ee;return this._pairs.map(function(Nt){return ht(Nt[0])+"="+ht(Nt[1])},"").join("&")};const at=_;function Xt(rt){return encodeURIComponent(rt).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ae(rt,ht,Nt){if(!ht)return rt;const wt=Nt&&Nt.encode||Xt,Mt=H.isFunction(Nt)?{serialize:Nt}:Nt,oe=Mt&&Mt.serialize;let qt;if(qt=oe?oe(ht,Mt):H.isURLSearchParams(ht)?ht.toString():new at(ht,Mt).toString(wt),qt){const de=rt.indexOf("#");de!==-1&&(rt=rt.slice(0,de)),rt+=(rt.indexOf("?")===-1?"?":"&")+qt}return rt}const Kt=class{constructor(){this.handlers=[]}use(rt,ht,Nt){return this.handlers.push({fulfilled:rt,rejected:ht,synchronous:!!Nt&&Nt.synchronous,runWhen:Nt?Nt.runWhen:null}),this.handlers.length-1}eject(rt){this.handlers[rt]&&(this.handlers[rt]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(rt){H.forEach(this.handlers,function(ht){ht!==null&&rt(ht)})}},Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},D={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:at,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},et=typeof window<"u"&&typeof document<"u",gt=typeof navigator=="object"&&navigator||void 0,Yt=et&&(!gt||["ReactNative","NativeScript","NS"].indexOf(gt.product)<0),le=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",we=et&&window.location.href||"http://localhost",ie={...v,...D},U=function(rt){function ht(Nt,wt,Mt,oe){let qt=Nt[oe++];if(qt==="__proto__")return!0;const de=Number.isFinite(+qt),fe=oe>=Nt.length;return qt=!qt&&H.isArray(Mt)?Mt.length:qt,fe?(H.hasOwnProp(Mt,qt)?Mt[qt]=[Mt[qt],wt]:Mt[qt]=wt,!de):(Mt[qt]&&H.isObject(Mt[qt])||(Mt[qt]=[]),ht(Nt,wt,Mt[qt],oe)&&H.isArray(Mt[qt])&&(Mt[qt]=function(Fe){const tr={},dr=Object.keys(Fe);let yr;const hr=dr.length;let qe;for(yr=0;yr{ht(function(oe){return H.matchAll(/\w+|\[(\w*)]/g,oe).map(qt=>qt[0]==="[]"?"":qt[1]||qt[0])}(wt),Mt,Nt,0)}),Nt}return null},X={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(rt,ht){const Nt=ht.getContentType()||"",wt=Nt.indexOf("application/json")>-1,Mt=H.isObject(rt);if(Mt&&H.isHTMLForm(rt)&&(rt=new FormData(rt)),H.isFormData(rt))return wt?JSON.stringify(U(rt)):rt;if(H.isArrayBuffer(rt)||H.isBuffer(rt)||H.isStream(rt)||H.isFile(rt)||H.isBlob(rt)||H.isReadableStream(rt))return rt;if(H.isArrayBufferView(rt))return rt.buffer;if(H.isURLSearchParams(rt))return ht.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),rt.toString();let oe;if(Mt){if(Nt.indexOf("application/x-www-form-urlencoded")>-1)return function(qt,de){return ft(qt,new ie.classes.URLSearchParams,{visitor:function(fe,Fe,tr,dr){return ie.isNode&&H.isBuffer(fe)?(this.append(Fe,fe.toString("base64")),!1):dr.defaultVisitor.apply(this,arguments)},...de})}(rt,this.formSerializer).toString();if((oe=H.isFileList(rt))||Nt.indexOf("multipart/form-data")>-1){const qt=this.env&&this.env.FormData;return ft(oe?{"files[]":rt}:rt,qt&&new qt,this.formSerializer)}}return Mt||wt?(ht.setContentType("application/json",!1),function(qt,de,fe){if(H.isString(qt))try{return(de||JSON.parse)(qt),H.trim(qt)}catch(Fe){if(Fe.name!=="SyntaxError")throw Fe}return(fe||JSON.stringify)(qt)}(rt)):rt}],transformResponse:[function(rt){const ht=this.transitional||X.transitional,Nt=ht&&ht.forcedJSONParsing,wt=this.responseType==="json";if(H.isResponse(rt)||H.isReadableStream(rt))return rt;if(rt&&H.isString(rt)&&(Nt&&!this.responseType||wt)){const Mt=!(ht&&ht.silentJSONParsing)&&wt;try{return JSON.parse(rt,this.parseReviver)}catch(oe){if(Mt)throw oe.name==="SyntaxError"?mt.from(oe,mt.ERR_BAD_RESPONSE,this,null,this.response):oe}}return rt}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(rt){return rt>=200&&rt<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],rt=>{X.headers[rt]={}});const Pt=X,Ht=H.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"]),re=Symbol("internals");function We(rt,ht){if(rt!==!1&&rt!=null){if(H.isArray(rt))rt.forEach(Nt=>We(Nt,ht));else if(!(Nt=>!/[\r\n]/.test(Nt))(String(rt)))throw new Error(`Invalid character in header content ["${ht}"]`)}}function xe(rt){return rt&&String(rt).trim().toLowerCase()}function je(rt){return rt===!1||rt==null?rt:H.isArray(rt)?rt.map(je):function(ht){let Nt=ht.length;for(;Nt>0;){const wt=ht.charCodeAt(Nt-1);if(wt!==10&&wt!==13)break;Nt-=1}return Nt===ht.length?ht:ht.slice(0,Nt)}(String(rt))}function Qe(rt,ht,Nt,wt,Mt){return H.isFunction(wt)?wt.call(this,ht,Nt):(Mt&&(ht=Nt),H.isString(ht)?H.isString(wt)?ht.indexOf(wt)!==-1:H.isRegExp(wt)?wt.test(ht):void 0:void 0)}class Oe{constructor(ht){ht&&this.set(ht)}set(ht,Nt,wt){const Mt=this;function oe(de,fe,Fe){const tr=xe(fe);if(!tr)throw new Error("header name must be a non-empty string");const dr=H.findKey(Mt,tr);(!dr||Mt[dr]===void 0||Fe===!0||Fe===void 0&&Mt[dr]!==!1)&&(We(de,fe),Mt[dr||fe]=je(de))}const qt=(de,fe)=>H.forEach(de,(Fe,tr)=>oe(Fe,tr,fe));if(H.isPlainObject(ht)||ht instanceof this.constructor)qt(ht,Nt);else if(H.isString(ht)&&(ht=ht.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(ht.trim()))qt((de=>{const fe={};let Fe,tr,dr;return de&&de.split(` +`).forEach(function(yr){dr=yr.indexOf(":"),Fe=yr.substring(0,dr).trim().toLowerCase(),tr=yr.substring(dr+1).trim(),!Fe||fe[Fe]&&Ht[Fe]||(Fe==="set-cookie"?fe[Fe]?fe[Fe].push(tr):fe[Fe]=[tr]:fe[Fe]=fe[Fe]?fe[Fe]+", "+tr:tr)}),fe})(ht),Nt);else if(H.isObject(ht)&&H.isIterable(ht)){let de,fe,Fe={};for(const tr of ht){if(!H.isArray(tr))throw TypeError("Object iterator must return a key-value pair");Fe[fe=tr[0]]=(de=Fe[fe])?H.isArray(de)?[...de,tr[1]]:[de,tr[1]]:tr[1]}qt(Fe,Nt)}else ht!=null&&oe(Nt,ht,wt);return this}get(ht,Nt){if(ht=xe(ht)){const wt=H.findKey(this,ht);if(wt){const Mt=this[wt];if(!Nt)return Mt;if(Nt===!0)return function(oe){const qt=Object.create(null),de=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let fe;for(;fe=de.exec(oe);)qt[fe[1]]=fe[2];return qt}(Mt);if(H.isFunction(Nt))return Nt.call(this,Mt,wt);if(H.isRegExp(Nt))return Nt.exec(Mt);throw new TypeError("parser must be boolean|regexp|function")}}}has(ht,Nt){if(ht=xe(ht)){const wt=H.findKey(this,ht);return!(!wt||this[wt]===void 0||Nt&&!Qe(0,this[wt],wt,Nt))}return!1}delete(ht,Nt){const wt=this;let Mt=!1;function oe(qt){if(qt=xe(qt)){const de=H.findKey(wt,qt);!de||Nt&&!Qe(0,wt[de],de,Nt)||(delete wt[de],Mt=!0)}}return H.isArray(ht)?ht.forEach(oe):oe(ht),Mt}clear(ht){const Nt=Object.keys(this);let wt=Nt.length,Mt=!1;for(;wt--;){const oe=Nt[wt];ht&&!Qe(0,this[oe],oe,ht,!0)||(delete this[oe],Mt=!0)}return Mt}normalize(ht){const Nt=this,wt={};return H.forEach(this,(Mt,oe)=>{const qt=H.findKey(wt,oe);if(qt)return Nt[qt]=je(Mt),void delete Nt[oe];const de=ht?function(fe){return fe.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Fe,tr,dr)=>tr.toUpperCase()+dr)}(oe):String(oe).trim();de!==oe&&delete Nt[oe],Nt[de]=je(Mt),wt[de]=!0}),this}concat(...ht){return this.constructor.concat(this,...ht)}toJSON(ht){const Nt=Object.create(null);return H.forEach(this,(wt,Mt)=>{wt!=null&&wt!==!1&&(Nt[Mt]=ht&&H.isArray(wt)?wt.join(", "):wt)}),Nt}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([ht,Nt])=>ht+": "+Nt).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(ht){return ht instanceof this?ht:new this(ht)}static concat(ht,...Nt){const wt=new this(ht);return Nt.forEach(Mt=>wt.set(Mt)),wt}static accessor(ht){const Nt=(this[re]=this[re]={accessors:{}}).accessors,wt=this.prototype;function Mt(oe){const qt=xe(oe);Nt[qt]||(function(de,fe){const Fe=H.toCamelCase(" "+fe);["get","set","has"].forEach(tr=>{Object.defineProperty(de,tr+Fe,{value:function(dr,yr,hr){return this[tr].call(this,fe,dr,yr,hr)},configurable:!0})})}(wt,oe),Nt[qt]=!0)}return H.isArray(ht)?ht.forEach(Mt):Mt(ht),this}}Oe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Oe.prototype,({value:rt},ht)=>{let Nt=ht[0].toUpperCase()+ht.slice(1);return{get:()=>rt,set(wt){this[Nt]=wt}}}),H.freezeMethods(Oe);const Cr=Oe;function ur(rt,ht){const Nt=this||Pt,wt=ht||Nt,Mt=Cr.from(wt.headers);let oe=wt.data;return H.forEach(rt,function(qt){oe=qt.call(Nt,oe,Mt.normalize(),ht?ht.status:void 0)}),Mt.normalize(),oe}function jr(rt){return!(!rt||!rt.__CANCEL__)}const rn=class extends mt{constructor(rt,ht,Nt){super(rt??"canceled",mt.ERR_CANCELED,ht,Nt),this.name="CanceledError",this.__CANCEL__=!0}};function _n(rt,ht,Nt){const wt=Nt.config.validateStatus;Nt.status&&wt&&!wt(Nt.status)?ht(new mt("Request failed with status code "+Nt.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(Nt.status/100)-4],Nt.config,Nt.request,Nt)):rt(Nt)}const io=function(rt,ht){rt=rt||10;const Nt=new Array(rt),wt=new Array(rt);let Mt,oe=0,qt=0;return ht=ht!==void 0?ht:1e3,function(de){const fe=Date.now(),Fe=wt[qt];Mt||(Mt=fe),Nt[oe]=de,wt[oe]=fe;let tr=qt,dr=0;for(;tr!==oe;)dr+=Nt[tr++],tr%=rt;if(oe=(oe+1)%rt,oe===qt&&(qt=(qt+1)%rt),fe-Mt{Mt=fe,Nt=null,wt&&(clearTimeout(wt),wt=null),rt(...de)};return[(...de)=>{const fe=Date.now(),Fe=fe-Mt;Fe>=oe?qt(de,fe):(Nt=de,wt||(wt=setTimeout(()=>{wt=null,qt(Nt)},oe-Fe)))},()=>Nt&&qt(Nt)]},ao=(rt,ht,Nt=3)=>{let wt=0;const Mt=io(50,250);return qn(oe=>{const qt=oe.loaded,de=oe.lengthComputable?oe.total:void 0,fe=qt-wt,Fe=Mt(fe);wt=qt,rt({loaded:qt,total:de,progress:de?qt/de:void 0,bytes:fe,rate:Fe||void 0,estimated:Fe&&de&&qt<=de?(de-qt)/Fe:void 0,event:oe,lengthComputable:de!=null,[ht?"download":"upload"]:!0})},Nt)},so=(rt,ht)=>{const Nt=rt!=null;return[wt=>ht[0]({lengthComputable:Nt,total:rt,loaded:wt}),ht[1]]},Qo=rt=>(...ht)=>H.asap(()=>rt(...ht)),uo=ie.hasStandardBrowserEnv?((rt,ht)=>Nt=>(Nt=new URL(Nt,ie.origin),rt.protocol===Nt.protocol&&rt.host===Nt.host&&(ht||rt.port===Nt.port)))(new URL(ie.origin),ie.navigator&&/(msie|trident)/i.test(ie.navigator.userAgent)):()=>!0,ni=ie.hasStandardBrowserEnv?{write(rt,ht,Nt,wt,Mt,oe,qt){if(typeof document>"u")return;const de=[`${rt}=${encodeURIComponent(ht)}`];H.isNumber(Nt)&&de.push(`expires=${new Date(Nt).toUTCString()}`),H.isString(wt)&&de.push(`path=${wt}`),H.isString(Mt)&&de.push(`domain=${Mt}`),oe===!0&&de.push("secure"),H.isString(qt)&&de.push(`SameSite=${qt}`),document.cookie=de.join("; ")},read(rt){if(typeof document>"u")return null;const ht=document.cookie.match(new RegExp("(?:^|; )"+rt+"=([^;]*)"));return ht?decodeURIComponent(ht[1]):null},remove(rt){this.write(rt,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function kn(rt,ht,Nt){let wt=!(typeof(Mt=ht)=="string"&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Mt));var Mt;return rt&&(wt||Nt==0)?function(oe,qt){return qt?oe.replace(/\/?\/$/,"")+"/"+qt.replace(/^\/+/,""):oe}(rt,ht):ht}const Yr=rt=>rt instanceof Cr?{...rt}:rt;function mn(rt,ht){ht=ht||{};const Nt={};function wt(Fe,tr,dr,yr){return H.isPlainObject(Fe)&&H.isPlainObject(tr)?H.merge.call({caseless:yr},Fe,tr):H.isPlainObject(tr)?H.merge({},tr):H.isArray(tr)?tr.slice():tr}function Mt(Fe,tr,dr,yr){return H.isUndefined(tr)?H.isUndefined(Fe)?void 0:wt(void 0,Fe,0,yr):wt(Fe,tr,0,yr)}function oe(Fe,tr){if(!H.isUndefined(tr))return wt(void 0,tr)}function qt(Fe,tr){return H.isUndefined(tr)?H.isUndefined(Fe)?void 0:wt(void 0,Fe):wt(void 0,tr)}function de(Fe,tr,dr){return dr in ht?wt(Fe,tr):dr in rt?wt(void 0,Fe):void 0}const fe={url:oe,method:oe,data:oe,baseURL:qt,transformRequest:qt,transformResponse:qt,paramsSerializer:qt,timeout:qt,timeoutMessage:qt,withCredentials:qt,withXSRFToken:qt,adapter:qt,responseType:qt,xsrfCookieName:qt,xsrfHeaderName:qt,onUploadProgress:qt,onDownloadProgress:qt,decompress:qt,maxContentLength:qt,maxBodyLength:qt,beforeRedirect:qt,transport:qt,httpAgent:qt,httpsAgent:qt,cancelToken:qt,socketPath:qt,responseEncoding:qt,validateStatus:de,headers:(Fe,tr,dr)=>Mt(Yr(Fe),Yr(tr),0,!0)};return H.forEach(Object.keys({...rt,...ht}),function(Fe){if(Fe==="__proto__"||Fe==="constructor"||Fe==="prototype")return;const tr=H.hasOwnProp(fe,Fe)?fe[Fe]:Mt,dr=tr(rt[Fe],ht[Fe],Fe);H.isUndefined(dr)&&tr!==de||(Nt[Fe]=dr)}),Nt}const to=rt=>{const ht=mn({},rt);let{data:Nt,withXSRFToken:wt,xsrfHeaderName:Mt,xsrfCookieName:oe,headers:qt,auth:de}=ht;if(ht.headers=qt=Cr.from(qt),ht.url=ae(kn(ht.baseURL,ht.url,ht.allowAbsoluteUrls),rt.params,rt.paramsSerializer),de&&qt.set("Authorization","Basic "+btoa((de.username||"")+":"+(de.password?unescape(encodeURIComponent(de.password)):""))),H.isFormData(Nt)){if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)qt.setContentType(void 0);else if(H.isFunction(Nt.getHeaders)){const fe=Nt.getHeaders(),Fe=["content-type","content-length"];Object.entries(fe).forEach(([tr,dr])=>{Fe.includes(tr.toLowerCase())&&qt.set(tr,dr)})}}if(ie.hasStandardBrowserEnv&&(wt&&H.isFunction(wt)&&(wt=wt(ht)),wt||wt!==!1&&uo(ht.url))){const fe=Mt&&oe&&ni.read(oe);fe&&qt.set(Mt,fe)}return ht},Yo=typeof XMLHttpRequest<"u"&&function(rt){return new Promise(function(ht,Nt){const wt=to(rt);let Mt=wt.data;const oe=Cr.from(wt.headers).normalize();let qt,de,fe,Fe,tr,{responseType:dr,onUploadProgress:yr,onDownloadProgress:hr}=wt;function qe(){Fe&&Fe(),tr&&tr(),wt.cancelToken&&wt.cancelToken.unsubscribe(qt),wt.signal&&wt.signal.removeEventListener("abort",qt)}let sr=new XMLHttpRequest;function br(){if(!sr)return;const Nr=Cr.from("getAllResponseHeaders"in sr&&sr.getAllResponseHeaders());_n(function(In){ht(In),qe()},function(In){Nt(In),qe()},{data:dr&&dr!=="text"&&dr!=="json"?sr.response:sr.responseText,status:sr.status,statusText:sr.statusText,headers:Nr,config:rt,request:sr}),sr=null}sr.open(wt.method.toUpperCase(),wt.url,!0),sr.timeout=wt.timeout,"onloadend"in sr?sr.onloadend=br:sr.onreadystatechange=function(){sr&&sr.readyState===4&&(sr.status!==0||sr.responseURL&&sr.responseURL.indexOf("file:")===0)&&setTimeout(br)},sr.onabort=function(){sr&&(Nt(new mt("Request aborted",mt.ECONNABORTED,rt,sr)),sr=null)},sr.onerror=function(Nr){const In=Nr&&Nr.message?Nr.message:"Network Error",$n=new mt(In,mt.ERR_NETWORK,rt,sr);$n.event=Nr||null,Nt($n),sr=null},sr.ontimeout=function(){let Nr=wt.timeout?"timeout of "+wt.timeout+"ms exceeded":"timeout exceeded";const In=wt.transitional||Ne;wt.timeoutErrorMessage&&(Nr=wt.timeoutErrorMessage),Nt(new mt(Nr,In.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,rt,sr)),sr=null},Mt===void 0&&oe.setContentType(null),"setRequestHeader"in sr&&H.forEach(oe.toJSON(),function(Nr,In){sr.setRequestHeader(In,Nr)}),H.isUndefined(wt.withCredentials)||(sr.withCredentials=!!wt.withCredentials),dr&&dr!=="json"&&(sr.responseType=wt.responseType),hr&&([fe,tr]=ao(hr,!0),sr.addEventListener("progress",fe)),yr&&sr.upload&&([de,Fe]=ao(yr),sr.upload.addEventListener("progress",de),sr.upload.addEventListener("loadend",Fe)),(wt.cancelToken||wt.signal)&&(qt=Nr=>{sr&&(Nt(!Nr||Nr.type?new rn(null,rt,sr):Nr),sr.abort(),sr=null)},wt.cancelToken&&wt.cancelToken.subscribe(qt),wt.signal&&(wt.signal.aborted?qt():wt.signal.addEventListener("abort",qt)));const ar=function(Nr){const In=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Nr);return In&&In[1]||""}(wt.url);ar&&ie.protocols.indexOf(ar)===-1?Nt(new mt("Unsupported protocol "+ar+":",mt.ERR_BAD_REQUEST,rt)):sr.send(Mt||null)})},co=(rt,ht)=>{const{length:Nt}=rt=rt?rt.filter(Boolean):[];if(ht||Nt){let wt,Mt=new AbortController;const oe=function(Fe){if(!wt){wt=!0,de();const tr=Fe instanceof Error?Fe:this.reason;Mt.abort(tr instanceof mt?tr:new rn(tr instanceof Error?tr.message:tr))}};let qt=ht&&setTimeout(()=>{qt=null,oe(new mt(`timeout of ${ht}ms exceeded`,mt.ETIMEDOUT))},ht);const de=()=>{rt&&(qt&&clearTimeout(qt),qt=null,rt.forEach(Fe=>{Fe.unsubscribe?Fe.unsubscribe(oe):Fe.removeEventListener("abort",oe)}),rt=null)};rt.forEach(Fe=>Fe.addEventListener("abort",oe));const{signal:fe}=Mt;return fe.unsubscribe=()=>H.asap(de),fe}},pn=function*(rt,ht){let Nt=rt.byteLength;if(Nt{const Mt=async function*(fe,Fe){for await(const tr of jn(fe))yield*pn(tr,Fe)}(rt,ht);let oe,qt=0,de=fe=>{oe||(oe=!0,wt&&wt(fe))};return new ReadableStream({async pull(fe){try{const{done:Fe,value:tr}=await Mt.next();if(Fe)return de(),void fe.close();let dr=tr.byteLength;if(Nt){let yr=qt+=dr;Nt(yr)}fe.enqueue(new Uint8Array(tr))}catch(Fe){throw de(Fe),Fe}},cancel:fe=>(de(fe),Mt.return())},{highWaterMark:2})},{isFunction:Xr}=H,Wn=(({Request:rt,Response:ht})=>({Request:rt,Response:ht}))(H.global),{ReadableStream:un,TextEncoder:xn}=H.global,yo=(rt,...ht)=>{try{return!!rt(...ht)}catch{return!1}},bi=rt=>{rt=H.merge.call({skipUndefined:!0},Wn,rt);const{fetch:ht,Request:Nt,Response:wt}=rt,Mt=ht?Xr(ht):typeof fetch=="function",oe=Xr(Nt),qt=Xr(wt);if(!Mt)return!1;const de=Mt&&Xr(un),fe=Mt&&(typeof xn=="function"?(Fe=new xn,qe=>Fe.encode(qe)):async qe=>new Uint8Array(await new Nt(qe).arrayBuffer()));var Fe;const tr=oe&&de&&yo(()=>{let qe=!1;const sr=new un,br=new Nt(ie.origin,{body:sr,method:"POST",get duplex(){return qe=!0,"half"}}).headers.has("Content-Type");return sr.cancel(),qe&&!br}),dr=qt&&de&&yo(()=>H.isReadableStream(new wt("").body)),yr={stream:dr&&(qe=>qe.body)};Mt&&["text","arrayBuffer","blob","formData","stream"].forEach(qe=>{!yr[qe]&&(yr[qe]=(sr,br)=>{let ar=sr&&sr[qe];if(ar)return ar.call(sr);throw new mt(`Response type '${qe}' is not supported`,mt.ERR_NOT_SUPPORT,br)})});const hr=async(qe,sr)=>{const br=H.toFiniteNumber(qe.getContentLength());return br??(async ar=>ar==null?0:H.isBlob(ar)?ar.size:H.isSpecCompliantForm(ar)?(await new Nt(ie.origin,{method:"POST",body:ar}).arrayBuffer()).byteLength:H.isArrayBufferView(ar)||H.isArrayBuffer(ar)?ar.byteLength:(H.isURLSearchParams(ar)&&(ar+=""),H.isString(ar)?(await fe(ar)).byteLength:void 0))(sr)};return async qe=>{let{url:sr,method:br,data:ar,signal:Nr,cancelToken:In,timeout:$n,onDownloadProgress:To,onUploadProgress:jo,responseType:go,headers:oi,withCredentials:wi="same-origin",fetchOptions:Bn}=to(qe),Wo=ht||fetch;go=go?(go+"").toLowerCase():"text";let Hn=co([Nr,In&&In.toAbortSignal()],$n),lo=null;const xo=Hn&&Hn.unsubscribe&&(()=>{Hn.unsubscribe()});let bn;try{if(jo&&tr&&br!=="get"&&br!=="head"&&(bn=await hr(oi,ar))!==0){let Xn,Sn=new Nt(sr,{method:"POST",body:ar,duplex:"half"});if(H.isFormData(ar)&&(Xn=Sn.headers.get("content-type"))&&oi.setContentType(Xn),Sn.body){const[di,ii]=so(bn,ao(Qo(jo)));ar=Tn(Sn.body,65536,di,ii)}}H.isString(wi)||(wi=wi?"include":"omit");const eo=oe&&"credentials"in Nt.prototype,Mr={...Bn,signal:Hn,method:br.toUpperCase(),headers:oi.normalize().toJSON(),body:ar,duplex:"half",credentials:eo?wi:void 0};lo=oe&&new Nt(sr,Mr);let Vn=await(oe?Wo(lo,Bn):Wo(sr,Mr));const Xo=dr&&(go==="stream"||go==="response");if(dr&&(To||Xo&&xo)){const Xn={};["status","statusText","headers"].forEach(la=>{Xn[la]=Vn[la]});const Sn=H.toFiniteNumber(Vn.headers.get("content-length")),[di,ii]=To&&so(Sn,ao(Qo(To),!0))||[];Vn=new wt(Tn(Vn.body,65536,di,()=>{ii&&ii(),xo&&xo()}),Xn)}go=go||"text";let xi=await yr[H.findKey(yr,go)||"text"](Vn,qe);return!Xo&&xo&&xo(),await new Promise((Xn,Sn)=>{_n(Xn,Sn,{data:xi,headers:Cr.from(Vn.headers),status:Vn.status,statusText:Vn.statusText,config:qe,request:lo})})}catch(eo){throw xo&&xo(),eo&&eo.name==="TypeError"&&/Load failed|fetch/i.test(eo.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,qe,lo,eo&&eo.response),{cause:eo.cause||eo}):mt.from(eo,eo&&eo.code,qe,lo,eo&&eo.response)}}},pi=new Map,Ui=rt=>{let ht=rt&&rt.env||{};const{fetch:Nt,Request:wt,Response:Mt}=ht,oe=[wt,Mt,Nt];let qt,de,fe=oe.length,Fe=pi;for(;fe--;)qt=oe[fe],de=Fe.get(qt),de===void 0&&Fe.set(qt,de=fe?new Map:bi(ht)),Fe=de;return de},Jo=(Ui(),{http:null,xhr:Yo,fetch:{get:Ui}});H.forEach(Jo,(rt,ht)=>{if(rt){try{Object.defineProperty(rt,"name",{value:ht})}catch{}Object.defineProperty(rt,"adapterName",{value:ht})}});const Bo=rt=>`- ${rt}`,Ji=rt=>H.isFunction(rt)||rt===null||rt===!1,It={getAdapter:function(rt,ht){rt=H.isArray(rt)?rt:[rt];const{length:Nt}=rt;let wt,Mt;const oe={};for(let qt=0;qt`adapter ${fe} `+(Fe===!1?"is not supported by the environment":"is not available in the build"));let de=Nt?qt.length>1?`since : +`+qt.map(Bo).join(` +`):" "+Bo(qt[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+de,"ERR_NOT_SUPPORT")}return Mt},adapters:Jo};function ct(rt){if(rt.cancelToken&&rt.cancelToken.throwIfRequested(),rt.signal&&rt.signal.aborted)throw new rn(null,rt)}function Zt(rt){return ct(rt),rt.headers=Cr.from(rt.headers),rt.data=ur.call(rt,rt.transformRequest),["post","put","patch"].indexOf(rt.method)!==-1&&rt.headers.setContentType("application/x-www-form-urlencoded",!1),It.getAdapter(rt.adapter||Pt.adapter,rt)(rt).then(function(ht){return ct(rt),ht.data=ur.call(rt,rt.transformResponse,ht),ht.headers=Cr.from(ht.headers),ht},function(ht){return jr(ht)||(ct(rt),ht&&ht.response&&(ht.response.data=ur.call(rt,rt.transformResponse,ht.response),ht.response.headers=Cr.from(ht.response.headers))),Promise.reject(ht)})}const pe="1.15.0",Gt={};["object","boolean","number","function","string","symbol"].forEach((rt,ht)=>{Gt[rt]=function(Nt){return typeof Nt===rt||"a"+(ht<1?"n ":" ")+rt}});const be={};Gt.transitional=function(rt,ht,Nt){function wt(Mt,oe){return"[Axios v"+pe+"] Transitional option '"+Mt+"'"+oe+(Nt?". "+Nt:"")}return(Mt,oe,qt)=>{if(rt===!1)throw new mt(wt(oe," has been removed"+(ht?" in "+ht:"")),mt.ERR_DEPRECATED);return ht&&!be[oe]&&(be[oe]=!0,console.warn(wt(oe," has been deprecated since v"+ht+" and will be removed in the near future"))),!rt||rt(Mt,oe,qt)}},Gt.spelling=function(rt){return(ht,Nt)=>(console.warn(`${Nt} is likely a misspelling of ${rt}`),!0)};const Le={assertOptions:function(rt,ht,Nt){if(typeof rt!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);const wt=Object.keys(rt);let Mt=wt.length;for(;Mt-- >0;){const oe=wt[Mt],qt=ht[oe];if(qt){const de=rt[oe],fe=de===void 0||qt(de,oe,rt);if(fe!==!0)throw new mt("option "+oe+" must be "+fe,mt.ERR_BAD_OPTION_VALUE);continue}if(Nt!==!0)throw new mt("Unknown option "+oe,mt.ERR_BAD_OPTION)}},validators:Gt},De=Le.validators;class he{constructor(ht){this.defaults=ht||{},this.interceptors={request:new Kt,response:new Kt}}async request(ht,Nt){try{return await this._request(ht,Nt)}catch(wt){if(wt instanceof Error){let Mt={};Error.captureStackTrace?Error.captureStackTrace(Mt):Mt=new Error;const oe=(()=>{if(!Mt.stack)return"";const qt=Mt.stack.indexOf(` +`);return qt===-1?"":Mt.stack.slice(qt+1)})();try{if(wt.stack){if(oe){const qt=oe.indexOf(` +`),de=qt===-1?-1:oe.indexOf(` +`,qt+1),fe=de===-1?"":oe.slice(de+1);String(wt.stack).endsWith(fe)||(wt.stack+=` +`+oe)}}else wt.stack=oe}catch{}}throw wt}}_request(ht,Nt){typeof ht=="string"?(Nt=Nt||{}).url=ht:Nt=ht||{},Nt=mn(this.defaults,Nt);const{transitional:wt,paramsSerializer:Mt,headers:oe}=Nt;wt!==void 0&&Le.assertOptions(wt,{silentJSONParsing:De.transitional(De.boolean),forcedJSONParsing:De.transitional(De.boolean),clarifyTimeoutError:De.transitional(De.boolean),legacyInterceptorReqResOrdering:De.transitional(De.boolean)},!1),Mt!=null&&(H.isFunction(Mt)?Nt.paramsSerializer={serialize:Mt}:Le.assertOptions(Mt,{encode:De.function,serialize:De.function},!0)),Nt.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?Nt.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:Nt.allowAbsoluteUrls=!0),Le.assertOptions(Nt,{baseUrl:De.spelling("baseURL"),withXsrfToken:De.spelling("withXSRFToken")},!0),Nt.method=(Nt.method||this.defaults.method||"get").toLowerCase();let qt=oe&&H.merge(oe.common,oe[Nt.method]);oe&&H.forEach(["delete","get","head","post","put","patch","common"],qe=>{delete oe[qe]}),Nt.headers=Cr.concat(qt,oe);const de=[];let fe=!0;this.interceptors.request.forEach(function(qe){if(typeof qe.runWhen=="function"&&qe.runWhen(Nt)===!1)return;fe=fe&&qe.synchronous;const sr=Nt.transitional||Ne;sr&&sr.legacyInterceptorReqResOrdering?de.unshift(qe.fulfilled,qe.rejected):de.push(qe.fulfilled,qe.rejected)});const Fe=[];let tr;this.interceptors.response.forEach(function(qe){Fe.push(qe.fulfilled,qe.rejected)});let dr,yr=0;if(!fe){const qe=[Zt.bind(this),void 0];for(qe.unshift(...de),qe.push(...Fe),dr=qe.length,tr=Promise.resolve(Nt);yr{if(!wt._listeners)return;let oe=wt._listeners.length;for(;oe-- >0;)wt._listeners[oe](Mt);wt._listeners=null}),this.promise.then=Mt=>{let oe;const qt=new Promise(de=>{wt.subscribe(de),oe=de}).then(Mt);return qt.cancel=function(){wt.unsubscribe(oe)},qt},ht(function(Mt,oe,qt){wt.reason||(wt.reason=new rn(Mt,oe,qt),Nt(wt.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(ht){this.reason?ht(this.reason):this._listeners?this._listeners.push(ht):this._listeners=[ht]}unsubscribe(ht){if(!this._listeners)return;const Nt=this._listeners.indexOf(ht);Nt!==-1&&this._listeners.splice(Nt,1)}toAbortSignal(){const ht=new AbortController,Nt=wt=>{ht.abort(wt)};return this.subscribe(Nt),ht.signal.unsubscribe=()=>this.unsubscribe(Nt),ht.signal}static source(){let ht;return{token:new me(function(Nt){ht=Nt}),cancel:ht}}}const Ze=me,Er={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(Er).forEach(([rt,ht])=>{Er[ht]=rt});const fr=Er,F=function rt(ht){const Nt=new ve(ht),wt=z(ve.prototype.request,Nt);return H.extend(wt,ve.prototype,Nt,{allOwnKeys:!0}),H.extend(wt,Nt,null,{allOwnKeys:!0}),wt.create=function(Mt){return rt(mn(ht,Mt))},wt}(Pt);F.Axios=ve,F.CanceledError=rn,F.CancelToken=Ze,F.isCancel=jr,F.VERSION=pe,F.toFormData=ft,F.AxiosError=mt,F.Cancel=F.CanceledError,F.all=function(rt){return Promise.all(rt)},F.spread=function(rt){return function(ht){return rt.apply(null,ht)}},F.isAxiosError=function(rt){return H.isObject(rt)&&rt.isAxiosError===!0},F.mergeConfig=mn,F.AxiosHeaders=Cr,F.formToJSON=rt=>U(H.isHTMLForm(rt)?new FormData(rt):rt),F.getAdapter=It.getAdapter,F.HttpStatusCode=fr,F.default=F;var nr=F,Ur=F.create},9983(P,M,l){function v(p){return v=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},v(p)}function z(p,f){for(var h=0;hu,ok:()=>O}),E=function p(f){var h,A=this;(function(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")})(this,p),this.promise=new Promise(function(g){h=g}),f(function(g){A.reason=g,h()})},(k=[{key:"throwIfRequested",value:function(){if(this.reason)throw new Error(this.reason)}}])&&z(E.prototype,k),y&&z(E,y),Object.defineProperty(E,"prototype",{writable:!1});var E,k,y,O,u,m=l(6121);O=m.axiosClient,u=m.create},4356(P,M,l){l.r(M),l.d(M,{AccountRequiresMemoError:()=>v.Cu,BadRequestError:()=>v.v7,BadResponseError:()=>v.nS,BindingGenerator:()=>f.fe,Config:()=>z.T,Federation:()=>k,Friendbot:()=>O,Horizon:()=>u,NetworkError:()=>v.Dr,NotFoundError:()=>v.m_,StellarToml:()=>E,Utils:()=>s.A,WebAuth:()=>y,contract:()=>p,default:()=>g,rpc:()=>m});var v=l(5976),z=l(8732),s=l(3121),E=l(3898),k=l(6602),y=l(7504),O=l(8242),u=l(8733),m=l(3496),p=l(8250),f=l(6682),h=l(8950),A={};for(const w in h)["default","Config","Utils","BindingGenerator","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(w)<0&&(A[w]=()=>h[w]);l.d(M,A);const g=(P=l.hmd(P)).exports;l.g.__USE_AXIOS__===void 0&&(l.g.__USE_AXIOS__=!0),l.g.__USE_EVENTSOURCE__===void 0&&(l.g.__USE_EVENTSOURCE__=!1)},4076(P,M,l){var v;l.d(M,{j:()=>v}),function(z){var s=function(k){return k.SUCCESS="SUCCESS",k.NOT_FOUND="NOT_FOUND",k.FAILED="FAILED",k}({});function E(k){return"transactionData"in k}z.GetTransactionStatus=s,z.isSimulationError=function(k){return"error"in k},z.isSimulationSuccess=E,z.isSimulationRestore=function(k){return E(k)&&"restorePreamble"in k&&!!k.restorePreamble.transactionData},z.isSimulationRaw=function(k){return!k._parsed}}(v||(v={}))},3496(P,M,l){l.r(M),l.d(M,{Api:()=>v.j,BasicSleepStrategy:()=>G,Durability:()=>N,LinearSleepStrategy:()=>tt,Server:()=>we,assembleTransaction:()=>R.X,default:()=>ie,parseRawEvents:()=>S.fG,parseRawSimulation:()=>S.jr});var v=l(4076),z=l(4193),s=l.n(z),E=l(8950),k=l(9983);function y(U){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},y(U)}function O(U,X){var Pt=Object.keys(U);if(Object.getOwnPropertySymbols){var Ht=Object.getOwnPropertySymbols(U);X&&(Ht=Ht.filter(function(re){return Object.getOwnPropertyDescriptor(U,re).enumerable})),Pt.push.apply(Pt,Ht)}return Pt}function u(U){for(var X=1;X3?(Wn=yo===Xr)&&(mn=un[(Yr=un[4])?5:(Yr=3,3)],un[4]=un[5]=U):un[0]<=xn&&((Wn=Tn<2&&xnXr||Xr>yo)&&(un[4]=Tn,un[5]=Xr,pn.n=yo,Yr=0))}if(Wn||Tn>1)return xe;throw co=!0,Xr}return function(Tn,Xr,Wn){if(to>1)throw TypeError("Generator is already running");for(co&&Xr===1&&jn(Xr,Wn),Yr=Xr,mn=Wn;(X=Yr<2?U:mn)||!co;){kn||(Yr?Yr<3?(Yr>1&&(pn.n=-1),jn(Yr,mn)):pn.n=mn:pn.v=mn);try{if(to=2,kn){if(Yr||(Tn="next"),X=kn[Tn]){if(!(X=X.call(kn,mn)))throw TypeError("iterator result is not an object");if(!X.done)return X;mn=X.value,Yr<2&&(Yr=0)}else Yr===1&&(X=kn.return)&&X.call(kn),Yr<2&&(mn=TypeError("The iterator does not provide a '"+Tn+"' method"),Yr=1);kn=U}else if((X=(co=pn.n<0)?mn:Qo.call(uo,pn))!==xe)break}catch(un){kn=U,Yr=1,mn=un}finally{to=1}}return{value:X,done:co}}}(rn,io,qn),!0),so}var xe={};function je(){}function Qe(){}function Oe(){}X=Object.getPrototypeOf;var Cr=[][Ht]?X(X([][Ht]())):(f(X={},Ht,function(){return this}),X),ur=Oe.prototype=je.prototype=Object.create(Cr);function jr(rn){return Object.setPrototypeOf?Object.setPrototypeOf(rn,Oe):(rn.__proto__=Oe,f(rn,re,"GeneratorFunction")),rn.prototype=Object.create(ur),rn}return Qe.prototype=Oe,f(ur,"constructor",Oe),f(Oe,"constructor",Qe),Qe.displayName="GeneratorFunction",f(Oe,re,"GeneratorFunction"),f(ur),f(ur,re,"Generator"),f(ur,Ht,function(){return this}),f(ur,"toString",function(){return"[object Generator]"}),(p=function(){return{w:We,m:jr}})()}function f(U,X,Pt,Ht){var re=Object.defineProperty;try{re({},"",{})}catch{re=0}f=function(We,xe,je,Qe){function Oe(Cr,ur){f(We,Cr,function(jr){return this._invoke(Cr,ur,jr)})}xe?re?re(We,xe,{value:je,enumerable:!Qe,configurable:!Qe,writable:!Qe}):We[xe]=je:(Oe("next",0),Oe("throw",1),Oe("return",2))},f(U,X,Pt,Ht)}function h(U,X,Pt,Ht,re,We,xe){try{var je=U[We](xe),Qe=je.value}catch(Oe){return void Pt(Oe)}je.done?X(Qe):Promise.resolve(Qe).then(Ht,re)}function A(U,X){return Object.prototype.hasOwnProperty.call(U,X)}function g(U,X,Pt){return w.apply(this,arguments)}function w(){var U;return U=p().m(function X(Pt,Ht,re){var We,xe,je,Qe=arguments;return p().w(function(Oe){for(;;)switch(Oe.n){case 0:return We=Qe.length>3&&Qe[3]!==void 0?Qe[3]:null,Oe.n=1,Pt.post(Ht,{jsonrpc:"2.0",id:1,method:re,params:We});case 1:if(!A((xe=Oe.v).data,"error")){Oe.n=2;break}throw xe.data.error;case 2:return Oe.a(2,(je=xe.data)===null||je===void 0?void 0:je.result);case 3:return Oe.a(2)}},X)}),w=function(){var X=this,Pt=arguments;return new Promise(function(Ht,re){var We=U.apply(X,Pt);function xe(Qe){h(We,Ht,re,xe,je,"next",Qe)}function je(Qe){h(We,Ht,re,xe,je,"throw",Qe)}xe(void 0)})},w.apply(this,arguments)}var R=l(8680),S=l(784),C=l(3121),x=l(8287).Buffer;function ot(U){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},ot(U)}function Q(U,X){var Pt=Object.keys(U);if(Object.getOwnPropertySymbols){var Ht=Object.getOwnPropertySymbols(U);X&&(Ht=Ht.filter(function(re){return Object.getOwnPropertyDescriptor(U,re).enumerable})),Pt.push.apply(Pt,Ht)}return Pt}function V(U){for(var X=1;XU.length)&&(X=U.length);for(var Pt=0,Ht=Array(X);Pt3?(Wn=yo===Xr)&&(mn=un[(Yr=un[4])?5:(Yr=3,3)],un[4]=un[5]=U):un[0]<=xn&&((Wn=Tn<2&&xnXr||Xr>yo)&&(un[4]=Tn,un[5]=Xr,pn.n=yo,Yr=0))}if(Wn||Tn>1)return xe;throw co=!0,Xr}return function(Tn,Xr,Wn){if(to>1)throw TypeError("Generator is already running");for(co&&Xr===1&&jn(Xr,Wn),Yr=Xr,mn=Wn;(X=Yr<2?U:mn)||!co;){kn||(Yr?Yr<3?(Yr>1&&(pn.n=-1),jn(Yr,mn)):pn.n=mn:pn.v=mn);try{if(to=2,kn){if(Yr||(Tn="next"),X=kn[Tn]){if(!(X=X.call(kn,mn)))throw TypeError("iterator result is not an object");if(!X.done)return X;mn=X.value,Yr<2&&(Yr=0)}else Yr===1&&(X=kn.return)&&X.call(kn),Yr<2&&(mn=TypeError("The iterator does not provide a '"+Tn+"' method"),Yr=1);kn=U}else if((X=(co=pn.n<0)?mn:Qo.call(uo,pn))!==xe)break}catch(un){kn=U,Yr=1,mn=un}finally{to=1}}return{value:X,done:co}}}(rn,io,qn),!0),so}var xe={};function je(){}function Qe(){}function Oe(){}X=Object.getPrototypeOf;var Cr=[][Ht]?X(X([][Ht]())):(Bt(X={},Ht,function(){return this}),X),ur=Oe.prototype=je.prototype=Object.create(Cr);function jr(rn){return Object.setPrototypeOf?Object.setPrototypeOf(rn,Oe):(rn.__proto__=Oe,Bt(rn,re,"GeneratorFunction")),rn.prototype=Object.create(ur),rn}return Qe.prototype=Oe,Bt(ur,"constructor",Oe),Bt(Oe,"constructor",Qe),Qe.displayName="GeneratorFunction",Bt(Oe,re,"GeneratorFunction"),Bt(ur),Bt(ur,re,"Generator"),Bt(ur,Ht,function(){return this}),Bt(ur,"toString",function(){return"[object Generator]"}),(pt=function(){return{w:We,m:jr}})()}function Bt(U,X,Pt,Ht){var re=Object.defineProperty;try{re({},"",{})}catch{re=0}Bt=function(We,xe,je,Qe){function Oe(Cr,ur){Bt(We,Cr,function(jr){return this._invoke(Cr,ur,jr)})}xe?re?re(We,xe,{value:je,enumerable:!Qe,configurable:!Qe,writable:!Qe}):We[xe]=je:(Oe("next",0),Oe("throw",1),Oe("return",2))},Bt(U,X,Pt,Ht)}function Rt(U,X,Pt,Ht,re,We,xe){try{var je=U[We](xe),Qe=je.value}catch(Oe){return void Pt(Oe)}je.done?X(Qe):Promise.resolve(Qe).then(Ht,re)}function J(U){return function(){var X=this,Pt=arguments;return new Promise(function(Ht,re){var We=U.apply(X,Pt);function xe(Qe){Rt(We,Ht,re,xe,je,"next",Qe)}function je(Qe){Rt(We,Ht,re,xe,je,"throw",Qe)}xe(void 0)})}}function At(U,X){for(var Pt=0;Pt1&&arguments[1]!==void 0?arguments[1]:{};if(function(re,We){if(!(re instanceof We))throw new TypeError("Cannot call a class as a function")}(this,U),this.serverURL=s()(X),this.httpClient=(Pt=Ht.headers,(0,k.vt)({headers:u(u({},Pt),{},{"X-Client-Name":"js-stellar-sdk","X-Client-Version":"15.1.0"})})),this.serverURL.protocol()!=="https"&&!Ht.allowHttp)throw new Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set")},Tt=[{key:"getAccount",value:(le=J(pt().m(function U(X){var Pt;return pt().w(function(Ht){for(;;)switch(Ht.n){case 0:return Ht.n=1,this.getAccountEntry(X);case 1:return Pt=Ht.v,Ht.a(2,new E.Account(X,Pt.seqNum().toString()))}},U,this)})),function(U){return le.apply(this,arguments)})},{key:"getAccountEntry",value:(Yt=J(pt().m(function U(X){var Pt,Ht;return pt().w(function(re){for(;;)switch(re.p=re.n){case 0:return Pt=E.xdr.LedgerKey.account(new E.xdr.LedgerKeyAccount({accountId:E.Keypair.fromPublicKey(X).xdrPublicKey()})),re.p=1,re.n=2,this.getLedgerEntry(Pt);case 2:return Ht=re.v,re.a(2,Ht.val.account());case 3:throw re.p=3,re.v,new Error("Account not found: ".concat(X));case 4:return re.a(2)}},U,this,[[1,3]])})),function(U){return Yt.apply(this,arguments)})},{key:"getTrustline",value:(gt=J(pt().m(function U(X,Pt){var Ht,re;return pt().w(function(We){for(;;)switch(We.p=We.n){case 0:return Ht=E.xdr.LedgerKey.trustline(new E.xdr.LedgerKeyTrustLine({accountId:E.Keypair.fromPublicKey(X).xdrAccountId(),asset:Pt.toTrustLineXDRObject()})),We.p=1,We.n=2,this.getLedgerEntry(Ht);case 2:return re=We.v,We.a(2,re.val.trustLine());case 3:throw We.p=3,We.v,new Error("Trustline for ".concat(Pt.getCode(),":").concat(Pt.getIssuer()," not found for ").concat(X));case 4:return We.a(2)}},U,this,[[1,3]])})),function(U,X){return gt.apply(this,arguments)})},{key:"getClaimableBalance",value:(et=J(pt().m(function U(X){var Pt,Ht,re,We,xe;return pt().w(function(je){for(;;)switch(je.p=je.n){case 0:if(!E.StrKey.isValidClaimableBalance(X)){je.n=1;break}Ht=E.StrKey.decodeClaimableBalance(X),re=x.concat([x.from("\0\0\0"),Ht.subarray(0,1)]),Pt=E.xdr.ClaimableBalanceId.fromXDR(x.concat([re,Ht.subarray(1)])),je.n=4;break;case 1:if(!X.match(/[a-f0-9]{72}/i)){je.n=2;break}Pt=E.xdr.ClaimableBalanceId.fromXDR(X,"hex"),je.n=4;break;case 2:if(!X.match(/[a-f0-9]{64}/i)){je.n=3;break}Pt=E.xdr.ClaimableBalanceId.fromXDR(X.padStart(72,"0"),"hex"),je.n=4;break;case 3:throw new TypeError("expected 72-char hex ID or strkey, not ".concat(X));case 4:return We=E.xdr.LedgerKey.claimableBalance(new E.xdr.LedgerKeyClaimableBalance({balanceId:Pt})),je.p=5,je.n=6,this.getLedgerEntry(We);case 6:return xe=je.v,je.a(2,xe.val.claimableBalance());case 7:throw je.p=7,je.v,new Error("Claimable balance ".concat(X," not found"));case 8:return je.a(2)}},U,this,[[5,7]])})),function(U){return et.apply(this,arguments)})},{key:"getAssetBalance",value:(D=J(pt().m(function U(X,Pt,Ht){var re,We,xe,je,Qe;return pt().w(function(Oe){for(;;)switch(Oe.n){case 0:if(re=X,typeof X!="string"){Oe.n=1;break}re=X,Oe.n=4;break;case 1:if(!(X instanceof E.Address)){Oe.n=2;break}re=X.toString(),Oe.n=4;break;case 2:if(!(X instanceof E.Contract)){Oe.n=3;break}re=X.toString(),Oe.n=4;break;case 3:throw new TypeError("invalid address: ".concat(X));case 4:if(!E.StrKey.isValidEd25519PublicKey(re)){Oe.n=6;break}return Oe.n=5,Promise.all([this.getTrustline(re,Pt),this.getLatestLedger()]);case 5:return We=Oe.v,xe=ut(We,2),je=xe[0],Qe=xe[1],Oe.a(2,{latestLedger:Qe.sequence,balanceEntry:{amount:je.balance().toString(),authorized:!!(1&je.flags()),clawback:!!(4&je.flags()),authorizedToMaintainLiabilities:!!(2&je.flags()),revocable:!!(2&je.flags())}});case 6:if(!E.StrKey.isValidContract(re)){Oe.n=7;break}return Oe.a(2,this.getSACBalance(re,Pt,Ht));case 7:throw new Error("invalid address: ".concat(X));case 8:return Oe.a(2)}},U,this)})),function(U,X,Pt){return D.apply(this,arguments)})},{key:"getHealth",value:(Ne=J(pt().m(function U(){return pt().w(function(X){for(;;)if(X.n===0)return X.a(2,g(this.httpClient,this.serverURL.toString(),"getHealth"))},U,this)})),function(){return Ne.apply(this,arguments)})},{key:"getContractData",value:(Kt=J(pt().m(function U(X,Pt){var Ht,re,We,xe,je,Qe=arguments;return pt().w(function(Oe){for(;;)switch(Oe.p=Oe.n){case 0:if(Ht=Qe.length>2&&Qe[2]!==void 0?Qe[2]:N.Persistent,typeof X!="string"){Oe.n=1;break}re=new E.Contract(X).address().toScAddress(),Oe.n=4;break;case 1:if(!(X instanceof E.Address)){Oe.n=2;break}re=X.toScAddress(),Oe.n=4;break;case 2:if(!(X instanceof E.Contract)){Oe.n=3;break}re=X.address().toScAddress(),Oe.n=4;break;case 3:throw new TypeError("unknown contract type: ".concat(X));case 4:je=Ht,Oe.n=je===N.Temporary?5:je===N.Persistent?6:7;break;case 5:return We=E.xdr.ContractDataDurability.temporary(),Oe.a(3,8);case 6:return We=E.xdr.ContractDataDurability.persistent(),Oe.a(3,8);case 7:throw new TypeError("invalid durability: ".concat(Ht));case 8:return xe=E.xdr.LedgerKey.contractData(new E.xdr.LedgerKeyContractData({key:Pt,contract:re,durability:We})),Oe.p=9,Oe.n=10,this.getLedgerEntry(xe);case 10:return Oe.a(2,Oe.v);case 11:throw Oe.p=11,Oe.v,{code:404,message:"Contract data not found for ".concat(E.Address.fromScAddress(re).toString()," with key ").concat(Pt.toXDR("base64")," and durability: ").concat(Ht)};case 12:return Oe.a(2)}},U,this,[[9,11]])})),function(U,X){return Kt.apply(this,arguments)})},{key:"getContractWasmByContractId",value:(ae=J(pt().m(function U(X){var Pt,Ht,re,We;return pt().w(function(xe){for(;;)switch(xe.n){case 0:return Ht=new E.Contract(X).getFootprint(),xe.n=1,this.getLedgerEntries(Ht);case 1:if((re=xe.v).entries.length&&(Pt=re.entries[0])!==null&&Pt!==void 0&&Pt.val){xe.n=2;break}return xe.a(2,Promise.reject({code:404,message:"Could not obtain contract hash from server"}));case 2:return We=re.entries[0].val.contractData().val().instance().executable().wasmHash(),xe.a(2,this.getContractWasmByHash(We))}},U,this)})),function(U){return ae.apply(this,arguments)})},{key:"getContractWasmByHash",value:(Xt=J(pt().m(function U(X){var Pt,Ht,re,We,xe,je,Qe=arguments;return pt().w(function(Oe){for(;;)switch(Oe.n){case 0:return Ht=Qe.length>1&&Qe[1]!==void 0?Qe[1]:void 0,re=typeof X=="string"?x.from(X,Ht):X,We=E.xdr.LedgerKey.contractCode(new E.xdr.LedgerKeyContractCode({hash:re})),Oe.n=1,this.getLedgerEntries(We);case 1:if((xe=Oe.v).entries.length&&(Pt=xe.entries[0])!==null&&Pt!==void 0&&Pt.val){Oe.n=2;break}return Oe.a(2,Promise.reject({code:404,message:"Could not obtain contract wasm from server"}));case 2:return je=xe.entries[0].val.contractCode().code(),Oe.a(2,je)}},U,this)})),function(U){return Xt.apply(this,arguments)})},{key:"getLedgerEntries",value:function(){return this._getLedgerEntries.apply(this,arguments).then(S.$D)}},{key:"_getLedgerEntries",value:function(){for(var U=arguments.length,X=new Array(U),Pt=0;Ptf,$E:()=>A,Af:()=>O,CA:()=>g,WC:()=>u,fG:()=>p,jr:()=>h,tR:()=>m});var v=l(8950),z=l(4076);function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s(w)}function E(w,R){var S=Object.keys(w);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(w);R&&(C=C.filter(function(x){return Object.getOwnPropertyDescriptor(w,x).enumerable})),S.push.apply(S,C)}return S}function k(w){for(var R=1;R0&&{diagnosticEvents:S.map(function(C){return v.xdr.DiagnosticEvent.fromXDR(C,"base64")})}),{},{errorResult:v.xdr.TransactionResult.fromXDR(R,"base64")}):k({},w)}function u(w){var R,S,C,x,ot=v.xdr.TransactionMeta.fromXDR(w.resultMetaXdr,"base64"),Q={ledger:w.ledger,createdAt:w.createdAt,applicationOrder:w.applicationOrder,feeBump:w.feeBump,envelopeXdr:v.xdr.TransactionEnvelope.fromXDR(w.envelopeXdr,"base64"),resultXdr:v.xdr.TransactionResult.fromXDR(w.resultXdr,"base64"),resultMetaXdr:ot,events:{contractEventsXdr:((R=(S=w.events)===null||S===void 0?void 0:S.contractEventsXdr)!==null&&R!==void 0?R:[]).map(function(Ut){return Ut.map(function(pt){return v.xdr.ContractEvent.fromXDR(pt,"base64")})}),transactionEventsXdr:((C=(x=w.events)===null||x===void 0?void 0:x.transactionEventsXdr)!==null&&C!==void 0?C:[]).map(function(Ut){return v.xdr.TransactionEvent.fromXDR(Ut,"base64")})}};switch(ot.switch()){case 3:case 4:var V,Y,ut=ot.value();ut.sorobanMeta()!==null&&(Q.returnValue=(V=(Y=ut.sorobanMeta())===null||Y===void 0?void 0:Y.returnValue())!==null&&V!==void 0?V:void 0)}return w.diagnosticEventsXdr&&(Q.diagnosticEventsXdr=w.diagnosticEventsXdr.map(function(Ut){return v.xdr.DiagnosticEvent.fromXDR(Ut,"base64")})),Q}function m(w){return k({status:w.status,txHash:w.txHash},u(w))}function p(w){var R;return{latestLedger:w.latestLedger,oldestLedger:w.oldestLedger,latestLedgerCloseTime:w.latestLedgerCloseTime,oldestLedgerCloseTime:w.oldestLedgerCloseTime,cursor:w.cursor,events:((R=w.events)!==null&&R!==void 0?R:[]).map(function(S){var C,x=k({},S);return delete x.contractId,k(k(k({},x),S.contractId!==""&&{contractId:new v.Contract(S.contractId)}),{},{topic:((C=S.topic)!==null&&C!==void 0?C:[]).map(function(ot){return v.xdr.ScVal.fromXDR(ot,"base64")}),value:v.xdr.ScVal.fromXDR(S.value,"base64")})})}}function f(w){var R;return{latestLedger:w.latestLedger,entries:((R=w.entries)!==null&&R!==void 0?R:[]).map(function(S){if(!S.key||!S.xdr)throw new TypeError("invalid ledger entry: ".concat(JSON.stringify(S)));return k({lastModifiedLedgerSeq:S.lastModifiedLedgerSeq,key:v.xdr.LedgerKey.fromXDR(S.key,"base64"),val:v.xdr.LedgerEntryData.fromXDR(S.xdr,"base64")},S.liveUntilLedgerSeq!==void 0&&{liveUntilLedgerSeq:S.liveUntilLedgerSeq})})}}function h(w){var R,S;if(!z.j.isSimulationRaw(w))return w;var C={_parsed:!0,id:w.id,latestLedger:w.latestLedger,events:(R=(S=w.events)===null||S===void 0?void 0:S.map(function(x){return v.xdr.DiagnosticEvent.fromXDR(x,"base64")}))!==null&&R!==void 0?R:[]};return typeof w.error=="string"?k(k({},C),{},{error:w.error}):function(x,ot){var Q,V,Y,ut,Ut,pt=k(k(k({},ot),{},{transactionData:new v.SorobanDataBuilder(x.transactionData),minResourceFee:x.minResourceFee},((Q=(V=x.results)===null||V===void 0?void 0:V.length)!==null&&Q!==void 0?Q:0)>0&&{result:x.results.map(function(Bt){var Rt;return{auth:((Rt=Bt.auth)!==null&&Rt!==void 0?Rt:[]).map(function(J){return v.xdr.SorobanAuthorizationEntry.fromXDR(J,"base64")}),retval:Bt.xdr?v.xdr.ScVal.fromXDR(Bt.xdr,"base64"):v.xdr.ScVal.scvVoid()}})[0]}),((Y=(ut=x.stateChanges)===null||ut===void 0?void 0:ut.length)!==null&&Y!==void 0?Y:0)>0&&{stateChanges:(Ut=x.stateChanges)===null||Ut===void 0?void 0:Ut.map(function(Bt){return{type:Bt.type,key:v.xdr.LedgerKey.fromXDR(Bt.key,"base64"),before:Bt.before?v.xdr.LedgerEntry.fromXDR(Bt.before,"base64"):null,after:Bt.after?v.xdr.LedgerEntry.fromXDR(Bt.after,"base64"):null}})});return x.restorePreamble&&x.restorePreamble.transactionData!==""?k(k({},pt),{},{restorePreamble:{minResourceFee:x.restorePreamble.minResourceFee,transactionData:new v.SorobanDataBuilder(x.restorePreamble.transactionData)}}):pt}(w,C)}function A(w){var R;if(!w.metadataXdr||!w.headerXdr)throw R=w.metadataXdr||w.headerXdr?w.metadataXdr?"headerXdr":"metadataXdr":"metadataXdr and headerXdr",new TypeError("invalid ledger missing fields: ".concat(R));var S=v.xdr.LedgerCloseMeta.fromXDR(w.metadataXdr,"base64"),C=v.xdr.LedgerHeaderHistoryEntry.fromXDR(w.headerXdr,"base64");return{hash:w.hash,sequence:w.sequence,ledgerCloseTime:w.ledgerCloseTime,metadataXdr:S,headerXdr:C}}function g(w){var R,S=v.xdr.LedgerHeader.fromXDR(w.headerXdr,"base64"),C=v.xdr.LedgerCloseMeta.fromXDR(w.metadataXdr,"base64");if(w.metadataXdr||w.headerXdr?w.metadataXdr?w.headerXdr||(R="headerXdr"):R="metadataXdr":R="metadataXdr and headerXdr",R)throw new TypeError("invalid getLatestLedger response missing fields: ".concat(R));return{id:w.id,sequence:w.sequence,protocolVersion:w.protocolVersion,closeTime:w.closeTime,headerXdr:S,metadataXdr:C}}},8680(P,M,l){l.d(M,{X:()=>E});var v=l(8950),z=l(4076),s=l(784);function E(k,y){if("innerTransaction"in k)return E(k.innerTransaction,y);if(!function(g){if(g.operations.length!==1)return!1;switch(g.operations[0].type){case"invokeHostFunction":case"extendFootprintTtl":case"restoreFootprint":return!0;default:return!1}}(k))throw new TypeError("unsupported transaction: must contain exactly one invokeHostFunction, extendFootprintTtl, or restoreFootprint operation");var O,u=(0,s.jr)(y);if(!z.j.isSimulationSuccess(u))throw new Error("simulation incorrect: ".concat(JSON.stringify(u)));try{O=BigInt(k.fee)}catch{O=BigInt(0)}var m=k.toEnvelope().v1().tx().ext().value();m&&O-m.resourceFee().toBigInt()>BigInt(0)&&(O-=m.resourceFee().toBigInt());var p=v.TransactionBuilder.cloneFrom(k,{fee:O.toString(),sorobanData:u.transactionData.build(),networkPassphrase:k.networkPassphrase});if(k.operations[0].type==="invokeHostFunction"){var f;p.clearOperations();var h=k.operations[0],A=(f=h.auth)!==null&&f!==void 0?f:[];p.addOperation(v.Operation.invokeHostFunction({source:h.source,func:h.func,auth:A.length>0?A:u.result.auth}))}return p}},3898(P,M,l){l.r(M),l.d(M,{Api:()=>{},Resolver:()=>C,STELLAR_TOML_MAX_SIZE:()=>R});var v=l(1293),z=l.n(v),s=l(9983),E=l(8732);function k(x){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ot){return typeof ot}:function(ot){return ot&&typeof Symbol=="function"&&ot.constructor===Symbol&&ot!==Symbol.prototype?"symbol":typeof ot},k(x)}function y(){var x,ot,Q=typeof Symbol=="function"?Symbol:{},V=Q.iterator||"@@iterator",Y=Q.toStringTag||"@@toStringTag";function ut(N,G,tt,Et){var q=G&&G.prototype instanceof pt?G:pt,Tt=Object.create(q.prototype);return O(Tt,"_invoke",function(Ft,vt,bt){var yt,dt,lt,xt=0,Ot=bt||[],kt=!1,Ct={p:0,n:0,v:x,a:H,f:H.bind(x,4),d:function(it,mt){return yt=it,dt=0,lt=x,Ct.n=mt,Ut}};function H(it,mt){for(dt=it,lt=mt,ot=0;!kt&&xt&&!Dt&&ot3?(Dt=$===mt)&&(lt=T[(dt=T[4])?5:(dt=3,3)],T[4]=T[5]=x):T[0]<=L&&((Dt=it<2&&Lmt||mt>$)&&(T[4]=it,T[5]=mt,Ct.n=$,dt=0))}if(Dt||it>1)return Ut;throw kt=!0,mt}return function(it,mt,Dt){if(xt>1)throw TypeError("Generator is already running");for(kt&&mt===1&&H(mt,Dt),dt=mt,lt=Dt;(ot=dt<2?x:lt)||!kt;){yt||(dt?dt<3?(dt>1&&(Ct.n=-1),H(dt,lt)):Ct.n=lt:Ct.v=lt);try{if(xt=2,yt){if(dt||(it="next"),ot=yt[it]){if(!(ot=ot.call(yt,lt)))throw TypeError("iterator result is not an object");if(!ot.done)return ot;lt=ot.value,dt<2&&(dt=0)}else dt===1&&(ot=yt.return)&&ot.call(yt),dt<2&&(lt=TypeError("The iterator does not provide a '"+it+"' method"),dt=1);yt=x}else if((ot=(kt=Ct.n<0)?lt:Ft.call(vt,Ct))!==Ut)break}catch(T){yt=x,dt=1,lt=T}finally{xt=1}}return{value:ot,done:kt}}}(N,tt,Et),!0),Tt}var Ut={};function pt(){}function Bt(){}function Rt(){}ot=Object.getPrototypeOf;var J=[][V]?ot(ot([][V]())):(O(ot={},V,function(){return this}),ot),At=Rt.prototype=pt.prototype=Object.create(J);function c(N){return Object.setPrototypeOf?Object.setPrototypeOf(N,Rt):(N.__proto__=Rt,O(N,Y,"GeneratorFunction")),N.prototype=Object.create(At),N}return Bt.prototype=Rt,O(At,"constructor",Rt),O(Rt,"constructor",Bt),Bt.displayName="GeneratorFunction",O(Rt,Y,"GeneratorFunction"),O(At),O(At,Y,"Generator"),O(At,V,function(){return this}),O(At,"toString",function(){return"[object Generator]"}),(y=function(){return{w:ut,m:c}})()}function O(x,ot,Q,V){var Y=Object.defineProperty;try{Y({},"",{})}catch{Y=0}O=function(ut,Ut,pt,Bt){function Rt(J,At){O(ut,J,function(c){return this._invoke(J,At,c)})}Ut?Y?Y(ut,Ut,{value:pt,enumerable:!Bt,configurable:!Bt,writable:!Bt}):ut[Ut]=pt:(Rt("next",0),Rt("throw",1),Rt("return",2))},O(x,ot,Q,V)}function u(x,ot,Q,V,Y,ut,Ut){try{var pt=x[ut](Ut),Bt=pt.value}catch(Rt){return void Q(Rt)}pt.done?ot(Bt):Promise.resolve(Bt).then(V,Y)}function m(x,ot){for(var Q=0;Q1&&pt[1]!==void 0?pt[1]:{}).allowHttp===void 0?E.T.isAllowHttp():V.allowHttp,ut=V.timeout===void 0?E.T.getTimeout():V.timeout,Ut=Y?"http":"https",Bt.a(2,s.ok.get("".concat(Ut,"://").concat(ot,"/.well-known/stellar.toml"),{maxRedirects:(Q=V.allowedRedirects)!==null&&Q!==void 0?Q:0,maxContentLength:R,cancelToken:ut?new S(function(Rt){return setTimeout(function(){return Rt("timeout of ".concat(ut,"ms exceeded"))},ut)}):void 0,timeout:ut}).then(function(Rt){try{var J=z().parse(Rt.data);return Promise.resolve(J)}catch(At){return Promise.reject(new Error("stellar.toml is invalid - Parsing error on line ".concat(At.line,", column ").concat(At.column,": ").concat(At.message)))}}).catch(function(Rt){throw Rt.message.match(/^maxContentLength size/)?new Error("stellar.toml file exceeds allowed size of ".concat(R)):Rt}))},x)}),w=function(){var x=this,ot=arguments;return new Promise(function(Q,V){var Y=g.apply(x,ot);function ut(pt){u(Y,Q,V,ut,Ut,"next",pt)}function Ut(pt){u(Y,Q,V,ut,Ut,"throw",pt)}ut(void 0)})},function(x){return w.apply(this,arguments)})}],h&&m(f.prototype,h),A&&m(f,A),Object.defineProperty(f,"prototype",{writable:!1}),f)},3121(P,M,l){function v(u){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},v(u)}function z(u,m){for(var p=0;pO});var E,k,y,O=(E=function u(){(function(m,p){if(!(m instanceof p))throw new TypeError("Cannot call a class as a function")})(this,u)},y=[{key:"validateTimebounds",value:function(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!u.timeBounds)return!1;var p=Math.floor(Date.now()/1e3),f=u.timeBounds,h=f.minTime,A=f.maxTime;return p>=Number.parseInt(h,10)-m&&p<=Number.parseInt(A,10)+m}},{key:"sleep",value:function(u){return new Promise(function(m){return setTimeout(m,u)})}}],(k=null)&&z(E.prototype,k),y&&z(E,y),Object.defineProperty(E,"prototype",{writable:!1}),E)},7504(P,M,l){l.r(M),l.d(M,{InvalidChallengeError:()=>p,buildChallengeTx:()=>Bt,gatherTxSigners:()=>g,readChallengeTx:()=>Rt,verifyChallengeTxSigners:()=>J,verifyChallengeTxThreshold:()=>At,verifyTxSignedBy:()=>w});var v=l(8950);function z(c){return z=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},z(c)}function s(c,N){for(var G=0;Gc.length)&&(N=c.length);for(var G=0,tt=Array(N);G=dt.length?{done:!0}:{done:!1,value:dt[Ot++]}},e:function(mt){throw mt},f:kt}}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 Ct,H=!0,it=!1;return{s:function(){xt=xt.call(dt)},n:function(){var mt=xt.next();return H=mt.done,mt},e:function(mt){it=!0,Ct=mt},f:function(){try{H||xt.return==null||xt.return()}finally{if(it)throw Ct}}}}(N);try{for(Tt.s();!(G=Tt.n()).done;){var Ft=G.value;if(Et.length===0)break;var vt=void 0;try{vt=v.Keypair.fromPublicKey(Ft)}catch(dt){throw new p("Signer is not a valid address: ".concat(dt.message))}for(var bt=0;bt=c.length?{done:!0}:{done:!1,value:c[tt++]}},e:function(vt){throw vt},f:Et}}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 q,Tt=!0,Ft=!1;return{s:function(){G=G.call(c)},n:function(){var vt=G.next();return Tt=vt.done,vt},e:function(vt){Ft=!0,q=vt},f:function(){try{Tt||G.return==null||G.return()}finally{if(Ft)throw q}}}}function V(c){return V=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},V(c)}function Y(c){return function(N){if(Array.isArray(N))return N}(c)||pt(c)||ut(c)||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(c,N){if(c){if(typeof c=="string")return Ut(c,N);var G={}.toString.call(c).slice(8,-1);return G==="Object"&&c.constructor&&(G=c.constructor.name),G==="Map"||G==="Set"?Array.from(c):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?Ut(c,N):void 0}}function Ut(c,N){(N==null||N>c.length)&&(N=c.length);for(var G=0,tt=Array(N);G3&&arguments[3]!==void 0?arguments[3]:300,Et=arguments.length>4?arguments[4]:void 0,q=arguments.length>5?arguments[5]:void 0,Tt=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,Ft=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,vt=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null;if(N.startsWith("M")&&Tt)throw Error("memo cannot be used if clientAccountID is a muxed account");var bt=new v.Account(c.publicKey(),"-1"),yt=Math.floor(Date.now()/1e3),dt=S()(48).toString("base64"),lt=new v.TransactionBuilder(bt,{fee:v.BASE_FEE,networkPassphrase:Et,timebounds:{minTime:yt,maxTime:yt+tt}}).addOperation(v.Operation.manageData({name:"".concat(G," auth"),value:dt,source:N})).addOperation(v.Operation.manageData({name:"web_auth_domain",value:q,source:bt.accountId()}));if(Ft){if(!vt)throw Error("clientSigningKey is required if clientDomain is provided");lt.addOperation(v.Operation.manageData({name:"client_domain",value:Ft,source:vt}))}Tt&<.addMemo(v.Memo.id(Tt));var xt=lt.build();return xt.sign(c),xt.toEnvelope().toXDR("base64").toString()}function Rt(c,N,G,tt,Et){var q,Tt;if(N.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");try{Tt=new v.Transaction(c,G)}catch{try{Tt=new v.FeeBumpTransaction(c,G)}catch{throw new p("Invalid challenge: unable to deserialize challengeTx transaction string")}throw new p("Invalid challenge: expected a Transaction but received a FeeBumpTransaction")}if(Number.parseInt(Tt.sequence,10)!==0)throw new p("The transaction sequence number should be zero");if(Tt.source!==N)throw new p("The transaction source account is not equal to the server's account");if(Tt.operations.length<1)throw new p("The transaction should contain at least one operation");var Ft=Y(Tt.operations),vt=Ft[0],bt=Ut(Ft).slice(1);if(!vt.source)throw new p("The transaction's operation should contain a source account");var yt,dt=vt.source,lt=null;if(Tt.memo.type!==v.MemoNone){if(dt.startsWith("M"))throw new p("The transaction has a memo but the client account ID is a muxed account");if(Tt.memo.type!==v.MemoID)throw new p("The transaction's memo must be of type `id`");lt=Tt.memo.value}if(vt.type!=="manageData")throw new p("The transaction's operation type should be 'manageData'");if(Tt.timeBounds&&Number.parseInt((q=Tt.timeBounds)===null||q===void 0?void 0:q.maxTime,10)===v.TimeoutInfinite)throw new p("The transaction requires non-infinite timebounds");if(!C.A.validateTimebounds(Tt,300))throw new p("The transaction has expired");if(vt.value===void 0)throw new p("The transaction's operation values should not be null");if(!vt.value)throw new p("The transaction's operation value should not be null");if(x.from(vt.value.toString(),"base64").length!==48)throw new p("The transaction's operation value should be a 64 bytes base64 random string");if(!tt)throw new p("Invalid homeDomains: a home domain must be provided for verification");if(typeof tt=="string")"".concat(tt," auth")===vt.name&&(yt=tt);else{if(!Array.isArray(tt))throw new p("Invalid homeDomains: homeDomains type is ".concat(V(tt)," but should be a string or an array"));yt=tt.find(function(Ct){return"".concat(Ct," auth")===vt.name})}if(!yt)throw new p("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");var xt,Ot=Q(bt);try{for(Ot.s();!(xt=Ot.n()).done;){var kt=xt.value;if(kt.type!=="manageData")throw new p("The transaction has operations that are not of type 'manageData'");if(kt.source!==N&&kt.name!=="client_domain")throw new p("The transaction has operations that are unrecognized");if(kt.name==="web_auth_domain"){if(kt.value===void 0)throw new p("'web_auth_domain' operation value should not be null");if(kt.value.compare(x.from(Et)))throw new p("'web_auth_domain' operation value does not match ".concat(Et))}}}catch(Ct){Ot.e(Ct)}finally{Ot.f()}if(!w(Tt,N))throw new p("Transaction not signed by server: '".concat(N,"'"));return{tx:Tt,clientAccountID:dt,matchedHomeDomain:yt,memo:lt}}function J(c,N,G,tt,Et,q){var Tt,Ft=Rt(c,N,G,Et,q).tx;try{Tt=v.Keypair.fromPublicKey(N)}catch($){throw new Error("Couldn't infer keypair from the provided 'serverAccountID': ".concat($.message))}var vt,bt,yt=new Set,dt=Q(tt);try{for(dt.s();!(vt=dt.n()).done;){var lt=vt.value;lt!==Tt.publicKey()&<.charAt(0)==="G"&&yt.add(lt)}}catch($){dt.e($)}finally{dt.f()}if(yt.size===0)throw new p("No verifiable client signers provided, at least one G... address must be provided");var xt,Ot=Q(Ft.operations);try{for(Ot.s();!(xt=Ot.n()).done;){var kt=xt.value;if(kt.type==="manageData"&&kt.name==="client_domain"){if(bt)throw new p("Found more than one client_domain operation");bt=kt.source}}}catch($){Ot.e($)}finally{Ot.f()}var Ct=[Tt.publicKey()].concat(ot(Array.from(yt)));bt&&Ct.push(bt);var H,it=g(Ft,Ct),mt=!1,Dt=!1,T=Q(it);try{for(T.s();!(H=T.n()).done;){var L=H.value;L===Tt.publicKey()&&(mt=!0),L===bt&&(Dt=!0)}}catch($){T.e($)}finally{T.f()}if(!mt)throw new p("Transaction not signed by server: '".concat(Tt.publicKey(),"'"));if(bt&&!Dt)throw new p("Transaction not signed by the source account of the 'client_domain' ManageData operation");if(it.length===1)throw new p("None of the given signers match the transaction signatures");if(it.length!==Ft.signatures.length)throw new p("Transaction has unrecognized signatures");if(it.splice(it.indexOf(Tt.publicKey()),1),bt&&it.splice(it.indexOf(bt),1),it.length===0)throw new p("None of the given signers match the transaction signatures");return it}function At(c,N,G,tt,Et,q,Tt){var Ft,vt=J(c,N,G,Et.map(function(lt){return lt.key}),q,Tt),bt=0,yt=Q(vt);try{var dt=function(){var lt,xt=Ft.value,Ot=((lt=Et.find(function(kt){return kt.key===xt}))===null||lt===void 0?void 0:lt.weight)||0;bt+=Ot};for(yt.s();!(Ft=yt.n()).done;)dt()}catch(lt){yt.e(lt)}finally{yt.f()}if(bt0?h-4:h;for(p=0;p>16&255,g[w++]=m>>8&255,g[w++]=255&m;return A===2&&(m=v[u.charCodeAt(p)]<<2|v[u.charCodeAt(p+1)]>>4,g[w++]=255&m),A===1&&(m=v[u.charCodeAt(p)]<<10|v[u.charCodeAt(p+1)]<<4|v[u.charCodeAt(p+2)]>>2,g[w++]=m>>8&255,g[w++]=255&m),g},M.fromByteArray=function(u){for(var m,p=u.length,f=p%3,h=[],A=16383,g=0,w=p-f;gw?w:g+A));return f===1?(m=u[p-1],h.push(l[m>>2]+l[m<<4&63]+"==")):f===2&&(m=(u[p-2]<<8)+u[p-1],h.push(l[m>>10]+l[m>>4&63]+l[m<<2&63]+"=")),h.join("")};for(var l=[],v=[],z=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0;E<64;++E)l[E]=s[E],v[s.charCodeAt(E)]=E;function k(u){var m=u.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=u.indexOf("=");return p===-1&&(p=m),[p,p===m?0:4-p%4]}function y(u){return l[u>>18&63]+l[u>>12&63]+l[u>>6&63]+l[63&u]}function O(u,m,p){for(var f,h=[],A=m;AE)throw new RangeError('The value "'+T+'" is invalid for option "size"');const L=new Uint8Array(T);return Object.setPrototypeOf(L,y.prototype),L}function y(T,L,$){if(typeof T=="number"){if(typeof L=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(T)}return O(T,L,$)}function O(T,L,$){if(typeof T=="string")return function(ee,_){if(typeof _=="string"&&_!==""||(_="utf8"),!y.isEncoding(_))throw new TypeError("Unknown encoding: "+_);const W=0|A(ee,_);let at=k(W);const Xt=at.write(ee,_);return Xt!==W&&(at=at.slice(0,Xt)),at}(T,L);if(ArrayBuffer.isView(T))return function(ee){if(Ct(ee,Uint8Array)){const _=new Uint8Array(ee);return f(_.buffer,_.byteOffset,_.byteLength)}return p(ee)}(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(Ct(T,ArrayBuffer)||T&&Ct(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ct(T,SharedArrayBuffer)||T&&Ct(T.buffer,SharedArrayBuffer)))return f(T,L,$);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const St=T.valueOf&&T.valueOf();if(St!=null&&St!==T)return y.from(St,L,$);const ft=function(ee){if(y.isBuffer(ee)){const _=0|h(ee.length),W=k(_);return W.length===0||ee.copy(W,0,0,_),W}if(ee.length!==void 0)return typeof ee.length!="number"||H(ee.length)?k(0):p(ee);if(ee.type==="Buffer"&&Array.isArray(ee.data))return p(ee.data)}(T);if(ft)return ft;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return y.from(T[Symbol.toPrimitive]("string"),L,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}function u(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function m(T){return u(T),k(T<0?0:0|h(T))}function p(T){const L=T.length<0?0:0|h(T.length),$=k(L);for(let St=0;St=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return 0|T}function A(T,L){if(y.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||Ct(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);const $=T.length,St=arguments.length>2&&arguments[2]===!0;if(!St&&$===0)return 0;let ft=!1;for(;;)switch(L){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return xt(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return Ot(T).length;default:if(ft)return St?-1:xt(T).length;L=(""+L).toLowerCase(),ft=!0}}function g(T,L,$){let St=!1;if((L===void 0||L<0)&&(L=0),L>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0)<=(L>>>=0))return"";for(T||(T="utf8");;)switch(T){case"hex":return Rt(this,L,$);case"utf8":case"utf-8":return ut(this,L,$);case"ascii":return pt(this,L,$);case"latin1":case"binary":return Bt(this,L,$);case"base64":return Y(this,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,L,$);default:if(St)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),St=!0}}function w(T,L,$){const St=T[L];T[L]=T[$],T[$]=St}function R(T,L,$,St,ft){if(T.length===0)return-1;if(typeof $=="string"?(St=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),H($=+$)&&($=ft?0:T.length-1),$<0&&($=T.length+$),$>=T.length){if(ft)return-1;$=T.length-1}else if($<0){if(!ft)return-1;$=0}if(typeof L=="string"&&(L=y.from(L,St)),y.isBuffer(L))return L.length===0?-1:S(T,L,$,St,ft);if(typeof L=="number")return L&=255,typeof Uint8Array.prototype.indexOf=="function"?ft?Uint8Array.prototype.indexOf.call(T,L,$):Uint8Array.prototype.lastIndexOf.call(T,L,$):S(T,[L],$,St,ft);throw new TypeError("val must be string, number or Buffer")}function S(T,L,$,St,ft){let ee,_=1,W=T.length,at=L.length;if(St!==void 0&&((St=String(St).toLowerCase())==="ucs2"||St==="ucs-2"||St==="utf16le"||St==="utf-16le")){if(T.length<2||L.length<2)return-1;_=2,W/=2,at/=2,$/=2}function Xt(ae,Kt){return _===1?ae[Kt]:ae.readUInt16BE(Kt*_)}if(ft){let ae=-1;for(ee=$;eeW&&($=W-at),ee=$;ee>=0;ee--){let ae=!0;for(let Kt=0;Ktft&&(St=ft):St=ft;const ee=L.length;let _;for(St>ee/2&&(St=ee/2),_=0;_>8,at=_%256,Xt.push(at),Xt.push(W);return Xt}(L,T.length-$),T,$,St)}function Y(T,L,$){return L===0&&$===T.length?v.fromByteArray(T):v.fromByteArray(T.slice(L,$))}function ut(T,L,$){$=Math.min(T.length,$);const St=[];let ft=L;for(;ft<$;){const ee=T[ft];let _=null,W=ee>239?4:ee>223?3:ee>191?2:1;if(ft+W<=$){let at,Xt,ae,Kt;switch(W){case 1:ee<128&&(_=ee);break;case 2:at=T[ft+1],(192&at)==128&&(Kt=(31&ee)<<6|63&at,Kt>127&&(_=Kt));break;case 3:at=T[ft+1],Xt=T[ft+2],(192&at)==128&&(192&Xt)==128&&(Kt=(15&ee)<<12|(63&at)<<6|63&Xt,Kt>2047&&(Kt<55296||Kt>57343)&&(_=Kt));break;case 4:at=T[ft+1],Xt=T[ft+2],ae=T[ft+3],(192&at)==128&&(192&Xt)==128&&(192&ae)==128&&(Kt=(15&ee)<<18|(63&at)<<12|(63&Xt)<<6|63&ae,Kt>65535&&Kt<1114112&&(_=Kt))}}_===null?(_=65533,W=1):_>65535&&(_-=65536,St.push(_>>>10&1023|55296),_=56320|1023&_),St.push(_),ft+=W}return function(ee){const _=ee.length;if(_<=Ut)return String.fromCharCode.apply(String,ee);let W="",at=0;for(;at<_;)W+=String.fromCharCode.apply(String,ee.slice(at,at+=Ut));return W}(St)}M.kMaxLength=E,y.TYPED_ARRAY_SUPPORT=function(){try{const T=new Uint8Array(1),L={foo:function(){return 42}};return Object.setPrototypeOf(L,Uint8Array.prototype),Object.setPrototypeOf(T,L),T.foo()===42}catch{return!1}}(),y.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}}),y.poolSize=8192,y.from=function(T,L,$){return O(T,L,$)},Object.setPrototypeOf(y.prototype,Uint8Array.prototype),Object.setPrototypeOf(y,Uint8Array),y.alloc=function(T,L,$){return function(St,ft,ee){return u(St),St<=0?k(St):ft!==void 0?typeof ee=="string"?k(St).fill(ft,ee):k(St).fill(ft):k(St)}(T,L,$)},y.allocUnsafe=function(T){return m(T)},y.allocUnsafeSlow=function(T){return m(T)},y.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==y.prototype},y.compare=function(T,L){if(Ct(T,Uint8Array)&&(T=y.from(T,T.offset,T.byteLength)),Ct(L,Uint8Array)&&(L=y.from(L,L.offset,L.byteLength)),!y.isBuffer(T)||!y.isBuffer(L))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===L)return 0;let $=T.length,St=L.length;for(let ft=0,ee=Math.min($,St);ftSt.length?(y.isBuffer(ee)||(ee=y.from(ee)),ee.copy(St,ft)):Uint8Array.prototype.set.call(St,ee,ft);else{if(!y.isBuffer(ee))throw new TypeError('"list" argument must be an Array of Buffers');ee.copy(St,ft)}ft+=ee.length}return St},y.byteLength=A,y.prototype._isBuffer=!0,y.prototype.swap16=function(){const T=this.length;if(T%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let L=0;LL&&(T+=" ... "),""},s&&(y.prototype[s]=y.prototype.inspect),y.prototype.compare=function(T,L,$,St,ft){if(Ct(T,Uint8Array)&&(T=y.from(T,T.offset,T.byteLength)),!y.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(L===void 0&&(L=0),$===void 0&&($=T?T.length:0),St===void 0&&(St=0),ft===void 0&&(ft=this.length),L<0||$>T.length||St<0||ft>this.length)throw new RangeError("out of range index");if(St>=ft&&L>=$)return 0;if(St>=ft)return-1;if(L>=$)return 1;if(this===T)return 0;let ee=(ft>>>=0)-(St>>>=0),_=($>>>=0)-(L>>>=0);const W=Math.min(ee,_),at=this.slice(St,ft),Xt=T.slice(L,$);for(let ae=0;ae>>=0,isFinite($)?($>>>=0,St===void 0&&(St="utf8")):(St=$,$=void 0)}const ft=this.length-L;if(($===void 0||$>ft)&&($=ft),T.length>0&&($<0||L<0)||L>this.length)throw new RangeError("Attempt to write outside buffer bounds");St||(St="utf8");let ee=!1;for(;;)switch(St){case"hex":return C(this,T,L,$);case"utf8":case"utf-8":return x(this,T,L,$);case"ascii":case"latin1":case"binary":return ot(this,T,L,$);case"base64":return Q(this,T,L,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,T,L,$);default:if(ee)throw new TypeError("Unknown encoding: "+St);St=(""+St).toLowerCase(),ee=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Ut=4096;function pt(T,L,$){let St="";$=Math.min(T.length,$);for(let ft=L;ft<$;++ft)St+=String.fromCharCode(127&T[ft]);return St}function Bt(T,L,$){let St="";$=Math.min(T.length,$);for(let ft=L;ft<$;++ft)St+=String.fromCharCode(T[ft]);return St}function Rt(T,L,$){const St=T.length;(!L||L<0)&&(L=0),(!$||$<0||$>St)&&($=St);let ft="";for(let ee=L;ee<$;++ee)ft+=it[T[ee]];return ft}function J(T,L,$){const St=T.slice(L,$);let ft="";for(let ee=0;ee$)throw new RangeError("Trying to access beyond buffer length")}function c(T,L,$,St,ft,ee){if(!y.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(L>ft||LT.length)throw new RangeError("Index out of range")}function N(T,L,$,St,ft){bt(L,St,ft,T,$,7);let ee=Number(L&BigInt(4294967295));T[$++]=ee,ee>>=8,T[$++]=ee,ee>>=8,T[$++]=ee,ee>>=8,T[$++]=ee;let _=Number(L>>BigInt(32)&BigInt(4294967295));return T[$++]=_,_>>=8,T[$++]=_,_>>=8,T[$++]=_,_>>=8,T[$++]=_,$}function G(T,L,$,St,ft){bt(L,St,ft,T,$,7);let ee=Number(L&BigInt(4294967295));T[$+7]=ee,ee>>=8,T[$+6]=ee,ee>>=8,T[$+5]=ee,ee>>=8,T[$+4]=ee;let _=Number(L>>BigInt(32)&BigInt(4294967295));return T[$+3]=_,_>>=8,T[$+2]=_,_>>=8,T[$+1]=_,_>>=8,T[$]=_,$+8}function tt(T,L,$,St,ft,ee){if($+St>T.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function Et(T,L,$,St,ft){return L=+L,$>>>=0,ft||tt(T,0,$,4),z.write(T,L,$,St,23,4),$+4}function q(T,L,$,St,ft){return L=+L,$>>>=0,ft||tt(T,0,$,8),z.write(T,L,$,St,52,8),$+8}y.prototype.slice=function(T,L){const $=this.length;(T=~~T)<0?(T+=$)<0&&(T=0):T>$&&(T=$),(L=L===void 0?$:~~L)<0?(L+=$)<0&&(L=0):L>$&&(L=$),L>>=0,L>>>=0,$||At(T,L,this.length);let St=this[T],ft=1,ee=0;for(;++ee>>=0,L>>>=0,$||At(T,L,this.length);let St=this[T+--L],ft=1;for(;L>0&&(ft*=256);)St+=this[T+--L]*ft;return St},y.prototype.readUint8=y.prototype.readUInt8=function(T,L){return T>>>=0,L||At(T,1,this.length),this[T]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(T,L){return T>>>=0,L||At(T,2,this.length),this[T]|this[T+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(T,L){return T>>>=0,L||At(T,2,this.length),this[T]<<8|this[T+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(T,L){return T>>>=0,L||At(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+16777216*this[T+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(T,L){return T>>>=0,L||At(T,4,this.length),16777216*this[T]+(this[T+1]<<16|this[T+2]<<8|this[T+3])},y.prototype.readBigUInt64LE=mt(function(T){yt(T>>>=0,"offset");const L=this[T],$=this[T+7];L!==void 0&&$!==void 0||dt(T,this.length-8);const St=L+256*this[++T]+65536*this[++T]+this[++T]*2**24,ft=this[++T]+256*this[++T]+65536*this[++T]+$*2**24;return BigInt(St)+(BigInt(ft)<>>=0,"offset");const L=this[T],$=this[T+7];L!==void 0&&$!==void 0||dt(T,this.length-8);const St=L*2**24+65536*this[++T]+256*this[++T]+this[++T],ft=this[++T]*2**24+65536*this[++T]+256*this[++T]+$;return(BigInt(St)<>>=0,L>>>=0,$||At(T,L,this.length);let St=this[T],ft=1,ee=0;for(;++ee=ft&&(St-=Math.pow(2,8*L)),St},y.prototype.readIntBE=function(T,L,$){T>>>=0,L>>>=0,$||At(T,L,this.length);let St=L,ft=1,ee=this[T+--St];for(;St>0&&(ft*=256);)ee+=this[T+--St]*ft;return ft*=128,ee>=ft&&(ee-=Math.pow(2,8*L)),ee},y.prototype.readInt8=function(T,L){return T>>>=0,L||At(T,1,this.length),128&this[T]?-1*(255-this[T]+1):this[T]},y.prototype.readInt16LE=function(T,L){T>>>=0,L||At(T,2,this.length);const $=this[T]|this[T+1]<<8;return 32768&$?4294901760|$:$},y.prototype.readInt16BE=function(T,L){T>>>=0,L||At(T,2,this.length);const $=this[T+1]|this[T]<<8;return 32768&$?4294901760|$:$},y.prototype.readInt32LE=function(T,L){return T>>>=0,L||At(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},y.prototype.readInt32BE=function(T,L){return T>>>=0,L||At(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},y.prototype.readBigInt64LE=mt(function(T){yt(T>>>=0,"offset");const L=this[T],$=this[T+7];L!==void 0&&$!==void 0||dt(T,this.length-8);const St=this[T+4]+256*this[T+5]+65536*this[T+6]+($<<24);return(BigInt(St)<>>=0,"offset");const L=this[T],$=this[T+7];L!==void 0&&$!==void 0||dt(T,this.length-8);const St=(L<<24)+65536*this[++T]+256*this[++T]+this[++T];return(BigInt(St)<>>=0,L||At(T,4,this.length),z.read(this,T,!0,23,4)},y.prototype.readFloatBE=function(T,L){return T>>>=0,L||At(T,4,this.length),z.read(this,T,!1,23,4)},y.prototype.readDoubleLE=function(T,L){return T>>>=0,L||At(T,8,this.length),z.read(this,T,!0,52,8)},y.prototype.readDoubleBE=function(T,L){return T>>>=0,L||At(T,8,this.length),z.read(this,T,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(T,L,$,St){T=+T,L>>>=0,$>>>=0,!St&&c(this,T,L,$,Math.pow(2,8*$)-1,0);let ft=1,ee=0;for(this[L]=255&T;++ee<$&&(ft*=256);)this[L+ee]=T/ft&255;return L+$},y.prototype.writeUintBE=y.prototype.writeUIntBE=function(T,L,$,St){T=+T,L>>>=0,$>>>=0,!St&&c(this,T,L,$,Math.pow(2,8*$)-1,0);let ft=$-1,ee=1;for(this[L+ft]=255&T;--ft>=0&&(ee*=256);)this[L+ft]=T/ee&255;return L+$},y.prototype.writeUint8=y.prototype.writeUInt8=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,1,255,0),this[L]=255&T,L+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,2,65535,0),this[L]=255&T,this[L+1]=T>>>8,L+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,2,65535,0),this[L]=T>>>8,this[L+1]=255&T,L+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,4,4294967295,0),this[L+3]=T>>>24,this[L+2]=T>>>16,this[L+1]=T>>>8,this[L]=255&T,L+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,4,4294967295,0),this[L]=T>>>24,this[L+1]=T>>>16,this[L+2]=T>>>8,this[L+3]=255&T,L+4},y.prototype.writeBigUInt64LE=mt(function(T,L=0){return N(this,T,L,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeBigUInt64BE=mt(function(T,L=0){return G(this,T,L,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeIntLE=function(T,L,$,St){if(T=+T,L>>>=0,!St){const W=Math.pow(2,8*$-1);c(this,T,L,$,W-1,-W)}let ft=0,ee=1,_=0;for(this[L]=255&T;++ft<$&&(ee*=256);)T<0&&_===0&&this[L+ft-1]!==0&&(_=1),this[L+ft]=(T/ee|0)-_&255;return L+$},y.prototype.writeIntBE=function(T,L,$,St){if(T=+T,L>>>=0,!St){const W=Math.pow(2,8*$-1);c(this,T,L,$,W-1,-W)}let ft=$-1,ee=1,_=0;for(this[L+ft]=255&T;--ft>=0&&(ee*=256);)T<0&&_===0&&this[L+ft+1]!==0&&(_=1),this[L+ft]=(T/ee|0)-_&255;return L+$},y.prototype.writeInt8=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,1,127,-128),T<0&&(T=255+T+1),this[L]=255&T,L+1},y.prototype.writeInt16LE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,2,32767,-32768),this[L]=255&T,this[L+1]=T>>>8,L+2},y.prototype.writeInt16BE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,2,32767,-32768),this[L]=T>>>8,this[L+1]=255&T,L+2},y.prototype.writeInt32LE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,4,2147483647,-2147483648),this[L]=255&T,this[L+1]=T>>>8,this[L+2]=T>>>16,this[L+3]=T>>>24,L+4},y.prototype.writeInt32BE=function(T,L,$){return T=+T,L>>>=0,$||c(this,T,L,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[L]=T>>>24,this[L+1]=T>>>16,this[L+2]=T>>>8,this[L+3]=255&T,L+4},y.prototype.writeBigInt64LE=mt(function(T,L=0){return N(this,T,L,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeBigInt64BE=mt(function(T,L=0){return G(this,T,L,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeFloatLE=function(T,L,$){return Et(this,T,L,!0,$)},y.prototype.writeFloatBE=function(T,L,$){return Et(this,T,L,!1,$)},y.prototype.writeDoubleLE=function(T,L,$){return q(this,T,L,!0,$)},y.prototype.writeDoubleBE=function(T,L,$){return q(this,T,L,!1,$)},y.prototype.copy=function(T,L,$,St){if(!y.isBuffer(T))throw new TypeError("argument should be a Buffer");if($||($=0),St||St===0||(St=this.length),L>=T.length&&(L=T.length),L||(L=0),St>0&&St<$&&(St=$),St===$||T.length===0||this.length===0)return 0;if(L<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("Index out of range");if(St<0)throw new RangeError("sourceEnd out of bounds");St>this.length&&(St=this.length),T.length-L>>=0,$=$===void 0?this.length:$>>>0,T||(T=0),typeof T=="number")for(ft=L;ft<$;++ft)this[ft]=T;else{const ee=y.isBuffer(T)?T:y.from(T,St),_=ee.length;if(_===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(ft=0;ft<$-L;++ft)this[ft+L]=ee[ft%_]}return this};const Tt={};function Ft(T,L,$){Tt[T]=class extends ${constructor(){super(),Object.defineProperty(this,"message",{value:L.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${T}]`,this.stack,delete this.name}get code(){return T}set code(St){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:St,writable:!0})}toString(){return`${this.name} [${T}]: ${this.message}`}}}function vt(T){let L="",$=T.length;const St=T[0]==="-"?1:0;for(;$>=St+4;$-=3)L=`_${T.slice($-3,$)}${L}`;return`${T.slice(0,$)}${L}`}function bt(T,L,$,St,ft,ee){if(T>$||T= 0${_} and < 2${_} ** ${8*(ee+1)}${_}`:`>= -(2${_} ** ${8*(ee+1)-1}${_}) and < 2 ** ${8*(ee+1)-1}${_}`,new Tt.ERR_OUT_OF_RANGE("value",W,T)}(function(_,W,at){yt(W,"offset"),_[W]!==void 0&&_[W+at]!==void 0||dt(W,_.length-(at+1))})(St,ft,ee)}function yt(T,L){if(typeof T!="number")throw new Tt.ERR_INVALID_ARG_TYPE(L,"number",T)}function dt(T,L,$){throw Math.floor(T)!==T?(yt(T,$),new Tt.ERR_OUT_OF_RANGE("offset","an integer",T)):L<0?new Tt.ERR_BUFFER_OUT_OF_BOUNDS:new Tt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${L}`,T)}Ft("ERR_BUFFER_OUT_OF_BOUNDS",function(T){return T?`${T} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ft("ERR_INVALID_ARG_TYPE",function(T,L){return`The "${T}" argument must be of type number. Received type ${typeof L}`},TypeError),Ft("ERR_OUT_OF_RANGE",function(T,L,$){let St=`The value of "${T}" is out of range.`,ft=$;return Number.isInteger($)&&Math.abs($)>4294967296?ft=vt(String($)):typeof $=="bigint"&&(ft=String($),($>BigInt(2)**BigInt(32)||$<-(BigInt(2)**BigInt(32)))&&(ft=vt(ft)),ft+="n"),St+=` It must be ${L}. Received ${ft}`,St},RangeError);const lt=/[^+/0-9A-Za-z-_]/g;function xt(T,L){let $;L=L||1/0;const St=T.length;let ft=null;const ee=[];for(let _=0;_55295&&$<57344){if(!ft){if($>56319){(L-=3)>-1&&ee.push(239,191,189);continue}if(_+1===St){(L-=3)>-1&&ee.push(239,191,189);continue}ft=$;continue}if($<56320){(L-=3)>-1&&ee.push(239,191,189),ft=$;continue}$=65536+(ft-55296<<10|$-56320)}else ft&&(L-=3)>-1&&ee.push(239,191,189);if(ft=null,$<128){if((L-=1)<0)break;ee.push($)}else if($<2048){if((L-=2)<0)break;ee.push($>>6|192,63&$|128)}else if($<65536){if((L-=3)<0)break;ee.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((L-=4)<0)break;ee.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return ee}function Ot(T){return v.toByteArray(function(L){if((L=(L=L.split("=")[0]).trim().replace(lt,"")).length<2)return"";for(;L.length%4!=0;)L+="=";return L}(T))}function kt(T,L,$,St){let ft;for(ft=0;ft=L.length||ft>=T.length);++ft)L[ft+$]=T[ft];return ft}function Ct(T,L){return T instanceof L||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===L.name}function H(T){return T!=T}const it=function(){const T="0123456789abcdef",L=new Array(256);for(let $=0;$<16;++$){const St=16*$;for(let ft=0;ft<16;++ft)L[St+ft]=T[$]+T[ft]}return L}();function mt(T){return typeof BigInt>"u"?Dt:T}function Dt(){throw new Error("BigInt not supported")}},6866(P){P.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"}},3144(P,M,l){var v=l(6743),z=l(1002),s=l(76),E=l(7119);P.exports=E||v.call(s,z)},2205(P,M,l){var v=l(6743),z=l(1002),s=l(3144);P.exports=function(){return s(v,z,arguments)}},1002(P){P.exports=Function.prototype.apply},76(P){P.exports=Function.prototype.call},3126(P,M,l){var v=l(6743),z=l(9675),s=l(76),E=l(3144);P.exports=function(k){if(k.length<1||typeof k[0]!="function")throw new z("a function is required");return E(v,s,k)}},7119(P){P.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},487(P,M,l){var v=l(6897),z=l(655),s=l(3126),E=l(2205);P.exports=function(k){var y=s(arguments),O=k.length-(arguments.length-1);return v(y,1+(O>0?O:0),!0)},z?z(P.exports,"apply",{value:E}):P.exports.apply=E},6556(P,M,l){var v=l(453),z=l(3126),s=z([v("%String.prototype.indexOf%")]);P.exports=function(E,k){var y=v(E,!!k);return typeof y=="function"&&s(E,".prototype.")>-1?z([y]):y}},41(P,M,l){var v=l(655),z=l(8068),s=l(9675),E=l(5795);P.exports=function(k,y,O){if(!k||typeof k!="object"&&typeof k!="function")throw new s("`obj` must be an object or a function`");if(typeof y!="string"&&typeof y!="symbol")throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new s("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,m=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],h=!!E&&E(k,y);if(v)v(k,y,{configurable:p===null&&h?h.configurable:!p,enumerable:u===null&&h?h.enumerable:!u,value:O,writable:m===null&&h?h.writable:!m});else{if(!f&&(u||m||p))throw new z("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");k[y]=O}}},7176(P,M,l){var v,z=l(3126),s=l(5795);try{v=[].__proto__===Array.prototype}catch(O){if(!O||typeof O!="object"||!("code"in O)||O.code!=="ERR_PROTO_ACCESS")throw O}var E=!!v&&s&&s(Object.prototype,"__proto__"),k=Object,y=k.getPrototypeOf;P.exports=E&&typeof E.get=="function"?z([E.get]):typeof y=="function"&&function(O){return y(O==null?O:k(O))}},655(P){var M=Object.defineProperty||!1;if(M)try{M({},"a",{value:1})}catch{M=!1}P.exports=M},1237(P){P.exports=EvalError},9383(P){P.exports=Error},9290(P){P.exports=RangeError},9538(P){P.exports=ReferenceError},8068(P){P.exports=SyntaxError},9675(P){P.exports=TypeError},5345(P){P.exports=URIError},9612(P){P.exports=Object},7007(P){var M,l=typeof Reflect=="object"?Reflect:null,v=l&&typeof l.apply=="function"?l.apply:function(g,w,R){return Function.prototype.apply.call(g,w,R)};M=l&&typeof l.ownKeys=="function"?l.ownKeys:Object.getOwnPropertySymbols?function(g){return Object.getOwnPropertyNames(g).concat(Object.getOwnPropertySymbols(g))}:function(g){return Object.getOwnPropertyNames(g)};var z=Number.isNaN||function(g){return g!=g};function s(){s.init.call(this)}P.exports=s,P.exports.once=function(g,w){return new Promise(function(R,S){function C(ot){g.removeListener(w,x),S(ot)}function x(){typeof g.removeListener=="function"&&g.removeListener("error",C),R([].slice.call(arguments))}A(g,w,x,{once:!0}),w!=="error"&&function(ot,Q,V){typeof ot.on=="function"&&A(ot,"error",Q,V)}(g,C,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var E=10;function k(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}function y(g){return g._maxListeners===void 0?s.defaultMaxListeners:g._maxListeners}function O(g,w,R,S){var C,x,ot,Q;if(k(R),(x=g._events)===void 0?(x=g._events=Object.create(null),g._eventsCount=0):(x.newListener!==void 0&&(g.emit("newListener",w,R.listener?R.listener:R),x=g._events),ot=x[w]),ot===void 0)ot=x[w]=R,++g._eventsCount;else if(typeof ot=="function"?ot=x[w]=S?[R,ot]:[ot,R]:S?ot.unshift(R):ot.push(R),(C=y(g))>0&&ot.length>C&&!ot.warned){ot.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+ot.length+" "+String(w)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=g,V.type=w,V.count=ot.length,Q=V,console&&console.warn&&console.warn(Q)}return g}function u(){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 m(g,w,R){var S={fired:!1,wrapFn:void 0,target:g,type:w,listener:R},C=u.bind(S);return C.listener=R,S.wrapFn=C,C}function p(g,w,R){var S=g._events;if(S===void 0)return[];var C=S[w];return C===void 0?[]:typeof C=="function"?R?[C.listener||C]:[C]:R?function(x){for(var ot=new Array(x.length),Q=0;Q0&&(x=w[0]),x instanceof Error)throw x;var ot=new Error("Unhandled error."+(x?" ("+x.message+")":""));throw ot.context=x,ot}var Q=C[g];if(Q===void 0)return!1;if(typeof Q=="function")v(Q,this,w);else{var V=Q.length,Y=h(Q,V);for(R=0;R=0;x--)if(R[x]===w||R[x].listener===w){ot=R[x].listener,C=x;break}if(C<0)return this;C===0?R.shift():function(Q,V){for(;V+1=0;S--)this.removeListener(g,w[S]);return this},s.prototype.listeners=function(g){return p(this,g,!0)},s.prototype.rawListeners=function(g){return p(this,g,!1)},s.listenerCount=function(g,w){return typeof g.listenerCount=="function"?g.listenerCount(w):f.call(g,w)},s.prototype.listenerCount=f,s.prototype.eventNames=function(){return this._eventsCount>0?M(this._events):[]}},1731(P,M,l){var v=l(8287).Buffer,z=l(8835).parse,s=l(7007),E=l(1083),k=l(1568),y=l(537),O=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],u=[239,187,191],m=262144,p=/^(cookie|authorization)$/i;function f(g,w){var R=f.CONNECTING,S=w&&w.headers,C=!1;Object.defineProperty(this,"readyState",{get:function(){return R}}),Object.defineProperty(this,"url",{get:function(){return g}});var x,ot=this;function Q(At){R!==f.CLOSED&&(R=f.CONNECTING,Rt("error",new h("error",{message:At})),pt&&(g=pt,pt=null,C=!1),setTimeout(function(){R!==f.CONNECTING||ot.connectionInProgress||(ot.connectionInProgress=!0,Bt())},ot.reconnectInterval))}ot.reconnectInterval=1e3,ot.connectionInProgress=!1;var V="";S&&S["Last-Event-ID"]&&(V=S["Last-Event-ID"],delete S["Last-Event-ID"]);var Y=!1,ut="",Ut="",pt=null;function Bt(){var At=z(g),c=At.protocol==="https:";if(At.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},V&&(At.headers["Last-Event-ID"]=V),S){var N=C?function(Ft){var vt={};for(var bt in Ft)p.test(bt)||(vt[bt]=Ft[bt]);return vt}(S):S;for(var G in N){var tt=N[G];tt&&(At.headers[G]=tt)}}if(At.rejectUnauthorized=!(w&&!w.rejectUnauthorized),w&&w.createConnection!==void 0&&(At.createConnection=w.createConnection),w&&w.proxy){var Et=z(w.proxy);c=Et.protocol==="https:",At.protocol=c?"https:":"http:",At.path=g,At.headers.Host=At.host,At.hostname=Et.hostname,At.host=Et.host,At.port=Et.port}if(w&&w.https){for(var q in w.https)if(O.indexOf(q)!==-1){var Tt=w.https[q];Tt!==void 0&&(At[q]=Tt)}}w&&w.withCredentials!==void 0&&(At.withCredentials=w.withCredentials),x=(c?E:k).request(At,function(Ft){if(ot.connectionInProgress=!1,Ft.statusCode===500||Ft.statusCode===502||Ft.statusCode===503||Ft.statusCode===504)return Rt("error",new h("error",{status:Ft.statusCode,message:Ft.statusMessage})),void Q();if(Ft.statusCode===301||Ft.statusCode===302||Ft.statusCode===307){var vt=Ft.headers.location;if(!vt)return void Rt("error",new h("error",{status:Ft.statusCode,message:Ft.statusMessage}));var bt=new URL(g).origin,yt=new URL(vt).origin;return C=bt!==yt,Ft.statusCode===307&&(pt=g),g=vt,void process.nextTick(Bt)}if(Ft.statusCode!==200)return Rt("error",new h("error",{status:Ft.statusCode,message:Ft.statusMessage})),ot.close();var dt,lt;R=f.OPEN,Ft.on("close",function(){Ft.removeAllListeners("close"),Ft.removeAllListeners("end"),Q()}),Ft.on("end",function(){Ft.removeAllListeners("close"),Ft.removeAllListeners("end"),Q()}),Rt("open",new h("open"));var xt=0,Ot=-1,kt=0,Ct=0;Ft.on("data",function(H){dt?(H.length>dt.length-Ct&&((kt=2*dt.length+H.length)>m&&(kt=dt.length+H.length+m),lt=v.alloc(kt),dt.copy(lt,0,0,Ct),dt=lt),H.copy(dt,Ct),Ct+=H.length):(function(St){return u.every(function(ft,ee){return St[ee]===ft})}(dt=H)&&(dt=dt.slice(u.length)),Ct=dt.length);for(var it=0,mt=Ct;it0&&(dt=dt.slice(it,Ct),Ct=dt.length)})}),x.on("error",function(Ft){ot.connectionInProgress=!1,Q(Ft.message)}),x.setNoDelay&&x.setNoDelay(!0),x.end()}function Rt(){ot.listeners(arguments[0]).length>0&&ot.emit.apply(ot,arguments)}function J(At,c,N,G){if(G===0){if(ut.length>0){var tt=Ut||"message";Rt(tt,new A(tt,{data:ut.slice(0,-1),lastEventId:V,origin:new URL(g).origin})),ut=""}Ut=void 0}else if(N>0){var Et=N<0,q=0,Tt=At.slice(c,c+(Et?G:N)).toString();c+=q=Et?G:At[c+N+1]!==32?N+1:N+2;var Ft=G-q,vt=At.slice(c,c+Ft).toString();if(Tt==="data")ut+=vt+` +`;else if(Tt==="event")Ut=vt;else if(Tt==="id")V=vt;else if(Tt==="retry"){var bt=parseInt(vt,10);Number.isNaN(bt)||(ot.reconnectInterval=bt)}}}Bt(),this._close=function(){R!==f.CLOSED&&(R=f.CLOSED,x.abort&&x.abort(),x.xhr&&x.xhr.abort&&x.xhr.abort())}}function h(g,w){if(Object.defineProperty(this,"type",{writable:!1,value:g,enumerable:!0}),w)for(var R in w)w.hasOwnProperty(R)&&Object.defineProperty(this,R,{writable:!1,value:w[R],enumerable:!0})}function A(g,w){for(var R in Object.defineProperty(this,"type",{writable:!1,value:g,enumerable:!0}),w)w.hasOwnProperty(R)&&Object.defineProperty(this,R,{writable:!1,value:w[R],enumerable:!0})}P.exports=f,y.inherits(f,s.EventEmitter),f.prototype.constructor=f,["open","error","message"].forEach(function(g){Object.defineProperty(f.prototype,"on"+g,{get:function(){var w=this.listeners(g)[0];return w?w._listener?w._listener:w:void 0},set:function(w){this.removeAllListeners(g),this.addEventListener(g,w)}})}),Object.defineProperty(f,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(f,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(f,"CLOSED",{enumerable:!0,value:2}),f.prototype.CONNECTING=0,f.prototype.OPEN=1,f.prototype.CLOSED=2,f.prototype.close=function(){this._close()},f.prototype.addEventListener=function(g,w){typeof w=="function"&&(w._listener=w,this.on(g,w))},f.prototype.dispatchEvent=function(g){if(!g.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(g.type,g.detail)},f.prototype.removeEventListener=function(g,w){typeof w=="function"&&(w._listener=void 0,this.removeListener(g,w))}},2682(P,M,l){var v=l(9600),z=Object.prototype.toString,s=Object.prototype.hasOwnProperty;P.exports=function(E,k,y){if(!v(k))throw new TypeError("iterator must be a function");var O,u;arguments.length>=3&&(O=y),u=E,z.call(u)==="[object Array]"?function(m,p,f){for(var h=0,A=m.length;hM},453(P,M,l){var v,z=l(9612),s=l(9383),E=l(1237),k=l(9290),y=l(9538),O=l(8068),u=l(9675),m=l(5345),p=l(1514),f=l(8968),h=l(6188),A=l(8002),g=l(5880),w=l(414),R=l(3093),S=Function,C=function(Ot){try{return S('"use strict"; return ('+Ot+").constructor;")()}catch{}},x=l(5795),ot=l(655),Q=function(){throw new u},V=x?function(){try{return Q}catch{try{return x(arguments,"callee").get}catch{return Q}}}():Q,Y=l(4039)(),ut=l(3628),Ut=l(1064),pt=l(8648),Bt=l(1002),Rt=l(76),J={},At=typeof Uint8Array<"u"&&ut?ut(Uint8Array):v,c={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":Y&&ut?ut([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":s,"%eval%":eval,"%EvalError%":E,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":S,"%GeneratorFunction%":J,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Y&&ut?ut(ut([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map<"u"&&Y&&ut?ut(new Map()[Symbol.iterator]()):v,"%Math%":Math,"%Number%":Number,"%Object%":z,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":k,"%ReferenceError%":y,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set<"u"&&Y&&ut?ut(new Set()[Symbol.iterator]()):v,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Y&&ut?ut(""[Symbol.iterator]()):v,"%Symbol%":Y?Symbol:v,"%SyntaxError%":O,"%ThrowTypeError%":V,"%TypedArray%":At,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":m,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":Rt,"%Function.prototype.apply%":Bt,"%Object.defineProperty%":ot,"%Object.getPrototypeOf%":Ut,"%Math.abs%":p,"%Math.floor%":f,"%Math.max%":h,"%Math.min%":A,"%Math.pow%":g,"%Math.round%":w,"%Math.sign%":R,"%Reflect.getPrototypeOf%":pt};if(ut)try{null.error}catch(Ot){var N=ut(ut(Ot));c["%Error.prototype%"]=N}var G=function Ot(kt){var Ct;if(kt==="%AsyncFunction%")Ct=C("async function () {}");else if(kt==="%GeneratorFunction%")Ct=C("function* () {}");else if(kt==="%AsyncGeneratorFunction%")Ct=C("async function* () {}");else if(kt==="%AsyncGenerator%"){var H=Ot("%AsyncGeneratorFunction%");H&&(Ct=H.prototype)}else if(kt==="%AsyncIteratorPrototype%"){var it=Ot("%AsyncGenerator%");it&&ut&&(Ct=ut(it.prototype))}return c[kt]=Ct,Ct},tt={__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"]},Et=l(6743),q=l(9957),Tt=Et.call(Rt,Array.prototype.concat),Ft=Et.call(Bt,Array.prototype.splice),vt=Et.call(Rt,String.prototype.replace),bt=Et.call(Rt,String.prototype.slice),yt=Et.call(Rt,RegExp.prototype.exec),dt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,lt=/\\(\\)?/g,xt=function(Ot,kt){var Ct,H=Ot;if(q(tt,H)&&(H="%"+(Ct=tt[H])[0]+"%"),q(c,H)){var it=c[H];if(it===J&&(it=G(H)),it===void 0&&!kt)throw new u("intrinsic "+Ot+" exists, but is not available. Please file an issue!");return{alias:Ct,name:H,value:it}}throw new O("intrinsic "+Ot+" does not exist!")};P.exports=function(Ot,kt){if(typeof Ot!="string"||Ot.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof kt!="boolean")throw new u('"allowMissing" argument must be a boolean');if(yt(/^%?[^%]*%?$/,Ot)===null)throw new O("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ct=function(at){var Xt=bt(at,0,1),ae=bt(at,-1);if(Xt==="%"&&ae!=="%")throw new O("invalid intrinsic syntax, expected closing `%`");if(ae==="%"&&Xt!=="%")throw new O("invalid intrinsic syntax, expected opening `%`");var Kt=[];return vt(at,dt,function(Ne,D,et,gt){Kt[Kt.length]=et?vt(gt,lt,"$1"):D||Ne}),Kt}(Ot),H=Ct.length>0?Ct[0]:"",it=xt("%"+H+"%",kt),mt=it.name,Dt=it.value,T=!1,L=it.alias;L&&(H=L[0],Ft(Ct,Tt([0,1],L)));for(var $=1,St=!0;$=Ct.length){var W=x(Dt,ft);Dt=(St=!!W)&&"get"in W&&!("originalValue"in W.get)?W.get:Dt[ft]}else St=q(Dt,ft),Dt=Dt[ft];St&&!T&&(c[mt]=Dt)}}return Dt}},1064(P,M,l){var v=l(9612);P.exports=v.getPrototypeOf||null},8648(P){P.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null},3628(P,M,l){var v=l(8648),z=l(1064),s=l(7176);P.exports=v?function(E){return v(E)}:z?function(E){if(!E||typeof E!="object"&&typeof E!="function")throw new TypeError("getProto: not an object");return z(E)}:s?function(E){return s(E)}:null},6549(P){P.exports=Object.getOwnPropertyDescriptor},5795(P,M,l){var v=l(6549);if(v)try{v([],"length")}catch{v=null}P.exports=v},592(P,M,l){var v=l(655),z=function(){return!!v};z.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},P.exports=z},4039(P,M,l){var v=typeof Symbol<"u"&&Symbol,z=l(1333);P.exports=function(){return typeof v=="function"&&typeof Symbol=="function"&&typeof v("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&z()}},1333(P){P.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var M={},l=Symbol("test"),v=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(v)!=="[object Symbol]")return!1;for(var z in M[l]=42,M)return!1;if(typeof Object.keys=="function"&&Object.keys(M).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(M).length!==0)return!1;var s=Object.getOwnPropertySymbols(M);if(s.length!==1||s[0]!==l||!Object.prototype.propertyIsEnumerable.call(M,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var E=Object.getOwnPropertyDescriptor(M,l);if(E.value!==42||E.enumerable!==!0)return!1}return!0}},9092(P,M,l){var v=l(1333);P.exports=function(){return v()&&!!Symbol.toStringTag}},9957(P,M,l){var v=Function.prototype.call,z=Object.prototype.hasOwnProperty,s=l(6743);P.exports=s.call(v,z)},1083(P,M,l){var v=l(1568),z=l(8835),s=P.exports;for(var E in v)v.hasOwnProperty(E)&&(s[E]=v[E]);function k(y){if(typeof y=="string"&&(y=z.parse(y)),y.protocol||(y.protocol="https:"),y.protocol!=="https:")throw new Error('Protocol "'+y.protocol+'" not supported. Expected "https:"');return y}s.request=function(y,O){return y=k(y),v.request.call(this,y,O)},s.get=function(y,O){return y=k(y),v.get.call(this,y,O)}},251(P,M){M.read=function(l,v,z,s,E){var k,y,O=8*E-s-1,u=(1<>1,p=-7,f=z?E-1:0,h=z?-1:1,A=l[v+f];for(f+=h,k=A&(1<<-p)-1,A>>=-p,p+=O;p>0;k=256*k+l[v+f],f+=h,p-=8);for(y=k&(1<<-p)-1,k>>=-p,p+=s;p>0;y=256*y+l[v+f],f+=h,p-=8);if(k===0)k=1-m;else{if(k===u)return y?NaN:1/0*(A?-1:1);y+=Math.pow(2,s),k-=m}return(A?-1:1)*y*Math.pow(2,k-s)},M.write=function(l,v,z,s,E,k){var y,O,u,m=8*k-E-1,p=(1<>1,h=E===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=s?0:k-1,g=s?1:-1,w=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(O=isNaN(v)?1:0,y=p):(y=Math.floor(Math.log(v)/Math.LN2),v*(u=Math.pow(2,-y))<1&&(y--,u*=2),(v+=y+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(y++,u/=2),y+f>=p?(O=0,y=p):y+f>=1?(O=(v*u-1)*Math.pow(2,E),y+=f):(O=v*Math.pow(2,f-1)*Math.pow(2,E),y=0));E>=8;l[z+A]=255&O,A+=g,O/=256,E-=8);for(y=y<0;l[z+A]=255&y,A+=g,y/=256,m-=8);l[z+A-g]|=128*w}},6698(P){typeof Object.create=="function"?P.exports=function(M,l){l&&(M.super_=l,M.prototype=Object.create(l.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}))}:P.exports=function(M,l){if(l){M.super_=l;var v=function(){};v.prototype=l.prototype,M.prototype=new v,M.prototype.constructor=M}}},7244(P,M,l){var v=l(9092)(),z=l(6556)("Object.prototype.toString"),s=function(y){return!(v&&y&&typeof y=="object"&&Symbol.toStringTag in y)&&z(y)==="[object Arguments]"},E=function(y){return!!s(y)||y!==null&&typeof y=="object"&&"length"in y&&typeof y.length=="number"&&y.length>=0&&z(y)!=="[object Array]"&&"callee"in y&&z(y.callee)==="[object Function]"},k=function(){return s(arguments)}();s.isLegacyArguments=E,P.exports=k?s:E},9600(P){var M,l,v=Function.prototype.toString,z=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof z=="function"&&typeof Object.defineProperty=="function")try{M=Object.defineProperty({},"length",{get:function(){throw l}}),l={},z(function(){throw 42},null,M)}catch(f){f!==l&&(z=null)}else z=null;var s=/^\s*class\b/,E=function(f){try{var h=v.call(f);return s.test(h)}catch{return!1}},k=function(f){try{return!E(f)&&(v.call(f),!0)}catch{return!1}},y=Object.prototype.toString,O=typeof Symbol=="function"&&!!Symbol.toStringTag,u=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var p=document.all;y.call(p)===y.call(document.all)&&(m=function(f){if((u||!f)&&(f===void 0||typeof f=="object"))try{var h=y.call(f);return(h==="[object HTMLAllCollection]"||h==="[object HTML document.all class]"||h==="[object HTMLCollection]"||h==="[object Object]")&&f("")==null}catch{}return!1})}P.exports=z?function(f){if(m(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;try{z(f,null,M)}catch(h){if(h!==l)return!1}return!E(f)&&k(f)}:function(f){if(m(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;if(O)return k(f);if(E(f))return!1;var h=y.call(f);return!(h!=="[object Function]"&&h!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(h))&&k(f)}},8184(P,M,l){var v=l(6556),z=l(9721)(/^\s*(?:function)?\*/),s=l(9092)(),E=l(3628),k=v("Object.prototype.toString"),y=v("Function.prototype.toString"),O=l(4233);P.exports=function(u){if(typeof u!="function")return!1;if(z(y(u)))return!0;if(!s)return k(u)==="[object GeneratorFunction]";if(!E)return!1;var m=O();return m&&E(u)===m.prototype}},4035(P,M,l){var v,z=l(6556),s=l(9092)(),E=l(9957),k=l(5795);if(s){var y=z("RegExp.prototype.exec"),O={},u=function(){throw O},m={toString:u,valueOf:u};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=u),v=function(f){if(!f||typeof f!="object")return!1;var h=k(f,"lastIndex");if(!(h&&E(h,"value")))return!1;try{y(f,m)}catch(A){return A===O}}}else{var p=z("Object.prototype.toString");v=function(f){return!(!f||typeof f!="object"&&typeof f!="function")&&p(f)==="[object RegExp]"}}P.exports=v},5680(P,M,l){var v=l(5767);P.exports=function(z){return!!v(z)}},1514(P){P.exports=Math.abs},8968(P){P.exports=Math.floor},4459(P){P.exports=Number.isNaN||function(M){return M!=M}},6188(P){P.exports=Math.max},8002(P){P.exports=Math.min},5880(P){P.exports=Math.pow},414(P){P.exports=Math.round},3093(P,M,l){var v=l(4459);P.exports=function(z){return v(z)||z===0?z:z<0?-1:1}},8859(P,M,l){var v=typeof Map=="function"&&Map.prototype,z=Object.getOwnPropertyDescriptor&&v?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,s=v&&z&&typeof z.get=="function"?z.get:null,E=v&&Map.prototype.forEach,k=typeof Set=="function"&&Set.prototype,y=Object.getOwnPropertyDescriptor&&k?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,O=k&&y&&typeof y.get=="function"?y.get:null,u=k&&Set.prototype.forEach,m=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,A=Object.prototype.toString,g=Function.prototype.toString,w=String.prototype.match,R=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,x=String.prototype.toLowerCase,ot=RegExp.prototype.test,Q=Array.prototype.concat,V=Array.prototype.join,Y=Array.prototype.slice,ut=Math.floor,Ut=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pt=Object.getOwnPropertySymbols,Bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Rt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",J=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Rt||!0)?Symbol.toStringTag:null,At=Object.prototype.propertyIsEnumerable,c=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(St){return St.__proto__}:null);function N(St,ft){if(St===1/0||St===-1/0||St!=St||St&&St>-1e3&&St<1e3||ot.call(/e/,ft))return ft;var ee=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof St=="number"){var _=St<0?-ut(-St):ut(St);if(_!==St){var W=String(_),at=R.call(ft,W.length+1);return S.call(W,ee,"$&_")+"."+S.call(S.call(at,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(ft,ee,"$&_")}var G=l(2634),tt=G.custom,Et=lt(tt)?tt:null,q={__proto__:null,double:'"',single:"'"},Tt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function Ft(St,ft,ee){var _=ee.quoteStyle||ft,W=q[_];return W+St+W}function vt(St){return S.call(String(St),/"/g,""")}function bt(St){return!J||!(typeof St=="object"&&(J in St||St[J]!==void 0))}function yt(St){return kt(St)==="[object Array]"&&bt(St)}function dt(St){return kt(St)==="[object RegExp]"&&bt(St)}function lt(St){if(Rt)return St&&typeof St=="object"&&St instanceof Symbol;if(typeof St=="symbol")return!0;if(!St||typeof St!="object"||!Bt)return!1;try{return Bt.call(St),!0}catch{}return!1}P.exports=function St(ft,ee,_,W){var at=ee||{};if(Ot(at,"quoteStyle")&&!Ot(q,at.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ot(at,"maxStringLength")&&(typeof at.maxStringLength=="number"?at.maxStringLength<0&&at.maxStringLength!==1/0:at.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Xt=!Ot(at,"customInspect")||at.customInspect;if(typeof Xt!="boolean"&&Xt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ot(at,"indent")&&at.indent!==null&&at.indent!==" "&&!(parseInt(at.indent,10)===at.indent&&at.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ot(at,"numericSeparator")&&typeof at.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ae=at.numericSeparator;if(ft===void 0)return"undefined";if(ft===null)return"null";if(typeof ft=="boolean")return ft?"true":"false";if(typeof ft=="string")return H(ft,at);if(typeof ft=="number"){if(ft===0)return 1/0/ft>0?"0":"-0";var Kt=String(ft);return ae?N(ft,Kt):Kt}if(typeof ft=="bigint"){var Ne=String(ft)+"n";return ae?N(ft,Ne):Ne}var D=at.depth===void 0?5:at.depth;if(_===void 0&&(_=0),_>=D&&D>0&&typeof ft=="object")return yt(ft)?"[Array]":"[Object]";var et=function(ur,jr){var rn;if(ur.indent===" ")rn=" ";else{if(!(typeof ur.indent=="number"&&ur.indent>0))return null;rn=V.call(Array(ur.indent+1)," ")}return{base:rn,prev:V.call(Array(jr+1),rn)}}(at,_);if(W===void 0)W=[];else if(Ct(W,ft)>=0)return"[Circular]";function gt(ur,jr,rn){if(jr&&(W=Y.call(W)).push(jr),rn){var _n={depth:at.depth};return Ot(at,"quoteStyle")&&(_n.quoteStyle=at.quoteStyle),St(ur,_n,_+1,W)}return St(ur,at,_+1,W)}if(typeof ft=="function"&&!dt(ft)){var Yt=function(ur){if(ur.name)return ur.name;var jr=w.call(g.call(ur),/^function\s*([\w$]+)/);return jr?jr[1]:null}(ft),le=$(ft,gt);return"[Function"+(Yt?": "+Yt:" (anonymous)")+"]"+(le.length>0?" { "+V.call(le,", ")+" }":"")}if(lt(ft)){var we=Rt?S.call(String(ft),/^(Symbol\(.*\))_[^)]*$/,"$1"):Bt.call(ft);return typeof ft!="object"||Rt?we:mt(we)}if(function(ur){return!ur||typeof ur!="object"?!1:typeof HTMLElement<"u"&&ur instanceof HTMLElement?!0:typeof ur.nodeName=="string"&&typeof ur.getAttribute=="function"}(ft)){for(var ie="<"+x.call(String(ft.nodeName)),U=ft.attributes||[],X=0;X"}if(yt(ft)){if(ft.length===0)return"[]";var Pt=$(ft,gt);return et&&!function(ur){for(var jr=0;jr=0)return!1;return!0}(Pt)?"["+L(Pt,et)+"]":"[ "+V.call(Pt,", ")+" ]"}if(function(ur){return kt(ur)==="[object Error]"&&bt(ur)}(ft)){var Ht=$(ft,gt);return"cause"in Error.prototype||!("cause"in ft)||At.call(ft,"cause")?Ht.length===0?"["+String(ft)+"]":"{ ["+String(ft)+"] "+V.call(Ht,", ")+" }":"{ ["+String(ft)+"] "+V.call(Q.call("[cause]: "+gt(ft.cause),Ht),", ")+" }"}if(typeof ft=="object"&&Xt){if(Et&&typeof ft[Et]=="function"&&G)return G(ft,{depth:D-_});if(Xt!=="symbol"&&typeof ft.inspect=="function")return ft.inspect()}if(function(ur){if(!s||!ur||typeof ur!="object")return!1;try{s.call(ur);try{O.call(ur)}catch{return!0}return ur instanceof Map}catch{}return!1}(ft)){var re=[];return E&&E.call(ft,function(ur,jr){re.push(gt(jr,ft,!0)+" => "+gt(ur,ft))}),T("Map",s.call(ft),re,et)}if(function(ur){if(!O||!ur||typeof ur!="object")return!1;try{O.call(ur);try{s.call(ur)}catch{return!0}return ur instanceof Set}catch{}return!1}(ft)){var We=[];return u&&u.call(ft,function(ur){We.push(gt(ur,ft))}),T("Set",O.call(ft),We,et)}if(function(ur){if(!m||!ur||typeof ur!="object")return!1;try{m.call(ur,m);try{p.call(ur,p)}catch{return!0}return ur instanceof WeakMap}catch{}return!1}(ft))return Dt("WeakMap");if(function(ur){if(!p||!ur||typeof ur!="object")return!1;try{p.call(ur,p);try{m.call(ur,m)}catch{return!0}return ur instanceof WeakSet}catch{}return!1}(ft))return Dt("WeakSet");if(function(ur){if(!f||!ur||typeof ur!="object")return!1;try{return f.call(ur),!0}catch{}return!1}(ft))return Dt("WeakRef");if(function(ur){return kt(ur)==="[object Number]"&&bt(ur)}(ft))return mt(gt(Number(ft)));if(function(ur){if(!ur||typeof ur!="object"||!Ut)return!1;try{return Ut.call(ur),!0}catch{}return!1}(ft))return mt(gt(Ut.call(ft)));if(function(ur){return kt(ur)==="[object Boolean]"&&bt(ur)}(ft))return mt(h.call(ft));if(function(ur){return kt(ur)==="[object String]"&&bt(ur)}(ft))return mt(gt(String(ft)));if(typeof window<"u"&&ft===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ft===globalThis||l.g!==void 0&&ft===l.g)return"{ [object globalThis] }";if(!function(ur){return kt(ur)==="[object Date]"&&bt(ur)}(ft)&&!dt(ft)){var xe=$(ft,gt),je=c?c(ft)===Object.prototype:ft instanceof Object||ft.constructor===Object,Qe=ft instanceof Object?"":"null prototype",Oe=!je&&J&&Object(ft)===ft&&J in ft?R.call(kt(ft),8,-1):Qe?"Object":"",Cr=(je||typeof ft.constructor!="function"?"":ft.constructor.name?ft.constructor.name+" ":"")+(Oe||Qe?"["+V.call(Q.call([],Oe||[],Qe||[]),": ")+"] ":"");return xe.length===0?Cr+"{}":et?Cr+"{"+L(xe,et)+"}":Cr+"{ "+V.call(xe,", ")+" }"}return String(ft)};var xt=Object.prototype.hasOwnProperty||function(St){return St in this};function Ot(St,ft){return xt.call(St,ft)}function kt(St){return A.call(St)}function Ct(St,ft){if(St.indexOf)return St.indexOf(ft);for(var ee=0,_=St.length;ee<_;ee++)if(St[ee]===ft)return ee;return-1}function H(St,ft){if(St.length>ft.maxStringLength){var ee=St.length-ft.maxStringLength,_="... "+ee+" more character"+(ee>1?"s":"");return H(R.call(St,0,ft.maxStringLength),ft)+_}var W=Tt[ft.quoteStyle||"single"];return W.lastIndex=0,Ft(S.call(S.call(St,W,"\\$1"),/[\x00-\x1f]/g,it),"single",ft)}function it(St){var ft=St.charCodeAt(0),ee={8:"b",9:"t",10:"n",12:"f",13:"r"}[ft];return ee?"\\"+ee:"\\x"+(ft<16?"0":"")+C.call(ft.toString(16))}function mt(St){return"Object("+St+")"}function Dt(St){return St+" { ? }"}function T(St,ft,ee,_){return St+" ("+ft+") {"+(_?L(ee,_):V.call(ee,", "))+"}"}function L(St,ft){if(St.length===0)return"";var ee=` +`+ft.prev+ft.base;return ee+V.call(St,","+ee)+` +`+ft.prev}function $(St,ft){var ee=yt(St),_=[];if(ee){_.length=St.length;for(var W=0;W-1)return u.split(",");if(m.throwOnLimitExceeded&&p>=m.arrayLimit)throw new RangeError("Array limit exceeded. Only "+m.arrayLimit+" element"+(m.arrayLimit===1?"":"s")+" allowed in an array.");return u},O=function(u,m,p,f){if(u){var h=function(A,g){var w=g.allowDots?A.replace(/\.([^.[]+)/g,"[$1]"):A;if(g.depth<=0)return!g.plainObjects&&z.call(Object.prototype,w)&&!g.allowPrototypes?void 0:[w];var R=/(\[[^[\]]*])/g,S=/(\[[^[\]]*])/.exec(w),C=S?w.slice(0,S.index):w,x=[];if(C){if(!g.plainObjects&&z.call(Object.prototype,C)&&!g.allowPrototypes)return;x[x.length]=C}for(var ot=0;(S=R.exec(w))!==null&&ot0&&A[A.length-1]==="[]"){var C=A.slice(0,-1).join("");S=Array.isArray(g)&&g[C]?g[C].length:0}for(var x=R?g:y(g,w,S),ot=A.length-1;ot>=0;--ot){var Q,V=A[ot];if(V==="[]"&&w.parseArrays)Q=v.isOverflow(x)?x:w.allowEmptyArrays&&(x===""||w.strictNullHandling&&x===null)?[]:v.combine([],x,w.arrayLimit,w.plainObjects);else{Q=w.plainObjects?{__proto__:null}:{};var Y=V.charAt(0)==="["&&V.charAt(V.length-1)==="]"?V.slice(1,-1):V,ut=w.decodeDotInKeys?Y.replace(/%2E/g,"."):Y,Ut=parseInt(ut,10),pt=!isNaN(Ut)&&V!==ut&&String(Ut)===ut&&Ut>=0&&w.parseArrays;if(w.parseArrays||ut!=="")if(pt&&UtQ)throw new RangeError("Parameter limit exceeded. Only "+Q+" parameter"+(Q===1?"":"s")+" allowed.");var Y,ut=-1,Ut=C.charset;if(C.charsetSentinel)for(Y=0;Y-1&&(Bt=s(Bt)?[Bt]:Bt),C.comma&&s(Bt)&&Bt.length>C.arrayLimit){if(C.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+C.arrayLimit+" element"+(C.arrayLimit===1?"":"s")+" allowed in an array.");Bt=v.combine([],Bt,C.arrayLimit,C.plainObjects)}if(pt!==null){var c=z.call(x,pt);c&&(C.duplicates==="combine"||Rt.indexOf("[]=")>-1)?x[pt]=v.combine(x[pt],Bt,C.arrayLimit,C.plainObjects):c&&C.duplicates!=="last"||(x[pt]=Bt)}}return x}(u,p):u,h=p.plainObjects?{__proto__:null}:{},A=Object.keys(f),g=0;g0?tt.join(",")||null:void 0}];else if(y(ut))vt=ut;else{var yt=Object.keys(tt);vt=Ut?yt.sort(Ut):yt}var dt=V?String(R).replace(/\./g,"%2E"):String(R),lt=C&&y(tt)&&tt.length===1?dt+"[]":dt;if(x&&y(tt)&&tt.length===0)return lt+"[]";for(var xt=0;xt0?Bt+pt:""}},7720(P,M,l){var v=l(4765),z=l(920),s=Object.prototype.hasOwnProperty,E=Array.isArray,k=z(),y=function(A,g){return k.set(A,g),A},O=function(A){return k.has(A)},u=function(A){return k.get(A)},m=function(A,g){k.set(A,g)},p=function(){for(var A=[],g=0;g<256;++g)A[A.length]="%"+((g<16?"0":"")+g.toString(16)).toUpperCase();return A}(),f=function(A,g){for(var w=g&&g.plainObjects?{__proto__:null}:{},R=0;Rw?y(f(C,{plainObjects:R}),C.length-1):C},compact:function(A){for(var g=[{obj:{o:A},prop:"o"}],w=[],R=0;R1;){var ut=Y.pop(),Ut=ut.obj[ut.prop];if(E(Ut)){for(var pt=[],Bt=0;Bt=h?C.slice(ot,ot+h):C,V=[],Y=0;Y=48&&ut<=57||ut>=65&&ut<=90||ut>=97&&ut<=122||S===v.RFC1738&&(ut===40||ut===41)?V[V.length]=Q.charAt(Y):ut<128?V[V.length]=p[ut]:ut<2048?V[V.length]=p[192|ut>>6]+p[128|63&ut]:ut<55296||ut>=57344?V[V.length]=p[224|ut>>12]+p[128|ut>>6&63]+p[128|63&ut]:(Y+=1,ut=65536+((1023&ut)<<10|1023&Q.charCodeAt(Y)),V[V.length]=p[240|ut>>18]+p[128|ut>>12&63]+p[128|ut>>6&63]+p[128|63&ut])}x+=V.join("")}return x},isBuffer:function(A){return!(!A||typeof A!="object")&&!!(A.constructor&&A.constructor.isBuffer&&A.constructor.isBuffer(A))},isOverflow:O,isRegExp:function(A){return Object.prototype.toString.call(A)==="[object RegExp]"},markOverflow:y,maybeMap:function(A,g){if(E(A)){for(var w=[],R=0;RR.arrayLimit)return y(f(g.concat(w),R),S);g[S]=w}else{if(!g||typeof g!="object")return[g,w];if(O(g)){var C=u(g)+1;g[C]=w,m(g,C)}else{if(R&&R.strictMerge)return[g,w];(R&&(R.plainObjects||R.allowPrototypes)||!s.call(Object.prototype,w))&&(g[w]=!0)}}return g}if(!g||typeof g!="object"){if(O(w)){for(var x=Object.keys(w),ot=R&&R.plainObjects?{__proto__:null,0:g}:{0:g},Q=0;QR.arrayLimit?y(f(V,R),V.length-1):V}var Y=g;return E(g)&&!E(w)&&(Y=f(g,R)),E(g)&&E(w)?(w.forEach(function(ut,Ut){if(s.call(g,Ut)){var pt=g[Ut];pt&&typeof pt=="object"&&ut&&typeof ut=="object"?g[Ut]=A(pt,ut,R):g[g.length]=ut}else g[Ut]=ut}),g):Object.keys(w).reduce(function(ut,Ut){var pt=w[Ut];if(s.call(ut,Ut)?ut[Ut]=A(ut[Ut],pt,R):ut[Ut]=pt,O(w)&&!O(ut)&&y(ut,u(w)),O(ut)){var Bt=parseInt(Ut,10);String(Bt)===Ut&&Bt>=0&&Bt>u(ut)&&m(ut,Bt)}return ut},Y)}}},3209(P,M,l){var v=65536,z=4294967295,s=l(2861).Buffer,E=l.g.crypto||l.g.msCrypto;E&&E.getRandomValues?P.exports=function(k,y){if(k>z)throw new RangeError("requested too many random bytes");var O=s.allocUnsafe(k);if(k>0)if(k>v)for(var u=0;u4294967295||y(u)!==u)throw new k("`length` must be a positive 32-bit integer");var m=arguments.length>2&&!!arguments[2],p=!0,f=!0;if("length"in O&&E){var h=E(O,"length");h&&!h.configurable&&(p=!1),h&&!h.writable&&(f=!1)}return(p||f||!m)&&(s?z(O,"length",u,!0,!0):z(O,"length",u)),O}},4803(P,M,l){var v=l(8859),z=l(9675),s=function(E,k,y){for(var O,u=E;(O=u.next)!=null;u=O)if(O.key===k)return u.next=O.next,y||(O.next=E.next,E.next=O),O};P.exports=function(){var E,k={assert:function(y){if(!k.has(y))throw new z("Side channel does not contain "+v(y))},delete:function(y){var O=E&&E.next,u=function(m,p){if(m)return s(m,p,!0)}(E,y);return u&&O&&O===u&&(E=void 0),!!u},get:function(y){return function(O,u){if(O){var m=s(O,u);return m&&m.value}}(E,y)},has:function(y){return function(O,u){return!!O&&!!s(O,u)}(E,y)},set:function(y,O){E||(E={next:void 0}),function(u,m,p){var f=s(u,m);f?f.value=p:u.next={key:m,next:u.next,value:p}}(E,y,O)}};return k}},507(P,M,l){var v=l(453),z=l(6556),s=l(8859),E=l(9675),k=v("%Map%",!0),y=z("Map.prototype.get",!0),O=z("Map.prototype.set",!0),u=z("Map.prototype.has",!0),m=z("Map.prototype.delete",!0),p=z("Map.prototype.size",!0);P.exports=!!k&&function(){var f,h={assert:function(A){if(!h.has(A))throw new E("Side channel does not contain "+s(A))},delete:function(A){if(f){var g=m(f,A);return p(f)===0&&(f=void 0),g}return!1},get:function(A){if(f)return y(f,A)},has:function(A){return!!f&&u(f,A)},set:function(A,g){f||(f=new k),O(f,A,g)}};return h}},2271(P,M,l){var v=l(453),z=l(6556),s=l(8859),E=l(507),k=l(9675),y=v("%WeakMap%",!0),O=z("WeakMap.prototype.get",!0),u=z("WeakMap.prototype.set",!0),m=z("WeakMap.prototype.has",!0),p=z("WeakMap.prototype.delete",!0);P.exports=y?function(){var f,h,A={assert:function(g){if(!A.has(g))throw new k("Side channel does not contain "+s(g))},delete:function(g){if(y&&g&&(typeof g=="object"||typeof g=="function")){if(f)return p(f,g)}else if(E&&h)return h.delete(g);return!1},get:function(g){return y&&g&&(typeof g=="object"||typeof g=="function")&&f?O(f,g):h&&h.get(g)},has:function(g){return y&&g&&(typeof g=="object"||typeof g=="function")&&f?m(f,g):!!h&&h.has(g)},set:function(g,w){y&&g&&(typeof g=="object"||typeof g=="function")?(f||(f=new y),u(f,g,w)):E&&(h||(h=E()),h.set(g,w))}};return A}:E},920(P,M,l){var v=l(9675),z=l(8859),s=l(4803),E=l(507),k=l(2271)||E||s;P.exports=function(){var y,O={assert:function(u){if(!O.has(u))throw new v("Side channel does not contain "+z(u))},delete:function(u){return!!y&&y.delete(u)},get:function(u){return y&&y.get(u)},has:function(u){return!!y&&y.has(u)},set:function(u,m){y||(y=k()),y.set(u,m)}};return O}},1568(P,M,l){var v=l(5537),z=l(6917),s=l(7510),E=l(6866),k=l(8835),y=M;y.request=function(O,u){O=typeof O=="string"?k.parse(O):s(O);var m=l.g.location.protocol.search(/^https?:$/)===-1?"http:":"",p=O.protocol||m,f=O.hostname||O.host,h=O.port,A=O.path||"/";f&&f.indexOf(":")!==-1&&(f="["+f+"]"),O.url=(f?p+"//"+f:"")+(h?":"+h:"")+A,O.method=(O.method||"GET").toUpperCase(),O.headers=O.headers||{};var g=new v(O);return u&&g.on("response",u),g},y.get=function(O,u){var m=y.request(O,u);return m.end(),m},y.ClientRequest=v,y.IncomingMessage=z.IncomingMessage,y.Agent=function(){},y.Agent.defaultMaxSockets=4,y.globalAgent=new y.Agent,y.STATUS_CODES=E,y.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},6688(P,M,l){var v;function z(){if(v!==void 0)return v;if(l.g.XMLHttpRequest){v=new l.g.XMLHttpRequest;try{v.open("GET",l.g.XDomainRequest?"/":"https://example.com")}catch{v=null}}else v=null;return v}function s(k){var y=z();if(!y)return!1;try{return y.responseType=k,y.responseType===k}catch{}return!1}function E(k){return typeof k=="function"}M.fetch=E(l.g.fetch)&&E(l.g.ReadableStream),M.writableStream=E(l.g.WritableStream),M.abortController=E(l.g.AbortController),M.arraybuffer=M.fetch||s("arraybuffer"),M.msstream=!M.fetch&&s("ms-stream"),M.mozchunkedarraybuffer=!M.fetch&&s("moz-chunked-arraybuffer"),M.overrideMimeType=M.fetch||!!z()&&E(z().overrideMimeType),v=null},5537(P,M,l){var v=l(8287).Buffer,z=l(6688),s=l(6698),E=l(6917),k=l(3242),y=E.IncomingMessage,O=E.readyStates,u=P.exports=function(p){var f,h=this;k.Writable.call(h),h._opts=p,h._body=[],h._headers={},p.auth&&h.setHeader("Authorization","Basic "+v.from(p.auth).toString("base64")),Object.keys(p.headers).forEach(function(g){h.setHeader(g,p.headers[g])});var A=!0;if(p.mode==="disable-fetch"||"requestTimeout"in p&&!z.abortController)A=!1,f=!0;else if(p.mode==="prefer-streaming")f=!1;else if(p.mode==="allow-wrong-content-type")f=!z.overrideMimeType;else{if(p.mode&&p.mode!=="default"&&p.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");f=!0}h._mode=function(g,w){return z.fetch&&w?"fetch":z.mozchunkedarraybuffer?"moz-chunked-arraybuffer":z.msstream?"ms-stream":z.arraybuffer&&g?"arraybuffer":"text"}(f,A),h._fetchTimer=null,h._socketTimeout=null,h._socketTimer=null,h.on("finish",function(){h._onFinish()})};s(u,k.Writable),u.prototype.setHeader=function(p,f){var h=p.toLowerCase();m.indexOf(h)===-1&&(this._headers[h]={name:p,value:f})},u.prototype.getHeader=function(p){var f=this._headers[p.toLowerCase()];return f?f.value:null},u.prototype.removeHeader=function(p){delete this._headers[p.toLowerCase()]},u.prototype._onFinish=function(){var p=this;if(!p._destroyed){var f=p._opts;"timeout"in f&&f.timeout!==0&&p.setTimeout(f.timeout);var h=p._headers,A=null;f.method!=="GET"&&f.method!=="HEAD"&&(A=new Blob(p._body,{type:(h["content-type"]||{}).value||""}));var g=[];if(Object.keys(h).forEach(function(C){var x=h[C].name,ot=h[C].value;Array.isArray(ot)?ot.forEach(function(Q){g.push([x,Q])}):g.push([x,ot])}),p._mode==="fetch"){var w=null;if(z.abortController){var R=new AbortController;w=R.signal,p._fetchAbortController=R,"requestTimeout"in f&&f.requestTimeout!==0&&(p._fetchTimer=l.g.setTimeout(function(){p.emit("requestTimeout"),p._fetchAbortController&&p._fetchAbortController.abort()},f.requestTimeout))}l.g.fetch(p._opts.url,{method:p._opts.method,headers:g,body:A||void 0,mode:"cors",credentials:f.withCredentials?"include":"same-origin",signal:w}).then(function(C){p._fetchResponse=C,p._resetTimers(!1),p._connect()},function(C){p._resetTimers(!0),p._destroyed||p.emit("error",C)})}else{var S=p._xhr=new l.g.XMLHttpRequest;try{S.open(p._opts.method,p._opts.url,!0)}catch(C){return void process.nextTick(function(){p.emit("error",C)})}"responseType"in S&&(S.responseType=p._mode),"withCredentials"in S&&(S.withCredentials=!!f.withCredentials),p._mode==="text"&&"overrideMimeType"in S&&S.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in f&&(S.timeout=f.requestTimeout,S.ontimeout=function(){p.emit("requestTimeout")}),g.forEach(function(C){S.setRequestHeader(C[0],C[1])}),p._response=null,S.onreadystatechange=function(){switch(S.readyState){case O.LOADING:case O.DONE:p._onXHRProgress()}},p._mode==="moz-chunked-arraybuffer"&&(S.onprogress=function(){p._onXHRProgress()}),S.onerror=function(){p._destroyed||(p._resetTimers(!0),p.emit("error",new Error("XHR error")))};try{S.send(A)}catch(C){return void process.nextTick(function(){p.emit("error",C)})}}}},u.prototype._onXHRProgress=function(){var p=this;p._resetTimers(!1),function(f){try{var h=f.status;return h!==null&&h!==0}catch{return!1}}(p._xhr)&&!p._destroyed&&(p._response||p._connect(),p._response._onXHRProgress(p._resetTimers.bind(p)))},u.prototype._connect=function(){var p=this;p._destroyed||(p._response=new y(p._xhr,p._fetchResponse,p._mode,p._resetTimers.bind(p)),p._response.on("error",function(f){p.emit("error",f)}),p.emit("response",p._response))},u.prototype._write=function(p,f,h){this._body.push(p),h()},u.prototype._resetTimers=function(p){var f=this;l.g.clearTimeout(f._socketTimer),f._socketTimer=null,p?(l.g.clearTimeout(f._fetchTimer),f._fetchTimer=null):f._socketTimeout&&(f._socketTimer=l.g.setTimeout(function(){f.emit("timeout")},f._socketTimeout))},u.prototype.abort=u.prototype.destroy=function(p){var f=this;f._destroyed=!0,f._resetTimers(!0),f._response&&(f._response._destroyed=!0),f._xhr?f._xhr.abort():f._fetchAbortController&&f._fetchAbortController.abort(),p&&f.emit("error",p)},u.prototype.end=function(p,f,h){typeof p=="function"&&(h=p,p=void 0),k.Writable.prototype.end.call(this,p,f,h)},u.prototype.setTimeout=function(p,f){var h=this;f&&h.once("timeout",f),h._socketTimeout=p,h._resetTimers(!1)},u.prototype.flushHeaders=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var m=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},6917(P,M,l){var v=l(8287).Buffer,z=l(6688),s=l(6698),E=l(3242),k=M.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},y=M.IncomingMessage=function(O,u,m,p){var f=this;if(E.Readable.call(f),f._mode=m,f.headers={},f.rawHeaders=[],f.trailers={},f.rawTrailers=[],f.on("end",function(){process.nextTick(function(){f.emit("close")})}),m==="fetch"){if(f._fetchResponse=u,f.url=u.url,f.statusCode=u.status,f.statusMessage=u.statusText,u.headers.forEach(function(R,S){f.headers[S.toLowerCase()]=R,f.rawHeaders.push(S,R)}),z.writableStream){var h=new WritableStream({write:function(R){return p(!1),new Promise(function(S,C){f._destroyed?C():f.push(v.from(R))?S():f._resumeFetch=S})},close:function(){p(!0),f._destroyed||f.push(null)},abort:function(R){p(!0),f._destroyed||f.emit("error",R)}});try{return void u.body.pipeTo(h).catch(function(R){p(!0),f._destroyed||f.emit("error",R)})}catch{}}var A=u.body.getReader();(function R(){A.read().then(function(S){f._destroyed||(p(S.done),S.done?f.push(null):(f.push(v.from(S.value)),R()))}).catch(function(S){p(!0),f._destroyed||f.emit("error",S)})})()}else if(f._xhr=O,f._pos=0,f.url=O.responseURL,f.statusCode=O.status,f.statusMessage=O.statusText,O.getAllResponseHeaders().split(/\r?\n/).forEach(function(R){var S=R.match(/^([^:]+):\s*(.*)/);if(S){var C=S[1].toLowerCase();C==="set-cookie"?(f.headers[C]===void 0&&(f.headers[C]=[]),f.headers[C].push(S[2])):f.headers[C]!==void 0?f.headers[C]+=", "+S[2]:f.headers[C]=S[2],f.rawHeaders.push(S[1],S[2])}}),f._charset="x-user-defined",!z.overrideMimeType){var g=f.rawHeaders["mime-type"];if(g){var w=g.match(/;\s*charset=([^;])(;|$)/);w&&(f._charset=w[1].toLowerCase())}f._charset||(f._charset="utf-8")}};s(y,E.Readable),y.prototype._read=function(){var O=this._resumeFetch;O&&(this._resumeFetch=null,O())},y.prototype._onXHRProgress=function(O){var u=this,m=u._xhr,p=null;switch(u._mode){case"text":if((p=m.responseText).length>u._pos){var f=p.substr(u._pos);if(u._charset==="x-user-defined"){for(var h=v.alloc(f.length),A=0;Au._pos&&(u.push(v.from(new Uint8Array(g.result.slice(u._pos)))),u._pos=g.result.byteLength)},g.onload=function(){O(!0),u.push(null)},g.readAsArrayBuffer(p)}u._xhr.readyState===k.DONE&&u._mode!=="ms-stream"&&(O(!0),u.push(null))}},3157(P){var M={};function l(z,s,E){E||(E=Error);var k=function(y){var O,u;function m(p,f,h){return y.call(this,function(A,g,w){return typeof s=="string"?s:s(A,g,w)}(p,f,h))||this}return u=y,(O=m).prototype=Object.create(u.prototype),O.prototype.constructor=O,O.__proto__=u,m}(E);k.prototype.name=E.name,k.prototype.code=z,M[z]=k}function v(z,s){if(Array.isArray(z)){var E=z.length;return z=z.map(function(k){return String(k)}),E>2?"one of ".concat(s," ").concat(z.slice(0,E-1).join(", "),", or ")+z[E-1]:E===2?"one of ".concat(s," ").concat(z[0]," or ").concat(z[1]):"of ".concat(s," ").concat(z[0])}return"of ".concat(s," ").concat(String(z))}l("ERR_INVALID_OPT_VALUE",function(z,s){return'The value "'+s+'" is invalid for option "'+z+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(z,s,E){var k,y,O;if(typeof s=="string"&&(y="not ",s.substr(0,y.length)===y)?(k="must not be",s=s.replace(/^not /,"")):k="must be",function(m,p,f){return(f===void 0||f>m.length)&&(f=m.length),m.substring(f-p.length,f)===p}(z," argument"))O="The ".concat(z," ").concat(k," ").concat(v(s,"type"));else{var u=function(m,p,f){return typeof f!="number"&&(f=0),!(f+p.length>m.length)&&m.indexOf(p,f)!==-1}(z,".")?"property":"argument";O='The "'.concat(z,'" ').concat(u," ").concat(k," ").concat(v(s,"type"))}return O+=". Received type ".concat(typeof E)},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(z){return"The "+z+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(z){return"Cannot call "+z+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(z){return"Unknown encoding: "+z},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),P.exports.F=M},3527(P,M,l){var v=Object.keys||function(p){var f=[];for(var h in p)f.push(h);return f};P.exports=O;var z=l(2341),s=l(9573);l(6698)(O,z);for(var E=v(s.prototype),k=0;k0)if(typeof bt=="string"||Ot.objectMode||Object.getPrototypeOf(bt)===E.prototype||(bt=function(kt){return E.from(kt)}(bt)),dt)Ot.endEmitted?x(vt,new C):ut(vt,Ot,bt,!0);else if(Ot.ended)x(vt,new R);else{if(Ot.destroyed)return!1;Ot.reading=!1,Ot.decoder&&!yt?(bt=Ot.decoder.write(bt),Ot.objectMode||bt.length!==0?ut(vt,Ot,bt,!1):J(vt,Ot)):ut(vt,Ot,bt,!1)}else dt||(Ot.reading=!1,J(vt,Ot));return!Ot.ended&&(Ot.lengthbt.highWaterMark&&(bt.highWaterMark=function(yt){return yt>=Ut?yt=Ut:(yt--,yt|=yt>>>1,yt|=yt>>>2,yt|=yt>>>4,yt|=yt>>>8,yt|=yt>>>16,yt++),yt}(vt)),vt<=bt.length?vt:bt.ended?bt.length:(bt.needReadable=!0,0))}function Bt(vt){var bt=vt._readableState;y("emitReadable",bt.needReadable,bt.emittedReadable),bt.needReadable=!1,bt.emittedReadable||(y("emitReadable",bt.flowing),bt.emittedReadable=!0,process.nextTick(Rt,vt))}function Rt(vt){var bt=vt._readableState;y("emitReadable_",bt.destroyed,bt.length,bt.ended),bt.destroyed||!bt.length&&!bt.ended||(vt.emit("readable"),bt.emittedReadable=!1),bt.needReadable=!bt.flowing&&!bt.ended&&bt.length<=bt.highWaterMark,tt(vt)}function J(vt,bt){bt.readingMore||(bt.readingMore=!0,process.nextTick(At,vt,bt))}function At(vt,bt){for(;!bt.reading&&!bt.ended&&(bt.length0,bt.resumeScheduled&&!bt.paused?bt.flowing=!0:vt.listenerCount("data")>0&&vt.resume()}function N(vt){y("readable nexttick read 0"),vt.read(0)}function G(vt,bt){y("resume",bt.reading),bt.reading||vt.read(0),bt.resumeScheduled=!1,vt.emit("resume"),tt(vt),bt.flowing&&!bt.reading&&vt.read(0)}function tt(vt){var bt=vt._readableState;for(y("flow",bt.flowing);bt.flowing&&vt.read()!==null;);}function Et(vt,bt){return bt.length===0?null:(bt.objectMode?yt=bt.buffer.shift():!vt||vt>=bt.length?(yt=bt.decoder?bt.buffer.join(""):bt.buffer.length===1?bt.buffer.first():bt.buffer.concat(bt.length),bt.buffer.clear()):yt=bt.buffer.consume(vt,bt.decoder),yt);var yt}function q(vt){var bt=vt._readableState;y("endReadable",bt.endEmitted),bt.endEmitted||(bt.ended=!0,process.nextTick(Tt,bt,vt))}function Tt(vt,bt){if(y("endReadableNT",vt.endEmitted,vt.length),!vt.endEmitted&&vt.length===0&&(vt.endEmitted=!0,bt.readable=!1,bt.emit("end"),vt.autoDestroy)){var yt=bt._writableState;(!yt||yt.autoDestroy&&yt.finished)&&bt.destroy()}}function Ft(vt,bt){for(var yt=0,dt=vt.length;yt=bt.highWaterMark:bt.length>0)||bt.ended))return y("read: emitReadable",bt.length,bt.ended),bt.length===0&&bt.ended?q(this):Bt(this),null;if((vt=pt(vt,bt))===0&&bt.ended)return bt.length===0&&q(this),null;var dt,lt=bt.needReadable;return y("need readable",lt),(bt.length===0||bt.length-vt0?Et(vt,bt):null)===null?(bt.needReadable=bt.length<=bt.highWaterMark,vt=0):(bt.length-=vt,bt.awaitDrain=0),bt.length===0&&(bt.ended||(bt.needReadable=!0),yt!==vt&&bt.ended&&q(this)),dt!==null&&this.emit("data",dt),dt},V.prototype._read=function(vt){x(this,new S("_read()"))},V.prototype.pipe=function(vt,bt){var yt=this,dt=this._readableState;switch(dt.pipesCount){case 0:dt.pipes=vt;break;case 1:dt.pipes=[dt.pipes,vt];break;default:dt.pipes.push(vt)}dt.pipesCount+=1,y("pipe count=%d opts=%j",dt.pipesCount,bt);var lt=(!bt||bt.end!==!1)&&vt!==process.stdout&&vt!==process.stderr?Ot:T;function xt(L,$){y("onunpipe"),L===yt&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,y("cleanup"),vt.removeListener("close",mt),vt.removeListener("finish",Dt),vt.removeListener("drain",kt),vt.removeListener("error",it),vt.removeListener("unpipe",xt),yt.removeListener("end",Ot),yt.removeListener("end",T),yt.removeListener("data",H),Ct=!0,!dt.awaitDrain||vt._writableState&&!vt._writableState.needDrain||kt())}function Ot(){y("onend"),vt.end()}dt.endEmitted?process.nextTick(lt):yt.once("end",lt),vt.on("unpipe",xt);var kt=function(L){return function(){var $=L._readableState;y("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&z(L,"data")&&($.flowing=!0,tt(L))}}(yt);vt.on("drain",kt);var Ct=!1;function H(L){y("ondata");var $=vt.write(L);y("dest.write",$),$===!1&&((dt.pipesCount===1&&dt.pipes===vt||dt.pipesCount>1&&Ft(dt.pipes,vt)!==-1)&&!Ct&&(y("false write response, pause",dt.awaitDrain),dt.awaitDrain++),yt.pause())}function it(L){y("onerror",L),T(),vt.removeListener("error",it),z(vt,"error")===0&&x(vt,L)}function mt(){vt.removeListener("finish",Dt),T()}function Dt(){y("onfinish"),vt.removeListener("close",mt),T()}function T(){y("unpipe"),yt.unpipe(vt)}return yt.on("data",H),function(L,$,St){if(typeof L.prependListener=="function")return L.prependListener($,St);L._events&&L._events[$]?Array.isArray(L._events[$])?L._events[$].unshift(St):L._events[$]=[St,L._events[$]]:L.on($,St)}(vt,"error",it),vt.once("close",mt),vt.once("finish",Dt),vt.emit("pipe",yt),dt.flowing||(y("pipe resume"),yt.resume()),vt},V.prototype.unpipe=function(vt){var bt=this._readableState,yt={hasUnpiped:!1};if(bt.pipesCount===0)return this;if(bt.pipesCount===1)return vt&&vt!==bt.pipes||(vt||(vt=bt.pipes),bt.pipes=null,bt.pipesCount=0,bt.flowing=!1,vt&&vt.emit("unpipe",this,yt)),this;if(!vt){var dt=bt.pipes,lt=bt.pipesCount;bt.pipes=null,bt.pipesCount=0,bt.flowing=!1;for(var xt=0;xt0,dt.flowing!==!1&&this.resume()):vt==="readable"&&(dt.endEmitted||dt.readableListening||(dt.readableListening=dt.needReadable=!0,dt.flowing=!1,dt.emittedReadable=!1,y("on readable",dt.length,dt.reading),dt.length?Bt(this):dt.reading||process.nextTick(N,this))),yt},V.prototype.addListener=V.prototype.on,V.prototype.removeListener=function(vt,bt){var yt=s.prototype.removeListener.call(this,vt,bt);return vt==="readable"&&process.nextTick(c,this),yt},V.prototype.removeAllListeners=function(vt){var bt=s.prototype.removeAllListeners.apply(this,arguments);return vt!=="readable"&&vt!==void 0||process.nextTick(c,this),bt},V.prototype.resume=function(){var vt=this._readableState;return vt.flowing||(y("resume"),vt.flowing=!vt.readableListening,function(bt,yt){yt.resumeScheduled||(yt.resumeScheduled=!0,process.nextTick(G,bt,yt))}(this,vt)),vt.paused=!1,this},V.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},V.prototype.wrap=function(vt){var bt=this,yt=this._readableState,dt=!1;for(var lt in vt.on("end",function(){if(y("wrapped end"),yt.decoder&&!yt.ended){var Ot=yt.decoder.end();Ot&&Ot.length&&bt.push(Ot)}bt.push(null)}),vt.on("data",function(Ot){y("wrapped data"),yt.decoder&&(Ot=yt.decoder.write(Ot)),yt.objectMode&&Ot==null||(yt.objectMode||Ot&&Ot.length)&&(bt.push(Ot)||(dt=!0,vt.pause()))}),vt)this[lt]===void 0&&typeof vt[lt]=="function"&&(this[lt]=function(Ot){return function(){return vt[Ot].apply(vt,arguments)}}(lt));for(var xt=0;xt-1))throw new C(J);return this._writableState.defaultEncoding=J,this},Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),V.prototype._write=function(J,At,c){c(new h("_write()"))},V.prototype._writev=null,V.prototype.end=function(J,At,c){var N=this._writableState;return typeof J=="function"?(c=J,J=null,At=null):typeof At=="function"&&(c=At,At=null),J!=null&&this.write(J,At),N.corked&&(N.corked=1,this.uncork()),N.ending||function(G,tt,Et){tt.ending=!0,Rt(G,tt),Et&&(tt.finished?process.nextTick(Et):G.once("finish",Et)),tt.ended=!0,G.writable=!1}(this,N,c),this},Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(J){this._writableState&&(this._writableState.destroyed=J)}}),V.prototype.destroy=u.destroy,V.prototype._undestroy=u.undestroy,V.prototype._destroy=function(J,At){At(J)}},7356(P,M,l){var v;function z(R,S,C){return(S=function(x){var ot=function(Q,V){if(typeof Q!="object"||Q===null)return Q;var Y=Q[Symbol.toPrimitive];if(Y!==void 0){var ut=Y.call(Q,V);if(typeof ut!="object")return ut;throw new TypeError("@@toPrimitive must return a primitive value.")}return(V==="string"?String:Number)(Q)}(x,"string");return typeof ot=="symbol"?ot:String(ot)}(S))in R?Object.defineProperty(R,S,{value:C,enumerable:!0,configurable:!0,writable:!0}):R[S]=C,R}var s=l(9959),E=Symbol("lastResolve"),k=Symbol("lastReject"),y=Symbol("error"),O=Symbol("ended"),u=Symbol("lastPromise"),m=Symbol("handlePromise"),p=Symbol("stream");function f(R,S){return{value:R,done:S}}function h(R){var S=R[E];if(S!==null){var C=R[p].read();C!==null&&(R[u]=null,R[E]=null,R[k]=null,S(f(C,!1)))}}function A(R){process.nextTick(h,R)}var g=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((z(v={get stream(){return this[p]},next:function(){var R=this,S=this[y];if(S!==null)return Promise.reject(S);if(this[O])return Promise.resolve(f(void 0,!0));if(this[p].destroyed)return new Promise(function(Q,V){process.nextTick(function(){R[y]?V(R[y]):Q(f(void 0,!0))})});var C,x=this[u];if(x)C=new Promise(function(Q,V){return function(Y,ut){Q.then(function(){V[O]?Y(f(void 0,!0)):V[m](Y,ut)},ut)}}(x,this));else{var ot=this[p].read();if(ot!==null)return Promise.resolve(f(ot,!1));C=new Promise(this[m])}return this[u]=C,C}},Symbol.asyncIterator,function(){return this}),z(v,"return",function(){var R=this;return new Promise(function(S,C){R[p].destroy(null,function(x){x?C(x):S(f(void 0,!0))})})}),v),g);P.exports=function(R){var S,C=Object.create(w,(z(S={},p,{value:R,writable:!0}),z(S,E,{value:null,writable:!0}),z(S,k,{value:null,writable:!0}),z(S,y,{value:null,writable:!0}),z(S,O,{value:R._readableState.endEmitted,writable:!0}),z(S,m,{value:function(x,ot){var Q=C[p].read();Q?(C[u]=null,C[E]=null,C[k]=null,x(f(Q,!1))):(C[E]=x,C[k]=ot)},writable:!0}),S));return C[u]=null,s(R,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ot=C[k];return ot!==null&&(C[u]=null,C[E]=null,C[k]=null,ot(x)),void(C[y]=x)}var Q=C[E];Q!==null&&(C[u]=null,C[E]=null,C[k]=null,Q(f(void 0,!0))),C[O]=!0}),R.on("readable",A.bind(null,C)),C}},272(P,M,l){function v(p,f){var h=Object.keys(p);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(p);f&&(A=A.filter(function(g){return Object.getOwnPropertyDescriptor(p,g).enumerable})),h.push.apply(h,A)}return h}function z(p){for(var f=1;f0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(A){var g={data:A,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var A=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(this.length===0)return"";for(var g=this.head,w=""+g.data;g=g.next;)w+=A+g.data;return w}},{key:"concat",value:function(A){if(this.length===0)return y.alloc(0);for(var g=y.allocUnsafe(A>>>0),w=this.head,R=0;w;)m(w.data,g,R),R+=w.data.length,w=w.next;return g}},{key:"consume",value:function(A,g){var w;return AS.length?S.length:A;if(C===S.length?R+=S:R+=S.slice(0,A),(A-=C)===0){C===S.length?(++w,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=S.slice(C));break}++w}return this.length-=w,R}},{key:"_getBuffer",value:function(A){var g=y.allocUnsafe(A),w=this.head,R=1;for(w.data.copy(g),A-=w.data.length;w=w.next;){var S=w.data,C=A>S.length?S.length:A;if(S.copy(g,g.length-A,0,C),(A-=C)===0){C===S.length?(++R,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=S.slice(C));break}++R}return this.length-=R,g}},{key:u,value:function(A,g){return O(this,z(z({},g),{},{depth:0,customInspect:!1}))}}])&&E(f.prototype,h),Object.defineProperty(f,"prototype",{writable:!1}),p}()},6057(P){function M(z,s){v(z,s),l(z)}function l(z){z._writableState&&!z._writableState.emitClose||z._readableState&&!z._readableState.emitClose||z.emit("close")}function v(z,s){z.emit("error",s)}P.exports={destroy:function(z,s){var E=this,k=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return k||y?(s?s(z):z&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(v,this,z)):process.nextTick(v,this,z)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(z||null,function(O){!s&&O?E._writableState?E._writableState.errorEmitted?process.nextTick(l,E):(E._writableState.errorEmitted=!0,process.nextTick(M,E,O)):process.nextTick(M,E,O):s?(process.nextTick(l,E),s(O)):process.nextTick(l,E)}),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(z,s){var E=z._readableState,k=z._writableState;E&&E.autoDestroy||k&&k.autoDestroy?z.destroy(s):z.emit("error",s)}}},9959(P,M,l){var v=l(3157).F.ERR_STREAM_PREMATURE_CLOSE;function z(){}P.exports=function s(E,k,y){if(typeof k=="function")return s(E,null,k);k||(k={}),y=function(S){var C=!1;return function(){if(!C){C=!0;for(var x=arguments.length,ot=new Array(x),Q=0;Q0,function(S){f||(f=S),S&&A.forEach(y),R||(A.forEach(y),h(f))})});return m.reduce(O)}},1922(P,M,l){var v=l(3157).F.ERR_INVALID_OPT_VALUE;P.exports={getHighWaterMark:function(z,s,E,k){var y=function(O,u,m){return O.highWaterMark!=null?O.highWaterMark:u?O[m]:null}(s,k,E);if(y!=null){if(!isFinite(y)||Math.floor(y)!==y||y<0)throw new v(k?E:"highWaterMark",y);return Math.floor(y)}return z.objectMode?16:16384}}},1914(P,M,l){P.exports=l(7007).EventEmitter},3242(P,M,l){(M=P.exports=l(2341)).Stream=M,M.Readable=M,M.Writable=l(9573),M.Duplex=l(3527),M.Transform=l(5689),M.PassThrough=l(2571),M.finished=l(9959),M.pipeline=l(7413)},3141(P,M,l){var v=l(2861).Buffer,z=v.isEncoding||function(h){switch((h=""+h)&&h.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 s(h){var A;switch(this.encoding=function(g){var w=function(R){if(!R)return"utf8";for(var S;;)switch(R){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 R;default:if(S)return;R=(""+R).toLowerCase(),S=!0}}(g);if(typeof w!="string"&&(v.isEncoding===z||!z(g)))throw new Error("Unknown encoding: "+g);return w||g}(h),this.encoding){case"utf16le":this.text=y,this.end=O,A=4;break;case"utf8":this.fillLast=k,A=4;break;case"base64":this.text=u,this.end=m,A=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=v.allocUnsafe(A)}function E(h){return h<=127?0:h>>5==6?2:h>>4==14?3:h>>3==30?4:h>>6==2?-1:-2}function k(h){var A=this.lastTotal-this.lastNeed,g=function(w,R){if((192&R[0])!=128)return w.lastNeed=0,"�";if(w.lastNeed>1&&R.length>1){if((192&R[1])!=128)return w.lastNeed=1,"�";if(w.lastNeed>2&&R.length>2&&(192&R[2])!=128)return w.lastNeed=2,"�"}}(this,h);return g!==void 0?g:this.lastNeed<=h.length?(h.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,A,0,h.length),void(this.lastNeed-=h.length))}function y(h,A){if((h.length-A)%2==0){var g=h.toString("utf16le",A);if(g){var w=g.charCodeAt(g.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",A,h.length-1)}function O(h){var A=h&&h.length?this.write(h):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return A+this.lastChar.toString("utf16le",0,g)}return A}function u(h,A){var g=(h.length-A)%3;return g===0?h.toString("base64",A):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",A,h.length-g))}function m(h){var A=h&&h.length?this.write(h):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function p(h){return h.toString(this.encoding)}function f(h){return h&&h.length?this.write(h):""}M.I=s,s.prototype.write=function(h){if(h.length===0)return"";var A,g;if(this.lastNeed){if((A=this.fillLast(h))===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g=0?(ot>0&&(R.lastNeed=ot-1),ot):--x=0?(ot>0&&(R.lastNeed=ot-2),ot):--x=0?(ot>0&&(ot===2?ot=0:R.lastNeed=ot-3),ot):0))}(this,h,A);if(!this.lastNeed)return h.toString("utf8",A);this.lastTotal=g;var w=h.length-(g-this.lastNeed);return h.copy(this.lastChar,0,w),h.toString("utf8",A,w)},s.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length}},1293(P,M,l){var v=l(5546),z=l(2708);P.exports={parse:function(s){var E=v.parse(s.toString());return z.compile(E)}}},2708(P){P.exports={compile:function(M){var l=[],v=[],z="",s=Object.create(null),E=s;return function(g){for(var w,R=0;R-1&&k("Cannot redefine existing key '"+ot+"'.",S,C),(Q=Q[Y])instanceof Array&&Q.length&&V-1?'"'+g+'"':g}}}},5546(P){P.exports=function(){function M(l,v,z,s,E,k){this.message=l,this.expected=v,this.found=z,this.offset=s,this.line=E,this.column=k,this.name="SyntaxError"}return function(l,v){function z(){this.constructor=l}z.prototype=v.prototype,l.prototype=new z}(M,Error),{SyntaxError:M,parse:function(l){var v,z=arguments.length>1?arguments[1]:{},s={},E={start:tr},k=tr,y=function(){return Aa},O=s,u="#",m={type:"literal",value:"#",description:'"#"'},p=void 0,f={type:"any",description:"any character"},h="[",A={type:"literal",value:"[",description:'"["'},g="]",w={type:"literal",value:"]",description:'"]"'},R=function(st){Do(Pn("ObjectPath",st,oe,qt))},S=function(st){Do(Pn("ArrayPath",st,oe,qt))},C=function(st,Wt){return st.concat(Wt)},x=function(st){return[st]},ot=function(st){return st},Q=".",V={type:"literal",value:".",description:'"."'},Y="=",ut={type:"literal",value:"=",description:'"="'},Ut=function(st,Wt){Do(Pn("Assign",Wt,oe,qt,st))},pt=function(st){return st.join("")},Bt=function(st){return st.value},Rt='"""',J={type:"literal",value:'"""',description:'"\\"\\"\\""'},At=null,c=function(st){return Pn("String",st.join(""),oe,qt)},N='"',G={type:"literal",value:'"',description:'"\\""'},tt="'''",Et={type:"literal",value:"'''",description:`"'''"`},q="'",Tt={type:"literal",value:"'",description:`"'"`},Ft=function(st){return st},vt=function(st){return st},bt="\\",yt={type:"literal",value:"\\",description:'"\\\\"'},dt=function(){return""},lt="e",xt={type:"literal",value:"e",description:'"e"'},Ot="E",kt={type:"literal",value:"E",description:'"E"'},Ct=function(st,Wt){return Pn("Float",parseFloat(st+"e"+Wt),oe,qt)},H=function(st){return Pn("Float",parseFloat(st),oe,qt)},it="+",mt={type:"literal",value:"+",description:'"+"'},Dt=function(st){return st.join("")},T="-",L={type:"literal",value:"-",description:'"-"'},$=function(st){return"-"+st.join("")},St=function(st){return Pn("Integer",parseInt(st,10),oe,qt)},ft="true",ee={type:"literal",value:"true",description:'"true"'},_=function(){return Pn("Boolean",!0,oe,qt)},W="false",at={type:"literal",value:"false",description:'"false"'},Xt=function(){return Pn("Boolean",!1,oe,qt)},ae=function(){return Pn("Array",[],oe,qt)},Kt=function(st){return Pn("Array",st?[st]:[],oe,qt)},Ne=function(st){return Pn("Array",st,oe,qt)},D=function(st,Wt){return Pn("Array",st.concat(Wt),oe,qt)},et=function(st){return st},gt=",",Yt={type:"literal",value:",",description:'","'},le="{",we={type:"literal",value:"{",description:'"{"'},ie="}",U={type:"literal",value:"}",description:'"}"'},X=function(st){return Pn("InlineTable",st,oe,qt)},Pt=function(st,Wt){return Pn("InlineTableValue",Wt,oe,qt,st)},Ht=function(st){return"."+st},re=function(st){return st.join("")},We=":",xe={type:"literal",value:":",description:'":"'},je=function(st){return st.join("")},Qe="T",Oe={type:"literal",value:"T",description:'"T"'},Cr="Z",ur={type:"literal",value:"Z",description:'"Z"'},jr=function(st,Wt){return Pn("Date",new Date(st+"T"+Wt+"Z"),oe,qt)},rn=function(st,Wt){return Pn("Date",new Date(st+"T"+Wt),oe,qt)},_n=/^[ \t]/,io={type:"class",value:"[ \\t]",description:"[ \\t]"},qn=` +`,ao={type:"literal",value:` +`,description:'"\\n"'},so="\r",Qo={type:"literal",value:"\r",description:'"\\r"'},uo=/^[0-9a-f]/i,ni={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},kn=/^[0-9]/,Yr={type:"class",value:"[0-9]",description:"[0-9]"},mn="_",to={type:"literal",value:"_",description:'"_"'},Yo=function(){return""},co=/^[A-Za-z0-9_\-]/,pn={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},jn=function(st){return st.join("")},Tn='\\"',Xr={type:"literal",value:'\\"',description:'"\\\\\\""'},Wn=function(){return'"'},un="\\\\",xn={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},yo=function(){return"\\"},bi="\\b",pi={type:"literal",value:"\\b",description:'"\\\\b"'},Ui=function(){return"\b"},Jo="\\t",Bo={type:"literal",value:"\\t",description:'"\\\\t"'},Ji=function(){return" "},It="\\n",ct={type:"literal",value:"\\n",description:'"\\\\n"'},Zt=function(){return` +`},pe="\\f",Gt={type:"literal",value:"\\f",description:'"\\\\f"'},be=function(){return"\f"},Le="\\r",De={type:"literal",value:"\\r",description:'"\\\\r"'},he=function(){return"\r"},ve="\\U",me={type:"literal",value:"\\U",description:'"\\\\U"'},Ze=function(st){return function(Wt,Jt,te){var ce=parseInt("0x"+Wt);if(!(!isFinite(ce)||Math.floor(ce)!=ce||ce<0||ce>1114111||ce>55295&&ce<57344))return function(){var Ce,Ee,kr=16384,Tr=[],Wr=-1,_r=arguments.length;if(!_r)return"";for(var qr="";++Wr<_r;){var wr=Number(arguments[Wr]);wr<=65535?Tr.push(wr):(Ce=55296+((wr-=65536)>>10),Ee=wr%1024+56320,Tr.push(Ce,Ee)),(Wr+1==_r||Tr.length>kr)&&(qr+=String.fromCharCode.apply(null,Tr),Tr.length=0)}return qr}(ce);(function(Ce,Ee,kr){var Tr=new Error(Ce);throw Tr.line=Ee,Tr.column=kr,Tr})("Invalid Unicode escape code: "+Wt,Jt,te)}(st.join(""))},Er="\\u",fr={type:"literal",value:"\\u",description:'"\\\\u"'},F=0,nr=0,Ur=0,rt={line:1,column:1,seenCR:!1},ht=0,Nt=[],wt=0,Mt={};if("startRule"in z){if(!(z.startRule in E))throw new Error(`Can't start parsing from rule "`+z.startRule+'".');k=E[z.startRule]}function oe(){return de(nr).line}function qt(){return de(nr).column}function de(st){return Ur!==st&&(Ur>st&&(Ur=0,rt={line:1,column:1,seenCR:!1}),function(Wt,Jt,te){var ce,Ce;for(ce=Jt;ceht&&(ht=F,Nt=[]),Nt.push(st))}function Fe(st,Wt,Jt){var te=de(Jt),ce=JtTr.description?1:0});Ee1?Tr.slice(0,-1).join(", ")+" or "+Tr[Ce.length-1]:Tr[0])+" but "+(Ee?'"'+function(Wr){function _r(qr){return qr.charCodeAt(0).toString(16).toUpperCase()}return Wr.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(qr){return"\\x0"+_r(qr)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(qr){return"\\x"+_r(qr)}).replace(/[\u0180-\u0FFF]/g,function(qr){return"\\u0"+_r(qr)}).replace(/[\u1080-\uFFFF]/g,function(qr){return"\\u"+_r(qr)})}(Ee)+'"':"end of input")+" found."}(Wt,ce),Wt,ce,Jt,te.line,te.column)}function tr(){var st,Wt,Jt,te=49*F+0,ce=Mt[te];if(ce)return F=ce.nextPos,ce.result;for(st=F,Wt=[],Jt=dr();Jt!==s;)Wt.push(Jt),Jt=dr();return Wt!==s&&(nr=st,Wt=y()),st=Wt,Mt[te]={nextPos:F,result:st},st}function dr(){var st,Wt,Jt,te,ce,Ce,Ee,kr=49*F+1,Tr=Mt[kr];if(Tr)return F=Tr.nextPos,Tr.result;for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if(Jt=function(){var Wr,_r=49*F+2,qr=Mt[_r];return qr?(F=qr.nextPos,qr.result):(Wr=yr(),Wr===s&&(Wr=function(){var wr,An,cn,nn,Kr,dn,fo=49*F+4,ro=Mt[fo];if(ro)return F=ro.nextPos,ro.result;if(wr=F,l.charCodeAt(F)===91?(An=h,F++):(An=s,wt===0&&fe(A)),An!==s){for(cn=[],nn=Mr();nn!==s;)cn.push(nn),nn=Mr();if(cn!==s)if((nn=hr())!==s){for(Kr=[],dn=Mr();dn!==s;)Kr.push(dn),dn=Mr();Kr!==s?(l.charCodeAt(F)===93?(dn=g,F++):(dn=s,wt===0&&fe(w)),dn!==s?(nr=wr,wr=An=R(nn)):(F=wr,wr=O)):(F=wr,wr=O)}else F=wr,wr=O;else F=wr,wr=O}else F=wr,wr=O;return Mt[fo]={nextPos:F,result:wr},wr}(),Wr===s&&(Wr=function(){var wr,An,cn,nn,Kr,dn,fo,ro,Po=49*F+5,No=Mt[Po];if(No)return F=No.nextPos,No.result;if(wr=F,l.charCodeAt(F)===91?(An=h,F++):(An=s,wt===0&&fe(A)),An!==s)if(l.charCodeAt(F)===91?(cn=h,F++):(cn=s,wt===0&&fe(A)),cn!==s){for(nn=[],Kr=Mr();Kr!==s;)nn.push(Kr),Kr=Mr();if(nn!==s)if((Kr=hr())!==s){for(dn=[],fo=Mr();fo!==s;)dn.push(fo),fo=Mr();dn!==s?(l.charCodeAt(F)===93?(fo=g,F++):(fo=s,wt===0&&fe(w)),fo!==s?(l.charCodeAt(F)===93?(ro=g,F++):(ro=s,wt===0&&fe(w)),ro!==s?(nr=wr,wr=An=S(Kr)):(F=wr,wr=O)):(F=wr,wr=O)):(F=wr,wr=O)}else F=wr,wr=O;else F=wr,wr=O}else F=wr,wr=O;else F=wr,wr=O;return Mt[Po]={nextPos:F,result:wr},wr}(),Wr===s&&(Wr=function(){var wr,An,cn,nn,Kr,dn,fo=49*F+9,ro=Mt[fo];if(ro)return F=ro.nextPos,ro.result;if(wr=F,An=br(),An!==s){for(cn=[],nn=Mr();nn!==s;)cn.push(nn),nn=Mr();if(cn!==s)if(l.charCodeAt(F)===61?(nn=Y,F++):(nn=s,wt===0&&fe(ut)),nn!==s){for(Kr=[],dn=Mr();dn!==s;)Kr.push(dn),dn=Mr();Kr!==s&&(dn=Nr())!==s?(nr=wr,wr=An=Ut(An,dn)):(F=wr,wr=O)}else F=wr,wr=O;else F=wr,wr=O}else F=wr,wr=O;if(wr===s)if(wr=F,(An=ar())!==s){for(cn=[],nn=Mr();nn!==s;)cn.push(nn),nn=Mr();if(cn!==s)if(l.charCodeAt(F)===61?(nn=Y,F++):(nn=s,wt===0&&fe(ut)),nn!==s){for(Kr=[],dn=Mr();dn!==s;)Kr.push(dn),dn=Mr();Kr!==s&&(dn=Nr())!==s?(nr=wr,wr=An=Ut(An,dn)):(F=wr,wr=O)}else F=wr,wr=O;else F=wr,wr=O}else F=wr,wr=O;return Mt[fo]={nextPos:F,result:wr},wr}()))),Mt[_r]={nextPos:F,result:Wr},Wr)}(),Jt!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();if(te!==s){for(ce=[],Ce=yr();Ce!==s;)ce.push(Ce),Ce=yr();if(ce!==s){if(Ce=[],(Ee=Vn())!==s)for(;Ee!==s;)Ce.push(Ee),Ee=Vn();else Ce=O;Ce===s&&(Ce=xi()),Ce!==s?st=Wt=[Wt,Jt,te,ce,Ce]:(F=st,st=O)}else F=st,st=O}else F=st,st=O}else F=st,st=O;else F=st,st=O;if(st===s){if(st=F,Wt=[],(Jt=Mr())!==s)for(;Jt!==s;)Wt.push(Jt),Jt=Mr();else Wt=O;if(Wt!==s){if(Jt=[],(te=Vn())!==s)for(;te!==s;)Jt.push(te),te=Vn();else Jt=O;Jt===s&&(Jt=xi()),Jt!==s?st=Wt=[Wt,Jt]:(F=st,st=O)}else F=st,st=O;st===s&&(st=Vn())}return Mt[kr]={nextPos:F,result:st},st}function yr(){var st,Wt,Jt,te,ce,Ce,Ee=49*F+3,kr=Mt[Ee];if(kr)return F=kr.nextPos,kr.result;if(st=F,l.charCodeAt(F)===35?(Wt=u,F++):(Wt=s,wt===0&&fe(m)),Wt!==s){for(Jt=[],te=F,ce=F,wt++,(Ce=Vn())===s&&(Ce=xi()),wt--,Ce===s?ce=p:(F=ce,ce=O),ce!==s?(l.length>F?(Ce=l.charAt(F),F++):(Ce=s,wt===0&&fe(f)),Ce!==s?te=ce=[ce,Ce]:(F=te,te=O)):(F=te,te=O);te!==s;)Jt.push(te),te=F,ce=F,wt++,(Ce=Vn())===s&&(Ce=xi()),wt--,Ce===s?ce=p:(F=ce,ce=O),ce!==s?(l.length>F?(Ce=l.charAt(F),F++):(Ce=s,wt===0&&fe(f)),Ce!==s?te=ce=[ce,Ce]:(F=te,te=O)):(F=te,te=O);Jt!==s?st=Wt=[Wt,Jt]:(F=st,st=O)}else F=st,st=O;return Mt[Ee]={nextPos:F,result:st},st}function hr(){var st,Wt,Jt,te=49*F+6,ce=Mt[te];if(ce)return F=ce.nextPos,ce.result;if(st=F,Wt=[],(Jt=sr())!==s)for(;Jt!==s;)Wt.push(Jt),Jt=sr();else Wt=O;return Wt!==s&&(Jt=qe())!==s?(nr=st,st=Wt=C(Wt,Jt)):(F=st,st=O),st===s&&(st=F,(Wt=qe())!==s&&(nr=st,Wt=x(Wt)),st=Wt),Mt[te]={nextPos:F,result:st},st}function qe(){var st,Wt,Jt,te,ce,Ce=49*F+7,Ee=Mt[Ce];if(Ee)return F=Ee.nextPos,Ee.result;for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=br())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();te!==s?(nr=st,st=Wt=ot(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O;if(st===s){for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=ar())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();te!==s?(nr=st,st=Wt=ot(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}return Mt[Ce]={nextPos:F,result:st},st}function sr(){var st,Wt,Jt,te,ce,Ce,Ee,kr=49*F+8,Tr=Mt[kr];if(Tr)return F=Tr.nextPos,Tr.result;for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=br())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();if(te!==s)if(l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),ce!==s){for(Ce=[],Ee=Mr();Ee!==s;)Ce.push(Ee),Ee=Mr();Ce!==s?(nr=st,st=Wt=ot(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O;if(st===s){for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=ar())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();if(te!==s)if(l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),ce!==s){for(Ce=[],Ee=Mr();Ee!==s;)Ce.push(Ee),Ee=Mr();Ce!==s?(nr=st,st=Wt=ot(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O}return Mt[kr]={nextPos:F,result:st},st}function br(){var st,Wt,Jt,te=49*F+10,ce=Mt[te];if(ce)return F=ce.nextPos,ce.result;if(st=F,Wt=[],(Jt=di())!==s)for(;Jt!==s;)Wt.push(Jt),Jt=di();else Wt=O;return Wt!==s&&(nr=st,Wt=pt(Wt)),st=Wt,Mt[te]={nextPos:F,result:st},st}function ar(){var st,Wt,Jt=49*F+11,te=Mt[Jt];return te?(F=te.nextPos,te.result):(st=F,(Wt=In())!==s&&(nr=st,Wt=Bt(Wt)),(st=Wt)===s&&(st=F,(Wt=$n())!==s&&(nr=st,Wt=Bt(Wt)),st=Wt),Mt[Jt]={nextPos:F,result:st},st)}function Nr(){var st,Wt=49*F+12,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):(st=function(){var te,ce=49*F+13,Ce=Mt[ce];return Ce?(F=Ce.nextPos,Ce.result):(te=function(){var Ee,kr,Tr,Wr,_r,qr=49*F+14,wr=Mt[qr];if(wr)return F=wr.nextPos,wr.result;if(Ee=F,l.substr(F,3)===Rt?(kr=Rt,F+=3):(kr=s,wt===0&&fe(J)),kr!==s)if((Tr=Vn())===s&&(Tr=At),Tr!==s){for(Wr=[],_r=go();_r!==s;)Wr.push(_r),_r=go();Wr!==s?(l.substr(F,3)===Rt?(_r=Rt,F+=3):(_r=s,wt===0&&fe(J)),_r!==s?(nr=Ee,Ee=kr=c(Wr)):(F=Ee,Ee=O)):(F=Ee,Ee=O)}else F=Ee,Ee=O;else F=Ee,Ee=O;return Mt[qr]={nextPos:F,result:Ee},Ee}(),te===s&&(te=In())===s&&(te=function(){var Ee,kr,Tr,Wr,_r,qr=49*F+16,wr=Mt[qr];if(wr)return F=wr.nextPos,wr.result;if(Ee=F,l.substr(F,3)===tt?(kr=tt,F+=3):(kr=s,wt===0&&fe(Et)),kr!==s)if((Tr=Vn())===s&&(Tr=At),Tr!==s){for(Wr=[],_r=oi();_r!==s;)Wr.push(_r),_r=oi();Wr!==s?(l.substr(F,3)===tt?(_r=tt,F+=3):(_r=s,wt===0&&fe(Et)),_r!==s?(nr=Ee,Ee=kr=c(Wr)):(F=Ee,Ee=O)):(F=Ee,Ee=O)}else F=Ee,Ee=O;else F=Ee,Ee=O;return Mt[qr]={nextPos:F,result:Ee},Ee}(),te===s&&(te=$n())),Mt[ce]={nextPos:F,result:te},te)}(),st===s&&(st=function(){var te,ce,Ce,Ee,kr,Tr=49*F+38,Wr=Mt[Tr];return Wr?(F=Wr.nextPos,Wr.result):(te=F,(ce=eo())!==s?(l.charCodeAt(F)===84?(Ce=Qe,F++):(Ce=s,wt===0&&fe(Oe)),Ce!==s?(Ee=function(){var _r,qr,wr,An,cn,nn,Kr,dn,fo,ro,Po,No=49*F+36,Hi=Mt[No];return Hi?(F=Hi.nextPos,Hi.result):(_r=F,qr=F,wr=Sn(),wr!==s&&(An=Sn())!==s?(l.charCodeAt(F)===58?(cn=We,F++):(cn=s,wt===0&&fe(xe)),cn!==s&&(nn=Sn())!==s&&(Kr=Sn())!==s?(l.charCodeAt(F)===58?(dn=We,F++):(dn=s,wt===0&&fe(xe)),dn!==s&&(fo=Sn())!==s&&(ro=Sn())!==s?((Po=bn())===s&&(Po=At),Po!==s?qr=wr=[wr,An,cn,nn,Kr,dn,fo,ro,Po]:(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O),qr!==s&&(nr=_r,qr=je(qr)),_r=qr,Mt[No]={nextPos:F,result:_r},_r)}(),Ee!==s?(l.charCodeAt(F)===90?(kr=Cr,F++):(kr=s,wt===0&&fe(ur)),kr!==s?(nr=te,te=ce=jr(ce,Ee)):(F=te,te=O)):(F=te,te=O)):(F=te,te=O)):(F=te,te=O),te===s&&(te=F,(ce=eo())!==s?(l.charCodeAt(F)===84?(Ce=Qe,F++):(Ce=s,wt===0&&fe(Oe)),Ce!==s?(Ee=function(){var _r,qr,wr,An,cn,nn,Kr,dn,fo,ro,Po,No,Hi,Ea,ta,fa,Gi,ka=49*F+37,Ta=Mt[ka];return Ta?(F=Ta.nextPos,Ta.result):(_r=F,qr=F,wr=Sn(),wr!==s&&(An=Sn())!==s?(l.charCodeAt(F)===58?(cn=We,F++):(cn=s,wt===0&&fe(xe)),cn!==s&&(nn=Sn())!==s&&(Kr=Sn())!==s?(l.charCodeAt(F)===58?(dn=We,F++):(dn=s,wt===0&&fe(xe)),dn!==s&&(fo=Sn())!==s&&(ro=Sn())!==s?((Po=bn())===s&&(Po=At),Po!==s?(l.charCodeAt(F)===45?(No=T,F++):(No=s,wt===0&&fe(L)),No===s&&(l.charCodeAt(F)===43?(No=it,F++):(No=s,wt===0&&fe(mt))),No!==s&&(Hi=Sn())!==s&&(Ea=Sn())!==s?(l.charCodeAt(F)===58?(ta=We,F++):(ta=s,wt===0&&fe(xe)),ta!==s&&(fa=Sn())!==s&&(Gi=Sn())!==s?qr=wr=[wr,An,cn,nn,Kr,dn,fo,ro,Po,No,Hi,Ea,ta,fa,Gi]:(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O)):(F=qr,qr=O),qr!==s&&(nr=_r,qr=je(qr)),_r=qr,Mt[ka]={nextPos:F,result:_r},_r)}(),Ee!==s?(nr=te,te=ce=rn(ce,Ee)):(F=te,te=O)):(F=te,te=O)):(F=te,te=O)),Mt[Tr]={nextPos:F,result:te},te)}(),st===s&&(st=function(){var te,ce,Ce,Ee,kr=49*F+23,Tr=Mt[kr];return Tr?(F=Tr.nextPos,Tr.result):(te=F,(ce=wi())===s&&(ce=Bn()),ce!==s?(l.charCodeAt(F)===101?(Ce=lt,F++):(Ce=s,wt===0&&fe(xt)),Ce===s&&(l.charCodeAt(F)===69?(Ce=Ot,F++):(Ce=s,wt===0&&fe(kt))),Ce!==s&&(Ee=Bn())!==s?(nr=te,te=ce=Ct(ce,Ee)):(F=te,te=O)):(F=te,te=O),te===s&&(te=F,(ce=wi())!==s&&(nr=te,ce=H(ce)),te=ce),Mt[kr]={nextPos:F,result:te},te)}(),st===s&&(st=function(){var te,ce,Ce=49*F+25,Ee=Mt[Ce];return Ee?(F=Ee.nextPos,Ee.result):(te=F,(ce=Bn())!==s&&(nr=te,ce=St(ce)),te=ce,Mt[Ce]={nextPos:F,result:te},te)}(),st===s&&(st=function(){var te,ce,Ce=49*F+27,Ee=Mt[Ce];return Ee?(F=Ee.nextPos,Ee.result):(te=F,l.substr(F,4)===ft?(ce=ft,F+=4):(ce=s,wt===0&&fe(ee)),ce!==s&&(nr=te,ce=_()),te=ce,te===s&&(te=F,l.substr(F,5)===W?(ce=W,F+=5):(ce=s,wt===0&&fe(at)),ce!==s&&(nr=te,ce=Xt()),te=ce),Mt[Ce]={nextPos:F,result:te},te)}(),st===s&&(st=function(){var te,ce,Ce,Ee,kr,Tr=49*F+28,Wr=Mt[Tr];if(Wr)return F=Wr.nextPos,Wr.result;if(te=F,l.charCodeAt(F)===91?(ce=h,F++):(ce=s,wt===0&&fe(A)),ce!==s){for(Ce=[],Ee=lo();Ee!==s;)Ce.push(Ee),Ee=lo();Ce!==s?(l.charCodeAt(F)===93?(Ee=g,F++):(Ee=s,wt===0&&fe(w)),Ee!==s?(nr=te,te=ce=ae()):(F=te,te=O)):(F=te,te=O)}else F=te,te=O;if(te===s&&(te=F,l.charCodeAt(F)===91?(ce=h,F++):(ce=s,wt===0&&fe(A)),ce!==s?((Ce=Wo())===s&&(Ce=At),Ce!==s?(l.charCodeAt(F)===93?(Ee=g,F++):(Ee=s,wt===0&&fe(w)),Ee!==s?(nr=te,te=ce=Kt(Ce)):(F=te,te=O)):(F=te,te=O)):(F=te,te=O),te===s)){if(te=F,l.charCodeAt(F)===91?(ce=h,F++):(ce=s,wt===0&&fe(A)),ce!==s){if(Ce=[],(Ee=Hn())!==s)for(;Ee!==s;)Ce.push(Ee),Ee=Hn();else Ce=O;Ce!==s?(l.charCodeAt(F)===93?(Ee=g,F++):(Ee=s,wt===0&&fe(w)),Ee!==s?(nr=te,te=ce=Ne(Ce)):(F=te,te=O)):(F=te,te=O)}else F=te,te=O;if(te===s)if(te=F,l.charCodeAt(F)===91?(ce=h,F++):(ce=s,wt===0&&fe(A)),ce!==s){if(Ce=[],(Ee=Hn())!==s)for(;Ee!==s;)Ce.push(Ee),Ee=Hn();else Ce=O;Ce!==s&&(Ee=Wo())!==s?(l.charCodeAt(F)===93?(kr=g,F++):(kr=s,wt===0&&fe(w)),kr!==s?(nr=te,te=ce=D(Ce,Ee)):(F=te,te=O)):(F=te,te=O)}else F=te,te=O}return Mt[Tr]={nextPos:F,result:te},te}(),st===s&&(st=function(){var te,ce,Ce,Ee,kr,Tr,Wr=49*F+32,_r=Mt[Wr];if(_r)return F=_r.nextPos,_r.result;if(te=F,l.charCodeAt(F)===123?(ce=le,F++):(ce=s,wt===0&&fe(we)),ce!==s){for(Ce=[],Ee=Mr();Ee!==s;)Ce.push(Ee),Ee=Mr();if(Ce!==s){for(Ee=[],kr=xo();kr!==s;)Ee.push(kr),kr=xo();if(Ee!==s){for(kr=[],Tr=Mr();Tr!==s;)kr.push(Tr),Tr=Mr();kr!==s?(l.charCodeAt(F)===125?(Tr=ie,F++):(Tr=s,wt===0&&fe(U)),Tr!==s?(nr=te,te=ce=X(Ee)):(F=te,te=O)):(F=te,te=O)}else F=te,te=O}else F=te,te=O}else F=te,te=O;return Mt[Wr]={nextPos:F,result:te},te}())))))),Mt[Wt]={nextPos:F,result:st},st)}function In(){var st,Wt,Jt,te,ce=49*F+15,Ce=Mt[ce];if(Ce)return F=Ce.nextPos,Ce.result;if(st=F,l.charCodeAt(F)===34?(Wt=N,F++):(Wt=s,wt===0&&fe(G)),Wt!==s){for(Jt=[],te=To();te!==s;)Jt.push(te),te=To();Jt!==s?(l.charCodeAt(F)===34?(te=N,F++):(te=s,wt===0&&fe(G)),te!==s?(nr=st,st=Wt=c(Jt)):(F=st,st=O)):(F=st,st=O)}else F=st,st=O;return Mt[ce]={nextPos:F,result:st},st}function $n(){var st,Wt,Jt,te,ce=49*F+17,Ce=Mt[ce];if(Ce)return F=Ce.nextPos,Ce.result;if(st=F,l.charCodeAt(F)===39?(Wt=q,F++):(Wt=s,wt===0&&fe(Tt)),Wt!==s){for(Jt=[],te=jo();te!==s;)Jt.push(te),te=jo();Jt!==s?(l.charCodeAt(F)===39?(te=q,F++):(te=s,wt===0&&fe(Tt)),te!==s?(nr=st,st=Wt=c(Jt)):(F=st,st=O)):(F=st,st=O)}else F=st,st=O;return Mt[ce]={nextPos:F,result:st},st}function To(){var st,Wt,Jt,te=49*F+18,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):((st=la())===s&&(st=F,Wt=F,wt++,l.charCodeAt(F)===34?(Jt=N,F++):(Jt=s,wt===0&&fe(G)),wt--,Jt===s?Wt=p:(F=Wt,Wt=O),Wt!==s?(l.length>F?(Jt=l.charAt(F),F++):(Jt=s,wt===0&&fe(f)),Jt!==s?(nr=st,st=Wt=Ft(Jt)):(F=st,st=O)):(F=st,st=O)),Mt[te]={nextPos:F,result:st},st)}function jo(){var st,Wt,Jt,te=49*F+19,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):(st=F,Wt=F,wt++,l.charCodeAt(F)===39?(Jt=q,F++):(Jt=s,wt===0&&fe(Tt)),wt--,Jt===s?Wt=p:(F=Wt,Wt=O),Wt!==s?(l.length>F?(Jt=l.charAt(F),F++):(Jt=s,wt===0&&fe(f)),Jt!==s?(nr=st,st=Wt=Ft(Jt)):(F=st,st=O)):(F=st,st=O),Mt[te]={nextPos:F,result:st},st)}function go(){var st,Wt,Jt,te=49*F+20,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):((st=la())===s&&(st=function(){var Ce,Ee,kr,Tr,Wr=49*F+21,_r=Mt[Wr];if(_r)return F=_r.nextPos,_r.result;if(Ce=F,l.charCodeAt(F)===92?(Ee=bt,F++):(Ee=s,wt===0&&fe(yt)),Ee!==s)if(Vn()!==s){for(kr=[],Tr=Xo();Tr!==s;)kr.push(Tr),Tr=Xo();kr!==s?(nr=Ce,Ce=Ee=dt()):(F=Ce,Ce=O)}else F=Ce,Ce=O;else F=Ce,Ce=O;return Mt[Wr]={nextPos:F,result:Ce},Ce}(),st===s&&(st=F,Wt=F,wt++,l.substr(F,3)===Rt?(Jt=Rt,F+=3):(Jt=s,wt===0&&fe(J)),wt--,Jt===s?Wt=p:(F=Wt,Wt=O),Wt!==s?(l.length>F?(Jt=l.charAt(F),F++):(Jt=s,wt===0&&fe(f)),Jt!==s?(nr=st,st=Wt=vt(Jt)):(F=st,st=O)):(F=st,st=O))),Mt[te]={nextPos:F,result:st},st)}function oi(){var st,Wt,Jt,te=49*F+22,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):(st=F,Wt=F,wt++,l.substr(F,3)===tt?(Jt=tt,F+=3):(Jt=s,wt===0&&fe(Et)),wt--,Jt===s?Wt=p:(F=Wt,Wt=O),Wt!==s?(l.length>F?(Jt=l.charAt(F),F++):(Jt=s,wt===0&&fe(f)),Jt!==s?(nr=st,st=Wt=Ft(Jt)):(F=st,st=O)):(F=st,st=O),Mt[te]={nextPos:F,result:st},st)}function wi(){var st,Wt,Jt,te,ce,Ce,Ee=49*F+24,kr=Mt[Ee];return kr?(F=kr.nextPos,kr.result):(st=F,l.charCodeAt(F)===43?(Wt=it,F++):(Wt=s,wt===0&&fe(mt)),Wt===s&&(Wt=At),Wt!==s?(Jt=F,(te=ii())!==s?(l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),ce!==s&&(Ce=ii())!==s?Jt=te=[te,ce,Ce]:(F=Jt,Jt=O)):(F=Jt,Jt=O),Jt!==s?(nr=st,st=Wt=Dt(Jt)):(F=st,st=O)):(F=st,st=O),st===s&&(st=F,l.charCodeAt(F)===45?(Wt=T,F++):(Wt=s,wt===0&&fe(L)),Wt!==s?(Jt=F,(te=ii())!==s?(l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),ce!==s&&(Ce=ii())!==s?Jt=te=[te,ce,Ce]:(F=Jt,Jt=O)):(F=Jt,Jt=O),Jt!==s?(nr=st,st=Wt=$(Jt)):(F=st,st=O)):(F=st,st=O)),Mt[Ee]={nextPos:F,result:st},st)}function Bn(){var st,Wt,Jt,te,ce,Ce=49*F+26,Ee=Mt[Ce];if(Ee)return F=Ee.nextPos,Ee.result;if(st=F,l.charCodeAt(F)===43?(Wt=it,F++):(Wt=s,wt===0&&fe(mt)),Wt===s&&(Wt=At),Wt!==s){if(Jt=[],(te=Sn())!==s)for(;te!==s;)Jt.push(te),te=Sn();else Jt=O;Jt!==s?(te=F,wt++,l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),wt--,ce===s?te=p:(F=te,te=O),te!==s?(nr=st,st=Wt=Dt(Jt)):(F=st,st=O)):(F=st,st=O)}else F=st,st=O;if(st===s)if(st=F,l.charCodeAt(F)===45?(Wt=T,F++):(Wt=s,wt===0&&fe(L)),Wt!==s){if(Jt=[],(te=Sn())!==s)for(;te!==s;)Jt.push(te),te=Sn();else Jt=O;Jt!==s?(te=F,wt++,l.charCodeAt(F)===46?(ce=Q,F++):(ce=s,wt===0&&fe(V)),wt--,ce===s?te=p:(F=te,te=O),te!==s?(nr=st,st=Wt=$(Jt)):(F=st,st=O)):(F=st,st=O)}else F=st,st=O;return Mt[Ce]={nextPos:F,result:st},st}function Wo(){var st,Wt,Jt,te,ce,Ce=49*F+29,Ee=Mt[Ce];if(Ee)return F=Ee.nextPos,Ee.result;for(st=F,Wt=[],Jt=lo();Jt!==s;)Wt.push(Jt),Jt=lo();if(Wt!==s)if((Jt=Nr())!==s){for(te=[],ce=lo();ce!==s;)te.push(ce),ce=lo();te!==s?(nr=st,st=Wt=et(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O;return Mt[Ce]={nextPos:F,result:st},st}function Hn(){var st,Wt,Jt,te,ce,Ce,Ee,kr=49*F+30,Tr=Mt[kr];if(Tr)return F=Tr.nextPos,Tr.result;for(st=F,Wt=[],Jt=lo();Jt!==s;)Wt.push(Jt),Jt=lo();if(Wt!==s)if((Jt=Nr())!==s){for(te=[],ce=lo();ce!==s;)te.push(ce),ce=lo();if(te!==s)if(l.charCodeAt(F)===44?(ce=gt,F++):(ce=s,wt===0&&fe(Yt)),ce!==s){for(Ce=[],Ee=lo();Ee!==s;)Ce.push(Ee),Ee=lo();Ce!==s?(nr=st,st=Wt=et(Jt)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O;return Mt[kr]={nextPos:F,result:st},st}function lo(){var st,Wt=49*F+31,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):((st=Mr())===s&&(st=Vn())===s&&(st=yr()),Mt[Wt]={nextPos:F,result:st},st)}function xo(){var st,Wt,Jt,te,ce,Ce,Ee,kr,Tr,Wr,_r,qr=49*F+33,wr=Mt[qr];if(wr)return F=wr.nextPos,wr.result;for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=br())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();if(te!==s)if(l.charCodeAt(F)===61?(ce=Y,F++):(ce=s,wt===0&&fe(ut)),ce!==s){for(Ce=[],Ee=Mr();Ee!==s;)Ce.push(Ee),Ee=Mr();if(Ce!==s)if((Ee=Nr())!==s){for(kr=[],Tr=Mr();Tr!==s;)kr.push(Tr),Tr=Mr();if(kr!==s)if(l.charCodeAt(F)===44?(Tr=gt,F++):(Tr=s,wt===0&&fe(Yt)),Tr!==s){for(Wr=[],_r=Mr();_r!==s;)Wr.push(_r),_r=Mr();Wr!==s?(nr=st,st=Wt=Pt(Jt,Ee)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O;if(st===s){for(st=F,Wt=[],Jt=Mr();Jt!==s;)Wt.push(Jt),Jt=Mr();if(Wt!==s)if((Jt=br())!==s){for(te=[],ce=Mr();ce!==s;)te.push(ce),ce=Mr();if(te!==s)if(l.charCodeAt(F)===61?(ce=Y,F++):(ce=s,wt===0&&fe(ut)),ce!==s){for(Ce=[],Ee=Mr();Ee!==s;)Ce.push(Ee),Ee=Mr();Ce!==s&&(Ee=Nr())!==s?(nr=st,st=Wt=Pt(Jt,Ee)):(F=st,st=O)}else F=st,st=O;else F=st,st=O}else F=st,st=O;else F=st,st=O}return Mt[qr]={nextPos:F,result:st},st}function bn(){var st,Wt,Jt,te=49*F+34,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):(st=F,l.charCodeAt(F)===46?(Wt=Q,F++):(Wt=s,wt===0&&fe(V)),Wt!==s&&(Jt=ii())!==s?(nr=st,st=Wt=Ht(Jt)):(F=st,st=O),Mt[te]={nextPos:F,result:st},st)}function eo(){var st,Wt,Jt,te,ce,Ce,Ee,kr,Tr,Wr,_r,qr,wr=49*F+35,An=Mt[wr];return An?(F=An.nextPos,An.result):(st=F,Wt=F,(Jt=Sn())!==s&&(te=Sn())!==s&&(ce=Sn())!==s&&(Ce=Sn())!==s?(l.charCodeAt(F)===45?(Ee=T,F++):(Ee=s,wt===0&&fe(L)),Ee!==s&&(kr=Sn())!==s&&(Tr=Sn())!==s?(l.charCodeAt(F)===45?(Wr=T,F++):(Wr=s,wt===0&&fe(L)),Wr!==s&&(_r=Sn())!==s&&(qr=Sn())!==s?Wt=Jt=[Jt,te,ce,Ce,Ee,kr,Tr,Wr,_r,qr]:(F=Wt,Wt=O)):(F=Wt,Wt=O)):(F=Wt,Wt=O),Wt!==s&&(nr=st,Wt=re(Wt)),st=Wt,Mt[wr]={nextPos:F,result:st},st)}function Mr(){var st,Wt=49*F+39,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):(_n.test(l.charAt(F))?(st=l.charAt(F),F++):(st=s,wt===0&&fe(io)),Mt[Wt]={nextPos:F,result:st},st)}function Vn(){var st,Wt,Jt,te=49*F+40,ce=Mt[te];return ce?(F=ce.nextPos,ce.result):(l.charCodeAt(F)===10?(st=qn,F++):(st=s,wt===0&&fe(ao)),st===s&&(st=F,l.charCodeAt(F)===13?(Wt=so,F++):(Wt=s,wt===0&&fe(Qo)),Wt!==s?(l.charCodeAt(F)===10?(Jt=qn,F++):(Jt=s,wt===0&&fe(ao)),Jt!==s?st=Wt=[Wt,Jt]:(F=st,st=O)):(F=st,st=O)),Mt[te]={nextPos:F,result:st},st)}function Xo(){var st,Wt=49*F+41,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):((st=Vn())===s&&(st=Mr()),Mt[Wt]={nextPos:F,result:st},st)}function xi(){var st,Wt,Jt=49*F+42,te=Mt[Jt];return te?(F=te.nextPos,te.result):(st=F,wt++,l.length>F?(Wt=l.charAt(F),F++):(Wt=s,wt===0&&fe(f)),wt--,Wt===s?st=p:(F=st,st=O),Mt[Jt]={nextPos:F,result:st},st)}function Xn(){var st,Wt=49*F+43,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):(uo.test(l.charAt(F))?(st=l.charAt(F),F++):(st=s,wt===0&&fe(ni)),Mt[Wt]={nextPos:F,result:st},st)}function Sn(){var st,Wt,Jt=49*F+44,te=Mt[Jt];return te?(F=te.nextPos,te.result):(kn.test(l.charAt(F))?(st=l.charAt(F),F++):(st=s,wt===0&&fe(Yr)),st===s&&(st=F,l.charCodeAt(F)===95?(Wt=mn,F++):(Wt=s,wt===0&&fe(to)),Wt!==s&&(nr=st,Wt=Yo()),st=Wt),Mt[Jt]={nextPos:F,result:st},st)}function di(){var st,Wt=49*F+45,Jt=Mt[Wt];return Jt?(F=Jt.nextPos,Jt.result):(co.test(l.charAt(F))?(st=l.charAt(F),F++):(st=s,wt===0&&fe(pn)),Mt[Wt]={nextPos:F,result:st},st)}function ii(){var st,Wt,Jt,te=49*F+46,ce=Mt[te];if(ce)return F=ce.nextPos,ce.result;if(st=F,Wt=[],(Jt=Sn())!==s)for(;Jt!==s;)Wt.push(Jt),Jt=Sn();else Wt=O;return Wt!==s&&(nr=st,Wt=jn(Wt)),st=Wt,Mt[te]={nextPos:F,result:st},st}function la(){var st,Wt,Jt=49*F+47,te=Mt[Jt];return te?(F=te.nextPos,te.result):(st=F,l.substr(F,2)===Tn?(Wt=Tn,F+=2):(Wt=s,wt===0&&fe(Xr)),Wt!==s&&(nr=st,Wt=Wn()),(st=Wt)===s&&(st=F,l.substr(F,2)===un?(Wt=un,F+=2):(Wt=s,wt===0&&fe(xn)),Wt!==s&&(nr=st,Wt=yo()),(st=Wt)===s&&(st=F,l.substr(F,2)===bi?(Wt=bi,F+=2):(Wt=s,wt===0&&fe(pi)),Wt!==s&&(nr=st,Wt=Ui()),(st=Wt)===s&&(st=F,l.substr(F,2)===Jo?(Wt=Jo,F+=2):(Wt=s,wt===0&&fe(Bo)),Wt!==s&&(nr=st,Wt=Ji()),(st=Wt)===s&&(st=F,l.substr(F,2)===It?(Wt=It,F+=2):(Wt=s,wt===0&&fe(ct)),Wt!==s&&(nr=st,Wt=Zt()),(st=Wt)===s&&(st=F,l.substr(F,2)===pe?(Wt=pe,F+=2):(Wt=s,wt===0&&fe(Gt)),Wt!==s&&(nr=st,Wt=be()),(st=Wt)===s&&(st=F,l.substr(F,2)===Le?(Wt=Le,F+=2):(Wt=s,wt===0&&fe(De)),Wt!==s&&(nr=st,Wt=he()),(st=Wt)===s&&(st=function(){var ce,Ce,Ee,kr,Tr,Wr,_r,qr,wr,An,cn,nn=49*F+48,Kr=Mt[nn];return Kr?(F=Kr.nextPos,Kr.result):(ce=F,l.substr(F,2)===ve?(Ce=ve,F+=2):(Ce=s,wt===0&&fe(me)),Ce!==s?(Ee=F,(kr=Xn())!==s&&(Tr=Xn())!==s&&(Wr=Xn())!==s&&(_r=Xn())!==s&&(qr=Xn())!==s&&(wr=Xn())!==s&&(An=Xn())!==s&&(cn=Xn())!==s?Ee=kr=[kr,Tr,Wr,_r,qr,wr,An,cn]:(F=Ee,Ee=O),Ee!==s?(nr=ce,ce=Ce=Ze(Ee)):(F=ce,ce=O)):(F=ce,ce=O),ce===s&&(ce=F,l.substr(F,2)===Er?(Ce=Er,F+=2):(Ce=s,wt===0&&fe(fr)),Ce!==s?(Ee=F,(kr=Xn())!==s&&(Tr=Xn())!==s&&(Wr=Xn())!==s&&(_r=Xn())!==s?Ee=kr=[kr,Tr,Wr,_r]:(F=Ee,Ee=O),Ee!==s?(nr=ce,ce=Ce=Ze(Ee)):(F=ce,ce=O)):(F=ce,ce=O)),Mt[nn]={nextPos:F,result:ce},ce)}()))))))),Mt[Jt]={nextPos:F,result:st},st)}var Aa=[];function Do(st){Aa.push(st)}function Pn(st,Wt,Jt,te,ce){var Ce={type:st,value:Wt,line:Jt(),column:te()};return ce&&(Ce.key=ce),Ce}if((v=k())!==s&&F===l.length)return v;throw v!==s&&F1;h++)O.splice(0,1);u[f]=O.join("")}var A=-1,g=0,w=0,R=-1,S=!1;for(f=0;fg&&(A=R,g=w)):u[f]==="0"&&(S=!0,R=f,w=1);w>g&&(A=R,g=w),g>1&&u.splice(A,g,""),m=u.length;var C="";for(u[0]===""&&(C=":"),f=0;f=y.length-1)return!1;var u=y.lastIndexOf(".",O-1);if(u<=0||u>=O-1)return!1;var m=k.list[y.slice(O+1)];return!!m&&m.indexOf(" "+y.slice(u+1,O)+" ")>=0},is:function(y){var O=y.lastIndexOf(".");if(O<=0||O>=y.length-1||y.lastIndexOf(".",O-1)>=0)return!1;var u=k.list[y.slice(O+1)];return!!u&&u.indexOf(" "+y.slice(0,O)+" ")>=0},get:function(y){var O=y.lastIndexOf(".");if(O<=0||O>=y.length-1)return null;var u=y.lastIndexOf(".",O-1);if(u<=0||u>=O-1)return null;var m=k.list[y.slice(O+1)];return m?m.indexOf(" "+y.slice(u+1,O)+" ")<0?null:y.slice(u+1):null},noConflict:function(){return s.SecondLevelDomains===this&&(s.SecondLevelDomains=E),this}};return k})},4193(P,M,l){var v,z,s;(function(E,k){P.exports?P.exports=k(l(9340),l(1430),l(4704)):(z=[l(9340),l(1430),l(4704)],(s=typeof(v=k)=="function"?v.apply(M,z):v)===void 0||(P.exports=s))})(0,function(E,k,y,O){var u=O&&O.URI;function m(c,N){var G=arguments.length>=1;if(!(this instanceof m))return G?arguments.length>=2?new m(c,N):new m(c):new m;if(c===void 0){if(G)throw new TypeError("undefined is not a valid argument for URI");c=typeof location<"u"?location.href+"":""}if(c===null&&G)throw new TypeError("null is not a valid argument for URI");return this.href(c),N!==void 0?this.absoluteTo(N):this}m.version="1.19.11";var p=m.prototype,f=Object.prototype.hasOwnProperty;function h(c){return c.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function A(c){return c===void 0?"Undefined":String(Object.prototype.toString.call(c)).slice(8,-1)}function g(c){return A(c)==="Array"}function w(c,N){var G,tt,Et={};if(A(N)==="RegExp")Et=null;else if(g(N))for(G=0,tt=N.length;G]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,m.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},m.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,m.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,m.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},m.hostProtocols=["http","https"],m.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,m.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"},m.getDomAttribute=function(c){if(c&&c.nodeName){var N=c.nodeName.toLowerCase();if(N!=="input"||c.type==="image")return m.domAttributes[N]}},m.encode=ot,m.decode=decodeURIComponent,m.iso8859=function(){m.encode=escape,m.decode=unescape},m.unicode=function(){m.encode=ot,m.decode=decodeURIComponent},m.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"}}}},m.encodeQuery=function(c,N){var G=m.encode(c+"");return N===void 0&&(N=m.escapeQuerySpace),N?G.replace(/%20/g,"+"):G},m.decodeQuery=function(c,N){c+="",N===void 0&&(N=m.escapeQuerySpace);try{return m.decode(N?c.replace(/\+/g,"%20"):c)}catch{return c}};var Q,V={encode:"encode",decode:"decode"},Y=function(c,N){return function(G){try{return m[N](G+"").replace(m.characters[c][N].expression,function(tt){return m.characters[c][N].map[tt]})}catch{return G}}};for(Q in V)m[Q+"PathSegment"]=Y("pathname",V[Q]),m[Q+"UrnPathSegment"]=Y("urnpath",V[Q]);var ut=function(c,N,G){return function(tt){var Et;Et=G?function(vt){return m[N](m[G](vt))}:m[N];for(var q=(tt+"").split(c),Tt=0,Ft=q.length;Tt-1&&(N.fragment=c.substring(G+1)||null,c=c.substring(0,G)),(G=c.indexOf("?"))>-1&&(N.query=c.substring(G+1)||null,c=c.substring(0,G)),(c=(c=c.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)==="//"?(N.protocol=null,c=c.substring(2),c=m.parseAuthority(c,N)):(G=c.indexOf(":"))>-1&&(N.protocol=c.substring(0,G)||null,N.protocol&&!N.protocol.match(m.protocol_expression)?N.protocol=void 0:c.substring(G+1,G+3).replace(/\\/g,"/")==="//"?(c=c.substring(G+3),c=m.parseAuthority(c,N)):(c=c.substring(G+1),N.urn=!0)),N.path=c,N},m.parseHost=function(c,N){c||(c="");var G,tt,Et=(c=c.replace(/\\/g,"/")).indexOf("/");if(Et===-1&&(Et=c.length),c.charAt(0)==="[")G=c.indexOf("]"),N.hostname=c.substring(1,G)||null,N.port=c.substring(G+2,Et)||null,N.port==="/"&&(N.port=null);else{var q=c.indexOf(":"),Tt=c.indexOf("/"),Ft=c.indexOf(":",q+1);Ft!==-1&&(Tt===-1||Ft-1?Et:c.length-1);return q>-1&&(Et===-1||q-1?lt.slice(0,xt)+lt.slice(xt).replace(q,""):lt.replace(q,"")).length<=vt[0].length||G.ignore&&G.ignore.test(lt))){var Ct=N(lt,bt,dt=bt+lt.length,c);Ct!==void 0?(Ct=String(Ct),c=c.slice(0,bt)+Ct+c.slice(dt),tt.lastIndex=bt+Ct.length):tt.lastIndex=dt}}return tt.lastIndex=0,c},m.ensureValidHostname=function(c,N){var G=!!c,tt=!1;if(N&&(tt=R(m.hostProtocols,N)),tt&&!G)throw new TypeError("Hostname cannot be empty, if protocol is "+N);if(c&&c.match(m.invalid_hostname_characters)){if(!E)throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(E.toASCII(c).match(m.invalid_hostname_characters))throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-:_]')}},m.ensureValidPort=function(c){if(c){var N=Number(c);if(!(/^[0-9]+$/.test(N)&&N>0&&N<65536))throw new TypeError('Port "'+c+'" is not a valid port')}},m.noConflict=function(c){if(c){var N={URI:this.noConflict()};return O.URITemplate&&typeof O.URITemplate.noConflict=="function"&&(N.URITemplate=O.URITemplate.noConflict()),O.IPv6&&typeof O.IPv6.noConflict=="function"&&(N.IPv6=O.IPv6.noConflict()),O.SecondLevelDomains&&typeof O.SecondLevelDomains.noConflict=="function"&&(N.SecondLevelDomains=O.SecondLevelDomains.noConflict()),N}return O.URI===this&&(O.URI=u),this},p.build=function(c){return c===!0?this._deferred_build=!0:(c===void 0||this._deferred_build)&&(this._string=m.build(this._parts),this._deferred_build=!1),this},p.clone=function(){return new m(this)},p.valueOf=p.toString=function(){return this.build(!1)._string},p.protocol=Ut("protocol"),p.username=Ut("username"),p.password=Ut("password"),p.hostname=Ut("hostname"),p.port=Ut("port"),p.query=pt("query","?"),p.fragment=pt("fragment","#"),p.search=function(c,N){var G=this.query(c,N);return typeof G=="string"&&G.length?"?"+G:G},p.hash=function(c,N){var G=this.fragment(c,N);return typeof G=="string"&&G.length?"#"+G:G},p.pathname=function(c,N){if(c===void 0||c===!0){var G=this._parts.path||(this._parts.hostname?"/":"");return c?(this._parts.urn?m.decodeUrnPath:m.decodePath)(G):G}return this._parts.urn?this._parts.path=c?m.recodeUrnPath(c):"":this._parts.path=c?m.recodePath(c):"/",this.build(!N),this},p.path=p.pathname,p.href=function(c,N){var G;if(c===void 0)return this.toString();this._string="",this._parts=m._parts();var tt=c instanceof m,Et=typeof c=="object"&&(c.hostname||c.path||c.pathname);if(c.nodeName&&(c=c[m.getDomAttribute(c)]||"",Et=!1),!tt&&Et&&c.pathname!==void 0&&(c=c.toString()),typeof c=="string"||c instanceof String)this._parts=m.parse(String(c),this._parts);else{if(!tt&&!Et)throw new TypeError("invalid input");var q=tt?c._parts:c;for(G in q)G!=="query"&&f.call(this._parts,G)&&(this._parts[G]=q[G]);q.query&&this.query(q.query,!1)}return this.build(!N),this},p.is=function(c){var N=!1,G=!1,tt=!1,Et=!1,q=!1,Tt=!1,Ft=!1,vt=!this._parts.urn;switch(this._parts.hostname&&(vt=!1,G=m.ip4_expression.test(this._parts.hostname),tt=m.ip6_expression.test(this._parts.hostname),q=(Et=!(N=G||tt))&&y&&y.has(this._parts.hostname),Tt=Et&&m.idn_expression.test(this._parts.hostname),Ft=Et&&m.punycode_expression.test(this._parts.hostname)),c.toLowerCase()){case"relative":return vt;case"absolute":return!vt;case"domain":case"name":return Et;case"sld":return q;case"ip":return N;case"ip4":case"ipv4":case"inet4":return G;case"ip6":case"ipv6":case"inet6":return tt;case"idn":return Tt;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return Ft}return null};var Bt=p.protocol,Rt=p.port,J=p.hostname;p.protocol=function(c,N){if(c&&!(c=c.replace(/:(\/\/)?$/,"")).match(m.protocol_expression))throw new TypeError('Protocol "'+c+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return Bt.call(this,c,N)},p.scheme=p.protocol,p.port=function(c,N){return this._parts.urn?c===void 0?"":this:(c!==void 0&&(c===0&&(c=null),c&&((c+="").charAt(0)===":"&&(c=c.substring(1)),m.ensureValidPort(c))),Rt.call(this,c,N))},p.hostname=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c!==void 0){var G={preventInvalidHostname:this._parts.preventInvalidHostname};if(m.parseHost(c,G)!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');c=G.hostname,this._parts.preventInvalidHostname&&m.ensureValidHostname(c,this._parts.protocol)}return J.call(this,c,N)},p.origin=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var G=this.protocol();return this.authority()?(G?G+"://":"")+this.authority():""}var tt=m(c);return this.protocol(tt.protocol()).authority(tt.authority()).build(!N),this},p.host=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?m.buildHost(this._parts):"";if(m.parseHost(c,this._parts)!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!N),this},p.authority=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?m.buildAuthority(this._parts):"";if(m.parseAuthority(c,this._parts)!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!N),this},p.userinfo=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var G=m.buildUserinfo(this._parts);return G&&G.substring(0,G.length-1)}return c[c.length-1]!=="@"&&(c+="@"),m.parseUserinfo(c,this._parts),this.build(!N),this},p.resource=function(c,N){var G;return c===void 0?this.path()+this.search()+this.hash():(G=m.parse(c),this._parts.path=G.path,this._parts.query=G.query,this._parts.fragment=G.fragment,this.build(!N),this)},p.subdomain=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,G)||""}var tt=this._parts.hostname.length-this.domain().length,Et=this._parts.hostname.substring(0,tt),q=new RegExp("^"+h(Et));if(c&&c.charAt(c.length-1)!=="."&&(c+="."),c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return c&&m.ensureValidHostname(c,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(q,c),this.build(!N),this},p.domain=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(N=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.match(/\./g);if(G&&G.length<2)return this._parts.hostname;var tt=this._parts.hostname.length-this.tld(N).length-1;return tt=this._parts.hostname.lastIndexOf(".",tt-1)+1,this._parts.hostname.substring(tt)||""}if(!c)throw new TypeError("cannot set domain empty");if(c.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(m.ensureValidHostname(c,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=c;else{var Et=new RegExp(h(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(Et,c)}return this.build(!N),this},p.tld=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(N=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.lastIndexOf("."),tt=this._parts.hostname.substring(G+1);return N!==!0&&y&&y.list[tt.toLowerCase()]&&y.get(this._parts.hostname)||tt}var Et;if(!c)throw new TypeError("cannot set TLD empty");if(c.match(/[^a-zA-Z0-9-]/)){if(!y||!y.is(c))throw new TypeError('TLD "'+c+'" contains characters other than [A-Z0-9]');Et=new RegExp(h(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Et,c)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");Et=new RegExp(h(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Et,c)}return this.build(!N),this},p.directory=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var G=this._parts.path.length-this.filename().length-1,tt=this._parts.path.substring(0,G)||(this._parts.hostname?"/":"");return c?m.decodePath(tt):tt}var Et=this._parts.path.length-this.filename().length,q=this._parts.path.substring(0,Et),Tt=new RegExp("^"+h(q));return this.is("relative")||(c||(c="/"),c.charAt(0)!=="/"&&(c="/"+c)),c&&c.charAt(c.length-1)!=="/"&&(c+="/"),c=m.recodePath(c),this._parts.path=this._parts.path.replace(Tt,c),this.build(!N),this},p.filename=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(typeof c!="string"){if(!this._parts.path||this._parts.path==="/")return"";var G=this._parts.path.lastIndexOf("/"),tt=this._parts.path.substring(G+1);return c?m.decodePathSegment(tt):tt}var Et=!1;c.charAt(0)==="/"&&(c=c.substring(1)),c.match(/\.?\//)&&(Et=!0);var q=new RegExp(h(this.filename())+"$");return c=m.recodePath(c),this._parts.path=this._parts.path.replace(q,c),Et?this.normalizePath(N):this.build(!N),this},p.suffix=function(c,N){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path||this._parts.path==="/")return"";var G,tt,Et=this.filename(),q=Et.lastIndexOf(".");return q===-1?"":(G=Et.substring(q+1),tt=/^[a-z0-9%]+$/i.test(G)?G:"",c?m.decodePathSegment(tt):tt)}c.charAt(0)==="."&&(c=c.substring(1));var Tt,Ft=this.suffix();if(Ft)Tt=c?new RegExp(h(Ft)+"$"):new RegExp(h("."+Ft)+"$");else{if(!c)return this;this._parts.path+="."+m.recodePath(c)}return Tt&&(c=m.recodePath(c),this._parts.path=this._parts.path.replace(Tt,c)),this.build(!N),this},p.segment=function(c,N,G){var tt=this._parts.urn?":":"/",Et=this.path(),q=Et.substring(0,1)==="/",Tt=Et.split(tt);if(c!==void 0&&typeof c!="number"&&(G=N,N=c,c=void 0),c!==void 0&&typeof c!="number")throw new Error('Bad segment "'+c+'", must be 0-based integer');if(q&&Tt.shift(),c<0&&(c=Math.max(Tt.length+c,0)),N===void 0)return c===void 0?Tt:Tt[c];if(c===null||Tt[c]===void 0)if(g(N)){Tt=[];for(var Ft=0,vt=N.length;Ft{}"`^| \\]/,u.expand=function(h,A,g){var w,R,S,C=f[h.operator],x=C.named?"Named":"Unnamed",ot=h.variables,Q=[];for(S=0;R=ot[S];S++){if((w=A.get(R.name)).type===0&&g&&g.strict)throw new Error('Missing expansion value for variable "'+R.name+'"');if(w.val.length){if(w.type>1&&R.maxlength)throw new Error('Invalid expression: Prefix modifier not applicable to variable "'+R.name+'"');Q.push(u["expand"+x](w,C,R.explode,R.explode&&C.separator||",",R.maxlength,R.name))}else w.type&&Q.push("")}return Q.length?C.prefix+Q.join(C.separator):""},u.expandNamed=function(h,A,g,w,R,S){var C,x,ot,Q="",V=A.encode,Y=A.empty_name_separator,ut=!h[V].length,Ut=h.type===2?"":E[V](S);for(x=0,ot=h.val.length;x= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function h(V){throw new RangeError(m[V])}function A(V,Y){for(var ut=V.length,Ut=[];ut--;)Ut[ut]=Y(V[ut]);return Ut}function g(V,Y){var ut=V.split("@"),Ut="";return ut.length>1&&(Ut=ut[0]+"@",V=ut[1]),Ut+A((V=V.replace(u,".")).split("."),Y).join(".")}function w(V){for(var Y,ut,Ut=[],pt=0,Bt=V.length;pt=55296&&Y<=56319&&pt65535&&(ut+=f((Y-=65536)>>>10&1023|55296),Y=56320|1023&Y),ut+=f(Y)}).join("")}function S(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:k}function C(V,Y){return V+22+75*(V<26)-((Y!=0)<<5)}function x(V,Y,ut){var Ut=0;for(V=ut?p(V/700):V>>1,V+=p(V/Y);V>455;Ut+=k)V=p(V/35);return p(Ut+36*V/(V+38))}function ot(V){var Y,ut,Ut,pt,Bt,Rt,J,At,c,N,G=[],tt=V.length,Et=0,q=128,Tt=72;for((ut=V.lastIndexOf("-"))<0&&(ut=0),Ut=0;Ut=128&&h("not-basic"),G.push(V.charCodeAt(Ut));for(pt=ut>0?ut+1:0;pt=tt&&h("invalid-input"),((At=S(V.charCodeAt(pt++)))>=k||At>p((E-Et)/Rt))&&h("overflow"),Et+=At*Rt,!(At<(c=J<=Tt?1:J>=Tt+26?26:J-Tt));J+=k)Rt>p(E/(N=k-c))&&h("overflow"),Rt*=N;Tt=x(Et-Bt,Y=G.length+1,Bt==0),p(Et/Y)>E-q&&h("overflow"),q+=p(Et/Y),Et%=Y,G.splice(Et++,0,q)}return R(G)}function Q(V){var Y,ut,Ut,pt,Bt,Rt,J,At,c,N,G,tt,Et,q,Tt,Ft=[];for(tt=(V=w(V)).length,Y=128,ut=0,Bt=72,Rt=0;Rt=Y&&Gp((E-ut)/(Et=Ut+1))&&h("overflow"),ut+=(J-Y)*Et,Y=J,Rt=0;RtE&&h("overflow"),G==Y){for(At=ut,c=k;!(At<(N=c<=Bt?1:c>=Bt+26?26:c-Bt));c+=k)Tt=At-N,q=k-N,Ft.push(f(C(N+Tt%q,0))),At=p(Tt/q);Ft.push(f(C(At,0))),Bt=x(ut,Et,Ut==pt),ut=0,++Ut}++ut,++Y}return Ft.join("")}s={version:"1.3.2",ucs2:{decode:w,encode:R},decode:ot,encode:Q,toASCII:function(V){return g(V,function(Y){return O.test(Y)?"xn--"+Q(Y):Y})},toUnicode:function(V){return g(V,function(Y){return y.test(Y)?ot(Y.slice(4).toLowerCase()):Y})}},(v=(function(){return s}).call(M,l,M,P))===void 0||(P.exports=v)}()},1270(P,M,l){var v;P=l.nmd(P),function(){M&&M.nodeType,P&&P.nodeType;var z=typeof l.g=="object"&&l.g;z.global!==z&&z.window!==z&&z.self;var s,E=2147483647,k=36,y=/^xn--/,O=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function h(V){throw new RangeError(m[V])}function A(V,Y){for(var ut=V.length,Ut=[];ut--;)Ut[ut]=Y(V[ut]);return Ut}function g(V,Y){var ut=V.split("@"),Ut="";return ut.length>1&&(Ut=ut[0]+"@",V=ut[1]),Ut+A((V=V.replace(u,".")).split("."),Y).join(".")}function w(V){for(var Y,ut,Ut=[],pt=0,Bt=V.length;pt=55296&&Y<=56319&&pt65535&&(ut+=f((Y-=65536)>>>10&1023|55296),Y=56320|1023&Y),ut+=f(Y)}).join("")}function S(V){return V-48<10?V-22:V-65<26?V-65:V-97<26?V-97:k}function C(V,Y){return V+22+75*(V<26)-((Y!=0)<<5)}function x(V,Y,ut){var Ut=0;for(V=ut?p(V/700):V>>1,V+=p(V/Y);V>455;Ut+=k)V=p(V/35);return p(Ut+36*V/(V+38))}function ot(V){var Y,ut,Ut,pt,Bt,Rt,J,At,c,N,G=[],tt=V.length,Et=0,q=128,Tt=72;for((ut=V.lastIndexOf("-"))<0&&(ut=0),Ut=0;Ut=128&&h("not-basic"),G.push(V.charCodeAt(Ut));for(pt=ut>0?ut+1:0;pt=tt&&h("invalid-input"),((At=S(V.charCodeAt(pt++)))>=k||At>p((E-Et)/Rt))&&h("overflow"),Et+=At*Rt,!(At<(c=J<=Tt?1:J>=Tt+26?26:J-Tt));J+=k)Rt>p(E/(N=k-c))&&h("overflow"),Rt*=N;Tt=x(Et-Bt,Y=G.length+1,Bt==0),p(Et/Y)>E-q&&h("overflow"),q+=p(Et/Y),Et%=Y,G.splice(Et++,0,q)}return R(G)}function Q(V){var Y,ut,Ut,pt,Bt,Rt,J,At,c,N,G,tt,Et,q,Tt,Ft=[];for(tt=(V=w(V)).length,Y=128,ut=0,Bt=72,Rt=0;Rt=Y&&Gp((E-ut)/(Et=Ut+1))&&h("overflow"),ut+=(J-Y)*Et,Y=J,Rt=0;RtE&&h("overflow"),G==Y){for(At=ut,c=k;!(At<(N=c<=Bt?1:c>=Bt+26?26:c-Bt));c+=k)Tt=At-N,q=k-N,Ft.push(f(C(N+Tt%q,0))),At=p(Tt/q);Ft.push(f(C(At,0))),Bt=x(ut,Et,Ut==pt),ut=0,++Ut}++ut,++Y}return Ft.join("")}s={version:"1.4.1",ucs2:{decode:w,encode:R},decode:ot,encode:Q,toASCII:function(V){return g(V,function(Y){return O.test(Y)?"xn--"+Q(Y):Y})},toUnicode:function(V){return g(V,function(Y){return y.test(Y)?ot(Y.slice(4).toLowerCase()):Y})}},(v=(function(){return s}).call(M,l,M,P))===void 0||(P.exports=v)}()},8835(P,M,l){var v=l(1270);function z(){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 s=/^([a-z0-9.+-]+:)/i,E=/:[0-9]*$/,k=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,y=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),O=["'"].concat(y),u=["%","/","?",";","#"].concat(O),m=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=l(5373);function R(S,C,x){if(S&&typeof S=="object"&&S instanceof z)return S;var ot=new z;return ot.parse(S,C,x),ot}z.prototype.parse=function(S,C,x){if(typeof S!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof S);var ot=S.indexOf("?"),Q=ot!==-1&&ot127?Tt+="x":Tt+=q[Ft];if(!Tt.match(p)){var bt=tt.slice(0,c),yt=tt.slice(c+1),dt=q.match(f);dt&&(bt.push(dt[1]),yt.unshift(dt[2])),yt.length&&(Y="/"+yt.join(".")+Y),this.hostname=bt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),G||(this.hostname=v.toASCII(this.hostname));var lt=this.port?":"+this.port:"",xt=this.hostname||"";this.host=xt+lt,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Y[0]!=="/"&&(Y="/"+Y))}if(!h[pt])for(c=0,Et=O.length;c0)&&x.host.split("@"))&&(x.auth=dt.shift(),x.hostname=dt.shift(),x.host=x.hostname)),x.search=S.search,x.query=S.query,x.pathname===null&&x.search===null||(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.href=x.format(),x;if(!q.length)return x.pathname=null,x.search?x.path="/"+x.search:x.path=null,x.href=x.format(),x;for(var Ft=q.slice(-1)[0],vt=(x.host||S.host||q.length>1)&&(Ft==="."||Ft==="..")||Ft==="",bt=0,yt=q.length;yt>=0;yt--)(Ft=q[yt])==="."?q.splice(yt,1):Ft===".."?(q.splice(yt,1),bt++):bt&&(q.splice(yt,1),bt--);if(!tt&&!Et)for(;bt--;bt)q.unshift("..");!tt||q[0]===""||q[0]&&q[0].charAt(0)==="/"||q.unshift(""),vt&&q.join("/").substr(-1)!=="/"&&q.push("");var dt,lt=q[0]===""||q[0]&&q[0].charAt(0)==="/";return Tt&&(x.hostname=lt?"":q.length?q.shift():"",x.host=x.hostname,(dt=!!(x.host&&x.host.indexOf("@")>0)&&x.host.split("@"))&&(x.auth=dt.shift(),x.hostname=dt.shift(),x.host=x.hostname)),(tt=tt||x.host&&q.length)&&!lt&&q.unshift(""),q.length>0?x.pathname=q.join("/"):(x.pathname=null,x.path=null),x.pathname===null&&x.search===null||(x.path=(x.pathname?x.pathname:"")+(x.search?x.search:"")),x.auth=S.auth||x.auth,x.slashes=x.slashes||S.slashes,x.href=x.format(),x},z.prototype.parseHost=function(){var S=this.host,C=E.exec(S);C&&((C=C[0])!==":"&&(this.port=C.substr(1)),S=S.substr(0,S.length-C.length)),S&&(this.hostname=S)},M.parse=R,M.resolve=function(S,C){return R(S,!1,!0).resolve(C)},M.resolveObject=function(S,C){return S?R(S,!1,!0).resolveObject(C):C},M.format=function(S){return typeof S=="string"&&(S=R(S)),S instanceof z?S.format():z.prototype.format.call(S)},M.Url=z},4643(P,M,l){function v(z){try{if(!l.g.localStorage)return!1}catch{return!1}var s=l.g.localStorage[z];return s!=null&&String(s).toLowerCase()==="true"}P.exports=function(z,s){if(v("noDeprecation"))return z;var E=!1;return function(){if(!E){if(v("throwDeprecation"))throw new Error(s);v("traceDeprecation")?console.trace(s):console.warn(s),E=!0}return z.apply(this,arguments)}}},1135(P){P.exports=function(M){return M&&typeof M=="object"&&typeof M.copy=="function"&&typeof M.fill=="function"&&typeof M.readUInt8=="function"}},9032(P,M,l){var v=l(7244),z=l(8184),s=l(5767),E=l(5680);function k(c){return c.call.bind(c)}var y=typeof BigInt<"u",O=typeof Symbol<"u",u=k(Object.prototype.toString),m=k(Number.prototype.valueOf),p=k(String.prototype.valueOf),f=k(Boolean.prototype.valueOf);if(y)var h=k(BigInt.prototype.valueOf);if(O)var A=k(Symbol.prototype.valueOf);function g(c,N){if(typeof c!="object")return!1;try{return N(c),!0}catch{return!1}}function w(c){return u(c)==="[object Map]"}function R(c){return u(c)==="[object Set]"}function S(c){return u(c)==="[object WeakMap]"}function C(c){return u(c)==="[object WeakSet]"}function x(c){return u(c)==="[object ArrayBuffer]"}function ot(c){return typeof ArrayBuffer<"u"&&(x.working?x(c):c instanceof ArrayBuffer)}function Q(c){return u(c)==="[object DataView]"}function V(c){return typeof DataView<"u"&&(Q.working?Q(c):c instanceof DataView)}M.isArgumentsObject=v,M.isGeneratorFunction=z,M.isTypedArray=E,M.isPromise=function(c){return typeof Promise<"u"&&c instanceof Promise||c!==null&&typeof c=="object"&&typeof c.then=="function"&&typeof c.catch=="function"},M.isArrayBufferView=function(c){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(c):E(c)||V(c)},M.isUint8Array=function(c){return s(c)==="Uint8Array"},M.isUint8ClampedArray=function(c){return s(c)==="Uint8ClampedArray"},M.isUint16Array=function(c){return s(c)==="Uint16Array"},M.isUint32Array=function(c){return s(c)==="Uint32Array"},M.isInt8Array=function(c){return s(c)==="Int8Array"},M.isInt16Array=function(c){return s(c)==="Int16Array"},M.isInt32Array=function(c){return s(c)==="Int32Array"},M.isFloat32Array=function(c){return s(c)==="Float32Array"},M.isFloat64Array=function(c){return s(c)==="Float64Array"},M.isBigInt64Array=function(c){return s(c)==="BigInt64Array"},M.isBigUint64Array=function(c){return s(c)==="BigUint64Array"},w.working=typeof Map<"u"&&w(new Map),M.isMap=function(c){return typeof Map<"u"&&(w.working?w(c):c instanceof Map)},R.working=typeof Set<"u"&&R(new Set),M.isSet=function(c){return typeof Set<"u"&&(R.working?R(c):c instanceof Set)},S.working=typeof WeakMap<"u"&&S(new WeakMap),M.isWeakMap=function(c){return typeof WeakMap<"u"&&(S.working?S(c):c instanceof WeakMap)},C.working=typeof WeakSet<"u"&&C(new WeakSet),M.isWeakSet=function(c){return C(c)},x.working=typeof ArrayBuffer<"u"&&x(new ArrayBuffer),M.isArrayBuffer=ot,Q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Q(new DataView(new ArrayBuffer(1),0,1)),M.isDataView=V;var Y=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ut(c){return u(c)==="[object SharedArrayBuffer]"}function Ut(c){return Y!==void 0&&(ut.working===void 0&&(ut.working=ut(new Y)),ut.working?ut(c):c instanceof Y)}function pt(c){return g(c,m)}function Bt(c){return g(c,p)}function Rt(c){return g(c,f)}function J(c){return y&&g(c,h)}function At(c){return O&&g(c,A)}M.isSharedArrayBuffer=Ut,M.isAsyncFunction=function(c){return u(c)==="[object AsyncFunction]"},M.isMapIterator=function(c){return u(c)==="[object Map Iterator]"},M.isSetIterator=function(c){return u(c)==="[object Set Iterator]"},M.isGeneratorObject=function(c){return u(c)==="[object Generator]"},M.isWebAssemblyCompiledModule=function(c){return u(c)==="[object WebAssembly.Module]"},M.isNumberObject=pt,M.isStringObject=Bt,M.isBooleanObject=Rt,M.isBigIntObject=J,M.isSymbolObject=At,M.isBoxedPrimitive=function(c){return pt(c)||Bt(c)||Rt(c)||J(c)||At(c)},M.isAnyArrayBuffer=function(c){return typeof Uint8Array<"u"&&(ot(c)||Ut(c))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(c){Object.defineProperty(M,c,{enumerable:!1,value:function(){throw new Error(c+" is not supported in userland")}})})},537(P,M,l){var v=Object.getOwnPropertyDescriptors||function(J){for(var At=Object.keys(J),c={},N=0;N=G)return q;switch(q){case"%s":return String(N[c++]);case"%d":return Number(N[c++]);case"%j":try{return JSON.stringify(N[c++])}catch{return"[Circular]"}default:return q}}),Et=N[c];c"u")return function(){return M.deprecate(J,At).apply(this,arguments)};var c=!1;return function(){if(!c){if(process.throwDeprecation)throw new Error(At);process.traceDeprecation?console.trace(At):console.error(At),c=!0}return J.apply(this,arguments)}};var s={},E=/^$/;if(o.NODE_DEBUG){var k=o.NODE_DEBUG;k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i")}function y(J,At){var c={seen:[],stylize:u};return arguments.length>=3&&(c.depth=arguments[2]),arguments.length>=4&&(c.colors=arguments[3]),A(At)?c.showHidden=At:At&&M._extend(c,At),S(c.showHidden)&&(c.showHidden=!1),S(c.depth)&&(c.depth=2),S(c.colors)&&(c.colors=!1),S(c.customInspect)&&(c.customInspect=!0),c.colors&&(c.stylize=O),m(c,J,c.depth)}function O(J,At){var c=y.styles[At];return c?"\x1B["+y.colors[c][0]+"m"+J+"\x1B["+y.colors[c][1]+"m":J}function u(J,At){return J}function m(J,At,c){if(J.customInspect&&At&&V(At.inspect)&&At.inspect!==M.inspect&&(!At.constructor||At.constructor.prototype!==At)){var N=At.inspect(c,J);return R(N)||(N=m(J,N,c)),N}var G=function(yt,dt){if(S(dt))return yt.stylize("undefined","undefined");if(R(dt)){var lt="'"+JSON.stringify(dt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return yt.stylize(lt,"string")}if(w(dt))return yt.stylize(""+dt,"number");if(A(dt))return yt.stylize(""+dt,"boolean");if(g(dt))return yt.stylize("null","null")}(J,At);if(G)return G;var tt=Object.keys(At),Et=function(yt){var dt={};return yt.forEach(function(lt,xt){dt[lt]=!0}),dt}(tt);if(J.showHidden&&(tt=Object.getOwnPropertyNames(At)),Q(At)&&(tt.indexOf("message")>=0||tt.indexOf("description")>=0))return p(At);if(tt.length===0){if(V(At)){var q=At.name?": "+At.name:"";return J.stylize("[Function"+q+"]","special")}if(C(At))return J.stylize(RegExp.prototype.toString.call(At),"regexp");if(ot(At))return J.stylize(Date.prototype.toString.call(At),"date");if(Q(At))return p(At)}var Tt,Ft="",vt=!1,bt=["{","}"];return h(At)&&(vt=!0,bt=["[","]"]),V(At)&&(Ft=" [Function"+(At.name?": "+At.name:"")+"]"),C(At)&&(Ft=" "+RegExp.prototype.toString.call(At)),ot(At)&&(Ft=" "+Date.prototype.toUTCString.call(At)),Q(At)&&(Ft=" "+p(At)),tt.length!==0||vt&&At.length!=0?c<0?C(At)?J.stylize(RegExp.prototype.toString.call(At),"regexp"):J.stylize("[Object]","special"):(J.seen.push(At),Tt=vt?function(yt,dt,lt,xt,Ot){for(var kt=[],Ct=0,H=dt.length;Ct=0,Ot+kt.replace(/\u001b\[\d\d?m/g,"").length+1},0);return xt>60?lt[0]+(dt===""?"":dt+` + `)+" "+yt.join(`, + `)+" "+lt[1]:lt[0]+dt+" "+yt.join(", ")+" "+lt[1]}(Tt,Ft,bt)):bt[0]+Ft+bt[1]}function p(J){return"["+Error.prototype.toString.call(J)+"]"}function f(J,At,c,N,G,tt){var Et,q,Tt;if((Tt=Object.getOwnPropertyDescriptor(At,G)||{value:At[G]}).get?q=Tt.set?J.stylize("[Getter/Setter]","special"):J.stylize("[Getter]","special"):Tt.set&&(q=J.stylize("[Setter]","special")),pt(N,G)||(Et="["+G+"]"),q||(J.seen.indexOf(Tt.value)<0?(q=g(c)?m(J,Tt.value,null):m(J,Tt.value,c-1)).indexOf(` +`)>-1&&(q=tt?q.split(` +`).map(function(Ft){return" "+Ft}).join(` +`).slice(2):` +`+q.split(` +`).map(function(Ft){return" "+Ft}).join(` +`)):q=J.stylize("[Circular]","special")),S(Et)){if(tt&&G.match(/^\d+$/))return q;(Et=JSON.stringify(""+G)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Et=Et.slice(1,-1),Et=J.stylize(Et,"name")):(Et=Et.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Et=J.stylize(Et,"string"))}return Et+": "+q}function h(J){return Array.isArray(J)}function A(J){return typeof J=="boolean"}function g(J){return J===null}function w(J){return typeof J=="number"}function R(J){return typeof J=="string"}function S(J){return J===void 0}function C(J){return x(J)&&Y(J)==="[object RegExp]"}function x(J){return typeof J=="object"&&J!==null}function ot(J){return x(J)&&Y(J)==="[object Date]"}function Q(J){return x(J)&&(Y(J)==="[object Error]"||J instanceof Error)}function V(J){return typeof J=="function"}function Y(J){return Object.prototype.toString.call(J)}function ut(J){return J<10?"0"+J.toString(10):J.toString(10)}M.debuglog=function(J){if(J=J.toUpperCase(),!s[J])if(E.test(J)){var At=process.pid;s[J]=function(){var c=M.format.apply(M,arguments);console.error("%s %d: %s",J,At,c)}}else s[J]=function(){};return s[J]},M.inspect=y,y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},M.types=l(9032),M.isArray=h,M.isBoolean=A,M.isNull=g,M.isNullOrUndefined=function(J){return J==null},M.isNumber=w,M.isString=R,M.isSymbol=function(J){return typeof J=="symbol"},M.isUndefined=S,M.isRegExp=C,M.types.isRegExp=C,M.isObject=x,M.isDate=ot,M.types.isDate=ot,M.isError=Q,M.types.isNativeError=Q,M.isFunction=V,M.isPrimitive=function(J){return J===null||typeof J=="boolean"||typeof J=="number"||typeof J=="string"||typeof J=="symbol"||J===void 0},M.isBuffer=l(1135);var Ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pt(J,At){return Object.prototype.hasOwnProperty.call(J,At)}M.log=function(){var J,At;console.log("%s - %s",(J=new Date,At=[ut(J.getHours()),ut(J.getMinutes()),ut(J.getSeconds())].join(":"),[J.getDate(),Ut[J.getMonth()],At].join(" ")),M.format.apply(M,arguments))},M.inherits=l(6698),M._extend=function(J,At){if(!At||!x(At))return J;for(var c=Object.keys(At),N=c.length;N--;)J[c[N]]=At[c[N]];return J};var Bt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function Rt(J,At){if(!J){var c=new Error("Promise was rejected with a falsy value");c.reason=J,J=c}return At(J)}M.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(Bt&&J[Bt]){var At;if(typeof(At=J[Bt])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(At,Bt,{value:At,enumerable:!1,writable:!1,configurable:!0}),At}function At(){for(var c,N,G=new Promise(function(q,Tt){c=q,N=Tt}),tt=[],Et=0;Et"u"?l.g:globalThis,p=z(),f=E("String.prototype.slice"),h=E("Array.prototype.indexOf",!0)||function(g,w){for(var R=0;R-1?w:w==="Object"&&function(R){var S=!1;return v(A,function(C,x){if(!S)try{C(R),S=f(x,1)}catch{}}),S}(g)}return k?function(R){var S=!1;return v(A,function(C,x){if(!S)try{"$"+C(R)===x&&(S=f(x,1))}catch{}}),S}(g):null}},7510(P){P.exports=function(){for(var l={},v=0;v"u"?l.g:globalThis;P.exports=function(){for(var s=[],E=0;E{var M=P&&P.__esModule?()=>P.default:()=>P;return I.d(M,{a:M}),M},I.d=(P,M)=>{for(var l in M)I.o(M,l)&&!I.o(P,l)&&Object.defineProperty(P,l,{enumerable:!0,get:M[l]})},I.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),I.hmd=P=>((P=Object.create(P)).children||(P.children=[]),Object.defineProperty(P,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+P.id)}}),P),I.o=(P,M)=>Object.prototype.hasOwnProperty.call(P,M),I.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})},I.nmd=P=>(P.paths=[],P.children||(P.children=[]),P),I(1924)})())})(Gw);const Ww=Lr.createContext({client:null}),Xw=Lr.createContext({client:null}),Kw=()=>{const e=Lr.useContext(Ww);if(!e.client)throw new Error("useBcForgeClient must be used within a bcForgeProvider");return e.client},Zw=()=>{const e=Lr.useContext(Xw);if(!e.client)throw new Error("useBcForgeVestingClient must be used within a bcForgeVestingProvider");return e.client};function $w(){const e=Kw(),[r,o]=Lr.useState(null),[a,b]=Lr.useState(!0),[I,P]=Lr.useState(null);return Lr.useEffect(()=>{async function M(){try{b(!0);const[l,v,z]=await Promise.all([e.getName(),e.getSymbol(),e.getDecimals()]);o({name:l,symbol:v,decimals:z})}catch(l){P(l instanceof Error?l:new Error(String(l)))}finally{b(!1)}}M()},[e]),{data:r,loading:a,error:I}}function Qw(e){const r=Zw(),[o,a]=Lr.useState(null),[b,I]=Lr.useState(!1),[P,M]=Lr.useState(null),l=Lr.useCallback(async()=>{if(e)try{I(!0);const v=await r.getVestingInfo(e);a(v)}catch(v){M(v instanceof Error?v:new Error(String(v)))}finally{I(!1)}},[r,e]);return Lr.useEffect(()=>{l()},[l]),{data:o,loading:b,error:P,refetch:l}}function Yw(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}function wf(e,r=7){const o=BigInt(10**r),a=e/o,I=(e%o).toString().padStart(r,"0").replace(/0+$/,"");return I?`${a}.${I}`:a.toString()}function Jw(e,r,o){if(o>=e.end_ledger)return 100;if(o<=e.cliff_ledger)return o=e.end_ledger?{label:"Fully Vested",color:"bg-green-100 text-green-700"}:o>=e.cliff_ledger?{label:"Vesting",color:"bg-blue-100 text-blue-700"}:{label:"Cliff",color:"bg-yellow-100 text-yellow-700"}}function e1(e){return e.total_amount===0n?0:Number(e.released_amount*100n/e.total_amount)}function r1({schedule:e,currentLedger:r,decimals:o=7}){const a=t1(e.schedule,e.start_ledger,r,e.revoked),b=Jw(e.schedule,e.start_ledger,r),I=e1(e.schedule);return vr.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 hover:shadow-md transition-shadow",children:[vr.jsxs("div",{className:"flex items-start justify-between mb-4 flex-wrap gap-2",children:[vr.jsxs("div",{className:"min-w-0",children:[vr.jsxs("h3",{className:"text-sm font-medium text-gray-900",children:["Schedule #",e.schedule_id]}),vr.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate max-w-[200px] sm:max-w-xs",children:Yw(e.schedule.beneficiary)})]}),vr.jsx("span",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${a.color}`,children:a.label})]}),vr.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-4",children:[vr.jsxs("div",{children:[vr.jsx("p",{className:"text-xs text-gray-500",children:"Total Amount"}),vr.jsx("p",{className:"text-sm font-semibold text-gray-900 mt-0.5",children:wf(e.schedule.total_amount,o)})]}),vr.jsxs("div",{children:[vr.jsx("p",{className:"text-xs text-gray-500",children:"Claimable"}),vr.jsx("p",{className:"text-sm font-semibold text-indigo-600 mt-0.5",children:wf(e.claimable_amount,o)})]}),vr.jsxs("div",{children:[vr.jsx("p",{className:"text-xs text-gray-500",children:"Released"}),vr.jsx("p",{className:"text-sm font-semibold text-gray-900 mt-0.5",children:wf(e.schedule.released_amount,o)})]}),vr.jsxs("div",{children:[vr.jsx("p",{className:"text-xs text-gray-500",children:"Revocable"}),vr.jsx("p",{className:"text-sm font-semibold text-gray-900 mt-0.5",children:e.schedule.revocable?"Yes":"No"})]})]}),vr.jsxs("div",{className:"space-y-3",children:[vr.jsxs("div",{children:[vr.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 mb-1",children:[vr.jsx("span",{children:"Vesting progress"}),vr.jsxs("span",{children:[b,"%"]})]}),vr.jsx("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:vr.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all duration-500",style:{width:`${b}%`}})}),vr.jsxs("div",{className:"flex justify-between text-xs text-gray-400 mt-1",children:[vr.jsxs("span",{children:["#",e.start_ledger]}),vr.jsxs("span",{children:["#",e.schedule.cliff_ledger]}),vr.jsxs("span",{children:["#",e.schedule.end_ledger]})]})]}),vr.jsxs("div",{children:[vr.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 mb-1",children:[vr.jsx("span",{children:"Released"}),vr.jsxs("span",{children:[I,"%"]})]}),vr.jsx("div",{className:"w-full h-1.5 bg-gray-100 rounded-full overflow-hidden",children:vr.jsx("div",{className:"h-full bg-green-500 rounded-full transition-all duration-500",style:{width:`${I}%`}})})]})]})]})}function n1(){return vr.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 animate-pulse",children:[vr.jsxs("div",{className:"flex items-start justify-between mb-4",children:[vr.jsxs("div",{className:"space-y-2 flex-1",children:[vr.jsx("div",{className:"h-4 bg-gray-200 rounded w-1/3"}),vr.jsx("div",{className:"h-3 bg-gray-200 rounded w-1/2"})]}),vr.jsx("div",{className:"h-6 bg-gray-200 rounded-full w-20"})]}),vr.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:Array.from({length:4}).map((e,r)=>vr.jsxs("div",{className:"space-y-1",children:[vr.jsx("div",{className:"h-3 bg-gray-200 rounded w-16"}),vr.jsx("div",{className:"h-5 bg-gray-200 rounded w-24"})]},r))})]})}function o1({count:e=3}){return vr.jsx("div",{className:"space-y-4",children:Array.from({length:e}).map((r,o)=>vr.jsx(n1,{},o))})}function sy({title:e="No vesting schedules found",description:r="Vesting schedules for this address will appear here once created."}){return vr.jsxs("div",{className:"text-center py-16 px-4",children:[vr.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mb-4",children:vr.jsx("svg",{className:"w-8 h-8 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:vr.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})}),vr.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:e}),vr.jsx("p",{className:"text-sm text-gray-500 max-w-sm mx-auto",children:r})]})}function i1({message:e,onRetry:r}){return vr.jsxs("div",{className:"text-center py-16 px-4",children:[vr.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-red-50 flex items-center justify-center mb-4",children:vr.jsx("svg",{className:"w-8 h-8 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:vr.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})})}),vr.jsx("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Something went wrong"}),vr.jsx("p",{className:"text-sm text-gray-500 max-w-sm mx-auto mb-4",children:e}),r&&vr.jsx("button",{onClick:r,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500",children:"Retry"})]})}function a1(){return Lr.useMemo(()=>Math.floor(Date.now()/5e3)+5e4,[])}function s1(){const{data:e,loading:r}=$w(),o=Lr.useMemo(()=>typeof window<"u"&&new URLSearchParams(window.location.search).get("address")||"",[]),{data:a,loading:b,error:I,refetch:P}=Qw(o||void 0),M=a1(),l=(e==null?void 0:e.decimals)??7;return vr.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[vr.jsxs("div",{className:"mb-8",children:[vr.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Lockup & Vesting Schedule"}),vr.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"View all vesting schedules and lockup details for a beneficiary address."})]}),vr.jsxs("div",{className:"mb-8",children:[vr.jsx("label",{htmlFor:"address-input",className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Beneficiary Address"}),vr.jsxs("div",{className:"flex gap-3",children:[vr.jsx("input",{id:"address-input",type:"text",defaultValue:o,placeholder:"G... or C... address",className:"block w-full max-w-lg rounded-lg border border-gray-300 px-3 py-2 text-sm shadow-xs placeholder:text-gray-400 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 outline-none",onKeyDown:v=>{if(v.key==="Enter"){const z=new URL(window.location.href);z.searchParams.set("address",v.target.value),window.location.search=z.searchParams.toString()}}}),vr.jsx("button",{onClick:()=>{const v=document.getElementById("address-input");if(v!=null&&v.value){const z=new URL(window.location.href);z.searchParams.set("address",v.value),window.location.search=z.searchParams.toString()}},className:"inline-flex items-center rounded-lg bg-indigo-600 px-4 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500",children:"Search"})]})]}),!o&&!b&&vr.jsx(sy,{title:"Enter an address to get started",description:"Paste a Stellar public key or contract address above to view their vesting schedules and lockup details."}),o&&b&&vr.jsx(o1,{count:3}),o&&I&&!b&&vr.jsx(i1,{message:I.message||"Failed to load vesting schedules. Please try again.",onRetry:P}),o&&!b&&!I&&a&&a.length===0&&vr.jsx(sy,{}),o&&!b&&!I&&a&&a.length>0&&vr.jsxs(vr.Fragment,{children:[vr.jsxs("div",{className:"flex items-center justify-between mb-4",children:[vr.jsxs("p",{className:"text-sm text-gray-500",children:[a.length," schedule",a.length!==1?"s":""," found"]}),r&&vr.jsx("span",{className:"text-xs text-gray-400",children:"Loading token info..."})]}),vr.jsx("div",{className:"space-y-4",children:a.map(v=>vr.jsx(r1,{schedule:v,currentLedger:M,decimals:l},v.schedule_id))})]})]})}function u1(){return vr.jsx(Mw,{children:vr.jsxs(Uc,{element:vr.jsx(Hw,{}),children:[vr.jsx(Uc,{path:"/",element:vr.jsx(Lw,{to:"/vesting",replace:!0})}),vr.jsx(Uc,{path:"/vesting",element:vr.jsx(s1,{})})]})})}const c1={rpcUrl:"https://soroban-testnet.stellar.org",networkPassphrase:"Test SDF Network ; September 2015",contractId:""},l1={rpcUrl:"https://soroban-testnet.stellar.org",networkPassphrase:"Test SDF Network ; September 2015",contractId:""};wg(document.getElementById("root")).render(vr.jsx(Lr.StrictMode,{children:vr.jsx(qw,{children:vr.jsx("bcForgeProvider",{config:c1,children:vr.jsx("bcForgeVestingProvider",{config:l1,children:vr.jsx(u1,{})})})})})); diff --git a/apps/frontend/dist/assets/index-MLcLqgAM.css b/apps/frontend/dist/assets/index-MLcLqgAM.css new file mode 100644 index 0000000..c7b5aa0 --- /dev/null +++ b/apps/frontend/dist/assets/index-MLcLqgAM.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-400:oklch(70.4% .191 22.216);--color-red-700:oklch(50.5% .213 27.518);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-700:oklch(55.4% .135 66.442);--color-green-100:oklch(96.2% .044 156.743);--color-green-500:oklch(72.3% .219 149.579);--color-green-700:oklch(52.7% .154 150.069);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-lg:32rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.static{position:static}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-16{height:calc(var(--spacing) * 16)}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-8{width:calc(var(--spacing) * 8)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[200px\]{max-width:200px}.max-w-lg{max-width:var(--container-lg)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-indigo-600{border-color:var(--color-indigo-600)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-white{background-color:var(--color-white)}.bg-yellow-100{background-color:var(--color-yellow-100)}.p-5{padding:calc(var(--spacing) * 5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.pb-1{padding-bottom:var(--spacing)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-700{color:var(--color-blue-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-indigo-600{color:var(--color-indigo-600)}.text-red-400{color:var(--color-red-400)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.text-yellow-700{color:var(--color-yellow-700)}.italic{font-style:italic}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition\!{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events!important;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--default-transition-duration))!important}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}@media (hover:hover){.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-indigo-500:focus{border-color:var(--color-indigo-500)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}@media (min-width:40rem){.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media (min-width:64rem){.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}} diff --git a/apps/frontend/dist/index.html b/apps/frontend/dist/index.html new file mode 100644 index 0000000..c53bafb --- /dev/null +++ b/apps/frontend/dist/index.html @@ -0,0 +1,14 @@ + + + + + + + bc-forge — Lockup & Vesting + + + + +
+ + diff --git a/apps/frontend/index.html b/apps/frontend/index.html new file mode 100644 index 0000000..c161938 --- /dev/null +++ b/apps/frontend/index.html @@ -0,0 +1,13 @@ + + + + + + + bc-forge — Lockup & Vesting + + +
+ + + diff --git a/apps/frontend/package-lock.json b/apps/frontend/package-lock.json new file mode 100644 index 0000000..72f60a0 --- /dev/null +++ b/apps/frontend/package-lock.json @@ -0,0 +1,2859 @@ +{ + "name": "@bc-forge/frontend", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@bc-forge/frontend", + "version": "0.1.0", + "dependencies": { + "@bc-forge/react": "file:../../react", + "@bc-forge/sdk": "file:../../sdk", + "@stellar/stellar-sdk": "^16.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.26.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "tailwindcss": "^4.0.0", + "typescript": "^5.5.0", + "vite": "^5.4.0" + } + }, + "../../react": { + "name": "@bc-forge/react", + "version": "1.0.0", + "dependencies": { + "@bc-forge/sdk": "file:../sdk" + }, + "devDependencies": { + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "tsup": "^8.0.0", + "typescript": "^5.0.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "../../sdk": { + "name": "@bc-forge/sdk", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@stellar/stellar-sdk": "^15.1.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/jest": "^30.0.0", + "@types/node": "^25.9.1", + "@typescript-eslint/eslint-plugin": "^8.60.1", + "@typescript-eslint/parser": "^8.60.1", + "eslint": "^10.4.1", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.6", + "jest": "^30.4.2", + "prettier": "^3.8.3", + "ts-jest": "^29.4.11", + "typescript": "^6.0.3", + "typescript-eslint": "^8.60.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bc-forge/react": { + "resolved": "../../react", + "link": true + }, + "node_modules/@bc-forge/sdk": { + "resolved": "../../sdk", + "link": true + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@noble/ed25519": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-3.1.0.tgz", + "integrity": "sha512-pfcObRY3CtvwfaG9Mt5XqZdKmAQppl37tHUeuBhDUbiwJBCVY4/A4lbMvb1xKhMDx96AqAqZpMWuBX1HulhX4g==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz", + "integrity": "sha512-IYqDGiTXab6FniAgnSdZwgWbomxpy9FtYvLKs7wCUs2a8RkITG+DFGO1DM9cr+E3/RgADRpFjrKVaJ1z6sjtEg==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", + "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", + "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", + "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", + "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", + "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", + "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", + "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", + "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", + "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", + "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", + "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", + "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", + "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", + "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", + "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", + "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", + "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", + "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", + "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", + "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", + "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", + "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", + "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.2", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@stellar/js-xdr": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-4.0.0.tgz", + "integrity": "sha512-+NmNa7Tk5BI5XFdy/6xGTqAN4J9a9KgCrCGhj2uEUTCBhLkch0M+QbKzNH8zEnejWe0p8w+0q5hUVX6L3OzoVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=20.0.0", + "pnpm": ">=9.0.0" + } + }, + "node_modules/@stellar/stellar-sdk": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-16.0.1.tgz", + "integrity": "sha512-bxKohaiyKVqoudRhbOOHeHhHIaeYV5Zab4rCjxhP4Ty1h1ozTLBOv8lWFnZz9ilBzXG8Bb7usQI3rlEcfvUynA==", + "license": "Apache-2.0", + "dependencies": { + "@noble/ed25519": "^3.1.0", + "@noble/hashes": "^2.2.0", + "@stellar/js-xdr": "4.0.0", + "axios": "1.16.1", + "base32.js": "^0.1.0", + "bignumber.js": "^11.1.1", + "buffer": "^6.0.3", + "commander": "^14.0.3", + "eventsource": "^4.1.0", + "feaxios": "^0.0.23", + "smol-toml": "^1.6.1", + "uint8array-extras": "^1.5.0" + }, + "bin": { + "stellar-js": "bin/stellar-js" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "5.21.6", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.1" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.1", + "@tailwindcss/oxide-darwin-arm64": "4.3.1", + "@tailwindcss/oxide-darwin-x64": "4.3.1", + "@tailwindcss/oxide-freebsd-x64": "4.3.1", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.1", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.1", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.1", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.1", + "@tailwindcss/oxide-linux-x64-musl": "4.3.1", + "@tailwindcss/oxide-wasm32-wasi": "4.3.1", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.1", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.1" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.1.tgz", + "integrity": "sha512-SVlyf61g374l5cHyg8x9kf5xmLcOaxvOTsbsqDnSsDJaKOEFZ7GCvi84VAVGpxojYOs1+3K6M0UjXfqPU8vmOQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.1.tgz", + "integrity": "sha512-hVnWLwv+e/l7c4WKyVtHVrIPvYdqWHjRB3MDIqARynzFtnQg85kmQEFCbV9Ja0VVx4xXTIiDWY60Y7iz/iNoDA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.1.tgz", + "integrity": "sha512-Cf7abu0WVgbhU7ANgPUnSAvm7nCvMweusHb8FnaHlLfv/Caq4GYaEZg7ZImzzmjx4lIAfuS8q+eLIS7A7IzxIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.1.tgz", + "integrity": "sha512-ZZqzX2Y+GXtXXfqSfpJhDm60OoZfvLHLCgm+J7NVqgHHJjG/m9ugZI77RwTsVd4fnBJuCFP6Ae6kTJb71UdS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.1.tgz", + "integrity": "sha512-/Ah/xik0LaMYfv9DZ0S/t4pBlBNYOcqtRwusjgovHkvT8ixueWCLyJjsaF5kQIckjb4IT8Q6K6p/iPmZMixYgg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.1.tgz", + "integrity": "sha512-gqdFoVJlw444GvpnheZLHmvTzSxI/cOUUh2KSNejQjTcYkW062SVD+En0rUgD+QV91bz1XGIGtt1HJd48xUGbQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.1.tgz", + "integrity": "sha512-Bwv9KwOvE0VKa86xPFif9b9c3Y1NxOV1P0gLti/IYaWEsQYZXDlxfGEtA8mdDZ7SG3wyNXAWYT5SIn3giL57oA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.1.tgz", + "integrity": "sha512-Ymi8O8T15HYQdOUWUtTI6ldN0neHP85FC+Qz32xTcZ7iJXtem/x8ITev0o1e9e5rkqj4lONZfTRLvkmin1+tKg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.1.tgz", + "integrity": "sha512-M+P/91qJ6uILLw4k2G93GMDRAXj61SMvFQYt39AqvUqYgExXpLL5aepfns7sj4HiAQeolirQF9E0lzRvdf4zPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.1.tgz", + "integrity": "sha512-zsM8uOeqvVGHsAXsJxsT28ttosFahLJKCLOTUBqRAtKnVgGSRitds9T432QiT8b77Yga7JIBkulIRRlJPtYhRA==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.10.0", + "@emnapi/runtime": "^1.10.0", + "@emnapi/wasi-threads": "^1.2.1", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.1.tgz", + "integrity": "sha512-aiNvSq9BsVk8V513lDKlrCFAgf8qBMPZTpgEhInL+NwQqs97mYmupVMrPrgBBSL8Pv/0zXu9MrMF9rMun1ZeNg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.1", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.1", + "@tailwindcss/oxide": "4.3.1", + "tailwindcss": "4.3.1" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.31", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz", + "integrity": "sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/base32.js": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.1.0.tgz", + "integrity": "sha512-n3TkB02ixgBOhTvANakDb4xaMXnYUVkNoRFJjQflcqMQhyEKxEHdj3E6N8t8sUQ0mjH/3/JxzlXuz3ul/J90pQ==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.38", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "11.1.4", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-11.1.4.tgz", + "integrity": "sha512-AJ9dSeaUGj2xu7tEwmdqb51dqdb633xo4njI9K8ZFfcLrNr0XN8/EPkkZUNaF9fkCblGt2zVwZymesUdGynEkQ==", + "license": "MIT" + }, + "node_modules/browserslist": { + "version": "4.28.4", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.38", + "caniuse-lite": "^1.0.30001799", + "electron-to-chromium": "^1.5.376", + "node-releases": "^2.0.48", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/browserslist/node_modules/electron-to-chromium": { + "version": "1.5.377", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.377.tgz", + "integrity": "sha512-cH1jZgJHoezfTnKfKwnScpHywTFVnJUNITDPREFdhNjiuD502+QFpG0Qk7G8jhsV/f+CEAFlIrzP1fT+IMb92g==", + "dev": true, + "license": "ISC" + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001799", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.21.6", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.21.5", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/esbuild/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eventsource": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-4.1.0.tgz", + "integrity": "sha512-2GuF51iuHX6A9xdTccMTsNb7VO0lHZihApxhvQzJB5A03DvHDd2FQepodbMaztPBmBcE/ox7o2gqaxGhYB9LhQ==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.0.tgz", + "integrity": "sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/feaxios": { + "version": "0.0.23", + "resolved": "https://registry.npmjs.org/feaxios/-/feaxios-0.0.23.tgz", + "integrity": "sha512-eghR0A21fvbkcQBgZuMfQhrXxJzC0GNUGC9fXhBge33D+mFDTwl0aJ35zoQQn575BhyjQitRc5N4f+L4cP708g==", + "license": "MIT", + "dependencies": { + "is-retry-allowed": "^3.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "dev": true, + "license": "ISC" + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/is-retry-allowed": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-3.0.0.tgz", + "integrity": "sha512-9xH0xvoggby+u0uGF7cZXdrutWiBiaFG8ZT4YFPXL8NzkyAwX3AKGLeFQLvzDpM430+nDFBZ1LHkie/8ocL06A==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.15", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.48", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.15", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/react": { + "version": "18.3.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-router-dom": { + "version": "6.30.4", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.3", + "react-router": "6.30.4" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/react-router-dom/node_modules/@remix-run/router": { + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.23.3.tgz", + "integrity": "sha512-4An71tdz9X8+3sI4Qqqd2LWd9vS39J7sqd9EU4Scw7TJE/qB10Flv/UuqbPVgfQV9XoK8Np6jNquZitnZq5i+Q==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/react-router-dom/node_modules/react-router": { + "version": "6.30.4", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.4.tgz", + "integrity": "sha512-SVUsDe+DybHM/WmYKIVYhZh1o5Dcuf16yM6WjG02Q9XVFMZIJyHYhwrr6bFBXZkVP6z69kNkMyBCujt8FaFLJA==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.23.3" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/rollup": { + "version": "4.62.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.62.2", + "@rollup/rollup-android-arm64": "4.62.2", + "@rollup/rollup-darwin-arm64": "4.62.2", + "@rollup/rollup-darwin-x64": "4.62.2", + "@rollup/rollup-freebsd-arm64": "4.62.2", + "@rollup/rollup-freebsd-x64": "4.62.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", + "@rollup/rollup-linux-arm-musleabihf": "4.62.2", + "@rollup/rollup-linux-arm64-gnu": "4.62.2", + "@rollup/rollup-linux-arm64-musl": "4.62.2", + "@rollup/rollup-linux-loong64-gnu": "4.62.2", + "@rollup/rollup-linux-loong64-musl": "4.62.2", + "@rollup/rollup-linux-ppc64-gnu": "4.62.2", + "@rollup/rollup-linux-ppc64-musl": "4.62.2", + "@rollup/rollup-linux-riscv64-gnu": "4.62.2", + "@rollup/rollup-linux-riscv64-musl": "4.62.2", + "@rollup/rollup-linux-s390x-gnu": "4.62.2", + "@rollup/rollup-linux-x64-gnu": "4.62.2", + "@rollup/rollup-linux-x64-musl": "4.62.2", + "@rollup/rollup-openbsd-x64": "4.62.2", + "@rollup/rollup-openharmony-arm64": "4.62.2", + "@rollup/rollup-win32-arm64-msvc": "4.62.2", + "@rollup/rollup-win32-ia32-msvc": "4.62.2", + "@rollup/rollup-win32-x64-gnu": "4.62.2", + "@rollup/rollup-win32-x64-msvc": "4.62.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup/node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", + "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/scheduler": { + "version": "0.23.2", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/smol-toml": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz", + "integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==", + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.1", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uint8array-extras": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", + "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "license": "ISC" + } + } +} diff --git a/apps/frontend/package.json b/apps/frontend/package.json new file mode 100644 index 0000000..004deef --- /dev/null +++ b/apps/frontend/package.json @@ -0,0 +1,29 @@ +{ + "name": "@bc-forge/frontend", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview", + "lint": "eslint ." + }, + "dependencies": { + "@bc-forge/react": "file:../../react", + "@bc-forge/sdk": "file:../../sdk", + "@stellar/stellar-sdk": "^16.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "react-router-dom": "^6.26.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "tailwindcss": "^4.0.0", + "typescript": "^5.5.0", + "vite": "^5.4.0" + } +} diff --git a/apps/frontend/src/App.tsx b/apps/frontend/src/App.tsx new file mode 100644 index 0000000..1a65738 --- /dev/null +++ b/apps/frontend/src/App.tsx @@ -0,0 +1,14 @@ +import { Routes, Route, Navigate } from 'react-router-dom'; +import Layout from './components/Layout'; +import VestingScheduleView from './pages/VestingScheduleView'; + +export default function App() { + return ( + + }> + } /> + } /> + + + ); +} diff --git a/apps/frontend/src/__types__/react.d.ts b/apps/frontend/src/__types__/react.d.ts new file mode 100644 index 0000000..311d092 --- /dev/null +++ b/apps/frontend/src/__types__/react.d.ts @@ -0,0 +1,48 @@ +declare module '@bc-forge/react' { + export const bcForgeProvider: any; + export const bcForgeVestingProvider: any; + + export interface bcForgeProviderProps { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + } + + export interface bcForgeVestingProviderProps { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + } + + export function useBcForgeClient(): any; + export function useBcForgeVestingClient(): any; + export function useBcForgeToken(): any; + export function useBalance(address: string | undefined): any; + export function useMint(): any; + export function useTotalSupply(): any; + export function useTransfer(): any; + export function useApprove(): any; + export function useBurn(): any; + export function useAllowance(owner: string | undefined, spender: string | undefined): any; + export function useLockedBalance(address: string | undefined): any; + export function useLockupInfo(address: string | undefined): any; + export function useLockTokens(): any; + export function useWithdrawLocked(): any; + export function useVestingSchedules(address: string | undefined): any; + export function useCreateVesting(): any; + export function useRelease(): any; + export function useRevokeVesting(): any; +} + +declare global { + namespace JSX { + interface IntrinsicElements { + bcForgeProvider: { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + }; + bcForgeVestingProvider: { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + }; + } + } +} diff --git a/apps/frontend/src/__types__/sdk.d.ts b/apps/frontend/src/__types__/sdk.d.ts new file mode 100644 index 0000000..669ade7 --- /dev/null +++ b/apps/frontend/src/__types__/sdk.d.ts @@ -0,0 +1,65 @@ +declare module '@bc-forge/sdk' { + export interface VestingSchedule { + beneficiary: string; + total_amount: bigint; + cliff_ledger: number; + end_ledger: number; + released_amount: bigint; + revocable: boolean; + } + + export interface VestingInfo { + schedule_id: number; + schedule: VestingSchedule; + start_ledger: number; + claimable_amount: bigint; + revoked: boolean; + } + + export interface TransactionResult { + success: boolean; + hash: string; + returnValue?: any; + } + + export interface VestingClientConfig { + rpcUrl: string; + networkPassphrase: string; + contractId: string; + walletAdapter?: any; + } + + export class VestingClient { + constructor(config: VestingClientConfig); + setWalletAdapter(adapter?: any): void; + connectWallet(): Promise; + disconnectWallet(): Promise; + initialize(adminAddress: string, token: string, source?: any): Promise; + createVesting(beneficiary: string, amount: bigint, cliff: number, duration: number, revocable: boolean, source?: any): Promise; + release(beneficiary: string, source?: any): Promise; + revoke(scheduleId: number, source?: any): Promise; + getVestingInfo(beneficiary: string): Promise; + getEvents(startLedger?: number): Promise; + pollEvents(cursor?: string): Promise<{ events: any[]; cursor: string }>; + } + + export interface bcForgeClientConfig { + rpcUrl: string; + networkPassphrase: string; + contractId: string; + walletAdapter?: any; + } + + export class bcForgeClient { + constructor(config: bcForgeClientConfig); + getBalance(address: string): Promise; + getTotalSupply(): Promise; + getName(): Promise; + getSymbol(): Promise; + getDecimals(): Promise; + lockTokens(user: string, amount: bigint, unlockTime: bigint, source?: any): Promise; + withdrawLocked(user: string, source?: any): Promise; + getLockedAmount(address: string): Promise; + getLockupInfo(address: string): Promise<{ amount: bigint; unlock_time: bigint } | null>; + } +} diff --git a/apps/frontend/src/components/EmptyState.tsx b/apps/frontend/src/components/EmptyState.tsx new file mode 100644 index 0000000..61e7541 --- /dev/null +++ b/apps/frontend/src/components/EmptyState.tsx @@ -0,0 +1,31 @@ +interface EmptyStateProps { + title?: string; + description?: string; +} + +export default function EmptyState({ + title = 'No vesting schedules found', + description = 'Vesting schedules for this address will appear here once created.', +}: EmptyStateProps) { + return ( +
+
+ + + +
+

{title}

+

{description}

+
+ ); +} diff --git a/apps/frontend/src/components/ErrorState.tsx b/apps/frontend/src/components/ErrorState.tsx new file mode 100644 index 0000000..fc8fbfb --- /dev/null +++ b/apps/frontend/src/components/ErrorState.tsx @@ -0,0 +1,36 @@ +interface ErrorStateProps { + message: string; + onRetry?: () => void; +} + +export default function ErrorState({ message, onRetry }: ErrorStateProps) { + return ( +
+
+ + + +
+

Something went wrong

+

{message}

+ {onRetry && ( + + )} +
+ ); +} diff --git a/apps/frontend/src/components/Layout.tsx b/apps/frontend/src/components/Layout.tsx new file mode 100644 index 0000000..06d8f5a --- /dev/null +++ b/apps/frontend/src/components/Layout.tsx @@ -0,0 +1,29 @@ +import { Outlet } from 'react-router-dom'; + +export default function Layout() { + return ( +
+
+
+
+
+ BF +
+

bc-forge

+
+ +
+
+
+ +
+
+ ); +} diff --git a/apps/frontend/src/components/LoadingSkeleton.tsx b/apps/frontend/src/components/LoadingSkeleton.tsx new file mode 100644 index 0000000..6f36a95 --- /dev/null +++ b/apps/frontend/src/components/LoadingSkeleton.tsx @@ -0,0 +1,35 @@ +interface SkeletonProps { + count?: number; +} + +function SkeletonCard() { + return ( +
+
+
+
+
+
+
+
+
+ {Array.from({ length: 4 }).map((_, i) => ( +
+
+
+
+ ))} +
+
+ ); +} + +export default function LoadingSkeleton({ count = 3 }: SkeletonProps) { + return ( +
+ {Array.from({ length: count }).map((_, i) => ( + + ))} +
+ ); +} diff --git a/apps/frontend/src/components/VestingScheduleCard.tsx b/apps/frontend/src/components/VestingScheduleCard.tsx new file mode 100644 index 0000000..0c0c18a --- /dev/null +++ b/apps/frontend/src/components/VestingScheduleCard.tsx @@ -0,0 +1,128 @@ +import type { VestingInfo } from '@bc-forge/sdk'; + +type VestingSchedule = VestingInfo; + +function formatAddress(address: string): string { + if (address.length <= 12) return address; + return `${address.slice(0, 6)}...${address.slice(-4)}`; +} + +function formatAmount(amount: bigint, decimals: number = 7): string { + const divisor = BigInt(10 ** decimals); + const whole = amount / divisor; + const fraction = amount % divisor; + const fractionStr = fraction.toString().padStart(decimals, '0').replace(/0+$/, ''); + return fractionStr ? `${whole}.${fractionStr}` : whole.toString(); +} + +function getProgressPercent(schedule: VestingSchedule['schedule'], startLedger: number, currentLedger: number): number { + if (currentLedger >= schedule.end_ledger) return 100; + if (currentLedger <= schedule.cliff_ledger) { + if (currentLedger < schedule.cliff_ledger) return 0; + if (schedule.cliff_ledger === schedule.end_ledger) return 100; + return 0; + } + const total = schedule.end_ledger - startLedger; + if (total === 0) return 100; + const elapsed = currentLedger - startLedger; + return Math.min(100, Math.round((elapsed / total) * 100)); +} + +function getStatus( + schedule: VestingSchedule['schedule'], + _startLedger: number, + currentLedger: number, + revoked: boolean, +): { label: string; color: string } { + if (revoked) return { label: 'Revoked', color: 'bg-red-100 text-red-700' }; + if (currentLedger >= schedule.end_ledger) return { label: 'Fully Vested', color: 'bg-green-100 text-green-700' }; + if (currentLedger >= schedule.cliff_ledger) return { label: 'Vesting', color: 'bg-blue-100 text-blue-700' }; + return { label: 'Cliff', color: 'bg-yellow-100 text-yellow-700' }; +} + +function getReleaseProgress(schedule: VestingSchedule['schedule']): number { + if (schedule.total_amount === 0n) return 0; + return Number((schedule.released_amount * 100n) / schedule.total_amount); +} + +interface VestingScheduleCardProps { + schedule: VestingSchedule; + currentLedger: number; + decimals?: number; +} + +export default function VestingScheduleCard({ schedule, currentLedger, decimals = 7 }: VestingScheduleCardProps) { + const status = getStatus(schedule.schedule, schedule.start_ledger, currentLedger, schedule.revoked); + const progressPct = getProgressPercent(schedule.schedule, schedule.start_ledger, currentLedger); + const releasedPct = getReleaseProgress(schedule.schedule); + + return ( +
+
+
+

+ Schedule #{schedule.schedule_id} +

+

+ {formatAddress(schedule.schedule.beneficiary)} +

+
+ + {status.label} + +
+ +
+
+

Total Amount

+

{formatAmount(schedule.schedule.total_amount, decimals)}

+
+
+

Claimable

+

{formatAmount(schedule.claimable_amount, decimals)}

+
+
+

Released

+

{formatAmount(schedule.schedule.released_amount, decimals)}

+
+
+

Revocable

+

{schedule.schedule.revocable ? 'Yes' : 'No'}

+
+
+ +
+
+
+ Vesting progress + {progressPct}% +
+
+
+
+
+ #{schedule.start_ledger} + #{schedule.schedule.cliff_ledger} + #{schedule.schedule.end_ledger} +
+
+ +
+
+ Released + {releasedPct}% +
+
+
+
+
+
+
+ ); +} diff --git a/apps/frontend/src/index.css b/apps/frontend/src/index.css new file mode 100644 index 0000000..f1d8c73 --- /dev/null +++ b/apps/frontend/src/index.css @@ -0,0 +1 @@ +@import "tailwindcss"; diff --git a/apps/frontend/src/jsx-augment.d.ts b/apps/frontend/src/jsx-augment.d.ts new file mode 100644 index 0000000..c1fc968 --- /dev/null +++ b/apps/frontend/src/jsx-augment.d.ts @@ -0,0 +1,12 @@ +declare namespace JSX { + interface IntrinsicElements { + bcForgeProvider: { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + }; + bcForgeVestingProvider: { + config: { rpcUrl: string; networkPassphrase: string; contractId: string; walletAdapter?: any }; + children: any; + }; + } +} diff --git a/apps/frontend/src/main.tsx b/apps/frontend/src/main.tsx new file mode 100644 index 0000000..9a48553 --- /dev/null +++ b/apps/frontend/src/main.tsx @@ -0,0 +1,30 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { BrowserRouter } from 'react-router-dom'; +import { bcForgeProvider, bcForgeVestingProvider } from '@bc-forge/react'; +import App from './App'; +import './index.css'; + +const tokenConfig = { + rpcUrl: import.meta.env.VITE_RPC_URL || 'https://soroban-testnet.stellar.org', + networkPassphrase: import.meta.env.VITE_NETWORK_PASSPHRASE || 'Test SDF Network ; September 2015', + contractId: import.meta.env.VITE_TOKEN_CONTRACT_ID || '', +}; + +const vestingConfig = { + rpcUrl: import.meta.env.VITE_RPC_URL || 'https://soroban-testnet.stellar.org', + networkPassphrase: import.meta.env.VITE_NETWORK_PASSPHRASE || 'Test SDF Network ; September 2015', + contractId: import.meta.env.VITE_VESTING_CONTRACT_ID || '', +}; + +createRoot(document.getElementById('root')!).render( + + + + + + + + + , +); diff --git a/apps/frontend/src/pages/VestingScheduleView.tsx b/apps/frontend/src/pages/VestingScheduleView.tsx new file mode 100644 index 0000000..99abb79 --- /dev/null +++ b/apps/frontend/src/pages/VestingScheduleView.tsx @@ -0,0 +1,121 @@ +import { useMemo } from 'react'; +import { useBcForgeToken, useVestingSchedules } from '@bc-forge/react'; +import VestingScheduleCard from '../components/VestingScheduleCard'; +import LoadingSkeleton from '../components/LoadingSkeleton'; +import EmptyState from '../components/EmptyState'; +import ErrorState from '../components/ErrorState'; +import type { VestingInfo } from '@bc-forge/sdk'; + +function useCurrentLedger(): number { + return useMemo(() => Math.floor(Date.now() / 5000) + 50000, []); +} + +export default function VestingScheduleView() { + const { data: tokenInfo, loading: tokenLoading } = useBcForgeToken(); + const beneficiary = useMemo(() => { + if (typeof window !== 'undefined') { + const params = new URLSearchParams(window.location.search); + return params.get('address') || ''; + } + return ''; + }, []); + + const { + data: schedules, + loading, + error, + refetch, + } = useVestingSchedules(beneficiary || undefined); + + const currentLedger = useCurrentLedger(); + const decimals = tokenInfo?.decimals ?? 7; + + return ( +
+
+

Lockup & Vesting Schedule

+

+ View all vesting schedules and lockup details for a beneficiary address. +

+
+ +
+ +
+ { + if (e.key === 'Enter') { + const url = new URL(window.location.href); + url.searchParams.set('address', (e.target as HTMLInputElement).value); + window.location.search = url.searchParams.toString(); + } + }} + /> + +
+
+ + {!beneficiary && !loading && ( + + )} + + {beneficiary && loading && } + + {beneficiary && error && !loading && ( + + )} + + {beneficiary && !loading && !error && schedules && schedules.length === 0 && ( + + )} + + {beneficiary && !loading && !error && schedules && schedules.length > 0 && ( + <> +
+

+ {schedules.length} schedule{schedules.length !== 1 ? 's' : ''} found +

+ {tokenLoading && ( + Loading token info... + )} +
+
+ {schedules.map((schedule: VestingInfo) => ( + + ))} +
+ + )} +
+ ); +} diff --git a/apps/frontend/src/vite-env.d.ts b/apps/frontend/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/apps/frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/apps/frontend/tsconfig.json b/apps/frontend/tsconfig.json new file mode 100644 index 0000000..b9d8a4c --- /dev/null +++ b/apps/frontend/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "auto", + "noEmit": true, + "jsx": "react-jsx", + "strict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src"] +} diff --git a/apps/frontend/vercel.json b/apps/frontend/vercel.json new file mode 100644 index 0000000..29548a1 --- /dev/null +++ b/apps/frontend/vercel.json @@ -0,0 +1,9 @@ +{ + "framework": "vite", + "buildCommand": "npm run build", + "outputDirectory": "dist", + "installCommand": "npm install", + "rewrites": [ + { "source": "/(.*)", "destination": "/index.html" } + ] +} diff --git a/apps/frontend/vite.config.ts b/apps/frontend/vite.config.ts new file mode 100644 index 0000000..732109d --- /dev/null +++ b/apps/frontend/vite.config.ts @@ -0,0 +1,31 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import tailwindcss from '@tailwindcss/vite'; +import path from 'path'; + +const sdkDir = path.resolve(__dirname, '../../sdk').replace(/\\/g, '/'); +const reactDir = path.resolve(__dirname, '../../react').replace(/\\/g, '/'); + +export default defineConfig({ + plugins: [ + react(), + tailwindcss(), + { + name: 'fix-stellar-sdk-imports', + enforce: 'pre', + transform(code, id) { + const normalizedId = id.replace(/\\/g, '/'); + if (normalizedId.startsWith(sdkDir) || normalizedId.startsWith(reactDir)) { + return code.replace(/\bSorobanRpc\b/g, 'rpc'); + } + return null; + }, + }, + ], + resolve: { + alias: { + '@bc-forge/sdk': path.resolve(__dirname, '../../sdk/src'), + '@bc-forge/react': path.resolve(__dirname, '../../react/src'), + }, + }, +}); diff --git a/react/package-lock.json b/react/package-lock.json new file mode 100644 index 0000000..30693ce --- /dev/null +++ b/react/package-lock.json @@ -0,0 +1,1644 @@ +{ + "name": "@bc-forge/react", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@bc-forge/react", + "version": "1.0.0", + "dependencies": { + "@bc-forge/sdk": "file:../sdk" + }, + "devDependencies": { + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "tsup": "^8.0.0", + "typescript": "^5.0.0" + }, + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "../sdk": { + "name": "@bc-forge/sdk", + "version": "0.1.0", + "license": "MIT", + "dependencies": { + "@stellar/stellar-sdk": "^15.1.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/jest": "^30.0.0", + "@types/node": "^25.9.1", + "@typescript-eslint/eslint-plugin": "^8.60.1", + "@typescript-eslint/parser": "^8.60.1", + "eslint": "^10.4.1", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.6", + "jest": "^30.4.2", + "prettier": "^3.8.3", + "ts-jest": "^29.4.11", + "typescript": "^6.0.3", + "typescript-eslint": "^8.60.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@bc-forge/sdk": { + "resolved": "../sdk", + "link": true + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", + "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", + "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", + "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", + "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", + "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", + "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", + "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", + "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", + "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", + "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", + "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", + "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", + "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", + "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", + "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", + "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", + "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", + "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", + "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", + "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", + "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", + "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", + "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", + "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", + "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.31", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", + "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/acorn": { + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.17.0.tgz", + "integrity": "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/esbuild": { + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mlly": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", + "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.16.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.3" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/rollup": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", + "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.62.2", + "@rollup/rollup-android-arm64": "4.62.2", + "@rollup/rollup-darwin-arm64": "4.62.2", + "@rollup/rollup-darwin-x64": "4.62.2", + "@rollup/rollup-freebsd-arm64": "4.62.2", + "@rollup/rollup-freebsd-x64": "4.62.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", + "@rollup/rollup-linux-arm-musleabihf": "4.62.2", + "@rollup/rollup-linux-arm64-gnu": "4.62.2", + "@rollup/rollup-linux-arm64-musl": "4.62.2", + "@rollup/rollup-linux-loong64-gnu": "4.62.2", + "@rollup/rollup-linux-loong64-musl": "4.62.2", + "@rollup/rollup-linux-ppc64-gnu": "4.62.2", + "@rollup/rollup-linux-ppc64-musl": "4.62.2", + "@rollup/rollup-linux-riscv64-gnu": "4.62.2", + "@rollup/rollup-linux-riscv64-musl": "4.62.2", + "@rollup/rollup-linux-s390x-gnu": "4.62.2", + "@rollup/rollup-linux-x64-gnu": "4.62.2", + "@rollup/rollup-linux-x64-musl": "4.62.2", + "@rollup/rollup-openbsd-x64": "4.62.2", + "@rollup/rollup-openharmony-arm64": "4.62.2", + "@rollup/rollup-win32-arm64-msvc": "4.62.2", + "@rollup/rollup-win32-ia32-msvc": "4.62.2", + "@rollup/rollup-win32-x64-gnu": "4.62.2", + "@rollup/rollup-win32-x64-msvc": "4.62.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/ufo": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", + "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/react/src/context.tsx b/react/src/context.tsx index d9f782e..1a0d88b 100644 --- a/react/src/context.tsx +++ b/react/src/context.tsx @@ -1,17 +1,27 @@ import React, { createContext, useContext, useMemo, ReactNode } from 'react'; -import { bcForgeClient, bcForgeClientConfig } from '@bc-forge/sdk'; +import { bcForgeClient, bcForgeClientConfig, VestingClient, VestingClientConfig } from '@bc-forge/sdk'; interface bcForgeContextType { client: bcForgeClient | null; } +interface bcForgeVestingContextType { + client: VestingClient | null; +} + const bcForgeContext = createContext({ client: null }); +const bcForgeVestingContext = createContext({ client: null }); export interface bcForgeProviderProps { config: bcForgeClientConfig; children: ReactNode; } +export interface bcForgeVestingProviderProps { + config: VestingClientConfig; + children: ReactNode; +} + export const bcForgeProvider: React.FC = ({ config, children }) => { const client = useMemo(() => new bcForgeClient(config), [config.rpcUrl, config.networkPassphrase, config.contractId]); @@ -22,6 +32,16 @@ export const bcForgeProvider: React.FC = ({ config, childr ); }; +export const bcForgeVestingProvider: React.FC = ({ config, children }) => { + const client = useMemo(() => new VestingClient(config), [config.rpcUrl, config.networkPassphrase, config.contractId]); + + return ( + + {children} + + ); +}; + export const useBcForgeClient = () => { const context = useContext(bcForgeContext); if (!context.client) { @@ -29,3 +49,11 @@ export const useBcForgeClient = () => { } return context.client; }; + +export const useBcForgeVestingClient = () => { + const context = useContext(bcForgeVestingContext); + if (!context.client) { + throw new Error('useBcForgeVestingClient must be used within a bcForgeVestingProvider'); + } + return context.client; +}; diff --git a/react/src/hooks.ts b/react/src/hooks.ts index 31f2740..dbe81e1 100644 --- a/react/src/hooks.ts +++ b/react/src/hooks.ts @@ -1,5 +1,5 @@ import { useState, useEffect, useCallback } from 'react'; -import { useBcForgeClient } from './context'; +import { useBcForgeClient, useBcForgeVestingClient } from './context'; import { Keypair } from '@stellar/stellar-sdk'; /** @@ -222,3 +222,227 @@ export function useAllowance(owner: string | undefined, spender: string | undefi return { data, loading, error, refetch: fetchAllowance }; } + +// ─── Lockup Hooks ───────────────────────────────────────────────────────────── + +/** + * Hook to fetch the locked token balance for an address. + */ +export function useLockedBalance(address: string | undefined) { + const client = useBcForgeClient(); + const [data, setData] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const fetchLocked = useCallback(async () => { + if (!address) return; + try { + setLoading(true); + const amount = await client.getLockedAmount(address); + setData(amount); + } catch (err) { + setError(err instanceof Error ? err : new Error(String(err))); + } finally { + setLoading(false); + } + }, [client, address]); + + useEffect(() => { + fetchLocked(); + }, [fetchLocked]); + + return { data, loading, error, refetch: fetchLocked }; +} + +/** + * Hook to fetch the full lockup info (amount + unlock_time) for an address. + */ +export function useLockupInfo(address: string | undefined) { + const client = useBcForgeClient(); + const [data, setData] = useState<{ amount: bigint; unlock_time: bigint } | null>(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const fetchInfo = useCallback(async () => { + if (!address) return; + try { + setLoading(true); + const info = await client.getLockupInfo(address); + setData(info); + } catch (err) { + setError(err instanceof Error ? err : new Error(String(err))); + } finally { + setLoading(false); + } + }, [client, address]); + + useEffect(() => { + fetchInfo(); + }, [fetchInfo]); + + return { data, loading, error, refetch: fetchInfo }; +} + +/** + * Hook to perform lock token operations. + */ +export function useLockTokens() { + const client = useBcForgeClient(); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const lock = useCallback(async (user: string, amount: bigint, unlockTime: bigint, source: Keypair) => { + try { + setLoading(true); + setError(null); + const result = await client.lockTokens(user, amount, unlockTime, source); + return result; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)); + setError(error); + throw error; + } finally { + setLoading(false); + } + }, [client]); + + return { lock, loading, error }; +} + +/** + * Hook to withdraw matured locked tokens. + */ +export function useWithdrawLocked() { + const client = useBcForgeClient(); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const withdraw = useCallback(async (user: string, source: Keypair) => { + try { + setLoading(true); + setError(null); + const result = await client.withdrawLocked(user, source); + return result; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)); + setError(error); + throw error; + } finally { + setLoading(false); + } + }, [client]); + + return { withdraw, loading, error }; +} + +// ─── Vesting Hooks ──────────────────────────────────────────────────────────── + +/** + * Hook to fetch vesting schedules for a beneficiary address. + */ +export function useVestingSchedules(address: string | undefined) { + const client = useBcForgeVestingClient(); + const [data, setData] = useState(null); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const fetchSchedules = useCallback(async () => { + if (!address) return; + try { + setLoading(true); + const schedules = await client.getVestingInfo(address); + setData(schedules); + } catch (err) { + setError(err instanceof Error ? err : new Error(String(err))); + } finally { + setLoading(false); + } + }, [client, address]); + + useEffect(() => { + fetchSchedules(); + }, [fetchSchedules]); + + return { data, loading, error, refetch: fetchSchedules }; +} + +/** + * Hook to create a new vesting schedule. + */ +export function useCreateVesting() { + const client = useBcForgeVestingClient(); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const create = useCallback( + async (beneficiary: string, amount: bigint, cliff: number, duration: number, revocable: boolean, source: Keypair) => { + try { + setLoading(true); + setError(null); + const result = await client.createVesting(beneficiary, amount, cliff, duration, revocable, source); + return result; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)); + setError(error); + throw error; + } finally { + setLoading(false); + } + }, + [client], + ); + + return { create, loading, error }; +} + +/** + * Hook to release vested tokens for a beneficiary. + */ +export function useRelease() { + const client = useBcForgeVestingClient(); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const release = useCallback(async (beneficiary: string, source: Keypair) => { + try { + setLoading(true); + setError(null); + const result = await client.release(beneficiary, source); + return result; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)); + setError(error); + throw error; + } finally { + setLoading(false); + } + }, [client]); + + return { release, loading, error }; +} + +/** + * Hook to revoke a vesting schedule. + */ +export function useRevokeVesting() { + const client = useBcForgeVestingClient(); + const [loading, setLoading] = useState(false); + const [error, setError] = useState(null); + + const revoke = useCallback(async (scheduleId: number, source: Keypair) => { + try { + setLoading(true); + setError(null); + const result = await client.revoke(scheduleId, source); + return result; + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)); + setError(error); + throw error; + } finally { + setLoading(false); + } + }, [client]); + + return { revoke, loading, error }; +} diff --git a/react/src/index.ts b/react/src/index.ts index 472021f..a76bd23 100644 --- a/react/src/index.ts +++ b/react/src/index.ts @@ -1,2 +1,25 @@ -export * from './context'; -export * from './hooks'; +export { + bcForgeProvider, + bcForgeVestingProvider, + useBcForgeClient, + useBcForgeVestingClient, +} from './context'; +export type { bcForgeProviderProps, bcForgeVestingProviderProps } from './context'; +export { + useBcForgeToken, + useBalance, + useMint, + useTotalSupply, + useTransfer, + useApprove, + useBurn, + useAllowance, + useLockedBalance, + useLockupInfo, + useLockTokens, + useWithdrawLocked, + useVestingSchedules, + useCreateVesting, + useRelease, + useRevokeVesting, +} from './hooks'; diff --git a/sdk/src/client.ts b/sdk/src/client.ts index 1f8f507..0c218b9 100644 --- a/sdk/src/client.ts +++ b/sdk/src/client.ts @@ -914,6 +914,37 @@ export class bcForgeClient { return this.invokeContract('withdraw_locked', [addressToScVal(user)], source); } + /** + * Query the locked token balance for a user. + * Returns 0 if no lock exists. + */ + async getLockedAmount(address: string): Promise { + try { + const result = await this.queryContract('get_locked_amount', [addressToScVal(address)]); + return BigInt(scValToNative(result)); + } catch { + return 0n; + } + } + + /** + * Query the full lockup info (amount + unlock time) for a user. + * Returns null if no lock exists. + */ + async getLockupInfo(address: string): Promise<{ amount: bigint; unlock_time: bigint } | null> { + try { + const result = await this.queryContract('read_lockup', [addressToScVal(address)]); + const raw = scValToNative(result); + if (!raw) return null; + return { + amount: BigInt(raw.amount), + unlock_time: BigInt(raw.unlock_time), + }; + } catch { + return null; + } + } + // ─── Events ────────────────────────────────────────────────────────────── /** diff --git a/sdk/src/index.ts b/sdk/src/index.ts index 91ed873..c10ee7d 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -20,6 +20,8 @@ export { bcForgeClient, Role } from './client'; export type { BatchMintRecipient, bcForgeClientConfig, TransactionResult } from './client'; +export { VestingClient } from './vestingClient'; +export type { VestingClientConfig, VestingSchedule, VestingInfo } from './vestingClient'; export { buildInvokeTransaction, submitTransaction, scValToNative } from './utils'; export { bcForgeEventType, decodeEvent, decodeDiagnosticEvent, subscribeEvents } from './events'; export type { bcForgeEvent, SubscriptionOptions } from './events'; diff --git a/sdk/src/vestingClient.ts b/sdk/src/vestingClient.ts new file mode 100644 index 0000000..0aa6c61 --- /dev/null +++ b/sdk/src/vestingClient.ts @@ -0,0 +1,281 @@ +import { + SorobanRpc, + Contract, + TransactionBuilder, + Keypair, + xdr, + nativeToScVal, +} from '@stellar/stellar-sdk'; + +import { + buildInvokeTransaction, + submitTransaction, + addressToScVal, + i128ToScVal, + u32ToScVal, + scValToNative, + buildUnsignedTransaction, +} from './utils'; + +import { SimulationError, RPCError } from './errors'; +import type { WalletAdapter } from './walletAdapter'; + +export interface VestingClientConfig { + rpcUrl: string; + networkPassphrase: string; + contractId: string; + walletAdapter?: WalletAdapter; +} + +export interface TransactionResult { + success: boolean; + hash: string; + returnValue?: any; +} + +export interface VestingSchedule { + beneficiary: string; + total_amount: bigint; + cliff_ledger: number; + end_ledger: number; + released_amount: bigint; + revocable: boolean; +} + +export interface VestingInfo { + schedule_id: number; + schedule: VestingSchedule; + start_ledger: number; + claimable_amount: bigint; + revoked: boolean; +} + +export class VestingClient { + private rpcUrl: string; + private networkPassphrase: string; + private contractId: string; + private server: SorobanRpc.Server; + private contract: Contract; + private walletAdapter?: WalletAdapter; + + constructor(config: VestingClientConfig) { + this.rpcUrl = config.rpcUrl; + this.networkPassphrase = config.networkPassphrase; + this.contractId = config.contractId; + this.server = new SorobanRpc.Server(this.rpcUrl); + this.contract = new Contract(this.contractId); + this.walletAdapter = config.walletAdapter; + } + + setWalletAdapter(adapter?: WalletAdapter) { + this.walletAdapter = adapter; + } + + async connectWallet(): Promise { + if (!this.walletAdapter) throw new Error('No wallet adapter configured'); + await this.walletAdapter.connect(); + return this.walletAdapter.publicKey; + } + + async disconnectWallet(): Promise { + if (!this.walletAdapter) return; + await this.walletAdapter.disconnect(); + } + + async initialize(adminAddress: string, token: string, source?: Keypair): Promise { + return this.invokeContract( + 'initialize', + [addressToScVal(adminAddress), addressToScVal(token)], + source, + ); + } + + async createVesting( + beneficiary: string, + amount: bigint, + cliff: number, + duration: number, + revocable: boolean, + source?: Keypair, + ): Promise { + return this.invokeContract( + 'create_vesting', + [ + addressToScVal(beneficiary), + i128ToScVal(amount), + u32ToScVal(cliff), + u32ToScVal(duration), + nativeToScVal(revocable), + ], + source, + ); + } + + async release(beneficiary: string, source?: Keypair): Promise { + return this.invokeContract('release', [addressToScVal(beneficiary)], source); + } + + async revoke(scheduleId: number, source?: Keypair): Promise { + return this.invokeContract( + 'revoke', + [nativeToScVal(scheduleId, { type: 'u64' })], + source, + ); + } + + async getVestingInfo(beneficiary: string): Promise { + const result = await this.queryContract('get_vesting_info', [addressToScVal(beneficiary)]); + const raw = scValToNative(result) as any[]; + return raw.map((item: any) => ({ + schedule_id: Number(item.schedule_id), + schedule: { + beneficiary: item.schedule.beneficiary, + total_amount: BigInt(item.schedule.total_amount), + cliff_ledger: Number(item.schedule.cliff_ledger), + end_ledger: Number(item.schedule.end_ledger), + released_amount: BigInt(item.schedule.released_amount), + revocable: Boolean(item.schedule.revocable), + }, + start_ledger: Number(item.start_ledger), + claimable_amount: BigInt(item.claimable_amount), + revoked: Boolean(item.revoked), + })); + } + + async getEvents(startLedger?: number): Promise { + const response = await this.server.getEvents({ + startLedger: startLedger || (await this.server.getLatestLedger()).sequence - 1000, + filters: [{ contractIds: [this.contractId], type: 'contract' }], + }); + return response.events; + } + + async pollEvents(cursor?: string): Promise<{ events: any[]; cursor: string }> { + const response = await this.server.getEvents({ + cursor, + filters: [{ contractIds: [this.contractId], type: 'contract' }], + }); + return { + events: response.events, + cursor: response.cursor, + }; + } + + private async withRetry(fn: () => Promise, retries: number = 3): Promise { + let lastError: any; + for (let i = 0; i < retries; i++) { + try { + return await fn(); + } catch (error) { + lastError = error; + if (i < retries - 1) { + await new Promise((resolve) => setTimeout(resolve, 1000 * (i + 1))); + } + } + } + throw lastError; + } + + private async queryContract(method: string, args: xdr.ScVal[]): Promise { + return this.withRetry(async () => { + try { + const account = new (await import('@stellar/stellar-sdk')).Account( + 'GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF', + '0', + ); + + const tx = new TransactionBuilder(account, { + fee: '100', + networkPassphrase: this.networkPassphrase, + }) + .addOperation(this.contract.call(method, ...args)) + .setTimeout(30) + .build(); + + const simulated = await this.server.simulateTransaction(tx); + + if (SorobanRpc.Api.isSimulationError(simulated)) { + throw new SimulationError(`Query failed: ${simulated.error}`, simulated.error); + } + + if (!SorobanRpc.Api.isSimulationSuccess(simulated) || !simulated.result) { + throw new SimulationError('Query returned no result'); + } + + return simulated.result.retval; + } catch (error: any) { + if (error instanceof SimulationError) throw error; + throw new RPCError('RPC call failed', error); + } + }); + } + + private async invokeContract( + method: string, + args: xdr.ScVal[], + source?: Keypair, + ): Promise { + return this.withRetry(async () => { + try { + if (source) { + const txXdr = await buildInvokeTransaction( + this.rpcUrl, + this.networkPassphrase, + this.contractId, + method, + args, + source, + ); + + const response = await submitTransaction(this.rpcUrl, txXdr); + + if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + return { + success: true, + hash: (response as any).hash, + returnValue: response.returnValue ? scValToNative(response.returnValue) : undefined, + }; + } + + return { + success: false, + hash: (response as any).hash, + }; + } + + if (!this.walletAdapter) throw new Error('No signing source provided'); + if (!this.walletAdapter.connected || !this.walletAdapter.publicKey) + throw new Error('Wallet adapter not connected'); + + const unsignedXdr = await buildUnsignedTransaction( + this.rpcUrl, + this.networkPassphrase, + this.contractId, + method, + args, + this.walletAdapter.publicKey, + ); + + const signedXdr = await this.walletAdapter.signTransaction(unsignedXdr); + + const response = await submitTransaction(this.rpcUrl, signedXdr); + + if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + return { + success: true, + hash: (response as any).hash, + returnValue: response.returnValue ? scValToNative(response.returnValue) : undefined, + }; + } + + return { + success: false, + hash: (response as any).hash, + }; + } catch (error: any) { + if (error instanceof SimulationError) throw error; + throw error; + } + }); + } +} From a580e3f51527df2086fe7a326ca6c56cb5e017d9 Mon Sep 17 00:00:00 2001 From: Caesarr Date: Thu, 25 Jun 2026 06:20:29 +0100 Subject: [PATCH 2/2] Fixed ci isues --- .github/workflows/ci.yml | 43 ------------------------- contracts/token/src/reentrancy_guard.rs | 2 +- indexer/src/indexer.ts | 6 ++-- sdk/jest.config.js | 3 ++ sdk/src/client.ts | 20 ++++++------ sdk/src/events.ts | 8 ++--- sdk/src/utils.ts | 30 ++++++++--------- sdk/src/vestingClient.ts | 16 ++++----- sdk/src/wrapperClient.ts | 12 +++---- sdk/tsconfig.json | 7 ++-- sdk/tsconfig.test.json | 8 +++++ 11 files changed, 63 insertions(+), 92 deletions(-) create mode 100644 sdk/tsconfig.test.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 224145e..c35b414 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,46 +1,3 @@ -name: CI - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - test: - name: Rust tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Rust - uses: actions/setup-rust@v1 - with: - rust-version: stable - - - name: Cache Cargo registry, git index and target - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- - - - name: Show rustc and cargo versions - run: | - rustc --version - cargo --version - - - name: Run tests (workspace) - run: | - # run the token tests first to get focused feedback - cargo test -p bc-forge-token --verbose - # then run the rest of the workspace tests - cargo test --workspace --quiet name: bc-forge CI on: diff --git a/contracts/token/src/reentrancy_guard.rs b/contracts/token/src/reentrancy_guard.rs index 43dc909..6265253 100644 --- a/contracts/token/src/reentrancy_guard.rs +++ b/contracts/token/src/reentrancy_guard.rs @@ -81,7 +81,7 @@ macro_rules! reentrancy_guard { let guard = $crate::reentrancy_guard::ReentrancyGuard::new(soroban_sdk::Symbol::new($env, $key)); guard.require_not_entered($env); - let result = (|| $body)(); + let result = { $body }; guard.exit($env); result }}; diff --git a/indexer/src/indexer.ts b/indexer/src/indexer.ts index 4073e28..0b21cf3 100644 --- a/indexer/src/indexer.ts +++ b/indexer/src/indexer.ts @@ -1,4 +1,4 @@ -import { SorobanRpc, xdr, scValToNative } from '@stellar/stellar-sdk'; +import { Soroban, xdr, scValToNative } from '@stellar/stellar-sdk'; import { PrismaClient } from '@prisma/client'; import dotenv from 'dotenv'; @@ -13,7 +13,7 @@ if (!CONTRACT_ID) { throw new Error('CONTRACT_ID environment variable is required'); } -const server = new SorobanRpc.Server(RPC_URL); +const server = new Soroban.Server(RPC_URL); /** * Main indexer loop to fetch and process Soroban events. @@ -71,7 +71,7 @@ export async function runIndexer() { } } -async function processEvent(event: SorobanRpc.Api.RawEventResponse) { +async function processEvent(event: Soroban.Api.RawEventResponse) { const topic = scValToNative(event.topic[0]); const data = event.value; diff --git a/sdk/jest.config.js b/sdk/jest.config.js index 50c59e4..85a7997 100644 --- a/sdk/jest.config.js +++ b/sdk/jest.config.js @@ -2,4 +2,7 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', testMatch: ['**/*.test.ts'], + transform: { + '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }], + }, }; diff --git a/sdk/src/client.ts b/sdk/src/client.ts index 0c218b9..e25f37c 100644 --- a/sdk/src/client.ts +++ b/sdk/src/client.ts @@ -6,7 +6,7 @@ */ import { - SorobanRpc, + rpc, Contract, TransactionBuilder, Keypair, @@ -72,7 +72,7 @@ export class bcForgeClient { private rpcUrl: string; private networkPassphrase: string; private contractId: string; - private server: SorobanRpc.Server; + private server: rpc.Server; private contract: Contract; private walletAdapter?: WalletAdapter; @@ -80,7 +80,7 @@ export class bcForgeClient { this.rpcUrl = config.rpcUrl; this.networkPassphrase = config.networkPassphrase; this.contractId = config.contractId; - this.server = new SorobanRpc.Server(this.rpcUrl); + this.server = new rpc.Server(this.rpcUrl); this.contract = new Contract(this.contractId); this.walletAdapter = config.walletAdapter; } @@ -715,13 +715,13 @@ export class bcForgeClient { * @param txXdr - Transaction XDR string to simulate * @returns Simulation result with estimated resources, fees, and potential return value */ - async simulateTx(txXdr: string): Promise { + async simulateTx(txXdr: string): Promise { return this.withRetry(async () => { try { const tx = TransactionBuilder.fromXDR(txXdr, this.networkPassphrase); const simulated = await this.server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new SimulationError(`Simulation failed: ${simulated.error}`, simulated.error); } @@ -966,7 +966,7 @@ export class bcForgeClient { */ async pollEvents(cursor?: string): Promise<{ events: any[]; cursor: string }> { const response = await this.server.getEvents({ - cursor, + cursor: cursor ?? '', filters: [{ contractIds: [this.contractId], type: 'contract' }], }); return { @@ -1028,11 +1028,11 @@ export class bcForgeClient { const simulated = await this.server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new SimulationError(`Query failed: ${simulated.error}`, simulated.error); } - if (!SorobanRpc.Api.isSimulationSuccess(simulated) || !simulated.result) { + if (!rpc.Api.isSimulationSuccess(simulated) || !simulated.result) { throw new SimulationError('Query returned no result'); } @@ -1067,7 +1067,7 @@ export class bcForgeClient { const response = await submitTransaction(this.rpcUrl, txXdr); - if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + if (response.status === rpc.Api.GetTransactionStatus.SUCCESS) { return { success: true, hash: (response as any).hash, @@ -1099,7 +1099,7 @@ export class bcForgeClient { const response = await submitTransaction(this.rpcUrl, signedXdr); - if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + if (response.status === rpc.Api.GetTransactionStatus.SUCCESS) { return { success: true, hash: (response as any).hash, diff --git a/sdk/src/events.ts b/sdk/src/events.ts index 7aa47a0..d7e323b 100644 --- a/sdk/src/events.ts +++ b/sdk/src/events.ts @@ -2,7 +2,7 @@ * @bc-forge/sdk — Event parsing and real-time subscription support. */ -import { xdr, scValToNative, SorobanRpc } from '@stellar/stellar-sdk'; +import { xdr, scValToNative, rpc } from '@stellar/stellar-sdk'; /** * Enumeration of all supported bc-forge contract events. @@ -43,7 +43,7 @@ export interface SubscriptionOptions { /** * Decodes a standard Soroban RPC event into a native bcForgeEvent. */ -export function decodeEvent(event: SorobanRpc.Api.EventResponse): bcForgeEvent | null { +export function decodeEvent(event: rpc.Api.EventResponse): bcForgeEvent | null { if (!event.topic || event.topic.length === 0) return null; try { @@ -83,7 +83,7 @@ export function decodeDiagnosticEvent(rawEvent: xdr.DiagnosticEvent): bcForgeEve return { type, ledger: 0, // Diagnostic events don't always carry ledger sequence - contractId: event.contractId()?.toString('hex') || '', + contractId: event.contractId()?.toString() ?? '', data: scValToNative(body.data()), }; } catch { @@ -106,7 +106,7 @@ export async function subscribeEvents( callback: (event: bcForgeEvent) => void, options: SubscriptionOptions = {}, ): Promise<() => void> { - const server = new SorobanRpc.Server(rpcUrl); + const server = new rpc.Server(rpcUrl); // Default to starting from the latest ledger if not specified let lastLedger = options.startLedger; diff --git a/sdk/src/utils.ts b/sdk/src/utils.ts index 404686a..20a3691 100644 --- a/sdk/src/utils.ts +++ b/sdk/src/utils.ts @@ -3,7 +3,7 @@ */ import { - SorobanRpc, + rpc, TransactionBuilder, Networks, xdr, @@ -36,7 +36,7 @@ export async function buildInvokeTransaction( args: xdr.ScVal[], sourceKeypair: Keypair, ): Promise { - const server = new SorobanRpc.Server(rpcUrl); + const server = new rpc.Server(rpcUrl); const sourceAccount = await server.getAccount(sourceKeypair.publicKey()); const contract = new Contract(contractId); @@ -52,11 +52,11 @@ export async function buildInvokeTransaction( // Simulate to get the assembled transaction const simulated = await server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new SimulationError('Contract simulation failed', simulated.error); } - const assembled = SorobanRpc.assembleTransaction(tx, simulated).build(); + const assembled = rpc.assembleTransaction(tx, simulated).build(); assembled.sign(sourceKeypair); return assembled.toXDR(); @@ -72,8 +72,8 @@ export async function buildInvokeTransaction( export async function submitTransaction( rpcUrl: string, txXdr: string, -): Promise { - const server = new SorobanRpc.Server(rpcUrl); +): Promise { + const server = new rpc.Server(rpcUrl); const tx = TransactionBuilder.fromXDR(txXdr, Networks.TESTNET); const sendResponse = await server.sendTransaction(tx); @@ -85,7 +85,7 @@ export async function submitTransaction( } // Poll for completion - let getResponse: SorobanRpc.Api.GetTransactionResponse; + let getResponse: rpc.Api.GetTransactionResponse; let attempts = 0; const maxAttempts = 30; @@ -94,11 +94,11 @@ export async function submitTransaction( getResponse = await server.getTransaction(sendResponse.hash); attempts++; } while ( - getResponse.status === SorobanRpc.Api.GetTransactionStatus.NOT_FOUND && + getResponse.status === rpc.Api.GetTransactionStatus.NOT_FOUND && attempts < maxAttempts ); - if (getResponse.status === SorobanRpc.Api.GetTransactionStatus.NOT_FOUND) { + if (getResponse.status === rpc.Api.GetTransactionStatus.NOT_FOUND) { throw new TransactionTimeoutError( 'Transaction not found after maximum polling attempts', sendResponse.hash, @@ -162,7 +162,7 @@ export async function buildUnsignedTransaction( args: xdr.ScVal[], sourcePublicKey: string, ): Promise { - const server = new SorobanRpc.Server(rpcUrl); + const server = new rpc.Server(rpcUrl); const sourceAccount = await server.getAccount(sourcePublicKey); const contract = new Contract(contractId); @@ -178,11 +178,11 @@ export async function buildUnsignedTransaction( // Simulate to get the assembled transaction const simulated = await server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new Error(`Simulation failed: ${simulated.error}`); } - const assembled = SorobanRpc.assembleTransaction(tx, simulated).build(); + const assembled = rpc.assembleTransaction(tx, simulated).build(); // Return unsigned transaction return assembled.toXDR(); @@ -224,8 +224,8 @@ export async function simulateTransaction( method: string, args: xdr.ScVal[], sourcePublicKey: string, -): Promise { - const server = new SorobanRpc.Server(rpcUrl); +): Promise { + const server = new rpc.Server(rpcUrl); // Create a dummy account for simulation const account = new Account(sourcePublicKey, '0'); @@ -242,7 +242,7 @@ export async function simulateTransaction( const simulated = await server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new Error(`Simulation failed: ${simulated.error}`); } diff --git a/sdk/src/vestingClient.ts b/sdk/src/vestingClient.ts index 0aa6c61..75ad875 100644 --- a/sdk/src/vestingClient.ts +++ b/sdk/src/vestingClient.ts @@ -1,5 +1,5 @@ import { - SorobanRpc, + rpc, Contract, TransactionBuilder, Keypair, @@ -54,7 +54,7 @@ export class VestingClient { private rpcUrl: string; private networkPassphrase: string; private contractId: string; - private server: SorobanRpc.Server; + private server: rpc.Server; private contract: Contract; private walletAdapter?: WalletAdapter; @@ -62,7 +62,7 @@ export class VestingClient { this.rpcUrl = config.rpcUrl; this.networkPassphrase = config.networkPassphrase; this.contractId = config.contractId; - this.server = new SorobanRpc.Server(this.rpcUrl); + this.server = new rpc.Server(this.rpcUrl); this.contract = new Contract(this.contractId); this.walletAdapter = config.walletAdapter; } @@ -152,7 +152,7 @@ export class VestingClient { async pollEvents(cursor?: string): Promise<{ events: any[]; cursor: string }> { const response = await this.server.getEvents({ - cursor, + cursor: cursor ?? '', filters: [{ contractIds: [this.contractId], type: 'contract' }], }); return { @@ -194,11 +194,11 @@ export class VestingClient { const simulated = await this.server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new SimulationError(`Query failed: ${simulated.error}`, simulated.error); } - if (!SorobanRpc.Api.isSimulationSuccess(simulated) || !simulated.result) { + if (!rpc.Api.isSimulationSuccess(simulated) || !simulated.result) { throw new SimulationError('Query returned no result'); } @@ -229,7 +229,7 @@ export class VestingClient { const response = await submitTransaction(this.rpcUrl, txXdr); - if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + if (response.status === rpc.Api.GetTransactionStatus.SUCCESS) { return { success: true, hash: (response as any).hash, @@ -260,7 +260,7 @@ export class VestingClient { const response = await submitTransaction(this.rpcUrl, signedXdr); - if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + if (response.status === rpc.Api.GetTransactionStatus.SUCCESS) { return { success: true, hash: (response as any).hash, diff --git a/sdk/src/wrapperClient.ts b/sdk/src/wrapperClient.ts index 6d64812..dad6916 100644 --- a/sdk/src/wrapperClient.ts +++ b/sdk/src/wrapperClient.ts @@ -8,7 +8,7 @@ * compatible token, enabling cross-contract interoperability. */ -import { SorobanRpc, Contract, TransactionBuilder, Keypair, xdr } from '@stellar/stellar-sdk'; +import { rpc, Contract, TransactionBuilder, Keypair, xdr } from '@stellar/stellar-sdk'; import { buildInvokeTransaction, @@ -43,14 +43,14 @@ export class WrapperClient { private rpcUrl: string; private networkPassphrase: string; private contractId: string; - private server: SorobanRpc.Server; + private server: rpc.Server; private contract: Contract; constructor(config: WrapperClientConfig) { this.rpcUrl = config.rpcUrl; this.networkPassphrase = config.networkPassphrase; this.contractId = config.contractId; - this.server = new SorobanRpc.Server(this.rpcUrl); + this.server = new rpc.Server(this.rpcUrl); this.contract = new Contract(this.contractId); } @@ -405,11 +405,11 @@ export class WrapperClient { const simulated = await this.server.simulateTransaction(tx); - if (SorobanRpc.Api.isSimulationError(simulated)) { + if (rpc.Api.isSimulationError(simulated)) { throw new SimulationError(`Query failed: ${simulated.error}`, simulated.error); } - if (!SorobanRpc.Api.isSimulationSuccess(simulated) || !simulated.result) { + if (!rpc.Api.isSimulationSuccess(simulated) || !simulated.result) { throw new SimulationError('Query returned no result'); } @@ -439,7 +439,7 @@ export class WrapperClient { const response = await submitTransaction(this.rpcUrl, txXdr); - if (response.status === SorobanRpc.Api.GetTransactionStatus.SUCCESS) { + if (response.status === rpc.Api.GetTransactionStatus.SUCCESS) { return { success: true, hash: (response as any).hash, diff --git a/sdk/tsconfig.json b/sdk/tsconfig.json index d28a02b..3d717d0 100644 --- a/sdk/tsconfig.json +++ b/sdk/tsconfig.json @@ -1,7 +1,9 @@ { "compilerOptions": { "target": "ES2020", - "module": "commonjs", + "module": "Node16", + "moduleResolution": "Node16", + "isolatedModules": true, "lib": ["ES2020"], "declaration": true, "strict": true, @@ -12,10 +14,11 @@ "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, + "types": ["jest"], "outDir": "./dist", "rootDir": "./src", "declarationDir": "./dist" }, "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist", "**/*.test.ts"] } diff --git a/sdk/tsconfig.test.json b/sdk/tsconfig.test.json new file mode 100644 index 0000000..3127db6 --- /dev/null +++ b/sdk/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["jest", "node"] + }, + "include": ["src/**/*", "**/*.test.ts"], + "exclude": ["node_modules", "dist"] +}