gogo-movement-starter
Version:
GOGO Movement Network React Starter Template - Complete React + Vite + Move contracts setup
24 lines • 2.13 MB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("react"),Pf=require("react-dom");function Zm(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const q=Zm(me),hv=Zm(Pf);function gv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var yu={exports:{}},Yo={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var QA;function pv(){if(QA)return Yo;QA=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var a in i)a!=="key"&&(s[a]=i[a])}else s=i;return i=s.ref,{$$typeof:t,type:n,key:o,ref:i!==void 0?i:null,props:s}}return Yo.Fragment=e,Yo.jsx=r,Yo.jsxs=r,Yo}var Jo={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var YA;function Av(){return YA||(YA=1,process.env.NODE_ENV!=="production"&&function(){function t(k){if(k==null)return null;if(typeof k=="function")return k.$$typeof===H?null:k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case A:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case B:return"Suspense";case T:return"SuspenseList";case D:return"Activity"}if(typeof k=="object")switch(typeof k.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),k.$$typeof){case g:return"Portal";case U:return(k.displayName||"Context")+".Provider";case v:return(k._context.displayName||"Context")+".Consumer";case L:var Y=k.render;return k=k.displayName,k||(k=Y.displayName||Y.name||"",k=k!==""?"ForwardRef("+k+")":"ForwardRef"),k;case N:return Y=k.displayName||null,Y!==null?Y:t(k.type)||"Memo";case Q:Y=k._payload,k=k._init;try{return t(k(Y))}catch{}}return null}function e(k){return""+k}function r(k){try{e(k);var Y=!1}catch{Y=!0}if(Y){Y=console;var R=Y.error,ee=typeof Symbol=="function"&&Symbol.toStringTag&&k[Symbol.toStringTag]||k.constructor.name||"Object";return R.call(Y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ee),e(k)}}function n(k){if(k===A)return"<>";if(typeof k=="object"&&k!==null&&k.$$typeof===Q)return"<...>";try{var Y=t(k);return Y?"<"+Y+">":"<...>"}catch{return"<...>"}}function i(){var k=K.A;return k===null?null:k.getOwner()}function s(){return Error("react-stack-top-frame")}function o(k){if(S.call(k,"key")){var Y=Object.getOwnPropertyDescriptor(k,"key").get;if(Y&&Y.isReactWarning)return!1}return k.key!==void 0}function a(k,Y){function R(){m||(m=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Y))}R.isReactWarning=!0,Object.defineProperty(k,"key",{get:R,configurable:!0})}function c(){var k=t(this.type);return M[k]||(M[k]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),k=this.props.ref,k!==void 0?k:null}function u(k,Y,R,ee,re,$,se,V){return R=$.ref,k={$$typeof:p,type:k,key:Y,props:$,_owner:re},(R!==void 0?R:null)!==null?Object.defineProperty(k,"ref",{enumerable:!1,get:c}):Object.defineProperty(k,"ref",{enumerable:!1,value:null}),k._store={},Object.defineProperty(k._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(k,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(k,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.defineProperty(k,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.freeze&&(Object.freeze(k.props),Object.freeze(k)),k}function l(k,Y,R,ee,re,$,se,V){var X=Y.children;if(X!==void 0)if(ee)if(E(X)){for(ee=0;ee<X.length;ee++)f(X[ee]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(X);if(S.call(Y,"key")){X=t(k);var Z=Object.keys(Y).filter(function(ie){return ie!=="key"});ee=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",J[X+ee]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,ee,X,Z,X),J[X+ee]=!0)}if(X=null,R!==void 0&&(r(R),X=""+R),o(Y)&&(r(Y.key),X=""+Y.key),"key"in Y){R={};for(var te in Y)te!=="key"&&(R[te]=Y[te])}else R=Y;return X&&a(R,typeof k=="function"?k.displayName||k.name||"Unknown":k),u(k,X,$,re,i(),R,se,V)}function f(k){typeof k=="object"&&k!==null&&k.$$typeof===p&&k._store&&(k._store.validated=1)}var d=me,p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),U=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),H=Symbol.for("react.client.reference"),K=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,S=Object.prototype.hasOwnProperty,E=Array.isArray,b=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(k){return k()}};var m,M={},G=d.react_stack_bottom_frame.bind(d,s)(),F=b(n(s)),J={};Jo.Fragment=A,Jo.jsx=function(k,Y,R,ee,re){var $=1e4>K.recentlyCreatedOwnerStacks++;return l(k,Y,R,!1,ee,re,$?Error("react-stack-top-frame"):G,$?b(n(k)):F)},Jo.jsxs=function(k,Y,R,ee,re){var $=1e4>K.recentlyCreatedOwnerStacks++;return l(k,Y,R,!0,ee,re,$?Error("react-stack-top-frame"):G,$?b(n(k)):F)}}()),Jo}var JA;function yv(){return JA||(JA=1,process.env.NODE_ENV==="production"?yu.exports=pv():yu.exports=Av()),yu.exports}var z=yv(),_m={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},OA=me.createContext&&me.createContext(_m),wv=["attr","size","title"];function Ev(t,e){if(t==null)return{};var r=mv(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function mv(t,e){if(t==null)return{};var r={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(e.indexOf(n)>=0)continue;r[n]=t[n]}return r}function uf(){return uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},uf.apply(this,arguments)}function RA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?RA(Object(r),!0).forEach(function(n){Iv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Iv(t,e,r){return e=bv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bv(t){var e=Bv(t,"string");return typeof e=="symbol"?e:e+""}function Bv(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $m(t){return t&&t.map((e,r)=>me.createElement(e.tag,lf({key:r},e.attr),$m(e.child)))}function bo(t){return e=>me.createElement(Cv,uf({attr:lf({},t.attr)},e),$m(t.child))}function Cv(t){var e=r=>{var{attr:n,size:i,title:s}=t,o=Ev(t,wv),a=i||r.size||"1em",c;return r.className&&(c=r.className),t.className&&(c=(c?c+" ":"")+t.className),me.createElement("svg",uf({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:c,style:lf(lf({color:t.color||r.color},r.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&me.createElement("title",null,s),t.children)};return OA!==void 0?me.createElement(OA.Consumer,null,r=>e(r)):e(_m)}function e0(t){return bo({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},child:[]}]})(t)}function Uv(t){return bo({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"},child:[]}]})(t)}function vv(t){return bo({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(t)}function Mv(t){return bo({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(t)}function t0(t){return bo({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(t)}function Dv(t){return bo({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M461.2 128H80c-8.84 0-16-7.16-16-16s7.16-16 16-16h384c8.84 0 16-7.16 16-16 0-26.51-21.49-48-48-48H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h397.2c28.02 0 50.8-21.53 50.8-48V176c0-26.47-22.78-48-50.8-48zM416 336c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z"},child:[]}]})(t)}var Lv=Object.defineProperty,r0=t=>{throw TypeError(t)},kv=(t,e,r)=>e in t?Lv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Gh=(t,e,r)=>kv(t,typeof e!="symbol"?e+"":e,r),n0=(t,e,r)=>e.has(t)||r0("Cannot "+r),ir=(t,e,r)=>(n0(t,e,"read from private field"),r?r.call(t):e.get(t)),$s=(t,e,r)=>e.has(t)?r0("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Vr=(t,e,r,n)=>(n0(t,e,"write to private field"),e.set(t,r),r),i0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},s0=typeof window>"u"||"Deno"in globalThis,vs,Ni,Oo,PA,Gv=(PA=class extends i0{constructor(){super(),$s(this,vs),$s(this,Ni),$s(this,Oo),Vr(this,Oo,t=>{if(!s0&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}})}onSubscribe(){ir(this,Ni)||this.setEventListener(ir(this,Oo))}onUnsubscribe(){var t;this.hasListeners()||((t=ir(this,Ni))==null||t.call(this),Vr(this,Ni,void 0))}setEventListener(t){var e;Vr(this,Oo,t),(e=ir(this,Ni))==null||e.call(this),Vr(this,Ni,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ir(this,vs)!==t&&(Vr(this,vs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof ir(this,vs)=="boolean"?ir(this,vs):globalThis.document?.visibilityState!=="hidden"}},vs=new WeakMap,Ni=new WeakMap,Oo=new WeakMap,PA);new Gv;var Ro,Ti,Po,jA,Kv=(jA=class extends i0{constructor(){super(),$s(this,Ro,!0),$s(this,Ti),$s(this,Po),Vr(this,Po,t=>{if(!s0&&window.addEventListener){const e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}})}onSubscribe(){ir(this,Ti)||this.setEventListener(ir(this,Po))}onUnsubscribe(){var t;this.hasListeners()||((t=ir(this,Ti))==null||t.call(this),Vr(this,Ti,void 0))}setEventListener(t){var e;Vr(this,Po,t),(e=ir(this,Ti))==null||e.call(this),Vr(this,Ti,t(this.setOnline.bind(this)))}setOnline(t){ir(this,Ro)!==t&&(Vr(this,Ro,t),this.listeners.forEach(e=>{e(t)}))}isOnline(){return ir(this,Ro)}},Ro=new WeakMap,Ti=new WeakMap,Po=new WeakMap,jA);new Kv;q.createContext(void 0);var Fv=q.createContext(!1);Fv.Provider;function Sv(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}q.createContext(Sv());var dr=class extends Error{constructor(t,e){super(t),this.invalidReason=e}};const Ms=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function jf(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function ic(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ct(t,...e){if(!jf(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function xv(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");ic(t.outputLen),ic(t.blockLen)}function no(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function o0(t,e){ct(t);const r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function Hv(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Ci(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function vd(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Nr(t,e){return t<<32-e|t>>>e}const Nv=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Tv(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function zv(t){for(let e=0;e<t.length;e++)t[e]=Tv(t[e]);return t}const qA=Nv?t=>t:zv,a0=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",Qv=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function $r(t){if(ct(t),a0)return t.toHex();let e="";for(let r=0;r<t.length;r++)e+=Qv[t[r]];return e}const dn={_0:48,_9:57,A:65,F:70,a:97,f:102};function WA(t){if(t>=dn._0&&t<=dn._9)return t-dn._0;if(t>=dn.A&&t<=dn.F)return t-(dn.A-10);if(t>=dn.a&&t<=dn.f)return t-(dn.a-10)}function Fc(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(a0)return Uint8Array.fromHex(t);const e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=WA(t.charCodeAt(s)),a=WA(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function qf(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function Wf(t){return typeof t=="string"&&(t=qf(t)),ct(t),t}function ot(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];ct(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}let cp=class{};function up(t){const e=n=>t().update(Wf(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Vf(t=32){if(Ms&&typeof Ms.getRandomValues=="function")return Ms.getRandomValues(new Uint8Array(t));if(Ms&&typeof Ms.randomBytes=="function")return Uint8Array.from(Ms.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}var Yv=(t=>(t.TOO_SHORT="too_short",t.INVALID_LENGTH="invalid_length",t.INVALID_HEX_CHARS="invalid_hex_chars",t))(Yv||{}),oe=class ni{constructor(e){this.data=e}toUint8Array(){return this.data}toStringWithoutPrefix(){return $r(this.data)}toString(){return`0x${this.toStringWithoutPrefix()}`}static fromHexString(e){let r=e;if(r.startsWith("0x")&&(r=r.slice(2)),r.length===0)throw new dr("Hex string is too short, must be at least 1 char long, excluding the optional leading 0x.","too_short");if(r.length%2!==0)throw new dr("Hex string must be an even number of hex characters.","invalid_length");try{return new ni(Fc(r))}catch(n){throw new dr(`Hex string contains invalid hex characters: ${n?.message}`,"invalid_hex_chars")}}static fromHexInput(e){return e instanceof Uint8Array?new ni(e):ni.fromHexString(e)}static hexInputToUint8Array(e){return e instanceof Uint8Array?e:ni.fromHexString(e).toUint8Array()}static hexInputToString(e){return ni.fromHexInput(e).toString()}static hexInputToStringWithoutPrefix(e){return ni.fromHexInput(e).toStringWithoutPrefix()}static isValid(e){try{return ni.fromHexString(e),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((r,n)=>r===e.data[n])}},Jv=t=>new TextDecoder().decode(oe.fromHexInput(t).toUint8Array()),c0=255,u0=65535,io=4294967295,Xf=18446744073709551615n,lp=340282366920938463463374607431768211455n,l0=115792089237316195423570985008687907853269984665640564039457584007913129639935n,Ov=Object.defineProperty,Rv=Object.getOwnPropertyDescriptor,Mr=(t,e,r,n)=>{for(var i=Rv(e,r),s=t.length-1,o;s>=0;s--)(o=t[s])&&(i=o(e,r,i)||i);return i&&Ov(e,r,i),i},fe=class{bcsToBytes(){let e=new gt;return this.serialize(e),e.toUint8Array()}bcsToHex(){let e=this.bcsToBytes();return oe.fromHexInput(e)}toStringWithoutPrefix(){return this.bcsToHex().toStringWithoutPrefix()}toString(){return`0x${this.toStringWithoutPrefix()}`}},gt=class{constructor(t=64){if(t<=0)throw new Error("Length needs to be greater than 0");this.buffer=new ArrayBuffer(t),this.offset=0}ensureBufferWillHandleSize(t){for(;this.buffer.byteLength<this.offset+t;){let e=new ArrayBuffer(this.buffer.byteLength*2);new Uint8Array(e).set(new Uint8Array(this.buffer)),this.buffer=e}}appendToBuffer(t){this.ensureBufferWillHandleSize(t.length),new Uint8Array(this.buffer,this.offset).set(t),this.offset+=t.length}serializeWithFunction(t,e,r){this.ensureBufferWillHandleSize(e);let n=new DataView(this.buffer,this.offset);t.apply(n,[0,r,!0]),this.offset+=e}serializeStr(t){let e=new TextEncoder;this.serializeBytes(e.encode(t))}serializeBytes(t){this.serializeU32AsUleb128(t.length),this.appendToBuffer(t)}serializeFixedBytes(t){this.appendToBuffer(t)}serializeBool(t){f0(t);let e=t?1:0;this.appendToBuffer(new Uint8Array([e]))}serializeU8(t){this.appendToBuffer(new Uint8Array([t]))}serializeU16(t){this.serializeWithFunction(DataView.prototype.setUint16,2,t)}serializeU32(t){this.serializeWithFunction(DataView.prototype.setUint32,4,t)}serializeU64(t){let e=BigInt(t)&BigInt(io),r=BigInt(t)>>BigInt(32);this.serializeU32(Number(e)),this.serializeU32(Number(r))}serializeU128(t){let e=BigInt(t)&Xf,r=BigInt(t)>>BigInt(64);this.serializeU64(e),this.serializeU64(r)}serializeU256(t){let e=BigInt(t)&lp,r=BigInt(t)>>BigInt(128);this.serializeU128(e),this.serializeU128(r)}serializeU32AsUleb128(t){let e=t,r=[];for(;e>>>7;)r.push(e&127|128),e>>>=7;r.push(e),this.appendToBuffer(new Uint8Array(r))}toUint8Array(){return new Uint8Array(this.buffer).slice(0,this.offset)}serialize(t){t.serialize(this)}serializeVector(t){this.serializeU32AsUleb128(t.length),t.forEach(e=>{e.serialize(this)})}serializeOption(t,e){let r=t!==void 0;this.serializeBool(r),r&&(typeof t=="string"?this.serializeStr(t):t instanceof Uint8Array?e!==void 0?this.serializeFixedBytes(t):this.serializeBytes(t):t.serialize(this))}serializeOptionStr(t){t===void 0?this.serializeU32AsUleb128(0):(this.serializeU32AsUleb128(1),this.serializeStr(t))}};Mr([zi(0,c0)],gt.prototype,"serializeU8"),Mr([zi(0,u0)],gt.prototype,"serializeU16"),Mr([zi(0,io)],gt.prototype,"serializeU32"),Mr([zi(BigInt(0),Xf)],gt.prototype,"serializeU64"),Mr([zi(BigInt(0),lp)],gt.prototype,"serializeU128"),Mr([zi(BigInt(0),l0)],gt.prototype,"serializeU256"),Mr([zi(0,io)],gt.prototype,"serializeU32AsUleb128");function f0(t){if(typeof t!="boolean")throw new Error(`${t} is not a boolean value`)}var Pv=(t,e,r)=>`${t} is out of range: [${e}, ${r}]`;function Is(t,e,r){let n=BigInt(t);if(n>BigInt(r)||n<BigInt(e))throw new Error(Pv(t,e,r))}function zi(t,e){return(r,n,i)=>{let s=i.value;return i.value=function(o){return Is(o,t,e),s.apply(this,[o])},i}}var jv=(t=>(t.INCORRECT_NUMBER_OF_BYTES="incorrect_number_of_bytes",t.INVALID_HEX_CHARS="invalid_hex_chars",t.TOO_SHORT="too_short",t.TOO_LONG="too_long",t.LEADING_ZERO_X_REQUIRED="leading_zero_x_required",t.LONG_FORM_REQUIRED_UNLESS_SPECIAL="long_form_required_unless_special",t.INVALID_PADDING_ZEROES="INVALID_PADDING_ZEROES",t.INVALID_PADDING_STRICTNESS="INVALID_PADDING_STRICTNESS",t))(jv||{}),Tt=class rr extends fe{constructor(e){if(super(),e.length!==rr.LENGTH)throw new dr("AccountAddress data should be exactly 32 bytes long","incorrect_number_of_bytes");this.data=e}isSpecial(){return this.data.slice(0,this.data.length-1).every(e=>e===0)&&this.data[this.data.length-1]<16}toString(){return`0x${this.toStringWithoutPrefix()}`}toStringWithoutPrefix(){let e=$r(this.data);return this.isSpecial()&&(e=e[e.length-1]),e}toStringLong(){return`0x${this.toStringLongWithoutPrefix()}`}toStringLongWithoutPrefix(){return $r(this.data)}toStringShort(){return`0x${this.toStringShortWithoutPrefix()}`}toStringShortWithoutPrefix(){let e=$r(this.data).replace(/^0+/,"");return e===""?"0":e}toUint8Array(){return this.data}serialize(e){e.serializeFixedBytes(this.data)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(3),e.serialize(this)}static deserialize(e){let r=e.deserializeFixedBytes(rr.LENGTH);return new rr(r)}static fromStringStrict(e){if(!e.startsWith("0x"))throw new dr("Hex string must start with a leading 0x.","leading_zero_x_required");let r=rr.fromString(e);if(e.length!==rr.LONG_STRING_LENGTH+2)if(r.isSpecial()){if(e.length!==3)throw new dr(`The given hex string ${e} is a special address not in LONG form, it must be 0x0 to 0xf without padding zeroes.`,"INVALID_PADDING_ZEROES")}else throw new dr(`The given hex string ${e} is not a special address, it must be represented as 0x + 64 chars.`,"long_form_required_unless_special");return r}static fromString(e,{maxMissingChars:r=4}={}){let n=e;if(e.startsWith("0x")&&(n=e.slice(2)),n.length===0)throw new dr("Hex string is too short, must be 1 to 64 chars long, excluding the leading 0x.","too_short");if(n.length>64)throw new dr("Hex string is too long, must be 1 to 64 chars long, excluding the leading 0x.","too_long");if(r>63||r<0)throw new dr(`maxMissingChars must be between or equal to 0 and 63. Received ${r}`,"INVALID_PADDING_STRICTNESS");let i;try{i=Fc(n.padStart(64,"0"))}catch(o){throw new dr(`Hex characters are invalid: ${o?.message}`,"invalid_hex_chars")}let s=new rr(i);if(n.length<64-r&&!s.isSpecial())throw new dr(`Hex string is too short, must be ${64-r} to 64 chars long, excluding the leading 0x. You may need to fix
the addresss by padding it with 0s before passing it to \`fromString\` (e.g. <addressString>.padStart(64, '0')).
Received ${e}`,"too_short");return s}static from(e,{maxMissingChars:r=4}={}){return typeof e=="string"?rr.fromString(e,{maxMissingChars:r}):e instanceof Uint8Array?new rr(e):e}static fromStrict(e){return typeof e=="string"?rr.fromStringStrict(e):e instanceof Uint8Array?new rr(e):e}static isValid(e){try{return e.strict?rr.fromStrict(e.input):rr.from(e.input),{valid:!0}}catch(r){return{valid:!1,invalidReason:r?.invalidReason,invalidReasonMessage:r?.message}}}equals(e){return this.data.length!==e.data.length?!1:this.data.every((r,n)=>r===e.data[n])}};Tt.LENGTH=32,Tt.LONG_STRING_LENGTH=64,Tt.ZERO=Tt.from("0x0"),Tt.ONE=Tt.from("0x1"),Tt.TWO=Tt.from("0x2"),Tt.THREE=Tt.from("0x3"),Tt.FOUR=Tt.from("0x4"),Tt.A=Tt.from("0xA");var P=Tt,Ct=class d0 extends fe{constructor(e){super(),f0(e),this.value=e}serialize(e){e.serializeBool(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(5),e.serialize(this)}deserialize(e){return new Bo(e.deserializeU256())}static deserialize(e){return new d0(e.deserializeBool())}},xn=class h0 extends fe{constructor(e){super(),Is(e,0,c0),this.value=e}serialize(e){e.serializeU8(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(0),e.serialize(this)}static deserialize(e){return new h0(e.deserializeU8())}},Sc=class g0 extends fe{constructor(e){super(),Is(e,0,u0),this.value=e}serialize(e){e.serializeU16(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(6),e.serialize(this)}static deserialize(e){return new g0(e.deserializeU16())}},xc=class p0 extends fe{constructor(e){super(),Is(e,0,io),this.value=e}serialize(e){e.serializeU32(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(7),e.serialize(this)}static deserialize(e){return new p0(e.deserializeU32())}},Gr=class A0 extends fe{constructor(e){super(),Is(e,BigInt(0),Xf),this.value=BigInt(e)}serialize(e){e.serializeU64(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(1),e.serialize(this)}static deserialize(e){return new A0(e.deserializeU64())}},Hc=class y0 extends fe{constructor(e){super(),Is(e,BigInt(0),lp),this.value=BigInt(e)}serialize(e){e.serializeU128(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(2),e.serialize(this)}static deserialize(e){return new y0(e.deserializeU128())}},Bo=class w0 extends fe{constructor(e){super(),Is(e,BigInt(0),l0),this.value=BigInt(e)}serialize(e){e.serializeU256(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){e.serializeU32AsUleb128(8),e.serialize(this)}static deserialize(e){return new w0(e.deserializeU256())}},Sr=class E0{constructor(e){this.buffer=new ArrayBuffer(e.length),new Uint8Array(this.buffer).set(e,0),this.offset=0}static fromHex(e){let r=oe.hexInputToUint8Array(e);return new E0(r)}read(e){if(this.offset+e>this.buffer.byteLength)throw new Error("Reached to the end of buffer");let r=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,r}remaining(){return this.buffer.byteLength-this.offset}assertFinished(){if(this.remaining()!==0)throw new Error("Buffer has remaining bytes")}deserializeStr(){let e=this.deserializeBytes();return new TextDecoder().decode(e)}deserializeOptionStr(){return this.deserializeOption("string")}deserializeOption(e,r){if(this.deserializeBool()){if(e==="string")return this.deserializeStr();if(e==="bytes")return this.deserializeBytes();if(e==="fixedBytes"){if(r===void 0)throw new Error("Fixed bytes length not provided");return this.deserializeFixedBytes(r)}return this.deserialize(e)}}deserializeBytes(){let e=this.deserializeUleb128AsU32();return new Uint8Array(this.read(e))}deserializeFixedBytes(e){return new Uint8Array(this.read(e))}deserializeBool(){let e=new Uint8Array(this.read(1))[0];if(e!==1&&e!==0)throw new Error("Invalid boolean value");return e===1}deserializeU8(){return new DataView(this.read(1)).getUint8(0)}deserializeU16(){return new DataView(this.read(2)).getUint16(0,!0)}deserializeU32(){return new DataView(this.read(4)).getUint32(0,!0)}deserializeU64(){let e=this.deserializeU32(),r=this.deserializeU32();return BigInt(BigInt(r)<<BigInt(32)|BigInt(e))}deserializeU128(){let e=this.deserializeU64(),r=this.deserializeU64();return BigInt(r<<BigInt(64)|e)}deserializeU256(){let e=this.deserializeU128(),r=this.deserializeU128();return BigInt(r<<BigInt(128)|e)}deserializeUleb128AsU32(){let e=BigInt(0),r=0;for(;e<io;){let n=this.deserializeU8();if(e|=BigInt(n&127)<<BigInt(r),(n&128)===0)break;r+=7}if(e>io)throw new Error("Overflow while parsing uleb128-encoded uint32 value");return Number(e)}deserialize(e){return e.deserialize(this)}deserializeVector(e){let r=this.deserializeUleb128AsU32(),n=new Array;for(let i=0;i<r;i+=1)n.push(this.deserialize(e));return n}},Me=class Qr extends fe{constructor(e){super(),this.values=e}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){if(this.values[0]!==void 0&&!(this.values[0]instanceof xn)){new m0(this.bcsToBytes()).serializeForScriptFunction(e);return}e.serializeU32AsUleb128(4),e.serialize(this)}static U8(e){let r;if(Array.isArray(e)&&e.length===0)r=[];else if(Array.isArray(e)&&typeof e[0]=="number")r=e;else if(typeof e=="string"){let n=oe.fromHexInput(e);r=Array.from(n.toUint8Array())}else if(e instanceof Uint8Array)r=Array.from(e);else throw new Error("Invalid input type, must be an number[], Uint8Array, or hex string");return new Qr(r.map(n=>new xn(n)))}static U16(e){return new Qr(e.map(r=>new Sc(r)))}static U32(e){return new Qr(e.map(r=>new xc(r)))}static U64(e){return new Qr(e.map(r=>new Gr(r)))}static U128(e){return new Qr(e.map(r=>new Hc(r)))}static U256(e){return new Qr(e.map(r=>new Bo(r)))}static Bool(e){return new Qr(e.map(r=>new Ct(r)))}static MoveString(e){return new Qr(e.map(r=>new Je(r)))}serialize(e){e.serializeVector(this.values)}static deserialize(e,r){let n=e.deserializeUleb128AsU32(),i=new Array;for(let s=0;s<n;s+=1)i.push(r.deserialize(e));return new Qr(i)}},m0=class I0 extends fe{constructor(e){super(),this.value=oe.fromHexInput(e).toUint8Array()}serialize(e){e.serializeBytes(this.value)}serializeForEntryFunction(e){this.serialize(e)}serializeForScriptFunction(e){e.serializeU32AsUleb128(9),this.serialize(e)}static deserialize(e){return new I0(e.deserializeBytes())}toMoveVector(e){let r=new Sr(this.bcsToBytes());r.deserializeUleb128AsU32();let n=r.deserializeVector(e);return new Me(n)}},Je=class b0 extends fe{constructor(e){super(),this.value=e}serialize(e){e.serializeStr(this.value)}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}serializeForScriptFunction(e){let r=new TextEncoder().encode(this.value);Me.U8(r).serializeForScriptFunction(e)}static deserialize(e){return new b0(e.deserializeStr())}},lr=class Yr extends fe{constructor(e){super(),typeof e<"u"&&e!==null?this.vec=new Me([e]):this.vec=new Me([]),[this.value]=this.vec.values}serializeForEntryFunction(e){let r=this.bcsToBytes();e.serializeBytes(r)}unwrap(){if(this.isSome())return this.vec.values[0];throw new Error("Called unwrap on a MoveOption with no value")}isSome(){return this.vec.values.length===1}serialize(e){this.vec.serialize(e)}static U8(e){return new Yr(e!=null?new xn(e):void 0)}static U16(e){return new Yr(e!=null?new Sc(e):void 0)}static U32(e){return new Yr(e!=null?new xc(e):void 0)}static U64(e){return new Yr(e!=null?new Gr(e):void 0)}static U128(e){return new Yr(e!=null?new Hc(e):void 0)}static U256(e){return new Yr(e!=null?new Bo(e):void 0)}static Bool(e){return new Yr(e!=null?new Ct(e):void 0)}static MoveString(e){return new Yr(e!=null?new Je(e):void 0)}static deserialize(e,r){let n=Me.deserialize(e,r);return new Yr(n.values[0])}},qv=class extends fe{constructor(t){super(),this.accountAddress=P.ONE,this.moduleName=new Je("account"),this.structName=new Je("RotationProofChallenge"),this.sequenceNumber=new Gr(t.sequenceNumber),this.originator=t.originator,this.currentAuthKey=t.currentAuthKey,this.newPublicKey=Me.U8(t.newPublicKey.toUint8Array())}serialize(t){t.serialize(this.accountAddress),t.serialize(this.moduleName),t.serialize(this.structName),t.serialize(this.sequenceNumber),t.serialize(this.originator),t.serialize(this.currentAuthKey),t.serialize(this.newPublicKey)}},Md=class{constructor(){this.queue=[],this.pendingDequeue=[],this.cancelled=!1}enqueue(e){if(this.cancelled=!1,this.pendingDequeue.length>0){this.pendingDequeue.shift()?.resolve(e);return}this.queue.push(e)}async dequeue(){return this.queue.length>0?Promise.resolve(this.queue.shift()):new Promise((e,r)=>{this.pendingDequeue.push({resolve:e,reject:r})})}isEmpty(){return this.queue.length===0}cancel(){this.cancelled=!0,this.pendingDequeue.forEach(async({reject:e})=>{e(new Kh("Task cancelled"))}),this.pendingDequeue=[],this.queue.length=0}isCancelled(){return this.cancelled}pendingDequeueLength(){return this.pendingDequeue.length}},Kh=class extends Error{},B0=class C0 extends fe{constructor(e){super(),this.chainId=e}serialize(e){e.serializeU8(this.chainId)}static deserialize(e){let r=e.deserializeU8();return new C0(r)}},Vt=class U0 extends fe{constructor(e){super(),this.identifier=e}serialize(e){e.serializeStr(this.identifier)}static deserialize(e){let r=e.deserializeStr();return new U0(r)}},Zf=t=>typeof t=="string"?oe.isValid(t).valid?t:new TextEncoder().encode(t):t;let v0=class extends cp{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,xv(t);const r=Wf(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?t.create().update(r).digest():r);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Ci(i)}update(t){return no(this),this.iHash.update(t),this}digestInto(t){no(this),ct(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:n,destroyed:i,blockLen:s,outputLen:o}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=o,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};const fp=(t,e,r)=>new v0(t,e).update(r).digest();fp.create=(t,e)=>new v0(t,e);function Wv(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,u=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+u,a,n)}function Vv(t,e,r){return t&e^~t&r}function Xv(t,e,r){return t&e^t&r^e&r}let M0=class extends cp{constructor(t,e,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(t),this.view=vd(this.buffer)}update(t){no(this),t=Wf(t),ct(t);const{view:e,buffer:r,blockLen:n}=this,i=t.length;for(let s=0;s<i;){const o=Math.min(n-this.pos,i-s);if(o===n){const a=vd(t);for(;n<=i-s;s+=n)this.process(a,s);continue}r.set(t.subarray(s,s+o),this.pos),this.pos+=o,s+=o,this.pos===n&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){no(this),o0(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:n,isLE:i}=this;let{pos:s}=this;e[s++]=128,Ci(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(r,0),s=0);for(let l=s;l<n;l++)e[l]=0;Wv(r,n-8,BigInt(this.length*8),i),this.process(r,0);const o=vd(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=a/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<c;l++)o.setUint32(4*l,u[l],i)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:n,finished:i,destroyed:s,pos:o}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=o,n%e&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const Rn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mt=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),wu=BigInt(2**32-1),VA=BigInt(32);function Zv(t,e=!1){return e?{h:Number(t&wu),l:Number(t>>VA&wu)}:{h:Number(t>>VA&wu)|0,l:Number(t&wu)|0}}function D0(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:a}=Zv(t[s],e);[n[s],i[s]]=[o,a]}return[n,i]}const XA=(t,e,r)=>t>>>r,ZA=(t,e,r)=>t<<32-r|e>>>r,Ds=(t,e,r)=>t>>>r|e<<32-r,Ls=(t,e,r)=>t<<32-r|e>>>r,Eu=(t,e,r)=>t<<64-r|e>>>r-32,mu=(t,e,r)=>t>>>r-32|e<<64-r,_v=(t,e,r)=>t<<r|e>>>32-r,$v=(t,e,r)=>e<<r|t>>>32-r,eM=(t,e,r)=>e<<r-32|t>>>64-r,tM=(t,e,r)=>t<<r-32|e>>>64-r;function hn(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const rM=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),nM=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,iM=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),sM=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,oM=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),aM=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,cM=Uint32Array.from([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]),Pn=new Uint32Array(64);let uM=class extends M0{constructor(t=32){super(64,t,8,!1),this.A=Rn[0]|0,this.B=Rn[1]|0,this.C=Rn[2]|0,this.D=Rn[3]|0,this.E=Rn[4]|0,this.F=Rn[5]|0,this.G=Rn[6]|0,this.H=Rn[7]|0}get(){const{A:t,B:e,C:r,D:n,E:i,F:s,G:o,H:a}=this;return[t,e,r,n,i,s,o,a]}set(t,e,r,n,i,s,o,a){this.A=t|0,this.B=e|0,this.C=r|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=o|0,this.H=a|0}process(t,e){for(let l=0;l<16;l++,e+=4)Pn[l]=t.getUint32(e,!1);for(let l=16;l<64;l++){const f=Pn[l-15],d=Pn[l-2],p=Nr(f,7)^Nr(f,18)^f>>>3,g=Nr(d,17)^Nr(d,19)^d>>>10;Pn[l]=g+Pn[l-7]+p+Pn[l-16]|0}let{A:r,B:n,C:i,D:s,E:o,F:a,G:c,H:u}=this;for(let l=0;l<64;l++){const f=Nr(o,6)^Nr(o,11)^Nr(o,25),d=u+f+Vv(o,a,c)+cM[l]+Pn[l]|0,p=(Nr(r,2)^Nr(r,13)^Nr(r,22))+Xv(r,n,i)|0;u=c,c=a,a=o,o=s+d|0,s=i,i=n,n=r,r=d+p|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,o=o+this.E|0,a=a+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,i,s,o,a,c,u)}roundClean(){Ci(Pn)}destroy(){this.set(0,0,0,0,0,0,0,0),Ci(this.buffer)}};const L0=D0(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),lM=L0[0],fM=L0[1],jn=new Uint32Array(80),qn=new Uint32Array(80);let dM=class extends M0{constructor(t=64){super(128,t,16,!1),this.Ah=mt[0]|0,this.Al=mt[1]|0,this.Bh=mt[2]|0,this.Bl=mt[3]|0,this.Ch=mt[4]|0,this.Cl=mt[5]|0,this.Dh=mt[6]|0,this.Dl=mt[7]|0,this.Eh=mt[8]|0,this.El=mt[9]|0,this.Fh=mt[10]|0,this.Fl=mt[11]|0,this.Gh=mt[12]|0,this.Gl=mt[13]|0,this.Hh=mt[14]|0,this.Hl=mt[15]|0}get(){const{Ah:t,Al:e,Bh:r,Bl:n,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:u,Fh:l,Fl:f,Gh:d,Gl:p,Hh:g,Hl:A}=this;return[t,e,r,n,i,s,o,a,c,u,l,f,d,p,g,A]}set(t,e,r,n,i,s,o,a,c,u,l,f,d,p,g,A){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=o|0,this.Dl=a|0,this.Eh=c|0,this.El=u|0,this.Fh=l|0,this.Fl=f|0,this.Gh=d|0,this.Gl=p|0,this.Hh=g|0,this.Hl=A|0}process(t,e){for(let v=0;v<16;v++,e+=4)jn[v]=t.getUint32(e),qn[v]=t.getUint32(e+=4);for(let v=16;v<80;v++){const U=jn[v-15]|0,L=qn[v-15]|0,B=Ds(U,L,1)^Ds(U,L,8)^XA(U,L,7),T=Ls(U,L,1)^Ls(U,L,8)^ZA(U,L,7),N=jn[v-2]|0,Q=qn[v-2]|0,D=Ds(N,Q,19)^Eu(N,Q,61)^XA(N,Q,6),H=Ls(N,Q,19)^mu(N,Q,61)^ZA(N,Q,6),K=iM(T,H,qn[v-7],qn[v-16]),S=sM(K,B,D,jn[v-7],jn[v-16]);jn[v]=S|0,qn[v]=K|0}let{Ah:r,Al:n,Bh:i,Bl:s,Ch:o,Cl:a,Dh:c,Dl:u,Eh:l,El:f,Fh:d,Fl:p,Gh:g,Gl:A,Hh:w,Hl:C}=this;for(let v=0;v<80;v++){const U=Ds(l,f,14)^Ds(l,f,18)^Eu(l,f,41),L=Ls(l,f,14)^Ls(l,f,18)^mu(l,f,41),B=l&d^~l&g,T=f&p^~f&A,N=oM(C,L,T,fM[v],qn[v]),Q=aM(N,w,U,B,lM[v],jn[v]),D=N|0,H=Ds(r,n,28)^Eu(r,n,34)^Eu(r,n,39),K=Ls(r,n,28)^mu(r,n,34)^mu(r,n,39),S=r&i^r&o^i&o,E=n&s^n&a^s&a;w=g|0,C=A|0,g=d|0,A=p|0,d=l|0,p=f|0,{h:l,l:f}=hn(c|0,u|0,Q|0,D|0),c=o|0,u=a|0,o=i|0,a=s|0,i=r|0,s=n|0;const b=rM(D,K,E);r=nM(b,Q,H,S),n=b|0}({h:r,l:n}=hn(this.Ah|0,this.Al|0,r|0,n|0)),{h:i,l:s}=hn(this.Bh|0,this.Bl|0,i|0,s|0),{h:o,l:a}=hn(this.Ch|0,this.Cl|0,o|0,a|0),{h:c,l:u}=hn(this.Dh|0,this.Dl|0,c|0,u|0),{h:l,l:f}=hn(this.Eh|0,this.El|0,l|0,f|0),{h:d,l:p}=hn(this.Fh|0,this.Fl|0,d|0,p|0),{h:g,l:A}=hn(this.Gh|0,this.Gl|0,g|0,A|0),{h:w,l:C}=hn(this.Hh|0,this.Hl|0,w|0,C|0),this.set(r,n,i,s,o,a,c,u,l,f,d,p,g,A,w,C)}roundClean(){Ci(jn,qn)}destroy(){Ci(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};const _f=up(()=>new uM),k0=up(()=>new dM),hM=k0;function Ha(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function gM(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function Xr(t,...e){if(!gM(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function G0(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ha(t.outputLen),Ha(t.blockLen)}function ff(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function pM(t,e){Xr(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Dd=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const es=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Tr=(t,e)=>t<<32-e|t>>>e,Iu=(t,e)=>t<<e|t>>>32-e>>>0;new Uint8Array(new Uint32Array([287454020]).buffer)[0];const AM=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function yM(t){Xr(t);let e="";for(let r=0;r<t.length;r++)e+=AM[t[r]];return e}const gn={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function _A(t){if(t>=gn._0&&t<=gn._9)return t-gn._0;if(t>=gn._A&&t<=gn._F)return t-(gn._A-10);if(t>=gn._a&&t<=gn._f)return t-(gn._a-10)}function wM(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length,r=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(r);for(let i=0,s=0;i<r;i++,s+=2){const o=_A(t.charCodeAt(s)),a=_A(t.charCodeAt(s+1));if(o===void 0||a===void 0){const c=t[s]+t[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}n[i]=o*16+a}return n}function K0(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function sc(t){return typeof t=="string"&&(t=K0(t)),Xr(t),t}function Ma(...t){let e=0;for(let n=0;n<t.length;n++){const i=t[n];Xr(i),e+=i.length}const r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){const s=t[n];r.set(s,i),i+=s.length}return r}class F0{clone(){return this._cloneInto()}}const EM={}.toString;function mM(t,e){if(e!==void 0&&EM.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function dp(t){const e=n=>t().update(sc(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function IM(t=32){if(Dd&&typeof Dd.getRandomValues=="function")return Dd.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class S0 extends F0{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,G0(e);const n=sc(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return ff(this),this.iHash.update(e),this}digestInto(e){ff(this),Xr(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const oc=(t,e,r)=>new S0(t,e).update(r).digest();oc.create=(t,e)=>new S0(t,e);function bM(t,e,r,n){G0(t);const i=mM({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:a}=i;if(Ha(s),Ha(o),Ha(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=sc(e),u=sc(r),l=new Uint8Array(o),f=oc.create(t,c),d=f._cloneInto().update(u);return{c:s,dkLen:o,asyncTick:a,DK:l,PRF:f,PRFSalt:d}}function BM(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),r}function CM(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:a,PRFSalt:c}=bM(t,e,r,n);let u;const l=new Uint8Array(4),f=es(l),d=new Uint8Array(a.outputLen);for(let p=1,g=0;g<s;p++,g+=a.outputLen){const A=o.subarray(g,g+a.outputLen);f.setInt32(0,p,!1),(u=c._cloneInto(u)).update(l).digestInto(d),A.set(d.subarray(0,A.length));for(let w=1;w<i;w++){a._cloneInto(u).update(d).digestInto(d);for(let C=0;C<A.length;C++)A[C]^=d[C]}}return BM(a,c,o,u,d)}function UM(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const i=BigInt(32),s=BigInt(4294967295),o=Number(r>>i&s),a=Number(r&s),c=n?4:0,u=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+u,a,n)}const vM=(t,e,r)=>t&e^~t&r,MM=(t,e,r)=>t&e^t&r^e&r;class hp extends F0{constructor(e,r,n,i){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isL