From 5b514612b5c2f665f58657806b47797458d25a04 Mon Sep 17 00:00:00 2001 From: corbanbrook Date: Tue, 17 Dec 2024 18:34:18 +0000 Subject: [PATCH] Build: (ed02c13) Updating to sequence.js v2.2.3 --- assets/index-BOacEWpx.js | 186 +++++++++++++++++++++++++++++++++++++++ assets/index-DHa5VEuO.js | 186 --------------------------------------- index.html | 2 +- 3 files changed, 187 insertions(+), 187 deletions(-) create mode 100644 assets/index-BOacEWpx.js delete mode 100644 assets/index-DHa5VEuO.js diff --git a/assets/index-BOacEWpx.js b/assets/index-BOacEWpx.js new file mode 100644 index 0000000..819741f --- /dev/null +++ b/assets/index-BOacEWpx.js @@ -0,0 +1,186 @@ +var o$=Object.defineProperty;var CA=t=>{throw TypeError(t)};var a$=(t,e,r)=>e in t?o$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var _=(t,e,r)=>a$(t,typeof e!="symbol"?e+"":e,r),Vm=(t,e,r)=>e.has(t)||CA("Cannot "+r);var w=(t,e,r)=>(Vm(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>e.has(t)?CA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),T=(t,e,r,n)=>(Vm(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Y=(t,e,r)=>(Vm(t,e,"access private method"),r);var _l=(t,e,r,n)=>({set _(s){T(t,e,s,r)},get _(){return w(t,e,n)}});function c$(t,e){for(var r=0;rn[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function p4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var y4={exports:{}},Hg={},g4={exports:{}},$e={};/** + * @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 a1=Symbol.for("react.element"),l$=Symbol.for("react.portal"),u$=Symbol.for("react.fragment"),f$=Symbol.for("react.strict_mode"),d$=Symbol.for("react.profiler"),h$=Symbol.for("react.provider"),p$=Symbol.for("react.context"),y$=Symbol.for("react.forward_ref"),g$=Symbol.for("react.suspense"),v$=Symbol.for("react.memo"),m$=Symbol.for("react.lazy"),kA=Symbol.iterator;function x$(t){return t===null||typeof t!="object"?null:(t=kA&&t[kA]||t["@@iterator"],typeof t=="function"?t:null)}var v4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m4=Object.assign,x4={};function hd(t,e,r){this.props=t,this.context=e,this.refs=x4,this.updater=r||v4}hd.prototype.isReactComponent={};hd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};hd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function b4(){}b4.prototype=hd.prototype;function wE(t,e,r){this.props=t,this.context=e,this.refs=x4,this.updater=r||v4}var EE=wE.prototype=new b4;EE.constructor=wE;m4(EE,hd.prototype);EE.isPureReactComponent=!0;var SA=Array.isArray,w4=Object.prototype.hasOwnProperty,CE={current:null},E4={key:!0,ref:!0,__self:!0,__source:!0};function C4(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)w4.call(e,n)&&!E4.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1>>1,L=E[D];if(0>>1;Ds(te,O))Js($,te)?(E[D]=$,E[J]=O,D=J):(E[D]=te,E[q]=O,D=q);else if(Js($,O))E[D]=$,E[J]=O,D=J;else break e}}return S}function s(E,S){var O=E.sortIndex-S.sortIndex;return O!==0?O:E.id-S.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,y=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(E){for(var S=r(l);S!==null;){if(S.callback===null)n(l);else if(S.startTime<=E)n(l),S.sortIndex=S.expirationTime,e(c,S);else break;S=r(l)}}function k(E){if(p=!1,m(E),!y)if(r(c)!==null)y=!0,G(A);else{var S=r(l);S!==null&&Z(k,S.startTime-E)}}function A(E,S){y=!1,p&&(p=!1,g(N),N=-1),h=!0;var O=d;try{for(m(S),f=r(c);f!==null&&(!(f.expirationTime>S)||E&&!X());){var D=f.callback;if(typeof D=="function"){f.callback=null,d=f.priorityLevel;var L=D(f.expirationTime<=S);S=t.unstable_now(),typeof L=="function"?f.callback=L:f===r(c)&&n(c),m(S)}else n(c);f=r(c)}if(f!==null)var W=!0;else{var q=r(l);q!==null&&Z(k,q.startTime-S),W=!1}return W}finally{f=null,d=O,h=!1}}var P=!1,R=null,N=-1,V=5,F=-1;function X(){return!(t.unstable_now()-FE||125D?(E.sortIndex=O,e(l,E),r(c)===null&&E===r(l)&&(p?(g(N),N=-1):p=!0,Z(k,O-D))):(E.sortIndex=L,e(c,E),y||h||(y=!0,G(A))),E},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(E){var S=d;return function(){var O=d;d=S;try{return E.apply(this,arguments)}finally{d=O}}}})(I4);T4.exports=I4;var R$=T4.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 N$=x,Nn=R$;function ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eb=Object.prototype.hasOwnProperty,_$=/^[: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]*$/,TA={},IA={};function M$(t){return Eb.call(IA,t)?!0:Eb.call(TA,t)?!1:_$.test(t)?IA[t]=!0:(TA[t]=!0,!1)}function D$(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function B$(t,e,r,n){if(e===null||typeof e>"u"||D$(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Xr(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var br={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){br[t]=new Xr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];br[e]=new Xr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){br[t]=new Xr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){br[t]=new Xr(t,2,!1,t,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(t){br[t]=new Xr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){br[t]=new Xr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){br[t]=new Xr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){br[t]=new Xr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){br[t]=new Xr(t,5,!1,t.toLowerCase(),null,!1,!1)});var SE=/[\-:]([a-z])/g;function AE(t){return t[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(t){var e=t.replace(SE,AE);br[e]=new Xr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(SE,AE);br[e]=new Xr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(SE,AE);br[e]=new Xr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){br[t]=new Xr(t,1,!1,t.toLowerCase(),null,!1,!1)});br.xlinkHref=new Xr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){br[t]=new Xr(t,1,!1,t.toLowerCase(),null,!0,!0)});function TE(t,e,r,n){var s=br.hasOwnProperty(e)?br[e]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var c=` +`+s[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Gm=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?eh(t):""}function L$(t){switch(t.tag){case 5:return eh(t.type);case 16:return eh("Lazy");case 13:return eh("Suspense");case 19:return eh("SuspenseList");case 0:case 2:case 15:return t=qm(t.type,!1),t;case 11:return t=qm(t.type.render,!1),t;case 1:return t=qm(t.type,!0),t;default:return""}}function Ab(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ru:return"Fragment";case tu:return"Portal";case Cb:return"Profiler";case IE:return"StrictMode";case kb:return"Suspense";case Sb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case R4:return(t.displayName||"Context")+".Consumer";case O4:return(t._context.displayName||"Context")+".Provider";case PE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case OE:return e=t.displayName||null,e!==null?e:Ab(t.type)||"Memo";case Bo:e=t._payload,t=t._init;try{return Ab(t(e))}catch{}}return null}function j$(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ab(e);case 8:return e===IE?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Pa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _4(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function F$(t){var e=_4(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function V1(t){t._valueTracker||(t._valueTracker=F$(t))}function M4(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=_4(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function ky(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Tb(t,e){var r=e.checked;return St({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function OA(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Pa(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function D4(t,e){e=e.checked,e!=null&&TE(t,"checked",e,!1)}function Ib(t,e){D4(t,e);var r=Pa(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Pb(t,e.type,r):e.hasOwnProperty("defaultValue")&&Pb(t,e.type,Pa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function RA(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Pb(t,e,r){(e!=="number"||ky(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var th=Array.isArray;function ku(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=z1.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Kh(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var mh={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},U$=["Webkit","ms","Moz","O"];Object.keys(mh).forEach(function(t){U$.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),mh[e]=mh[t]})});function F4(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||mh.hasOwnProperty(t)&&mh[t]?(""+e).trim():e+"px"}function U4(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=F4(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var $$=St({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 Nb(t,e){if(e){if($$[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function _b(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Mb=null;function RE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Db=null,Su=null,Au=null;function MA(t){if(t=u1(t)){if(typeof Db!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=Jg(e),Db(t.stateNode,t.type,e))}}function $4(t){Su?Au?Au.push(t):Au=[t]:Su=t}function W4(){if(Su){var t=Su,e=Au;if(Au=Su=null,MA(t),e)for(t=0;t>>=0,t===0?32:31-(X$(t)/Z$|0)|0}var H1=64,G1=4194304;function rh(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Iy(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=rh(a):(i&=o,i!==0&&(n=rh(i)))}else o=r&~s,o!==0?n=rh(o):i!==0&&(n=rh(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function c1(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Rs(e),t[e]=r}function nW(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=bh),VA=" ",zA=!1;function cT(t,e){switch(t){case"keyup":return RW.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lT(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var nu=!1;function _W(t,e){switch(t){case"compositionend":return lT(e);case"keypress":return e.which!==32?null:(zA=!0,VA);case"textInput":return t=e.data,t===VA&&zA?null:t;default:return null}}function MW(t,e){if(nu)return t==="compositionend"||!FE&&cT(t,e)?(t=oT(),Fp=BE=ua=null,nu=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=KA(r)}}function hT(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?hT(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function pT(){for(var t=window,e=ky();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=ky(t.document)}return e}function UE(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function VW(t){var e=pT(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&hT(r.ownerDocument.documentElement,r)){if(n!==null&&UE(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=QA(r,i);var o=QA(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,su=null,$b=null,Eh=null,Wb=!1;function JA(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wb||su==null||su!==ky(n)||(n=su,"selectionStart"in n&&UE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Eh&&e0(Eh,n)||(Eh=n,n=Ry($b,"onSelect"),0au||(t.current=Kb[au],Kb[au]=null,au--)}function dt(t,e){au++,Kb[au]=t.current,t.current=e}var Oa={},Mr=Ua(Oa),un=Ua(!1),ll=Oa;function Lf(t,e){var r=t.type.contextTypes;if(!r)return Oa;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function fn(t){return t=t.childContextTypes,t!=null}function _y(){vt(un),vt(Mr)}function n5(t,e,r){if(Mr.current!==Oa)throw Error(ne(168));dt(Mr,e),dt(un,r)}function CT(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(ne(108,j$(t)||"Unknown",s));return St({},r,n)}function My(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Oa,ll=Mr.current,dt(Mr,t),dt(un,un.current),!0}function s5(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=CT(t,e,ll),n.__reactInternalMemoizedMergedChildContext=t,vt(un),vt(Mr),dt(Mr,t)):vt(un),dt(un,r)}var Mi=null,Yg=!1,ax=!1;function kT(t){Mi===null?Mi=[t]:Mi.push(t)}function tV(t){Yg=!0,kT(t)}function $a(){if(!ax&&Mi!==null){ax=!0;var t=0,e=st;try{var r=Mi;for(st=1;t>=o,s-=o,Ji=1<<32-Rs(e)+s|r<N?(V=R,R=null):V=R.sibling;var F=d(g,R,m[N],k);if(F===null){R===null&&(R=V);break}t&&R&&F.alternate===null&&e(g,R),v=i(F,v,N),P===null?A=F:P.sibling=F,P=F,R=V}if(N===m.length)return r(g,R),mt&&nc(g,N),A;if(R===null){for(;NN?(V=R,R=null):V=R.sibling;var X=d(g,R,F.value,k);if(X===null){R===null&&(R=V);break}t&&R&&X.alternate===null&&e(g,R),v=i(X,v,N),P===null?A=X:P.sibling=X,P=X,R=V}if(F.done)return r(g,R),mt&&nc(g,N),A;if(R===null){for(;!F.done;N++,F=m.next())F=f(g,F.value,k),F!==null&&(v=i(F,v,N),P===null?A=F:P.sibling=F,P=F);return mt&&nc(g,N),A}for(R=n(g,R);!F.done;N++,F=m.next())F=h(R,g,N,F.value,k),F!==null&&(t&&F.alternate!==null&&R.delete(F.key===null?N:F.key),v=i(F,v,N),P===null?A=F:P.sibling=F,P=F);return t&&R.forEach(function(re){return e(g,re)}),mt&&nc(g,N),A}function b(g,v,m,k){if(typeof m=="object"&&m!==null&&m.type===ru&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case W1:e:{for(var A=m.key,P=v;P!==null;){if(P.key===A){if(A=m.type,A===ru){if(P.tag===7){r(g,P.sibling),v=s(P,m.props.children),v.return=g,g=v;break e}}else if(P.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Bo&&a5(A)===P.type){r(g,P.sibling),v=s(P,m.props),v.ref=Fd(g,P,m),v.return=g,g=v;break e}r(g,P);break}else e(g,P);P=P.sibling}m.type===ru?(v=el(m.props.children,g.mode,k,m.key),v.return=g,g=v):(k=qp(m.type,m.key,m.props,null,g.mode,k),k.ref=Fd(g,v,m),k.return=g,g=k)}return o(g);case tu:e:{for(P=m.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===m.containerInfo&&v.stateNode.implementation===m.implementation){r(g,v.sibling),v=s(v,m.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else e(g,v);v=v.sibling}v=yx(m,g.mode,k),v.return=g,g=v}return o(g);case Bo:return P=m._init,b(g,v,P(m._payload),k)}if(th(m))return y(g,v,m,k);if(Md(m))return p(g,v,m,k);Z1(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,v!==null&&v.tag===6?(r(g,v.sibling),v=s(v,m),v.return=g,g=v):(r(g,v),v=px(m,g.mode,k),v.return=g,g=v),o(g)):r(g,v)}return b}var Ff=IT(!0),PT=IT(!1),Ly=Ua(null),jy=null,uu=null,zE=null;function HE(){zE=uu=jy=null}function GE(t){var e=Ly.current;vt(Ly),t._currentValue=e}function Yb(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Iu(t,e){jy=t,zE=uu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ln=!0),t.firstContext=null)}function as(t){var e=t._currentValue;if(zE!==t)if(t={context:t,memoizedValue:e,next:null},uu===null){if(jy===null)throw Error(ne(308));uu=t,jy.dependencies={lanes:0,firstContext:t}}else uu=uu.next=t;return e}var mc=null;function qE(t){mc===null?mc=[t]:mc.push(t)}function OT(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,qE(e)):(r.next=s.next,s.next=r),e.interleaved=r,uo(t,n)}function uo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Lo=!1;function KE(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function RT(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function to(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function xa(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,qe&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,uo(t,r)}return s=n.interleaved,s===null?(e.next=e,qE(n)):(e.next=s.next,s.next=e),n.interleaved=e,uo(t,r)}function $p(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,_E(t,r)}}function c5(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function Fy(t,e,r,n){var s=t.updateQueue;Lo=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?i=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(i!==null){var f=s.baseState;o=0,u=l=c=null,a=i;do{var d=a.lane,h=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,p=a;switch(d=e,h=r,p.tag){case 1:if(y=p.payload,typeof y=="function"){f=y.call(h,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,d=typeof y=="function"?y.call(h,f,d):y,d==null)break e;f=St({},f,d);break e;case 2:Lo=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(u===null&&(c=f),s.baseState=c,s.firstBaseUpdate=l,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);dl|=o,t.lanes=o,t.memoizedState=f}}function l5(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=lx.transition;lx.transition={};try{t(!1),e()}finally{st=r,lx.transition=n}}function KT(){return cs().memoizedState}function iV(t,e,r){var n=wa(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},QT(t))JT(e,r);else if(r=OT(t,e,r,n),r!==null){var s=Kr();Ns(r,t,n,s),YT(r,e,n)}}function oV(t,e,r){var n=wa(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(QT(t))JT(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Ds(a,o)){var c=e.interleaved;c===null?(s.next=s,qE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=OT(t,e,s,n),r!==null&&(s=Kr(),Ns(r,t,n,s),YT(r,e,n))}}function QT(t){var e=t.alternate;return t===kt||e!==null&&e===kt}function JT(t,e){Ch=$y=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function YT(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,_E(t,r)}}var Wy={readContext:as,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useInsertionEffect:Cr,useLayoutEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useMutableSource:Cr,useSyncExternalStore:Cr,useId:Cr,unstable_isNewReconciler:!1},aV={readContext:as,useCallback:function(t,e){return qs().memoizedState=[t,e===void 0?null:e],t},useContext:as,useEffect:f5,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Vp(4194308,4,VT.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Vp(4194308,4,t,e)},useInsertionEffect:function(t,e){return Vp(4,2,t,e)},useMemo:function(t,e){var r=qs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=qs();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=iV.bind(null,kt,t),[n.memoizedState,t]},useRef:function(t){var e=qs();return t={current:t},e.memoizedState=t},useState:u5,useDebugValue:rC,useDeferredValue:function(t){return qs().memoizedState=t},useTransition:function(){var t=u5(!1),e=t[0];return t=sV.bind(null,t[1]),qs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=kt,s=qs();if(mt){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),or===null)throw Error(ne(349));fl&30||DT(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,f5(LT.bind(null,n,i,t),[t]),n.flags|=2048,c0(9,BT.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=qs(),e=or.identifierPrefix;if(mt){var r=Yi,n=Ji;r=(n&~(1<<32-Rs(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=o0++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ai]=e,t[n0]=n,aI(t,e,!1,!1),e.stateNode=t;e:{switch(o=_b(r,n),r){case"dialog":ht("cancel",t),ht("close",t),s=n;break;case"iframe":case"object":case"embed":ht("load",t),s=n;break;case"video":case"audio":for(s=0;sWf&&(e.flags|=128,n=!0,Ud(i,!1),e.lanes=4194304)}else{if(!n)if(t=Uy(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ud(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!mt)return kr(e),null}else 2*Mt()-i.renderingStartTime>Wf&&r!==1073741824&&(e.flags|=128,n=!0,Ud(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Mt(),e.sibling=null,r=wt.current,dt(wt,n?r&1|2:r&1),e):(kr(e),null);case 22:case 23:return cC(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Sn&1073741824&&(kr(e),e.subtreeFlags&6&&(e.flags|=8192)):kr(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function yV(t,e){switch(WE(e),e.tag){case 1:return fn(e.type)&&_y(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Uf(),vt(un),vt(Mr),YE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return JE(e),null;case 13:if(vt(wt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));jf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return vt(wt),null;case 4:return Uf(),null;case 10:return GE(e.type._context),null;case 22:case 23:return cC(),null;case 24:return null;default:return null}}var tp=!1,Rr=!1,gV=typeof WeakSet=="function"?WeakSet:Set,ge=null;function fu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Tt(t,e,n)}else r.current=null}function ow(t,e,r){try{r()}catch(n){Tt(t,e,n)}}var E5=!1;function vV(t,e){if(Vb=Py,t=pT(),UE(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===s&&(a=o),d===i&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(zb={focusedElem:t,selectionRange:r},Py=!1,ge=e;ge!==null;)if(e=ge,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ge=t;else for(;ge!==null;){e=ge;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,b=y.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?p:vs(e.type,p),b);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var m=e.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(k){Tt(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,ge=t;break}ge=e.return}return y=E5,E5=!1,y}function kh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&ow(e,r,i)}s=s.next}while(s!==n)}}function ev(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function aw(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function uI(t){var e=t.alternate;e!==null&&(t.alternate=null,uI(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ai],delete e[n0],delete e[qb],delete e[ZW],delete e[eV])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function fI(t){return t.tag===5||t.tag===3||t.tag===4}function C5(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||fI(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Ny));else if(n!==4&&(t=t.child,t!==null))for(cw(t,e,r),t=t.sibling;t!==null;)cw(t,e,r),t=t.sibling}function lw(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(lw(t,e,r),t=t.sibling;t!==null;)lw(t,e,r),t=t.sibling}var hr=null,Ss=!1;function So(t,e,r){for(r=r.child;r!==null;)dI(t,e,r),r=r.sibling}function dI(t,e,r){if(hi&&typeof hi.onCommitFiberUnmount=="function")try{hi.onCommitFiberUnmount(Gg,r)}catch{}switch(r.tag){case 5:Rr||fu(r,e);case 6:var n=hr,s=Ss;hr=null,So(t,e,r),hr=n,Ss=s,hr!==null&&(Ss?(t=hr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):hr.removeChild(r.stateNode));break;case 18:hr!==null&&(Ss?(t=hr,r=r.stateNode,t.nodeType===8?ox(t.parentNode,r):t.nodeType===1&&ox(t,r),Xh(t)):ox(hr,r.stateNode));break;case 4:n=hr,s=Ss,hr=r.stateNode.containerInfo,Ss=!0,So(t,e,r),hr=n,Ss=s;break;case 0:case 11:case 14:case 15:if(!Rr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ow(r,e,o),s=s.next}while(s!==n)}So(t,e,r);break;case 1:if(!Rr&&(fu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Tt(r,e,a)}So(t,e,r);break;case 21:So(t,e,r);break;case 22:r.mode&1?(Rr=(n=Rr)||r.memoizedState!==null,So(t,e,r),Rr=n):So(t,e,r);break;default:So(t,e,r)}}function k5(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new gV),e.forEach(function(n){var s=AV.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function fs(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=Mt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*xV(n/1960))-n,10t?16:t,fa===null)var n=!1;else{if(t=fa,fa=null,Hy=0,qe&6)throw Error(ne(331));var s=qe;for(qe|=4,ge=t.current;ge!==null;){var i=ge,o=i.child;if(ge.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cMt()-oC?Zc(t,0):iC|=r),dn(t,e)}function bI(t,e){e===0&&(t.mode&1?(e=G1,G1<<=1,!(G1&130023424)&&(G1=4194304)):e=1);var r=Kr();t=uo(t,e),t!==null&&(c1(t,e,r),dn(t,r))}function SV(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),bI(t,r)}function AV(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(e),bI(t,r)}var wI;wI=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||un.current)ln=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return ln=!1,hV(t,e,r);ln=!!(t.flags&131072)}else ln=!1,mt&&e.flags&1048576&&ST(e,By,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;zp(t,e),t=e.pendingProps;var s=Lf(e,Mr.current);Iu(e,r),s=ZE(null,e,n,t,s,r);var i=eC();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,fn(n)?(i=!0,My(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,KE(e),s.updater=Zg,e.stateNode=s,s._reactInternals=e,Zb(e,n,t,r),e=rw(null,e,n,!0,i,r)):(e.tag=0,mt&&i&&$E(e),Wr(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(zp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=IV(n),t=vs(n,t),s){case 0:e=tw(null,e,n,t,r);break e;case 1:e=x5(null,e,n,t,r);break e;case 11:e=v5(null,e,n,t,r);break e;case 14:e=m5(null,e,n,vs(n.type,t),r);break e}throw Error(ne(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:vs(n,s),tw(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:vs(n,s),x5(t,e,n,s,r);case 3:e:{if(sI(e),t===null)throw Error(ne(387));n=e.pendingProps,i=e.memoizedState,s=i.element,RT(t,e),Fy(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=$f(Error(ne(423)),e),e=b5(t,e,n,r,s);break e}else if(n!==s){s=$f(Error(ne(424)),e),e=b5(t,e,n,r,s);break e}else for(In=ma(e.stateNode.containerInfo.firstChild),Pn=e,mt=!0,As=null,r=PT(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jf(),n===s){e=fo(t,e,r);break e}Wr(t,e,n,r)}e=e.child}return e;case 5:return NT(e),t===null&&Jb(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Hb(n,s)?o=null:i!==null&&Hb(n,i)&&(e.flags|=32),nI(t,e),Wr(t,e,o,r),e.child;case 6:return t===null&&Jb(e),null;case 13:return iI(t,e,r);case 4:return QE(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ff(e,null,n,r):Wr(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:vs(n,s),v5(t,e,n,s,r);case 7:return Wr(t,e,e.pendingProps,r),e.child;case 8:return Wr(t,e,e.pendingProps.children,r),e.child;case 12:return Wr(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,dt(Ly,n._currentValue),n._currentValue=o,i!==null)if(Ds(i.value,o)){if(i.children===s.children&&!un.current){e=fo(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=to(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),Yb(i.return,r,e),a.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Yb(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Wr(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Iu(e,r),s=as(s),n=n(s),e.flags|=1,Wr(t,e,n,r),e.child;case 14:return n=e.type,s=vs(n,e.pendingProps),s=vs(n.type,s),m5(t,e,n,s,r);case 15:return tI(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:vs(n,s),zp(t,e),e.tag=1,fn(n)?(t=!0,My(e)):t=!1,Iu(e,r),XT(e,n,s),Zb(e,n,s,r),rw(null,e,n,!0,t,r);case 19:return oI(t,e,r);case 22:return rI(t,e,r)}throw Error(ne(156,e.tag))};function EI(t,e){return Q4(t,e)}function TV(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ts(t,e,r,n){return new TV(t,e,r,n)}function uC(t){return t=t.prototype,!(!t||!t.isReactComponent)}function IV(t){if(typeof t=="function")return uC(t)?1:0;if(t!=null){if(t=t.$$typeof,t===PE)return 11;if(t===OE)return 14}return 2}function Ea(t,e){var r=t.alternate;return r===null?(r=ts(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function qp(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")uC(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ru:return el(r.children,s,i,e);case IE:o=8,s|=8;break;case Cb:return t=ts(12,r,e,s|2),t.elementType=Cb,t.lanes=i,t;case kb:return t=ts(13,r,e,s),t.elementType=kb,t.lanes=i,t;case Sb:return t=ts(19,r,e,s),t.elementType=Sb,t.lanes=i,t;case N4:return rv(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case O4:o=10;break e;case R4:o=9;break e;case PE:o=11;break e;case OE:o=14;break e;case Bo:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=ts(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function el(t,e,r,n){return t=ts(7,t,n,e),t.lanes=r,t}function rv(t,e,r,n){return t=ts(22,t,n,e),t.elementType=N4,t.lanes=r,t.stateNode={isHidden:!1},t}function px(t,e,r){return t=ts(6,t,null,e),t.lanes=r,t}function yx(t,e,r){return e=ts(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function PV(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qm(0),this.expirationTimes=Qm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qm(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function fC(t,e,r,n,s,i,o,a,c){return t=new PV(t,e,r,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=ts(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},KE(i),t}function OV(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(AI)}catch(t){console.error(t)}}AI(),A4.exports=Mn;var Wa=A4.exports;const DV=p4(Wa),TI=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),av=x.createContext({});function BV(){return x.useContext(av).visualElement}const cv=x.createContext(null),lv=typeof document<"u",Ky=lv?x.useLayoutEffect:x.useEffect,II=x.createContext({strict:!1});function LV(t,e,r,n){const s=BV(),i=x.useContext(II),o=x.useContext(cv),a=x.useContext(TI).reducedMotion,c=x.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return x.useInsertionEffect(()=>{l&&l.update(r,o)}),Ky(()=>{l&&l.render()}),x.useEffect(()=>{l&&l.updateFeatures()}),(window.HandoffAppearAnimations?Ky:x.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function hu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function jV(t,e,r){return x.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):hu(r)&&(r.current=n))},[e])}function u0(t){return typeof t=="string"||Array.isArray(t)}function uv(t){return typeof t=="object"&&typeof t.start=="function"}const yC=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gC=["initial",...yC];function fv(t){return uv(t.animate)||gC.some(e=>u0(t[e]))}function PI(t){return!!(fv(t)||t.variants)}function FV(t,e){if(fv(t)){const{initial:r,animate:n}=t;return{initial:r===!1||u0(r)?r:void 0,animate:u0(n)?n:void 0}}return t.inherit!==!1?e:{}}function UV(t){const{initial:e,animate:r}=FV(t,x.useContext(av));return x.useMemo(()=>({initial:e,animate:r}),[N5(e),N5(r)])}function N5(t){return Array.isArray(t)?t.join(" "):t}const _5={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},f0={};for(const t in _5)f0[t]={isEnabled:e=>_5[t].some(r=>!!e[r])};function $V(t){for(const e in t)f0[e]={...f0[e],...t[e]}}function vC(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Th={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let WV=1;function VV(){return vC(()=>{if(Th.hasEverUpdated)return WV++})}const mC=x.createContext({}),OI=x.createContext({}),zV=Symbol.for("motionComponentSymbol");function HV({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&$V(t);function i(a,c){let l;const u={...x.useContext(TI),...a,layoutId:GV(a)},{isStatic:f}=u,d=UV(a),h=f?void 0:VV(),y=n(a,f);if(!f&&lv){d.visualElement=LV(s,y,u,e);const p=x.useContext(OI),b=x.useContext(II).strict;d.visualElement&&(l=d.visualElement.loadFeatures(u,b,t,h,p))}return x.createElement(av.Provider,{value:d},l&&d.visualElement?x.createElement(l,{visualElement:d.visualElement,...u}):null,r(s,a,h,jV(y,d.visualElement,c),y,f,d.visualElement))}const o=x.forwardRef(i);return o[zV]=s,o}function GV({layoutId:t}){const e=x.useContext(mC).id;return e&&t!==void 0?e+"-"+t:t}function qV(t){function e(n,s={}){return HV(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const KV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function xC(t){return typeof t!="string"||t.includes("-")?!1:!!(KV.indexOf(t)>-1||/[A-Z]/.test(t))}const Qy={};function QV(t){Object.assign(Qy,t)}const dv=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pl=new Set(dv);function RI(t,{layout:e,layoutId:r}){return Pl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Qy[t]||t==="opacity")}const pn=t=>!!(t&&t.getVelocity),JV={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YV=dv.length;function XV(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),_I=NI("--"),pw=NI("var(--"),ZV=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Vf=(t,e,r)=>Math.min(Math.max(r,t),e),Ol={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ih={...Ol,transform:t=>Vf(0,1,t)},sp={...Ol,default:1},Ph=t=>Math.round(t*1e5)/1e5,d0=/(-)?([\d]*\.?[\d])+/g,yw=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ez=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function d1(t){return typeof t=="string"}const h1=t=>({test:e=>d1(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),_o=h1("deg"),yi=h1("%"),Oe=h1("px"),tz=h1("vh"),rz=h1("vw"),M5={...yi,parse:t=>yi.parse(t)/100,transform:t=>yi.transform(t*100)},D5={...Ol,transform:Math.round},MI={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,radius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,size:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:sp,scaleX:sp,scaleY:sp,scaleZ:sp,skew:_o,skewX:_o,skewY:_o,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:Ih,originX:M5,originY:M5,originZ:Oe,zIndex:D5,fillOpacity:Ih,strokeOpacity:Ih,numOctaves:D5};function bC(t,e,r,n){const{style:s,vars:i,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const d=e[f];if(_I(f)){i[f]=d;continue}const h=MI[f],y=ZV(d,h);if(Pl.has(f)){if(c=!0,o[f]=y,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=y):s[f]=y}if(e.transform||(c||n?s.transform=XV(t.transform,r,u,n):s.transform&&(s.transform="none")),l){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;s.transformOrigin=`${f} ${d} ${h}`}}const wC=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DI(t,e,r){for(const n in e)!pn(e[n])&&!RI(n,r)&&(t[n]=e[n])}function nz({transformTemplate:t},e,r){return x.useMemo(()=>{const n=wC();return bC(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function sz(t,e,r){const n=t.style||{},s={};return DI(s,n,t),Object.assign(s,nz(t,e,r)),t.transformValues?t.transformValues(s):s}function iz(t,e,r){const n={},s=sz(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const oz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Jy(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||oz.has(t)}let BI=t=>!Jy(t);function az(t){t&&(BI=e=>e.startsWith("on")?!Jy(e):t(e))}try{az(require("@emotion/is-prop-valid").default)}catch{}function cz(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(BI(s)||r===!0&&Jy(s)||!e&&!Jy(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function B5(t,e,r){return typeof t=="string"?t:Oe.transform(e+r*t)}function lz(t,e,r){const n=B5(e,t.x,t.width),s=B5(r,t.y,t.height);return`${n} ${s}`}const uz={offset:"stroke-dashoffset",array:"stroke-dasharray"},fz={offset:"strokeDashoffset",array:"strokeDasharray"};function dz(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?uz:fz;t[i.offset]=Oe.transform(-n);const o=Oe.transform(e),a=Oe.transform(r);t[i.array]=`${o} ${a}`}function EC(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(bC(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:y}=t;d.transform&&(y&&(h.transform=d.transform),delete d.transform),y&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=lz(y,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&dz(d,i,o,a,!1)}const LI=()=>({...wC(),attrs:{}}),CC=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hz(t,e,r,n){const s=x.useMemo(()=>{const i=LI();return EC(i,e,{enableHardwareAcceleration:!1},CC(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};DI(i,t.style,t),s.style={...i,...s.style}}return s}function pz(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const l=(xC(r)?hz:iz)(n,o,a,r),f={...cz(n,typeof r=="string",t),...l,ref:i},{children:d}=n,h=x.useMemo(()=>pn(d)?d.get():d,[d]);return s&&(f["data-projection-id"]=s),x.createElement(r,{...f,children:h})}}const kC=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function jI(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const FI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function UI(t,e,r,n){jI(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(FI.has(s)?s:kC(s),e.attrs[s])}function SC(t,e){const{style:r}=t,n={};for(const s in r)(pn(r[s])||e.style&&pn(e.style[s])||RI(s,t))&&(n[s]=r[s]);return n}function $I(t,e){const r=SC(t,e);for(const n in t)if(pn(t[n])||pn(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function AC(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Yy=t=>Array.isArray(t),yz=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),gz=t=>Yy(t)?t[t.length-1]||0:t;function Kp(t){const e=pn(t)?t.get():t;return yz(e)?e.toValue():e}function vz({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:mz(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const WI=t=>(e,r)=>{const n=x.useContext(av),s=x.useContext(cv),i=()=>vz(t,e,n,s);return r?i():vC(i)};function mz(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Kp(i[d]);let{initial:o,animate:a}=t;const c=fv(t),l=PI(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!uv(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const y=AC(t,h);if(!y)return;const{transitionEnd:p,transition:b,...g}=y;for(const v in g){let m=g[v];if(Array.isArray(m)){const k=u?m.length-1:0;m=m[k]}m!==null&&(s[v]=m)}for(const v in p)s[v]=p[v]}),s}const xz={useVisualState:WI({scrapeMotionValuesFromProps:$I,createRenderState:LI,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}EC(r,n,{enableHardwareAcceleration:!1},CC(e.tagName),t.transformTemplate),UI(e,r)}})},bz={useVisualState:WI({scrapeMotionValuesFromProps:SC,createRenderState:wC})};function wz(t,{forwardMotionProps:e=!1},r,n){return{...xC(t)?xz:bz,preloadedFeatures:r,useRender:pz(e),createVisualElement:n,Component:t}}function Xi(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const VI=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function hv(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Ez=t=>e=>VI(e)&&t(e,hv(e));function ro(t,e,r,n){return Xi(t,e,Ez(r),n)}const Cz=(t,e)=>r=>e(t(r)),Ca=(...t)=>t.reduce(Cz);function zI(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const L5=zI("dragHorizontal"),j5=zI("dragVertical");function HI(t){let e=!1;if(t==="y")e=j5();else if(t==="x")e=L5();else{const r=L5(),n=j5();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function GI(){const t=HI(!0);return t?(t(),!1):!0}class Va{constructor(e){this.isMounted=!1,this.node=e}update(){}}function F5(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,o)=>{if(i.type==="touch"||GI())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&a[n](i,o)};return ro(t.current,r,s,{passive:!t.getProps()[n]})}class kz extends Va{mount(){this.unmount=Ca(F5(this.node,!0),F5(this.node,!1))}unmount(){}}class Sz extends Va{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ca(Xi(this.node.current,"focus",()=>this.onFocus()),Xi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qI=(t,e)=>e?t===e?!0:qI(t,e.parentElement):!1,_s=t=>t;function gx(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,hv(r))}class Az extends Va{constructor(){super(...arguments),this.removeStartListeners=_s,this.removeEndListeners=_s,this.removeAccessibleListeners=_s,this.startPointerPress=(e,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=ro(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();qI(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)},{passive:!(n.onTap||n.onPointerUp)}),o=ro(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ca(i,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||gx("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=Xi(this.node.current,"keyup",o),gx("down",(a,c)=>{this.startPress(a,c)})},r=Xi(this.node.current,"keydown",e),n=()=>{this.isPressing&&gx("cancel",(i,o)=>this.cancelPress(i,o))},s=Xi(this.node.current,"blur",n);this.removeAccessibleListeners=Ca(r,s)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(e,r)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!GI()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(e,r)}mount(){const e=this.node.getProps(),r=ro(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Xi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ca(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const gw=new WeakMap,vx=new WeakMap,Tz=t=>{const e=gw.get(t.target);e&&e(t)},Iz=t=>{t.forEach(Tz)};function Pz({root:t,...e}){const r=t||document;vx.has(r)||vx.set(r,{});const n=vx.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Iz,{root:t,...e})),n[s]}function Oz(t,e,r){const n=Pz(e);return gw.set(t,r),n.observe(t),()=>{gw.delete(t),n.unobserve(t)}}const Rz={some:0,all:1};class Nz extends Va{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:Rz[s]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=u?f:d;h&&h(l)};return Oz(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(_z(e,r))&&this.startObserver()}unmount(){}}function _z({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const Mz={inView:{Feature:Nz},tap:{Feature:Az},focus:{Feature:Sz},hover:{Feature:kz}};function KI(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),Bz=t=>/^0[^.\s]+$/.test(t),no={delta:0,timestamp:0},QI=1/60*1e3,Lz=typeof performance<"u"?()=>performance.now():()=>Date.now(),JI=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lz()),QI);function jz(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&s,d=f?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),f&&s&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=jz(()=>h0=!0),t),{}),Nr=p1.reduce((t,e)=>{const r=pv[e];return t[e]=(n,s=!1,i=!1)=>(h0||$z(),r.schedule(n,s,i)),t},{}),Ra=p1.reduce((t,e)=>(t[e]=pv[e].cancel,t),{}),mx=p1.reduce((t,e)=>(t[e]=()=>pv[e].process(no),t),{}),Uz=t=>pv[t].process(no),YI=t=>{h0=!1,no.delta=vw?QI:Math.max(Math.min(t-no.timestamp,Fz),1),no.timestamp=t,mw=!0,p1.forEach(Uz),mw=!1,h0&&(vw=!1,JI(YI))},$z=()=>{h0=!0,vw=!0,mw||JI(YI)};function TC(t,e){t.indexOf(e)===-1&&t.push(e)}function IC(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class PC{constructor(){this.subscriptions=[]}add(e){return TC(this.subscriptions,e),()=>IC(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class Vz{constructor(e,r={}){this.version="9.1.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=no;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Nr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Nr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Wz(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new PC);const n=this.events[e].add(r);return e==="change"?()=>{n(),Nr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?OC(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zf(t,e){return new Vz(t,e)}const RC=(t,e)=>r=>!!(d1(r)&&ez.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),XI=(t,e,r)=>n=>{if(!d1(n))return n;const[s,i,o,a]=n.match(d0);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zz=t=>Vf(0,255,t),xx={...Ol,transform:t=>Math.round(zz(t))},bc={test:RC("rgb","red"),parse:XI("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+xx.transform(t)+", "+xx.transform(e)+", "+xx.transform(r)+", "+Ph(Ih.transform(n))+")"};function Hz(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const xw={test:RC("#"),parse:Hz,transform:bc.transform},pu={test:RC("hsl","hue"),parse:XI("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+yi.transform(Ph(e))+", "+yi.transform(Ph(r))+", "+Ph(Ih.transform(n))+")"},$r={test:t=>bc.test(t)||xw.test(t)||pu.test(t),parse:t=>bc.test(t)?bc.parse(t):pu.test(t)?pu.parse(t):xw.parse(t),transform:t=>d1(t)?t:t.hasOwnProperty("red")?bc.transform(t):pu.transform(t)},ZI="${c}",eP="${n}";function Gz(t){var e,r;return isNaN(t)&&d1(t)&&(((e=t.match(d0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(yw))===null||r===void 0?void 0:r.length)||0)>0}function Xy(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(yw);s&&(r=s.length,t=t.replace(yw,ZI),e.push(...s.map($r.parse)));const i=t.match(d0);return i&&(n=i.length,t=t.replace(d0,eP),e.push(...i.map(Ol.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function tP(t){return Xy(t).values}function rP(t){const{values:e,numColors:r,tokenised:n}=Xy(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Kz(t){const e=tP(t);return rP(t)(e.map(qz))}const Na={test:Gz,parse:tP,createTransformer:rP,getAnimatableNone:Kz},Qz=new Set(["brightness","contrast","saturate","opacity"]);function Jz(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(d0)||[];if(!n)return t;const s=r.replace(n,"");let i=Qz.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const Yz=/([a-z-]*)\(.*?\)/g,bw={...Na,getAnimatableNone:t=>{const e=t.match(Yz);return e?e.map(Jz).join(" "):t}},Xz={...MI,color:$r,backgroundColor:$r,outlineColor:$r,fill:$r,stroke:$r,borderColor:$r,borderTopColor:$r,borderRightColor:$r,borderBottomColor:$r,borderLeftColor:$r,filter:bw,WebkitFilter:bw},NC=t=>Xz[t];function _C(t,e){let r=NC(t);return r!==bw&&(r=Na),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const nP=t=>e=>e.test(t),Zz={test:t=>t==="auto",parse:t=>t},sP=[Ol,Oe,yi,_o,rz,tz,Zz],Wd=t=>sP.find(nP(t)),eH=[...sP,$r,Na],tH=t=>eH.find(nP(t));function rH(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function nH(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function yv(t,e,r){const n=t.getProps();return AC(n,e,r!==void 0?r:n.custom,rH(t),nH(t))}function sH(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,zf(r))}function iH(t,e){const r=yv(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=gz(i[o]);sH(t,o,a)}}function oH(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,fH={current:!1},MC=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,DC=t=>e=>1-t(1-e),BC=t=>t*t,dH=DC(BC),LC=MC(BC),Ct=(t,e,r)=>-r*t+r*e+t;function bx(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hH({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;s=bx(c,a,t+1/3),i=bx(c,a,t),o=bx(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const wx=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},pH=[xw,bc,pu],yH=t=>pH.find(e=>e.test(t));function U5(t){const e=yH(t);let r=e.parse(t);return e===pu&&(r=hH(r)),r}const iP=(t,e)=>{const r=U5(t),n=U5(e),s={...r};return i=>(s.red=wx(r.red,n.red,i),s.green=wx(r.green,n.green,i),s.blue=wx(r.blue,n.blue,i),s.alpha=Ct(r.alpha,n.alpha,i),bc.transform(s))};function oP(t,e){return typeof t=="number"?r=>Ct(t,e,r):$r.test(t)?iP(t,e):cP(t,e)}const aP=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>oP(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=oP(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},cP=(t,e)=>{const r=Na.createTransformer(e),n=Xy(t),s=Xy(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?Ca(aP(n.values,s.values),r):o=>`${o>0?e:t}`},y0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},$5=(t,e)=>r=>Ct(t,e,r);function vH(t){return typeof t=="number"?$5:typeof t=="string"?$r.test(t)?iP:cP:Array.isArray(t)?aP:typeof t=="object"?gH:$5}function mH(t,e,r){const n=[],s=r||vH(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=mH(e,n,s),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Vf(t[0],t[i-1],l)):c}function xH(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=y0(0,e,n);t.push(Ct(r,1,s))}}function bH(t){const e=[0];return xH(e,t.length-1),e}function wH(t,e){return t.map(r=>r*e)}const uP=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,EH=1e-7,CH=12;function kH(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=uP(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>EH&&++akH(i,0,1,t,r);return i=>i===0||i===1?i:uP(s(i),e,n)}const dP=t=>1-Math.sin(Math.acos(t)),jC=DC(dP),SH=MC(jC),hP=fP(.33,1.53,.69,.99),FC=DC(hP),AH=MC(FC),TH=t=>(t*=2)<1?.5*FC(t):.5*(2-Math.pow(2,-10*(t-1))),W5={linear:_s,easeIn:BC,easeInOut:LC,easeOut:dH,circIn:dP,circInOut:SH,circOut:jC,backIn:FC,backInOut:AH,backOut:hP,anticipate:TH},V5=t=>{if(Array.isArray(t)){p0(t.length===4);const[e,r,n,s]=t;return fP(e,r,n,s)}else if(typeof t=="string")return p0(W5[t]!==void 0),W5[t];return t},IH=t=>Array.isArray(t)&&typeof t[0]!="number";function PH(t,e){return t.map(()=>e||LC).splice(0,t.length-1)}function ww({keyframes:t,ease:e=LC,times:r,duration:n=300}){t=[...t];const s=IH(e)?e.map(V5):V5(e),i={done:!1,value:t[0]},o=wH(r&&r.length===t.length?r:bH(t),n);function a(){return lP(o,t,{ease:Array.isArray(s)?s:PH(t,s)})}let c=a();return{next:l=>(i.value=c(l),i.done=l>=n,i),flipTarget:()=>{t.reverse(),c=a()}}}const Ex=.001,OH=.01,RH=10,NH=.05,_H=1;function MH({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i,o=1-e;o=Vf(NH,_H,o),t=Vf(OH,RH,t/1e3),o<1?(s=l=>{const u=l*o,f=u*t,d=u-r,h=Ew(l,o),y=Math.exp(-f);return Ex-d/h*y},i=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,y=Math.exp(-f),p=Ew(Math.pow(l,2),o);return(-s(l)+Ex>0?-1:1)*((d-h)*y)/p}):(s=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-Ex+u*f},i=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=BH(s,i,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const DH=12;function BH(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function FH(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!z5(t,jH)&&z5(t,LH)){const r=MH(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const UH=5;function pP({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=FH(n);let h=$H,y=u?-(u/1e3):0;const p=c/(2*Math.sqrt(a*l));function b(){const g=i-s,v=Math.sqrt(a/l)/1e3,m=Math.abs(g)<5;if(r||(r=m?.01:2),e||(e=m?.005:.5),p<1){const k=Ew(v,p);h=A=>{const P=Math.exp(-p*v*A);return i-P*((y+p*v*g)/k*Math.sin(k*A)+g*Math.cos(k*A))}}else if(p===1)h=k=>i-Math.exp(-v*k)*(g+(y+v*g)*k);else{const k=v*Math.sqrt(p*p-1);h=A=>{const P=Math.exp(-p*v*A),R=Math.min(k*A,300);return i-P*((y+p*v*g)*Math.sinh(R)+k*g*Math.cosh(R))/k}}}return b(),{next:g=>{const v=h(g);if(d)o.done=g>=f;else{let m=y;if(g!==0)if(p<1){const P=Math.max(0,g-UH);m=OC(v-h(P),g-P)}else m=0;const k=Math.abs(m)<=r,A=Math.abs(i-v)<=e;o.done=k&&A}return o.value=o.done?i:v,o},flipTarget:()=>{y=-y,[s,i]=[i,s],b()}}}pP.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const $H=t=>0;function WH({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let c=r*e;const l=o+c,u=i===void 0?l:i(l);return u!==l&&(c=u-o),{next:f=>{const d=-c*Math.exp(-f/n);return a.done=!(d>s||d<-s),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const VH={decay:WH,keyframes:ww,tween:ww,spring:pP};function yP(t,e,r=0){return t-e-r}function zH(t,e=0,r=0,n=!0){return n?yP(e+-t,e,r):e-(t-e)+r}function HH(t,e,r,n){return n?t>=e+r:t<=-r}const GH=t=>{const e=({delta:r})=>t(r);return{start:()=>Nr.update(e,!0),stop:()=>Ra.update(e)}};function eg({duration:t,driver:e=GH,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:d,type:h="keyframes",...y}){const p=r;let b,g=0,v=t,m=!1,k=!0,A;const P=VH[o.length>2?"keyframes":h]||ww,R=o[0],N=o[o.length-1];let V={done:!1,value:R};const{needsInterpolation:F}=P;F&&F(R,N)&&(A=lP([0,100],[R,N],{clamp:!1}),o=[0,100]);const X=P({...y,duration:t,keyframes:o});function re(){g++,s==="reverse"?(k=g%2===0,r=zH(r,v,i,k)):(r=yP(r,v,i),s==="mirror"&&X.flipTarget()),m=!1,f&&f()}function le(){b&&b.stop(),u&&u()}function ee(G){k||(G=-G),r+=G,m||(V=X.next(Math.max(0,r)),A&&(V.value=A(V.value)),m=k?V.done:r<=0),d&&d(V.value),m&&(g===0&&(v=v!==void 0?v:r),g{l&&l(),b&&b.stop()},set currentTime(G){r=p,ee(G)},sample:G=>{r=p;const Z=t&&typeof t=="number"?Math.max(t*.5,50):50;let E=0;for(ee(0);E<=G;){const S=G-E;ee(Math.min(S,Z)),E+=Z}return V}}}function qH(t){return!t||Array.isArray(t)||typeof t=="string"&&gP[t]}const sh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,gP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sh([0,.65,.55,1]),circOut:sh([.55,0,1,.45]),backIn:sh([.31,.01,.66,-.59]),backOut:sh([.33,1.53,.69,.99])};function KH(t){if(t)return Array.isArray(t)?sh(t):gP[t]}function QH(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:s,easing:KH(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const H5={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Cx={},vP={};for(const t in H5)vP[t]=()=>(Cx[t]===void 0&&(Cx[t]=H5[t]()),Cx[t]);function JH(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const YH=new Set(["opacity","clipPath","filter","transform"]),ip=10;function XH(t,e,{onUpdate:r,onComplete:n,...s}){if(!(vP.waapi()&&YH.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=s;if(s.type==="spring"||!qH(s.ease)){if(s.repeat===1/0)return;const f=eg({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let y=0;for(;!d.done&&y<2e4;)d=f.sample(y),h.push(d.value),y+=ip;o=h,a=y-ip,l="linear"}const u=QH(t.owner.current,e,o,{...s,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(JH(o,s)),Nr.update(()=>u.cancel()),n&&n()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const d=eg({...s,autoplay:!1});t.setWithVelocity(d.sample(f-ip).value,d.sample(f).value,ip)}Nr.update(()=>u.cancel())}}}function mP(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ra.read(n),t(i-e))};return Nr.read(n,!0),()=>Ra.read(n)}function ZH({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:mP(s,-e)}:s()}function eG({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){const y=t[0];let p;function b(k){return r!==void 0&&kn}function g(k){return r===void 0?n:n===void 0||Math.abs(r-k){f&&f(A),k.onUpdate&&k.onUpdate(A)},onComplete:d,onStop:h})}function m(k){v({type:"spring",stiffness:o,damping:a,restDelta:c,...k})}if(b(y))m({velocity:e,keyframes:[y,g(y)]});else{let k=s*e+y;typeof l<"u"&&(k=l(k));const A=g(k),P=A===r?-1:1;let R,N;const V=F=>{R=N,N=F,e=OC(F-R,no.delta),(P===1&&F>A||P===-1&&Fp&&p.stop()}}const tG={type:"spring",stiffness:500,damping:25,restSpeed:10},rG=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),nG={type:"keyframes",duration:.8},sG={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iG=(t,{keyframes:e})=>e.length>2?nG:Pl.has(t)?t.startsWith("scale")?rG(e[1]):tG:sG,Cw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Na.test(e)&&!e.startsWith("url("));function oG({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function G5(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function q5(t){return typeof t=="number"?0:_C("",t)}function xP(t,e){return t[e]||t.default||t}function aG(t,e,r,n){const s=Cw(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=_C(e,r):G5(i)&&typeof r=="string"?i=q5(r):!Array.isArray(r)&&G5(r)&&typeof i=="string"&&(r=q5(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const UC=(t,e,r,n={})=>s=>{const i=xP(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Qp(o);const c=aG(e,t,r,i),l=c[0],u=c[c.length-1],f=Cw(t,l),d=Cw(t,u);let h={keyframes:c,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:y=>{e.set(y),i.onUpdate&&i.onUpdate(y)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!f||!d||fH.current||i.type===!1)return ZH(h);if(i.type==="inertia")return eG(h);if(oG(i)||(h={...h,...iG(t,h)}),h.duration&&(h.duration=Qp(h.duration)),h.repeatDelay&&(h.repeatDelay=Qp(h.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=XH(e,t,h);if(y)return y}return eg(h)};function cG(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>kw(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=kw(t,e,r);else{const s=typeof e=="function"?yv(t,e,r.custom):e;n=bP(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function kw(t,e,r={}){const n=yv(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>bP(t,n,r):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return lG(t,e,l+c,u,f,r)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[i,o]:[o,i];return c().then(l)}else return Promise.all([i(),o(r.delay)])}function bP(t,e,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(i=n);const l=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const f in a){const d=t.getValue(f),h=a[f];if(!d||h===void 0||u&&fG(u,f))continue;const y={delay:r,elapsed:0,...i};if(window.HandoffAppearAnimations&&!d.hasAnimated){const b=t.getProps()[uH];b&&(y.elapsed=window.HandoffAppearAnimations(b,f,d,Nr))}let p=d.start(UC(f,d,h,t.shouldReduceMotion&&Pl.has(f)?{type:!1}:y));Zy(c)&&(c.add(f),p=p.then(()=>c.remove(f))),l.push(p)}return Promise.all(l).then(()=>{o&&iH(t,o)})}function lG(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,c=s===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(uG).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(kw(l,e,{...i,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function uG(t,e){return t.sortNodePosition(e)}function fG({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const dG=[...yC].reverse(),hG=yC.length;function pG(t){return e=>Promise.all(e.map(({animation:r,options:n})=>cG(t,r,n)))}function yG(t){let e=pG(t);const r=vG();let n=!0;const s=(c,l)=>{const u=yv(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function i(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let y={},p=1/0;for(let g=0;gp&&A;const F=Array.isArray(k)?k:[k];let X=F.reduce(s,{});P===!1&&(X={});const{prevResolvedValues:re={}}=m,le={...re,...X},ee=B=>{V=!0,h.delete(B),m.needsAnimating[B]=!0};for(const B in le){const G=X[B],Z=re[B];y.hasOwnProperty(B)||(G!==Z?Yy(G)&&Yy(Z)?!KI(G,Z)||N?ee(B):m.protectedKeys[B]=!0:G!==void 0?ee(B):h.add(B):G!==void 0&&h.has(B)?ee(B):m.protectedKeys[B]=!0)}m.prevProp=k,m.prevResolvedValues=X,m.isActive&&(y={...y,...X}),n&&t.blockInitialAnimation&&(V=!1),V&&!R&&d.push(...F.map(B=>({animation:B,options:{type:v,...c}})))}if(h.size){const g={};h.forEach(v=>{const m=t.getBaseTarget(v);m!==void 0&&(g[v]=m)}),d.push({animation:g})}let b=!!d.length;return n&&u.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function gG(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!KI(e,t):!1}function Za(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vG(){return{animate:Za(!0),whileInView:Za(),whileHover:Za(),whileTap:Za(),whileDrag:Za(),whileFocus:Za(),exit:Za()}}class mG extends Va{constructor(e){super(e),e.animationState||(e.animationState=yG(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),uv(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let xG=0;class bG extends Va{constructor(){super(...arguments),this.id=xG++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&i.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const wG={animation:{Feature:mG},exit:{Feature:bG}},K5=(t,e)=>Math.abs(t-e);function EG(t,e){const r=K5(t.x,e.x),n=K5(t.y,e.y);return Math.sqrt(r**2+n**2)}class wP{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=Sx(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=EG(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=l,{timestamp:h}=no;this.history.push({...d,timestamp:h});const{onStart:y,onMove:p}=this.handlers;u||(y&&y(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=kx(u,this.transformPagePoint),Nr.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=Sx(l.type==="pointercancel"?this.lastMoveEventInfo:kx(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,h),d&&d(l,h)},!VI(e))return;this.handlers=r,this.transformPagePoint=n;const s=hv(e),i=kx(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=no;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,Sx(i,this.history)),this.removeListeners=Ca(ro(window,"pointermove",this.handlePointerMove),ro(window,"pointerup",this.handlePointerUp),ro(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ra.update(this.updatePoint)}}function kx(t,e){return e?{point:e(t.point)}:t}function Q5(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Sx({point:t},e){return{point:t,delta:Q5(t,EP(e)),offset:Q5(t,CG(e)),velocity:kG(e,.1)}}function CG(t){return t[0]}function EP(t){return t[t.length-1]}function kG(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=EP(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Qp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _n(t){return t.max-t.min}function Sw(t,e=0,r=.01){return Math.abs(t-e)<=r}function J5(t,e,r,n=.5){t.origin=n,t.originPoint=Ct(e.min,e.max,t.origin),t.scale=_n(r)/_n(e),(Sw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Ct(r.min,r.max,t.origin)-t.originPoint,(Sw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Oh(t,e,r,n){J5(t.x,e.x,r.x,n?n.originX:void 0),J5(t.y,e.y,r.y,n?n.originY:void 0)}function Y5(t,e,r){t.min=r.min+e.min,t.max=t.min+_n(e)}function SG(t,e,r){Y5(t.x,e.x,r.x),Y5(t.y,e.y,r.y)}function X5(t,e,r){t.min=e.min-r.min,t.max=t.min+_n(e)}function Rh(t,e,r){X5(t.x,e.x,r.x),X5(t.y,e.y,r.y)}function AG(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Ct(r,t,n.max):Math.min(t,r)),t}function Z5(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function TG(t,{top:e,left:r,bottom:n,right:s}){return{x:Z5(t.x,r,s),y:Z5(t.y,e,n)}}function e6(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=y0(e.min,e.max-n,t.min):n>s&&(r=y0(t.min,t.max-s,e.min)),Vf(0,1,r)}function OG(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Aw=.35;function RG(t=Aw){return t===!1?t=0:t===!0&&(t=Aw),{x:t6(t,"left","right"),y:t6(t,"top","bottom")}}function t6(t,e,r){return{min:r6(t,e),max:r6(t,r)}}function r6(t,e){return typeof t=="number"?t:t[e]||0}const n6=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nh=()=>({x:n6(),y:n6()}),s6=()=>({min:0,max:0}),jt=()=>({x:s6(),y:s6()});function Ks(t){return[t("x"),t("y")]}function CP({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function NG({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function _G(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Ax(t){return t===void 0||t===1}function Tw({scale:t,scaleX:e,scaleY:r}){return!Ax(t)||!Ax(e)||!Ax(r)}function ic(t){return Tw(t)||kP(t)||t.z||t.rotate||t.rotateX||t.rotateY}function kP(t){return i6(t.x)||i6(t.y)}function i6(t){return t&&t!=="0%"}function tg(t,e,r){const n=t-r,s=e*n;return r+s}function o6(t,e,r,n,s){return s!==void 0&&(t=tg(t,s,n)),tg(t,r,n)+e}function Iw(t,e=0,r=1,n,s){t.min=o6(t.min,e,r,n,s),t.max=o6(t.max,e,r,n,s)}function SP(t,{x:e,y:r}){Iw(t.x,e.translate,e.scale,e.originPoint),Iw(t.y,r.translate,r.scale,r.originPoint)}function MG(t,e,r,n=!1){const s=r.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function jo(t,e){t.min=t.min+e,t.max=t.max+e}function c6(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=Ct(t.min,t.max,i);Iw(t,e[r],e[n],o,e.scale)}const DG=["x","scaleX","originX"],BG=["y","scaleY","originY"];function yu(t,e){c6(t.x,e,DG),c6(t.y,e,BG)}function AP(t,e){return CP(_G(t.getBoundingClientRect(),e))}function LG(t,e,r){const n=AP(t,r),{scroll:s}=e;return s&&(jo(n.x,s.offset.x),jo(n.y,s.offset.y)),n}const jG=new WeakMap;class FG{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=jt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=c=>{this.stopAnimation(),r&&this.snapToCursor(hv(c,"page").point)},i=(c,l)=>{const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=HI(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ks(y=>{let p=this.getAxisMotionValue(y).get()||0;if(yi.test(p)){const{projection:b}=this.visualElement;if(b&&b.layout){const g=b.layout.layoutBox[y];g&&(p=_n(g)*(parseFloat(p)/100))}}this.originPoint[y]=p}),d&&d(c,l);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},o=(c,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=UG(y),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h&&h(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new wP(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&i(e,r)}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!op(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=AG(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&hu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=TG(n.layoutBox,e):this.constraints=!1,this.elastic=RG(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Ks(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=OG(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!hu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=LG(n,s.root,this.visualElement.getTransformPagePoint());let o=IG(s.layout.layoutBox,i);if(r){const a=r(NG(o));this.hasMutatedConstraints=!!a,a&&(o=CP(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Ks(u=>{if(!op(u,r,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,y={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,y)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(UC(e,n,0,r))}stopAnimation(){Ks(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Ks(r=>{const{drag:n}=this.getProps();if(!op(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-Ct(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!hu(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ks(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();s[o]=PG({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Ks(o=>{if(!op(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(Ct(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;jG.set(this.visualElement,this);const e=this.visualElement.current,r=ro(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();hu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=Xi(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Ks(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),r(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Aw,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function op(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function UG(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class $G extends Va{constructor(e){super(e),this.removeGroupControls=_s,this.removeListeners=_s,this.controls=new FG(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_s}unmount(){this.removeGroupControls(),this.removeListeners()}}class WG extends Va{constructor(){super(...arguments),this.removePointerDownListener=_s}onPointerDown(e){this.session=new wP(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:e,onStart:r,onMove:n,onEnd:(i,o)=>{delete this.session,s&&s(i,o)}}}mount(){this.removePointerDownListener=ro(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function VG(){const t=x.useContext(cv);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=x.useId();return x.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function l6(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Oe.test(t))t=parseFloat(t);else return t;const r=l6(t,e.target.x),n=l6(t,e.target.y);return`${r}% ${n}%`}},TP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function zG(t){const e=TP.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Pw(t,e,r=1){const[n,s]=zG(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():pw(s)?Pw(s,e,r+1):s}function HG(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!pw(i))return;const o=Pw(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!pw(i))continue;const o=Pw(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const u6="_$css",GG={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(TP,h=>(i.push(h),u6)));const o=Na.parse(t);if(o.length>5)return n;const a=Na.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,u=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=Ct(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let d=a(o);if(s){let h=0;d=d.replace(u6,()=>{const y=i[h];return h++,y})}return d}};class qG extends zr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;QV(KG),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Th.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Nr.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function IP(t){const[e,r]=VG(),n=x.useContext(mC);return zr.createElement(qG,{...t,layoutGroup:n,switchLayoutGroup:x.useContext(OI),isPresent:e,safeToRemove:r})}const KG={borderRadius:{...Vd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vd,borderTopRightRadius:Vd,borderBottomLeftRadius:Vd,borderBottomRightRadius:Vd,boxShadow:GG};function QG(t,e,r={}){const n=pn(t)?t:zf(t);return n.start(UC("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const PP=["TopLeft","TopRight","BottomLeft","BottomRight"],JG=PP.length,f6=t=>typeof t=="string"?parseFloat(t):t,d6=t=>typeof t=="number"||Oe.test(t);function YG(t,e,r,n,s,i){s?(t.opacity=Ct(0,r.opacity!==void 0?r.opacity:1,XG(n)),t.opacityExit=Ct(e.opacity!==void 0?e.opacity:1,0,ZG(n))):i&&(t.opacity=Ct(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(y0(t,e,n))}function p6(t,e){t.min=e.min,t.max=e.max}function Bn(t,e){p6(t.x,e.x),p6(t.y,e.y)}function y6(t,e,r,n,s){return t-=e,t=tg(t,1/r,n),s!==void 0&&(t=tg(t,1/s,n)),t}function eq(t,e=0,r=1,n=.5,s,i=t,o=t){if(yi.test(e)&&(e=parseFloat(e),e=Ct(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Ct(i.min,i.max,n);t===i&&(a-=e),t.min=y6(t.min,e,r,a,s),t.max=y6(t.max,e,r,a,s)}function g6(t,e,[r,n,s],i,o){eq(t,e[r],e[n],e[s],e.scale,i,o)}const tq=["x","scaleX","originX"],rq=["y","scaleY","originY"];function v6(t,e,r,n){g6(t.x,e,tq,r?r.x:void 0,n?n.x:void 0),g6(t.y,e,rq,r?r.y:void 0,n?n.y:void 0)}function m6(t){return t.translate===0&&t.scale===1}function RP(t){return m6(t.x)&&m6(t.y)}function Ow(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function x6(t){return _n(t.x)/_n(t.y)}class nq{constructor(){this.members=[]}add(e){TC(this.members,e),e.scheduleRender()}remove(e){if(IC(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function b6(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const sq=(t,e)=>t.depth-e.depth;class iq{constructor(){this.children=[],this.isDirty=!1}add(e){TC(this.children,e),this.isDirty=!0}remove(e){IC(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sq),this.isDirty=!1,this.children.forEach(e)}}function oq(t){window.MotionDebug&&window.MotionDebug.record(t)}const w6=["","X","Y","Z"],E6=1e3;let aq=0;const oc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function NP({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=aq++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{oc.totalNodes=oc.resolvedTargetDeltas=oc.recalculatedProjection=0,this.nodes.forEach(uq),this.nodes.forEach(pq),this.nodes.forEach(yq),this.nodes.forEach(fq),oq(oc)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=mP(d,250),Th.hasAnimatedSinceResize&&(Th.hasAnimatedSinceResize=!1,this.nodes.forEach(k6))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||bq,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=u.getProps(),v=!this.targetLayout||!Ow(this.targetLayout,y)||h,m=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||m||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,m);const k={...xP(p,"layout"),onPlay:b,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else!d&&this.animationProgress===0&&k6(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ra.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gq),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=k/1e3;S6(f.x,o.x,A),S6(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rh(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),mq(this.relativeTarget,this.relativeTargetOrigin,d,A),m&&Ow(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=jt()),Bn(m,this.relativeTarget)),p&&(this.animationValues=u,YG(u,l,this.latestValues,A,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ra.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nr.update(()=>{Th.hasAnimatedSinceResize=!0,this.currentAnimation=QG(0,E6,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(E6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&_P(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||jt();const f=_n(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=_n(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}Bn(a,c),yu(a,u),Oh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nq),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(C6),this.root.sharedNodes.clear()}}}function cq(t){t.updateLayout()}function lq(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=r.source!==t.layout.source;i==="size"?Ks(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=_n(d);d.min=n[f].min,d.max=d.min+h}):_P(i,r.layoutBox,n)&&Ks(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=_n(n[f]);d.max=d.min+h});const a=Nh();Oh(a,n,r.layoutBox);const c=Nh();o?Oh(c,t.applyTransform(s,!0),r.measuredBox):Oh(c,n,r.layoutBox);const l=!RP(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const y=jt();Rh(y,r.layoutBox,d.layoutBox);const p=jt();Rh(p,n,h.layoutBox),Ow(y,p)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=y,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function uq(t){oc.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function fq(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function dq(t){t.clearSnapshot()}function C6(t){t.clearMeasurements()}function hq(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function k6(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function pq(t){t.resolveTargetDelta()}function yq(t){t.calcProjection()}function gq(t){t.resetRotation()}function vq(t){t.removeLeadSnapshot()}function S6(t,e,r){t.translate=Ct(e.translate,0,r),t.scale=Ct(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function A6(t,e,r,n){t.min=Ct(e.min,r.min,n),t.max=Ct(e.max,r.max,n)}function mq(t,e,r,n){A6(t.x,e.x,r.x,n),A6(t.y,e.y,r.y,n)}function xq(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const bq={duration:.45,ease:[.4,0,.1,1]};function wq(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(t.path[i].instance){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function T6(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Eq(t){T6(t.x),T6(t.y)}function _P(t,e,r){return t==="position"||t==="preserve-aspect"&&!Sw(x6(e),x6(r),.2)}const Cq=NP({attachResizeListener:(t,e)=>Xi(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Tx={current:void 0},MP=NP({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Tx.current){const t=new Cq(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Tx.current=t}return Tx.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),kq={pan:{Feature:WG},drag:{Feature:$G,ProjectionNode:MP,MeasureLayout:IP}},Sq=new Set(["width","height","top","left","right","bottom","x","y"]),DP=t=>Sq.has(t),Aq=t=>Object.keys(t).some(DP),I6=t=>t===Ol||t===Oe,P6=(t,e)=>parseFloat(t.split(", ")[e]),O6=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return P6(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?P6(i[1],t):0}},Tq=new Set(["x","y","z"]),Iq=dv.filter(t=>!Tq.has(t));function Pq(t){const e=[];return Iq.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const R6={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:O6(4,13),y:O6(5,14)},Oq=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=R6[l](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=R6[l](c,i)}),t},Rq=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(DP);let i=[],o=!1;const a=[];if(s.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Wd(u);const d=e[c];let h;if(Yy(d)){const y=d.length,p=d[0]===null?1:0;u=d[p],f=Wd(u);for(let b=p;b=0?window.pageYOffset:null,l=Oq(e,t,a);return i.length&&i.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),lv&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function Nq(t,e,r,n){return Aq(e)?Rq(t,e,r,n):{target:e,transitionEnd:n}}const _q=(t,e,r,n)=>{const s=HG(t,e,n);return e=s.target,n=s.transitionEnd,Nq(t,e,r,n)},Rw={current:null},BP={current:!1};function Mq(){if(BP.current=!0,!!lv)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Rw.current=t.matches;t.addListener(e),e()}else Rw.current=!1}function Dq(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(pn(i))t.addValue(s,i),Zy(n)&&n.add(s);else if(pn(o))t.addValue(s,zf(i,{owner:t})),Zy(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,zf(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const LP=Object.keys(f0),Bq=LP.length,N6=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Lq=gC.length;class jq{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Nr.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=fv(r),this.isVariantNode=PI(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(r,{});for(const f in u){const d=u[f];a[f]!==void 0&&pn(d)&&(d.set(a[f],!1),Zy(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),BP.current||Mq(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Rw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ra.update(this.notifyUpdate),Ra.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=Pl.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Nr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o){let a,c;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:y})}return c}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update(this.props,this.prevProps):(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):jt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=zf(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=AC(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!pn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new PC),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class jP extends jq{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=cH(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){oH(this,n,o);const a=_q(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function Fq(t){return window.getComputedStyle(t)}class Uq extends jP{readValueFromInstance(e,r){if(Pl.has(r)){const n=NC(r);return n&&n.default||0}else{const n=Fq(e),s=(_I(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return AP(e,r)}build(e,r,n,s){bC(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return SC(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;pn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){jI(e,r,n,s)}}class $q extends jP{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Pl.has(r)){const n=NC(r);return n&&n.default||0}return r=FI.has(r)?r:kC(r),e.getAttribute(r)}measureInstanceViewportBox(){return jt()}scrapeMotionValuesFromProps(e,r){return $I(e,r)}build(e,r,n,s){EC(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){UI(e,r,n,s)}mount(e){this.isSVGTag=CC(e.tagName),super.mount(e)}}const Wq=(t,e)=>xC(t)?new $q(e,{enableHardwareAcceleration:!1}):new Uq(e,{enableHardwareAcceleration:!0}),Vq={layout:{ProjectionNode:MP,MeasureLayout:IP}},zq={...wG,...Mz,...kq,...Vq},Ou=qV((t,e)=>wz(t,e,zq,Wq));function FP(){const t=x.useRef(!1);return Ky(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Hq(){const t=FP(),[e,r]=x.useState(0),n=x.useCallback(()=>{t.current&&r(e+1)},[e]);return[x.useCallback(()=>Nr.postRender(n),[n]),e]}class Gq extends x.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function qq({children:t,isPresent:e}){const r=x.useId(),n=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0});return x.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:c}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` + [data-motion-pop-id="${r}"] { + position: absolute !important; + width: ${i}px !important; + height: ${o}px !important; + top: ${a}px !important; + left: ${c}px !important; + } + `),()=>{document.head.removeChild(l)}},[e]),x.createElement(Gq,{isPresent:e,childRef:n,sizeRef:s},x.cloneElement(t,{ref:n}))}const Ix=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=vC(Kq),c=x.useId(),l=x.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?void 0:[r]);return x.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),x.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=x.createElement(qq,{isPresent:r},t)),x.createElement(cv.Provider,{value:l},t)};function Kq(){return new Map}function Qq(t){return x.useEffect(()=>()=>t(),[])}const Ql=t=>t.key||"";function Jq(t,e){t.forEach(r=>{const n=Ql(r);e.set(n,r)})}function Yq(t){const e=[];return x.Children.forEach(t,r=>{x.isValidElement(r)&&e.push(r)}),e}const UP=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=Hq();const c=x.useContext(mC).forceRender;c&&(a=c);const l=FP(),u=Yq(t);let f=u;const d=new Set,h=x.useRef(f),y=x.useRef(new Map).current,p=x.useRef(!0);if(Ky(()=>{p.current=!1,Jq(u,y),h.current=f}),Qq(()=>{p.current=!0,y.clear(),d.clear()}),p.current)return x.createElement(x.Fragment,null,f.map(m=>x.createElement(Ix,{key:Ql(m),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},m)));f=[...f];const b=h.current.map(Ql),g=u.map(Ql),v=b.length;for(let m=0;m{if(g.indexOf(m)!==-1)return;const k=y.get(m);if(!k)return;const A=b.indexOf(m),P=()=>{y.delete(m),d.delete(m);const R=h.current.findIndex(N=>N.key===m);if(h.current.splice(R,1),!d.size){if(h.current=u,l.current===!1)return;a(),n&&n()}};f.splice(A,0,x.createElement(Ix,{key:Ql(k),isPresent:!1,onExitComplete:P,custom:e,presenceAffectsLayout:i,mode:o},k))}),f=f.map(m=>{const k=m.key;return d.has(k)?m:x.createElement(Ix,{key:Ql(m),isPresent:!0,presenceAffectsLayout:i,mode:o},m)}),x.createElement(x.Fragment,null,d.size?f:f.map(m=>x.cloneElement(m)))},$P={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( + 243.18deg, + rgba(86, 52, 189, 0.85) 0%, + rgba(49, 41, 223, 0.85) 63.54%, + rgba(7, 98, 149, 0.85) 100% + )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},Xq={...$P,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},Zq={...$P,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},eK={grey:{50:"#D1D1D1",100:"#B0B0B0",200:"#888888",300:"#6D6D6D",400:"#5D5D5D",500:"#4F4F4F",600:"#454545",700:"#3D3D3D",800:"#262626",900:"#1B1B1B",950:"#101010"},red:{50:"#FDF7EF",100:"#FBECD9",200:"#F6D7B2",300:"#F1BB80",400:"#EA954D",500:"#E5792A",600:"#D66020",700:"#C2501F",800:"#8E3B1E",900:"#72331C",950:"#3E170C"},green:{50:"#F0FDF5",100:"#DCFCE9",200:"#BAF8D4",300:"#85F0B3",400:"#48E089",500:"#1FC266",600:"#14A554",700:"#148144",800:"#156639",900:"#135431",950:"#042F19"},yellow:{50:"#FBFAEB",100:"#F6F2CB",200:"#EFE499",300:"#E5CE5F",400:"#DDB938",500:"#CDA125",600:"#B07E1E",700:"#8D5C1B",800:"#754A1E",900:"#653F1E",950:"#3A200E"},blue:{50:"#F0F8FF",100:"#E0F0FE",200:"#B9E0FE",300:"#7CC8FD",400:"#36AEFA",500:"#0C94EB",600:"#0076CC",700:"#015CA3",800:"#064F86",900:"#0B426F",950:"#072A4A"},indigo:{50:"#F2F2FF",100:"#E9E7FF",200:"#D3D1FF",300:"#B3ADFF",400:"#8E7EFF",500:"#6A4AFF",600:"#5826FF",700:"#4411E1",800:"#3D10C7",900:"#340FA3",950:"#1C066F"},violet:{50:"#F3F2FF",100:"#EBE8FF",200:"#D9D3FF",300:"#BDB0FF",400:"#9D84FF",500:"#7F52FF",600:"#7537F9",700:"#601CE5",800:"#5117C0",900:"#43159D",950:"#270A6B"}},tK={dark:Xq,light:Zq,palettes:eK},rK={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var _6={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function nK(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sK(t){var e=nK(t,"string");return typeof e=="symbol"?e:String(e)}function iK(t,e,r){return e=sK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function M6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Px(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],u={},f=Px({},c),d=!1;for(var h of o){var y=c[h];if(y!=null){var p=s[h];d=!0;for(var b of p.mappings)u[b]=y,f[b]==null&&delete f[b]}}var g=d?Px(Px({},u),f):c,v=function(){var A=g[m],P=s[m];try{if(P.mappings)return 1;if(typeof A=="string"||typeof A=="number")l.push(P.values[A].defaultClass);else if(Array.isArray(A))for(var R=0;Rt,cK=function(){return oK(aK)(...arguments)},WP=cK({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},18:{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},20:{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"0.25":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},"0.5":{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},"1.5":{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},none:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},px:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},auto:{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},full:{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"1/2":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/3":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"2/3":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},"1/4":{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},"3/4":{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},fit:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},max:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},min:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"},vw:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},vh:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"}}},height:{values:{0:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},1:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},2:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},3:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},4:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},5:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},6:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},7:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},8:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},9:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},10:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},12:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},14:{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},16:{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},18:{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},20:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},"0.25":{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},"0.5":{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},"1.5":{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},none:{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},px:{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},auto:{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},full:{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"1/2":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},"1/3":{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},"2/3":{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},"1/4":{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},"3/4":{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},fit:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"},max:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},min:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},vw:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},vh:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},1:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},2:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},3:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},4:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},5:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},6:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},7:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},8:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},9:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},10:{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},12:{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},14:{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},16:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},18:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},20:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},"0.25":{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"0.5":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1.5":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},none:{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},px:{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},auto:{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},full:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},"1/2":{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},"1/3":{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},"2/3":{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},"1/4":{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"},"3/4":{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},fit:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},max:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},min:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},vw:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},vh:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},1:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},2:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},3:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},4:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},5:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},6:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},7:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},8:{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},9:{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},10:{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},12:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},14:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},16:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},18:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},20:{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"0.25":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"0.5":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1.5":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},none:{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},px:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},auto:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},full:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},"1/2":{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},"1/3":{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"},"2/3":{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},"1/4":{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},"3/4":{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},fit:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},max:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},min:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},vw:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},vh:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},1:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},2:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},3:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},4:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},5:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},6:{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},7:{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},8:{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},9:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},10:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},12:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},14:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},16:{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},18:{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},20:{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"0.25":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"0.5":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},"1.5":{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},none:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},px:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},auto:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},full:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"},"1/2":{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},"1/3":{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},"2/3":{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},"1/4":{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},"3/4":{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},fit:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},max:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},min:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},vw:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},vh:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},1:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},2:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},3:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},4:{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},5:{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},6:{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},7:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},8:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},9:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},10:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},12:{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},14:{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},16:{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},18:{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},20:{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},"0.25":{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},"0.5":{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},"1.5":{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},none:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},px:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"},auto:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},full:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},"1/2":{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},"1/3":{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},"2/3":{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},"1/4":{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},"3/4":{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},fit:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},max:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},min:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},vw:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},vh:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"}}},top:{values:{0:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},1:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},2:{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},3:{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},4:{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},5:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"},6:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},7:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},8:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},9:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},10:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},12:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},14:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},16:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},18:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},20:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},"0.25":{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},"0.5":{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},"1.5":{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},auto:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"}}},bottom:{values:{0:{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},1:{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},2:{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},3:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"},4:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},5:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},6:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},7:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},8:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},9:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},10:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},12:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},14:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},16:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},18:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},20:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},"0.25":{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},"0.5":{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"1.5":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},auto:{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"}}},left:{values:{0:{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},1:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"},2:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},3:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},4:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},5:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},6:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},7:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},8:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},9:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},10:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},12:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},14:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},16:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},18:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},20:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},right:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},18:{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},20:{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"0.25":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"},"0.5":{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},"1.5":{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},auto:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},1:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},2:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},3:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},4:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},5:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},6:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},7:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},8:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},9:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},10:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},12:{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},14:{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},16:{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"},18:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},20:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},"0.25":{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},"0.5":{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},"1.5":{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},1:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},2:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},3:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},4:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},5:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},6:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},7:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},8:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},9:{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},10:{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},12:{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"},14:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},16:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},18:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},20:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},"0.25":{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},"0.5":{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},"1.5":{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},1:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},2:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},3:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},4:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},5:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},6:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},7:{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},8:{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},9:{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"},10:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},12:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},14:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},16:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},18:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},20:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},"0.25":{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},"0.5":{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},"1.5":{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},1:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},2:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},3:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},4:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},5:{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},6:{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},7:{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},8:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"},9:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},10:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},12:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},14:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},16:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},18:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},20:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},"0.25":{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},"0.5":{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},"1.5":{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"}}},marginTop:{values:{0:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},1:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},2:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},3:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},4:{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},5:{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},6:{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},7:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"},8:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},9:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},10:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},12:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},14:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},16:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},18:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},20:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},"0.25":{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},"0.5":{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},"1.5":{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},auto:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},1:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},2:{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},3:{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},4:{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},5:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"},6:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},7:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},8:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},9:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},10:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},12:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},14:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},16:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},18:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},20:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},"0.25":{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},"0.5":{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},"1.5":{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},auto:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},1:{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},2:{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},3:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"},4:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},5:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},6:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},7:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},8:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},9:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},10:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},12:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},14:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},16:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},18:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},20:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},"0.25":{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},"0.5":{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"1.5":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},auto:{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"}}},marginRight:{values:{0:{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"},1:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},2:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},3:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"},4:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},5:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},6:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"},7:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},8:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},9:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"},10:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},12:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},14:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"},16:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},18:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},20:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},"0.25":{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},"0.5":{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},"1.5":{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"},auto:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"}}},gap:{values:{0:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},1:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},2:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},3:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},4:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"},5:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},6:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},7:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},8:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},9:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},10:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"},12:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},14:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},16:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},18:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},20:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},"0.25":{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"},"0.5":{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},"1.5":{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},thin:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},thick:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},thin:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"},thick:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},thin:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},thick:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"},thin:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},thick:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},xs:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"},sm:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},md:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},lg:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},circle:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},xs:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"},sm:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},md:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},lg:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"},circle:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},xs:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},sm:{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},md:{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},lg:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},circle:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},xs:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},sm:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},md:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"},lg:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},circle:{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},xsmall:{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"},small:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},normal:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"},medium:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},large:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"},xlarge:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},normal:{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"},medium:{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},semibold:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},bold:{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},none:{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},normal:{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},wide:{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},5:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},6:{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},7:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"},9:{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},inherit:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},left:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},right:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},display:{values:{block:{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},flex:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},grid:{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},"inline-block":{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},"inline-flex":{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"},none:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},contents:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"}}},position:{values:{absolute:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},fixed:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"},relative:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},sticky:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},"column-reverse":{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"},row:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},"row-reverse":{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ms",md:"fyvr11mt",lg:"fyvr11mu",xl:"fyvr11mv"},defaultClass:"fyvr11ms"},1:{conditions:{sm:"fyvr11mw",md:"fyvr11mx",lg:"fyvr11my",xl:"fyvr11mz"},defaultClass:"fyvr11mw"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11n0",md:"fyvr11n1",lg:"fyvr11n2",xl:"fyvr11n3"},defaultClass:"fyvr11n0"},1:{conditions:{sm:"fyvr11n4",md:"fyvr11n5",lg:"fyvr11n6",xl:"fyvr11n7"},defaultClass:"fyvr11n4"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11n8",md:"fyvr11n9",lg:"fyvr11na",xl:"fyvr11nb"},defaultClass:"fyvr11n8"},wrap:{conditions:{sm:"fyvr11nc",md:"fyvr11nd",lg:"fyvr11ne",xl:"fyvr11nf"},defaultClass:"fyvr11nc"},"wrap-reverse":{conditions:{sm:"fyvr11ng",md:"fyvr11nh",lg:"fyvr11ni",xl:"fyvr11nj"},defaultClass:"fyvr11ng"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11nk",md:"fyvr11nl",lg:"fyvr11nm",xl:"fyvr11nn"},defaultClass:"fyvr11nk"},center:{conditions:{sm:"fyvr11no",md:"fyvr11np",lg:"fyvr11nq",xl:"fyvr11nr"},defaultClass:"fyvr11no"},"flex-end":{conditions:{sm:"fyvr11ns",md:"fyvr11nt",lg:"fyvr11nu",xl:"fyvr11nv"},defaultClass:"fyvr11ns"},stretch:{conditions:{sm:"fyvr11nw",md:"fyvr11nx",lg:"fyvr11ny",xl:"fyvr11nz"},defaultClass:"fyvr11nw"},"space-around":{conditions:{sm:"fyvr11o0",md:"fyvr11o1",lg:"fyvr11o2",xl:"fyvr11o3"},defaultClass:"fyvr11o0"},"space-between":{conditions:{sm:"fyvr11o4",md:"fyvr11o5",lg:"fyvr11o6",xl:"fyvr11o7"},defaultClass:"fyvr11o4"},"space-evenly":{conditions:{sm:"fyvr11o8",md:"fyvr11o9",lg:"fyvr11oa",xl:"fyvr11ob"},defaultClass:"fyvr11o8"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11oc",md:"fyvr11od",lg:"fyvr11oe",xl:"fyvr11of"},defaultClass:"fyvr11oc"},center:{conditions:{sm:"fyvr11og",md:"fyvr11oh",lg:"fyvr11oi",xl:"fyvr11oj"},defaultClass:"fyvr11og"},"flex-end":{conditions:{sm:"fyvr11ok",md:"fyvr11ol",lg:"fyvr11om",xl:"fyvr11on"},defaultClass:"fyvr11ok"},stretch:{conditions:{sm:"fyvr11oo",md:"fyvr11op",lg:"fyvr11oq",xl:"fyvr11or"},defaultClass:"fyvr11oo"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11os",md:"fyvr11ot",lg:"fyvr11ou",xl:"fyvr11ov"},defaultClass:"fyvr11os"},center:{conditions:{sm:"fyvr11ow",md:"fyvr11ox",lg:"fyvr11oy",xl:"fyvr11oz"},defaultClass:"fyvr11ow"},"flex-end":{conditions:{sm:"fyvr11p0",md:"fyvr11p1",lg:"fyvr11p2",xl:"fyvr11p3"},defaultClass:"fyvr11p0"},stretch:{conditions:{sm:"fyvr11p4",md:"fyvr11p5",lg:"fyvr11p6",xl:"fyvr11p7"},defaultClass:"fyvr11p4"},baseline:{conditions:{sm:"fyvr11p8",md:"fyvr11p9",lg:"fyvr11pa",xl:"fyvr11pb"},defaultClass:"fyvr11p8"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11pc",md:"fyvr11pd",lg:"fyvr11pe",xl:"fyvr11pf"},defaultClass:"fyvr11pc"},center:{conditions:{sm:"fyvr11pg",md:"fyvr11ph",lg:"fyvr11pi",xl:"fyvr11pj"},defaultClass:"fyvr11pg"},"flex-end":{conditions:{sm:"fyvr11pk",md:"fyvr11pl",lg:"fyvr11pm",xl:"fyvr11pn"},defaultClass:"fyvr11pk"},stretch:{conditions:{sm:"fyvr11po",md:"fyvr11pp",lg:"fyvr11pq",xl:"fyvr11pr"},defaultClass:"fyvr11po"},baseline:{conditions:{sm:"fyvr11ps",md:"fyvr11pt",lg:"fyvr11pu",xl:"fyvr11pv"},defaultClass:"fyvr11ps"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11pw",md:"fyvr11px",lg:"fyvr11py",xl:"fyvr11pz"},defaultClass:"fyvr11pw"},hidden:{conditions:{sm:"fyvr11q0",md:"fyvr11q1",lg:"fyvr11q2",xl:"fyvr11q3"},defaultClass:"fyvr11q0"},scroll:{conditions:{sm:"fyvr11q4",md:"fyvr11q5",lg:"fyvr11q6",xl:"fyvr11q7"},defaultClass:"fyvr11q4"},visible:{conditions:{sm:"fyvr11q8",md:"fyvr11q9",lg:"fyvr11qa",xl:"fyvr11qb"},defaultClass:"fyvr11q8"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11qc",md:"fyvr11qd",lg:"fyvr11qe",xl:"fyvr11qf"},defaultClass:"fyvr11qc"},hidden:{conditions:{sm:"fyvr11qg",md:"fyvr11qh",lg:"fyvr11qi",xl:"fyvr11qj"},defaultClass:"fyvr11qg"},scroll:{conditions:{sm:"fyvr11qk",md:"fyvr11ql",lg:"fyvr11qm",xl:"fyvr11qn"},defaultClass:"fyvr11qk"},visible:{conditions:{sm:"fyvr11qo",md:"fyvr11qp",lg:"fyvr11qq",xl:"fyvr11qr"},defaultClass:"fyvr11qo"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11qs",md:"fyvr11qt",lg:"fyvr11qu",xl:"fyvr11qv"},defaultClass:"fyvr11qs"},visible:{conditions:{sm:"fyvr11qw",md:"fyvr11qx",lg:"fyvr11qy",xl:"fyvr11qz"},defaultClass:"fyvr11qw"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11r0"},none:{defaultClass:"fyvr11r1"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11r2"},body:{defaultClass:"fyvr11r3"},mono:{defaultClass:"fyvr11r4"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11r5"},clip:{defaultClass:"fyvr11r6"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11r7"},lowercase:{defaultClass:"fyvr11r8"},uppercase:{defaultClass:"fyvr11r9"}}},textDecoration:{values:{none:{defaultClass:"fyvr11ra"},underline:{defaultClass:"fyvr11rb"}}},userSelect:{values:{none:{defaultClass:"fyvr11rc"},text:{defaultClass:"fyvr11rd"},all:{defaultClass:"fyvr11re"},auto:{defaultClass:"fyvr11rf"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11rg"},nowrap:{defaultClass:"fyvr11rh"},initial:{defaultClass:"fyvr11ri"},inherit:{defaultClass:"fyvr11rj"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11rk"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11rl"},"break-word":{defaultClass:"fyvr11rm"},initial:{defaultClass:"fyvr11rn"},inherit:{defaultClass:"fyvr11ro"}}},zIndex:{values:{0:{defaultClass:"fyvr11rp"},1:{defaultClass:"fyvr11rq"},10:{defaultClass:"fyvr11rr"},20:{defaultClass:"fyvr11rs"},30:{defaultClass:"fyvr11rt"},40:{defaultClass:"fyvr11ru"},50:{defaultClass:"fyvr11rv"},"-1":{defaultClass:"fyvr11rw"},auto:{defaultClass:"fyvr11rx"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11ry"},"16/9":{defaultClass:"fyvr11rz"},"4/3":{defaultClass:"fyvr11s0"},"3/1":{defaultClass:"fyvr11s1"},auto:{defaultClass:"fyvr11s2"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11s3",active:"fyvr11s4",disabled:"fyvr11s5",focus:"fyvr11s6",hover:"fyvr11s7",checked:"fyvr11s8"},defaultClass:"fyvr11s3"},white:{conditions:{base:"fyvr11s9",active:"fyvr11sa",disabled:"fyvr11sb",focus:"fyvr11sc",hover:"fyvr11sd",checked:"fyvr11se"},defaultClass:"fyvr11s9"},inherit:{conditions:{base:"fyvr11sf",active:"fyvr11sg",disabled:"fyvr11sh",focus:"fyvr11si",hover:"fyvr11sj",checked:"fyvr11sk"},defaultClass:"fyvr11sf"},transparent:{conditions:{base:"fyvr11sl",active:"fyvr11sm",disabled:"fyvr11sn",focus:"fyvr11so",hover:"fyvr11sp",checked:"fyvr11sq"},defaultClass:"fyvr11sl"},positive:{conditions:{base:"fyvr11sr",active:"fyvr11ss",disabled:"fyvr11st",focus:"fyvr11su",hover:"fyvr11sv",checked:"fyvr11sw"},defaultClass:"fyvr11sr"},negative:{conditions:{base:"fyvr11sx",active:"fyvr11sy",disabled:"fyvr11sz",focus:"fyvr11t0",hover:"fyvr11t1",checked:"fyvr11t2"},defaultClass:"fyvr11sx"},info:{conditions:{base:"fyvr11t3",active:"fyvr11t4",disabled:"fyvr11t5",focus:"fyvr11t6",hover:"fyvr11t7",checked:"fyvr11t8"},defaultClass:"fyvr11t3"},warning:{conditions:{base:"fyvr11t9",active:"fyvr11ta",disabled:"fyvr11tb",focus:"fyvr11tc",hover:"fyvr11td",checked:"fyvr11te"},defaultClass:"fyvr11t9"},gradientBackdrop:{conditions:{base:"fyvr11tf",active:"fyvr11tg",disabled:"fyvr11th",focus:"fyvr11ti",hover:"fyvr11tj",checked:"fyvr11tk"},defaultClass:"fyvr11tf"},gradientPrimary:{conditions:{base:"fyvr11tl",active:"fyvr11tm",disabled:"fyvr11tn",focus:"fyvr11to",hover:"fyvr11tp",checked:"fyvr11tq"},defaultClass:"fyvr11tl"},gradientSecondary:{conditions:{base:"fyvr11tr",active:"fyvr11ts",disabled:"fyvr11tt",focus:"fyvr11tu",hover:"fyvr11tv",checked:"fyvr11tw"},defaultClass:"fyvr11tr"},arbitrumDark:{conditions:{base:"fyvr11tx",active:"fyvr11ty",disabled:"fyvr11tz",focus:"fyvr11u0",hover:"fyvr11u1",checked:"fyvr11u2"},defaultClass:"fyvr11tx"},arbitrumLight:{conditions:{base:"fyvr11u3",active:"fyvr11u4",disabled:"fyvr11u5",focus:"fyvr11u6",hover:"fyvr11u7",checked:"fyvr11u8"},defaultClass:"fyvr11u3"},avalanceDark:{conditions:{base:"fyvr11u9",active:"fyvr11ua",disabled:"fyvr11ub",focus:"fyvr11uc",hover:"fyvr11ud",checked:"fyvr11ue"},defaultClass:"fyvr11u9"},avalanceLight:{conditions:{base:"fyvr11uf",active:"fyvr11ug",disabled:"fyvr11uh",focus:"fyvr11ui",hover:"fyvr11uj",checked:"fyvr11uk"},defaultClass:"fyvr11uf"},bscDark:{conditions:{base:"fyvr11ul",active:"fyvr11um",disabled:"fyvr11un",focus:"fyvr11uo",hover:"fyvr11up",checked:"fyvr11uq"},defaultClass:"fyvr11ul"},bscLight:{conditions:{base:"fyvr11ur",active:"fyvr11us",disabled:"fyvr11ut",focus:"fyvr11uu",hover:"fyvr11uv",checked:"fyvr11uw"},defaultClass:"fyvr11ur"},ethereumDark:{conditions:{base:"fyvr11ux",active:"fyvr11uy",disabled:"fyvr11uz",focus:"fyvr11v0",hover:"fyvr11v1",checked:"fyvr11v2"},defaultClass:"fyvr11ux"},ethereumLight:{conditions:{base:"fyvr11v3",active:"fyvr11v4",disabled:"fyvr11v5",focus:"fyvr11v6",hover:"fyvr11v7",checked:"fyvr11v8"},defaultClass:"fyvr11v3"},gnosisDark:{conditions:{base:"fyvr11v9",active:"fyvr11va",disabled:"fyvr11vb",focus:"fyvr11vc",hover:"fyvr11vd",checked:"fyvr11ve"},defaultClass:"fyvr11v9"},gnosisLight:{conditions:{base:"fyvr11vf",active:"fyvr11vg",disabled:"fyvr11vh",focus:"fyvr11vi",hover:"fyvr11vj",checked:"fyvr11vk"},defaultClass:"fyvr11vf"},polygonDark:{conditions:{base:"fyvr11vl",active:"fyvr11vm",disabled:"fyvr11vn",focus:"fyvr11vo",hover:"fyvr11vp",checked:"fyvr11vq"},defaultClass:"fyvr11vl"},polygonLight:{conditions:{base:"fyvr11vr",active:"fyvr11vs",disabled:"fyvr11vt",focus:"fyvr11vu",hover:"fyvr11vv",checked:"fyvr11vw"},defaultClass:"fyvr11vr"},text100:{conditions:{base:"fyvr11vx",active:"fyvr11vy",disabled:"fyvr11vz",focus:"fyvr11w0",hover:"fyvr11w1",checked:"fyvr11w2"},defaultClass:"fyvr11vx"},text80:{conditions:{base:"fyvr11w3",active:"fyvr11w4",disabled:"fyvr11w5",focus:"fyvr11w6",hover:"fyvr11w7",checked:"fyvr11w8"},defaultClass:"fyvr11w3"},text50:{conditions:{base:"fyvr11w9",active:"fyvr11wa",disabled:"fyvr11wb",focus:"fyvr11wc",hover:"fyvr11wd",checked:"fyvr11we"},defaultClass:"fyvr11w9"},textInverse100:{conditions:{base:"fyvr11wf",active:"fyvr11wg",disabled:"fyvr11wh",focus:"fyvr11wi",hover:"fyvr11wj",checked:"fyvr11wk"},defaultClass:"fyvr11wf"},backgroundPrimary:{conditions:{base:"fyvr11wl",active:"fyvr11wm",disabled:"fyvr11wn",focus:"fyvr11wo",hover:"fyvr11wp",checked:"fyvr11wq"},defaultClass:"fyvr11wl"},backgroundSecondary:{conditions:{base:"fyvr11wr",active:"fyvr11ws",disabled:"fyvr11wt",focus:"fyvr11wu",hover:"fyvr11wv",checked:"fyvr11ww"},defaultClass:"fyvr11wr"},backgroundContrast:{conditions:{base:"fyvr11wx",active:"fyvr11wy",disabled:"fyvr11wz",focus:"fyvr11x0",hover:"fyvr11x1",checked:"fyvr11x2"},defaultClass:"fyvr11wx"},backgroundMuted:{conditions:{base:"fyvr11x3",active:"fyvr11x4",disabled:"fyvr11x5",focus:"fyvr11x6",hover:"fyvr11x7",checked:"fyvr11x8"},defaultClass:"fyvr11x3"},backgroundControl:{conditions:{base:"fyvr11x9",active:"fyvr11xa",disabled:"fyvr11xb",focus:"fyvr11xc",hover:"fyvr11xd",checked:"fyvr11xe"},defaultClass:"fyvr11x9"},backgroundInverse:{conditions:{base:"fyvr11xf",active:"fyvr11xg",disabled:"fyvr11xh",focus:"fyvr11xi",hover:"fyvr11xj",checked:"fyvr11xk"},defaultClass:"fyvr11xf"},backgroundBackdrop:{conditions:{base:"fyvr11xl",active:"fyvr11xm",disabled:"fyvr11xn",focus:"fyvr11xo",hover:"fyvr11xp",checked:"fyvr11xq"},defaultClass:"fyvr11xl"},backgroundOverlay:{conditions:{base:"fyvr11xr",active:"fyvr11xs",disabled:"fyvr11xt",focus:"fyvr11xu",hover:"fyvr11xv",checked:"fyvr11xw"},defaultClass:"fyvr11xr"},backgroundRaised:{conditions:{base:"fyvr11xx",active:"fyvr11xy",disabled:"fyvr11xz",focus:"fyvr11y0",hover:"fyvr11y1",checked:"fyvr11y2"},defaultClass:"fyvr11xx"},buttonGlass:{conditions:{base:"fyvr11y3",active:"fyvr11y4",disabled:"fyvr11y5",focus:"fyvr11y6",hover:"fyvr11y7",checked:"fyvr11y8"},defaultClass:"fyvr11y3"},buttonEmphasis:{conditions:{base:"fyvr11y9",active:"fyvr11ya",disabled:"fyvr11yb",focus:"fyvr11yc",hover:"fyvr11yd",checked:"fyvr11ye"},defaultClass:"fyvr11y9"},buttonInverse:{conditions:{base:"fyvr11yf",active:"fyvr11yg",disabled:"fyvr11yh",focus:"fyvr11yi",hover:"fyvr11yj",checked:"fyvr11yk"},defaultClass:"fyvr11yf"},borderNormal:{conditions:{base:"fyvr11yl",active:"fyvr11ym",disabled:"fyvr11yn",focus:"fyvr11yo",hover:"fyvr11yp",checked:"fyvr11yq"},defaultClass:"fyvr11yl"},borderFocus:{conditions:{base:"fyvr11yr",active:"fyvr11ys",disabled:"fyvr11yt",focus:"fyvr11yu",hover:"fyvr11yv",checked:"fyvr11yw"},defaultClass:"fyvr11yr"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11yx",active:"fyvr11yy",disabled:"fyvr11yz",focus:"fyvr11z0",hover:"fyvr11z1",checked:"fyvr11z2"},defaultClass:"fyvr11yx"},white:{conditions:{base:"fyvr11z3",active:"fyvr11z4",disabled:"fyvr11z5",focus:"fyvr11z6",hover:"fyvr11z7",checked:"fyvr11z8"},defaultClass:"fyvr11z3"},inherit:{conditions:{base:"fyvr11z9",active:"fyvr11za",disabled:"fyvr11zb",focus:"fyvr11zc",hover:"fyvr11zd",checked:"fyvr11ze"},defaultClass:"fyvr11z9"},transparent:{conditions:{base:"fyvr11zf",active:"fyvr11zg",disabled:"fyvr11zh",focus:"fyvr11zi",hover:"fyvr11zj",checked:"fyvr11zk"},defaultClass:"fyvr11zf"},positive:{conditions:{base:"fyvr11zl",active:"fyvr11zm",disabled:"fyvr11zn",focus:"fyvr11zo",hover:"fyvr11zp",checked:"fyvr11zq"},defaultClass:"fyvr11zl"},negative:{conditions:{base:"fyvr11zr",active:"fyvr11zs",disabled:"fyvr11zt",focus:"fyvr11zu",hover:"fyvr11zv",checked:"fyvr11zw"},defaultClass:"fyvr11zr"},info:{conditions:{base:"fyvr11zx",active:"fyvr11zy",disabled:"fyvr11zz",focus:"fyvr1200",hover:"fyvr1201",checked:"fyvr1202"},defaultClass:"fyvr11zx"},warning:{conditions:{base:"fyvr1203",active:"fyvr1204",disabled:"fyvr1205",focus:"fyvr1206",hover:"fyvr1207",checked:"fyvr1208"},defaultClass:"fyvr1203"},gradientBackdrop:{conditions:{base:"fyvr1209",active:"fyvr120a",disabled:"fyvr120b",focus:"fyvr120c",hover:"fyvr120d",checked:"fyvr120e"},defaultClass:"fyvr1209"},gradientPrimary:{conditions:{base:"fyvr120f",active:"fyvr120g",disabled:"fyvr120h",focus:"fyvr120i",hover:"fyvr120j",checked:"fyvr120k"},defaultClass:"fyvr120f"},gradientSecondary:{conditions:{base:"fyvr120l",active:"fyvr120m",disabled:"fyvr120n",focus:"fyvr120o",hover:"fyvr120p",checked:"fyvr120q"},defaultClass:"fyvr120l"},arbitrumDark:{conditions:{base:"fyvr120r",active:"fyvr120s",disabled:"fyvr120t",focus:"fyvr120u",hover:"fyvr120v",checked:"fyvr120w"},defaultClass:"fyvr120r"},arbitrumLight:{conditions:{base:"fyvr120x",active:"fyvr120y",disabled:"fyvr120z",focus:"fyvr1210",hover:"fyvr1211",checked:"fyvr1212"},defaultClass:"fyvr120x"},avalanceDark:{conditions:{base:"fyvr1213",active:"fyvr1214",disabled:"fyvr1215",focus:"fyvr1216",hover:"fyvr1217",checked:"fyvr1218"},defaultClass:"fyvr1213"},avalanceLight:{conditions:{base:"fyvr1219",active:"fyvr121a",disabled:"fyvr121b",focus:"fyvr121c",hover:"fyvr121d",checked:"fyvr121e"},defaultClass:"fyvr1219"},bscDark:{conditions:{base:"fyvr121f",active:"fyvr121g",disabled:"fyvr121h",focus:"fyvr121i",hover:"fyvr121j",checked:"fyvr121k"},defaultClass:"fyvr121f"},bscLight:{conditions:{base:"fyvr121l",active:"fyvr121m",disabled:"fyvr121n",focus:"fyvr121o",hover:"fyvr121p",checked:"fyvr121q"},defaultClass:"fyvr121l"},ethereumDark:{conditions:{base:"fyvr121r",active:"fyvr121s",disabled:"fyvr121t",focus:"fyvr121u",hover:"fyvr121v",checked:"fyvr121w"},defaultClass:"fyvr121r"},ethereumLight:{conditions:{base:"fyvr121x",active:"fyvr121y",disabled:"fyvr121z",focus:"fyvr1220",hover:"fyvr1221",checked:"fyvr1222"},defaultClass:"fyvr121x"},gnosisDark:{conditions:{base:"fyvr1223",active:"fyvr1224",disabled:"fyvr1225",focus:"fyvr1226",hover:"fyvr1227",checked:"fyvr1228"},defaultClass:"fyvr1223"},gnosisLight:{conditions:{base:"fyvr1229",active:"fyvr122a",disabled:"fyvr122b",focus:"fyvr122c",hover:"fyvr122d",checked:"fyvr122e"},defaultClass:"fyvr1229"},polygonDark:{conditions:{base:"fyvr122f",active:"fyvr122g",disabled:"fyvr122h",focus:"fyvr122i",hover:"fyvr122j",checked:"fyvr122k"},defaultClass:"fyvr122f"},polygonLight:{conditions:{base:"fyvr122l",active:"fyvr122m",disabled:"fyvr122n",focus:"fyvr122o",hover:"fyvr122p",checked:"fyvr122q"},defaultClass:"fyvr122l"},text100:{conditions:{base:"fyvr122r",active:"fyvr122s",disabled:"fyvr122t",focus:"fyvr122u",hover:"fyvr122v",checked:"fyvr122w"},defaultClass:"fyvr122r"},text80:{conditions:{base:"fyvr122x",active:"fyvr122y",disabled:"fyvr122z",focus:"fyvr1230",hover:"fyvr1231",checked:"fyvr1232"},defaultClass:"fyvr122x"},text50:{conditions:{base:"fyvr1233",active:"fyvr1234",disabled:"fyvr1235",focus:"fyvr1236",hover:"fyvr1237",checked:"fyvr1238"},defaultClass:"fyvr1233"},textInverse100:{conditions:{base:"fyvr1239",active:"fyvr123a",disabled:"fyvr123b",focus:"fyvr123c",hover:"fyvr123d",checked:"fyvr123e"},defaultClass:"fyvr1239"},backgroundPrimary:{conditions:{base:"fyvr123f",active:"fyvr123g",disabled:"fyvr123h",focus:"fyvr123i",hover:"fyvr123j",checked:"fyvr123k"},defaultClass:"fyvr123f"},backgroundSecondary:{conditions:{base:"fyvr123l",active:"fyvr123m",disabled:"fyvr123n",focus:"fyvr123o",hover:"fyvr123p",checked:"fyvr123q"},defaultClass:"fyvr123l"},backgroundContrast:{conditions:{base:"fyvr123r",active:"fyvr123s",disabled:"fyvr123t",focus:"fyvr123u",hover:"fyvr123v",checked:"fyvr123w"},defaultClass:"fyvr123r"},backgroundMuted:{conditions:{base:"fyvr123x",active:"fyvr123y",disabled:"fyvr123z",focus:"fyvr1240",hover:"fyvr1241",checked:"fyvr1242"},defaultClass:"fyvr123x"},backgroundControl:{conditions:{base:"fyvr1243",active:"fyvr1244",disabled:"fyvr1245",focus:"fyvr1246",hover:"fyvr1247",checked:"fyvr1248"},defaultClass:"fyvr1243"},backgroundInverse:{conditions:{base:"fyvr1249",active:"fyvr124a",disabled:"fyvr124b",focus:"fyvr124c",hover:"fyvr124d",checked:"fyvr124e"},defaultClass:"fyvr1249"},backgroundBackdrop:{conditions:{base:"fyvr124f",active:"fyvr124g",disabled:"fyvr124h",focus:"fyvr124i",hover:"fyvr124j",checked:"fyvr124k"},defaultClass:"fyvr124f"},backgroundOverlay:{conditions:{base:"fyvr124l",active:"fyvr124m",disabled:"fyvr124n",focus:"fyvr124o",hover:"fyvr124p",checked:"fyvr124q"},defaultClass:"fyvr124l"},backgroundRaised:{conditions:{base:"fyvr124r",active:"fyvr124s",disabled:"fyvr124t",focus:"fyvr124u",hover:"fyvr124v",checked:"fyvr124w"},defaultClass:"fyvr124r"},buttonGlass:{conditions:{base:"fyvr124x",active:"fyvr124y",disabled:"fyvr124z",focus:"fyvr1250",hover:"fyvr1251",checked:"fyvr1252"},defaultClass:"fyvr124x"},buttonEmphasis:{conditions:{base:"fyvr1253",active:"fyvr1254",disabled:"fyvr1255",focus:"fyvr1256",hover:"fyvr1257",checked:"fyvr1258"},defaultClass:"fyvr1253"},buttonInverse:{conditions:{base:"fyvr1259",active:"fyvr125a",disabled:"fyvr125b",focus:"fyvr125c",hover:"fyvr125d",checked:"fyvr125e"},defaultClass:"fyvr1259"},borderNormal:{conditions:{base:"fyvr125f",active:"fyvr125g",disabled:"fyvr125h",focus:"fyvr125i",hover:"fyvr125j",checked:"fyvr125k"},defaultClass:"fyvr125f"},borderFocus:{conditions:{base:"fyvr125l",active:"fyvr125m",disabled:"fyvr125n",focus:"fyvr125o",hover:"fyvr125p",checked:"fyvr125q"},defaultClass:"fyvr125l"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr125r",active:"fyvr125s",disabled:"fyvr125t",focus:"fyvr125u",hover:"fyvr125v",checked:"fyvr125w"},defaultClass:"fyvr125r"},dashed:{conditions:{base:"fyvr125x",active:"fyvr125y",disabled:"fyvr125z",focus:"fyvr1260",hover:"fyvr1261",checked:"fyvr1262"},defaultClass:"fyvr125x"},dotted:{conditions:{base:"fyvr1263",active:"fyvr1264",disabled:"fyvr1265",focus:"fyvr1266",hover:"fyvr1267",checked:"fyvr1268"},defaultClass:"fyvr1263"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1269",active:"fyvr126a",disabled:"fyvr126b",focus:"fyvr126c",hover:"fyvr126d",checked:"fyvr126e"},defaultClass:"fyvr1269"},white:{conditions:{base:"fyvr126f",active:"fyvr126g",disabled:"fyvr126h",focus:"fyvr126i",hover:"fyvr126j",checked:"fyvr126k"},defaultClass:"fyvr126f"},inherit:{conditions:{base:"fyvr126l",active:"fyvr126m",disabled:"fyvr126n",focus:"fyvr126o",hover:"fyvr126p",checked:"fyvr126q"},defaultClass:"fyvr126l"},transparent:{conditions:{base:"fyvr126r",active:"fyvr126s",disabled:"fyvr126t",focus:"fyvr126u",hover:"fyvr126v",checked:"fyvr126w"},defaultClass:"fyvr126r"},positive:{conditions:{base:"fyvr126x",active:"fyvr126y",disabled:"fyvr126z",focus:"fyvr1270",hover:"fyvr1271",checked:"fyvr1272"},defaultClass:"fyvr126x"},negative:{conditions:{base:"fyvr1273",active:"fyvr1274",disabled:"fyvr1275",focus:"fyvr1276",hover:"fyvr1277",checked:"fyvr1278"},defaultClass:"fyvr1273"},info:{conditions:{base:"fyvr1279",active:"fyvr127a",disabled:"fyvr127b",focus:"fyvr127c",hover:"fyvr127d",checked:"fyvr127e"},defaultClass:"fyvr1279"},warning:{conditions:{base:"fyvr127f",active:"fyvr127g",disabled:"fyvr127h",focus:"fyvr127i",hover:"fyvr127j",checked:"fyvr127k"},defaultClass:"fyvr127f"},gradientBackdrop:{conditions:{base:"fyvr127l",active:"fyvr127m",disabled:"fyvr127n",focus:"fyvr127o",hover:"fyvr127p",checked:"fyvr127q"},defaultClass:"fyvr127l"},gradientPrimary:{conditions:{base:"fyvr127r",active:"fyvr127s",disabled:"fyvr127t",focus:"fyvr127u",hover:"fyvr127v",checked:"fyvr127w"},defaultClass:"fyvr127r"},gradientSecondary:{conditions:{base:"fyvr127x",active:"fyvr127y",disabled:"fyvr127z",focus:"fyvr1280",hover:"fyvr1281",checked:"fyvr1282"},defaultClass:"fyvr127x"},arbitrumDark:{conditions:{base:"fyvr1283",active:"fyvr1284",disabled:"fyvr1285",focus:"fyvr1286",hover:"fyvr1287",checked:"fyvr1288"},defaultClass:"fyvr1283"},arbitrumLight:{conditions:{base:"fyvr1289",active:"fyvr128a",disabled:"fyvr128b",focus:"fyvr128c",hover:"fyvr128d",checked:"fyvr128e"},defaultClass:"fyvr1289"},avalanceDark:{conditions:{base:"fyvr128f",active:"fyvr128g",disabled:"fyvr128h",focus:"fyvr128i",hover:"fyvr128j",checked:"fyvr128k"},defaultClass:"fyvr128f"},avalanceLight:{conditions:{base:"fyvr128l",active:"fyvr128m",disabled:"fyvr128n",focus:"fyvr128o",hover:"fyvr128p",checked:"fyvr128q"},defaultClass:"fyvr128l"},bscDark:{conditions:{base:"fyvr128r",active:"fyvr128s",disabled:"fyvr128t",focus:"fyvr128u",hover:"fyvr128v",checked:"fyvr128w"},defaultClass:"fyvr128r"},bscLight:{conditions:{base:"fyvr128x",active:"fyvr128y",disabled:"fyvr128z",focus:"fyvr1290",hover:"fyvr1291",checked:"fyvr1292"},defaultClass:"fyvr128x"},ethereumDark:{conditions:{base:"fyvr1293",active:"fyvr1294",disabled:"fyvr1295",focus:"fyvr1296",hover:"fyvr1297",checked:"fyvr1298"},defaultClass:"fyvr1293"},ethereumLight:{conditions:{base:"fyvr1299",active:"fyvr129a",disabled:"fyvr129b",focus:"fyvr129c",hover:"fyvr129d",checked:"fyvr129e"},defaultClass:"fyvr1299"},gnosisDark:{conditions:{base:"fyvr129f",active:"fyvr129g",disabled:"fyvr129h",focus:"fyvr129i",hover:"fyvr129j",checked:"fyvr129k"},defaultClass:"fyvr129f"},gnosisLight:{conditions:{base:"fyvr129l",active:"fyvr129m",disabled:"fyvr129n",focus:"fyvr129o",hover:"fyvr129p",checked:"fyvr129q"},defaultClass:"fyvr129l"},polygonDark:{conditions:{base:"fyvr129r",active:"fyvr129s",disabled:"fyvr129t",focus:"fyvr129u",hover:"fyvr129v",checked:"fyvr129w"},defaultClass:"fyvr129r"},polygonLight:{conditions:{base:"fyvr129x",active:"fyvr129y",disabled:"fyvr129z",focus:"fyvr12a0",hover:"fyvr12a1",checked:"fyvr12a2"},defaultClass:"fyvr129x"},text100:{conditions:{base:"fyvr12a3",active:"fyvr12a4",disabled:"fyvr12a5",focus:"fyvr12a6",hover:"fyvr12a7",checked:"fyvr12a8"},defaultClass:"fyvr12a3"},text80:{conditions:{base:"fyvr12a9",active:"fyvr12aa",disabled:"fyvr12ab",focus:"fyvr12ac",hover:"fyvr12ad",checked:"fyvr12ae"},defaultClass:"fyvr12a9"},text50:{conditions:{base:"fyvr12af",active:"fyvr12ag",disabled:"fyvr12ah",focus:"fyvr12ai",hover:"fyvr12aj",checked:"fyvr12ak"},defaultClass:"fyvr12af"},textInverse100:{conditions:{base:"fyvr12al",active:"fyvr12am",disabled:"fyvr12an",focus:"fyvr12ao",hover:"fyvr12ap",checked:"fyvr12aq"},defaultClass:"fyvr12al"},backgroundPrimary:{conditions:{base:"fyvr12ar",active:"fyvr12as",disabled:"fyvr12at",focus:"fyvr12au",hover:"fyvr12av",checked:"fyvr12aw"},defaultClass:"fyvr12ar"},backgroundSecondary:{conditions:{base:"fyvr12ax",active:"fyvr12ay",disabled:"fyvr12az",focus:"fyvr12b0",hover:"fyvr12b1",checked:"fyvr12b2"},defaultClass:"fyvr12ax"},backgroundContrast:{conditions:{base:"fyvr12b3",active:"fyvr12b4",disabled:"fyvr12b5",focus:"fyvr12b6",hover:"fyvr12b7",checked:"fyvr12b8"},defaultClass:"fyvr12b3"},backgroundMuted:{conditions:{base:"fyvr12b9",active:"fyvr12ba",disabled:"fyvr12bb",focus:"fyvr12bc",hover:"fyvr12bd",checked:"fyvr12be"},defaultClass:"fyvr12b9"},backgroundControl:{conditions:{base:"fyvr12bf",active:"fyvr12bg",disabled:"fyvr12bh",focus:"fyvr12bi",hover:"fyvr12bj",checked:"fyvr12bk"},defaultClass:"fyvr12bf"},backgroundInverse:{conditions:{base:"fyvr12bl",active:"fyvr12bm",disabled:"fyvr12bn",focus:"fyvr12bo",hover:"fyvr12bp",checked:"fyvr12bq"},defaultClass:"fyvr12bl"},backgroundBackdrop:{conditions:{base:"fyvr12br",active:"fyvr12bs",disabled:"fyvr12bt",focus:"fyvr12bu",hover:"fyvr12bv",checked:"fyvr12bw"},defaultClass:"fyvr12br"},backgroundOverlay:{conditions:{base:"fyvr12bx",active:"fyvr12by",disabled:"fyvr12bz",focus:"fyvr12c0",hover:"fyvr12c1",checked:"fyvr12c2"},defaultClass:"fyvr12bx"},backgroundRaised:{conditions:{base:"fyvr12c3",active:"fyvr12c4",disabled:"fyvr12c5",focus:"fyvr12c6",hover:"fyvr12c7",checked:"fyvr12c8"},defaultClass:"fyvr12c3"},buttonGlass:{conditions:{base:"fyvr12c9",active:"fyvr12ca",disabled:"fyvr12cb",focus:"fyvr12cc",hover:"fyvr12cd",checked:"fyvr12ce"},defaultClass:"fyvr12c9"},buttonEmphasis:{conditions:{base:"fyvr12cf",active:"fyvr12cg",disabled:"fyvr12ch",focus:"fyvr12ci",hover:"fyvr12cj",checked:"fyvr12ck"},defaultClass:"fyvr12cf"},buttonInverse:{conditions:{base:"fyvr12cl",active:"fyvr12cm",disabled:"fyvr12cn",focus:"fyvr12co",hover:"fyvr12cp",checked:"fyvr12cq"},defaultClass:"fyvr12cl"},borderNormal:{conditions:{base:"fyvr12cr",active:"fyvr12cs",disabled:"fyvr12ct",focus:"fyvr12cu",hover:"fyvr12cv",checked:"fyvr12cw"},defaultClass:"fyvr12cr"},borderFocus:{conditions:{base:"fyvr12cx",active:"fyvr12cy",disabled:"fyvr12cz",focus:"fyvr12d0",hover:"fyvr12d1",checked:"fyvr12d2"},defaultClass:"fyvr12cx"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr12d3",active:"fyvr12d4",disabled:"fyvr12d5",focus:"fyvr12d6",hover:"fyvr12d7",checked:"fyvr12d8"},defaultClass:"fyvr12d3"},dashed:{conditions:{base:"fyvr12d9",active:"fyvr12da",disabled:"fyvr12db",focus:"fyvr12dc",hover:"fyvr12dd",checked:"fyvr12de"},defaultClass:"fyvr12d9"},dotted:{conditions:{base:"fyvr12df",active:"fyvr12dg",disabled:"fyvr12dh",focus:"fyvr12di",hover:"fyvr12dj",checked:"fyvr12dk"},defaultClass:"fyvr12df"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr12dl",active:"fyvr12dm",disabled:"fyvr12dn",focus:"fyvr12do",hover:"fyvr12dp",checked:"fyvr12dq"},defaultClass:"fyvr12dl"},white:{conditions:{base:"fyvr12dr",active:"fyvr12ds",disabled:"fyvr12dt",focus:"fyvr12du",hover:"fyvr12dv",checked:"fyvr12dw"},defaultClass:"fyvr12dr"},inherit:{conditions:{base:"fyvr12dx",active:"fyvr12dy",disabled:"fyvr12dz",focus:"fyvr12e0",hover:"fyvr12e1",checked:"fyvr12e2"},defaultClass:"fyvr12dx"},transparent:{conditions:{base:"fyvr12e3",active:"fyvr12e4",disabled:"fyvr12e5",focus:"fyvr12e6",hover:"fyvr12e7",checked:"fyvr12e8"},defaultClass:"fyvr12e3"},positive:{conditions:{base:"fyvr12e9",active:"fyvr12ea",disabled:"fyvr12eb",focus:"fyvr12ec",hover:"fyvr12ed",checked:"fyvr12ee"},defaultClass:"fyvr12e9"},negative:{conditions:{base:"fyvr12ef",active:"fyvr12eg",disabled:"fyvr12eh",focus:"fyvr12ei",hover:"fyvr12ej",checked:"fyvr12ek"},defaultClass:"fyvr12ef"},info:{conditions:{base:"fyvr12el",active:"fyvr12em",disabled:"fyvr12en",focus:"fyvr12eo",hover:"fyvr12ep",checked:"fyvr12eq"},defaultClass:"fyvr12el"},warning:{conditions:{base:"fyvr12er",active:"fyvr12es",disabled:"fyvr12et",focus:"fyvr12eu",hover:"fyvr12ev",checked:"fyvr12ew"},defaultClass:"fyvr12er"},gradientBackdrop:{conditions:{base:"fyvr12ex",active:"fyvr12ey",disabled:"fyvr12ez",focus:"fyvr12f0",hover:"fyvr12f1",checked:"fyvr12f2"},defaultClass:"fyvr12ex"},gradientPrimary:{conditions:{base:"fyvr12f3",active:"fyvr12f4",disabled:"fyvr12f5",focus:"fyvr12f6",hover:"fyvr12f7",checked:"fyvr12f8"},defaultClass:"fyvr12f3"},gradientSecondary:{conditions:{base:"fyvr12f9",active:"fyvr12fa",disabled:"fyvr12fb",focus:"fyvr12fc",hover:"fyvr12fd",checked:"fyvr12fe"},defaultClass:"fyvr12f9"},arbitrumDark:{conditions:{base:"fyvr12ff",active:"fyvr12fg",disabled:"fyvr12fh",focus:"fyvr12fi",hover:"fyvr12fj",checked:"fyvr12fk"},defaultClass:"fyvr12ff"},arbitrumLight:{conditions:{base:"fyvr12fl",active:"fyvr12fm",disabled:"fyvr12fn",focus:"fyvr12fo",hover:"fyvr12fp",checked:"fyvr12fq"},defaultClass:"fyvr12fl"},avalanceDark:{conditions:{base:"fyvr12fr",active:"fyvr12fs",disabled:"fyvr12ft",focus:"fyvr12fu",hover:"fyvr12fv",checked:"fyvr12fw"},defaultClass:"fyvr12fr"},avalanceLight:{conditions:{base:"fyvr12fx",active:"fyvr12fy",disabled:"fyvr12fz",focus:"fyvr12g0",hover:"fyvr12g1",checked:"fyvr12g2"},defaultClass:"fyvr12fx"},bscDark:{conditions:{base:"fyvr12g3",active:"fyvr12g4",disabled:"fyvr12g5",focus:"fyvr12g6",hover:"fyvr12g7",checked:"fyvr12g8"},defaultClass:"fyvr12g3"},bscLight:{conditions:{base:"fyvr12g9",active:"fyvr12ga",disabled:"fyvr12gb",focus:"fyvr12gc",hover:"fyvr12gd",checked:"fyvr12ge"},defaultClass:"fyvr12g9"},ethereumDark:{conditions:{base:"fyvr12gf",active:"fyvr12gg",disabled:"fyvr12gh",focus:"fyvr12gi",hover:"fyvr12gj",checked:"fyvr12gk"},defaultClass:"fyvr12gf"},ethereumLight:{conditions:{base:"fyvr12gl",active:"fyvr12gm",disabled:"fyvr12gn",focus:"fyvr12go",hover:"fyvr12gp",checked:"fyvr12gq"},defaultClass:"fyvr12gl"},gnosisDark:{conditions:{base:"fyvr12gr",active:"fyvr12gs",disabled:"fyvr12gt",focus:"fyvr12gu",hover:"fyvr12gv",checked:"fyvr12gw"},defaultClass:"fyvr12gr"},gnosisLight:{conditions:{base:"fyvr12gx",active:"fyvr12gy",disabled:"fyvr12gz",focus:"fyvr12h0",hover:"fyvr12h1",checked:"fyvr12h2"},defaultClass:"fyvr12gx"},polygonDark:{conditions:{base:"fyvr12h3",active:"fyvr12h4",disabled:"fyvr12h5",focus:"fyvr12h6",hover:"fyvr12h7",checked:"fyvr12h8"},defaultClass:"fyvr12h3"},polygonLight:{conditions:{base:"fyvr12h9",active:"fyvr12ha",disabled:"fyvr12hb",focus:"fyvr12hc",hover:"fyvr12hd",checked:"fyvr12he"},defaultClass:"fyvr12h9"},text100:{conditions:{base:"fyvr12hf",active:"fyvr12hg",disabled:"fyvr12hh",focus:"fyvr12hi",hover:"fyvr12hj",checked:"fyvr12hk"},defaultClass:"fyvr12hf"},text80:{conditions:{base:"fyvr12hl",active:"fyvr12hm",disabled:"fyvr12hn",focus:"fyvr12ho",hover:"fyvr12hp",checked:"fyvr12hq"},defaultClass:"fyvr12hl"},text50:{conditions:{base:"fyvr12hr",active:"fyvr12hs",disabled:"fyvr12ht",focus:"fyvr12hu",hover:"fyvr12hv",checked:"fyvr12hw"},defaultClass:"fyvr12hr"},textInverse100:{conditions:{base:"fyvr12hx",active:"fyvr12hy",disabled:"fyvr12hz",focus:"fyvr12i0",hover:"fyvr12i1",checked:"fyvr12i2"},defaultClass:"fyvr12hx"},backgroundPrimary:{conditions:{base:"fyvr12i3",active:"fyvr12i4",disabled:"fyvr12i5",focus:"fyvr12i6",hover:"fyvr12i7",checked:"fyvr12i8"},defaultClass:"fyvr12i3"},backgroundSecondary:{conditions:{base:"fyvr12i9",active:"fyvr12ia",disabled:"fyvr12ib",focus:"fyvr12ic",hover:"fyvr12id",checked:"fyvr12ie"},defaultClass:"fyvr12i9"},backgroundContrast:{conditions:{base:"fyvr12if",active:"fyvr12ig",disabled:"fyvr12ih",focus:"fyvr12ii",hover:"fyvr12ij",checked:"fyvr12ik"},defaultClass:"fyvr12if"},backgroundMuted:{conditions:{base:"fyvr12il",active:"fyvr12im",disabled:"fyvr12in",focus:"fyvr12io",hover:"fyvr12ip",checked:"fyvr12iq"},defaultClass:"fyvr12il"},backgroundControl:{conditions:{base:"fyvr12ir",active:"fyvr12is",disabled:"fyvr12it",focus:"fyvr12iu",hover:"fyvr12iv",checked:"fyvr12iw"},defaultClass:"fyvr12ir"},backgroundInverse:{conditions:{base:"fyvr12ix",active:"fyvr12iy",disabled:"fyvr12iz",focus:"fyvr12j0",hover:"fyvr12j1",checked:"fyvr12j2"},defaultClass:"fyvr12ix"},backgroundBackdrop:{conditions:{base:"fyvr12j3",active:"fyvr12j4",disabled:"fyvr12j5",focus:"fyvr12j6",hover:"fyvr12j7",checked:"fyvr12j8"},defaultClass:"fyvr12j3"},backgroundOverlay:{conditions:{base:"fyvr12j9",active:"fyvr12ja",disabled:"fyvr12jb",focus:"fyvr12jc",hover:"fyvr12jd",checked:"fyvr12je"},defaultClass:"fyvr12j9"},backgroundRaised:{conditions:{base:"fyvr12jf",active:"fyvr12jg",disabled:"fyvr12jh",focus:"fyvr12ji",hover:"fyvr12jj",checked:"fyvr12jk"},defaultClass:"fyvr12jf"},buttonGlass:{conditions:{base:"fyvr12jl",active:"fyvr12jm",disabled:"fyvr12jn",focus:"fyvr12jo",hover:"fyvr12jp",checked:"fyvr12jq"},defaultClass:"fyvr12jl"},buttonEmphasis:{conditions:{base:"fyvr12jr",active:"fyvr12js",disabled:"fyvr12jt",focus:"fyvr12ju",hover:"fyvr12jv",checked:"fyvr12jw"},defaultClass:"fyvr12jr"},buttonInverse:{conditions:{base:"fyvr12jx",active:"fyvr12jy",disabled:"fyvr12jz",focus:"fyvr12k0",hover:"fyvr12k1",checked:"fyvr12k2"},defaultClass:"fyvr12jx"},borderNormal:{conditions:{base:"fyvr12k3",active:"fyvr12k4",disabled:"fyvr12k5",focus:"fyvr12k6",hover:"fyvr12k7",checked:"fyvr12k8"},defaultClass:"fyvr12k3"},borderFocus:{conditions:{base:"fyvr12k9",active:"fyvr12ka",disabled:"fyvr12kb",focus:"fyvr12kc",hover:"fyvr12kd",checked:"fyvr12ke"},defaultClass:"fyvr12k9"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12kf",active:"fyvr12kg",disabled:"fyvr12kh",focus:"fyvr12ki",hover:"fyvr12kj",checked:"fyvr12kk"},defaultClass:"fyvr12kf"},dashed:{conditions:{base:"fyvr12kl",active:"fyvr12km",disabled:"fyvr12kn",focus:"fyvr12ko",hover:"fyvr12kp",checked:"fyvr12kq"},defaultClass:"fyvr12kl"},dotted:{conditions:{base:"fyvr12kr",active:"fyvr12ks",disabled:"fyvr12kt",focus:"fyvr12ku",hover:"fyvr12kv",checked:"fyvr12kw"},defaultClass:"fyvr12kr"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12kx",active:"fyvr12ky",disabled:"fyvr12kz",focus:"fyvr12l0",hover:"fyvr12l1",checked:"fyvr12l2"},defaultClass:"fyvr12kx"},white:{conditions:{base:"fyvr12l3",active:"fyvr12l4",disabled:"fyvr12l5",focus:"fyvr12l6",hover:"fyvr12l7",checked:"fyvr12l8"},defaultClass:"fyvr12l3"},inherit:{conditions:{base:"fyvr12l9",active:"fyvr12la",disabled:"fyvr12lb",focus:"fyvr12lc",hover:"fyvr12ld",checked:"fyvr12le"},defaultClass:"fyvr12l9"},transparent:{conditions:{base:"fyvr12lf",active:"fyvr12lg",disabled:"fyvr12lh",focus:"fyvr12li",hover:"fyvr12lj",checked:"fyvr12lk"},defaultClass:"fyvr12lf"},positive:{conditions:{base:"fyvr12ll",active:"fyvr12lm",disabled:"fyvr12ln",focus:"fyvr12lo",hover:"fyvr12lp",checked:"fyvr12lq"},defaultClass:"fyvr12ll"},negative:{conditions:{base:"fyvr12lr",active:"fyvr12ls",disabled:"fyvr12lt",focus:"fyvr12lu",hover:"fyvr12lv",checked:"fyvr12lw"},defaultClass:"fyvr12lr"},info:{conditions:{base:"fyvr12lx",active:"fyvr12ly",disabled:"fyvr12lz",focus:"fyvr12m0",hover:"fyvr12m1",checked:"fyvr12m2"},defaultClass:"fyvr12lx"},warning:{conditions:{base:"fyvr12m3",active:"fyvr12m4",disabled:"fyvr12m5",focus:"fyvr12m6",hover:"fyvr12m7",checked:"fyvr12m8"},defaultClass:"fyvr12m3"},gradientBackdrop:{conditions:{base:"fyvr12m9",active:"fyvr12ma",disabled:"fyvr12mb",focus:"fyvr12mc",hover:"fyvr12md",checked:"fyvr12me"},defaultClass:"fyvr12m9"},gradientPrimary:{conditions:{base:"fyvr12mf",active:"fyvr12mg",disabled:"fyvr12mh",focus:"fyvr12mi",hover:"fyvr12mj",checked:"fyvr12mk"},defaultClass:"fyvr12mf"},gradientSecondary:{conditions:{base:"fyvr12ml",active:"fyvr12mm",disabled:"fyvr12mn",focus:"fyvr12mo",hover:"fyvr12mp",checked:"fyvr12mq"},defaultClass:"fyvr12ml"},arbitrumDark:{conditions:{base:"fyvr12mr",active:"fyvr12ms",disabled:"fyvr12mt",focus:"fyvr12mu",hover:"fyvr12mv",checked:"fyvr12mw"},defaultClass:"fyvr12mr"},arbitrumLight:{conditions:{base:"fyvr12mx",active:"fyvr12my",disabled:"fyvr12mz",focus:"fyvr12n0",hover:"fyvr12n1",checked:"fyvr12n2"},defaultClass:"fyvr12mx"},avalanceDark:{conditions:{base:"fyvr12n3",active:"fyvr12n4",disabled:"fyvr12n5",focus:"fyvr12n6",hover:"fyvr12n7",checked:"fyvr12n8"},defaultClass:"fyvr12n3"},avalanceLight:{conditions:{base:"fyvr12n9",active:"fyvr12na",disabled:"fyvr12nb",focus:"fyvr12nc",hover:"fyvr12nd",checked:"fyvr12ne"},defaultClass:"fyvr12n9"},bscDark:{conditions:{base:"fyvr12nf",active:"fyvr12ng",disabled:"fyvr12nh",focus:"fyvr12ni",hover:"fyvr12nj",checked:"fyvr12nk"},defaultClass:"fyvr12nf"},bscLight:{conditions:{base:"fyvr12nl",active:"fyvr12nm",disabled:"fyvr12nn",focus:"fyvr12no",hover:"fyvr12np",checked:"fyvr12nq"},defaultClass:"fyvr12nl"},ethereumDark:{conditions:{base:"fyvr12nr",active:"fyvr12ns",disabled:"fyvr12nt",focus:"fyvr12nu",hover:"fyvr12nv",checked:"fyvr12nw"},defaultClass:"fyvr12nr"},ethereumLight:{conditions:{base:"fyvr12nx",active:"fyvr12ny",disabled:"fyvr12nz",focus:"fyvr12o0",hover:"fyvr12o1",checked:"fyvr12o2"},defaultClass:"fyvr12nx"},gnosisDark:{conditions:{base:"fyvr12o3",active:"fyvr12o4",disabled:"fyvr12o5",focus:"fyvr12o6",hover:"fyvr12o7",checked:"fyvr12o8"},defaultClass:"fyvr12o3"},gnosisLight:{conditions:{base:"fyvr12o9",active:"fyvr12oa",disabled:"fyvr12ob",focus:"fyvr12oc",hover:"fyvr12od",checked:"fyvr12oe"},defaultClass:"fyvr12o9"},polygonDark:{conditions:{base:"fyvr12of",active:"fyvr12og",disabled:"fyvr12oh",focus:"fyvr12oi",hover:"fyvr12oj",checked:"fyvr12ok"},defaultClass:"fyvr12of"},polygonLight:{conditions:{base:"fyvr12ol",active:"fyvr12om",disabled:"fyvr12on",focus:"fyvr12oo",hover:"fyvr12op",checked:"fyvr12oq"},defaultClass:"fyvr12ol"},text100:{conditions:{base:"fyvr12or",active:"fyvr12os",disabled:"fyvr12ot",focus:"fyvr12ou",hover:"fyvr12ov",checked:"fyvr12ow"},defaultClass:"fyvr12or"},text80:{conditions:{base:"fyvr12ox",active:"fyvr12oy",disabled:"fyvr12oz",focus:"fyvr12p0",hover:"fyvr12p1",checked:"fyvr12p2"},defaultClass:"fyvr12ox"},text50:{conditions:{base:"fyvr12p3",active:"fyvr12p4",disabled:"fyvr12p5",focus:"fyvr12p6",hover:"fyvr12p7",checked:"fyvr12p8"},defaultClass:"fyvr12p3"},textInverse100:{conditions:{base:"fyvr12p9",active:"fyvr12pa",disabled:"fyvr12pb",focus:"fyvr12pc",hover:"fyvr12pd",checked:"fyvr12pe"},defaultClass:"fyvr12p9"},backgroundPrimary:{conditions:{base:"fyvr12pf",active:"fyvr12pg",disabled:"fyvr12ph",focus:"fyvr12pi",hover:"fyvr12pj",checked:"fyvr12pk"},defaultClass:"fyvr12pf"},backgroundSecondary:{conditions:{base:"fyvr12pl",active:"fyvr12pm",disabled:"fyvr12pn",focus:"fyvr12po",hover:"fyvr12pp",checked:"fyvr12pq"},defaultClass:"fyvr12pl"},backgroundContrast:{conditions:{base:"fyvr12pr",active:"fyvr12ps",disabled:"fyvr12pt",focus:"fyvr12pu",hover:"fyvr12pv",checked:"fyvr12pw"},defaultClass:"fyvr12pr"},backgroundMuted:{conditions:{base:"fyvr12px",active:"fyvr12py",disabled:"fyvr12pz",focus:"fyvr12q0",hover:"fyvr12q1",checked:"fyvr12q2"},defaultClass:"fyvr12px"},backgroundControl:{conditions:{base:"fyvr12q3",active:"fyvr12q4",disabled:"fyvr12q5",focus:"fyvr12q6",hover:"fyvr12q7",checked:"fyvr12q8"},defaultClass:"fyvr12q3"},backgroundInverse:{conditions:{base:"fyvr12q9",active:"fyvr12qa",disabled:"fyvr12qb",focus:"fyvr12qc",hover:"fyvr12qd",checked:"fyvr12qe"},defaultClass:"fyvr12q9"},backgroundBackdrop:{conditions:{base:"fyvr12qf",active:"fyvr12qg",disabled:"fyvr12qh",focus:"fyvr12qi",hover:"fyvr12qj",checked:"fyvr12qk"},defaultClass:"fyvr12qf"},backgroundOverlay:{conditions:{base:"fyvr12ql",active:"fyvr12qm",disabled:"fyvr12qn",focus:"fyvr12qo",hover:"fyvr12qp",checked:"fyvr12qq"},defaultClass:"fyvr12ql"},backgroundRaised:{conditions:{base:"fyvr12qr",active:"fyvr12qs",disabled:"fyvr12qt",focus:"fyvr12qu",hover:"fyvr12qv",checked:"fyvr12qw"},defaultClass:"fyvr12qr"},buttonGlass:{conditions:{base:"fyvr12qx",active:"fyvr12qy",disabled:"fyvr12qz",focus:"fyvr12r0",hover:"fyvr12r1",checked:"fyvr12r2"},defaultClass:"fyvr12qx"},buttonEmphasis:{conditions:{base:"fyvr12r3",active:"fyvr12r4",disabled:"fyvr12r5",focus:"fyvr12r6",hover:"fyvr12r7",checked:"fyvr12r8"},defaultClass:"fyvr12r3"},buttonInverse:{conditions:{base:"fyvr12r9",active:"fyvr12ra",disabled:"fyvr12rb",focus:"fyvr12rc",hover:"fyvr12rd",checked:"fyvr12re"},defaultClass:"fyvr12r9"},borderNormal:{conditions:{base:"fyvr12rf",active:"fyvr12rg",disabled:"fyvr12rh",focus:"fyvr12ri",hover:"fyvr12rj",checked:"fyvr12rk"},defaultClass:"fyvr12rf"},borderFocus:{conditions:{base:"fyvr12rl",active:"fyvr12rm",disabled:"fyvr12rn",focus:"fyvr12ro",hover:"fyvr12rp",checked:"fyvr12rq"},defaultClass:"fyvr12rl"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12rr",active:"fyvr12rs",disabled:"fyvr12rt",focus:"fyvr12ru",hover:"fyvr12rv",checked:"fyvr12rw"},defaultClass:"fyvr12rr"},dashed:{conditions:{base:"fyvr12rx",active:"fyvr12ry",disabled:"fyvr12rz",focus:"fyvr12s0",hover:"fyvr12s1",checked:"fyvr12s2"},defaultClass:"fyvr12rx"},dotted:{conditions:{base:"fyvr12s3",active:"fyvr12s4",disabled:"fyvr12s5",focus:"fyvr12s6",hover:"fyvr12s7",checked:"fyvr12s8"},defaultClass:"fyvr12s3"}}},border:{values:{none:{conditions:{base:"fyvr12s9",active:"fyvr12sa",disabled:"fyvr12sb",focus:"fyvr12sc",hover:"fyvr12sd",checked:"fyvr12se"},defaultClass:"fyvr12s9"}}},color:{values:{black:{conditions:{base:"fyvr12sf",active:"fyvr12sg",disabled:"fyvr12sh",focus:"fyvr12si",hover:"fyvr12sj",checked:"fyvr12sk"},defaultClass:"fyvr12sf"},white:{conditions:{base:"fyvr12sl",active:"fyvr12sm",disabled:"fyvr12sn",focus:"fyvr12so",hover:"fyvr12sp",checked:"fyvr12sq"},defaultClass:"fyvr12sl"},inherit:{conditions:{base:"fyvr12sr",active:"fyvr12ss",disabled:"fyvr12st",focus:"fyvr12su",hover:"fyvr12sv",checked:"fyvr12sw"},defaultClass:"fyvr12sr"},transparent:{conditions:{base:"fyvr12sx",active:"fyvr12sy",disabled:"fyvr12sz",focus:"fyvr12t0",hover:"fyvr12t1",checked:"fyvr12t2"},defaultClass:"fyvr12sx"},positive:{conditions:{base:"fyvr12t3",active:"fyvr12t4",disabled:"fyvr12t5",focus:"fyvr12t6",hover:"fyvr12t7",checked:"fyvr12t8"},defaultClass:"fyvr12t3"},negative:{conditions:{base:"fyvr12t9",active:"fyvr12ta",disabled:"fyvr12tb",focus:"fyvr12tc",hover:"fyvr12td",checked:"fyvr12te"},defaultClass:"fyvr12t9"},info:{conditions:{base:"fyvr12tf",active:"fyvr12tg",disabled:"fyvr12th",focus:"fyvr12ti",hover:"fyvr12tj",checked:"fyvr12tk"},defaultClass:"fyvr12tf"},warning:{conditions:{base:"fyvr12tl",active:"fyvr12tm",disabled:"fyvr12tn",focus:"fyvr12to",hover:"fyvr12tp",checked:"fyvr12tq"},defaultClass:"fyvr12tl"},gradientBackdrop:{conditions:{base:"fyvr12tr",active:"fyvr12ts",disabled:"fyvr12tt",focus:"fyvr12tu",hover:"fyvr12tv",checked:"fyvr12tw"},defaultClass:"fyvr12tr"},gradientPrimary:{conditions:{base:"fyvr12tx",active:"fyvr12ty",disabled:"fyvr12tz",focus:"fyvr12u0",hover:"fyvr12u1",checked:"fyvr12u2"},defaultClass:"fyvr12tx"},gradientSecondary:{conditions:{base:"fyvr12u3",active:"fyvr12u4",disabled:"fyvr12u5",focus:"fyvr12u6",hover:"fyvr12u7",checked:"fyvr12u8"},defaultClass:"fyvr12u3"},arbitrumDark:{conditions:{base:"fyvr12u9",active:"fyvr12ua",disabled:"fyvr12ub",focus:"fyvr12uc",hover:"fyvr12ud",checked:"fyvr12ue"},defaultClass:"fyvr12u9"},arbitrumLight:{conditions:{base:"fyvr12uf",active:"fyvr12ug",disabled:"fyvr12uh",focus:"fyvr12ui",hover:"fyvr12uj",checked:"fyvr12uk"},defaultClass:"fyvr12uf"},avalanceDark:{conditions:{base:"fyvr12ul",active:"fyvr12um",disabled:"fyvr12un",focus:"fyvr12uo",hover:"fyvr12up",checked:"fyvr12uq"},defaultClass:"fyvr12ul"},avalanceLight:{conditions:{base:"fyvr12ur",active:"fyvr12us",disabled:"fyvr12ut",focus:"fyvr12uu",hover:"fyvr12uv",checked:"fyvr12uw"},defaultClass:"fyvr12ur"},bscDark:{conditions:{base:"fyvr12ux",active:"fyvr12uy",disabled:"fyvr12uz",focus:"fyvr12v0",hover:"fyvr12v1",checked:"fyvr12v2"},defaultClass:"fyvr12ux"},bscLight:{conditions:{base:"fyvr12v3",active:"fyvr12v4",disabled:"fyvr12v5",focus:"fyvr12v6",hover:"fyvr12v7",checked:"fyvr12v8"},defaultClass:"fyvr12v3"},ethereumDark:{conditions:{base:"fyvr12v9",active:"fyvr12va",disabled:"fyvr12vb",focus:"fyvr12vc",hover:"fyvr12vd",checked:"fyvr12ve"},defaultClass:"fyvr12v9"},ethereumLight:{conditions:{base:"fyvr12vf",active:"fyvr12vg",disabled:"fyvr12vh",focus:"fyvr12vi",hover:"fyvr12vj",checked:"fyvr12vk"},defaultClass:"fyvr12vf"},gnosisDark:{conditions:{base:"fyvr12vl",active:"fyvr12vm",disabled:"fyvr12vn",focus:"fyvr12vo",hover:"fyvr12vp",checked:"fyvr12vq"},defaultClass:"fyvr12vl"},gnosisLight:{conditions:{base:"fyvr12vr",active:"fyvr12vs",disabled:"fyvr12vt",focus:"fyvr12vu",hover:"fyvr12vv",checked:"fyvr12vw"},defaultClass:"fyvr12vr"},polygonDark:{conditions:{base:"fyvr12vx",active:"fyvr12vy",disabled:"fyvr12vz",focus:"fyvr12w0",hover:"fyvr12w1",checked:"fyvr12w2"},defaultClass:"fyvr12vx"},polygonLight:{conditions:{base:"fyvr12w3",active:"fyvr12w4",disabled:"fyvr12w5",focus:"fyvr12w6",hover:"fyvr12w7",checked:"fyvr12w8"},defaultClass:"fyvr12w3"},text100:{conditions:{base:"fyvr12w9",active:"fyvr12wa",disabled:"fyvr12wb",focus:"fyvr12wc",hover:"fyvr12wd",checked:"fyvr12we"},defaultClass:"fyvr12w9"},text80:{conditions:{base:"fyvr12wf",active:"fyvr12wg",disabled:"fyvr12wh",focus:"fyvr12wi",hover:"fyvr12wj",checked:"fyvr12wk"},defaultClass:"fyvr12wf"},text50:{conditions:{base:"fyvr12wl",active:"fyvr12wm",disabled:"fyvr12wn",focus:"fyvr12wo",hover:"fyvr12wp",checked:"fyvr12wq"},defaultClass:"fyvr12wl"},textInverse100:{conditions:{base:"fyvr12wr",active:"fyvr12ws",disabled:"fyvr12wt",focus:"fyvr12wu",hover:"fyvr12wv",checked:"fyvr12ww"},defaultClass:"fyvr12wr"},backgroundPrimary:{conditions:{base:"fyvr12wx",active:"fyvr12wy",disabled:"fyvr12wz",focus:"fyvr12x0",hover:"fyvr12x1",checked:"fyvr12x2"},defaultClass:"fyvr12wx"},backgroundSecondary:{conditions:{base:"fyvr12x3",active:"fyvr12x4",disabled:"fyvr12x5",focus:"fyvr12x6",hover:"fyvr12x7",checked:"fyvr12x8"},defaultClass:"fyvr12x3"},backgroundContrast:{conditions:{base:"fyvr12x9",active:"fyvr12xa",disabled:"fyvr12xb",focus:"fyvr12xc",hover:"fyvr12xd",checked:"fyvr12xe"},defaultClass:"fyvr12x9"},backgroundMuted:{conditions:{base:"fyvr12xf",active:"fyvr12xg",disabled:"fyvr12xh",focus:"fyvr12xi",hover:"fyvr12xj",checked:"fyvr12xk"},defaultClass:"fyvr12xf"},backgroundControl:{conditions:{base:"fyvr12xl",active:"fyvr12xm",disabled:"fyvr12xn",focus:"fyvr12xo",hover:"fyvr12xp",checked:"fyvr12xq"},defaultClass:"fyvr12xl"},backgroundInverse:{conditions:{base:"fyvr12xr",active:"fyvr12xs",disabled:"fyvr12xt",focus:"fyvr12xu",hover:"fyvr12xv",checked:"fyvr12xw"},defaultClass:"fyvr12xr"},backgroundBackdrop:{conditions:{base:"fyvr12xx",active:"fyvr12xy",disabled:"fyvr12xz",focus:"fyvr12y0",hover:"fyvr12y1",checked:"fyvr12y2"},defaultClass:"fyvr12xx"},backgroundOverlay:{conditions:{base:"fyvr12y3",active:"fyvr12y4",disabled:"fyvr12y5",focus:"fyvr12y6",hover:"fyvr12y7",checked:"fyvr12y8"},defaultClass:"fyvr12y3"},backgroundRaised:{conditions:{base:"fyvr12y9",active:"fyvr12ya",disabled:"fyvr12yb",focus:"fyvr12yc",hover:"fyvr12yd",checked:"fyvr12ye"},defaultClass:"fyvr12y9"},buttonGlass:{conditions:{base:"fyvr12yf",active:"fyvr12yg",disabled:"fyvr12yh",focus:"fyvr12yi",hover:"fyvr12yj",checked:"fyvr12yk"},defaultClass:"fyvr12yf"},buttonEmphasis:{conditions:{base:"fyvr12yl",active:"fyvr12ym",disabled:"fyvr12yn",focus:"fyvr12yo",hover:"fyvr12yp",checked:"fyvr12yq"},defaultClass:"fyvr12yl"},buttonInverse:{conditions:{base:"fyvr12yr",active:"fyvr12ys",disabled:"fyvr12yt",focus:"fyvr12yu",hover:"fyvr12yv",checked:"fyvr12yw"},defaultClass:"fyvr12yr"},borderNormal:{conditions:{base:"fyvr12yx",active:"fyvr12yy",disabled:"fyvr12yz",focus:"fyvr12z0",hover:"fyvr12z1",checked:"fyvr12z2"},defaultClass:"fyvr12yx"},borderFocus:{conditions:{base:"fyvr12z3",active:"fyvr12z4",disabled:"fyvr12z5",focus:"fyvr12z6",hover:"fyvr12z7",checked:"fyvr12z8"},defaultClass:"fyvr12z3"}}},cursor:{values:{default:{conditions:{base:"fyvr12z9",active:"fyvr12za",disabled:"fyvr12zb",focus:"fyvr12zc",hover:"fyvr12zd",checked:"fyvr12ze"},defaultClass:"fyvr12z9"},pointer:{conditions:{base:"fyvr12zf",active:"fyvr12zg",disabled:"fyvr12zh",focus:"fyvr12zi",hover:"fyvr12zj",checked:"fyvr12zk"},defaultClass:"fyvr12zf"},text:{conditions:{base:"fyvr12zl",active:"fyvr12zm",disabled:"fyvr12zn",focus:"fyvr12zo",hover:"fyvr12zp",checked:"fyvr12zq"},defaultClass:"fyvr12zl"}}},opacity:{values:{0:{conditions:{base:"fyvr12zr",active:"fyvr12zs",disabled:"fyvr12zt",focus:"fyvr12zu",hover:"fyvr12zv",checked:"fyvr12zw"},defaultClass:"fyvr12zr"},50:{conditions:{base:"fyvr12zx",active:"fyvr12zy",disabled:"fyvr12zz",focus:"fyvr1300",hover:"fyvr1301",checked:"fyvr1302"},defaultClass:"fyvr12zx"},80:{conditions:{base:"fyvr1303",active:"fyvr1304",disabled:"fyvr1305",focus:"fyvr1306",hover:"fyvr1307",checked:"fyvr1308"},defaultClass:"fyvr1303"},100:{conditions:{base:"fyvr1309",active:"fyvr130a",disabled:"fyvr130b",focus:"fyvr130c",hover:"fyvr130d",checked:"fyvr130e"},defaultClass:"fyvr1309"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr130f",active:"fyvr130g",disabled:"fyvr130h",focus:"fyvr130i",hover:"fyvr130j",checked:"fyvr130k"},defaultClass:"fyvr130f"},auto:{conditions:{base:"fyvr130l",active:"fyvr130m",disabled:"fyvr130n",focus:"fyvr130o",hover:"fyvr130p",checked:"fyvr130q"},defaultClass:"fyvr130l"}}},outline:{values:{none:{conditions:{base:"fyvr130r",active:"fyvr130s",disabled:"fyvr130t",focus:"fyvr130u",hover:"fyvr130v",checked:"fyvr130w"},defaultClass:"fyvr130r"}}},boxShadow:{values:{none:{conditions:{base:"fyvr130x",active:"fyvr130y",disabled:"fyvr130z",focus:"fyvr1310",hover:"fyvr1311",checked:"fyvr1312"},defaultClass:"fyvr130x"}}}}});const lK=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Nw=t=>(t.display||(t.display=Object.keys(t).some(e=>lK.includes(e))?"flex":void 0),WP(t));Nw.properties=WP.properties;const uK="https://assets.sequence.info/",fK=5,dK={xs:"small",sm:"small",md:"medium",lg:"large",xl:"large"},VP=t=>t?dK[t]||t:"medium",hK=(t,e)=>t.replace(/\/(small|medium|large)\//,`/${VP(e)}/`),pK=(t,e)=>uK+`images/networks/${VP(e)}/${t}.webp?v${fK}`;function zP(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)Nw.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=Nw({...o,...n});return x.createElement(r,{className:ar(c,s),...a,ref:e})});var HP={exports:{}},zd={};/** + * @license React + * react-jsx-runtime.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 D6;function yK(){if(D6)return zd;D6=1;var t=zr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:s.current}}return zd.Fragment=r,zd.jsx=o,zd.jsxs=o,zd}HP.exports=yK();var C=HP.exports;function gK(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vK(t){var e=gK(t,"string");return typeof e=="symbol"?e:String(e)}function mK(t,e,r){return e=vK(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B6(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function L6(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},At=t=>{var e=r=>{var n=t.defaultClassName,s=L6(L6({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)xK(u,s,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return j6(t.variantClassNames,r=>j6(r,n=>n.split(" ")[0]))}},e};At({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11t3",warning:"_2q9vfj9 _2q9vfj1 fyvr11t9",success:"_2q9vfja _2q9vfj2 fyvr11sr",error:"_2q9vfjb _2q9vfj3 fyvr11sx"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc _2q9vfj4 fyvr1zc fyvr111g fyvr144 fyvr1f4",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _2q9vfj5 fyvr1zg fyvr111k fyvr148 fyvr1f8",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11r3 fyvr11is fyvr11kc fyvr11jw fyvr11jk _2q9vfj6 fyvr1zk fyvr111o fyvr14c fyvr1fc"}},defaultVariants:{},compoundVariants:[]});const F6=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return C.jsx(Ce,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var bK=At({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"_1qxj1iba _1qxj1ib0 fyvr11r2 fyvr11ic fyvr11ko fyvr11jo fyvr11j4",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11r3 fyvr11j0 fyvr11kk fyvr11js fyvr11jk",large:"_1qxj1ibc _1qxj1ib2 fyvr11r3 fyvr11iw fyvr11kg fyvr11jw fyvr11jg",medium:"_1qxj1ibd _1qxj1ib3 fyvr11r3 fyvr11is fyvr11kc fyvr11jw fyvr11jk",normal:"_1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8",small:"_1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk",code:"_1qxj1ibh _1qxj1ib7 fyvr11r4 fyvr11io fyvr11k8 fyvr11js fyvr11j8"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 fyvr11q0 fyvr11qg fyvr11rh fyvr11r5"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const It=x.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=rK[n];return C.jsx(Ce,{as:r,className:ar(s,bK({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var wK=At({defaultClassName:"_140wn8ni _140wn8n0 fyvr11q0 fyvr11qg fyvr11rh fyvr11ow fyvr12s9 fyvr11ra fyvr11l8 _4efw240",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11sl fyvr12w9",ghost:"_140wn8nk _140wn8n2 fyvr11sl fyvr12w9",feature:"_140wn8nl _140wn8n3 fyvr11tr fyvr12sl",primary:"_140wn8nm _140wn8n4 fyvr11tl fyvr12sl",glass:"_140wn8nn _140wn8n5 fyvr11y3 fyvr12w9",emphasis:"_140wn8no _140wn8n6 fyvr11y9 fyvr12w9",raised:"_140wn8np _140wn8n7 fyvr11xx fyvr12w9",danger:"_140wn8nq _140wn8n8 fyvr11sx fyvr12sl",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc _140wn8n9 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr11sl fyvr12wl"},shape:{circle:"_140wn8ns _140wn8na fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw",square:"_140wn8nt _140wn8nb fyvr11h8 fyvr11hw fyvr11fw fyvr11gk"},disabled:{true:"_140wn8nu _140wn8nc fyvr12z9 fyvr12zx",false:"_140wn8nv _140wn8nd fyvr12zf fyvr1309 fyvr1307"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk _140wn8ne fyvr1zg fyvr111k",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8nf fyvr1zk fyvr111o",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8ng fyvr1zo fyvr111s",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8nh fyvr1zo fyvr111s"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const ze=x.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:y="fit",shape:p="circle",type:b="button",...g}=t,v=u!==void 0&&l!==void 0,m=f!==void 0&&l!==void 0,k=u!==void 0&&l===void 0,A=d==="xs"?"xs":"sm";return C.jsx(Ce,{as:r,className:ar(s,wK({activeOutline:n,disabled:i||c,hasLeftIcon:v,hasRightIcon:m,iconOnly:k,size:h==="text"?void 0:d,shape:h==="text"?void 0:p,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:b,width:y,...g,children:k?C.jsx(u,{size:A}):C.jsxs(Ce,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[C.jsxs(Ce,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&C.jsx(u,{size:A}),C.jsx(It,{children:l})]}),f&&C.jsx(f,{size:A})]})})});var EK=At({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr11ec fyvr11eo fyvr11f0 fyvr11fc fyvr1307 fyvr12zf _4efw240"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr12rf fyvr12k3 fyvr125f fyvr12cr fyvr12rr fyvr12kf fyvr125r fyvr12d3"},blur:{true:"rhmai67 rhmai62 fyvr11r0"}},defaultVariants:{},compoundVariants:[]});const CK=x.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return C.jsx(Ce,{className:ar(r,EK({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function kK(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function gv(...t){return e=>t.forEach(r=>kK(r,e))}function Ve(...t){return x.useCallback(gv(...t),t)}function SK(t,e){const r=x.createContext(e);function n(i){const{children:o,...a}=i,c=x.useMemo(()=>a,Object.values(a));return C.jsx(r.Provider,{value:c,children:o})}function s(i){const o=x.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return n.displayName=t+"Provider",[n,s]}function Lr(t,e=[]){let r=[];function n(i,o){const a=x.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...y}=f,p=(d==null?void 0:d[t][c])||a,b=x.useMemo(()=>y,Object.values(y));return C.jsx(p.Provider,{value:b,children:h})}function u(f,d){const h=(d==null?void 0:d[t][c])||a,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const s=()=>{const i=r.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,AK(s,...e)]}function AK(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Dr(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function ls({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=TK({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Dr(r),c=x.useCallback(l=>{if(i){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else s(l)},[i,t,s,a]);return[o,c]}function TK({defaultProp:t,onChange:e}){const r=x.useState(t),[n]=r,s=x.useRef(n),i=Dr(e);return x.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function vv(t){const e=x.useRef({value:t,previous:t});return x.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var wr=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function mv(t){const[e,r]=x.useState(void 0);return wr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function IK(t,e){return x.useReducer((r,n)=>e[r][n]??r,t)}var Zr=t=>{const{present:e,children:r}=t,n=PK(e),s=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),i=Ve(n.ref,OK(s));return typeof r=="function"||n.isPresent?x.cloneElement(s,{ref:i}):null};Zr.displayName="Presence";function PK(t){const[e,r]=x.useState(),n=x.useRef({}),s=x.useRef(t),i=x.useRef("none"),o=t?"mounted":"unmounted",[a,c]=IK(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=ap(n.current);i.current=a==="mounted"?l:"none"},[a]),wr(()=>{const l=n.current,u=s.current;if(u!==t){const d=i.current,h=ap(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),wr(()=>{if(e){const l=f=>{const h=ap(n.current).includes(f.animationName);f.target===e&&h&&Wa.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(i.current=ap(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function ap(t){return(t==null?void 0:t.animationName)||"none"}function OK(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var pl=x.forwardRef((t,e)=>{const{children:r,...n}=t,s=x.Children.toArray(r),i=s.find(RK);if(i){const o=i.props.children,a=s.map(c=>c===i?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return C.jsx(_w,{...n,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,a):null})}return C.jsx(_w,{...n,ref:e,children:r})});pl.displayName="Slot";var _w=x.forwardRef((t,e)=>{const{children:r,...n}=t;if(x.isValidElement(r)){const s=_K(r);return x.cloneElement(r,{...NK(n,r.props),ref:e?gv(e,s):s})}return x.Children.count(r)>1?x.Children.only(null):null});_w.displayName="SlotClone";var GP=({children:t})=>C.jsx(C.Fragment,{children:t});function RK(t){return x.isValidElement(t)&&t.type===GP}function NK(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function _K(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var MK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Se=MK.reduce((t,e)=>{const r=x.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?pl:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function $C(t,e){t&&Wa.flushSync(()=>t.dispatchEvent(e))}var WC="Checkbox",[DK,E0e]=Lr(WC),[BK,LK]=DK(WC),qP=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=x.useState(null),h=Ve(e,m=>d(m)),y=x.useRef(!1),p=f?!!f.closest("form"):!0,[b=!1,g]=ls({prop:s,defaultProp:i,onChange:l}),v=x.useRef(b);return x.useEffect(()=>{const m=f==null?void 0:f.form;if(m){const k=()=>g(v.current);return m.addEventListener("reset",k),()=>m.removeEventListener("reset",k)}},[f,g]),C.jsxs(BK,{scope:r,state:b,disabled:a,children:[C.jsx(Se.button,{type:"button",role:"checkbox","aria-checked":tl(b)?"mixed":b,"aria-required":o,"data-state":JP(b),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onKeyDown:ce(t.onKeyDown,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:ce(t.onClick,m=>{g(k=>tl(k)?!0:!k),p&&(y.current=m.isPropagationStopped(),y.current||m.stopPropagation())})}),p&&C.jsx(jK,{control:f,bubbles:!y.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});qP.displayName=WC;var KP="CheckboxIndicator",QP=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=LK(KP,r);return C.jsx(Zr,{present:n||tl(i.state)||i.state===!0,children:C.jsx(Se.span,{"data-state":JP(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});QP.displayName=KP;var jK=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=vv(r),a=mv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=tl(r),f.call(c,tl(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:tl(r)?!1:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function tl(t){return t==="indeterminate"}function JP(t){return tl(t)?"indeterminate":t?"checked":"unchecked"}var FK=qP,UK=QP,$K=At({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"_43lu9r5 _43lu9r0 fyvr11p4 fyvr11mc fyvr11ck fyvr11l8",left:"_43lu9r6 _43lu9r1 fyvr11ow fyvr11mk fyvr11ck fyvr11l8",right:"_43lu9r7 _43lu9r2 fyvr11ow fyvr11mk fyvr11ck fyvr11l8",hidden:"_43lu9r8 _43lu9r3 fyvr11c8 fyvr11l8"}},defaultVariants:{},compoundVariants:[]});const gd=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?C.jsxs(Ce,{flexDirection:"column",gap:"0.5",children:[r&&C.jsx(It,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&C.jsx(It,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return C.jsxs(Ce,{as:"label",className:$K({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var vd=At({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const WK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),YP=({size:t="sm",...e})=>C.jsx(Ce,{as:WK,className:vd({size:t}),...e}),VK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),XP=({size:t="sm",...e})=>C.jsx(Ce,{as:VK,className:vd({size:t}),...e}),zK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),VC=({size:t="sm",...e})=>C.jsx(Ce,{as:zK,className:vd({size:t}),...e}),HK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),GK=({size:t="sm",...e})=>C.jsx(Ce,{as:HK,className:vd({size:t}),...e}),qK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),KK=({size:t="sm",...e})=>C.jsx(Ce,{as:qK,className:vd({size:t}),...e}),QK=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),JK=({size:t="sm",...e})=>C.jsx(Ce,{as:QK,className:vd({size:t}),...e});var YK=At({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr12rl fyvr12k9 fyvr125l fyvr12cx fyvr12rr fyvr12kf fyvr125r fyvr12d3 fyvr11l8 fyvr11ow fyvr11no fyvr11sl fyvr1309 fyvr1307 fyvr12zz fyvr12zf fyvr12zb _4efw240",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),XK="_1c9x66f4 fyvr12w9 fyvr11l8 fyvr11ow fyvr11no fyvr12g fyvr164";const ZK=({size:t="sm"})=>C.jsx(UK,{className:XK,children:C.jsx(YP,{size:t==="lg"?"sm":"xs"})});x.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return C.jsx(gd,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:C.jsx(FK,{className:YK({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:C.jsx(ZK,{size:a})})})});zr.createContext(null);var eQ=k$.useId||(()=>{}),tQ=0;function ns(t){const[e,r]=x.useState(eQ());return wr(()=>{t||r(n=>n??String(tQ++))},[t]),t||(e?`radix-${e}`:"")}var zC="Collapsible",[rQ,C0e]=Lr(zC),[nQ,HC]=rQ(zC),ZP=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,l]=ls({prop:n,defaultProp:s,onChange:o});return C.jsx(nQ,{scope:r,disabled:i,contentId:ns(),open:c,onOpenToggle:x.useCallback(()=>l(u=>!u),[l]),children:C.jsx(Se.div,{"data-state":qC(c),"data-disabled":i?"":void 0,...a,ref:e})})});ZP.displayName=zC;var eO="CollapsibleTrigger",tO=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=HC(eO,r);return C.jsx(Se.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":qC(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:ce(t.onClick,s.onOpenToggle)})});tO.displayName=eO;var GC="CollapsibleContent",rO=x.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=HC(GC,t.__scopeCollapsible);return C.jsx(Zr,{present:r||s.open,children:({present:i})=>C.jsx(sQ,{...n,ref:e,present:i})})});rO.displayName=GC;var sQ=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=HC(GC,r),[a,c]=x.useState(n),l=x.useRef(null),u=Ve(e,l),f=x.useRef(0),d=f.current,h=x.useRef(0),y=h.current,p=o.open||a,b=x.useRef(p),g=x.useRef();return x.useEffect(()=>{const v=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(v)},[]),wr(()=>{const v=l.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const m=v.getBoundingClientRect();f.current=m.height,h.current=m.width,b.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(n)}},[o.open,n]),C.jsx(Se.div,{"data-state":qC(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p,...i,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:p&&s})});function qC(t){return t?"open":"closed"}var iQ=ZP,oQ=tO,aQ=rO,U6="64px",cQ="_4j62fl0",lQ="_4j62fl2 _4j62fl1 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11l8 fyvr11ow fyvr11sl fyvr12g fyvr12zf fyvr11rc _4efw240",uQ="_4j62fl4 _4j62fl3 fyvr1zk fyvr111o fyvr1uw fyvr1xg fyvr12g",fQ="_4j62fl5";const dQ=t=>{const{className:e,children:r,defaultOpen:n,open:s,onOpenChange:i,label:o,...a}=t,[c,l]=x.useState(n),u=s??c,f=h=>{s===void 0&&l(h)},d=h=>{f(h),i==null||i(h)};return C.jsx(iQ,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:C.jsxs(Ce,{as:Ou.div,className:ar(e,cQ),initial:{height:u?"auto":U6},animate:{height:u?"auto":U6},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[C.jsxs(oQ,{className:lQ,children:[C.jsx(It,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),C.jsx(Ce,{as:Ou.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:u?180:0},animate:{rotate:u?180:0},transition:{ease:"linear",duration:.1},children:C.jsx(XP,{className:fQ,color:"text50"})})]}),C.jsx(UP,{children:u&&C.jsx(aQ,{className:uQ,asChild:!0,forceMount:!0,children:C.jsx(Ou.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function xv(t){const e=t+"CollectionProvider",[r,n]=Lr(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:y,children:p}=h,b=zr.useRef(null),g=zr.useRef(new Map).current;return C.jsx(s,{scope:y,itemMap:g,collectionRef:b,children:p})};o.displayName=e;const a=t+"CollectionSlot",c=zr.forwardRef((h,y)=>{const{scope:p,children:b}=h,g=i(a,p),v=Ve(y,g.collectionRef);return C.jsx(pl,{ref:v,children:b})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",f=zr.forwardRef((h,y)=>{const{scope:p,children:b,...g}=h,v=zr.useRef(null),m=Ve(y,v),k=i(l,p);return zr.useEffect(()=>(k.itemMap.set(v,{ref:v,...g}),()=>void k.itemMap.delete(v))),C.jsx(pl,{[u]:"",ref:m,children:b})});f.displayName=l;function d(h){const y=i(t+"CollectionConsumer",h);return zr.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((k,A)=>g.indexOf(k.ref.current)-g.indexOf(A.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}var hQ=x.createContext(void 0);function y1(t){const e=x.useContext(hQ);return t||e||"ltr"}function pQ(t,e=globalThis==null?void 0:globalThis.document){const r=Dr(t);x.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var yQ="DismissableLayer",Mw="dismissableLayer.update",gQ="dismissableLayer.pointerDownOutside",vQ="dismissableLayer.focusOutside",$6,nO=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),md=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,l=x.useContext(nO),[u,f]=x.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=Ve(e,R=>f(R)),p=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(b),v=u?p.indexOf(u):-1,m=l.layersWithOutsidePointerEventsDisabled.size>0,k=v>=g,A=xQ(R=>{const N=R.target,V=[...l.branches].some(F=>F.contains(N));!k||V||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},d),P=bQ(R=>{const N=R.target;[...l.branches].some(F=>F.contains(N))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},d);return pQ(R=>{v===l.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},d),x.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($6=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),W6(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$6)}},[u,d,r,l]),x.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),W6())},[u,l]),x.useEffect(()=>{const R=()=>h({});return document.addEventListener(Mw,R),()=>document.removeEventListener(Mw,R)},[]),C.jsx(Se.div,{...c,ref:y,style:{pointerEvents:m?k?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,A.onPointerDownCapture)})});md.displayName=yQ;var mQ="DismissableLayerBranch",sO=x.forwardRef((t,e)=>{const r=x.useContext(nO),n=x.useRef(null),s=Ve(e,n);return x.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),C.jsx(Se.div,{...t,ref:s})});sO.displayName=mQ;function xQ(t,e=globalThis==null?void 0:globalThis.document){const r=Dr(t),n=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){iO(gQ,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function bQ(t,e=globalThis==null?void 0:globalThis.document){const r=Dr(t),n=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!n.current&&iO(vQ,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function W6(){const t=new CustomEvent(Mw);document.dispatchEvent(t)}function iO(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?$C(s,i):s.dispatchEvent(i)}var wQ=md,EQ=sO,Ox=0;function KC(){x.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??V6()),document.body.insertAdjacentElement("beforeend",t[1]??V6()),Ox++,()=>{Ox===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ox--}},[])}function V6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var Rx="focusScope.autoFocusOnMount",Nx="focusScope.autoFocusOnUnmount",z6={bubbles:!1,cancelable:!0},CQ="FocusScope",bv=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=x.useState(null),l=Dr(s),u=Dr(i),f=x.useRef(null),d=Ve(e,p=>c(p)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let p=function(m){if(h.paused||!a)return;const k=m.target;a.contains(k)?f.current=k:Mo(f.current,{select:!0})},b=function(m){if(h.paused||!a)return;const k=m.relatedTarget;k!==null&&(a.contains(k)||Mo(f.current,{select:!0}))},g=function(m){if(document.activeElement===document.body)for(const A of m)A.removedNodes.length>0&&Mo(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",b);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",b),v.disconnect()}}},[n,a,h.paused]),x.useEffect(()=>{if(a){G6.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(Rx,z6);a.addEventListener(Rx,l),a.dispatchEvent(g),g.defaultPrevented||(kQ(PQ(oO(a)),{select:!0}),document.activeElement===p&&Mo(a))}return()=>{a.removeEventListener(Rx,l),setTimeout(()=>{const g=new CustomEvent(Nx,z6);a.addEventListener(Nx,u),a.dispatchEvent(g),g.defaultPrevented||Mo(p??document.body,{select:!0}),a.removeEventListener(Nx,u),G6.remove(h)},0)}}},[a,l,u,h]);const y=x.useCallback(p=>{if(!r&&!n||h.paused)return;const b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(b&&g){const v=p.currentTarget,[m,k]=SQ(v);m&&k?!p.shiftKey&&g===k?(p.preventDefault(),r&&Mo(m,{select:!0})):p.shiftKey&&g===m&&(p.preventDefault(),r&&Mo(k,{select:!0})):g===v&&p.preventDefault()}},[r,n,h.paused]);return C.jsx(Se.div,{tabIndex:-1,...o,ref:d,onKeyDown:y})});bv.displayName=CQ;function kQ(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Mo(n,{select:e}),document.activeElement!==r)return}function SQ(t){const e=oO(t),r=H6(e,t),n=H6(e.reverse(),t);return[r,n]}function oO(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function H6(t,e){for(const r of t)if(!AQ(r,{upTo:e}))return r}function AQ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function TQ(t){return t instanceof HTMLInputElement&&"select"in t}function Mo(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&TQ(t)&&e&&t.select()}}var G6=IQ();function IQ(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=q6(t,e),t.unshift(e)},remove(e){var r;t=q6(t,e),(r=t[0])==null||r.resume()}}}function q6(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function PQ(t){return t.filter(e=>e.tagName!=="A")}const OQ=["top","right","bottom","left"],li=Math.min,An=Math.max,rg=Math.round,cp=Math.floor,_a=t=>({x:t,y:t}),RQ={left:"right",right:"left",bottom:"top",top:"bottom"},NQ={start:"end",end:"start"};function Dw(t,e,r){return An(t,li(e,r))}function ho(t,e){return typeof t=="function"?t(e):t}function po(t){return t.split("-")[0]}function xd(t){return t.split("-")[1]}function QC(t){return t==="x"?"y":"x"}function JC(t){return t==="y"?"height":"width"}function Ma(t){return["top","bottom"].includes(po(t))?"y":"x"}function YC(t){return QC(Ma(t))}function _Q(t,e,r){r===void 0&&(r=!1);const n=xd(t),s=YC(t),i=JC(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=ng(o)),[o,ng(o)]}function MQ(t){const e=ng(t);return[Bw(t),e,Bw(e)]}function Bw(t){return t.replace(/start|end/g,e=>NQ[e])}function DQ(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function BQ(t,e,r,n){const s=xd(t);let i=DQ(po(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Bw)))),i}function ng(t){return t.replace(/left|right|bottom|top/g,e=>RQ[e])}function LQ(t){return{top:0,right:0,bottom:0,left:0,...t}}function aO(t){return typeof t!="number"?LQ(t):{top:t,right:t,bottom:t,left:t}}function sg(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function K6(t,e,r){let{reference:n,floating:s}=t;const i=Ma(e),o=YC(e),a=JC(o),c=po(e),l=i==="y",u=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(xd(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const jQ=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=K6(l,n,c),d=n,h={},y=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=ho(t,e)||{};if(l==null)return{};const f=aO(u),d={x:r,y:n},h=YC(s),y=JC(h),p=await o.getDimensions(l),b=h==="y",g=b?"top":"left",v=b?"bottom":"right",m=b?"clientHeight":"clientWidth",k=i.reference[y]+i.reference[h]-d[h]-i.floating[y],A=d[h]-i.reference[h],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let R=P?P[m]:0;(!R||!await(o.isElement==null?void 0:o.isElement(P)))&&(R=a.floating[m]||i.floating[y]);const N=k/2-A/2,V=R/2-p[y]/2-1,F=li(f[g],V),X=li(f[v],V),re=F,le=R-p[y]-X,ee=R/2-p[y]/2+N,B=Dw(re,ee,le),G=!c.arrow&&xd(s)!=null&&ee!==B&&i.reference[y]/2-(eeee<=0)){var X,re;const ee=(((X=i.flip)==null?void 0:X.index)||0)+1,B=R[ee];if(B)return{data:{index:ee,overflows:F},reset:{placement:B}};let G=(re=F.filter(Z=>Z.overflows[0]<=0).sort((Z,E)=>Z.overflows[1]-E.overflows[1])[0])==null?void 0:re.placement;if(!G)switch(h){case"bestFit":{var le;const Z=(le=F.filter(E=>{if(P){const S=Ma(E.placement);return S===v||S==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(S=>S>0).reduce((S,O)=>S+O,0)]).sort((E,S)=>E[1]-S[1])[0])==null?void 0:le[0];Z&&(G=Z);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function Q6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function J6(t){return OQ.some(e=>t[e]>=0)}const $Q=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=ho(t,e);switch(n){case"referenceHidden":{const i=await g0(e,{...s,elementContext:"reference"}),o=Q6(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:J6(o)}}}case"escaped":{const i=await g0(e,{...s,altBoundary:!0}),o=Q6(i,r.floating);return{data:{escapedOffsets:o,escaped:J6(o)}}}default:return{}}}}};async function WQ(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=po(r),a=xd(r),c=Ma(r)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=ho(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const VQ=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await WQ(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},zQ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y:v}=b;return{x:g,y:v}}},...c}=ho(t,e),l={x:r,y:n},u=await g0(e,c),f=Ma(po(s)),d=QC(f);let h=l[d],y=l[f];if(i){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=h+u[b],m=h-u[g];h=Dw(v,h,m)}if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=y+u[b],m=y-u[g];y=Dw(v,y,m)}const p=a.fn({...e,[d]:h,[f]:y});return{...p,data:{x:p.x-r,y:p.y-n}}}}},HQ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=ho(t,e),u={x:r,y:n},f=Ma(s),d=QC(f);let h=u[d],y=u[f];const p=ho(a,e),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const m=d==="y"?"height":"width",k=i.reference[d]-i.floating[m]+b.mainAxis,A=i.reference[d]+i.reference[m]-b.mainAxis;hA&&(h=A)}if(l){var g,v;const m=d==="y"?"width":"height",k=["top","left"].includes(po(s)),A=i.reference[f]-i.floating[m]+(k&&((g=o.offset)==null?void 0:g[f])||0)+(k?0:b.crossAxis),P=i.reference[f]+i.reference[m]+(k?0:((v=o.offset)==null?void 0:v[f])||0)-(k?b.crossAxis:0);yP&&(y=P)}return{[d]:h,[f]:y}}}},GQ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=ho(t,e),c=await g0(e,a),l=po(r),u=xd(r),f=Ma(r)==="y",{width:d,height:h}=n.floating;let y,p;l==="top"||l==="bottom"?(y=l,p=u===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(p=l,y=u==="end"?"top":"bottom");const b=h-c.top-c.bottom,g=d-c.left-c.right,v=li(h-c[y],b),m=li(d-c[p],g),k=!e.middlewareData.shift;let A=v,P=m;if(f?P=u||k?li(m,g):g:A=u||k?li(v,b):b,k&&!u){const N=An(c.left,0),V=An(c.right,0),F=An(c.top,0),X=An(c.bottom,0);f?P=d-2*(N!==0||V!==0?N+V:An(c.left,c.right)):A=h-2*(F!==0||X!==0?F+X:An(c.top,c.bottom))}await o({...e,availableWidth:P,availableHeight:A});const R=await s.getDimensions(i.floating);return d!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function bd(t){return cO(t)?(t.nodeName||"").toLowerCase():"#document"}function On(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function mo(t){var e;return(e=(cO(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function cO(t){return t instanceof Node||t instanceof On(t).Node}function mi(t){return t instanceof Element||t instanceof On(t).Element}function xi(t){return t instanceof HTMLElement||t instanceof On(t).HTMLElement}function Y6(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof On(t).ShadowRoot}function g1(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Bs(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function qQ(t){return["table","td","th"].includes(bd(t))}function wv(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function XC(t){const e=ZC(),r=Bs(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function KQ(t){let e=Da(t);for(;xi(e)&&!Hf(e);){if(wv(e))return null;if(XC(e))return e;e=Da(e)}return null}function ZC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hf(t){return["html","body","#document"].includes(bd(t))}function Bs(t){return On(t).getComputedStyle(t)}function Ev(t){return mi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Da(t){if(bd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Y6(t)&&t.host||mo(t);return Y6(e)?e.host:e}function lO(t){const e=Da(t);return Hf(e)?t.ownerDocument?t.ownerDocument.body:t.body:xi(e)&&g1(e)?e:lO(e)}function v0(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=lO(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=On(s);return i?e.concat(o,o.visualViewport||[],g1(s)?s:[],o.frameElement&&r?v0(o.frameElement):[]):e.concat(s,v0(s,[],r))}function uO(t){const e=Bs(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=xi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=rg(r)!==i||rg(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function ek(t){return mi(t)?t:t.contextElement}function Ru(t){const e=ek(t);if(!xi(e))return _a(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=uO(e);let o=(i?rg(r.width):r.width)/n,a=(i?rg(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const QQ=_a(0);function fO(t){const e=On(t);return!ZC()||!e.visualViewport?QQ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function JQ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==On(t)?!1:e}function yl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=ek(t);let o=_a(1);e&&(n?mi(n)&&(o=Ru(n)):o=Ru(t));const a=JQ(i,r,n)?fO(i):_a(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(i){const d=On(i),h=n&&mi(n)?On(n):n;let y=d,p=y.frameElement;for(;p&&n&&h!==y;){const b=Ru(p),g=p.getBoundingClientRect(),v=Bs(p),m=g.left+(p.clientLeft+parseFloat(v.paddingLeft))*b.x,k=g.top+(p.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,f*=b.y,c+=m,l+=k,y=On(p),p=y.frameElement}}return sg({width:u,height:f,x:c,y:l})}function YQ(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=mo(n),a=e?wv(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=_a(1);const u=_a(0),f=xi(n);if((f||!f&&!i)&&((bd(n)!=="body"||g1(o))&&(c=Ev(n)),xi(n))){const d=yl(n);l=Ru(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x,y:r.y*l.y-c.scrollTop*l.y+u.y}}function XQ(t){return Array.from(t.getClientRects())}function dO(t){return yl(mo(t)).left+Ev(t).scrollLeft}function ZQ(t){const e=mo(t),r=Ev(t),n=t.ownerDocument.body,s=An(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=An(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+dO(t);const a=-r.scrollTop;return Bs(n).direction==="rtl"&&(o+=An(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function eJ(t,e){const r=On(t),n=mo(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=ZC();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function tJ(t,e){const r=yl(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=xi(t)?Ru(t):_a(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function X6(t,e,r){let n;if(e==="viewport")n=eJ(t,r);else if(e==="document")n=ZQ(mo(t));else if(mi(e))n=tJ(e,r);else{const s=fO(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return sg(n)}function hO(t,e){const r=Da(t);return r===e||!mi(r)||Hf(r)?!1:Bs(r).position==="fixed"||hO(r,e)}function rJ(t,e){const r=e.get(t);if(r)return r;let n=v0(t,[],!1).filter(a=>mi(a)&&bd(a)!=="body"),s=null;const i=Bs(t).position==="fixed";let o=i?Da(t):t;for(;mi(o)&&!Hf(o);){const a=Bs(o),c=XC(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||g1(o)&&!c&&hO(t,o))?n=n.filter(u=>u!==o):s=a,o=Da(o)}return e.set(t,n),n}function nJ(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?wv(e)?[]:rJ(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=X6(e,u,s);return l.top=An(f.top,l.top),l.right=li(f.right,l.right),l.bottom=li(f.bottom,l.bottom),l.left=An(f.left,l.left),l},X6(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function sJ(t){const{width:e,height:r}=uO(t);return{width:e,height:r}}function iJ(t,e,r){const n=xi(e),s=mo(e),i=r==="fixed",o=yl(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=_a(0);if(n||!n&&!i)if((bd(e)!=="body"||g1(s))&&(a=Ev(e)),n){const f=yl(e,!0,i,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else s&&(c.x=dO(s));const l=o.left+a.scrollLeft-c.x,u=o.top+a.scrollTop-c.y;return{x:l,y:u,width:o.width,height:o.height}}function _x(t){return Bs(t).position==="static"}function Z6(t,e){return!xi(t)||Bs(t).position==="fixed"?null:e?e(t):t.offsetParent}function pO(t,e){const r=On(t);if(wv(t))return r;if(!xi(t)){let s=Da(t);for(;s&&!Hf(s);){if(mi(s)&&!_x(s))return s;s=Da(s)}return r}let n=Z6(t,e);for(;n&&qQ(n)&&_x(n);)n=Z6(n,e);return n&&Hf(n)&&_x(n)&&!XC(n)?r:n||KQ(t)||r}const oJ=async function(t){const e=this.getOffsetParent||pO,r=this.getDimensions,n=await r(t.floating);return{reference:iJ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function aJ(t){return Bs(t).direction==="rtl"}const cJ={convertOffsetParentRelativeRectToViewportRelativeRect:YQ,getDocumentElement:mo,getClippingRect:nJ,getOffsetParent:pO,getElementRects:oJ,getClientRects:XQ,getDimensions:sJ,getScale:Ru,isElement:mi,isRTL:aJ};function lJ(t,e){let r=null,n;const s=mo(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=cp(u),y=cp(s.clientWidth-(l+f)),p=cp(s.clientHeight-(u+d)),b=cp(l),v={rootMargin:-h+"px "+-y+"px "+-p+"px "+-b+"px",threshold:An(0,li(1,c))||1};let m=!0;function k(A){const P=A[0].intersectionRatio;if(P!==c){if(!m)return o();P?o(!1,P):n=setTimeout(()=>{o(!1,1e-7)},1e3)}m=!1}try{r=new IntersectionObserver(k,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,v)}r.observe(t)}return o(!0),i}function uJ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=ek(t),u=s||i?[...l?v0(l):[],...v0(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const f=l&&a?lJ(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[v]=g;v&&v.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var m;(m=h)==null||m.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let y,p=c?yl(t):null;c&&b();function b(){const g=yl(t);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&r(),p=g,y=requestAnimationFrame(b)}return r(),()=>{var g;u.forEach(v=>{s&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const fJ=VQ,dJ=zQ,hJ=UQ,pJ=GQ,yJ=$Q,e3=FQ,gJ=HQ,vJ=(t,e,r)=>{const n=new Map,s={platform:cJ,...r},i={...s.platform,_c:n};return jQ(t,e,{...s,platform:i})};var Jp=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ig(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!ig(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!ig(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function yO(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function t3(t,e){const r=yO(t);return Math.round(e*r)/r}function r3(t){const e=x.useRef(t);return Jp(()=>{e.current=t}),e}function mJ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=x.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=x.useState(n);ig(d,n)||h(n);const[y,p]=x.useState(null),[b,g]=x.useState(null),v=x.useCallback(Z=>{Z!==P.current&&(P.current=Z,p(Z))},[]),m=x.useCallback(Z=>{Z!==R.current&&(R.current=Z,g(Z))},[]),k=i||y,A=o||b,P=x.useRef(null),R=x.useRef(null),N=x.useRef(u),V=c!=null,F=r3(c),X=r3(s),re=x.useCallback(()=>{if(!P.current||!R.current)return;const Z={placement:e,strategy:r,middleware:d};X.current&&(Z.platform=X.current),vJ(P.current,R.current,Z).then(E=>{const S={...E,isPositioned:!0};le.current&&!ig(N.current,S)&&(N.current=S,Wa.flushSync(()=>{f(S)}))})},[d,e,r,X]);Jp(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(Z=>({...Z,isPositioned:!1})))},[l]);const le=x.useRef(!1);Jp(()=>(le.current=!0,()=>{le.current=!1}),[]),Jp(()=>{if(k&&(P.current=k),A&&(R.current=A),k&&A){if(F.current)return F.current(k,A,re);re()}},[k,A,re,F,V]);const ee=x.useMemo(()=>({reference:P,floating:R,setReference:v,setFloating:m}),[v,m]),B=x.useMemo(()=>({reference:k,floating:A}),[k,A]),G=x.useMemo(()=>{const Z={position:r,left:0,top:0};if(!B.floating)return Z;const E=t3(B.floating,u.x),S=t3(B.floating,u.y);return a?{...Z,transform:"translate("+E+"px, "+S+"px)",...yO(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:E,top:S}},[r,a,B.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:re,refs:ee,elements:B,floatingStyles:G}),[u,re,ee,B,G])}const xJ=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?e3({element:n.current,padding:s}).fn(r):{}:n?e3({element:n,padding:s}).fn(r):{}}}},bJ=(t,e)=>({...fJ(t),options:[t,e]}),wJ=(t,e)=>({...dJ(t),options:[t,e]}),EJ=(t,e)=>({...gJ(t),options:[t,e]}),CJ=(t,e)=>({...hJ(t),options:[t,e]}),kJ=(t,e)=>({...pJ(t),options:[t,e]}),SJ=(t,e)=>({...yJ(t),options:[t,e]}),AJ=(t,e)=>({...xJ(t),options:[t,e]});var TJ="Arrow",gO=x.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return C.jsx(Se.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});gO.displayName=TJ;var IJ=gO,tk="Popper",[vO,wd]=Lr(tk),[PJ,mO]=vO(tk),xO=t=>{const{__scopePopper:e,children:r}=t,[n,s]=x.useState(null);return C.jsx(PJ,{scope:e,anchor:n,onAnchorChange:s,children:r})};xO.displayName=tk;var bO="PopperAnchor",wO=x.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=mO(bO,r),o=x.useRef(null),a=Ve(e,o);return x.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.jsx(Se.div,{...s,ref:a})});wO.displayName=bO;var rk="PopperContent",[OJ,RJ]=vO(rk),EO=x.forwardRef((t,e)=>{var r,n,s,i,o,a;const{__scopePopper:c,side:l="bottom",sideOffset:u=0,align:f="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:p=[],collisionPadding:b=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:k,...A}=t,P=mO(rk,c),[R,N]=x.useState(null),V=Ve(e,Me=>N(Me)),[F,X]=x.useState(null),re=mv(F),le=(re==null?void 0:re.width)??0,ee=(re==null?void 0:re.height)??0,B=l+(f!=="center"?"-"+f:""),G=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},Z=Array.isArray(p)?p:[p],E=Z.length>0,S={padding:G,boundary:Z.filter(_J),altBoundary:E},{refs:O,floatingStyles:D,placement:L,isPositioned:W,middlewareData:q}=mJ({strategy:"fixed",placement:B,whileElementsMounted:(...Me)=>uJ(...Me,{animationFrame:m==="always"}),elements:{reference:P.anchor},middleware:[bJ({mainAxis:u+ee,alignmentAxis:d}),y&&wJ({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?EJ():void 0,...S}),y&&CJ({...S}),kJ({...S,apply:({elements:Me,rects:bt,availableWidth:rn,availableHeight:Er})=>{const{width:U,height:se}=bt.reference,ae=Me.floating.style;ae.setProperty("--radix-popper-available-width",`${rn}px`),ae.setProperty("--radix-popper-available-height",`${Er}px`),ae.setProperty("--radix-popper-anchor-width",`${U}px`),ae.setProperty("--radix-popper-anchor-height",`${se}px`)}}),F&&AJ({element:F,padding:h}),MJ({arrowWidth:le,arrowHeight:ee}),v&&SJ({strategy:"referenceHidden",...S})]}),[te,J]=SO(L),$=Dr(k);wr(()=>{W&&($==null||$())},[W,$]);const K=(r=q.arrow)==null?void 0:r.x,ue=(n=q.arrow)==null?void 0:n.y,he=((s=q.arrow)==null?void 0:s.centerOffset)!==0,[oe,ke]=x.useState();return wr(()=>{R&&ke(window.getComputedStyle(R).zIndex)},[R]),C.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:W?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(i=q.transformOrigin)==null?void 0:i.x,(o=q.transformOrigin)==null?void 0:o.y].join(" "),...((a=q.hide)==null?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:C.jsx(OJ,{scope:c,placedSide:te,onArrowChange:X,arrowX:K,arrowY:ue,shouldHideArrow:he,children:C.jsx(Se.div,{"data-side":te,"data-align":J,...A,ref:V,style:{...A.style,animation:W?void 0:"none"}})})})});EO.displayName=rk;var CO="PopperArrow",NJ={top:"bottom",right:"left",bottom:"top",left:"right"},kO=x.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=RJ(CO,n),o=NJ[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(IJ,{...s,ref:r,style:{...s.style,display:"block"}})})});kO.displayName=CO;function _J(t){return t!==null}var MJ=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s;const{placement:i,rects:o,middlewareData:a}=e,l=((r=a.arrow)==null?void 0:r.centerOffset)!==0,u=l?0:t.arrowWidth,f=l?0:t.arrowHeight,[d,h]=SO(i),y={start:"0%",center:"50%",end:"100%"}[h],p=(((n=a.arrow)==null?void 0:n.x)??0)+u/2,b=(((s=a.arrow)==null?void 0:s.y)??0)+f/2;let g="",v="";return d==="bottom"?(g=l?y:`${p}px`,v=`${-f}px`):d==="top"?(g=l?y:`${p}px`,v=`${o.floating.height+f}px`):d==="right"?(g=`${-f}px`,v=l?y:`${b}px`):d==="left"&&(g=`${o.floating.width+f}px`,v=l?y:`${b}px`),{data:{x:g,y:v}}}});function SO(t){const[e,r="center"]=t.split("-");return[e,r]}var nk=xO,sk=wO,ik=EO,ok=kO,DJ="Portal",v1=x.forwardRef((t,e)=>{var r;const{container:n,...s}=t,[i,o]=x.useState(!1);wr(()=>o(!0),[]);const a=n||i&&((r=globalThis==null?void 0:globalThis.document)==null?void 0:r.body);return a?DV.createPortal(C.jsx(Se.div,{...s,ref:e}),a):null});v1.displayName=DJ;var Mx="rovingFocusGroup.onEntryFocus",BJ={bubbles:!1,cancelable:!0},Cv="RovingFocusGroup",[Lw,AO,LJ]=xv(Cv),[jJ,Ed]=Lr(Cv,[LJ]),[FJ,UJ]=jJ(Cv),TO=x.forwardRef((t,e)=>C.jsx(Lw.Provider,{scope:t.__scopeRovingFocusGroup,children:C.jsx(Lw.Slot,{scope:t.__scopeRovingFocusGroup,children:C.jsx($J,{...t,ref:e})})}));TO.displayName=Cv;var $J=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=t,d=x.useRef(null),h=Ve(e,d),y=y1(i),[p=null,b]=ls({prop:o,defaultProp:a,onChange:c}),[g,v]=x.useState(!1),m=Dr(l),k=AO(r),A=x.useRef(!1),[P,R]=x.useState(0);return x.useEffect(()=>{const N=d.current;if(N)return N.addEventListener(Mx,m),()=>N.removeEventListener(Mx,m)},[m]),C.jsx(FJ,{scope:r,orientation:n,dir:y,loop:s,currentTabStopId:p,onItemFocus:x.useCallback(N=>b(N),[b]),onItemShiftTab:x.useCallback(()=>v(!0),[]),onFocusableItemAdd:x.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:x.useCallback(()=>R(N=>N-1),[]),children:C.jsx(Se.div,{tabIndex:g||P===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{A.current=!0}),onFocus:ce(t.onFocus,N=>{const V=!A.current;if(N.target===N.currentTarget&&V&&!g){const F=new CustomEvent(Mx,BJ);if(N.currentTarget.dispatchEvent(F),!F.defaultPrevented){const X=k().filter(G=>G.focusable),re=X.find(G=>G.active),le=X.find(G=>G.id===p),B=[re,le,...X].filter(Boolean).map(G=>G.ref.current);OO(B,u)}}A.current=!1}),onBlur:ce(t.onBlur,()=>v(!1))})})}),IO="RovingFocusGroupItem",PO=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=ns(),c=i||a,l=UJ(IO,r),u=l.currentTabStopId===c,f=AO(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return x.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),C.jsx(Lw.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:C.jsx(Se.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:e,onMouseDown:ce(t.onMouseDown,y=>{n?l.onItemFocus(c):y.preventDefault()}),onFocus:ce(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const p=zJ(y,l.orientation,l.dir);if(p!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let g=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const v=g.indexOf(y.currentTarget);g=l.loop?HJ(g,v+1):g.slice(v+1)}setTimeout(()=>OO(g))}})})})});PO.displayName=IO;var WJ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VJ(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function zJ(t,e,r){const n=VJ(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return WJ[n]}function OO(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function HJ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var ak=TO,ck=PO,GJ=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Dl=new WeakMap,lp=new WeakMap,up={},Dx=0,RO=function(t){return t&&(t.host||RO(t.parentNode))},qJ=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=RO(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},KJ=function(t,e,r,n){var s=qJ(e,Array.isArray(t)?t:[t]);up[r]||(up[r]=new WeakMap);var i=up[r],o=[],a=new Set,c=new Set(s),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};s.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(n),y=h!==null&&h!=="false",p=(Dl.get(d)||0)+1,b=(i.get(d)||0)+1;Dl.set(d,p),i.set(d,b),o.push(d),p===1&&y&&lp.set(d,!0),b===1&&d.setAttribute(r,"true"),y||d.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return u(e),a.clear(),Dx++,function(){o.forEach(function(f){var d=Dl.get(f)-1,h=i.get(f)-1;Dl.set(f,d),i.set(f,h),d||(lp.has(f)||f.removeAttribute(n),lp.delete(f)),h||f.removeAttribute(r)}),Dx--,Dx||(Dl=new WeakMap,Dl=new WeakMap,lp=new WeakMap,up={})}},lk=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=GJ(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),KJ(n,s,r,"aria-hidden")):function(){return null}},ci=function(){return ci=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return fY;var e=dY(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},pY=DO(),Nu="data-scroll-locked",yY=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(JJ,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body[`).concat(Nu,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(s,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(a,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Yp,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Xp,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Yp," .").concat(Yp,` { + right: 0 `).concat(n,`; + } + + .`).concat(Xp," .").concat(Xp,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(Nu,`] { + `).concat(YJ,": ").concat(a,`px; + } +`)},s3=function(){var t=parseInt(document.body.getAttribute(Nu)||"0",10);return isFinite(t)?t:0},gY=function(){x.useEffect(function(){return document.body.setAttribute(Nu,(s3()+1).toString()),function(){var t=s3()-1;t<=0?document.body.removeAttribute(Nu):document.body.setAttribute(Nu,t.toString())}},[])},vY=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;gY();var i=x.useMemo(function(){return hY(s)},[s]);return x.createElement(pY,{styles:yY(i,!e,s,r?"":"!important")})},jw=!1;if(typeof window<"u")try{var fp=Object.defineProperty({},"passive",{get:function(){return jw=!0,!0}});window.addEventListener("test",fp,fp),window.removeEventListener("test",fp,fp)}catch{jw=!1}var Bl=jw?{passive:!1}:!1,mY=function(t){return t.tagName==="TEXTAREA"},BO=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!mY(t)&&r[e]==="visible")},xY=function(t){return BO(t,"overflowY")},bY=function(t){return BO(t,"overflowX")},i3=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=LO(t,n);if(s){var i=jO(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wY=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},EY=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},LO=function(t,e){return t==="v"?xY(e):bY(e)},jO=function(t,e){return t==="v"?wY(e):EY(e)},CY=function(t,e){return t==="h"&&e==="rtl"?-1:1},kY=function(t,e,r,n,s){var i=CY(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=jO(t,a),y=h[0],p=h[1],b=h[2],g=p-b-i*y;(y||g)&&LO(t,a)&&(f+=g,d+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(d)<1||!s))&&(l=!0),l},dp=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},o3=function(t){return[t.deltaX,t.deltaY]},a3=function(t){return t&&"current"in t?t.current:t},SY=function(t,e){return t[0]===e[0]&&t[1]===e[1]},AY=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},TY=0,Ll=[];function IY(t){var e=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),s=x.useState(TY++)[0],i=x.useState(DO)[0],o=x.useRef(t);x.useEffect(function(){o.current=t},[t]),x.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var p=QJ([t.lockRef.current],(t.shards||[]).map(a3)).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=x.useCallback(function(p,b){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var g=dp(p),v=r.current,m="deltaX"in p?p.deltaX:v[0]-g[0],k="deltaY"in p?p.deltaY:v[1]-g[1],A,P=p.target,R=Math.abs(m)>Math.abs(k)?"h":"v";if("touches"in p&&R==="h"&&P.type==="range")return!1;var N=i3(R,P);if(!N)return!0;if(N?A=R:(A=R==="v"?"h":"v",N=i3(R,P)),!N)return!1;if(!n.current&&"changedTouches"in p&&(m||k)&&(n.current=A),!A)return!0;var V=n.current||A;return kY(V,b,p,V==="h"?m:k,!0)},[]),c=x.useCallback(function(p){var b=p;if(!(!Ll.length||Ll[Ll.length-1]!==i)){var g="deltaY"in b?o3(b):dp(b),v=e.current.filter(function(A){return A.name===b.type&&(A.target===b.target||b.target===A.shadowParent)&&SY(A.delta,g)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}if(!v){var m=(o.current.shards||[]).map(a3).filter(Boolean).filter(function(A){return A.contains(b.target)}),k=m.length>0?a(b,m[0]):!o.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),l=x.useCallback(function(p,b,g,v){var m={name:p,delta:b,target:g,should:v,shadowParent:PY(g)};e.current.push(m),setTimeout(function(){e.current=e.current.filter(function(k){return k!==m})},1)},[]),u=x.useCallback(function(p){r.current=dp(p),n.current=void 0},[]),f=x.useCallback(function(p){l(p.type,o3(p),p.target,a(p,t.lockRef.current))},[]),d=x.useCallback(function(p){l(p.type,dp(p),p.target,a(p,t.lockRef.current))},[]);x.useEffect(function(){return Ll.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Bl),document.addEventListener("touchmove",c,Bl),document.addEventListener("touchstart",u,Bl),function(){Ll=Ll.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,Bl),document.removeEventListener("touchmove",c,Bl),document.removeEventListener("touchstart",u,Bl)}},[]);var h=t.removeScrollBar,y=t.inert;return x.createElement(x.Fragment,null,y?x.createElement(i,{styles:AY(s)}):null,h?x.createElement(vY,{gapMode:t.gapMode}):null)}function PY(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const OY=sY(MO,IY);var Sv=x.forwardRef(function(t,e){return x.createElement(kv,ci({},t,{ref:e,sideCar:OY}))});Sv.classNames=kv.classNames;var Fw=["Enter"," "],RY=["ArrowDown","PageUp","Home"],FO=["ArrowUp","PageDown","End"],NY=[...RY,...FO],_Y={ltr:[...Fw,"ArrowRight"],rtl:[...Fw,"ArrowLeft"]},MY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},m1="Menu",[m0,DY,BY]=xv(m1),[Rl,UO]=Lr(m1,[BY,wd,Ed]),Av=wd(),$O=Ed(),[LY,Nl]=Rl(m1),[jY,x1]=Rl(m1),WO=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=t,a=Av(e),[c,l]=x.useState(null),u=x.useRef(!1),f=Dr(i),d=y1(s);return x.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),C.jsx(nk,{...a,children:C.jsx(LY,{scope:e,open:r,onOpenChange:f,content:c,onContentChange:l,children:C.jsx(jY,{scope:e,onClose:x.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:o,children:n})})})};WO.displayName=m1;var FY="MenuAnchor",uk=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Av(r);return C.jsx(sk,{...s,...n,ref:e})});uk.displayName=FY;var fk="MenuPortal",[UY,VO]=Rl(fk,{forceMount:void 0}),zO=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,i=Nl(fk,e);return C.jsx(UY,{scope:e,forceMount:r,children:C.jsx(Zr,{present:r||i.open,children:C.jsx(v1,{asChild:!0,container:s,children:n})})})};zO.displayName=fk;var ss="MenuContent",[$Y,dk]=Rl(ss),HO=x.forwardRef((t,e)=>{const r=VO(ss,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Nl(ss,t.__scopeMenu),o=x1(ss,t.__scopeMenu);return C.jsx(m0.Provider,{scope:t.__scopeMenu,children:C.jsx(Zr,{present:n||i.open,children:C.jsx(m0.Slot,{scope:t.__scopeMenu,children:o.modal?C.jsx(WY,{...s,ref:e}):C.jsx(VY,{...s,ref:e})})})})}),WY=x.forwardRef((t,e)=>{const r=Nl(ss,t.__scopeMenu),n=x.useRef(null),s=Ve(e,n);return x.useEffect(()=>{const i=n.current;if(i)return lk(i)},[]),C.jsx(hk,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),VY=x.forwardRef((t,e)=>{const r=Nl(ss,t.__scopeMenu);return C.jsx(hk,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),hk=x.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:y,...p}=t,b=Nl(ss,r),g=x1(ss,r),v=Av(r),m=$O(r),k=DY(r),[A,P]=x.useState(null),R=x.useRef(null),N=Ve(e,R,b.onContentChange),V=x.useRef(0),F=x.useRef(""),X=x.useRef(0),re=x.useRef(null),le=x.useRef("right"),ee=x.useRef(0),B=y?Sv:x.Fragment,G=y?{as:pl,allowPinchZoom:!0}:void 0,Z=S=>{var O,D;const L=F.current+S,W=k().filter(ue=>!ue.disabled),q=document.activeElement,te=(O=W.find(ue=>ue.ref.current===q))==null?void 0:O.textValue,J=W.map(ue=>ue.textValue),$=tX(J,L,te),K=(D=W.find(ue=>ue.textValue===$))==null?void 0:D.ref.current;(function ue(he){F.current=he,window.clearTimeout(V.current),he!==""&&(V.current=window.setTimeout(()=>ue(""),1e3))})(L),K&&setTimeout(()=>K.focus())};x.useEffect(()=>()=>window.clearTimeout(V.current),[]),KC();const E=x.useCallback(S=>{var O,D;return le.current===((O=re.current)==null?void 0:O.side)&&nX(S,(D=re.current)==null?void 0:D.area)},[]);return C.jsx($Y,{scope:r,searchRef:F,onItemEnter:x.useCallback(S=>{E(S)&&S.preventDefault()},[E]),onItemLeave:x.useCallback(S=>{var O;E(S)||((O=R.current)==null||O.focus(),P(null))},[E]),onTriggerLeave:x.useCallback(S=>{E(S)&&S.preventDefault()},[E]),pointerGraceTimerRef:X,onPointerGraceIntentChange:x.useCallback(S=>{re.current=S},[]),children:C.jsx(B,{...G,children:C.jsx(bv,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,S=>{var O;S.preventDefault(),(O=R.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:C.jsx(md,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:C.jsx(ak,{asChild:!0,...m,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:P,onEntryFocus:ce(c,S=>{g.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:C.jsx(ik,{role:"menu","aria-orientation":"vertical","data-state":a9(b.open),"data-radix-menu-content":"",dir:g.dir,...v,...p,ref:N,style:{outline:"none",...p.style},onKeyDown:ce(p.onKeyDown,S=>{const D=S.target.closest("[data-radix-menu-content]")===S.currentTarget,L=S.ctrlKey||S.altKey||S.metaKey,W=S.key.length===1;D&&(S.key==="Tab"&&S.preventDefault(),!L&&W&&Z(S.key));const q=R.current;if(S.target!==q||!NY.includes(S.key))return;S.preventDefault();const J=k().filter($=>!$.disabled).map($=>$.ref.current);FO.includes(S.key)&&J.reverse(),ZY(J)}),onBlur:ce(t.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(V.current),F.current="")}),onPointerMove:ce(t.onPointerMove,x0(S=>{const O=S.target,D=ee.current!==S.clientX;if(S.currentTarget.contains(O)&&D){const L=S.clientX>ee.current?"right":"left";le.current=L,ee.current=S.clientX}}))})})})})})})});HO.displayName=ss;var zY="MenuGroup",pk=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{role:"group",...n,ref:e})});pk.displayName=zY;var HY="MenuLabel",GO=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});GO.displayName=HY;var og="MenuItem",c3="menu.itemSelect",Tv=x.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=x.useRef(null),o=x1(og,t.__scopeMenu),a=dk(og,t.__scopeMenu),c=Ve(e,i),l=x.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const d=new CustomEvent(c3,{bubbles:!0,cancelable:!0});f.addEventListener(c3,h=>n==null?void 0:n(h),{once:!0}),$C(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return C.jsx(qO,{...s,ref:c,disabled:r,onClick:ce(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),l.current=!0},onPointerUp:ce(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ce(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||Fw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Tv.displayName=og;var qO=x.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=dk(og,r),a=$O(r),c=x.useRef(null),l=Ve(e,c),[u,f]=x.useState(!1),[d,h]=x.useState("");return x.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[i.children]),C.jsx(m0.ItemSlot,{scope:r,disabled:n,textValue:s??d,children:C.jsx(ck,{asChild:!0,...a,focusable:!n,children:C.jsx(Se.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:l,onPointerMove:ce(t.onPointerMove,x0(y=>{n?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,x0(y=>o.onItemLeave(y))),onFocus:ce(t.onFocus,()=>f(!0)),onBlur:ce(t.onBlur,()=>f(!1))})})})}),GY="MenuCheckboxItem",KO=x.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return C.jsx(ZO,{scope:t.__scopeMenu,checked:r,children:C.jsx(Tv,{role:"menuitemcheckbox","aria-checked":ag(r)?"mixed":r,...s,ref:e,"data-state":gk(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(ag(r)?!0:!r),{checkForDefaultPrevented:!1})})})});KO.displayName=GY;var QO="MenuRadioGroup",[qY,KY]=Rl(QO,{value:void 0,onValueChange:()=>{}}),JO=x.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,i=Dr(n);return C.jsx(qY,{scope:t.__scopeMenu,value:r,onValueChange:i,children:C.jsx(pk,{...s,ref:e})})});JO.displayName=QO;var YO="MenuRadioItem",XO=x.forwardRef((t,e)=>{const{value:r,...n}=t,s=KY(YO,t.__scopeMenu),i=r===s.value;return C.jsx(ZO,{scope:t.__scopeMenu,checked:i,children:C.jsx(Tv,{role:"menuitemradio","aria-checked":i,...n,ref:e,"data-state":gk(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});XO.displayName=YO;var yk="MenuItemIndicator",[ZO,QY]=Rl(yk,{checked:!1}),e9=x.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=QY(yk,r);return C.jsx(Zr,{present:n||ag(i.checked)||i.checked===!0,children:C.jsx(Se.span,{...s,ref:e,"data-state":gk(i.checked)})})});e9.displayName=yk;var JY="MenuSeparator",t9=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});t9.displayName=JY;var YY="MenuArrow",r9=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Av(r);return C.jsx(ok,{...s,...n,ref:e})});r9.displayName=YY;var XY="MenuSub",[k0e,n9]=Rl(XY),ih="MenuSubTrigger",s9=x.forwardRef((t,e)=>{const r=Nl(ih,t.__scopeMenu),n=x1(ih,t.__scopeMenu),s=n9(ih,t.__scopeMenu),i=dk(ih,t.__scopeMenu),o=x.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,l={__scopeMenu:t.__scopeMenu},u=x.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return x.useEffect(()=>u,[u]),x.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),C.jsx(uk,{asChild:!0,...l,children:C.jsx(qO,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":a9(r.open),...t,ref:gv(e,s.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ce(t.onPointerMove,x0(f=>{i.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:ce(t.onPointerLeave,x0(f=>{var d,h;u();const y=(d=r.content)==null?void 0:d.getBoundingClientRect();if(y){const p=(h=r.content)==null?void 0:h.dataset.side,b=p==="right",g=b?-5:5,v=y[b?"left":"right"],m=y[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:v,y:y.top},{x:m,y:y.top},{x:m,y:y.bottom},{x:v,y:y.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,f=>{var d;const h=i.searchRef.current!=="";t.disabled||h&&f.key===" "||_Y[n.dir].includes(f.key)&&(r.onOpenChange(!0),(d=r.content)==null||d.focus(),f.preventDefault())})})})});s9.displayName=ih;var i9="MenuSubContent",o9=x.forwardRef((t,e)=>{const r=VO(ss,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Nl(ss,t.__scopeMenu),o=x1(ss,t.__scopeMenu),a=n9(i9,t.__scopeMenu),c=x.useRef(null),l=Ve(e,c);return C.jsx(m0.Provider,{scope:t.__scopeMenu,children:C.jsx(Zr,{present:n||i.open,children:C.jsx(m0.Slot,{scope:t.__scopeMenu,children:C.jsx(hk,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ce(t.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ce(t.onKeyDown,u=>{var f;const d=u.currentTarget.contains(u.target),h=MY[o.dir].includes(u.key);d&&h&&(i.onOpenChange(!1),(f=a.trigger)==null||f.focus(),u.preventDefault())})})})})})});o9.displayName=i9;function a9(t){return t?"open":"closed"}function ag(t){return t==="indeterminate"}function gk(t){return ag(t)?"indeterminate":t?"checked":"unchecked"}function ZY(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function eX(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function tX(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=eX(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function rX(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function nX(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return rX(r,e)}function x0(t){return e=>e.pointerType==="mouse"?t(e):void 0}var sX=WO,iX=uk,oX=zO,aX=HO,cX=pk,lX=GO,uX=Tv,fX=KO,dX=JO,hX=XO,pX=e9,yX=t9,gX=r9,vX=s9,mX=o9,vk="DropdownMenu",[xX,S0e]=Lr(vk,[UO]),en=UO(),[bX,c9]=xX(vk),wX=t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=en(e),l=x.useRef(null),[u=!1,f]=ls({prop:s,defaultProp:i,onChange:o});return C.jsx(bX,{scope:e,triggerId:ns(),triggerRef:l,contentId:ns(),open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(d=>!d),[f]),modal:a,children:C.jsx(sX,{...c,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};wX.displayName=vk;var l9="DropdownMenuTrigger",EX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=c9(l9,r),o=en(r);return C.jsx(iX,{asChild:!0,...o,children:C.jsx(Se.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:gv(e,i.triggerRef),onPointerDown:ce(t.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(t.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});EX.displayName=l9;var CX="DropdownMenuPortal",kX=t=>{const{__scopeDropdownMenu:e,...r}=t,n=en(e);return C.jsx(oX,{...n,...r})};kX.displayName=CX;var u9="DropdownMenuContent",SX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=c9(u9,r),i=en(r),o=x.useRef(!1);return C.jsx(aX,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:e,onCloseAutoFocus:ce(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!s.modal||u)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});SX.displayName=u9;var AX="DropdownMenuGroup",TX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(cX,{...s,...n,ref:e})});TX.displayName=AX;var IX="DropdownMenuLabel",PX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(lX,{...s,...n,ref:e})});PX.displayName=IX;var OX="DropdownMenuItem",RX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(uX,{...s,...n,ref:e})});RX.displayName=OX;var NX="DropdownMenuCheckboxItem",f9=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(fX,{...s,...n,ref:e})});f9.displayName=NX;var _X="DropdownMenuRadioGroup",MX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(dX,{...s,...n,ref:e})});MX.displayName=_X;var DX="DropdownMenuRadioItem",d9=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(hX,{...s,...n,ref:e})});d9.displayName=DX;var BX="DropdownMenuItemIndicator",h9=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(pX,{...s,...n,ref:e})});h9.displayName=BX;var LX="DropdownMenuSeparator",jX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(yX,{...s,...n,ref:e})});jX.displayName=LX;var FX="DropdownMenuArrow",UX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(gX,{...s,...n,ref:e})});UX.displayName=FX;var $X="DropdownMenuSubTrigger",WX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(vX,{...s,...n,ref:e})});WX.displayName=$X;var VX="DropdownMenuSubContent",zX=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=en(r);return C.jsx(mX,{...s,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});zX.displayName=VX;var HX=f9,GX=d9,p9=h9,y9="_1k2mbvi4 _1k2mbvi3 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr1zs fyvr111g fyvr1v0 fyvr1x4 fyvr1310 fyvr130u fyvr11l8 fyvr11ow fyvr11o4 fyvr12zf fyvr11rc fyvr11m4 fyvr12wf",g9="_1k2mbvi5";const qX=({children:t})=>C.jsx(p9,{className:g9,children:t});x.forwardRef(({className:t,children:e,...r},n)=>C.jsxs(HX,{className:ar(y9,t),...r,ref:n,children:[C.jsx(qX,{children:C.jsx(YP,{size:"xs"})}),C.jsx(It,{variant:"small",children:e})]}));x.forwardRef(({className:t,children:e,...r},n)=>C.jsxs(GX,{className:ar(y9,t),...r,ref:n,children:[C.jsx(p9,{className:g9,children:C.jsx(It,{children:"ā€¢"})}),C.jsx(It,{variant:"small",children:e})]}));const mk=x.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return C.jsx(ze,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),KX=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var QX="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _1hq71vk0 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr12rf fyvr12k3 fyvr125f fyvr12cr fyvr12rx fyvr12kl fyvr125x fyvr12d9 fyvr11ow fyvr11lk fyvr11mk fyvr11nk fyvr1h4 fyvr11m4",JX=At({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"_1hq71vk7 _1hq71vk3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"_1hq71vk8 _1hq71vk4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),YX="_1hq71vka _1hq71vk9 fyvr130x fyvr130r fyvr11lw fyvr12zr fyvr1m0 fyvr1qg fyvr1o8 fyvr1so";const XX={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4",csv:".csv,text/csv",json:".json,application/json"};x.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=x.useRef(null),y=KX(h,e),[p,b]=x.useState(null),g=m=>{const k=m.currentTarget.files;if(!k||!k[0])return;const A=k[0],P=A.name,R=A.size/1e3;b({name:P,size:R,extension:P.split(".").pop()??""}),l==null||l(A)},v=f.map(m=>XX[m]).join(",");return C.jsx(gd,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:C.jsxs(Ce,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:ar(QX,JX({borderRadius:r})),children:[p?C.jsxs(Ce,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[C.jsx(It,{ellipsis:!0,children:p.name}),C.jsxs(It,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):C.jsx(It,{ellipsis:!0,children:u}),C.jsx(Ce,{accept:v,as:"input",className:YX,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:g,ref:y,type:"file",...d}),p&&C.jsx(mk,{cursor:"pointer",icon:VC,size:"xs",onClick:m=>{var k;m.preventDefault(),m.stopPropagation(),(k=h.current)!=null&&k.value&&(h.current.value=""),l==null||l(null),b(null)},zIndex:"10"})]})})});var ZX=At({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const Uw=1e3,_u=64,Fx=_u/2,Ux=(t,e=Uw)=>t%e/(Uw/_u),jl=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},eZ=(t,e,r)=>{const n=t%360,s=(t+120)%360,i=r%360;return{a:`hsl(${n}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${i}deg 100% 50%)`}},tZ=(t,e)=>{const r=[];for(let n=0;n{const i=_u/10+Ux(n.r,Uw*1.5/(s+1));return{...eZ(n.a,n.b,n.c),x:Ux(n.x),y:Ux(n.y),r:i}})};x.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=tZ(r,s);return C.jsxs(Ce,{as:"svg",className:ar(e,ZX({size:n})),viewBox:`0 0 ${_u} ${_u}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[C.jsxs("defs",{children:[C.jsx("clipPath",{id:"circle-clip",children:C.jsx("circle",{cx:Fx,cy:Fx,r:Fx})}),C.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[C.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),C.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),C.jsx("feGaussianBlur",{stdDeviation:_u/10,result:"effect1_foregroundBlur"})]}),C.jsxs("linearGradient",{id:`gradient-background-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[C.jsx("stop",{offset:"0",stopColor:o[0].c}),C.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map((a,c)=>C.jsxs(x.Fragment,{children:[C.jsxs("radialGradient",{id:`gradient-primary-${r}-${c}`,children:[C.jsx("stop",{offset:"0",stopColor:a.a}),C.jsx("stop",{offset:"1",stopColor:a.b})]}),C.jsxs("radialGradient",{id:`gradient-secondary-${r}-${c}`,children:[C.jsx("stop",{offset:"0",stopColor:a.c}),C.jsx("stop",{offset:"1",stopColor:a.b})]})]},c))]}),C.jsxs("g",{clipPath:"url(#circle-clip)",children:[C.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${r})`}),C.jsx("g",{filter:"url(#blur)",children:o.map((a,c)=>C.jsxs(x.Fragment,{children:[C.jsx("circle",{fill:`url(#gradient-primary-${r}-${c})`,cx:a.x,cy:a.y,r:a.r}),C.jsx("circle",{fill:`url(#gradient-secondary-${r}-${c})`,cx:a.y,cy:a.x,r:a.r/2})]},c))})]})]})});const xk=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=x.useState(!1),o=a=>{i(!0),r==null||r(a)};return C.jsx(Ce,{as:Ou.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})};var bk="Dialog",[v9,A0e]=Lr(bk),[rZ,$s]=v9(bk),m9=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=x.useRef(null),c=x.useRef(null),[l=!1,u]=ls({prop:n,defaultProp:s,onChange:i});return C.jsx(rZ,{scope:e,triggerRef:a,contentRef:c,contentId:ns(),titleId:ns(),descriptionId:ns(),open:l,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(f=>!f),[u]),modal:o,children:r})};m9.displayName=bk;var x9="DialogTrigger",nZ=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(x9,r),i=Ve(e,s.triggerRef);return C.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ck(s.open),...n,ref:i,onClick:ce(t.onClick,s.onOpenToggle)})});nZ.displayName=x9;var wk="DialogPortal",[sZ,b9]=v9(wk,{forceMount:void 0}),w9=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=$s(wk,e);return C.jsx(sZ,{scope:e,forceMount:r,children:x.Children.map(n,o=>C.jsx(Zr,{present:r||i.open,children:C.jsx(v1,{asChild:!0,container:s,children:o})}))})};w9.displayName=wk;var cg="DialogOverlay",E9=x.forwardRef((t,e)=>{const r=b9(cg,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(cg,t.__scopeDialog);return i.modal?C.jsx(Zr,{present:n||i.open,children:C.jsx(iZ,{...s,ref:e})}):null});E9.displayName=cg;var iZ=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(cg,r);return C.jsx(Sv,{as:pl,allowPinchZoom:!0,shards:[s.contentRef],children:C.jsx(Se.div,{"data-state":Ck(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),gl="DialogContent",C9=x.forwardRef((t,e)=>{const r=b9(gl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=$s(gl,t.__scopeDialog);return C.jsx(Zr,{present:n||i.open,children:i.modal?C.jsx(oZ,{...s,ref:e}):C.jsx(aZ,{...s,ref:e})})});C9.displayName=gl;var oZ=x.forwardRef((t,e)=>{const r=$s(gl,t.__scopeDialog),n=x.useRef(null),s=Ve(e,r.contentRef,n);return x.useEffect(()=>{const i=n.current;if(i)return lk(i)},[]),C.jsx(k9,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault())})}),aZ=x.forwardRef((t,e)=>{const r=$s(gl,t.__scopeDialog),n=x.useRef(!1),s=x.useRef(!1);return C.jsx(k9,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)==null?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),k9=x.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=$s(gl,r),c=x.useRef(null),l=Ve(e,c);return KC(),C.jsxs(C.Fragment,{children:[C.jsx(bv,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:C.jsx(md,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ck(a.open),...o,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(uZ,{titleId:a.titleId}),C.jsx(dZ,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Ek="DialogTitle",cZ=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(Ek,r);return C.jsx(Se.h2,{id:s.titleId,...n,ref:e})});cZ.displayName=Ek;var S9="DialogDescription",lZ=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(S9,r);return C.jsx(Se.p,{id:s.descriptionId,...n,ref:e})});lZ.displayName=S9;var A9="DialogClose",T9=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=$s(A9,r);return C.jsx(Se.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});T9.displayName=A9;function Ck(t){return t?"open":"closed"}var I9="DialogTitleWarning",[T0e,P9]=SK(I9,{contentName:gl,titleName:Ek,docsSlug:"dialog"}),uZ=({titleId:t})=>{const e=P9(I9),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return x.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},fZ="DialogDescriptionWarning",dZ=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${P9(fZ).contentName}}.`;return x.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},hZ=m9,pZ=w9,yZ=E9,gZ=C9,vZ=T9,mZ=At({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr12g fyvr164",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),xZ=At({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const bZ=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return C.jsx(Ce,{className:xZ({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:C.jsx(Ce,{className:mZ({direction:n}),background:"backgroundPrimary",...s,children:e})})};function wZ(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function EZ(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function O9(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n={};for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=O9(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function l3(t,e,r){t.style.setProperty(wZ(e),r)}function u3(t,e,r){if(typeof r=="object"){var n=e;O9(r,(a,c)=>{a!=null&&l3(t,EZ(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&l3(t,i,s[i])}}}const kk=["dark","light"],f3="dark",CZ="data-theme",d3="@sequence.theme",kZ=t=>kk.includes(t),SZ=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),R9=t=>t?`${d3}.${t}`:d3,AZ=t=>{const e=localStorage.getItem(R9(t));return e&&kk.includes(e)?e:null},TZ=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":matchMedia("(prefers-color-scheme: dark)").matches?"dark":null,N9=x.createContext(null),IZ=t=>{const[e,r]=x.useState(t.theme||f3);x.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),x.useEffect(()=>{const s=t.theme||AZ(t.scope)||t.prefersColorScheme&&TZ()||f3;r(s)},[t.theme,t.scope,t.prefersColorScheme]),x.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(kZ(e)?(s.setAttribute(CZ,e),u3(s,_6,{colors:tK[e]})):SZ(e)&&u3(s,_6,{colors:e}),t.root&&s.classList.add("seq-root"))},[e,t.root]);const n=x.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{kk.includes(s)&&(localStorage.setItem(R9(t.scope),s),r(s))}}),[e,t.root,t.scope]);return C.jsx(N9.Provider,{value:n,children:t.children})},PZ=()=>{const t=x.useContext(N9);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var OZ="_5b32m91 _5b32m90 fyvr11no fyvr11ow fyvr11l8 fyvr11m0 fyvr11rs fyvr1m0 fyvr1qg fyvr1so fyvr1o8",RZ="_5b32m93 _5b32m92 fyvr11m0 fyvr1m0 fyvr1qg fyvr1so fyvr1o8",NZ=At({defaultClassName:"_5b32m95 _5b32m94 fyvr11hg fyvr11i4 fyvr11fo fyvr11g6 fyvr11gc fyvr11gu fyvr11q0 fyvr11qg fyvr1310 fyvr130u fyvr11l8 fyvr11mc fyvr11m0 fyvr11wl fyvr1o8 fyvr1qe",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),_Z="_5b32m9b _5b32m9a fyvr113s fyvr1160 fyvr1188 fyvr11ag fyvr11lw fyvr1so fyvr1m0 fyvr11rs";const MZ=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u,rootProps:f={}}=t,{root:d}=PZ(),[h,y]=x.useState(null);return x.useEffect(()=>{y(document.querySelector(d||"body"))},[d]),h?C.jsx(hZ,{modal:!0,defaultOpen:!0,onOpenChange:o,children:C.jsx(pZ,{forceMount:!0,container:h,children:C.jsxs(Ce,{...f,className:ar("seq-root",OZ,f==null?void 0:f.className),children:[C.jsx(Ce,{as:yZ,asChild:!0,background:r,className:RZ,forceMount:!0,children:C.jsx(Ou.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),C.jsx(gZ,{asChild:!0,className:NZ({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:p=>{i?o==null||o():p.preventDefault()},onInteractOutside:p=>{i||p.preventDefault()},children:C.jsxs(Ou.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?C.jsx(bZ,{children:n}):n,i&&C.jsx(vZ,{asChild:!0,children:C.jsx(mk,{icon:VC,backdropFilter:"blur",size:"xs",className:_Z,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var DZ="_1acm19y1 _1acm19y0 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1zk fyvr111o fyvr11lk fyvr11ow fyvr11sl fyvr12w9 fyvr1h4 fyvr11cg",BZ=At({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"_1acm19y7 _1acm19y3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"_1acm19y8 _1acm19y4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),LZ=At({defaultClassName:"_1acm19ya _1acm19y9 fyvr1z4 fyvr1118 fyvr1vc fyvr1xg fyvr130x fyvr130r fyvr11l4 fyvr11sl fyvr12w9 fyvr12s9 fyvr12g fyvr164",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11r3 fyvr11iw fyvr11kg fyvr11jw fyvr11jg"}},defaultVariants:{},compoundVariants:[]});const Sk=x.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:y="text",numeric:p=!1,...b}=t;return C.jsx(gd,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:C.jsx(Ce,{width:"full",children:C.jsxs(Ce,{className:ar(DZ,BZ({borderRadius:s})),children:[u&&C.jsx(u,{size:"sm"}),C.jsx(Ce,{as:r,autoComplete:n,spellCheck:"false",className:LZ({numeric:p}),disabled:o,id:a??d,name:d,ref:e,type:y,...b}),f&&C.jsx(f,{size:"sm"}),h]})})})}),jZ=RegExp("^\\d*(?:\\\\[.])?\\d*$");function FZ(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}x.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||jZ.test(FZ(u)))&&(s==null||s({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),i==null||i(l),f!==u&&(s==null||s({...l,target:{...l.target,value:f}}))};return C.jsx(Sk,{name:r,onChange:a,onBlur:c,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});At({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});var Ak="Progress",Tk=100,[UZ,I0e]=Lr(Ak),[$Z,WZ]=UZ(Ak),VZ=x.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=HZ,...o}=t;(s||s===0)&&!h3(s)&&console.error(GZ(`${s}`,"Progress"));const a=h3(s)?s:Tk;n!==null&&!p3(n,a)&&console.error(qZ(`${n}`,"Progress"));const c=p3(n,a)?n:null,l=lg(c)?i(c,a):void 0;return C.jsx($Z,{scope:r,value:c,max:a,children:C.jsx(Se.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":lg(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":M9(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});VZ.displayName=Ak;var _9="ProgressIndicator",zZ=x.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=WZ(_9,r);return C.jsx(Se.div,{"data-state":M9(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});zZ.displayName=_9;function HZ(t,e){return`${Math.round(t/e*100)}%`}function M9(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function lg(t){return typeof t=="number"}function h3(t){return lg(t)&&!isNaN(t)&&t>0}function p3(t,e){return lg(t)&&!isNaN(t)&&t<=e&&t>=0}function GZ(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Tk}\`.`}function qZ(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: + - a positive number + - less than the value passed to \`max\` (or ${Tk} if no \`max\` prop is set) + - \`null\` or \`undefined\` if the progress is indeterminate. + +Defaulting to \`null\`.`}var Ik="Radio",[KZ,D9]=Lr(Ik),[QZ,JZ]=KZ(Ik),B9=x.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=x.useState(null),d=Ve(e,p=>f(p)),h=x.useRef(!1),y=u?!!u.closest("form"):!0;return C.jsxs(QZ,{scope:r,checked:s,disabled:o,children:[C.jsx(Se.button,{type:"button",role:"radio","aria-checked":s,"data-state":F9(s),"data-disabled":o?"":void 0,disabled:o,value:a,...l,ref:d,onClick:ce(t.onClick,p=>{s||c==null||c(),y&&(h.current=p.isPropagationStopped(),h.current||p.stopPropagation())})}),y&&C.jsx(YZ,{control:u,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});B9.displayName=Ik;var L9="RadioIndicator",j9=x.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=JZ(L9,r);return C.jsx(Zr,{present:n||i.checked,children:C.jsx(Se.span,{"data-state":F9(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});j9.displayName=L9;var YZ=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=vv(r),a=mv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function F9(t){return t?"checked":"unchecked"}var XZ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Pk="RadioGroup",[ZZ,P0e]=Lr(Pk,[Ed,D9]),U9=Ed(),$9=D9(),[eee,tee]=ZZ(Pk),W9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=U9(r),y=y1(l),[p,b]=ls({prop:i,defaultProp:s,onChange:f});return C.jsx(eee,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:b,children:C.jsx(ak,{asChild:!0,...h,orientation:c,dir:y,loop:u,children:C.jsx(Se.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:y,...d,ref:e})})})});W9.displayName=Pk;var V9="RadioGroupItem",z9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=tee(V9,r),o=i.disabled||n,a=U9(r),c=$9(r),l=x.useRef(null),u=Ve(e,l),f=i.value===s.value,d=x.useRef(!1);return x.useEffect(()=>{const h=p=>{XZ.includes(p.key)&&(d.current=!0)},y=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),C.jsx(ck,{asChild:!0,...a,focusable:!o,active:f,children:C.jsx(B9,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:u,onCheck:()=>i.onValueChange(s.value),onKeyDown:ce(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ce(s.onFocus,()=>{var h;d.current&&((h=l.current)==null||h.click())})})})});z9.displayName=V9;var ree="RadioGroupIndicator",H9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=$9(r);return C.jsx(j9,{...s,...n,ref:e})});H9.displayName=ree;var nee=W9,see=z9,iee=H9,oee=At({defaultClassName:"io59uy3 io59uy0 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw fyvr1uw fyvr1x0 fyvr1z4 fyvr1118 fyvr12rl fyvr12k9 fyvr125l fyvr12cx fyvr12rr fyvr12kf fyvr125r fyvr12d3 fyvr11sl fyvr12zf fyvr12zb fyvr1307 fyvr12zz _4efw240",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11eg fyvr11es fyvr11f4 fyvr11fg",lg:"io59uy5 io59uy2 fyvr11ek fyvr11ew fyvr11f8 fyvr11fk"}},defaultVariants:{},compoundVariants:[]}),aee=At({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11l8 fyvr11ow fyvr11no fyvr11m4 fyvr12g fyvr164 fyvr12w9",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const cee=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return C.jsx(Ce,{alignItems:"center",children:C.jsx(gd,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:C.jsx(see,{className:oee({size:n}),value:s,id:e,disabled:i,children:C.jsx(iee,{className:aee({size:n})})})})})};x.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return C.jsx(nee,{disabled:n,name:i,ref:e,...c,children:C.jsx(Ce,{flexDirection:r,gap:s,children:o.map(({label:l,value:u,disabled:f})=>C.jsx(cee,{id:`${i}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function y3(t,[e,r]){return Math.min(r,Math.max(e,t))}var lee="VisuallyHidden",b1=x.forwardRef((t,e)=>C.jsx(Se.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));b1.displayName=lee;var uee=b1,fee=[" ","Enter","ArrowUp","ArrowDown"],dee=[" ","Enter"],w1="Select",[Iv,Pv,hee]=xv(w1),[Cd,O0e]=Lr(w1,[hee,wd]),Ov=wd(),[pee,za]=Cd(w1),[yee,gee]=Cd(w1),G9=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,y=Ov(e),[p,b]=x.useState(null),[g,v]=x.useState(null),[m,k]=x.useState(!1),A=y1(l),[P=!1,R]=ls({prop:n,defaultProp:s,onChange:i}),[N,V]=ls({prop:o,defaultProp:a,onChange:c}),F=x.useRef(null),X=p?!!p.closest("form"):!0,[re,le]=x.useState(new Set),ee=Array.from(re).map(B=>B.props.value).join(";");return C.jsx(nk,{...y,children:C.jsxs(pee,{required:h,scope:e,trigger:p,onTriggerChange:b,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:m,onValueNodeHasChildrenChange:k,contentId:ns(),value:N,onValueChange:V,open:P,onOpenChange:R,dir:A,triggerPointerDownPosRef:F,disabled:d,children:[C.jsx(Iv.Provider,{scope:e,children:C.jsx(yee,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(B=>{le(G=>new Set(G).add(B))},[]),onNativeOptionRemove:x.useCallback(B=>{le(G=>{const Z=new Set(G);return Z.delete(B),Z})},[]),children:r})}),X?C.jsxs(dR,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:N,onChange:B=>V(B.target.value),disabled:d,children:[N===void 0?C.jsx("option",{value:""}):null,Array.from(re)]},ee):null]})})};G9.displayName=w1;var q9="SelectTrigger",K9=x.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Ov(r),o=za(q9,r),a=o.disabled||n,c=Ve(e,o.onTriggerChange),l=Pv(r),[u,f,d]=hR(y=>{const p=l().filter(v=>!v.disabled),b=p.find(v=>v.value===o.value),g=pR(p,y,b);g!==void 0&&o.onValueChange(g.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return C.jsx(sk,{asChild:!0,...i,children:C.jsx(Se.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":fR(o.value)?"":void 0,...s,ref:c,onClick:ce(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,y=>{const p=y.target;p.hasPointerCapture(y.pointerId)&&p.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:ce(s.onKeyDown,y=>{const p=u.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&f(y.key),!(p&&y.key===" ")&&fee.includes(y.key)&&(h(),y.preventDefault())})})})});K9.displayName=q9;var Q9="SelectValue",J9=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=za(Q9,r),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,f=Ve(e,c.onValueNodeChange);return wr(()=>{l(u)},[l,u]),C.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:fR(c.value)?C.jsx(C.Fragment,{children:o}):i})});J9.displayName=Q9;var vee="SelectIcon",Y9=x.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return C.jsx(Se.span,{"aria-hidden":!0,...s,ref:e,children:n||"ā–¼"})});Y9.displayName=vee;var vl="SelectContent",X9=x.forwardRef((t,e)=>{const r=za(vl,t.__scopeSelect),[n,s]=x.useState();if(wr(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Wa.createPortal(C.jsx(Z9,{scope:t.__scopeSelect,children:C.jsx(Iv.Slot,{scope:t.__scopeSelect,children:C.jsx("div",{children:t.children})})}),i):null}return C.jsx(eR,{...t,ref:e})});X9.displayName=vl;var Oi=10,[Z9,Ha]=Cd(vl),mee="SelectContentImpl",eR=x.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:y,hideWhenDetached:p,avoidCollisions:b,...g}=t,v=za(vl,r),[m,k]=x.useState(null),[A,P]=x.useState(null),R=Ve(e,$=>k($)),[N,V]=x.useState(null),[F,X]=x.useState(null),re=Pv(r),[le,ee]=x.useState(!1),B=x.useRef(!1);x.useEffect(()=>{if(m)return lk(m)},[m]),KC();const G=x.useCallback($=>{const[K,...ue]=re().map(ke=>ke.ref.current),[he]=ue.slice(-1),oe=document.activeElement;for(const ke of $)if(ke===oe||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===K&&A&&(A.scrollTop=0),ke===he&&A&&(A.scrollTop=A.scrollHeight),ke==null||ke.focus(),document.activeElement!==oe))return},[re,A]),Z=x.useCallback(()=>G([N,m]),[G,N,m]);x.useEffect(()=>{le&&Z()},[le,Z]);const{onOpenChange:E,triggerPointerDownPosRef:S}=v;x.useEffect(()=>{if(m){let $={x:0,y:0};const K=he=>{var oe,ke;$={x:Math.abs(Math.round(he.pageX)-(((oe=S.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(he.pageY)-(((ke=S.current)==null?void 0:ke.y)??0))}},ue=he=>{$.x<=10&&$.y<=10?he.preventDefault():m.contains(he.target)||E(!1),document.removeEventListener("pointermove",K),S.current=null};return S.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ue,{capture:!0})}}},[m,E,S]),x.useEffect(()=>{const $=()=>E(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[E]);const[O,D]=hR($=>{const K=re().filter(oe=>!oe.disabled),ue=K.find(oe=>oe.ref.current===document.activeElement),he=pR(K,$,ue);he&&setTimeout(()=>he.ref.current.focus())}),L=x.useCallback(($,K,ue)=>{const he=!B.current&&!ue;(v.value!==void 0&&v.value===K||he)&&(V($),he&&(B.current=!0))},[v.value]),W=x.useCallback(()=>m==null?void 0:m.focus(),[m]),q=x.useCallback(($,K,ue)=>{const he=!B.current&&!ue;(v.value!==void 0&&v.value===K||he)&&X($)},[v.value]),te=n==="popper"?$w:tR,J=te===$w?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:y,hideWhenDetached:p,avoidCollisions:b}:{};return C.jsx(Z9,{scope:r,content:m,viewport:A,onViewportChange:P,itemRefCallback:L,selectedItem:N,onItemLeave:W,itemTextRefCallback:q,focusSelectedItem:Z,selectedItemText:F,position:n,isPositioned:le,searchRef:O,children:C.jsx(Sv,{as:pl,allowPinchZoom:!0,children:C.jsx(bv,{asChild:!0,trapped:v.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ce(s,$=>{var K;(K=v.trigger)==null||K.focus({preventScroll:!0}),$.preventDefault()}),children:C.jsx(md,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:C.jsx(te,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:$=>$.preventDefault(),...g,...J,onPlaced:()=>ee(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ce(g.onKeyDown,$=>{const K=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!K&&$.key.length===1&&D($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let he=re().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes($.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const oe=$.target,ke=he.indexOf(oe);he=he.slice(ke+1)}setTimeout(()=>G(he)),$.preventDefault()}})})})})})})});eR.displayName=mee;var xee="SelectItemAlignedPosition",tR=x.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=za(vl,r),o=Ha(vl,r),[a,c]=x.useState(null),[l,u]=x.useState(null),f=Ve(e,R=>u(R)),d=Pv(r),h=x.useRef(!1),y=x.useRef(!0),{viewport:p,selectedItem:b,selectedItemText:g,focusSelectedItem:v}=o,m=x.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&p&&b&&g){const R=i.trigger.getBoundingClientRect(),N=l.getBoundingClientRect(),V=i.valueNode.getBoundingClientRect(),F=g.getBoundingClientRect();if(i.dir!=="rtl"){const oe=F.left-N.left,ke=V.left-oe,Me=R.left-ke,bt=R.width+Me,rn=Math.max(bt,N.width),Er=window.innerWidth-Oi,U=y3(ke,[Oi,Er-rn]);a.style.minWidth=bt+"px",a.style.left=U+"px"}else{const oe=N.right-F.right,ke=window.innerWidth-V.right-oe,Me=window.innerWidth-R.right-ke,bt=R.width+Me,rn=Math.max(bt,N.width),Er=window.innerWidth-Oi,U=y3(ke,[Oi,Er-rn]);a.style.minWidth=bt+"px",a.style.right=U+"px"}const X=d(),re=window.innerHeight-Oi*2,le=p.scrollHeight,ee=window.getComputedStyle(l),B=parseInt(ee.borderTopWidth,10),G=parseInt(ee.paddingTop,10),Z=parseInt(ee.borderBottomWidth,10),E=parseInt(ee.paddingBottom,10),S=B+G+le+E+Z,O=Math.min(b.offsetHeight*5,S),D=window.getComputedStyle(p),L=parseInt(D.paddingTop,10),W=parseInt(D.paddingBottom,10),q=R.top+R.height/2-Oi,te=re-q,J=b.offsetHeight/2,$=b.offsetTop+J,K=B+G+$,ue=S-K;if(K<=q){const oe=b===X[X.length-1].ref.current;a.style.bottom="0px";const ke=l.clientHeight-p.offsetTop-p.offsetHeight,Me=Math.max(te,J+(oe?W:0)+ke+Z),bt=K+Me;a.style.height=bt+"px"}else{const oe=b===X[0].ref.current;a.style.top="0px";const Me=Math.max(q,B+p.offsetTop+(oe?L:0)+J)+ue;a.style.height=Me+"px",p.scrollTop=K-q+p.offsetTop}a.style.margin=`${Oi}px 0`,a.style.minHeight=O+"px",a.style.maxHeight=re+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,p,b,g,i.dir,n]);wr(()=>m(),[m]);const[k,A]=x.useState();wr(()=>{l&&A(window.getComputedStyle(l).zIndex)},[l]);const P=x.useCallback(R=>{R&&y.current===!0&&(m(),v==null||v(),y.current=!1)},[m,v]);return C.jsx(wee,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:C.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:C.jsx(Se.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});tR.displayName=xee;var bee="SelectPopperPosition",$w=x.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Oi,...i}=t,o=Ov(r);return C.jsx(ik,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});$w.displayName=bee;var[wee,Ok]=Cd(vl,{}),Ww="SelectViewport",rR=x.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=Ha(Ww,r),o=Ok(Ww,r),a=Ve(e,i.onViewportChange),c=x.useRef(0);return C.jsxs(C.Fragment,{children:[C.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),C.jsx(Iv.Slot,{scope:r,children:C.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(c.current-u.scrollTop);if(h>0){const y=window.innerHeight-Oi*2,p=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),g=Math.max(p,b);if(g0?k:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});rR.displayName=Ww;var nR="SelectGroup",[Eee,Cee]=Cd(nR),sR=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=ns();return C.jsx(Eee,{scope:r,id:s,children:C.jsx(Se.div,{role:"group","aria-labelledby":s,...n,ref:e})})});sR.displayName=nR;var iR="SelectLabel",kee=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Cee(iR,r);return C.jsx(Se.div,{id:s.id,...n,ref:e})});kee.displayName=iR;var ug="SelectItem",[See,oR]=Cd(ug),aR=x.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=za(ug,r),c=Ha(ug,r),l=a.value===n,[u,f]=x.useState(i??""),[d,h]=x.useState(!1),y=Ve(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,n,s)}),p=ns(),b=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return C.jsx(See,{scope:r,value:n,disabled:s,textId:p,isSelected:l,onItemTextChange:x.useCallback(g=>{f(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:C.jsx(Iv.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:C.jsx(Se.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:ce(o.onFocus,()=>h(!0)),onBlur:ce(o.onBlur,()=>h(!1)),onPointerUp:ce(o.onPointerUp,b),onPointerMove:ce(o.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ce(o.onKeyDown,g=>{var v;((v=c.searchRef)==null?void 0:v.current)!==""&&g.key===" "||(dee.includes(g.key)&&b(),g.key===" "&&g.preventDefault())})})})})});aR.displayName=ug;var oh="SelectItemText",cR=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=za(oh,r),a=Ha(oh,r),c=oR(oh,r),l=gee(oh,r),[u,f]=x.useState(null),d=Ve(e,g=>f(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),h=u==null?void 0:u.textContent,y=x.useMemo(()=>C.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:b}=l;return wr(()=>(p(y),()=>b(y)),[p,b,y]),C.jsxs(C.Fragment,{children:[C.jsx(Se.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Wa.createPortal(i.children,o.valueNode):null]})});cR.displayName=oh;var lR="SelectItemIndicator",Aee=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return oR(lR,r).isSelected?C.jsx(Se.span,{"aria-hidden":!0,...n,ref:e}):null});Aee.displayName=lR;var Vw="SelectScrollUpButton",Tee=x.forwardRef((t,e)=>{const r=Ha(Vw,t.__scopeSelect),n=Ok(Vw,t.__scopeSelect),[s,i]=x.useState(!1),o=Ve(e,n.onScrollButtonChange);return wr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollTop>0;i(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?C.jsx(uR,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Tee.displayName=Vw;var zw="SelectScrollDownButton",Iee=x.forwardRef((t,e)=>{const r=Ha(zw,t.__scopeSelect),n=Ok(zw,t.__scopeSelect),[s,i]=x.useState(!1),o=Ve(e,n.onScrollButtonChange);return wr(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?C.jsx(uR,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Iee.displayName=zw;var uR=x.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=Ha("SelectScrollButton",r),o=x.useRef(null),a=Pv(r),c=x.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),wr(()=>{var l;const u=a().find(f=>f.ref.current===document.activeElement);(l=u==null?void 0:u.ref.current)==null||l.scrollIntoView({block:"nearest"})},[a]),C.jsx(Se.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var l;(l=i.onItemLeave)==null||l.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{c()})})}),Pee="SelectSeparator",Oee=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return C.jsx(Se.div,{"aria-hidden":!0,...n,ref:e})});Oee.displayName=Pee;var Hw="SelectArrow",Ree=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Ov(r),i=za(Hw,r),o=Ha(Hw,r);return i.open&&o.position==="popper"?C.jsx(ok,{...s,...n,ref:e}):null});Ree.displayName=Hw;function fR(t){return t===""||t===void 0}var dR=x.forwardRef((t,e)=>{const{value:r,...n}=t,s=x.useRef(null),i=Ve(e,s),o=vv(r);return x.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),C.jsx(b1,{asChild:!0,children:C.jsx("select",{...n,ref:i,defaultValue:r})})});dR.displayName="BubbleSelect";function hR(t){const e=Dr(t),r=x.useRef(""),n=x.useRef(0),s=x.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function pR(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=Nee(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function Nee(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var _ee=G9,Mee=K9,Dee=J9,Bee=Y9,Lee=X9,jee=rR,Fee=sR,Uee=aR,$ee=cR,Wee="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 gohwum0 fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11ow fyvr11sl fyvr11lk fyvr11jc fyvr12w9 fyvr11cc fyvr11o4 fyvr11rc fyvr12zf fyvr12s9",Vee=At({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"gohwum7 gohwum3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"gohwum8 gohwum4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),zee="gohwuma gohwum9 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk fyvr11q0 fyvr11qg fyvr11r0 fyvr11y3 fyvr12w9 fyvr11rt",Hee="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 gohwumd fyvr1zk fyvr111o fyvr1v8 fyvr1xc fyvr1310 fyvr1311 fyvr130u fyvr130v fyvr11l8 fyvr11o4 fyvr11ow fyvr12zf fyvr12zb fyvr12w9 fyvr1309 fyvr12zz";const Gee=x.forwardRef(({children:t,className:e,...r},n)=>C.jsx(Uee,{className:ar(Hee,e),...r,ref:n,children:C.jsx($ee,{children:t})})),g3=x.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return C.jsx(gd,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:C.jsxs(_ee,{disabled:n,name:c,...f,children:[C.jsxs(Mee,{id:s??c,className:ar(Wee,Vee({borderRadius:r})),ref:e,children:[C.jsx(Dee,{placeholder:u}),C.jsx(Ce,{as:Bee,display:"inline-flex",children:C.jsx(XP,{})})]}),C.jsx(Lee,{className:zee,children:C.jsx(jee,{children:C.jsx(Fee,{children:l.map(({value:d,label:h,...y})=>C.jsx(Gee,{value:d,...y,children:h},d))})})})]})})});x.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?C.jsx(mk,{icon:VC,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return C.jsx(Sk,{ref:e,name:i,leftIcon:KK,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var qee=At({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});x.forwardRef((t,e)=>{const{size:r="md",...n}=t;return C.jsx(Ce,{className:qee({size:r}),color:"text50",ref:e,...n,children:C.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[C.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),C.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});x.forwardRef(({children:t},e)=>C.jsx(Ce,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));var Rk="Switch",[Kee,R0e]=Lr(Rk),[Qee,Jee]=Kee(Rk),Yee=x.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=x.useState(null),h=Ve(e,v=>d(v)),y=x.useRef(!1),p=f?!!f.closest("form"):!0,[b=!1,g]=ls({prop:s,defaultProp:i,onChange:l});return C.jsxs(Qee,{scope:r,checked:b,disabled:a,children:[C.jsx(Se.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":gR(b),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onClick:ce(t.onClick,v=>{g(m=>!m),p&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),p&&C.jsx(Zee,{control:f,bubbles:!y.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});Yee.displayName=Rk;var yR="SwitchThumb",Xee=x.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=Jee(yR,r);return C.jsx(Se.span,{"data-state":gR(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});Xee.displayName=yR;var Zee=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=vv(r),a=mv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function gR(t){return t?"checked":"unchecked"}At({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11k8"},active:{true:"nwwh3zb nwwh3z2 fyvr130d",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12zx"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11yf fyvr12wr"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11sl fyvr12wf"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12w9"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12wf"]]});var Nk="Tabs",[ete,N0e]=Lr(Nk,[Ed]),vR=Ed(),[tte,_k]=ete(Nk),rte=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=y1(a),[f,d]=ls({prop:n,onChange:s,defaultProp:i});return C.jsx(tte,{scope:r,baseId:ns(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c,children:C.jsx(Se.div,{dir:u,"data-orientation":o,...l,ref:e})})});rte.displayName=Nk;var mR="TabsList",nte=x.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=_k(mR,r),o=vR(r);return C.jsx(ak,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:C.jsx(Se.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});nte.displayName=mR;var xR="TabsTrigger",ste=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=_k(xR,r),a=vR(r),c=wR(o.baseId,n),l=ER(o.baseId,n),u=n===o.value;return C.jsx(ck,{asChild:!0,...a,focusable:!s,active:u,children:C.jsx(Se.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ce(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ce(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ce(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!s&&f&&o.onValueChange(n)})})})});ste.displayName=xR;var bR="TabsContent",ite=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=_k(bR,r),c=wR(a.baseId,n),l=ER(a.baseId,n),u=n===a.value,f=x.useRef(u);return x.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),C.jsx(Zr,{present:s||u,children:({present:d})=>C.jsx(Se.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});ite.displayName=bR;function wR(t,e){return`${t}-trigger-${e}`}function ER(t,e){return`${t}-content-${e}`}var ote="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk _1ppqbnx0 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr1zc fyvr111g fyvr1v0 fyvr1x4 fyvr11lk fyvr11cc fyvr11rh";x.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return C.jsxs(Ce,{className:ote,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&C.jsx(r,{size:"xs"}),C.jsx(It,{children:n})]})});var ate="ToastProvider",[CR,cte,lte]=xv("Toast"),[kR,_0e]=Lr("Toast",[lte]),[M0e,Rv]=kR(ate),SR="ToastViewport",ute=["F8"],Gw="toast.viewportPause",qw="toast.viewportResume",fte=x.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=ute,label:s="Notifications ({hotkey})",...i}=t,o=Rv(SR,r),a=cte(r),c=x.useRef(null),l=x.useRef(null),u=x.useRef(null),f=x.useRef(null),d=Ve(e,f,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;x.useEffect(()=>{const b=g=>{var v;n.every(k=>g[k]||g.code===k)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),x.useEffect(()=>{const b=c.current,g=f.current;if(y&&b&&g){const v=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(Gw);g.dispatchEvent(P),o.isClosePausedRef.current=!0}},m=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(qw);g.dispatchEvent(P),o.isClosePausedRef.current=!1}},k=P=>{!b.contains(P.relatedTarget)&&m()},A=()=>{b.contains(document.activeElement)||m()};return b.addEventListener("focusin",v),b.addEventListener("focusout",k),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",A),window.addEventListener("blur",v),window.addEventListener("focus",m),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",k),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",A),window.removeEventListener("blur",v),window.removeEventListener("focus",m)}}},[y,o.isClosePausedRef]);const p=x.useCallback(({tabbingDirection:b})=>{const v=a().map(m=>{const k=m.ref.current,A=[k,...Ite(k)];return b==="forwards"?A:A.reverse()});return(b==="forwards"?v.reverse():v).flat()},[a]);return x.useEffect(()=>{const b=f.current;if(b){const g=v=>{var m,k,A;const P=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!P){const N=document.activeElement,V=v.shiftKey;if(v.target===b&&V){(m=l.current)==null||m.focus();return}const re=p({tabbingDirection:V?"backwards":"forwards"}),le=re.findIndex(ee=>ee===N);$x(re.slice(le+1))?v.preventDefault():V?(k=l.current)==null||k.focus():(A=u.current)==null||A.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[a,p]),C.jsxs(EQ,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&C.jsx(Kw,{ref:l,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"forwards"});$x(b)}}),C.jsx(CR.Slot,{scope:r,children:C.jsx(Se.ol,{tabIndex:-1,...i,ref:d})}),y&&C.jsx(Kw,{ref:u,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"backwards"});$x(b)}})]})});fte.displayName=SR;var AR="ToastFocusProxy",Kw=x.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Rv(AR,r);return C.jsx(b1,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var a;const c=o.relatedTarget;!((a=i.viewport)!=null&&a.contains(c))&&n()}})});Kw.displayName=AR;var Nv="Toast",dte="toast.swipeStart",hte="toast.swipeMove",pte="toast.swipeCancel",yte="toast.swipeEnd",gte=x.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=ls({prop:n,defaultProp:s,onChange:i});return C.jsx(Zr,{present:r||a,children:C.jsx(xte,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:Dr(t.onPause),onResume:Dr(t.onResume),onSwipeStart:ce(t.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ce(t.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(t.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});gte.displayName=Nv;var[vte,mte]=kR(Nv,{onClose(){}}),xte=x.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...y}=t,p=Rv(Nv,r),[b,g]=x.useState(null),v=Ve(e,ee=>g(ee)),m=x.useRef(null),k=x.useRef(null),A=s||p.duration,P=x.useRef(0),R=x.useRef(A),N=x.useRef(0),{onToastAdd:V,onToastRemove:F}=p,X=Dr(()=>{var ee;(b==null?void 0:b.contains(document.activeElement))&&((ee=p.viewport)==null||ee.focus()),o()}),re=x.useCallback(ee=>{!ee||ee===1/0||(window.clearTimeout(N.current),P.current=new Date().getTime(),N.current=window.setTimeout(X,ee))},[X]);x.useEffect(()=>{const ee=p.viewport;if(ee){const B=()=>{re(R.current),l==null||l()},G=()=>{const Z=new Date().getTime()-P.current;R.current=R.current-Z,window.clearTimeout(N.current),c==null||c()};return ee.addEventListener(Gw,G),ee.addEventListener(qw,B),()=>{ee.removeEventListener(Gw,G),ee.removeEventListener(qw,B)}}},[p.viewport,A,c,l,re]),x.useEffect(()=>{i&&!p.isClosePausedRef.current&&re(A)},[i,A,p.isClosePausedRef,re]),x.useEffect(()=>(V(),()=>F()),[V,F]);const le=x.useMemo(()=>b?RR(b):null,[b]);return p.viewport?C.jsxs(C.Fragment,{children:[le&&C.jsx(bte,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:le}),C.jsx(vte,{scope:r,onClose:X,children:Wa.createPortal(C.jsx(CR.ItemSlot,{scope:r,children:C.jsx(wQ,{asChild:!0,onEscapeKeyDown:ce(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||X(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:C.jsx(Se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,ee=>{ee.key==="Escape"&&(a==null||a(ee.nativeEvent),ee.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:ce(t.onPointerDown,ee=>{ee.button===0&&(m.current={x:ee.clientX,y:ee.clientY})}),onPointerMove:ce(t.onPointerMove,ee=>{if(!m.current)return;const B=ee.clientX-m.current.x,G=ee.clientY-m.current.y,Z=!!k.current,E=["left","right"].includes(p.swipeDirection),S=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,O=E?S(0,B):0,D=E?0:S(0,G),L=ee.pointerType==="touch"?10:2,W={x:O,y:D},q={originalEvent:ee,delta:W};Z?(k.current=W,hp(hte,f,q,{discrete:!1})):v3(W,p.swipeDirection,L)?(k.current=W,hp(dte,u,q,{discrete:!1}),ee.target.setPointerCapture(ee.pointerId)):(Math.abs(B)>L||Math.abs(G)>L)&&(m.current=null)}),onPointerUp:ce(t.onPointerUp,ee=>{const B=k.current,G=ee.target;if(G.hasPointerCapture(ee.pointerId)&&G.releasePointerCapture(ee.pointerId),k.current=null,m.current=null,B){const Z=ee.currentTarget,E={originalEvent:ee,delta:B};v3(B,p.swipeDirection,p.swipeThreshold)?hp(yte,h,E,{discrete:!0}):hp(pte,d,E,{discrete:!0}),Z.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),bte=t=>{const{__scopeToast:e,children:r,...n}=t,s=Rv(Nv,e),[i,o]=x.useState(!1),[a,c]=x.useState(!1);return Ate(()=>o(!0)),x.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:C.jsx(v1,{asChild:!0,children:C.jsx(b1,{...n,children:i&&C.jsxs(C.Fragment,{children:[s.label," ",r]})})})},wte="ToastTitle",Ete=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});Ete.displayName=wte;var Cte="ToastDescription",kte=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});kte.displayName=Cte;var TR="ToastAction",Ste=x.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?C.jsx(OR,{altText:r,asChild:!0,children:C.jsx(PR,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${TR}\`. Expected non-empty \`string\`.`),null)});Ste.displayName=TR;var IR="ToastClose",PR=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=mte(IR,r);return C.jsx(OR,{asChild:!0,children:C.jsx(Se.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});PR.displayName=IR;var OR=x.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return C.jsx(Se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function RR(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),Tte(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...RR(n))}}),e}function hp(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?$C(s,i):s.dispatchEvent(i)}var v3=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function Ate(t=()=>{}){const e=Dr(t);wr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function Tte(t){return t.nodeType===t.ELEMENT_NODE}function Ite(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function $x(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}At({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});x.createContext(null);var Pte="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _15pztn0 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11ow fyvr11sl fyvr12w9 fyvr12s9 fyvr130r fyvr12g fyvr11l8",Ote="_15pztn2";x.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return C.jsx(gd,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:C.jsx(Ce,{as:r,autoComplete:n,spellCheck:"false",className:ar(Pte,d&&Ote),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:s,...h})})});var Rte=At({defaultClassName:"_18h918k5 _18h918k0 fyvr11q0 fyvr11qg fyvr11no fyvr11ow fyvr11l8",variantClassNames:{size:{xs:"_18h918k6",sm:"_18h918k7",md:"_18h918k8",lg:"_18h918k9",xl:"_18h918ka"},borderRadius:{circle:"_18h918kb _18h918k1 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw",lg:"_18h918kc _18h918k2 fyvr11hg fyvr11i4 fyvr11g4 fyvr11gs",md:"_18h918kd _18h918k3 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go",sm:"_18h918ke _18h918k4 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk"}},defaultVariants:{},compoundVariants:[]}),Nte="_18h918kf";const _te=x.memo(t=>{const{chainId:e,borderRadius:r="circle",className:n,disableAnimation:s=!1,style:i,src:o,size:a="md",...c}=t,l=o||hK(pK(e),a);return C.jsx(Ce,{className:ar(n,Rte({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:C.jsx(xk,{className:Nte,disableAnimation:s,src:l})})});var Mte=At({defaultClassName:"bnrreb1 bnrreb0 fyvr11no fyvr11ow fyvr11m4 fyvr11l8",variantClassNames:{size:{xs:"bnrreb2",sm:"bnrreb3",md:"bnrreb4",lg:"bnrreb5",xl:"bnrreb6"}},defaultVariants:{},compoundVariants:[]}),Dte="bnrreb7",Bte="bnrreb9 bnrreb8 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw fyvr11q0 fyvr11qg fyvr11no fyvr11ow fyvr11wr fyvr12g fyvr164 fyvr11l8",m3="bnrreba";const x3="40%",b3="-2%",Lte=x.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",withNetwork:c,...l}=t;return C.jsxs(Ce,{className:ar(r,Mte({size:a})),style:s,flexShrink:"0",...l,children:[i?C.jsx(xk,{className:ar(Dte,c&&m3),disableAnimation:n,borderRadius:e,overflow:"hidden",src:i}):C.jsx(It,{className:ar(Bte,c&&m3),variant:"normal",fontWeight:"medium",color:"text50",borderRadius:e,overflow:"hidden",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)}),c&&C.jsx(_te,{chainId:c,position:"absolute",zIndex:"1",disableAnimation:n,style:{width:x3,height:x3,right:b3,bottom:b3}})]})});var[_v,D0e]=Lr("Tooltip",[wd]),Mv=wd(),NR="TooltipProvider",jte=700,Qw="tooltip.open",[Fte,Mk]=_v(NR),Ute=t=>{const{__scopeTooltip:e,delayDuration:r=jte,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=x.useState(!0),c=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(Fte,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(u=>{c.current=u},[]),disableHoverableContent:s,children:i})};Ute.displayName=NR;var Dv="Tooltip",[$te,E1]=_v(Dv),Wte=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=Mk(Dv,t.__scopeTooltip),l=Mv(e),[u,f]=x.useState(null),d=ns(),h=x.useRef(0),y=o??c.disableHoverableContent,p=a??c.delayDuration,b=x.useRef(!1),[g=!1,v]=ls({prop:n,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(Qw))):c.onClose(),i==null||i(R)}}),m=x.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),k=x.useCallback(()=>{window.clearTimeout(h.current),b.current=!1,v(!0)},[v]),A=x.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),P=x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,v(!0)},p)},[p,v]);return x.useEffect(()=>()=>window.clearTimeout(h.current),[]),C.jsx(nk,{...l,children:C.jsx($te,{scope:e,contentId:d,open:g,stateAttribute:m,trigger:u,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?P():k()},[c.isOpenDelayed,P,k]),onTriggerLeave:x.useCallback(()=>{y?A():window.clearTimeout(h.current)},[A,y]),onOpen:k,onClose:A,disableHoverableContent:y,children:r})})};Wte.displayName=Dv;var Jw="TooltipTrigger",Vte=x.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=E1(Jw,r),i=Mk(Jw,r),o=Mv(r),a=x.useRef(null),c=Ve(e,a,s.onTriggerChange),l=x.useRef(!1),u=x.useRef(!1),f=x.useCallback(()=>l.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),C.jsx(sk,{asChild:!0,...o,children:C.jsx(Se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ce(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(t.onFocus,()=>{l.current||s.onOpen()}),onBlur:ce(t.onBlur,s.onClose),onClick:ce(t.onClick,s.onClose)})})});Vte.displayName=Jw;var Dk="TooltipPortal",[zte,Hte]=_v(Dk,{forceMount:void 0}),Gte=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=E1(Dk,e);return C.jsx(zte,{scope:e,forceMount:r,children:C.jsx(Zr,{present:r||i.open,children:C.jsx(v1,{asChild:!0,container:s,children:n})})})};Gte.displayName=Dk;var Gf="TooltipContent",qte=x.forwardRef((t,e)=>{const r=Hte(Gf,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=E1(Gf,t.__scopeTooltip);return C.jsx(Zr,{present:n||o.open,children:o.disableHoverableContent?C.jsx(_R,{side:s,...i,ref:e}):C.jsx(Kte,{side:s,...i,ref:e})})}),Kte=x.forwardRef((t,e)=>{const r=E1(Gf,t.__scopeTooltip),n=Mk(Gf,t.__scopeTooltip),s=x.useRef(null),i=Ve(e,s),[o,a]=x.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:f}=n,d=x.useCallback(()=>{a(null),f(!1)},[f]),h=x.useCallback((y,p)=>{const b=y.currentTarget,g={x:y.clientX,y:y.clientY},v=Xte(g,b.getBoundingClientRect()),m=Zte(g,v),k=ere(p.getBoundingClientRect()),A=rre([...m,...k]);a(A),f(!0)},[f]);return x.useEffect(()=>()=>d(),[d]),x.useEffect(()=>{if(c&&u){const y=b=>h(b,u),p=b=>h(b,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",p)}}},[c,u,h,d]),x.useEffect(()=>{if(o){const y=p=>{const b=p.target,g={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(b))||(u==null?void 0:u.contains(b)),m=!tre(g,o);v?d():m&&(d(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,o,l,d]),C.jsx(_R,{...t,ref:i})}),[Qte,Jte]=_v(Dv,{isInside:!1}),_R=x.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=E1(Gf,r),l=Mv(r),{onClose:u}=c;return x.useEffect(()=>(document.addEventListener(Qw,u),()=>document.removeEventListener(Qw,u)),[u]),x.useEffect(()=>{if(c.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),C.jsx(md,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:C.jsxs(ik,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(GP,{children:n}),C.jsx(Qte,{scope:r,isInside:!0,children:C.jsx(uee,{id:c.contentId,role:"tooltip",children:s||n})})]})})});qte.displayName=Gf;var MR="TooltipArrow",Yte=x.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Mv(r);return Jte(MR,r).isInside?null:C.jsx(ok,{...s,...n,ref:e})});Yte.displayName=MR;function Xte(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Zte(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function ere(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function tre(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function rre(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),nre(e)}function nre(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var DR,w3=Wa;DR=w3.createRoot,w3.hydrateRoot;const Bk="6.13.4";function sre(t,e,r){const n=e.split("|").map(i=>i.trim());for(let i=0;iPromise.resolve(t[n])))).reduce((n,s,i)=>(n[e[i]]=s,n),{})}function fe(t,e,r){for(let n in e){let s=e[n];const i=r?r[n]:null;i&&sre(s,i,n),Object.defineProperty(t,n,{enumerable:!0,value:s,writable:!1})}}function gu(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(gu).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return gu(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${gu(r)}: ${gu(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Ut(t,e){return t&&t.code===e}function Bv(t){return Ut(t,"CALL_EXCEPTION")}function pt(t,e,r){let n=t;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${gu(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];i.push(o+"="+gu(a))}}i.push(`code=${e}`),i.push(`version=${Bk}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return fe(s,{code:e}),r&&Object.assign(s,r),s.shortMessage==null&&fe(s,{shortMessage:n}),s}function H(t,e,r,n){if(!t)throw pt(e,r,n)}function I(t,e,r,n){H(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function Lk(t,e,r){r==null&&(r=""),r&&(r=": "+r),H(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),H(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const ire=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"Ć©".normalize("NFD")!=="eĢ")throw new Error("broken");t.push(e)}catch{}return t},[]);function jk(t){H(ire.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function xo(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),H(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function BR(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i>4]+E3[s&15]}return r}function Ue(t){return"0x"+t.map(e=>z(e).substring(2)).join("")}function ka(t){return Ke(t,!0)?(t.length-2)/2:Q(t).length}function ct(t,e,r){const n=Q(t);return r!=null&&r>n.length&&H(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),z(n.slice(e??0,r??n.length))}function ore(t){let e=z(t).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function LR(t,e,r){const n=Q(t);H(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),r?s.set(n,e-n.length):s.set(n,0),z(s)}function is(t,e){return LR(t,e,!0)}function Lv(t,e){return LR(t,e,!1)}const jv=BigInt(0),Ts=BigInt(1),vu=9007199254740991;function b0(t,e){const r=C1(t,"value"),n=BigInt(Pe(e,"width"));if(H(r>>n===jv,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ts){const s=(Ts<=-vu&&t<=vu,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){I(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}I(!1,"invalid BigNumberish value",e||"value",t)}function C1(t,e){const r=xe(t,e);return H(r>=jv,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const C3="0123456789abcdef";function kd(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=C3[r>>4],e+=C3[r&15];return BigInt(e)}return xe(t)}function Pe(t,e){switch(typeof t){case"bigint":return I(t>=-vu&&t<=vu,"overflow",e||"value",t),Number(t);case"number":return I(Number.isInteger(t),"underflow",e||"value",t),I(t>=-vu&&t<=vu,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Pe(BigInt(t),e)}catch(r){I(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}I(!1,"invalid numeric value",e||"value",t)}function jR(t){return Pe(kd(t))}function Rn(t,e){let n=C1(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const s=Pe(e,"width");for(H(s*2>=n.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;o++)i++;return i}return t==="OVERRUN"?r.length-e-1:0}function ure(t,e,r,n,s){return t==="OVERLONG"?(I(typeof s=="number","invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),WR(t,e,r))}const VR=Object.freeze({error:lre,ignore:WR,replace:ure});function zR(t,e){e==null&&(e=VR.error);const r=Q(t,"bytes"),n=[];let s=0;for(;s>7)){n.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?s+=e("UNEXPECTED_CONTINUE",s-1,r,n):s+=e("BAD_PREFIX",s-1,r,n);continue}if(s-1+o>=r.length){s+=e("OVERRUN",s-1,r,n);continue}let c=i&(1<<8-o-1)-1;for(let l=0;l1114111){s+=e("OUT_OF_RANGE",s-1-o,r,n,c);continue}if(c>=55296&&c<=57343){s+=e("UTF16_SURROGATE",s-1-o,r,n,c);continue}if(c<=a){s+=e("OVERLONG",s-1-o,r,n,c);continue}n.push(c)}}return n}function xt(t,e){I(typeof t=="string","invalid string value","str",t),e!=null&&(jk(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);I(n>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return new Uint8Array(r)}function fre(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ls(t,e){return fre(zR(t,e))}function dre(t,e){return zR(xt(t,e))}function HR(t){async function e(r,n){H(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();H(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),H(s==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=pt("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{i=pt("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(h){throw clearTimeout(a),i||h}clearTimeout(a);const u={};l.headers.forEach((h,y)=>{u[y.toLowerCase()]=h});const f=await l.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:d}}return e}const hre=12,pre=250;let k3=HR();const yre=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),gre=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let Wx=!1;async function GR(t,e){try{const r=t.match(yre);if(!r)throw new Error("invalid data");return new so(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?UR(r[3]):vre(r[3]))}catch{return new so(599,"BAD REQUEST (invalid data: URI)",{},null,new qt(t))}}function qR(t){async function e(r,n){try{const s=r.match(gre);if(!s)throw new Error("invalid link");return new qt(`${t}${s[2]}`)}catch{return new so(599,"BAD REQUEST (invalid IPFS URI)",{},null,new qt(r))}}return e}const yp={data:GR,ipfs:qR("https://gateway.ipfs.io/ipfs/")},KR=new WeakMap;var Ac,Vo;class QR{constructor(e){j(this,Ac);j(this,Vo);T(this,Ac,[]),T(this,Vo,!1),KR.set(e,()=>{if(!w(this,Vo)){T(this,Vo,!0);for(const r of w(this,Ac))setTimeout(()=>{r()},0);T(this,Ac,[])}})}addListener(e){H(!w(this,Vo),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),w(this,Ac).push(e)}get cancelled(){return w(this,Vo)}checkSignal(){H(!this.cancelled,"cancelled","CANCELLED",{})}}Ac=new WeakMap,Vo=new WeakMap;function gp(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var zu,Hu,xs,Di,Gu,qu,Jt,wn,Bi,Tc,Ic,Pc,Ys,bs,zo,Oc,ah;const jg=class jg{constructor(e){j(this,Oc);j(this,zu);j(this,Hu);j(this,xs);j(this,Di);j(this,Gu);j(this,qu);j(this,Jt);j(this,wn);j(this,Bi);j(this,Tc);j(this,Ic);j(this,Pc);j(this,Ys);j(this,bs);j(this,zo);T(this,qu,String(e)),T(this,zu,!1),T(this,Hu,!0),T(this,xs,{}),T(this,Di,""),T(this,Gu,3e5),T(this,bs,{slotInterval:pre,maxAttempts:hre}),T(this,zo,null)}get url(){return w(this,qu)}set url(e){T(this,qu,String(e))}get body(){return w(this,Jt)==null?null:new Uint8Array(w(this,Jt))}set body(e){if(e==null)T(this,Jt,void 0),T(this,wn,void 0);else if(typeof e=="string")T(this,Jt,xt(e)),T(this,wn,"text/plain");else if(e instanceof Uint8Array)T(this,Jt,e),T(this,wn,"application/octet-stream");else if(typeof e=="object")T(this,Jt,xt(JSON.stringify(e))),T(this,wn,"application/json");else throw new Error("invalid body")}hasBody(){return w(this,Jt)!=null}get method(){return w(this,Di)?w(this,Di):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),T(this,Di,String(e).toUpperCase())}get headers(){const e=Object.assign({},w(this,xs));return w(this,Bi)&&(e.authorization=`Basic ${$R(xt(w(this,Bi)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&w(this,wn)&&(e["content-type"]=w(this,wn)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){w(this,xs)[String(e).toLowerCase()]=String(r)}clearHeaders(){T(this,xs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),T(this,Gu,e)}get preflightFunc(){return w(this,Tc)||null}set preflightFunc(e){T(this,Tc,e)}get processFunc(){return w(this,Ic)||null}set processFunc(e){T(this,Ic,e)}get retryFunc(){return w(this,Pc)||null}set retryFunc(e){T(this,Pc,e)}get getUrlFunc(){return w(this,zo)||k3}set getUrlFunc(e){T(this,zo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(w(this,bs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(w(this,bs).maxAttempts=e.maxAttempts)}send(){return H(w(this,Ys)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),T(this,Ys,new QR(this)),Y(this,Oc,ah).call(this,0,S3()+this.timeout,0,this,new so(0,"",{},null,this))}cancel(){H(w(this,Ys)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=KR.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();H(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const s=new jg(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,T(s,xs,Object.assign({},w(this,xs))),w(this,Jt)&&T(s,Jt,new Uint8Array(w(this,Jt))),T(s,wn,w(this,wn)),s}clone(){const e=new jg(this.url);return T(e,Di,w(this,Di)),w(this,Jt)&&T(e,Jt,w(this,Jt)),T(e,wn,w(this,wn)),T(e,xs,Object.assign({},w(this,xs))),T(e,Bi,w(this,Bi)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),T(e,Tc,w(this,Tc)),T(e,Ic,w(this,Ic)),T(e,Pc,w(this,Pc)),T(e,bs,Object.assign({},w(this,bs))),T(e,zo,w(this,zo)),e}static lockConfig(){Wx=!0}static getGateway(e){return yp[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(Wx)throw new Error("gateways locked");yp[e]=r}static registerGetUrl(e){if(Wx)throw new Error("gateways locked");k3=e}static createGetUrlFunc(e){return HR()}static createDataGateway(){return GR}static createIpfsGatewayFunc(e){return qR(e)}};zu=new WeakMap,Hu=new WeakMap,xs=new WeakMap,Di=new WeakMap,Gu=new WeakMap,qu=new WeakMap,Jt=new WeakMap,wn=new WeakMap,Bi=new WeakMap,Tc=new WeakMap,Ic=new WeakMap,Pc=new WeakMap,Ys=new WeakMap,bs=new WeakMap,zo=new WeakMap,Oc=new WeakSet,ah=async function(e,r,n,s,i){var u,f,d;if(e>=w(this,bs).maxAttempts)return i.makeServerError("exceeded maximum retry limit");H(S3()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await mre(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in yp){const h=await yp[a](o.url,gp(w(s,Ys)));if(h instanceof so){let y=h;if(this.processFunc){gp(w(s,Ys));try{y=await this.processFunc(o,y)}catch(p){(p.throttle==null||typeof p.stall!="number")&&y.makeServerError("error in post-processing function",p).assertOk()}}return y}o=h}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,gp(w(s,Ys)));let l=new so(c.statusCode,c.statusMessage,c.headers,c.body,s);if(l.statusCode===301||l.statusCode===302){try{const h=l.headers.location||"";return Y(u=o.redirect(h),Oc,ah).call(u,e+1,r,0,s,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const h=l.headers["retry-after"];let y=w(this,bs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(y=parseInt(h)),Y(f=o.clone(),Oc,ah).call(f,e+1,r,y,s,l)}if(this.processFunc){gp(w(s,Ys));try{l=await this.processFunc(o,l)}catch(h){(h.throttle==null||typeof h.stall!="number")&&l.makeServerError("error in post-processing function",h).assertOk();let y=w(this,bs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return h.stall>=0&&(y=h.stall),Y(d=o.clone(),Oc,ah).call(d,e+1,r,y,s,l)}}return l};let qt=jg;var W0,V0,z0,En,Ku,Rc;const gA=class gA{constructor(e,r,n,s,i){j(this,W0);j(this,V0);j(this,z0);j(this,En);j(this,Ku);j(this,Rc);T(this,W0,e),T(this,V0,r),T(this,z0,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),T(this,En,s==null?null:new Uint8Array(s)),T(this,Ku,i||null),T(this,Rc,{message:""})}toString(){return``}get statusCode(){return w(this,W0)}get statusMessage(){return w(this,V0)}get headers(){return Object.assign({},w(this,z0))}get body(){return w(this,En)==null?null:new Uint8Array(w(this,En))}get bodyText(){try{return w(this,En)==null?"":Ls(w(this,En))}catch{H(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{H(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw fe(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return w(this,En)!=null}get request(){return w(this,Ku)}ok(){return w(this,Rc).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=w(this,Rc);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{w(this,En)&&(s=Ls(w(this,En)))}catch{}H(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};W0=new WeakMap,V0=new WeakMap,z0=new WeakMap,En=new WeakMap,Ku=new WeakMap,Rc=new WeakMap;let so=gA;function S3(){return new Date().getTime()}function vre(t){return xt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function mre(t){return new Promise(e=>setTimeout(e,t))}const xre=BigInt(-1),hs=BigInt(0),mu=BigInt(1),bre=BigInt(5),Fl={};let Mu="0000";for(;Mu.length<80;)Mu+=Mu;function ec(t){let e=Mu;for(;e.length=-s&&ths?t=b0(da(t,n),n):t=-b0(da(-t,n),n)}else{const s=mu<=0&&ti[a]==null?l:(I(typeof i[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,i[a]),i[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}I(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),I(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const s=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:s}}function wre(t,e){let r="";t0?n*=ec(s):s<0&&(r*=ec(-s)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=w(this,at);return w(this,at)hs&&(e+=w(this,Fr)-mu),e=w(this,at)/w(this,Fr)*w(this,Fr),Y(this,rt,Ti).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=bre*ec(r-1);let s=this.value+n;const i=ec(r);return s=s/i*i,Hd(s,w(this,ws),"round"),new Uo(Fl,s,w(this,ws))}isZero(){return w(this,at)===hs}isNegative(){return w(this,at)0){const c=ec(a);H(o%c===hs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=ec(-a));return Hd(o,i,"fromValue"),new Uo(Fl,o,i)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);I(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const s=Vx(r);let i=n[2]||"0",o=n[3]||"";for(;o.length{H(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const s=A3(t,e+1,n);return r(e+1+n+s),T3(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),T3(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=A3(t,e+1,n);r(e+1+n+s);const i=z(t.slice(e+1+n,e+1+n+s));return{consumed:1+n+s,result:i}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const s=z(t.slice(e+1,e+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:Ere(t[e])}}function k1(t){const e=Q(t,"data"),r=JR(e,0);return I(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function I3(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function YR(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(YR(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=I3(n.length);return s.unshift(247+s.length),s.concat(n)}const e=Array.prototype.slice.call(Q(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=I3(e.length);return r.unshift(183+r.length),r.concat(e)}const P3="0123456789abcdef";function Ba(t){let e="0x";for(const r of YR(t))e+=P3[r>>4],e+=P3[r&15];return e}const XR=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ZR(t,e){let r=18;if(typeof e=="string"){const n=XR.indexOf(e);I(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Pe(e,"unit"));return w0.fromValue(t,r,{decimals:r,width:512}).toString()}function dg(t,e){I(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=XR.indexOf(e);I(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Pe(e,"unit"));return w0.fromString(t,{decimals:r,width:512}).value}function Cre(t){return ZR(t,18)}function r2(t){return dg(t,18)}function eN(t){const e=Q(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=z(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Gr=32,n2=new Uint8Array(Gr),kre=["then"],vp={},tN=new WeakMap;function uc(t){return tN.get(t)}function O3(t,e){tN.set(t,e)}function Gd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function s2(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof ml?s2(uc(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof ml&&(o=s2(uc(o),o,r)),n[s]=o),n},{})}var Qu;const wu=class wu extends Array{constructor(...r){const n=r[0];let s=r[1],i=(r[2]||[]).slice(),o=!0;n!==vp&&(s=r,i=[],o=!1);super(s.length);j(this,Qu);s.forEach((l,u)=>{this[u]=l});const a=i.reduce((l,u)=>(typeof u=="string"&&l.set(u,(l.get(u)||0)+1),l),new Map);if(O3(this,Object.freeze(s.map((l,u)=>{const f=i[u];return f!=null&&a.get(f)===1?f:null}))),T(this,Qu,[]),w(this,Qu)==null&&w(this,Qu),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const h=Pe(u,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const y=l[h];return y instanceof Error&&Gd(`index ${h}`,y),y}if(kre.indexOf(u)>=0)return Reflect.get(l,u,f);const d=l[u];if(d instanceof Function)return function(...h){return d.apply(this===f?l:this,h)};if(!(u in l))return l.getValue.apply(this===f?l:this,[u])}return Reflect.get(l,u,f)}});return O3(c,uc(this)),c}toArray(r){const n=[];return this.forEach((s,i)=>{s instanceof Error&&Gd(`index ${i}`,s),r&&s instanceof wu&&(s=s.toArray(r)),n.push(s)}),n}toObject(r){const n=uc(this);return n.reduce((s,i,o)=>(H(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),s2(n,this,r)),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const s=uc(this),i=[],o=[];for(let a=r;a{w(this,Li)[e]=R3(r)}}}Li=new WeakMap,Nc=new WeakMap,Ju=new WeakSet,Zp=function(e){return w(this,Li).push(e),T(this,Nc,w(this,Nc)+e.length),e.length};var nn,Cn,_c,Mc,Ho,Al,a2,rN;const vA=class vA{constructor(e,r,n){j(this,Al);_(this,"allowLoose");j(this,nn);j(this,Cn);j(this,_c);j(this,Mc);j(this,Ho);fe(this,{allowLoose:!!r}),T(this,nn,rr(e)),T(this,_c,0),T(this,Mc,null),T(this,Ho,n??1024),T(this,Cn,0)}get data(){return z(w(this,nn))}get dataLength(){return w(this,nn).length}get consumed(){return w(this,Cn)}get bytes(){return new Uint8Array(w(this,nn))}subReader(e){const r=new vA(w(this,nn).slice(w(this,Cn)+e),this.allowLoose,w(this,Ho));return T(r,Mc,this),r}readBytes(e,r){let n=Y(this,Al,rN).call(this,0,e,!!r);return Y(this,Al,a2).call(this,e),T(this,Cn,w(this,Cn)+n.length),n.slice(0,e)}readValue(){return kd(this.readBytes(Gr))}readIndex(){return jR(this.readBytes(Gr))}};nn=new WeakMap,Cn=new WeakMap,_c=new WeakMap,Mc=new WeakMap,Ho=new WeakMap,Al=new WeakSet,a2=function(e){var r;if(w(this,Mc))return Y(r=w(this,Mc),Al,a2).call(r,e);T(this,_c,w(this,_c)+e),H(w(this,Ho)<1||w(this,_c)<=w(this,Ho)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${w(this,Ho)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:rr(w(this,nn)),offset:w(this,Cn),length:e,info:{bytesRead:w(this,_c),dataLength:this.dataLength}})},rN=function(e,r,n){let s=Math.ceil(r/Gr)*Gr;return w(this,Cn)+s>w(this,nn).length&&(this.allowLoose&&n&&w(this,Cn)+r<=w(this,nn).length?s=r:H(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:rr(w(this,nn)),length:w(this,nn).length,offset:w(this,Cn)+s})),w(this,nn).slice(w(this,Cn),w(this,Cn)+s)};let o2=vA;function Tn(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function $k(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function nN(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Tn(t.outputLen),Tn(t.blockLen)}function qf(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 sN(t,e){$k(t);const r=e.outputLen;if(t.lengtht instanceof Uint8Array,ey=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ty=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),zs=(t,e)=>t<<32-e|t>>>e,Are=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Are)throw new Error("Non little-endian hardware is not supported");const Tre=async()=>{};async function N3(t,e,r){let n=Date.now();for(let s=0;s=0&&in+s.length,0));let r=0;return t.forEach(n=>{if(!iN(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}let Wk=class{clone(){return this._cloneInto()}};const Ore={}.toString;function oN(t,e){if(e!==void 0&&Ore.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Uv(t){const e=n=>t().update(Kf(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Rre(t=32){if(zx&&typeof zx.getRandomValues=="function")return zx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class aN extends Wk{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,nN(e);const n=Kf(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 s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?e.create().update(n).digest():n);for(let o=0;onew aN(t,e).update(r).digest();$v.create=(t,e)=>new aN(t,e);function Nre(t,e,r,n){nN(t);const s=oN({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(Tn(i),Tn(o),Tn(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=Kf(e),l=Kf(r),u=new Uint8Array(o),f=$v.create(t,c),d=f._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:f,PRFSalt:d}}function _re(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function Vk(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=Nre(t,e,r,n);let l;const u=new Uint8Array(4),f=ty(u),d=new Uint8Array(a.outputLen);for(let h=1,y=0;y>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class zk extends Wk{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ty(this.buffer)}update(e){qf(this);const{view:r,buffer:n,blockLen:s}=this;e=Kf(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&r,Bre=(t,e,r)=>t&e^t&r^e&r,Lre=new Uint32Array([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]),Ao=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),To=new Uint32Array(64);let jre=class extends zk{constructor(){super(64,32,8,!1),this.A=Ao[0]|0,this.B=Ao[1]|0,this.C=Ao[2]|0,this.D=Ao[3]|0,this.E=Ao[4]|0,this.F=Ao[5]|0,this.G=Ao[6]|0,this.H=Ao[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)To[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=To[f-15],h=To[f-2],y=zs(d,7)^zs(d,18)^d>>>3,p=zs(h,17)^zs(h,19)^h>>>10;To[f]=p+To[f-7]+y+To[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=zs(a,6)^zs(a,11)^zs(a,25),h=u+d+Dre(a,c,l)+Lre[f]+To[f]|0,p=(zs(n,2)^zs(n,13)^zs(n,22))+Bre(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+p|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){To.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const Sd=Uv(()=>new jre),mp=BigInt(2**32-1),c2=BigInt(32);function cN(t,e=!1){return e?{h:Number(t&mp),l:Number(t>>c2&mp)}:{h:Number(t>>c2&mp)|0,l:Number(t&mp)|0}}function lN(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;sBigInt(t>>>0)<>>0),Ure=(t,e,r)=>t>>>r,$re=(t,e,r)=>t<<32-r|e>>>r,Wre=(t,e,r)=>t>>>r|e<<32-r,Vre=(t,e,r)=>t<<32-r|e>>>r,zre=(t,e,r)=>t<<64-r|e>>>r-32,Hre=(t,e,r)=>t>>>r-32|e<<64-r,Gre=(t,e)=>e,qre=(t,e)=>t,uN=(t,e,r)=>t<>>32-r,fN=(t,e,r)=>e<>>32-r,dN=(t,e,r)=>e<>>64-r,hN=(t,e,r)=>t<>>64-r;function Kre(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const Qre=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Jre=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Yre=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),Xre=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Zre=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),ene=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Be={fromBig:cN,split:lN,toBig:Fre,shrSH:Ure,shrSL:$re,rotrSH:Wre,rotrSL:Vre,rotrBH:zre,rotrBL:Hre,rotr32H:Gre,rotr32L:qre,rotlSH:uN,rotlSL:fN,rotlBH:dN,rotlBL:hN,add:Kre,add3L:Qre,add3H:Jre,add4L:Yre,add4H:Xre,add5H:ene,add5L:Zre},[tne,rne]=Be.split(["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))),Io=new Uint32Array(80),Po=new Uint32Array(80);class nne extends zk{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:h,Gl:y,Hh:p,Hl:b}=this;return[e,r,n,s,i,o,a,c,l,u,f,d,h,y,p,b]}set(e,r,n,s,i,o,a,c,l,u,f,d,h,y,p,b){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=h|0,this.Gl=y|0,this.Hh=p|0,this.Hl=b|0}process(e,r){for(let m=0;m<16;m++,r+=4)Io[m]=e.getUint32(r),Po[m]=e.getUint32(r+=4);for(let m=16;m<80;m++){const k=Io[m-15]|0,A=Po[m-15]|0,P=Be.rotrSH(k,A,1)^Be.rotrSH(k,A,8)^Be.shrSH(k,A,7),R=Be.rotrSL(k,A,1)^Be.rotrSL(k,A,8)^Be.shrSL(k,A,7),N=Io[m-2]|0,V=Po[m-2]|0,F=Be.rotrSH(N,V,19)^Be.rotrBH(N,V,61)^Be.shrSH(N,V,6),X=Be.rotrSL(N,V,19)^Be.rotrBL(N,V,61)^Be.shrSL(N,V,6),re=Be.add4L(R,X,Po[m-7],Po[m-16]),le=Be.add4H(re,P,F,Io[m-7],Io[m-16]);Io[m]=le|0,Po[m]=re|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:h,Fl:y,Gh:p,Gl:b,Hh:g,Hl:v}=this;for(let m=0;m<80;m++){const k=Be.rotrSH(f,d,14)^Be.rotrSH(f,d,18)^Be.rotrBH(f,d,41),A=Be.rotrSL(f,d,14)^Be.rotrSL(f,d,18)^Be.rotrBL(f,d,41),P=f&h^~f&p,R=d&y^~d&b,N=Be.add5L(v,A,R,rne[m],Po[m]),V=Be.add5H(N,g,k,P,tne[m],Io[m]),F=N|0,X=Be.rotrSH(n,s,28)^Be.rotrBH(n,s,34)^Be.rotrBH(n,s,39),re=Be.rotrSL(n,s,28)^Be.rotrBL(n,s,34)^Be.rotrBL(n,s,39),le=n&i^n&a^i&a,ee=s&o^s&c^o&c;g=p|0,v=b|0,p=h|0,b=y|0,h=f|0,y=d|0,{h:f,l:d}=Be.add(l|0,u|0,V|0,F|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const B=Be.add3L(F,re,ee);n=Be.add3H(B,V,X,le),s=B|0}({h:n,l:s}=Be.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=Be.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=Be.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Be.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=Be.add(this.Eh|0,this.El|0,f|0,d|0),{h,l:y}=Be.add(this.Fh|0,this.Fl|0,h|0,y|0),{h:p,l:b}=Be.add(this.Gh|0,this.Gl|0,p|0,b|0),{h:g,l:v}=Be.add(this.Hh|0,this.Hl|0,g|0,v|0),this.set(n,s,i,o,a,c,l,u,f,d,h,y,p,b,g,v)}roundClean(){Io.fill(0),Po.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Hk=Uv(()=>new nne);function sne(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const _3=sne(),M3=_3.crypto||_3.msCrypto;function pN(t){switch(t){case"sha256":return Sd.create();case"sha512":return Hk.create()}I(!1,"invalid hashing algorithm name","algorithm",t)}function ine(t,e){const r={sha256:Sd,sha512:Hk}[t];return I(r!=null,"invalid hmac algorithm","algorithm",t),$v.create(r,e)}function one(t,e,r,n,s){const i={sha256:Sd,sha512:Hk}[s];return I(i!=null,"invalid pbkdf2 algorithm","algorithm",s),Vk(i,t,e,{c:r,dkLen:n})}function ane(t){H(M3!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),I(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return M3.getRandomValues(e),e}let yN=!1;const gN=function(t,e,r){return ine(t,e).update(r).digest()};let vN=gN;function Ga(t,e,r){const n=Q(e,"key"),s=Q(r,"data");return z(vN(t,n,s))}Ga._=gN;Ga.lock=function(){yN=!0};Ga.register=function(t){if(yN)throw new Error("computeHmac is locked");vN=t};Object.freeze(Ga);const[mN,xN,bN]=[[],[],[]],cne=BigInt(0),qd=BigInt(1),lne=BigInt(2),une=BigInt(7),fne=BigInt(256),dne=BigInt(113);for(let t=0,e=qd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],mN.push(2*(5*n+r)),xN.push((t+1)*(t+2)/2%64);let s=cne;for(let i=0;i<7;i++)e=(e<>une)*dne)%fne,e&lne&&(s^=qd<<(qd<r>32?dN(t,e,r):uN(t,e,r),B3=(t,e,r)=>r>32?hN(t,e,r):fN(t,e,r);function yne(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=D3(l,u,1)^r[a],d=B3(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=xN[o],c=D3(s,i,a),l=B3(s,i,a),u=mN[o];s=t[u],i=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=hne[n],t[1]^=pne[n]}r.fill(0)}class Gk extends Wk{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Tn(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=ey(this.state)}keccak(){yne(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){qf(this);const{blockLen:r,state:n}=this;e=Kf(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Tn(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(sN(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Gk(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const gne=(t,e,r)=>Uv(()=>new Gk(e,t,r)),vne=gne(1,136,256/8);let wN=!1;const EN=function(t){return vne(t)};let CN=EN;function De(t){const e=Q(t,"data");return z(CN(e))}De._=EN;De.lock=function(){wN=!0};De.register=function(t){if(wN)throw new TypeError("keccak256 is locked");CN=t};Object.freeze(De);const mne=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),kN=Uint8Array.from({length:16},(t,e)=>e),xne=kN.map(t=>(9*t+5)%16);let qk=[kN],Kk=[xne];for(let t=0;t<4;t++)for(let e of[qk,Kk])e.push(e[t].map(r=>mne[r]));const SN=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),bne=qk.map((t,e)=>t.map(r=>SN[e][r])),wne=Kk.map((t,e)=>t.map(r=>SN[e][r])),Ene=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Cne=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),xp=(t,e)=>t<>>32-e;function L3(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const bp=new Uint32Array(16);class kne extends zk{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:s,h4:i}=this;return[e,r,n,s,i]}set(e,r,n,s,i){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=s|0,this.h4=i|0}process(e,r){for(let h=0;h<16;h++,r+=4)bp[h]=e.getUint32(r,!0);let n=this.h0|0,s=n,i=this.h1|0,o=i,a=this.h2|0,c=a,l=this.h3|0,u=l,f=this.h4|0,d=f;for(let h=0;h<5;h++){const y=4-h,p=Ene[h],b=Cne[h],g=qk[h],v=Kk[h],m=bne[h],k=wne[h];for(let A=0;A<16;A++){const P=xp(n+L3(h,i,a,l)+bp[g[A]]+p,m[A])+f|0;n=f,f=l,l=xp(a,10)|0,a=i,i=P}for(let A=0;A<16;A++){const P=xp(s+L3(y,o,c,u)+bp[v[A]]+b,k[A])+d|0;s=d,d=u,u=xp(c,10)|0,c=o,o=P}}this.set(this.h1+a+u|0,this.h2+l+d|0,this.h3+f+s|0,this.h4+n+o|0,this.h0+i+c|0)}roundClean(){bp.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const Sne=Uv(()=>new kne);let AN=!1;const TN=function(t){return Sne(t)};let IN=TN;function qa(t){const e=Q(t,"data");return z(IN(e))}qa._=TN;qa.lock=function(){AN=!0};qa.register=function(t){if(AN)throw new TypeError("ripemd160 is locked");IN=t};Object.freeze(qa);let PN=!1;const ON=function(t,e,r,n,s){return one(t,e,r,n,s)};let RN=ON;function Ci(t,e,r,n,s){const i=Q(t,"password"),o=Q(e,"salt");return z(RN(i,o,r,n,s))}Ci._=ON;Ci.lock=function(){PN=!0};Ci.register=function(t){if(PN)throw new Error("pbkdf2 is locked");RN=t};Object.freeze(Ci);let NN=!1;const _N=function(t){return new Uint8Array(ane(t))};let MN=_N;function _r(t){return MN(t)}_r._=_N;_r.lock=function(){NN=!0};_r.register=function(t){if(NN)throw new Error("randomBytes is locked");MN=t};Object.freeze(_r);const Qe=(t,e)=>t<>>32-e;function j3(t,e,r,n,s,i){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],y=t[e++]^r[n++],p=t[e++]^r[n++],b=t[e++]^r[n++],g=t[e++]^r[n++],v=t[e++]^r[n++],m=t[e++]^r[n++],k=t[e++]^r[n++],A=t[e++]^r[n++],P=o,R=a,N=c,V=l,F=u,X=f,re=d,le=h,ee=y,B=p,G=b,Z=g,E=v,S=m,O=k,D=A;for(let L=0;L<8;L+=2)F^=Qe(P+E|0,7),ee^=Qe(F+P|0,9),E^=Qe(ee+F|0,13),P^=Qe(E+ee|0,18),B^=Qe(X+R|0,7),S^=Qe(B+X|0,9),R^=Qe(S+B|0,13),X^=Qe(R+S|0,18),O^=Qe(G+re|0,7),N^=Qe(O+G|0,9),re^=Qe(N+O|0,13),G^=Qe(re+N|0,18),V^=Qe(D+Z|0,7),le^=Qe(V+D|0,9),Z^=Qe(le+V|0,13),D^=Qe(Z+le|0,18),R^=Qe(P+V|0,7),N^=Qe(R+P|0,9),V^=Qe(N+R|0,13),P^=Qe(V+N|0,18),re^=Qe(X+F|0,7),le^=Qe(re+X|0,9),F^=Qe(le+re|0,13),X^=Qe(F+le|0,18),Z^=Qe(G+B|0,7),ee^=Qe(Z+G|0,9),B^=Qe(ee+Z|0,13),G^=Qe(B+ee|0,18),E^=Qe(D+O|0,7),S^=Qe(E+D|0,9),O^=Qe(S+E|0,13),D^=Qe(O+S|0,18);s[i++]=o+P|0,s[i++]=a+R|0,s[i++]=c+N|0,s[i++]=l+V|0,s[i++]=u+F|0,s[i++]=f+X|0,s[i++]=d+re|0,s[i++]=h+le|0,s[i++]=y+ee|0,s[i++]=p+B|0,s[i++]=b+G|0,s[i++]=g+Z|0,s[i++]=v+E|0,s[i++]=m+S|0,s[i++]=k+O|0,s[i++]=A+D|0}function Du(t,e,r,n,s){let i=n+0,o=n+16*s;for(let a=0;a<16;a++)r[o+a]=t[e+(2*s-1)*16+a];for(let a=0;a0&&(o+=16),j3(r,i,t,e+=16,r,o)}function DN(t,e,r){const n=oN({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:s,r:i,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Tn(s),Tn(i),Tn(o),Tn(a),Tn(c),Tn(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const f=128*i,d=f/4;if(s<=1||s&s-1||s>=2**(f/8)||s>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/f)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const h=f*(s+o);if(h>l)throw new Error(`Scrypt: parameters too large, ${h} (128 * r * (N + p)) > ${l} (maxmem)`);const y=Vk(Sd,t,e,{c:1,dkLen:f*o}),p=ey(y),b=ey(new Uint8Array(f*s)),g=ey(new Uint8Array(f));let v=()=>{};if(u){const m=2*s*o,k=Math.max(Math.floor(m/1e4),1);let A=0;v=()=>{A++,u&&(!(A%k)||A===m)&&u(A/m)}}return{N:s,r:i,p:o,dkLen:a,blockSize32:d,V:b,B32:p,B:y,tmp:g,blockMixCb:v,asyncTick:c}}function BN(t,e,r,n,s){const i=Vk(Sd,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function Ane(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:f,blockMixCb:d}=DN(t,e,r);for(let h=0;h{Du(c,b,c,b+=a,s),d()}),Du(c,(n-1)*a,l,p,s),d(),await N3(n,h,()=>{const g=l[p+a-16]%n;for(let v=0;vt instanceof Uint8Array,Pne=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Qf(t){if(!Vv(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+s.length,0));let r=0;return t.forEach(n=>{if(!Vv(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function Rne(t,e){if(t.length!==e.length)return!1;for(let r=0;rQN;t>>=Wv,e+=1);return e}function Mne(t,e){return t>>BigInt(e)&Wv}const Dne=(t,e,r)=>t|(r?Wv:QN)<(Ine<new Uint8Array(t),F3=t=>Uint8Array.from(t);function YN(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Hx(t),s=Hx(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>r(s,n,...f),c=(f=Hx())=>{s=a(F3([0]),f),n=a(),f.length!==0&&(s=a(F3([1]),f),n=a())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{o(),c(f);let h;for(;!(h=d(l()));)c();return o(),h}}const Bne={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function A1(t,e,r={}){const n=(s,i,o)=>{const a=Bne[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=t[s];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(e))n(s,i,!1);for(const[s,i]of Object.entries(r))n(s,i,!0);return t}const Lne=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Mne,bitLen:_ne,bitMask:Xk,bitSet:Dne,bytesToHex:Qf,bytesToNumberBE:rl,bytesToNumberLE:Jk,concatBytes:E0,createHmacDrbg:YN,ensureBytes:ms,equalBytes:Rne,hexToBytes:Jf,hexToNumber:Qk,numberToBytesBE:Yf,numberToBytesLE:Yk,numberToHexUnpadded:JN,numberToVarBytesBE:One,utf8ToBytes:Nne,validateObject:A1},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const sr=BigInt(0),Dt=BigInt(1),fc=BigInt(2),jne=BigInt(3),l2=BigInt(4),U3=BigInt(5),$3=BigInt(8);BigInt(9);BigInt(16);function an(t,e){const r=t%e;return r>=sr?r:e+r}function Fne(t,e,r){if(r<=sr||e 0");if(r===Dt)return sr;let n=Dt;for(;e>sr;)e&Dt&&(n=n*t%r),t=t*t%r,e>>=Dt;return n}function Ln(t,e,r){let n=t;for(;e-- >sr;)n*=n,n%=r;return n}function u2(t,e){if(t===sr||e<=sr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=an(t,e),n=e,s=sr,i=Dt;for(;r!==sr;){const a=n/r,c=n%r,l=s-i*a;n=r,r=c,s=i,i=l}if(n!==Dt)throw new Error("invert: does not exist");return an(s,e)}function Une(t){const e=(t-Dt)/fc;let r,n,s;for(r=t-Dt,n=0;r%fc===sr;r/=fc,n++);for(s=fc;s(n[s]="function",n),e);return A1(t,r)}function zne(t,e,r){if(r 0");if(r===sr)return t.ONE;if(r===Dt)return e;let n=t.ONE,s=e;for(;r>sr;)r&Dt&&(n=t.mul(n,s)),s=t.sqr(s),r>>=Dt;return n}function Hne(t,e){const r=new Array(e.length),n=e.reduce((i,o,a)=>t.is0(o)?i:(r[a]=i,t.mul(i,o)),t.ONE),s=t.inv(n);return e.reduceRight((i,o,a)=>t.is0(o)?i:(r[a]=t.mul(i,r[a]),t.mul(i,o)),s),r}function XN(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Gne(t,e,r=!1,n={}){if(t<=sr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=XN(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=$ne(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:Xk(s),ZERO:sr,ONE:Dt,create:c=>an(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return sr<=c&&cc===sr,isOdd:c=>(c&Dt)===Dt,neg:c=>an(-c,t),eql:(c,l)=>c===l,sqr:c=>an(c*c,t),add:(c,l)=>an(c+l,t),sub:(c,l)=>an(c-l,t),mul:(c,l)=>an(c*l,t),pow:(c,l)=>zne(a,c,l),div:(c,l)=>an(c*u2(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>u2(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Hne(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?Yk(c,i):Yf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?Jk(c):rl(c)}});return Object.freeze(a)}function ZN(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function e7(t){const e=ZN(t);return e+Math.ceil(e/2)}function qne(t,e,r=!1){const n=t.length,s=ZN(e),i=e7(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?rl(t):Jk(t),a=an(o,e-Dt)+Dt;return r?Yk(a,s):Yf(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Kne=BigInt(0),Gx=BigInt(1);function Qne(t,e){const r=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(e/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:r,unsafeLadder(s,i){let o=t.ZERO,a=s;for(;i>Kne;)i&Gx&&(o=o.add(a)),a=a.double(),i>>=Gx;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let l=s,u=l;for(let f=0;f>=h,b>c&&(b-=d,o+=Gx);const g=p,v=p+Math.abs(b)-1,m=y%2!==0,k=b<0;b===0?u=u.add(r(m,i[g])):l=l.add(r(k,i[v]))}return{p:l,f:u}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let l=i.get(s);return l||(l=this.precomputeWindow(s,c),c!==1&&i.set(s,a(l))),this.wNAF(c,l,o)}}}function t7(t){return Vne(t.Fp),A1(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...XN(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Jne(t){const e=t7(t);A1(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Yne,hexToBytes:Xne}=Lne,wc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=wc;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Yne(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=wc,r=typeof t=="string"?Xne(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:s,l:i}=wc._parseInt(r.subarray(2)),{d:o,l:a}=wc._parseInt(i);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),s=e(r(t.r)),i=n.length/2,o=s.length/2,a=r(i),c=r(o);return`30${r(o+i+4)}02${c}${s}02${a}${n}`}},Ki=BigInt(0),Jn=BigInt(1);BigInt(2);const W3=BigInt(3);BigInt(4);function Zne(t){const e=Jne(t),{Fp:r}=e,n=e.toBytes||((y,p,b)=>{const g=p.toAffine();return E0(Uint8Array.from([4]),r.toBytes(g.x),r.toBytes(g.y))}),s=e.fromBytes||(y=>{const p=y.subarray(1),b=r.fromBytes(p.subarray(0,r.BYTES)),g=r.fromBytes(p.subarray(r.BYTES,2*r.BYTES));return{x:b,y:g}});function i(y){const{a:p,b}=e,g=r.sqr(y),v=r.mul(g,y);return r.add(r.add(v,r.mul(y,p)),b)}if(!r.eql(r.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function o(y){return typeof y=="bigint"&&Kir.eql(m,r.ZERO);return v(b)&&v(g)?f.ZERO:new f(b,g,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const b=r.invertBatch(p.map(g=>g.pz));return p.map((g,v)=>g.toAffine(b[v])).map(f.fromAffine)}static fromHex(p){const b=f.fromAffine(s(ms("pointHex",p)));return b.assertValidity(),b}static fromPrivateKey(p){return f.BASE.multiply(c(p))}_setWindowSize(p){this._WINDOW_SIZE=p,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y:b}=this.toAffine();if(!r.isValid(p)||!r.isValid(b))throw new Error("bad point: x or y not FE");const g=r.sqr(b),v=i(p);if(!r.eql(g,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(r.isOdd)return!r.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:b,py:g,pz:v}=this,{px:m,py:k,pz:A}=p,P=r.eql(r.mul(b,A),r.mul(m,v)),R=r.eql(r.mul(g,A),r.mul(k,v));return P&&R}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:p,b}=e,g=r.mul(b,W3),{px:v,py:m,pz:k}=this;let A=r.ZERO,P=r.ZERO,R=r.ZERO,N=r.mul(v,v),V=r.mul(m,m),F=r.mul(k,k),X=r.mul(v,m);return X=r.add(X,X),R=r.mul(v,k),R=r.add(R,R),A=r.mul(p,R),P=r.mul(g,F),P=r.add(A,P),A=r.sub(V,P),P=r.add(V,P),P=r.mul(A,P),A=r.mul(X,A),R=r.mul(g,R),F=r.mul(p,F),X=r.sub(N,F),X=r.mul(p,X),X=r.add(X,R),R=r.add(N,N),N=r.add(R,N),N=r.add(N,F),N=r.mul(N,X),P=r.add(P,N),F=r.mul(m,k),F=r.add(F,F),N=r.mul(F,X),A=r.sub(A,N),R=r.mul(F,V),R=r.add(R,R),R=r.add(R,R),new f(A,P,R)}add(p){u(p);const{px:b,py:g,pz:v}=this,{px:m,py:k,pz:A}=p;let P=r.ZERO,R=r.ZERO,N=r.ZERO;const V=e.a,F=r.mul(e.b,W3);let X=r.mul(b,m),re=r.mul(g,k),le=r.mul(v,A),ee=r.add(b,g),B=r.add(m,k);ee=r.mul(ee,B),B=r.add(X,re),ee=r.sub(ee,B),B=r.add(b,v);let G=r.add(m,A);return B=r.mul(B,G),G=r.add(X,le),B=r.sub(B,G),G=r.add(g,v),P=r.add(k,A),G=r.mul(G,P),P=r.add(re,le),G=r.sub(G,P),N=r.mul(V,B),P=r.mul(F,le),N=r.add(P,N),P=r.sub(re,N),N=r.add(re,N),R=r.mul(P,N),re=r.add(X,X),re=r.add(re,X),le=r.mul(V,le),B=r.mul(F,B),re=r.add(re,le),le=r.sub(X,le),le=r.mul(V,le),B=r.add(B,le),X=r.mul(re,B),R=r.add(R,X),X=r.mul(G,B),P=r.mul(ee,P),P=r.sub(P,X),X=r.mul(ee,re),N=r.mul(G,N),N=r.add(N,X),new f(P,R,N)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return h.wNAFCached(this,l,p,b=>{const g=r.invertBatch(b.map(v=>v.pz));return b.map((v,m)=>v.toAffine(g[m])).map(f.fromAffine)})}multiplyUnsafe(p){const b=f.ZERO;if(p===Ki)return b;if(a(p),p===Jn)return this;const{endo:g}=e;if(!g)return h.unsafeLadder(this,p);let{k1neg:v,k1:m,k2neg:k,k2:A}=g.splitScalar(p),P=b,R=b,N=this;for(;m>Ki||A>Ki;)m&Jn&&(P=P.add(N)),A&Jn&&(R=R.add(N)),N=N.double(),m>>=Jn,A>>=Jn;return v&&(P=P.negate()),k&&(R=R.negate()),R=new f(r.mul(R.px,g.beta),R.py,R.pz),P.add(R)}multiply(p){a(p);let b=p,g,v;const{endo:m}=e;if(m){const{k1neg:k,k1:A,k2neg:P,k2:R}=m.splitScalar(b);let{p:N,f:V}=this.wNAF(A),{p:F,f:X}=this.wNAF(R);N=h.constTimeNegate(k,N),F=h.constTimeNegate(P,F),F=new f(r.mul(F.px,m.beta),F.py,F.pz),g=N.add(F),v=V.add(X)}else{const{p:k,f:A}=this.wNAF(b);g=k,v=A}return f.normalizeZ([g,v])[0]}multiplyAndAddUnsafe(p,b,g){const v=f.BASE,m=(A,P)=>P===Ki||P===Jn||!A.equals(v)?A.multiplyUnsafe(P):A.multiply(P),k=m(this,b).add(m(p,g));return k.is0()?void 0:k}toAffine(p){const{px:b,py:g,pz:v}=this,m=this.is0();p==null&&(p=m?r.ONE:r.inv(v));const k=r.mul(b,p),A=r.mul(g,p),P=r.mul(v,p);if(m)return{x:r.ZERO,y:r.ZERO};if(!r.eql(P,r.ONE))throw new Error("invZ was invalid");return{x:k,y:A}}isTorsionFree(){const{h:p,isTorsionFree:b}=e;if(p===Jn)return!0;if(b)return b(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:b}=e;return p===Jn?this:b?b(f,this):this.multiplyUnsafe(e.h)}toRawBytes(p=!0){return this.assertValidity(),n(f,this,p)}toHex(p=!0){return Qf(this.toRawBytes(p))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=Qne(f,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function ese(t){const e=t7(t);return A1(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function tse(t){const e=ese(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(B){return KiQf(Yf(B,e.nByteLength));function y(B){const G=n>>Jn;return B>G}function p(B){return y(B)?a(-B):B}const b=(B,G,Z)=>rl(B.slice(G,Z));class g{constructor(G,Z,E){this.r=G,this.s=Z,this.recovery=E,this.assertValidity()}static fromCompact(G){const Z=e.nByteLength;return G=ms("compactSignature",G,Z*2),new g(b(G,0,Z),b(G,Z,2*Z))}static fromDER(G){const{r:Z,s:E}=wc.toSig(ms("DER",G));return new g(Z,E)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(G){return new g(this.r,this.s,G)}recoverPublicKey(G){const{r:Z,s:E,recovery:S}=this,O=R(ms("msgHash",G));if(S==null||![0,1,2,3].includes(S))throw new Error("recovery id invalid");const D=S===2||S===3?Z+e.n:Z;if(D>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const L=S&1?"03":"02",W=l.fromHex(L+h(D)),q=c(D),te=a(-O*q),J=a(E*q),$=l.BASE.multiplyAndAddUnsafe(W,te,J);if(!$)throw new Error("point at infinify");return $.assertValidity(),$}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Jf(this.toDERHex())}toDERHex(){return wc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Jf(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const v={isValidPrivateKey(B){try{return u(B),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const B=e7(e.n);return qne(e.randomBytes(B),e.n)},precompute(B=8,G=l.BASE){return G._setWindowSize(B),G.multiply(BigInt(3)),G}};function m(B,G=!0){return l.fromPrivateKey(B).toRawBytes(G)}function k(B){const G=B instanceof Uint8Array,Z=typeof B=="string",E=(G||Z)&&B.length;return G?E===s||E===i:Z?E===2*s||E===2*i:B instanceof l}function A(B,G,Z=!0){if(k(B))throw new Error("first arg must be private key");if(!k(G))throw new Error("second arg must be public key");return l.fromHex(G).multiply(u(B)).toRawBytes(Z)}const P=e.bits2int||function(B){const G=rl(B),Z=B.length*8-e.nBitLength;return Z>0?G>>BigInt(Z):G},R=e.bits2int_modN||function(B){return a(P(B))},N=Xk(e.nBitLength);function V(B){if(typeof B!="bigint")throw new Error("bigint expected");if(!(Ki<=B&&Bue in Z))throw new Error("sign() legacy options not supported");const{hash:E,randomBytes:S}=e;let{lowS:O,prehash:D,extraEntropy:L}=Z;O==null&&(O=!0),B=ms("msgHash",B),D&&(B=ms("prehashed msgHash",E(B)));const W=R(B),q=u(G),te=[V(q),V(W)];if(L!=null){const ue=L===!0?S(r.BYTES):L;te.push(ms("extraEntropy",ue))}const J=E0(...te),$=W;function K(ue){const he=P(ue);if(!d(he))return;const oe=c(he),ke=l.BASE.multiply(he).toAffine(),Me=a(ke.x);if(Me===Ki)return;const bt=a(oe*a($+Me*q));if(bt===Ki)return;let rn=(ke.x===Me?0:2)|Number(ke.y&Jn),Er=bt;return O&&y(bt)&&(Er=p(bt),rn^=1),new g(Me,Er,rn)}return{seed:J,k2sig:K}}const X={lowS:e.lowS,prehash:!1},re={lowS:e.lowS,prehash:!1};function le(B,G,Z=X){const{seed:E,k2sig:S}=F(B,G,Z),O=e;return YN(O.hash.outputLen,O.nByteLength,O.hmac)(E,S)}l.BASE._setWindowSize(8);function ee(B,G,Z,E=re){var ke;const S=B;if(G=ms("msgHash",G),Z=ms("publicKey",Z),"strict"in E)throw new Error("options.strict was renamed to lowS");const{lowS:O,prehash:D}=E;let L,W;try{if(typeof S=="string"||S instanceof Uint8Array)try{L=g.fromDER(S)}catch(Me){if(!(Me instanceof wc.Err))throw Me;L=g.fromCompact(S)}else if(typeof S=="object"&&typeof S.r=="bigint"&&typeof S.s=="bigint"){const{r:Me,s:bt}=S;L=new g(Me,bt)}else throw new Error("PARSE");W=l.fromHex(Z)}catch(Me){if(Me.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(O&&L.hasHighS())return!1;D&&(G=e.hash(G));const{r:q,s:te}=L,J=R(G),$=c(te),K=a(J*$),ue=a(q*$),he=(ke=l.BASE.multiplyAndAddUnsafe(W,K,ue))==null?void 0:ke.toAffine();return he?a(he.x)===q:!1}return{CURVE:e,getPublicKey:m,getSharedSecret:A,sign:le,verify:ee,ProjectivePoint:l,Signature:g,utils:v}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rse(t){return{hash:t,hmac:(e,...r)=>$v(t,e,Pre(...r)),randomBytes:Rre}}function nse(t,e){const r=n=>tse({...t,...rse(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const r7=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),V3=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),sse=BigInt(1),f2=BigInt(2),z3=(t,e)=>(t+e/f2)/e;function ise(t){const e=r7,r=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=Ln(u,r,e)*u%e,d=Ln(f,r,e)*u%e,h=Ln(d,f2,e)*l%e,y=Ln(h,s,e)*h%e,p=Ln(y,i,e)*y%e,b=Ln(p,a,e)*p%e,g=Ln(b,c,e)*b%e,v=Ln(g,a,e)*p%e,m=Ln(v,r,e)*u%e,k=Ln(m,o,e)*y%e,A=Ln(k,n,e)*l%e,P=Ln(A,f2,e);if(!d2.eql(d2.sqr(P),t))throw new Error("Cannot find square root");return P}const d2=Gne(r7,void 0,void 0,{sqrt:ise}),Do=nse({a:BigInt(0),b:BigInt(7),Fp:d2,n:V3,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=V3,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-sse*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=z3(i*t,e),c=z3(-n*t,e);let l=an(t-a*r-c*s,e),u=an(-a*n-c*i,e);const f=l>o,d=u>o;if(f&&(l=e-l),d&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},Sd);BigInt(0);Do.ProjectivePoint;const wi="0x0000000000000000000000000000000000000000",xl="0x0000000000000000000000000000000000000000000000000000000000000000",ose=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ase=BigInt("1000000000000000000"),n7=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),cse=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),lse=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),use="Īž",s7=`Ethereum Signed Message: +`,H3=BigInt(0),G3=BigInt(1),q3=BigInt(2),K3=BigInt(27),Q3=BigInt(28),wp=BigInt(35),Ul={};function J3(t){return is(nr(t),32)}var Yu,Xu,Zu,Dc;const ys=class ys{constructor(e,r,n,s){j(this,Yu);j(this,Xu);j(this,Zu);j(this,Dc);xo(e,Ul,"Signature"),T(this,Yu,r),T(this,Xu,n),T(this,Zu,s),T(this,Dc,null)}get r(){return w(this,Yu)}set r(e){I(ka(e)===32,"invalid r","value",e),T(this,Yu,z(e))}get s(){return w(this,Xu)}set s(e){I(ka(e)===32,"invalid s","value",e);const r=z(e);I(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),T(this,Xu,r)}get v(){return w(this,Zu)}set v(e){const r=Pe(e,"value");I(r===27||r===28,"invalid v","v",e),T(this,Zu,r)}get networkV(){return w(this,Dc)}get legacyChainId(){const e=this.networkV;return e==null?null:ys.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Q(this.s);return this.yParity&&(e[0]|=128),z(e)}get compactSerialized(){return Ue([this.r,this.yParityAndS])}get serialized(){return Ue([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new ys(Ul,this.r,this.s,this.v);return this.networkV&&T(e,Dc,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=xe(e,"v");return r==K3||r==Q3?H3:(I(r>=wp,"invalid EIP-155 v","v",e),(r-wp)/q3)}static getChainIdV(e,r){return xe(e)*q3+BigInt(35+r-27)}static getNormalizedV(e){const r=xe(e);return r===H3||r===K3?27:r===G3||r===Q3?28:(I(r>=wp,"invalid v","v",e),r&G3?27:28)}static from(e){function r(l,u){I(l,u,"signature",e)}if(e==null)return new ys(Ul,xl,xl,27);if(typeof e=="string"){const l=Q(e,"signature");if(l.length===64){const u=z(l.slice(0,32)),f=l.slice(32,64),d=f[0]&128?28:27;return f[0]&=127,new ys(Ul,u,z(f),d)}if(l.length===65){const u=z(l.slice(0,32)),f=l.slice(32,64);r((f[0]&128)===0,"non-canonical s");const d=ys.getNormalizedV(l[64]);return new ys(Ul,u,z(f),d)}r(!1,"invalid raw signature length")}if(e instanceof ys)return e.clone();const n=e.r;r(n!=null,"missing r");const s=J3(n),i=function(l,u){if(l!=null)return J3(l);if(u!=null){r(Ke(u,32),"invalid yParityAndS");const f=Q(u);return f[0]&=127,z(f)}r(!1,"missing s")}(e.s,e.yParityAndS);r((Q(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,f){if(l!=null){const d=xe(l);return{networkV:d>=wp?d:void 0,v:ys.getNormalizedV(d)}}if(u!=null)return r(Ke(u,32),"invalid yParityAndS"),{v:Q(u)[0]&128?28:27};if(f!=null){switch(Pe(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new ys(Ul,s,i,a);return o&&T(c,Dc,o),r(e.yParity==null||Pe(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};Yu=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,Dc=new WeakMap;let us=ys;var ji;const yc=class yc{constructor(e){j(this,ji);I(ka(e)===32,"invalid private key","privateKey","[REDACTED]"),T(this,ji,z(e))}get privateKey(){return w(this,ji)}get publicKey(){return yc.computePublicKey(w(this,ji))}get compressedPublicKey(){return yc.computePublicKey(w(this,ji),!0)}sign(e){I(ka(e)===32,"invalid digest length","digest",e);const r=Do.sign(rr(e),rr(w(this,ji)),{lowS:!0});return us.from({r:Rn(r.r,32),s:Rn(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=yc.computePublicKey(e);return z(Do.getSharedSecret(rr(w(this,ji)),Q(r),!1))}static computePublicKey(e,r){let n=Q(e,"key");if(n.length===32){const i=Do.getPublicKey(n,!!r);return z(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=Do.ProjectivePoint.fromHex(n);return z(s.toRawBytes(r))}static recoverPublicKey(e,r){I(ka(e)===32,"invalid digest length","digest",e);const n=us.from(r);let s=Do.Signature.fromCompact(rr(Ue([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(rr(e));return I(i!=null,"invalid signautre for digest","signature",r),"0x"+i.toHex(!1)}static addPoints(e,r,n){const s=Do.ProjectivePoint.fromHex(yc.computePublicKey(e).substring(2)),i=Do.ProjectivePoint.fromHex(yc.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};ji=new WeakMap;let Ms=yc;function fse(){Ga.lock(),De.lock(),Ci.lock(),_r.lock(),qa.lock(),Ka.lock(),Qa.lock(),Jr.lock(),S1.lock(),_r.lock()}const dse=BigInt(0),hse=BigInt(36);function Y3(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=Q(De(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const Zk={};for(let t=0;t<10;t++)Zk[String(t)]=String(t);for(let t=0;t<26;t++)Zk[String.fromCharCode(65+t)]=String(10+t);const X3=15;function i7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Zk[n]).join("");for(;e.length>=X3;){let n=e.substring(0,X3);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const pse=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function yse(t){t=t.toLowerCase();let e=dse;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return w(this,Bc)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return w(this,Bc)===!0?-1:w(this,Bc)===!1?this.value.length:null}static from(e,r){return new Ni(Ri,e,r)}static uint8(e){return pe(e,8)}static uint16(e){return pe(e,16)}static uint24(e){return pe(e,24)}static uint32(e){return pe(e,32)}static uint40(e){return pe(e,40)}static uint48(e){return pe(e,48)}static uint56(e){return pe(e,56)}static uint64(e){return pe(e,64)}static uint72(e){return pe(e,72)}static uint80(e){return pe(e,80)}static uint88(e){return pe(e,88)}static uint96(e){return pe(e,96)}static uint104(e){return pe(e,104)}static uint112(e){return pe(e,112)}static uint120(e){return pe(e,120)}static uint128(e){return pe(e,128)}static uint136(e){return pe(e,136)}static uint144(e){return pe(e,144)}static uint152(e){return pe(e,152)}static uint160(e){return pe(e,160)}static uint168(e){return pe(e,168)}static uint176(e){return pe(e,176)}static uint184(e){return pe(e,184)}static uint192(e){return pe(e,192)}static uint200(e){return pe(e,200)}static uint208(e){return pe(e,208)}static uint216(e){return pe(e,216)}static uint224(e){return pe(e,224)}static uint232(e){return pe(e,232)}static uint240(e){return pe(e,240)}static uint248(e){return pe(e,248)}static uint256(e){return pe(e,256)}static uint(e){return pe(e,256)}static int8(e){return pe(e,-8)}static int16(e){return pe(e,-16)}static int24(e){return pe(e,-24)}static int32(e){return pe(e,-32)}static int40(e){return pe(e,-40)}static int48(e){return pe(e,-48)}static int56(e){return pe(e,-56)}static int64(e){return pe(e,-64)}static int72(e){return pe(e,-72)}static int80(e){return pe(e,-80)}static int88(e){return pe(e,-88)}static int96(e){return pe(e,-96)}static int104(e){return pe(e,-104)}static int112(e){return pe(e,-112)}static int120(e){return pe(e,-120)}static int128(e){return pe(e,-128)}static int136(e){return pe(e,-136)}static int144(e){return pe(e,-144)}static int152(e){return pe(e,-152)}static int160(e){return pe(e,-160)}static int168(e){return pe(e,-168)}static int176(e){return pe(e,-176)}static int184(e){return pe(e,-184)}static int192(e){return pe(e,-192)}static int200(e){return pe(e,-200)}static int208(e){return pe(e,-208)}static int216(e){return pe(e,-216)}static int224(e){return pe(e,-224)}static int232(e){return pe(e,-232)}static int240(e){return pe(e,-240)}static int248(e){return pe(e,-248)}static int256(e){return pe(e,-256)}static int(e){return pe(e,-256)}static bytes1(e){return Je(e,1)}static bytes2(e){return Je(e,2)}static bytes3(e){return Je(e,3)}static bytes4(e){return Je(e,4)}static bytes5(e){return Je(e,5)}static bytes6(e){return Je(e,6)}static bytes7(e){return Je(e,7)}static bytes8(e){return Je(e,8)}static bytes9(e){return Je(e,9)}static bytes10(e){return Je(e,10)}static bytes11(e){return Je(e,11)}static bytes12(e){return Je(e,12)}static bytes13(e){return Je(e,13)}static bytes14(e){return Je(e,14)}static bytes15(e){return Je(e,15)}static bytes16(e){return Je(e,16)}static bytes17(e){return Je(e,17)}static bytes18(e){return Je(e,18)}static bytes19(e){return Je(e,19)}static bytes20(e){return Je(e,20)}static bytes21(e){return Je(e,21)}static bytes22(e){return Je(e,22)}static bytes23(e){return Je(e,23)}static bytes24(e){return Je(e,24)}static bytes25(e){return Je(e,25)}static bytes26(e){return Je(e,26)}static bytes27(e){return Je(e,27)}static bytes28(e){return Je(e,28)}static bytes29(e){return Je(e,29)}static bytes30(e){return Je(e,30)}static bytes31(e){return Je(e,31)}static bytes32(e){return Je(e,32)}static address(e){return new Ni(Ri,"address",e)}static bool(e){return new Ni(Ri,"bool",!!e)}static bytes(e){return new Ni(Ri,"bytes",e)}static string(e){return new Ni(Ri,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Ni(Ri,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===Z3}static dereference(e,r){if(Ni.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Bc=new WeakMap;let xr=Ni;class mse extends bo{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=xr.dereference(r,"string");try{n=Ae(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Ae(Rn(e.readValue(),20))}}class xse extends bo{constructor(r){super(r.name,r.type,"_",r.dynamic);_(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function o7(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return H(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),H(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else I(!1,"invalid tuple value","tuple",r);I(e.length===n.length,"types/value length mismatch","tuple",r);let s=new i2,i=new i2,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=i.length;c.encode(i,u);let d=s.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(s,u)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function a7(t,e){let r=[],n=[],s=t.subReader(0);return e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readIndex(),c=s.subReader(a);try{o=i.decode(c)}catch(l){if(Ut(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(Ut(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}if(o==null)throw new Error("investigate");r.push(o),n.push(i.localName||null)}),ml.fromItems(r,n)}class bse extends bo{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);_(this,"coder");_(this,"length");fe(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let s=0;so||s<-(o+Tse))&&this._throwError("value out-of-bounds",n),s=Fv(s,8*Gr)}else(sda(i,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(s)}decode(r){let n=da(r.readValue(),this.size*8);return this.signed&&(n=b0(n,this.size*8)),n}}class Ose extends c7{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,xt(xr.dereference(r,"string")))}decode(e){return Ls(super.decode(e))}}class Ep extends bo{constructor(r,n){let s=!1;const i=[];r.forEach(a=>{a.dynamic&&(s=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,n,s);_(this,"coders");fe(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(s=>{r.push(s.defaultValue())});const n=this.coders.reduce((s,i)=>{const o=i.localName;return o&&(s[o]||(s[o]=0),s[o]++),s},{});return this.coders.forEach((s,i)=>{let o=s.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[i]))}),Object.freeze(r)}encode(r,n){const s=xr.dereference(n,"tuple");return o7(r,this.coders,s)}decode(r){return a7(r,this.coders)}}function Br(t){return De(xt(t))}var Rse="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const e8=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),t8=4;function Nse(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let A=1;A>--c&1}const f=31,d=2**f,h=d>>>1,y=h>>1,p=d-1;let b=0;for(let A=0;A1;){let F=P+R>>>1;A>>1|u(),N=N<<1^h,V=(V^h)<<1|h|1;v=N,m=1+V-N}let k=n-4;return g.map(A=>{switch(A-k){case 3:return k+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return k+256+(t[a++]<<8|t[a++]);case 1:return k+t[a++];default:return A-1}})}function _se(t){let e=0;return()=>t[e++]}function l7(t){return _se(Nse(Mse(t)))}function Mse(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>e[s.charCodeAt(0)]=i);let r=t.length,n=new Uint8Array(6*r>>3);for(let s=0,i=0,o=0,a=0;s=8&&(n[i++]=a>>(o-=8));return n}function Dse(t){return t&1?~t>>1:t>>1}function Bse(t,e){let r=Array(t);for(let n=0,s=0;n{let e=C0(t);if(e.length)return e})}function f7(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Lse(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(jse(r,t))}return e.flat()}function k0(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function d7(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;sn[o].push(i));return n}function Lse(t,e){let r=1+e(),n=e(),s=k0(e);return d7(s.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(s[a]).fill().map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})})}function jse(t,e){let r=1+e();return d7(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Fse(t){let e=[],r=C0(t);return s(n([]),[]),e;function n(i){let o=t(),a=k0(()=>{let c=C0(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&e.push(a);for(let l of o)for(let u of l.Q)s(l,[...a,u],c)}}}function Use(t){return t.toString(16).toUpperCase().padStart(2,"0")}function h7(t){return`{${Use(t)}}`}function $se(t){let e=[];for(let r=0,n=t.length;r>24&255}function g7(t){return t&16777215}let h2,r8,p2,ry;function Qse(){let t=l7(Vse);h2=new Map(u7(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),r8=new Set(C0(t)),p2=new Map,ry=new Map;for(let[e,r]of f7(t)){if(!r8.has(e)&&r.length==2){let[n,s]=r,i=ry.get(n);i||(i=new Map,ry.set(n,i)),i.set(s,e)}p2.set(e,r.reverse())}}function v7(t){return t>=S0&&t=pg&&t=yg&&egg&&e0&&s(gg+l)}else{let o=p2.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=ch(e[0]);for(let o=1;o0&&s>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),s=o;else{let c=Jse(n,a);c>=0?n=c:s==0&&o==0?(e.push(n),n=a):(r.push(a),s=o)}}return n>=0&&e.push(n,...r),e}function x7(t){return m7(t).map(g7)}function Xse(t){return Yse(m7(t))}const n8=45,b7=".",w7=65039,E7=1,mg=t=>Array.from(t);function A0(t,e){return t.P.has(e)||t.Q.has(e)}class Zse extends Array{get is_emoji(){return!0}}let y2,C7,Ec,g2,k7,Bu,Kx,Jl,cc,s8,v2;function rS(){if(y2)return;let t=l7(Rse);const e=()=>C0(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));y2=new Map(f7(t)),C7=r(),Ec=e(),g2=new Set(e().map(u=>Ec[u])),Ec=new Set(Ec),k7=r(),r();let s=u7(t),i=t();const o=()=>{let u=new Set;return e().forEach(f=>n(u,s[f])),n(u,e()),u};Bu=k0(u=>{let f=k0(t).map(d=>d+96);if(f.length){let d=u>=i;f[0]-=32,f=Xf(f),d&&(f=`Restricted[${f}]`);let h=o(),y=o(),p=!t();return{N:f,P:h,Q:y,M:p,R:d}}}),Kx=r(),Jl=new Map;let a=e().concat(mg(Kx)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=t(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),Kx.has(u)||Jl.set(u,h)});for(let{V:u,M:f}of new Set(Jl.values())){let d=[];for(let y of u){let p=Bu.filter(g=>A0(g,y)),b=d.find(({G:g})=>p.some(v=>g.has(v)));b||(b={G:new Set,V:[]},d.push(b)),b.V.push(y),n(b.G,p)}let h=d.flatMap(y=>mg(y.G));for(let{G:y,V:p}of d){let b=new Set(h.filter(g=>!y.has(g)));for(let g of p)f.set(g,b)}}cc=new Set;let c=new Set;const l=u=>cc.has(u)?c.add(u):cc.add(u);for(let u of Bu){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of cc)!Jl.has(u)&&!c.has(u)&&Jl.set(u,E7);n(cc,x7(cc)),s8=Fse(t).map(u=>Zse.from(u)).sort(Wse),v2=new Map;for(let u of s8){let f=[v2];for(let d of u){let h=f.map(y=>{let p=y.get(d);return p||(p=new Map,y.set(d,p)),p});d===w7?f.push(...h):f=h}for(let d of f)d.V=u}}function nS(t){return(S7(t)?"":`${sS(zv([t]))} `)+h7(t)}function sS(t){return`"${t}"ā€Ž`}function eie(t){if(t.length>=4&&t[2]==n8&&t[3]==n8)throw new Error(`invalid label extension: "${Xf(t.slice(0,4))}"`)}function tie(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function rie(t){let e=t[0],r=e8.get(e);if(r)throw _h(`leading ${r}`);let n=t.length,s=-1;for(let i=1;ie&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let s=0,i=t.length;for(let o=0;o{let i=$se(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=uie(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(tie(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))eie(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(Ec.has(u[0]))throw _h("leading combining mark");for(let p=1;po.has(a)):mg(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>A0(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function aie(t){let e=Bu;for(let r of t){let n=e.filter(s=>A0(s,r));if(!n.length)throw Bu.some(s=>A0(s,r))?T7(e[0],r):A7(r);if(e=n,n.length==1)break}return e}function cie(t){return t.map(({input:e,error:r,output:n})=>{if(r){let s=r.message;throw new Error(t.length==1?s:`Invalid label ${sS(zv(e,63))}: ${s}`)}return Xf(n)}).join(b7)}function A7(t){return new Error(`disallowed character: ${nS(t)}`)}function T7(t,e){let r=nS(e),n=Bu.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function _h(t){return new Error(`illegal placement: ${t}`)}function lie(t,e){for(let r of e)if(!A0(t,r))throw T7(t,r);if(t.M){let r=x7(e);for(let n=1,s=r.length;nt8)throw new Error(`excessive non-spacing marks: ${sS(zv(r.slice(n-1,i)))} (${i-n}/${t8})`);n=i}}}function uie(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=die(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(cc.has(o))s.push(o);else{let a=y2.get(o);if(a)s.push(...a);else if(!C7.has(o))throw A7(o)}}}return s.length&&n.push(e(s)),n}function fie(t){return t.filter(e=>e!=w7)}function die(t,e){let r=v2,n,s=t.length;for(;s&&(r=r.get(t[--s]),!!r);){let{V:i}=r;i&&(n=i,t.length=s)}return n}const I7=new Uint8Array(32);I7.fill(0);function i8(t){return I(t.length!==0,"invalid ENS name; empty component","comp",t),t}function iS(t){const e=xt(P7(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s{I(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Qx(t,e){return{address:Ae(t),storageKeys:e.map((r,n)=>(I(Ke(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function wo(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(I(r.length===2,"invalid slot set",`value[${n}]`,r),Qx(r[0],r[1])):(I(r!=null&&typeof r=="object","invalid address-slot set","value",t),Qx(r.address,r.storageKeys)));I(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return Qx(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function Ad(t){let e;return typeof t=="string"?e=Ms.computePublicKey(t,!1):e=t.publicKey,Ae(De("0x"+e.substring(4)).substring(26))}function ed(t,e){return Ad(Ms.recoverPublicKey(t,e))}const Xt=BigInt(0),pie=BigInt(2),yie=BigInt(27),gie=BigInt(28),vie=BigInt(35),mie=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Jx=4096*32;function o8(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=Jr(e).substring(4),"0x"+r}function Hv(t){return t==="0x"?null:Ae(t)}function oS(t,e){try{return wo(t)}catch(r){I(!1,r.message,e,t)}}function T1(t,e){return t==="0x"?0:Pe(t,e)}function Bt(t,e){if(t==="0x")return Xt;const r=xe(t,e);return I(r<=mie,"value exceeds uint size",e,r),r}function gt(t,e){const r=xe(t,"value"),n=nr(r);return I(n.length<=32,"value too large",`tx.${e}`,r),n}function aS(t){return wo(t).map(e=>[e.address,e.storageKeys])}function xie(t,e){I(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;rs.data),r.map(s=>s.commitment),r.map(s=>s.proof)])]):Ue(["0x03",Ba(n)])}var Xs,ef,tf,rf,nf,sf,of,af,cf,lf,uf,ff,Lc,Go,Fi,qo,df,ny;const _i=class _i{constructor(){j(this,df);j(this,Xs);j(this,ef);j(this,tf);j(this,rf);j(this,nf);j(this,sf);j(this,of);j(this,af);j(this,cf);j(this,lf);j(this,uf);j(this,ff);j(this,Lc);j(this,Go);j(this,Fi);j(this,qo);T(this,Xs,null),T(this,ef,null),T(this,rf,0),T(this,nf,Xt),T(this,sf,null),T(this,of,null),T(this,af,null),T(this,tf,"0x"),T(this,cf,Xt),T(this,lf,Xt),T(this,uf,null),T(this,ff,null),T(this,Lc,null),T(this,Go,null),T(this,qo,null),T(this,Fi,null)}get type(){return w(this,Xs)}set type(e){switch(e){case null:T(this,Xs,null);break;case 0:case"legacy":T(this,Xs,0);break;case 1:case"berlin":case"eip-2930":T(this,Xs,1);break;case 2:case"london":case"eip-1559":T(this,Xs,2);break;case 3:case"cancun":case"eip-4844":T(this,Xs,3);break;default:I(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=w(this,ef);return e==null&&this.type===3?wi:e}set to(e){T(this,ef,e==null?null:Ae(e))}get nonce(){return w(this,rf)}set nonce(e){T(this,rf,Pe(e,"value"))}get gasLimit(){return w(this,nf)}set gasLimit(e){T(this,nf,xe(e))}get gasPrice(){const e=w(this,sf);return e==null&&(this.type===0||this.type===1)?Xt:e}set gasPrice(e){T(this,sf,e==null?null:xe(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=w(this,of);return e??(this.type===2||this.type===3?Xt:null)}set maxPriorityFeePerGas(e){T(this,of,e==null?null:xe(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=w(this,af);return e??(this.type===2||this.type===3?Xt:null)}set maxFeePerGas(e){T(this,af,e==null?null:xe(e,"maxFeePerGas"))}get data(){return w(this,tf)}set data(e){T(this,tf,z(e))}get value(){return w(this,cf)}set value(e){T(this,cf,xe(e,"value"))}get chainId(){return w(this,lf)}set chainId(e){T(this,lf,xe(e))}get signature(){return w(this,uf)||null}set signature(e){T(this,uf,e==null?null:us.from(e))}get accessList(){const e=w(this,ff)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){T(this,ff,e==null?null:wo(e))}get maxFeePerBlobGas(){const e=w(this,Lc);return e==null&&this.type===3?Xt:e}set maxFeePerBlobGas(e){T(this,Lc,e==null?null:xe(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=w(this,Go);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){I(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;rObject.assign({},e))}set blobs(e){if(e==null){T(this,qo,null);return}const r=[],n=[];for(let s=0;s=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=w(this,Lc)!=null||w(this,Go);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&H(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),H(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),H(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return _i.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new _i;if(typeof e=="string"){const n=Q(e);if(n[0]>=127)return _i.from(bie(n));switch(n[0]){case 1:return _i.from(kie(n));case 2:return _i.from(Eie(n));case 3:return _i.from(Aie(n))}H(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new _i;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=us.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(I(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),I(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(I(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),I(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Xs=new WeakMap,ef=new WeakMap,tf=new WeakMap,rf=new WeakMap,nf=new WeakMap,sf=new WeakMap,of=new WeakMap,af=new WeakMap,cf=new WeakMap,lf=new WeakMap,uf=new WeakMap,ff=new WeakMap,Lc=new WeakMap,Go=new WeakMap,Fi=new WeakMap,qo=new WeakMap,df=new WeakSet,ny=function(e,r){H(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return wie(this,n);case 1:return Sie(this,n);case 2:return Cie(this,n);case 3:return Tie(this,n,r?this.blobs:null)}H(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let bl=_i;function Gv(t){return typeof t=="string"&&(t=xt(t)),De(Ue([xt(s7),xt(String(t.length)),t]))}function R7(t,e){const r=Gv(t);return ed(r,e)}const Iie=new RegExp("^bytes([0-9]+)$"),Pie=new RegExp("^(u?int)([0-9]*)$"),Oie=new RegExp("^(.*)\\[([0-9]*)\\]$");function N7(t,e,r){switch(t){case"address":return Q(r?is(e,32):Ae(e));case"string":return xt(e);case"bytes":return Q(e);case"bool":return e=e?"0x01":"0x00",Q(r?is(e,32):e)}let n=t.match(Pie);if(n){let s=n[1]==="int",i=parseInt(n[2]||"256");return I((!n[2]||n[2]===String(i))&&i%8===0&&i!==0&&i<=256,"invalid number type","type",t),r&&(i=256),s&&(e=Fv(e,i)),Q(is(nr(e),i/8))}if(n=t.match(Iie),n){const s=parseInt(n[1]);return I(String(s)===n[1]&&s!==0&&s<=32,"invalid bytes type","type",t),I(ka(e)===s,`invalid value for ${t}`,"value",e),r?Q(Lv(e,32)):e}if(n=t.match(Oie),n&&Array.isArray(e)){const s=n[1],i=parseInt(n[2]||String(e.length));I(i===e.length,`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(N7(s,a,!0))}),Q(Ue(o))}I(!1,"invalid type","type",t)}function Le(t,e){I(t.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(N7(n,e[s]))}),z(Ue(r))}function io(t,e){return De(Le(t,e))}function Rie(t,e){return Jr(Le(t,e))}const _7=new Uint8Array(32);_7.fill(0);const Nie=BigInt(-1),M7=BigInt(0),D7=BigInt(1),_ie=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Mie(t){const e=Q(t),r=e.length%32;return r?Ue([e,_7.slice(r)]):z(e)}const Die=Rn(D7,32),Bie=Rn(M7,32),a8={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Yx=["name","version","chainId","verifyingContract","salt"];function c8(t){return function(e){return I(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Lie={name:c8("name"),version:c8("version"),chainId:function(t){const e=xe(t,"domain.chainId");return I(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):gr(e)},verifyingContract:function(t){try{return Ae(t).toLowerCase()}catch{}I(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Q(t,"domain.salt");return I(e.length===32,'invalid domain value "salt"',"domain.salt",t),z(e)}};function Xx(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);I(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const s=da(_ie,r?n-1:n),i=r?(s+D7)*Nie:M7;return function(o){const a=xe(o,"value");return I(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),Rn(r?Fv(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return I(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const s=Q(n);return I(s.length===r,`invalid length for ${t}`,"value",n),Mie(n)}}}switch(t){case"address":return function(e){return is(Ae(e),32)};case"bool":return function(e){return e?Die:Bie};case"bytes":return function(e){return De(e)};case"string":return function(e){return Br(e)}}return null}function l8(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function Cp(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var H0,Ui,hf,Fg,B7;const zn=class zn{constructor(e){j(this,Fg);_(this,"primaryType");j(this,H0);j(this,Ui);j(this,hf);T(this,Ui,new Map),T(this,hf,new Map);const r=new Map,n=new Map,s=new Map,i={};Object.keys(e).forEach(c=>{i[c]=e[c].map(({name:l,type:u})=>{let{base:f,index:d}=Cp(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(d||"")}}),r.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),T(this,H0,JSON.stringify(i));for(const c in i){const l=new Set;for(const u of i[c]){I(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const f=Cp(u.type).base;I(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!Xx(f)&&(I(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),r.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);I(o.length!==0,"missing primary type","types",e),I(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),fe(this,{primaryType:o[0]});function a(c,l){I(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const f of l)s.get(f).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of s){const u=Array.from(l);u.sort(),w(this,Ui).set(c,l8(c,i[c])+u.map(f=>l8(f,i[f])).join(""))}}get types(){return JSON.parse(w(this,H0))}getEncoder(e){let r=w(this,hf).get(e);return r||(r=Y(this,Fg,B7).call(this,e),w(this,hf).set(e,r)),r}encodeType(e){const r=w(this,Ui).get(e);return I(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return De(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Xx(e))return n(e,r);const s=Cp(e).array;if(s)return I(s.count===-1||s.count===r.length,`array length mismatch; expected length ${s.count}`,"value",r),r.map(o=>this._visit(s.prefix,o,n));const i=this.types[e];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});I(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new zn(e)}static getPrimaryType(e){return zn.from(e).primaryType}static hashStruct(e,r,n){return zn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const s=a8[n];I(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Yx.indexOf(n.name)-Yx.indexOf(s.name)),zn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Ue(["0x1901",zn.hashDomain(e),zn.from(r).hash(n)])}static hash(e,r,n){return De(zn.encode(e,r,n))}static async resolveNames(e,r,n,s){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const i={};e.verifyingContract&&!Ke(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=zn.from(r);o.visit(n,(a,c)=>(a==="address"&&!Ke(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}}static getPayload(e,r,n){zn.hashDomain(e);const s={},i=[];Yx.forEach(c=>{const l=e[c];l!=null&&(s[c]=Lie[c](l),i.push({name:c,type:a8[c]}))});const o=zn.from(r);r=o.types;const a=Object.assign({},r);return I(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return z(Q(l));if(c.match(/^u?int/))return xe(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return I(typeof l=="string","invalid string","value",l),l}I(!1,"unsupported type","type",c)})}}};H0=new WeakMap,Ui=new WeakMap,hf=new WeakMap,Fg=new WeakSet,B7=function(e){{const s=Xx(e);if(s)return s}const r=Cp(e).array;if(r){const s=r.prefix,i=this.getEncoder(s);return o=>{I(r.count===-1||r.count===o.length,`array length mismatch; expected length ${r.count}`,"value",o);let a=o.map(i);return w(this,Ui).has(s)&&(a=a.map(De)),De(Ue(a))}}const n=this.types[e];if(n){const s=Br(w(this,Ui).get(e));return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return w(this,Ui).has(c)?De(l):l});return o.unshift(s),Ue(o)}}I(!1,`unknown type: ${e}`,"type",e)};let js=zn;function jie(t,e,r,n){return ed(js.hash(t,e,r),n)}function qr(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const Fie="external public payable override",Uie=qr(Fie.split(" ")),L7="constant external internal payable private public pure view override",$ie=qr(L7.split(" ")),j7="constructor error event fallback function receive struct",F7=qr(j7.split(" ")),U7="calldata memory storage payable indexed",Wie=qr(U7.split(" ")),Vie="tuple returns",zie=[j7,U7,Vie,L7].join(" "),Hie=qr(zie.split(" ")),Gie={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},qie=new RegExp("^(\\s*)"),Kie=new RegExp("^([0-9]+)"),Qie=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),$7=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),W7=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var dr,Es,G0,m2;const Ug=class Ug{constructor(e){j(this,G0);j(this,dr);j(this,Es);T(this,dr,0),T(this,Es,e.slice())}get offset(){return w(this,dr)}get length(){return w(this,Es).length-w(this,dr)}clone(){return new Ug(w(this,Es))}reset(){T(this,dr,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=Y(this,G0,m2).call(this,w(this,dr)+1,e.match+1);return T(this,dr,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;w(this,dr)=w(this,Es).length)throw new Error("out-of-bounds");return w(this,Es)[w(this,dr)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return _l(this,dr)._++,e}toString(){const e=[];for(let r=w(this,dr);r`}};dr=new WeakMap,Es=new WeakMap,G0=new WeakSet,m2=function(e=0,r=0){return new Ug(w(this,Es).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Fs=Ug;function Ja(t){const e=[],r=o=>{const a=i0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Pe(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(Qie),a){if(c.text=a[1],i+=c.text.length,Hie.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(W7)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Kie),a){c.text=a[1],c.type="NUMBER",i+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`)}return new Fs(e.map(o=>Object.freeze(o)))}function u8(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function qv(t,e){if(e.peekKeyword(F7)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function yo(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function V7(t){let e=yo(t,$ie);return u8(e,qr("constant payable nonpayable".split(" "))),u8(e,qr("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function oo(t,e){return t.popParams().map(r=>cr.from(r,e))}function z7(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return xe(t.pop().text);throw new Error("invalid gas")}return null}function wl(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Jie=new RegExp(/^(.*)\[([0-9]*)\]$/);function f8(t){const e=t.match(W7);if(I(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);I(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);I(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Et={},yn=Symbol.for("_ethers_internal"),d8="_ParamTypeInternal",h8="_ErrorInternal",p8="_EventInternal",y8="_ConstructorInternal",g8="_FallbackInternal",v8="_FunctionInternal",m8="_StructInternal";var pf,sy;const Hn=class Hn{constructor(e,r,n,s,i,o,a,c){j(this,pf);_(this,"name");_(this,"type");_(this,"baseType");_(this,"indexed");_(this,"components");_(this,"arrayLength");_(this,"arrayChildren");if(xo(e,Et,"ParamType"),Object.defineProperty(this,yn,{value:d8}),o&&(o=Object.freeze(o.slice())),s==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(s==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");fe(this,{name:r,type:n,baseType:s,indexed:i,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const s={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(s.indexed=this.indexed),this.isTuple()&&(s.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(s)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(s=>n.arrayChildren.walk(s,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((s,i)=>n.components[i].walk(s,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],s=[e];return Y(this,pf,sy).call(this,n,e,r,i=>{s[0]=i}),n.length&&await Promise.all(n),s[0]}static from(e,r){if(Hn.isParamType(e))return e;if(typeof e=="string")try{return Hn.from(Ja(e),r)}catch{I(!1,"invalid param type","obj",e)}else if(e instanceof Fs){let a="",c="",l=null;yo(e,qr(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(p=>Hn.from(p)),a=`tuple(${l.map(p=>p.format()).join(",")})`):(a=f8(e.popType("TYPE")),c=a);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new Hn(Et,"",a,c,null,l,f,u),f=p.value,a+=p.text,c="array",l=null}let d=null;if(yo(e,Wie).has("indexed")){if(!r)throw new Error("");d=!0}const y=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Hn(Et,y,a,c,d,l,f,u)}const n=e.name;I(!n||typeof n=="string"&&n.match($7),"invalid name","obj.name",n);let s=e.indexed;s!=null&&(I(r,"parameter cannot be indexed","obj.indexed",e.indexed),s=!!s);let i=e.type,o=i.match(Jie);if(o){const a=parseInt(o[2]||"-1"),c=Hn.from({type:o[1],components:e.components});return new Hn(Et,n||"",i,"array",s,null,a,c)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const a=e.components!=null?e.components.map(l=>Hn.from(l)):null;return new Hn(Et,n||"",i,"tuple",s,a,null,null)}return i=f8(e.type),new Hn(Et,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[yn]===d8}};pf=new WeakSet,sy=function(e,r,n,s){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=r.slice();a.forEach((c,l)=>{var u;Y(u=o,pf,sy).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(r))a=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var u;Y(u=o[l],pf,sy).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}const i=n(this.type,r);i.then?e.push(async function(){s(await i)}()):s(i)};let cr=Hn;class La{constructor(e,r,n){_(this,"type");_(this,"inputs");xo(e,Et,"Fragment"),n=Object.freeze(n.slice()),fe(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{La.from(JSON.parse(e))}catch{}return La.from(Ja(e))}if(e instanceof Fs)switch(e.peekKeyword(F7)){case"constructor":return ui.from(e);case"error":return Hr.from(e);case"event":return Is.from(e);case"fallback":case"receive":return oi.from(e);case"function":return Ps.from(e);case"struct":return Sa.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return ui.from(e);case"error":return Hr.from(e);case"event":return Is.from(e);case"fallback":case"receive":return oi.from(e);case"function":return Ps.from(e);case"struct":return Sa.from(e)}H(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}I(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return ui.isFragment(e)}static isError(e){return Hr.isFragment(e)}static isEvent(e){return Is.isFragment(e)}static isFunction(e){return Ps.isFragment(e)}static isStruct(e){return Sa.isFragment(e)}}class I1 extends La{constructor(r,n,s,i){super(r,n,i);_(this,"name");I(typeof s=="string"&&s.match($7),"invalid identifier","name",s),i=Object.freeze(i.slice()),fe(this,{name:s})}}function T0(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class Hr extends I1{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,yn,{value:h8})}get selector(){return Br(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+T0(e,this.inputs)),r.join(" ")}static from(e){if(Hr.isFragment(e))return e;if(typeof e=="string")return Hr.from(Ja(e));if(e instanceof Fs){const r=qv("error",e),n=oo(e);return wl(e),new Hr(Et,r,n)}return new Hr(Et,e.name,e.inputs?e.inputs.map(cr.from):[])}static isFragment(e){return e&&e[yn]===h8}}class Is extends I1{constructor(r,n,s,i){super(r,"event",n,s);_(this,"anonymous");Object.defineProperty(this,yn,{value:p8}),fe(this,{anonymous:i})}get topicHash(){return Br(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+T0(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(i=>cr.from(i)),new Is(Et,r,n,!1).topicHash}static from(r){if(Is.isFragment(r))return r;if(typeof r=="string")try{return Is.from(Ja(r))}catch{I(!1,"invalid event fragment","obj",r)}else if(r instanceof Fs){const n=qv("event",r),s=oo(r,!0),i=!!yo(r,qr(["anonymous"])).has("anonymous");return wl(r),new Is(Et,n,s,i)}return new Is(Et,r.name,r.inputs?r.inputs.map(n=>cr.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[yn]===p8}}class ui extends La{constructor(r,n,s,i,o){super(r,n,s);_(this,"payable");_(this,"gas");Object.defineProperty(this,yn,{value:y8}),fe(this,{payable:i,gas:o})}format(r){if(H(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[`constructor${T0(r,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(ui.isFragment(r))return r;if(typeof r=="string")try{return ui.from(Ja(r))}catch{I(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Fs){yo(r,qr(["constructor"]));const n=oo(r),s=!!yo(r,Uie).has("payable"),i=z7(r);return wl(r),new ui(Et,"constructor",n,s,i)}return new ui(Et,"constructor",r.inputs?r.inputs.map(cr.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[yn]===y8}}class oi extends La{constructor(r,n,s){super(r,"fallback",n);_(this,"payable");Object.defineProperty(this,yn,{value:g8}),fe(this,{payable:s})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const s=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:s})}return`${n}()${this.payable?" payable":""}`}static from(r){if(oi.isFragment(r))return r;if(typeof r=="string")try{return oi.from(Ja(r))}catch{I(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Fs){const n=r.toString(),s=r.peekKeyword(qr(["fallback","receive"]));if(I(s,"type must be fallback or receive","obj",n),r.popKeyword(qr(["fallback","receive"]))==="receive"){const c=oo(r);return I(c.length===0,"receive cannot have arguments","obj.inputs",c),yo(r,qr(["payable"])),wl(r),new oi(Et,[],!0)}let o=oo(r);o.length?I(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[cr.from("bytes")];const a=V7(r);if(I(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),yo(r,qr(["returns"])).has("returns")){const c=oo(r);I(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return wl(r),new oi(Et,o,a==="payable")}if(r.type==="receive")return new oi(Et,[],!0);if(r.type==="fallback"){const n=[cr.from("bytes")],s=r.stateMutability==="payable";return new oi(Et,n,s)}I(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[yn]===g8}}class Ps extends I1{constructor(r,n,s,i,o,a){super(r,"function",n,i);_(this,"constant");_(this,"outputs");_(this,"stateMutability");_(this,"payable");_(this,"gas");Object.defineProperty(this,yn,{value:v8}),o=Object.freeze(o.slice()),fe(this,{constant:s==="view"||s==="pure",gas:a,outputs:o,payable:s==="payable",stateMutability:s})}get selector(){return Br(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r))),outputs:this.outputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+T0(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(T0(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(i=>cr.from(i)),new Ps(Et,r,"view",n,[],null).selector}static from(r){if(Ps.isFragment(r))return r;if(typeof r=="string")try{return Ps.from(Ja(r))}catch{I(!1,"invalid function fragment","obj",r)}else if(r instanceof Fs){const s=qv("function",r),i=oo(r),o=V7(r);let a=[];yo(r,qr(["returns"])).has("returns")&&(a=oo(r));const c=z7(r);return wl(r),new Ps(Et,s,o,i,a,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new Ps(Et,r.name,n,r.inputs?r.inputs.map(cr.from):[],r.outputs?r.outputs.map(cr.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[yn]===v8}}class Sa extends I1{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,yn,{value:m8})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return Sa.from(Ja(e))}catch{I(!1,"invalid struct fragment","obj",e)}else if(e instanceof Fs){const r=qv("struct",e),n=oo(e);return wl(e),new Sa(Et,r,n)}return new Sa(Et,e.name,e.inputs?e.inputs.map(cr.from):[])}static isFragment(e){return e&&e[yn]===m8}}const Ws=new Map;Ws.set(0,"GENERIC_PANIC");Ws.set(1,"ASSERT_FALSE");Ws.set(17,"OVERFLOW");Ws.set(18,"DIVIDE_BY_ZERO");Ws.set(33,"ENUM_RANGE_ERROR");Ws.set(34,"BAD_STORAGE_DATA");Ws.set(49,"STACK_UNDERFLOW");Ws.set(50,"ARRAY_RANGE_ERROR");Ws.set(65,"OUT_OF_MEMORY");Ws.set(81,"UNINITIALIZED_FUNCTION_CALL");const Yie=new RegExp(/^bytes([0-9]*)$/),Xie=new RegExp(/^(u?int)([0-9]*)$/);let Zx=null,x8=1024;function Zie(t,e,r,n){let s="missing revert data",i=null;const o=null;let a=null;if(r){s="execution reverted";const l=Q(r);if(r=z(r),l.length===0)s+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)s+=" (could not decode reason; invalid data length)";else if(z(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[i]},s+=`: ${JSON.stringify(i)}`}catch{s+=" (could not decode reason; invalid string data)"}else if(z(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},i=`Panic due to ${Ws.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Ae(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Ae(e.from)),pt(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var Ko,Yl;const $g=class $g{constructor(){j(this,Ko)}getDefaultValue(e){const r=e.map(s=>Y(this,Ko,Yl).call(this,cr.from(s)));return new Ep(r,"_").defaultValue()}encode(e,r){Lk(r.length,e.length,"types/values length mismatch");const n=e.map(o=>Y(this,Ko,Yl).call(this,cr.from(o))),s=new Ep(n,"_"),i=new i2;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>Y(this,Ko,Yl).call(this,cr.from(o)));return new Ep(s,"_").decode(new o2(r,n,x8))}static _setDefaultMaxInflation(e){I(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),x8=e}static defaultAbiCoder(){return Zx==null&&(Zx=new $g),Zx}static getBuiltinCallException(e,r,n){return Zie(e,r,n,$g.defaultAbiCoder())}};Ko=new WeakSet,Yl=function(e){if(e.isArray())return new bse(Y(this,Ko,Yl).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Ep(e.components.map(n=>Y(this,Ko,Yl).call(this,n)),e.name);switch(e.baseType){case"address":return new mse(e.name);case"bool":return new wse(e.name);case"string":return new Ose(e.name);case"bytes":return new Ese(e.name);case"":return new Sse(e.name)}let r=e.type.match(Xie);if(r){let n=parseInt(r[2]||"256");return I(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new Pse(n/8,r[1]==="int",e.name)}if(r=e.type.match(Yie),r){let n=parseInt(r[1]);return I(n!==0&&n<=32,"invalid bytes length","param",e),new Cse(n,e.name)}I(!1,"invalid type","type",e.type)};let Kt=$g;function eoe(t){const e=xt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Lv(e,32)}function toe(t){const e=Q(t,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Ls(e.slice(0,r))}class H7{constructor(e,r,n){_(this,"fragment");_(this,"name");_(this,"signature");_(this,"topic");_(this,"args");const s=e.name,i=e.format();fe(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class G7{constructor(e,r,n,s){_(this,"fragment");_(this,"name");_(this,"args");_(this,"signature");_(this,"selector");_(this,"value");const i=e.name,o=e.format();fe(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class q7{constructor(e,r,n){_(this,"fragment");_(this,"name");_(this,"args");_(this,"signature");_(this,"selector");const s=e.name,i=e.format();fe(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class x2{constructor(e){_(this,"hash");_(this,"_isIndexed");fe(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const b8={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},w8={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&b8[t.toString()]&&(e=b8[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Zs,ei,ti,Ir,vi,iy,oy;const gc=class gc{constructor(e){j(this,vi);_(this,"fragments");_(this,"deploy");_(this,"fallback");_(this,"receive");j(this,Zs);j(this,ei);j(this,ti);j(this,Ir);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,T(this,ti,new Map),T(this,Zs,new Map),T(this,ei,new Map);const n=[];for(const o of r)try{n.push(La.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}fe(this,{fragments:Object.freeze(n)});let s=null,i=!1;T(this,Ir,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}fe(this,{deploy:o});return;case"fallback":o.inputs.length===0?i=!0:(I(!s||o.payable!==s.payable,"conflicting fallback fragments",`fragments[${a}]`,o),s=o,i=s.payable);return;case"function":c=w(this,ti);break;case"event":c=w(this,ei);break;case"error":c=w(this,Zs);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||fe(this,{deploy:ui.from("constructor()")}),fe(this,{fallback:s,receive:i})}format(e){const r=e?"minimal":"full";return this.fragments.map(s=>s.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return Kt.defaultAbiCoder()}getFunctionName(e){const r=Y(this,vi,iy).call(this,e,null,!1);return I(r,"no matching function","key",e),r.name}hasFunction(e){return!!Y(this,vi,iy).call(this,e,null,!1)}getFunction(e,r){return Y(this,vi,iy).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(w(this,ti).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;nn.localeCompare(s));for(let n=0;n1){const i=s.map(o=>JSON.stringify(o.format())).join(", ");I(!1,`ambiguous error description (i.e. ${i})`,"name",e)}return s[0]}if(e=Hr.from(e).format(),e==="Error(string)")return Hr.from("error Error(string)");if(e==="Panic(uint256)")return Hr.from("error Panic(uint256)");const n=w(this,Zs).get(e);return n||null}forEachError(e){const r=Array.from(w(this,Zs).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Br(o):i.type==="bytes"?De(z(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=Rn(o):i.type.match(/^bytes/)?o=Lv(o,32):i.type==="address"&&w(this,Ir).encode(["address"],[o]),is(z(o),32));for(r.forEach((i,o)=>{const a=e.inputs[o];if(!a.indexed){I(i==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?I(!1,"filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);I(o,"unknown event","eventFragment",e),e=o}const n=[],s=[],i=[];return e.anonymous||n.push(e.topicHash),I(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Br(c));else if(o.type==="bytes")n.push(De(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(w(this,Ir).encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:w(this,Ir).encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const h=this.getEvent(e);I(h,"unknown event","eventFragment",e),e=h}if(n!=null&&!e.anonymous){const h=e.topicHash;I(Ke(n[0],32)&&n[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const s=[],i=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(s.push(cr.from({type:"bytes32",name:h.name})),o.push(!0)):(s.push(h),o.push(!1)):(i.push(h),o.push(!1))});const a=n!=null?w(this,Ir).decode(s,Ue(n)):null,c=w(this,Ir).decode(i,r,!0),l=[],u=[];let f=0,d=0;return e.inputs.forEach((h,y)=>{let p=null;if(h.indexed)if(a==null)p=new x2(null);else if(o[y])p=new x2(a[d++]);else try{p=a[d++]}catch(b){p=b}else try{p=c[f++]}catch(b){p=b}l.push(p),u.push(h.name||null)}),ml.fromItems(l,u)}parseTransaction(e){const r=Q(e.data,"tx.data"),n=xe(e.value!=null?e.value:0,"tx.value"),s=this.getFunction(z(r.slice(0,4)));if(!s)return null;const i=w(this,Ir).decode(s.inputs,r.slice(4));return new G7(s,s.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new H7(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=z(e),n=this.getError(ct(r,0,4));if(!n)return null;const s=w(this,Ir).decode(n.inputs,ct(r,4));return new q7(n,n.selector,s)}static from(e){return e instanceof gc?e:typeof e=="string"?new gc(JSON.parse(e)):typeof e.formatJson=="function"?new gc(e.formatJson()):typeof e.format=="function"?new gc(e.format("json")):new gc(e)}};Zs=new WeakMap,ei=new WeakMap,ti=new WeakMap,Ir=new WeakMap,vi=new WeakSet,iy=function(e,r,n){if(Ke(e)){const i=e.toLowerCase();for(const o of w(this,ti).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of w(this,ti))o.split("(")[0]===e&&i.push(a);if(r){const o=r.length>0?r[r.length-1]:null;let a=r.length,c=!0;xr.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=i.length-1;l>=0;l--){const u=i[l].inputs.length;u!==a&&(!c||u!==a-1)&&i.splice(l,1)}for(let l=i.length-1;l>=0;l--){const u=i[l].inputs;for(let f=0;f=u.length){if(r[f].type==="overrides")continue;i.splice(l,1);break}if(r[f].type!==u[f].baseType){i.splice(l,1);break}}}}if(i.length===1&&r&&r.length!==i[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");I(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return i[0]}const s=w(this,ti).get(Ps.from(e).format());return s||null},oy=function(e,r,n){if(Ke(e)){const i=e.toLowerCase();for(const o of w(this,ei).values())if(i===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of w(this,ei))o.split("(")[0]===e&&i.push(a);if(r){for(let o=i.length-1;o>=0;o--)i[o].inputs.length=0;o--){const a=i[o].inputs;for(let c=0;c1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");I(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return i[0]}const s=w(this,ei).get(Is.from(e).format());return s||null};let ft=gc;const K7=BigInt(0);function Lu(t){return t??null}function _t(t){return t==null?null:t.toString()}class b2{constructor(e,r,n){_(this,"gasPrice");_(this,"maxFeePerGas");_(this,"maxPriorityFeePerGas");fe(this,{gasPrice:Lu(e),maxFeePerGas:Lu(r),maxPriorityFeePerGas:Lu(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:_t(e),maxFeePerGas:_t(r),maxPriorityFeePerGas:_t(n)}}}function td(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=z(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const s of r)!(s in t)||t[s]==null||(e[s]=xe(t[s],`request.${s}`));const n="type,nonce".split(/,/);for(const s of n)!(s in t)||t[s]==null||(e[s]=Pe(t[s],`request.${s}`));return t.accessList&&(e.accessList=wo(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(s=>bi(s)?z(s):Object.assign({},s))),e}var $i;class Q7{constructor(e,r){_(this,"provider");_(this,"number");_(this,"hash");_(this,"timestamp");_(this,"parentHash");_(this,"parentBeaconBlockRoot");_(this,"nonce");_(this,"difficulty");_(this,"gasLimit");_(this,"gasUsed");_(this,"stateRoot");_(this,"receiptsRoot");_(this,"blobGasUsed");_(this,"excessBlobGas");_(this,"miner");_(this,"prevRandao");_(this,"extraData");_(this,"baseFeePerGas");j(this,$i);T(this,$i,e.transactions.map(n=>typeof n!="string"?new rd(n,r):n)),fe(this,{provider:r,hash:Lu(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Lu(e.prevRandao),extraData:e.extraData,baseFeePerGas:Lu(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return w(this,$i).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=w(this,$i).slice();return e.length===0?[]:(H(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:s,gasUsed:i,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:y,timestamp:p,transactions:b}=this;return{_type:"Block",baseFeePerGas:_t(e),difficulty:_t(r),extraData:n,gasLimit:_t(s),gasUsed:_t(i),blobGasUsed:_t(this.blobGasUsed),excessBlobGas:_t(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,timestamp:p,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:y,transactions:b}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew Td(s,r))));let n=K7;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),fe(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return w(this,q0)}toJSON(){const{to:e,from:r,contractAddress:n,hash:s,index:i,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:_t(this.cumulativeGasUsed),from:r,gasPrice:_t(this.gasPrice),blobGasUsed:_t(this.blobGasUsed),blobGasPrice:_t(this.blobGasPrice),gasUsed:_t(this.gasUsed),hash:s,index:i,logs:l,logsBloom:c,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:d,nonce:h}=await Pt({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h{if(d==null||d.status!==0)return d;H(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const y=[],p=()=>{y.forEach(g=>g())};if(y.push(()=>{a=!0}),s>0){const g=setTimeout(()=>{p(),h(pt("wait for transaction timeout","TIMEOUT"))},s);y.push(()=>{clearTimeout(g)})}const b=async g=>{if(await g.confirmations()>=n){p();try{d(l(g))}catch(v){h(v)}}};if(y.push(()=>{this.provider.off(this.hash,b)}),this.provider.on(this.hash,b),i>=0){const g=async()=>{try{await c()}catch(v){if(Ut(v,"TRANSACTION_REPLACED")){p(),h(v);return}}a||this.provider.once("block",g)};y.push(()=>{this.provider.off("block",g)}),this.provider.once("block",g)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return H(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Y7(this)}reorderedEvent(e){return H(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),H(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),J7(this,e)}replaceableTransaction(e){I(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new mA(this,this.provider);return T(r,Qo,e),r}};Qo=new WeakMap;let rd=mA;function roe(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function J7(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function Y7(t){return{orphan:"drop-transaction",tx:t}}function noe(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class Kv extends Td{constructor(r,n,s){super(r,r.provider);_(this,"interface");_(this,"fragment");_(this,"args");const i=n.decodeEventLog(s,r.data,r.topics);fe(this,{args:i,fragment:s,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class uS extends Td{constructor(r,n){super(r,r.provider);_(this,"error");fe(this,{error:n})}}var yf;class X7 extends lS{constructor(r,n,s){super(s,n);j(this,yf);T(this,yf,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?w(this,yf).getEvent(r.topics[0]):null;if(n)try{return new Kv(r,w(this,yf),n)}catch(s){return new uS(r,s)}return r})}}yf=new WeakMap;var K0;class Qv extends rd{constructor(r,n,s){super(s,n);j(this,K0);T(this,K0,r)}async wait(r,n){const s=await super.wait(r,n);return s==null?null:new X7(w(this,K0),this.provider,s)}}K0=new WeakMap;class fS extends Uk{constructor(r,n,s,i){super(r,n,s);_(this,"log");fe(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class Z7 extends fS{constructor(e,r,n,s,i){super(e,r,n,new Kv(i,e.interface,s));const o=e.interface.decodeEventLog(s,this.log.data,this.log.topics);fe(this,{args:o,fragment:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const E8=BigInt(0);function e_(t){return t&&typeof t.call=="function"}function t_(t){return t&&typeof t.estimateGas=="function"}function Jv(t){return t&&typeof t.resolveName=="function"}function r_(t){return t&&typeof t.sendTransaction=="function"}function n_(t){if(t!=null){if(Jv(t))return t;if(t.provider)return t.provider}}var Q0;class soe{constructor(e,r,n){j(this,Q0);_(this,"fragment");if(fe(this,{fragment:r}),r.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(d=>ir(d,i))):ir(f,i):f)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return w(this,Q0)}}Q0=new WeakMap;function El(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function Cc(t){return t==null?null:t.provider||null}async function dS(t,e){const r=xr.dereference(t,"overrides");I(typeof r=="object","invalid overrides parameter","overrides",t);const n=td(r);return I(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),I(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function s_(t,e,r){const n=El(t,"resolveName"),s=Jv(n)?n:null;return await Promise.all(e.map((i,o)=>i.walkAsync(r[o],(a,c)=>(c=xr.dereference(c,a),a==="address"?ir(c,s):c))))}function ioe(t){const e=async function(o){const a=await dS(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await ir(a.from,n_(t.runner)));const c=t.interface,l=xe(a.value||E8,"overrides.value")===E8,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&I(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),I(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return I(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),I(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=El(t.runner,"call");H(e_(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw Bv(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;H(r_(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=Cc(t.runner);return new Qv(t.interface,l,c)},s=async function(o){const a=El(t.runner,"estimateGas");return H(t_(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},i=async o=>await n(o);return fe(i,{_contract:t,estimateGas:s,populateTransaction:e,send:n,staticCall:r}),i}function ooe(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return H(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let f={};if(u.inputs.length+1===l.length&&(f=await dS(l.pop()),f.from&&(f.from=await ir(f.from,n_(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await s_(t.runner,u.inputs,l);return Object.assign({},f,await Pt({to:t.getAddress(),data:t.interface.encodeFunctionData(u,d)}))},s=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},i=async function(...l){const u=t.runner;H(r_(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await n(...l)),d=Cc(t.runner);return new Qv(t.interface,d,f)},o=async function(...l){const u=El(t.runner,"estimateGas");return H(t_(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=El(t.runner,"call");H(e_(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let d="0x";try{d=await u.call(f)}catch(y){throw Bv(y)&&y.data?t.interface.makeError(y.data,f):y}const h=r(...l);return t.interface.decodeFunctionResult(h,d)},c=async(...l)=>r(...l).constant?await s(...l):await i(...l);return fe(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:i,staticCall:s,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return H(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function aoe(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return H(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new soe(t,r(...s),s)};return fe(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const s=t.interface.getEvent(e);return H(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const bg=Symbol.for("_ethersInternal_contract"),i_=new WeakMap;function coe(t,e){i_.set(t[bg],e)}function bn(t){return i_.get(t[bg])}function loe(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function hS(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(Ke(o,32))return o;const a=t.interface.getEvent(o);return I(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(i):i(o))}else e==="*"?r=[null]:typeof e=="string"?Ke(e,32)?r=[e]:(n=t.interface.getEvent(e),I(n,"unknown fragment","event",e),r=[n.topicHash]):loe(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):I(!1,"unknown event name","event",e);r=r.map(i=>{if(i==null)return null;if(Array.isArray(i)){const o=Array.from(new Set(i.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return i.toLowerCase()});const s=r.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:s,topics:r}}async function lh(t,e){const{subs:r}=bn(t);return r.get((await hS(t,e)).tag)||null}async function C8(t,e,r){const n=Cc(t.runner);H(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await hS(t,r),{addr:a,subs:c}=bn(t);let l=c.get(i);if(!l){const f={address:a||t,topics:o},d=b=>{let g=s;if(g==null)try{g=t.interface.getEvent(b.topics[0])}catch{}if(g){const v=g,m=s?t.interface.decodeEventLog(s,b.data,b.topics):[];E2(t,r,m,k=>new Z7(t,k,r,v,b))}else E2(t,r,[],v=>new fS(t,v,r,b))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(n.on(f,d))},stop:async()=>{if(h.length==0)return;let b=h;h=[],await Promise.all(b),n.off(f,d)}},c.set(i,l)}return l}let w2=Promise.resolve();async function uoe(t,e,r,n){await w2;const s=await lh(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),s.listeners.length===0&&(s.stop(),bn(t).subs.delete(s.tag)),i>0}async function E2(t,e,r,n){try{await w2}catch{}const s=uoe(t,e,r,n);return w2=s,await s}const kp=["then"];var d4;d4=bg;const Gh=class Gh{constructor(e,r,n,s){_(this,"target");_(this,"interface");_(this,"runner");_(this,"filters");_(this,d4);_(this,"fallback");I(typeof e=="string"||tS(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=ft.from(r);fe(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,bg,{value:{}});let o,a=null,c=null;if(s){const f=Cc(n);c=new Qv(this.interface,f,s)}let l=new Map;if(typeof e=="string")if(Ke(e))a=e,o=Promise.resolve(e);else{const f=El(n,"resolveName");if(!Jv(f))throw pt("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(d=>{if(d==null)throw pt("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return bn(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return bn(this).addr=f,f});coe(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(f,d,h)=>{if(typeof d=="symbol"||kp.indexOf(d)>=0)return Reflect.get(f,d,h);try{return this.getEvent(d)}catch(y){if(!Ut(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(f,d)=>kp.indexOf(d)>=0?Reflect.has(f,d):Reflect.has(f,d)||this.interface.hasEvent(String(d))});return fe(this,{filters:u}),fe(this,{fallback:i.receive||i.fallback?ioe(this):null}),new Proxy(this,{get:(f,d,h)=>{if(typeof d=="symbol"||d in f||kp.indexOf(d)>=0)return Reflect.get(f,d,h);try{return f.getFunction(d)}catch(y){if(!Ut(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(f,d)=>typeof d=="symbol"||d in f||kp.indexOf(d)>=0?Reflect.has(f,d):f.interface.hasFunction(d)})}connect(e){return new Gh(this.target,this.interface,e)}attach(e){return new Gh(e,this.interface,this.runner)}async getAddress(){return await bn(this).addrPromise}async getDeployedCode(){const e=Cc(this.runner);H(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=Cc(this.runner);return H(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((s,i)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return s(this);n.once("block",o)}catch(a){i(a)}};o()})}deploymentTransaction(){return bn(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),ooe(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),aoe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:s,addrPromise:i}=bn(this),o=s||await i,{fragment:a,topics:c}=await hS(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=Cc(this.runner);return H(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(f=>{let d=a;if(d==null)try{d=this.interface.getEvent(f.topics[0])}catch{}if(d)try{return new Kv(f,this.interface,d)}catch(h){return new uS(f,h)}return new Td(f,u)})}async on(e,r){const n=await C8(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await C8(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await E2(this,e,r,null)}async listenerCount(e){if(e){const s=await lh(this,e);return s?s.listeners.length:0}const{subs:r}=bn(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await lh(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=bn(this);let n=[];for(const{listeners:s}of r.values())n=n.concat(s.map(({listener:i})=>i));return n}async off(e,r){const n=await lh(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(r==null||n.listeners.length===0)&&(n.stop(),bn(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await lh(this,e);if(!r)return this;r.stop(),bn(this).subs.delete(r.tag)}else{const{subs:r}=bn(this);for(const{tag:n,stop:s}of r.values())s(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Gh{constructor(s,i=null){super(s,e,i)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};let nd=Gh;function foe(){return nd}class hn extends foe(){}class pS{constructor(e,r,n){_(this,"interface");_(this,"bytecode");_(this,"runner");const s=ft.from(e);r instanceof Uint8Array||(typeof r=="object"&&(r=r.object),r.startsWith("0x")||(r="0x"+r)),r=z(Q(r)),fe(this,{bytecode:r,interface:s,runner:n||null})}attach(e){return new nd(e,this.interface,this.runner)}async getDeployTransaction(...e){let r={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(r=await dS(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const s=await s_(this.runner,n.inputs,e),i=Ue([this.bytecode,this.interface.encodeDeploy(s)]);return Object.assign({},r,{data:i})}async deploy(...e){const r=await this.getDeployTransaction(...e);H(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(r),s=eS(n);return new nd(s,this.interface,this.runner,n)}connect(e){return new pS(this.interface,this.bytecode,e)}static fromSolidity(e,r){I(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let s="";return e.bytecode?s=e.bytecode:e.evm&&e.evm.bytecode&&(s=e.evm.bytecode),new this(n,s,r)}}function eb(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):I(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class o_{constructor(e){_(this,"name");fe(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const a_=new RegExp("^(ipfs)://(.*)$","i"),k8=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),a_,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Jo,jc,Yo,Xl,Wg,c_;const Eu=class Eu{constructor(e,r,n){j(this,Yo);_(this,"provider");_(this,"address");_(this,"name");j(this,Jo);j(this,jc);fe(this,{provider:e,address:r,name:n}),T(this,Jo,null),T(this,jc,new hn(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return w(this,Jo)==null&&T(this,Jo,(async()=>{try{return await w(this,jc).supportsInterface("0x9061b923")}catch(e){if(Ut(e,"CALL_EXCEPTION"))return!1;throw T(this,Jo,null),e}})()),await w(this,Jo)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await Y(this,Yo,Xl).call(this,"addr(bytes32)");return i==null||i===wi?null:i}catch(i){if(Ut(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let i=e+2147483648;const o=await Y(this,Yo,Xl).call(this,"addr(bytes32,uint)",[i]);if(Ke(o,20))return Ae(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof o_&&i.supportsCoinType(e)){r=i;break}if(r==null)return null;const n=await Y(this,Yo,Xl).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const s=await r.decodeAddress(e,n);if(s!=null)return s;H(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await Y(this,Yo,Xl).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Y(this,Yo,Xl).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=r[1]==="e3010170"?"ipfs":"ipns",i=parseInt(r[4],16);if(r[5].length===i*2)return`${s}://${Fk("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;H(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function P1(t,e){return r=>{const n={};for(const s in t){let i=s;if(e&&s in e&&!(i in r)){for(const o of e[s])if(o in r){i=o;break}}try{const o=t[s](r[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";H(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function doe(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}I(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function sd(t){return I(Ke(t,!0),"invalid data","value",t),t}function yr(t){return I(Ke(t,32),"invalid hash","value",t),t}const hoe=P1({address:Ae,blockHash:yr,blockNumber:Pe,data:sd,index:Pe,removed:He(doe,!1),topics:Yv(yr),transactionHash:yr,transactionIndex:Pe},{index:["logIndex"]});function poe(t){return hoe(t)}const yoe=P1({hash:He(yr),parentHash:yr,parentBeaconBlockRoot:He(yr,null),number:Pe,timestamp:Pe,nonce:He(sd),difficulty:xe,gasLimit:xe,gasUsed:xe,stateRoot:He(yr,null),receiptsRoot:He(yr,null),blobGasUsed:He(xe,null),excessBlobGas:He(xe,null),miner:He(Ae),prevRandao:He(yr,null),extraData:sd,baseFeePerGas:He(xe)},{prevRandao:["mixHash"]});function goe(t){const e=yoe(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:l_(r)),e}const voe=P1({transactionIndex:Pe,blockNumber:Pe,transactionHash:yr,address:Ae,topics:Yv(yr),data:sd,index:Pe,blockHash:yr},{index:["logIndex"]});function moe(t){return voe(t)}const xoe=P1({to:He(Ae,null),from:He(Ae,null),contractAddress:He(Ae,null),index:Pe,root:He(z),gasUsed:xe,blobGasUsed:He(xe,null),logsBloom:He(sd),blockHash:yr,hash:yr,logs:Yv(moe),blockNumber:Pe,cumulativeGasUsed:xe,effectiveGasPrice:He(xe),blobGasPrice:He(xe,null),status:He(Pe),type:He(Pe,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function boe(t){return xoe(t)}function l_(t){t.to&&xe(t.to)===S8&&(t.to="0x0000000000000000000000000000000000000000");const e=P1({hash:yr,index:He(Pe,void 0),type:r=>r==="0x"||r==null?0:Pe(r),accessList:He(wo,null),blobVersionedHashes:He(Yv(yr,!0),null),blockHash:He(yr,null),blockNumber:He(Pe,null),transactionIndex:He(Pe,null),from:Ae,gasPrice:He(xe),maxPriorityFeePerGas:He(xe),maxFeePerGas:He(xe),maxFeePerBlobGas:He(xe,null),gasLimit:xe,to:He(Ae,null),value:xe,nonce:Pe,data:sd,creates:He(Ae,null),chainId:He(xe,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=eS(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=us.from(t.signature):e.signature=us.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&xe(e.blockHash)===S8&&(e.blockHash=null),e}const woe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Ya{constructor(e){_(this,"name");fe(this,{name:e})}clone(){return new Ya(this.name)}}class O1 extends Ya{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);_(this,"effectiveBlock");_(this,"txBase");_(this,"txCreate");_(this,"txDataZero");_(this,"txDataNonzero");_(this,"txAccessListStorageKey");_(this,"txAccessListAddress");const s={effectiveBlock:r};function i(o,a){let c=(n||{})[o];c==null&&(c=a),I(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),fe(this,s)}clone(){return new O1(this.effectiveBlock,this)}}class R1 extends Ya{constructor(r,n){super("org.ethers.plugins.network.Ens");_(this,"address");_(this,"targetNetwork");fe(this,{address:r||woe,targetNetwork:n??1})}clone(){return new R1(this.address,this.targetNetwork)}}var Fc;const xA=class xA extends Ya{constructor(r){super("org.ethers.plugins.network.FeeData");j(this,Fc);T(this,Fc,r)}get feeDataFunc(){return w(this,Fc)}async getFeeData(r){return await w(this,Fc).call(this,r)}clone(){return new xA(w(this,Fc))}};Fc=new WeakMap;let C2=xA;var J0,Y0;class u_ extends Ya{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");j(this,J0);j(this,Y0);T(this,J0,r),T(this,Y0,n)}get url(){return w(this,J0)}get processFunc(){return w(this,Y0)}clone(){return this}}J0=new WeakMap,Y0=new WeakMap;const tb=new Map;var gf,vf,Xo;const Cu=class Cu{constructor(e,r){j(this,gf);j(this,vf);j(this,Xo);T(this,gf,e),T(this,vf,xe(r)),T(this,Xo,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return w(this,gf)}set name(e){T(this,gf,e)}get chainId(){return w(this,vf)}set chainId(e){T(this,vf,xe(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===xe(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===xe(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===xe(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(w(this,Xo).values())}attachPlugin(e){if(w(this,Xo).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return w(this,Xo).set(e.name,e.clone()),this}getPlugin(e){return w(this,Xo).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new Cu(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new O1;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let s=2;s9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function T8(t){return new u_(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),e()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:A8(a.maxFee,9),maxPriorityFeePerGas:A8(a.maxPriorityFee,9)}}catch(i){H(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let I8=!1;function Eoe(){if(I8)return;I8=!0;function t(e,r,n){const s=function(){const i=new ut(e,r);return n.ensNetwork!=null&&i.attachPlugin(new R1(null,n.ensNetwork)),i.attachPlugin(new O1),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};ut.register(e,s),ut.register(r,s),n.altNames&&n.altNames.forEach(i=>{ut.register(i,s)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[T8("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[T8("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function k2(t){return JSON.parse(JSON.stringify(t))}var Wi,Gn,Zo,ri,mf,ay;class Coe{constructor(e){j(this,mf);j(this,Wi);j(this,Gn);j(this,Zo);j(this,ri);T(this,Wi,e),T(this,Gn,null),T(this,Zo,4e3),T(this,ri,-2)}get pollingInterval(){return w(this,Zo)}set pollingInterval(e){T(this,Zo,e)}start(){w(this,Gn)||(T(this,Gn,w(this,Wi)._setTimeout(Y(this,mf,ay).bind(this),w(this,Zo))),Y(this,mf,ay).call(this))}stop(){w(this,Gn)&&(w(this,Wi)._clearTimeout(w(this,Gn)),T(this,Gn,null))}pause(e){this.stop(),e&&T(this,ri,-2)}resume(){this.start()}}Wi=new WeakMap,Gn=new WeakMap,Zo=new WeakMap,ri=new WeakMap,mf=new WeakSet,ay=async function(){try{const e=await w(this,Wi).getBlockNumber();if(w(this,ri)===-2){T(this,ri,e);return}if(e!==w(this,ri)){for(let r=w(this,ri)+1;r<=e;r++){if(w(this,Gn)==null)return;await w(this,Wi).emit("block",r)}T(this,ri,e)}}catch{}w(this,Gn)!=null&&T(this,Gn,w(this,Wi)._setTimeout(Y(this,mf,ay).bind(this),w(this,Zo)))};var Uc,$c,ea;class yS{constructor(e){j(this,Uc);j(this,$c);j(this,ea);T(this,Uc,e),T(this,ea,!1),T(this,$c,r=>{this._poll(r,w(this,Uc))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){w(this,ea)||(T(this,ea,!0),w(this,$c).call(this,-2),w(this,Uc).on("block",w(this,$c)))}stop(){w(this,ea)&&(T(this,ea,!1),w(this,Uc).off("block",w(this,$c)))}pause(e){this.stop()}resume(){this.start()}}Uc=new WeakMap,$c=new WeakMap,ea=new WeakMap;var xf,Vi;class koe extends yS{constructor(r,n){super(r);j(this,xf);j(this,Vi);T(this,xf,n),T(this,Vi,-2)}pause(r){r&&T(this,Vi,-2),super.pause(r)}async _poll(r,n){const s=await n.getBlock(w(this,xf));s!=null&&(w(this,Vi)===-2?T(this,Vi,s.number):s.number>w(this,Vi)&&(n.emit(w(this,xf),s.number),T(this,Vi,s.number)))}}xf=new WeakMap,Vi=new WeakMap;var Vg;class Soe extends yS{constructor(r,n){super(r);j(this,Vg);T(this,Vg,k2(n))}async _poll(r,n){throw new Error("@TODO")}}Vg=new WeakMap;var bf;class Aoe extends yS{constructor(r,n){super(r);j(this,bf);T(this,bf,n)}async _poll(r,n){const s=await n.getTransactionReceipt(w(this,bf));s&&n.emit(w(this,bf),s)}}bf=new WeakMap;var zi,wf,Ef,ta,qn,zg,f_;class gS{constructor(e,r){j(this,zg);j(this,zi);j(this,wf);j(this,Ef);j(this,ta);j(this,qn);T(this,zi,e),T(this,wf,k2(r)),T(this,Ef,Y(this,zg,f_).bind(this)),T(this,ta,!1),T(this,qn,-2)}start(){w(this,ta)||(T(this,ta,!0),w(this,qn)===-2&&w(this,zi).getBlockNumber().then(e=>{T(this,qn,e)}),w(this,zi).on("block",w(this,Ef)))}stop(){w(this,ta)&&(T(this,ta,!1),w(this,zi).off("block",w(this,Ef)))}pause(e){this.stop(),e&&T(this,qn,-2)}resume(){this.start()}}zi=new WeakMap,wf=new WeakMap,Ef=new WeakMap,ta=new WeakMap,qn=new WeakMap,zg=new WeakSet,f_=async function(e){if(w(this,qn)===-2)return;const r=k2(w(this,wf));r.fromBlock=w(this,qn)+1,r.toBlock=e;const n=await w(this,zi).getLogs(r);if(n.length===0){w(this,qn){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class P0{constructor(e){_(this,"name");fe(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function Poe(t){return JSON.parse(JSON.stringify(t))}function S2(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function rb(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(Ke(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:cy("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:cy("orphan",r),filter:Poe(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?S2(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{Ke(a)?s.push(a):i.push((async()=>{s.push(await ir(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),i.length&&await Promise.all(i),n.address=S2(s.map(a=>a.toLowerCase()))}return{filter:n,tag:cy("event",n),type:"event"}}I(!1,"unknown ProviderEvent","event",t)}function nb(){return new Date().getTime()}const Ooe={cacheTimeout:250,pollingInterval:4e3};var Pr,ra,Or,Cf,kn,Wc,na,Hi,X0,Kn,kf,Sf,Fe,mn,A2,T2,uh,I2,fh,ly;class id{constructor(e,r){j(this,Fe);j(this,Pr);j(this,ra);j(this,Or);j(this,Cf);j(this,kn);j(this,Wc);j(this,na);j(this,Hi);j(this,X0);j(this,Kn);j(this,kf);j(this,Sf);if(T(this,Sf,Object.assign({},Ooe,r||{})),e==="any")T(this,Wc,!0),T(this,kn,null);else if(e){const n=ut.from(e);T(this,Wc,!1),T(this,kn,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else T(this,Wc,!1),T(this,kn,null);T(this,Hi,-1),T(this,na,new Map),T(this,Pr,new Map),T(this,ra,new Map),T(this,Or,null),T(this,Cf,!1),T(this,X0,1),T(this,Kn,new Map),T(this,kf,!1)}get pollingInterval(){return w(this,Sf).pollingInterval}get provider(){return this}get plugins(){return Array.from(w(this,ra).values())}attachPlugin(e){if(w(this,ra).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return w(this,ra).set(e.name,e.connect(this)),this}getPlugin(e){return w(this,ra).get(e)||null}get disableCcipRead(){return w(this,kf)}set disableCcipRead(e){T(this,kf,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}H(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new Q7(goe(e),this)}_wrapLog(e,r){return new Td(poe(e),this)}_wrapTransactionReceipt(e,r){return new lS(boe(e),this)}_wrapTransactionResponse(e,r){return new rd(l_(e),this)}_detectNetwork(){H(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){H(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Pe(await Y(this,Fe,mn).call(this,{method:"getBlockNumber"}),"%response");return w(this,Hi)>=0&&T(this,Hi,e),e}_getAddress(e){return ir(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(Ke(e))return Ke(e,32)?e:gr(e);if(typeof e=="bigint"&&(e=Pe(e,"blockTag")),typeof e=="number")return e>=0?gr(e):w(this,Hi)>=0?gr(w(this,Hi)+e):this.getBlockNumber().then(r=>gr(r+e));I(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?S2(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,s=(c,l,u)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const d={};return f&&(d.address=f),r.length&&(d.topics=r),l&&(d.fromBlock=l),u&&(d.toBlock=u),n&&(d.blockHash=n),d};let i=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)i.push(this._getAddress(c));else i.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(e){const r=td(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=ir(r[s],this);Sp(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);Sp(s)?n.push(async function(){r.blockTag=await s}()):r.blockTag=s}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(w(this,kn)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw w(this,kn)===s&&T(this,kn,null),i}})();return T(this,kn,s),(await s).clone()}const e=w(this,kn),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(w(this,Wc)?(this.emit("network",n,r),w(this,kn)===e&&T(this,kn,Promise.resolve(n))):H(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await Pt({_block:Y(this,Fe,I2).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await Y(this,Fe,mn).call(this,{method:"getGasPrice"});return xe(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await Y(this,Fe,mn).call(this,{method:"getPriorityFee"});return xe(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(s,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*Toe+c),new b2(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new qt(n.url),i=await n.processFunc(r,this,s);return new b2(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return Sp(r)&&(r=await r),xe(await Y(this,Fe,mn).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await Pt({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await Y(this,Fe,T2).call(this,Y(this,Fe,A2).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return xe(await Y(this,Fe,uh).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Pe(await Y(this,Fe,uh).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return z(await Y(this,Fe,uh).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=xe(r,"position");return z(await Y(this,Fe,uh).call(this,{method:"getStorage",position:s},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:s}=await Pt({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=bl.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:s}=await Pt({network:this.getNetwork(),params:Y(this,Fe,I2).call(this,e,!!r)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(e){const{network:r,params:n}=await Pt({network:this.getNetwork(),params:Y(this,Fe,mn).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await Pt({network:this.getNetwork(),params:Y(this,Fe,mn).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await Y(this,Fe,mn).call(this,{method:"getTransaction",hash:e});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await Pt({network:this.getNetwork(),result:Y(this,Fe,mn).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:z(r)}async getLogs(e){let r=this._getFilter(e);Sp(r)&&(r=await r);const{network:n,params:s}=await Pt({network:this.getNetwork(),params:Y(this,Fe,mn).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){H(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await I0.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Ae(e);const r=xg(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await I0.getEnsAddress(this),i=await new hn(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===wi)return null;const a=await new hn(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(a)!==e?null:a}catch(n){if(Ut(n,"BAD_DATA")&&n.value==="0x"||Ut(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const s=r??1;return s===0?this.getTransactionReceipt(e):new Promise(async(i,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=s){i(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(pt("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){H(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=w(this,Kn).get(e);r&&(r.timer&&clearTimeout(r.timer),w(this,Kn).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=_l(this,X0)._++,s=()=>{w(this,Kn).delete(n),e()};if(this.paused)w(this,Kn).set(n,{timer:null,func:s,time:r});else{const i=setTimeout(s,r);w(this,Kn).set(n,{timer:i,func:s,time:nb()})}return n}_forEachSubscriber(e){for(const r of w(this,Pr).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new P0(e.type);case"block":{const r=new Coe(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new koe(this,e.type);case"event":return new gS(this,e.filter);case"transaction":return new Aoe(this,e.hash);case"orphan":return new Soe(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of w(this,Pr).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),w(this,Or)!=null&&r.pause(w(this,Or));break}}async on(e,r){const n=await Y(this,Fe,ly).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,w(this,Or)!=null&&n.subscriber.pause(w(this,Or))),this}async once(e,r){const n=await Y(this,Fe,ly).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,w(this,Or)!=null&&n.subscriber.pause(w(this,Or))),this}async emit(e,...r){const n=await Y(this,Fe,fh).call(this,e,r);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new Uk(this,o?null:i,e);try{i.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),w(this,Pr).delete(n.tag)),s>0}async listenerCount(e){if(e){const n=await Y(this,Fe,fh).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of w(this,Pr).values())r+=n.length;return r}async listeners(e){if(e){const n=await Y(this,Fe,fh).call(this,e);return n?n.listeners.map(({listener:s})=>s):[]}let r=[];for(const{listeners:n}of w(this,Pr).values())r=r.concat(n.map(({listener:s})=>s));return r}async off(e,r){const n=await Y(this,Fe,fh).call(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),w(this,Pr).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:s}=await Y(this,Fe,ly).call(this,e);n&&s.stop(),w(this,Pr).delete(r)}else for(const[r,{started:n,subscriber:s}]of w(this,Pr))n&&s.stop(),w(this,Pr).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return w(this,Cf)}destroy(){this.removeAllListeners();for(const e of w(this,Kn).keys())this._clearTimeout(e);T(this,Cf,!0)}get paused(){return w(this,Or)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(T(this,Hi,-1),w(this,Or)!=null){if(w(this,Or)==!!e)return;H(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),T(this,Or,!!e);for(const r of w(this,Kn).values())r.timer&&clearTimeout(r.timer),r.time=nb()-r.time}resume(){if(w(this,Or)!=null){this._forEachSubscriber(e=>e.resume()),T(this,Or,null);for(const e of w(this,Kn).values()){let r=e.time;r<0&&(r=0),e.time=nb(),setTimeout(e.func,r)}}}}Pr=new WeakMap,ra=new WeakMap,Or=new WeakMap,Cf=new WeakMap,kn=new WeakMap,Wc=new WeakMap,na=new WeakMap,Hi=new WeakMap,X0=new WeakMap,Kn=new WeakMap,kf=new WeakMap,Sf=new WeakMap,Fe=new WeakSet,mn=async function(e){const r=w(this,Sf).cacheTimeout;if(r<0)return await this._perform(e);const n=cy(e.method,e);let s=w(this,na).get(n);return s||(s=this._perform(e),w(this,na).set(n,s),setTimeout(()=>{w(this,na).get(n)===s&&w(this,na).delete(n)},r)),await s},A2=async function(e,r,n){H(n=0&&r==="latest"&&s.to!=null&&ct(i.data,0,4)==="0x556f1830"){const o=i.data,a=await ir(s.to,this);let c;try{c=Doe(ct(i.data,4))}catch(f){H(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}H(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(s,c.calldata,c.urls);H(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const u={to:a,data:Ue([c.selector,Moe([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await Y(this,Fe,A2).call(this,u,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw i}},T2=async function(e){const{value:r}=await Pt({network:this.getNetwork(),value:e});return r},uh=async function(e,r,n){let s=this._getAddress(r),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await Y(this,Fe,T2).call(this,Y(this,Fe,mn).call(this,Object.assign(e,{address:s,blockTag:i})))},I2=async function(e,r){if(Ke(e,32))return await Y(this,Fe,mn).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Y(this,Fe,mn).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},fh=async function(e,r){let n=await rb(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await rb({orphan:"drop-log",log:r[0]},this)),w(this,Pr).get(n.tag)||null},ly=async function(e){const r=await rb(e,this),n=r.tag;let s=w(this,Pr).get(n);return s||(s={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},w(this,Pr).set(n,s)),s};function Roe(t,e){try{const r=P2(t,e);if(r)return Ls(r)}catch{}return null}function P2(t,e){if(t==="0x")return null;try{const r=Pe(ct(t,e,e+32)),n=Pe(ct(t,r,r+32));return ct(t,r+32,r+32+n)}catch{}return null}function P8(t){const e=nr(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function Noe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const _oe=new Uint8Array([]);function Moe(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=ct(t,0,32);H(ct(r,0,12)===ct(O8,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=ct(r,12);try{const n=[],s=Pe(ct(t,32,64)),i=Pe(ct(t,s,s+32)),o=ct(t,s+32);for(let a=0;ae[n]),e}function $l(t,e){if(t.provider)return t.provider;H(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function R8(t,e){let r=td(e);if(r.to!=null&&(r.to=ir(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),ir(n,t)]).then(([s,i])=>(I(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else r.from=t.getAddress();return await Pt(r)}class Id{constructor(e){_(this,"provider");fe(this,{provider:e||null})}async getNonce(e){return $l(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await R8(this,e)}async populateTransaction(e){const r=$l(this,"populateTransaction"),n=await R8(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=xe(n.chainId);I(o===s.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?I(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&i&&I(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();H(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(H(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):H(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Pt(n)}async estimateGas(e){return $l(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return $l(this,"call").call(await this.populateCall(e))}async resolveName(e){return await $l(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=$l(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const s=bl.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var Af,uy;const bA=class bA extends Id{constructor(r,n){super(n);j(this,Af);_(this,"address");fe(this,{address:r})}async getAddress(){return this.address}connect(r){return new bA(this.address,r)}async signTransaction(r){Y(this,Af,uy).call(this,"transactions","signTransaction")}async signMessage(r){Y(this,Af,uy).call(this,"messages","signMessage")}async signTypedData(r,n,s){Y(this,Af,uy).call(this,"typed-data","signTypedData")}};Af=new WeakSet,uy=function(r,n){H(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let wg=bA;const N8=new Set;function Xa(t){N8.has(t)||(N8.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function Boe(t){return JSON.parse(JSON.stringify(t))}var Ur,ni,Vc,sa,zc,Tf,ja,O2,R2;class d_{constructor(e){j(this,ja);j(this,Ur);j(this,ni);j(this,Vc);j(this,sa);j(this,zc);j(this,Tf);T(this,Ur,e),T(this,ni,null),T(this,Vc,Y(this,ja,O2).bind(this)),T(this,sa,!1),T(this,zc,null),T(this,Tf,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){w(this,sa)||(T(this,sa,!0),Y(this,ja,O2).call(this,-2))}stop(){w(this,sa)&&(T(this,sa,!1),T(this,Tf,!0),Y(this,ja,R2).call(this),w(this,Ur).off("block",w(this,Vc)))}pause(e){e&&Y(this,ja,R2).call(this),w(this,Ur).off("block",w(this,Vc))}resume(){this.start()}}Ur=new WeakMap,ni=new WeakMap,Vc=new WeakMap,sa=new WeakMap,zc=new WeakMap,Tf=new WeakMap,ja=new WeakSet,O2=async function(e){try{w(this,ni)==null&&T(this,ni,this._subscribe(w(this,Ur)));let r=null;try{r=await w(this,ni)}catch(i){if(!Ut(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){T(this,ni,null),w(this,Ur)._recoverSubscriber(this,this._recover(w(this,Ur)));return}const n=await w(this,Ur).getNetwork();if(w(this,zc)||T(this,zc,n),w(this,zc).chainId!==n.chainId)throw new Error("chaid changed");if(w(this,Tf))return;const s=await w(this,Ur).send("eth_getFilterChanges",[r]);await this._emitResults(w(this,Ur),s)}catch(r){console.log("@TODO",r)}w(this,Ur).once("block",w(this,Vc))},R2=function(){const e=w(this,ni);e&&(T(this,ni,null),e.then(r=>{w(this,Ur).destroyed||w(this,Ur).send("eth_uninstallFilter",[r])}))};var Hc;class Loe extends d_{constructor(r,n){super(r);j(this,Hc);T(this,Hc,Boe(n))}_recover(r){return new gS(r,w(this,Hc))}async _subscribe(r){return await r.send("eth_newFilter",[w(this,Hc)])}async _emitResults(r,n){for(const s of n)r.emit(w(this,Hc),r._wrapLog(s,r._network))}}Hc=new WeakMap;class joe extends d_{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Foe="bigint,boolean,function,number,string,symbol".split(/,/g);function fy(t){if(t==null||Foe.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(fy);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Uoe(t){return new Promise(e=>{setTimeout(e,t)})}function Wl(t){return t&&t.toLowerCase()}function _8(t){return t&&typeof t.pollingInterval=="number"}const h_={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class dy extends Id{constructor(r,n){super(r);_(this,"address");n=Ae(n),fe(this,{address:n})}connect(r){H(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=fy(r),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await ir(o,this.provider);I(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await ir(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(r);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const u=await this.provider.getTransaction(s);if(u!=null){i(u.replaceableTransaction(n));return}}catch(u){if(Ut(u,"CANCELLED")||Ut(u,"BAD_DATA")||Ut(u,"NETWORK_ERROR")||Ut(u,"UNSUPPORTED_OPERATION")){u.info==null&&(u.info={}),u.info.sendTransactionHash=s,o(u);return}if(Ut(u,"INVALID_ARGUMENT")&&(c++,u.info==null&&(u.info={}),u.info.sendTransactionHash=s,c>10)){o(u);return}this.provider.emit("error",pt("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(r){const n=fy(r);if(n.from){const i=await ir(n.from,this.provider);I(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(r){const n=typeof r=="string"?xt(r):r;return await this.provider.send("personal_sign",[z(n),this.address.toLowerCase()])}async signTypedData(r,n,s){const i=fy(s),o=await js.resolveNames(r,n,i,async a=>{const c=await ir(a);return I(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(js.getPayload(o.domain,n,o.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?xt(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),z(n)])}}var Gc,If,Gi,si,Cs,Qn,sn,Z0,N2;class vS extends id{constructor(r,n){super(r,n);j(this,Z0);j(this,Gc);j(this,If);j(this,Gi);j(this,si);j(this,Cs);j(this,Qn);j(this,sn);T(this,If,1),T(this,Gc,Object.assign({},h_,n||{})),T(this,Gi,[]),T(this,si,null),T(this,Qn,null),T(this,sn,null);{let i=null;const o=new Promise(a=>{i=a});T(this,Cs,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(I(!s||r!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&r!=null&&T(this,Qn,ut.from(r))):s&&(I(r==null||s.matches(r),"staticNetwork MUST match network object","options",n),T(this,Qn,s))}_getOption(r){return w(this,Gc)[r]}get _network(){return H(w(this,Qn),"network is not available yet","NETWORK_ERROR"),w(this,Qn)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let s=r.transaction;if(s&&s.type!=null&&xe(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)if(r===!0){if(w(this,Qn))return w(this,Qn)}else return r;return w(this,sn)?await w(this,sn):this.ready?(T(this,sn,(async()=>{try{const n=ut.from(xe(await this.send("eth_chainId",[])));return T(this,sn,null),n}catch(n){throw T(this,sn,null),n}})()),await w(this,sn)):(T(this,sn,(async()=>{const n={id:_l(this,If)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],T(this,sn,null)}catch(i){throw T(this,sn,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return ut.from(xe(s.result));throw this.getRpcError(n,s)})()),await w(this,sn))}_start(){w(this,Cs)==null||w(this,Cs).resolve==null||(w(this,Cs).resolve(),T(this,Cs,null),(async()=>{for(;w(this,Qn)==null&&!this.destroyed;)try{T(this,Qn,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",pt("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Uoe(1e3)}Y(this,Z0,N2).call(this)})())}async _waitUntilReady(){if(w(this,Cs)!=null)return await w(this,Cs).promise}_getSubscriber(r){return r.type==="pending"?new joe(this):r.type==="event"?this._getOption("polling")?new gS(this,r.filter):new Loe(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new P0("orphan"):super._getSubscriber(r)}get ready(){return w(this,Cs)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(r[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=gr(xe(r[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{r[s]!=null&&(n[s]=z(r[s]))}),r.accessList&&(n.accessList=wo(r.accessList)),r.blobVersionedHashes&&(n.blobVersionedHashes=r.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Wl(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Wl(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[Wl(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Wl(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(Wl):r.filter.address=Wl(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:s}=r,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return pt("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=_2(i),l=Kt.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return l.info={error:i,payload:r},l}const o=JSON.stringify($oe(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return pt("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:r,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=r.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return pt("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return pt("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return pt("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return pt("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?pt("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:i,payload:r}}):pt("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(pt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const s=_l(this,If)._++,i=new Promise((o,a)=>{w(this,Gi).push({resolve:o,reject:a,payload:{method:r,params:n,id:s,jsonrpc:"2.0"}})});return Y(this,Z0,N2).call(this),i}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const i=await n;if(r>=i.length)throw new Error("no such account");return new dy(this,i[r])}const{accounts:s}=await Pt({network:this.getNetwork(),accounts:n});r=Ae(r);for(const i of s)if(Ae(i)===r)return new dy(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new dy(this,n))}destroy(){w(this,si)&&(clearTimeout(w(this,si)),T(this,si,null));for(const{payload:r,reject:n}of w(this,Gi))n(pt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));T(this,Gi,[]),super.destroy()}}Gc=new WeakMap,If=new WeakMap,Gi=new WeakMap,si=new WeakMap,Cs=new WeakMap,Qn=new WeakMap,sn=new WeakMap,Z0=new WeakSet,N2=function(){if(w(this,si))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");T(this,si,setTimeout(()=>{T(this,si,null);const n=w(this,Gi);for(T(this,Gi,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==w(this,Gc).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>w(this,Gc).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of s){if(this.destroyed){c(pt("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const u=o.filter(f=>f.id===l.id)[0];if(u==null){const f=pt("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in u){c(this.getRpcError(l,u));continue}a(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},r))};var ia;class p_ extends vS{constructor(r,n){super(r,n);j(this,ia);let s=this._getOption("pollingInterval");s==null&&(s=h_.pollingInterval),T(this,ia,s)}_getSubscriber(r){const n=super._getSubscriber(r);return _8(n)&&(n.pollingInterval=w(this,ia)),n}get pollingInterval(){return w(this,ia)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");T(this,ia,r),this._forEachSubscriber(n=>{_8(n)&&(n.pollingInterval=w(this,ia))})}}ia=new WeakMap;var Pf,h4;let lr=(h4=class extends p_{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);j(this,Pf);typeof r=="string"?T(this,Pf,new qt(r)):T(this,Pf,r.clone())}_getConnection(){return w(this,Pf).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}},Pf=new WeakMap,h4);function _2(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&Ke(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=_2(t[e]);if(r)return r}return null}if(typeof t=="string")try{return _2(JSON.parse(t))}catch{}return null}function M2(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)M2(t[r],e);if(typeof t=="string")try{return M2(JSON.parse(t),e)}catch{}}}function $oe(t){const e=[];return M2(t,e),e}const Ap="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Woe(t){switch(t){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}I(!1,"unsupported network","network",t)}class O0 extends lr{constructor(r,n){r==null&&(r="mainnet");const s=ut.from(r);n==null&&(n=Ap);const i={polling:!0,staticNetwork:s},o=O0.getRequest(s,n);super(o,s,i);_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new O0(r,this.apiKey)}catch{}return super._getProvider(r)}static getRequest(r,n){n==null&&(n=Ap);const s=new qt(`https://${Woe(r.name)}/${n}`);return s.allowGzip=!0,n===Ap&&(s.retryFunc=async(i,o,a)=>(Xa("AnkrProvider"),!0)),s}getRpcError(r,n){return r.method==="eth_sendRawTransaction"&&n&&n.error&&n.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(n.error.message="replacement transaction underpriced"),super.getRpcError(r,n)}isCommunityResource(){return this.apiKey===Ap}}const Tp="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function Voe(t){switch(t){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}I(!1,"unsupported network","network",t)}class R0 extends lr{constructor(r,n){r==null&&(r="mainnet");const s=ut.from(r);n==null&&(n=Tp);const i=R0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new R0(r,this.apiKey)}catch{}return super._getProvider(r)}async _perform(r){if(r.method==="getTransactionResult"){const{trace:n,tx:s}=await Pt({trace:this.send("trace_transaction",[r.hash]),tx:this.getTransaction(r.hash)});if(n==null||s==null)return null;let i,o=!1;try{i=n[0].result.output,o=n[0].error==="Reverted"}catch{}if(i)return H(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:s,invocation:null,revert:null}),i;H(!1,"could not parse trace result","BAD_DATA",{value:n})}return await super._perform(r)}isCommunityResource(){return this.apiKey===Tp}static getRequest(r,n){n==null&&(n=Tp);const s=new qt(`https://${Voe(r.name)}/v2/${n}`);return s.allowGzip=!0,n===Tp&&(s.retryFunc=async(i,o,a)=>(Xa("alchemy"),!0)),s}}function Ip(t){switch(t){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}I(!1,"unsupported network","network",t)}function zoe(t){switch(t){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}I(!1,"unsupported network","network",t)}class N0 extends lr{constructor(r,n){r==null&&(r="mainnet");const s=ut.from(r);n==null&&(n=Ip(s.name));const i=N0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new N0(r,this.apiKey)}catch{}return super._getProvider(r)}isCommunityResource(){return this.apiKey===Ip(this._network.name)}static getRequest(r,n){n==null&&(n=Ip(r.name));const s=new qt(`https://${zoe(r.name)}/${n}`);return s.allowGzip=!0,n===Ip(r.name)&&(s.retryFunc=async(i,o,a)=>(Xa("ChainstackProvider"),!0)),s}}class y_ extends lr{constructor(e){e==null&&(e="mainnet");const r=ut.from(e);I(r.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",r,{staticNetwork:r})}}const M8=2e3;function Hoe(t){return t&&typeof t.then=="function"}const g_="org.ethers.plugins.provider.Etherscan";class mS extends Ya{constructor(r){super(g_);_(this,"baseUrl");fe(this,{baseUrl:r})}clone(){return new mS(this.baseUrl)}}const Goe=["enableCcipRead"];let qoe=1;var Of;class v_ extends id{constructor(r,n){const s=n??null;super();_(this,"network");_(this,"apiKey");j(this,Of);const i=ut.from(r);T(this,Of,i.getPlugin(g_)),fe(this,{apiKey:s,network:i}),this.getBaseUrl()}getBaseUrl(){if(w(this,Of))return w(this,Of).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}I(!1,"unsupported network","network",this.network)}getUrl(r,n){const s=Object.keys(n).reduce((o,a)=>{const c=n[a];return c!=null&&(o+=`&${a}=${c}`),o},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${r}${s}${i}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(r,n){return n.module=r,n.apikey=this.apiKey,n}async detectNetwork(){return this.network}async fetch(r,n,s){const i=qoe++,o=s?this.getPostUrl():this.getUrl(r,n),a=s?this.getPostData(r,n):null;this.emit("debug",{action:"sendRequest",id:i,url:o,payload:a});const c=new qt(o);c.setThrottleParams({slotInterval:1e3}),c.retryFunc=(f,d,h)=>(this.isCommunityResource()&&Xa("Etherscan"),Promise.resolve(!0)),c.processFunc=async(f,d)=>{const h=d.hasBody()?JSON.parse(Ls(d.body)):{},y=(typeof h.result=="string"?h.result:"").toLowerCase().indexOf("rate limit")>=0;return r==="proxy"?h&&h.status==0&&h.message=="NOTOK"&&y&&(this.emit("debug",{action:"receiveError",id:i,reason:"proxy-NOTOK",error:h}),d.throwThrottleError(h.result,M8)):y&&(this.emit("debug",{action:"receiveError",id:i,reason:"null result",error:h.result}),d.throwThrottleError(h.result,M8)),d},a&&(c.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),c.body=Object.keys(a).map(f=>`${f}=${a[f]}`).join("&"));const l=await c.send();try{l.assertOk()}catch(f){this.emit("debug",{action:"receiveError",id:i,error:f,reason:"assertOk"}),H(!1,"response error","SERVER_ERROR",{request:c,response:l})}l.hasBody()||(this.emit("debug",{action:"receiveError",id:i,error:"missing body",reason:"null body"}),H(!1,"missing response","SERVER_ERROR",{request:c,response:l}));const u=JSON.parse(Ls(l.body));return r==="proxy"?(u.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:i,result:u,reason:"invalid JSON-RPC"}),H(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:c,response:l,info:{result:u}})),u.error&&(this.emit("debug",{action:"receiveError",id:i,result:u,reason:"JSON-RPC error"}),H(!1,"error response","SERVER_ERROR",{request:c,response:l,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result):u.status==0&&(u.message==="No records found"||u.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result):((u.status!=1||typeof u.message=="string"&&!u.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:i,result:u}),H(!1,"error response","SERVER_ERROR",{request:c,response:l,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result)}_getTransactionPostData(r){const n={};for(let s in r){if(Goe.indexOf(s)>=0||r[s]==null)continue;let i=r[s];if(!(s==="type"&&i===0)&&!(s==="blockTag"&&i==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[s])i=gr(i);else if(s==="accessList")i="["+wo(i).map(o=>`{address:"${o.address}",storageKeys:["${o.storageKeys.join('","')}"]}`).join(",")+"]";else if(s==="blobVersionedHashes"){if(i.length===0)continue;H(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:r}})}else i=z(i);n[s]=i}}return n}_checkError(r,n,s){let i="";if(Ut(n,"SERVER_ERROR")){try{i=n.info.result.error.message}catch{}if(!i)try{i=n.info.message}catch{}}if(r.method==="estimateGas"&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&H(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.transaction}),(r.method==="call"||r.method==="estimateGas")&&i.match(/execution reverted/i)){let o="";try{o=n.info.result.error.data}catch{}const a=Kt.getBuiltinCallException(r.method,r.transaction,o);throw a.info={request:r,error:n},a}if(i&&r.method==="broadcastTransaction"){const o=bl.from(r.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&H(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:o}),i.match(/insufficient funds/)&&H(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:o}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&H(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:o})}throw n}async _detectNetwork(){return this.network}async _perform(r){switch(r.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(n=>this._checkError(r,n,r.signedTransaction));case"getBlock":if("blockTag"in r)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});H(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.hash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const n=this._getTransactionPostData(r.transaction);n.module="proxy",n.action="eth_call";try{return await this.fetch("proxy",n,!0)}catch(s){return this._checkError(r,s,r.transaction)}}case"estimateGas":{const n=this._getTransactionPostData(r.transaction);n.module="proxy",n.action="eth_estimateGas";try{return await this.fetch("proxy",n,!0)}catch(s){return this._checkError(r,s,r.transaction)}}}return super._perform(r)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(r){let n=this._getAddress(r);Hoe(n)&&(n=await n);try{const s=await this.fetch("contract",{action:"getabi",address:n}),i=JSON.parse(s);return new hn(n,i,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}Of=new WeakMap;function Koe(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const Qoe=Koe().WebSocket;var ii,e1,oa,qc,aa;class Xv{constructor(e,r){j(this,ii);j(this,e1);j(this,oa);j(this,qc);j(this,aa);T(this,ii,e),T(this,e1,JSON.stringify(r)),T(this,oa,null),T(this,qc,null),T(this,aa,null)}get filter(){return JSON.parse(w(this,e1))}start(){T(this,oa,w(this,ii).send("eth_subscribe",this.filter).then(e=>(w(this,ii)._register(e,this),e)))}stop(){w(this,oa).then(e=>{w(this,ii).destroyed||w(this,ii).send("eth_unsubscribe",[e])}),T(this,oa,null)}pause(e){H(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),T(this,qc,!!e)}resume(){T(this,qc,null)}_handleMessage(e){if(w(this,oa)!=null&&w(this,qc)===null){let r=w(this,aa);r==null?r=this._emit(w(this,ii),e):r=r.then(async()=>{await this._emit(w(this,ii),e)}),T(this,aa,r.then(()=>{w(this,aa)===r&&T(this,aa,null)}))}}async _emit(e,r){throw new Error("sub-classes must implemente this; _emit")}}ii=new WeakMap,e1=new WeakMap,oa=new WeakMap,qc=new WeakMap,aa=new WeakMap;class m_ extends Xv{constructor(e){super(e,["newHeads"])}async _emit(e,r){e.emit("block",parseInt(r.number))}}class x_ extends Xv{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,r){e.emit("pending",r)}}var t1;class b_ extends Xv{constructor(r,n){super(r,["logs",n]);j(this,t1);T(this,t1,JSON.stringify(n))}get logFilter(){return JSON.parse(w(this,t1))}async _emit(r,n){r.emit(this.logFilter,r._wrapLog(n,r._network))}}t1=new WeakMap;var Kc,Rf,ca;class w_ extends vS{constructor(r,n){const s=Object.assign({},n??{});I(s.batchMaxCount==null||s.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),s.batchMaxCount=1,s.staticNetwork==null&&(s.staticNetwork=!0);super(r,s);j(this,Kc);j(this,Rf);j(this,ca);T(this,Kc,new Map),T(this,Rf,new Map),T(this,ca,new Map)}_getSubscriber(r){switch(r.type){case"close":return new P0("close");case"block":return new m_(this);case"pending":return new x_(this);case"event":return new b_(this,r.filter);case"orphan":if(r.filter.orphan==="drop-log")return new P0("drop-log")}return super._getSubscriber(r)}_register(r,n){w(this,Rf).set(r,n);const s=w(this,ca).get(r);if(s){for(const i of s)n._handleMessage(i);w(this,ca).delete(r)}}async _send(r){I(!Array.isArray(r),"WebSocket does not support batch send","payload",r);const n=new Promise((s,i)=>{w(this,Kc).set(r.id,{payload:r,resolve:s,reject:i})});return await this._waitUntilReady(),await this._write(JSON.stringify(r)),[await n]}async _processMessage(r){const n=JSON.parse(r);if(n&&typeof n=="object"&&"id"in n){const s=w(this,Kc).get(n.id);if(s==null){this.emit("error",pt("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}w(this,Kc).delete(n.id),s.resolve(n)}else if(n&&n.method==="eth_subscription"){const s=n.params.subscription,i=w(this,Rf).get(s);if(i)i._handleMessage(n.params.result);else{let o=w(this,ca).get(s);o==null&&(o=[],w(this,ca).set(s,o)),o.push(n.params.result)}}else{this.emit("error",pt("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(r){throw new Error("sub-classes must override this")}}Kc=new WeakMap,Rf=new WeakMap,ca=new WeakMap;var Qc,ks;class xS extends w_{constructor(r,n,s){super(n,s);j(this,Qc);j(this,ks);typeof r=="string"?(T(this,Qc,()=>new Qoe(r)),T(this,ks,w(this,Qc).call(this))):typeof r=="function"?(T(this,Qc,r),T(this,ks,r())):(T(this,Qc,null),T(this,ks,r)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(i){console.log("failed to start WebsocketProvider",i)}},this.websocket.onmessage=i=>{this._processMessage(i.data)}}get websocket(){if(w(this,ks)==null)throw new Error("websocket closed");return w(this,ks)}async _write(r){this.websocket.send(r)}async destroy(){w(this,ks)!=null&&(w(this,ks).close(),T(this,ks,null)),super.destroy()}}Qc=new WeakMap,ks=new WeakMap;const dh="84842078b09946638c03157f83405213";function Joe(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}I(!1,"unsupported network","network",t)}class E_ extends xS{constructor(r,n){const s=new od(r,n),i=s._getConnection();H(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const o=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,s._network);_(this,"projectId");_(this,"projectSecret");fe(this,{projectId:s.projectId,projectSecret:s.projectSecret})}isCommunityResource(){return this.projectId===dh}}class od extends lr{constructor(r,n,s){r==null&&(r="mainnet");const i=ut.from(r);n==null&&(n=dh),s==null&&(s=null);const o=od.getRequest(i,n,s);super(o,i,{staticNetwork:i});_(this,"projectId");_(this,"projectSecret");fe(this,{projectId:n,projectSecret:s})}_getProvider(r){try{return new od(r,this.projectId,this.projectSecret)}catch{}return super._getProvider(r)}isCommunityResource(){return this.projectId===dh}static getWebSocketProvider(r,n){return new E_(r,n)}static getRequest(r,n,s){n==null&&(n=dh),s==null&&(s=null);const i=new qt(`https://${Joe(r.name)}/v3/${n}`);return i.allowGzip=!0,s&&i.setCredentials("",s),n===dh&&(i.retryFunc=async(o,a,c)=>(Xa("InfuraProvider"),!0)),i}}const Pp="919b412a057b5e9c9b6dce193c5a60242d6efadb";function Yoe(t){switch(t){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}I(!1,"unsupported network","network",t)}class _0 extends lr{constructor(r,n){r==null&&(r="mainnet");const s=ut.from(r);n==null&&(n=Pp);const i=_0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"token");fe(this,{token:n})}_getProvider(r){try{return new _0(r,this.token)}catch{}return super._getProvider(r)}isCommunityResource(){return this.token===Pp}static getRequest(r,n){n==null&&(n=Pp);const s=new qt(`https://${Yoe(r.name)}/${n}`);return s.allowGzip=!0,n===Pp&&(s.retryFunc=async(i,o,a)=>(Xa("QuickNodeProvider"),!0)),s}}const Xoe=BigInt("1"),Zoe=BigInt("2");function eae(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}}function tae(t){return new Promise(e=>{setTimeout(e,t)})}function D2(){return new Date().getTime()}function sb(t){return JSON.stringify(t,(e,r)=>typeof r=="bigint"?{type:"bigint",value:r.toString()}:r)}const D8={stallTimeout:400,priority:1,weight:1},B8={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function rae(t,e){for(;(t.blockNumber<0||t.blockNumber{try{const r=await t.provider.getBlockNumber();r>t.blockNumber&&(t.blockNumber=r)}catch(r){t.blockNumber=-2,t._lastFatalError=r,t._lastFatalErrorTimestamp=D2()}t._updateNumber=null})()),await t._updateNumber,t.outOfSync++,!t._lastFatalError););}function Mh(t){if(t==null)return"null";if(Array.isArray(t))return"["+t.map(Mh).join(",")+"]";if(typeof t=="object"&&typeof t.toJSON=="function")return Mh(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":case"number":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{"+e.map(r=>`${JSON.stringify(r)}:${Mh(t[r])}`).join(",")+"}"}}throw console.log("Could not serialize",t),new Error("Hmm...")}function ib(t){if("error"in t){const r=t.error;return{tag:Mh(r),value:r}}const e=t.result;return{tag:Mh(e),value:e}}function hy(t,e){const r=new Map;for(const{value:s,tag:i,weight:o}of e){const a=r.get(i)||{value:s,weight:0};a.weight+=o,r.set(i,a)}let n=null;for(const s of r.values())s.weight>=t&&(!n||s.weight>n.weight)&&(n=s);if(n)return n.value}function B2(t,e){let r=0;const n=new Map;let s=null;const i=[];for(const{value:a,tag:c,weight:l}of e)if(a instanceof Error){const u=n.get(c)||{value:a,weight:0};u.weight+=l,n.set(c,u),(s==null||u.weight>s.weight)&&(s=u)}else i.push(BigInt(a)),r+=l;if(r=t?s.value:void 0;i.sort((a,c)=>aa?1:0);const o=Math.floor(i.length/2);return i.length%2?i[o]:(i[o-1]+i[o]+Xoe)/Zoe}function ob(t,e){const r=hy(t,e);if(r!==void 0)return r;for(const n of e)if(n.value)return n.value}function nae(t,e){if(t===1)return Pe(B2(t,e),"%internal");const r=new Map,n=(o,a)=>{const c=r.get(o)||{result:o,weight:0};c.weight+=a,r.set(o,c)};for(const{weight:o,value:a}of e){const c=Pe(a);n(c-1,o),n(c,o),n(c+1,o)}let s=0,i;for(const{weight:o,result:a}of r.values())o>=t&&(o>s||i!=null&&o===s&&a>i)&&(s=o,i=a);return i}var on,qi,Nf,gn,k_,L2,S_,A_,j2;class C_ extends id{constructor(r,n,s){super(n,s);j(this,gn);_(this,"quorum");_(this,"eventQuorum");_(this,"eventWorkers");j(this,on);j(this,qi);j(this,Nf);T(this,on,r.map(i=>i instanceof id?Object.assign({provider:i},D8,B8):Object.assign({},D8,i,B8))),T(this,qi,-2),T(this,Nf,null),s&&s.quorum!=null?this.quorum=s.quorum:this.quorum=Math.ceil(w(this,on).reduce((i,o)=>(i+=o.weight,i),0)/2),this.eventQuorum=1,this.eventWorkers=1,I(this.quorum<=w(this,on).reduce((i,o)=>i+o.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return w(this,on).map(r=>{const n=Object.assign({},r);for(const s in n)s[0]==="_"&&delete n[s];return n})}async _detectNetwork(){return ut.from(xe(await this._perform({method:"chainId"})))}async _translatePerform(r,n){switch(n.method){case"broadcastTransaction":return await r.broadcastTransaction(n.signedTransaction);case"call":return await r.call(Object.assign({},n.transaction,{blockTag:n.blockTag}));case"chainId":return(await r.getNetwork()).chainId;case"estimateGas":return await r.estimateGas(n.transaction);case"getBalance":return await r.getBalance(n.address,n.blockTag);case"getBlock":{const s="blockHash"in n?n.blockHash:n.blockTag;return await r.getBlock(s,n.includeTransactions)}case"getBlockNumber":return await r.getBlockNumber();case"getCode":return await r.getCode(n.address,n.blockTag);case"getGasPrice":return(await r.getFeeData()).gasPrice;case"getPriorityFee":return(await r.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await r.getLogs(n.filter);case"getStorage":return await r.getStorage(n.address,n.position,n.blockTag);case"getTransaction":return await r.getTransaction(n.hash);case"getTransactionCount":return await r.getTransactionCount(n.address,n.blockTag);case"getTransactionReceipt":return await r.getTransactionReceipt(n.hash);case"getTransactionResult":return await r.getTransactionResult(n.hash)}}async _perform(r){if(r.method==="broadcastTransaction"){const o=w(this,on).map(l=>null),a=w(this,on).map(async({provider:l,weight:u},f)=>{try{const d=await l._perform(r);o[f]=Object.assign(ib({result:d}),{weight:u})}catch(d){o[f]=Object.assign(ib({error:d}),{weight:u})}});for(;;){const l=o.filter(d=>d!=null);for(const{value:d}of l)if(!(d instanceof Error))return d;const u=hy(this.quorum,o.filter(d=>d!=null));if(Ut(u,"INSUFFICIENT_FUNDS"))throw u;const f=a.filter((d,h)=>o[h]==null);if(f.length===0)break;await Promise.race(f)}const c=ob(this.quorum,o);if(H(c!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:r,results:o.map(sb)}}),c instanceof Error)throw c;return c}await Y(this,gn,S_).call(this);const n=new Set;let s=0;for(;;){const o=Y(this,gn,L2).call(this,n,r);if(o==null||(s+=o.config.weight,s>=this.quorum))break}const i=await Y(this,gn,j2).call(this,n,r);for(const o of n)o.perform&&o.result==null&&o.config.lateResponses++;return i}async destroy(){for(const{provider:r}of w(this,on))r.destroy();super.destroy()}}on=new WeakMap,qi=new WeakMap,Nf=new WeakMap,gn=new WeakSet,k_=function(r){const n=Array.from(r).map(i=>i.config),s=w(this,on).slice();eae(s),s.sort((i,o)=>i.priority-o.priority);for(const i of s)if(!i._lastFatalError&&n.indexOf(i)===-1)return i;return null},L2=function(r,n){const s=Y(this,gn,k_).call(this,r);if(s==null)return null;const i={config:s,result:null,didBump:!1,perform:null,staller:null},o=D2();return i.perform=(async()=>{try{s.requests++;const c=await this._translatePerform(s.provider,n);i.result={result:c}}catch(c){s.errorResponses++,i.result={error:c}}const a=D2()-o;s._totalTime+=a,s.rollingDuration=.95*s.rollingDuration+.05*a,i.perform=null})(),i.staller=(async()=>{await tae(s.stallTimeout),i.staller=null})(),r.add(i),i},S_=async function(){let r=w(this,Nf);if(!r){const n=[];w(this,on).forEach(s=>{n.push((async()=>{await rae(s,0),s._lastFatalError||(s._network=await s.provider.getNetwork())})())}),T(this,Nf,r=(async()=>{await Promise.all(n);let s=null;for(const i of w(this,on)){if(i._lastFatalError)continue;const o=i._network;s==null?s=o.chainId:o.chainId!==s&&H(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await r},A_=async function(r,n){const s=[];for(const i of r)if(i.result!=null){const{tag:o,value:a}=ib(i.result);s.push({tag:o,value:a,weight:i.config.weight})}if(!(s.reduce((i,o)=>i+o.weight,0)!o._lastFatalError).map(o=>({value:o.blockNumber,tag:Pe(o.blockNumber).toString(),weight:o.weight}))))));const i=nae(this.quorum,s);return i===void 0?void 0:(i>w(this,qi)&&T(this,qi,i),w(this,qi))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return B2(this.quorum,s);case"getBlock":return"blockTag"in n&&n.blockTag==="pending"?ob(this.quorum,s):hy(this.quorum,s);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return hy(this.quorum,s);case"broadcastTransaction":return ob(this.quorum,s)}H(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${sb(n.method)})`})}},j2=async function(r,n){if(r.size===0)throw new Error("no runners?!");const s=[];let i=0;for(const a of r){if(a.perform&&s.push(a.perform),a.staller){s.push(a.staller);continue}a.didBump||(a.didBump=!0,i++)}const o=await Y(this,gn,A_).call(this,r,n);if(o!==void 0){if(o instanceof Error)throw o;return o}for(let a=0;a0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:n,results:Array.from(r).map(a=>sb(a.result))}}),await Promise.race(s),await Y(this,gn,j2).call(this,r,n)};function sae(t){return t&&typeof t.send=="function"&&typeof t.close=="function"}const iae="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function oae(t,e){e==null&&(e={});const r=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof t=="string"&&t.match(/^https?:/))return new lr(t);if(typeof t=="string"&&t.match(/^wss?:/)||sae(t))return new xS(t);let n=null;try{n=ut.from(t)}catch{}const s=[];if(r("publicPolygon")&&n&&(n.name==="matic"?s.push(new lr("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&s.push(new lr("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),r("alchemy"))try{s.push(new R0(t,e.alchemy))}catch{}if(r("ankr")&&e.ankr!=null)try{s.push(new O0(t,e.ankr))}catch{}if(r("chainstack"))try{s.push(new N0(t,e.chainstack))}catch{}if(r("cloudflare"))try{s.push(new y_(t))}catch{}if(r("etherscan"))try{s.push(new v_(t,e.etherscan))}catch{}if(r("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),s.push(new od(t,o,a))}catch{}if(r("quicknode"))try{let o=e.quicknode;s.push(new _0(t,o))}catch{}if(H(s.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),s.length===1)return s[0];let i=Math.floor(s.length/2);return i>2&&(i=2),n&&iae.indexOf(n.name)!==-1&&(i=1),e&&e.quorum&&(i=e.quorum),new C_(s,void 0,{quorum:i})}var la,Jc;const wA=class wA extends Id{constructor(r){super(r.provider);_(this,"signer");j(this,la);j(this,Jc);fe(this,{signer:r}),T(this,la,null),T(this,Jc,0)}async getAddress(){return this.signer.getAddress()}connect(r){return new wA(this.signer.connect(r))}async getNonce(r){if(r==="pending"){w(this,la)==null&&T(this,la,super.getNonce("pending"));const n=w(this,Jc);return await w(this,la)+n}return super.getNonce(r)}increment(){_l(this,Jc)._++}reset(){T(this,Jc,0),T(this,la,null)}async sendTransaction(r){const n=this.getNonce("pending");return this.increment(),r=await this.signer.populateTransaction(r),r.nonce=await n,await this.signer.sendTransaction(r)}signTransaction(r){return this.signer.signTransaction(r)}signMessage(r){return this.signer.signMessage(r)}signTypedData(r,n,s){return this.signer.signTypedData(r,n,s)}};la=new WeakMap,Jc=new WeakMap;let F2=wA;var _f;class aae extends p_{constructor(r,n,s){const i=Object.assign({},s??{},{batchMaxCount:1});I(r&&r.request,"invalid EIP-1193 provider","ethereum",r);super(n,i);j(this,_f);T(this,_f,async(o,a)=>{const c={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const l=await r.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:l}),l}catch(l){const u=new Error(l.message);throw u.code=l.code,u.data=l.data,u.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:u}),u}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){I(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await w(this,_f).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(s=>s.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await w(this,_f).call(this,"eth_requestAccounts",[])}catch(n){const s=n.payload;throw this.getRpcError(s,{id:s.id,error:n})}return await super.getSigner(r)}}_f=new WeakMap;const Op="62e1ad51b37b8e00394bda3b";function cae(t){switch(t){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}I(!1,"unsupported network","network",t)}class Eg extends lr{constructor(r,n,s){r==null&&(r="mainnet");const i=ut.from(r);n==null&&(n=Op),s==null&&(s=null);const o={staticNetwork:i},a=Eg.getRequest(i,n,s);super(a,i,o);_(this,"applicationId");_(this,"applicationSecret");fe(this,{applicationId:n,applicationSecret:s})}_getProvider(r){try{return new Eg(r,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(r)}static getRequest(r,n,s){n==null&&(n=Op);const i=new qt(`https://${cae(r.name)}/v1/lb/${n}`);return i.allowGzip=!0,s&&i.setCredentials("",s),n===Op&&(i.retryFunc=async(o,a,c)=>(Xa("PocketProvider"),!0)),i}isCommunityResource(){return this.applicationId===Op}}const lae=void 0;var Mf;const EA=class EA extends Id{constructor(r,n){super(n);_(this,"address");j(this,Mf);I(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),T(this,Mf,r);const s=Ad(this.signingKey.publicKey);fe(this,{address:s})}get signingKey(){return w(this,Mf)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new EA(w(this,Mf),r)}async signTransaction(r){r=td(r);const{to:n,from:s}=await Pt({to:r.to?ir(r.to,this.provider):void 0,from:r.from?ir(r.from,this.provider):void 0});n!=null&&(r.to=n),s!=null&&(r.from=s),r.from!=null&&(I(Ae(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const i=bl.from(r);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(Gv(r)).serialized}async signTypedData(r,n,s){const i=await js.resolveNames(r,n,s,async o=>{H(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const a=await this.provider.resolveName(o);return H(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),a});return this.signingKey.sign(js.hash(i.domain,n,i.value)).serialized}};Mf=new WeakMap;let M0=EA;const Cg=" !#$%&'()*+,-./<=>?@[]^_`{|}~",uae=/^[a-z]*$/i;function L8(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(uae)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function fae(t,e){for(let s=Cg.length-1;s>=0;s--)t=t.split(Cg[s]).join(e.substring(2*s,2*s+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(s,i,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(i.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return L8(L8(r,";"),":")}function T_(t){return I(t[0]==="0","unsupported auwl data","data",t),fae(t.substring(1+2*Cg.length),t.substring(1,1+2*Cg.length))}class I_{constructor(e){_(this,"locale");fe(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Df,r1,Yc,n1,U2;class bS extends I_{constructor(r,n,s){super(r);j(this,n1);j(this,Df);j(this,r1);j(this,Yc);T(this,Df,n),T(this,r1,s),T(this,Yc,null)}get _data(){return w(this,Df)}_decodeWords(){return T_(w(this,Df))}getWord(r){const n=Y(this,n1,U2).call(this);return I(r>=0&&r=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let s=0;for(let l=0;l=0,`invalid mnemonic word at index ${l}`,"mnemonic","[ REDACTED ]");for(let f=0;f<11;f++)u&1<<10-f&&(n[s>>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=P_(o),c=Q(Jr(n.slice(0,i/8)))[0]&a;return I(c===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),z(n.slice(0,i/8))}function lb(t,e){I(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=go.wordlist());const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&pae(8-n)),n+=3);const s=t.length/4,i=parseInt(Jr(t).substring(2,4),16)&P_(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}const ub={};class Cl{constructor(e,r,n,s,i){_(this,"phrase");_(this,"password");_(this,"wordlist");_(this,"entropy");s==null&&(s=""),i==null&&(i=go.wordlist()),xo(e,ub,"Mnemonic"),fe(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=xt("mnemonic"+this.password,"NFKD");return Ci(xt(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const s=cb(e,n);return e=lb(Q(s),n),new Cl(ub,s,e,r,n)}static fromEntropy(e,r,n){const s=Q(e,"entropy"),i=lb(s,n);return new Cl(ub,z(s),i,r,n)}static entropyToPhrase(e,r){const n=Q(e,"entropy");return lb(n,r)}static phraseToEntropy(e,r){return cb(e,r)}static isValidMnemonic(e,r){try{return cb(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var ur=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},fb=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},py,Wn,Gs;const yae={16:10,24:12,32:14},gae=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],jn=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Rp=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],vae=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],mae=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],xae=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],bae=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],wae=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Eae=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Cae=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],kae=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Sae=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Aae=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Tae=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Iae=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function db(t){const e=[];for(let r=0;r>2,ur(this,Gs,"f")[o][u%4]=i[u],ur(this,Wn,"f")[r-o][u%4]=i[u];let a=0,c=s,l;for(;c>16&255]<<24^jn[l>>8&255]<<16^jn[l&255]<<8^jn[l>>24&255]^gae[a]<<24,a+=1,s!=8)for(let h=1;h>8&255]<<8^jn[l>>16&255]<<16^jn[l>>24&255]<<24;for(let h=s/2+1;h>2,d=c%4,ur(this,Gs,"f")[f][d]=i[u],ur(this,Wn,"f")[r-f][d]=i[u++],c++}for(let u=1;u>24&255]^Aae[l>>16&255]^Tae[l>>8&255]^Iae[l&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=ur(this,Gs,"f").length-1,n=[0,0,0,0];let s=db(e);for(let a=0;a<4;a++)s[a]^=ur(this,Gs,"f")[0][a];for(let a=1;a>24&255]^mae[s[(c+1)%4]>>16&255]^xae[s[(c+2)%4]>>8&255]^bae[s[(c+3)%4]&255]^ur(this,Gs,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=ur(this,Gs,"f")[r][a],i[4*a]=(jn[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(jn[s[(a+1)%4]>>16&255]^o>>16)&255,i[4*a+2]=(jn[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(jn[s[(a+3)%4]&255]^o)&255;return i}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=ur(this,Wn,"f").length-1,n=[0,0,0,0];let s=db(e);for(let a=0;a<4;a++)s[a]^=ur(this,Wn,"f")[0][a];for(let a=1;a>24&255]^Eae[s[(c+3)%4]>>16&255]^Cae[s[(c+2)%4]>>8&255]^kae[s[(c+1)%4]&255]^ur(this,Wn,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=ur(this,Wn,"f")[r][a],i[4*a]=(Rp[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(Rp[s[(a+3)%4]>>16&255]^o>>16)&255,i[4*a+2]=(Rp[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(Rp[s[(a+1)%4]&255]^o)&255;return i}}py=new WeakMap,Wn=new WeakMap,Gs=new WeakMap;class O_{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new wS(r)},name:{enumerable:!0,value:e}})}}var Np=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},Vl=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},hh,Ii;class ES extends O_{constructor(e,r){if(super("ECC",e,ES),hh.set(this,void 0),Ii.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");Np(this,hh,new Uint8Array(r),"f")}else Np(this,hh,new Uint8Array(16),"f");Np(this,Ii,this.iv,"f")}get iv(){return new Uint8Array(Vl(this,hh,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)Fn(this,Vn,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");Fn(this,Vn,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(Fn(this,Vn,"f")[e]===255)Fn(this,Vn,"f")[e]=0;else{Fn(this,Vn,"f")[e]++;break}}encrypt(e){var r,n;const s=new Uint8Array(e);for(let i=0;i16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),I(s>0&&i>0,"invalid kdf","kdf",e);const o=Nt(t,"crypto.kdfparams.dklen:int!");return I(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:s,p:i,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Nt(t,"crypto.kdfparams.salt:data!"),n=Nt(t,"crypto.kdfparams.prf:string!"),s=n.split("-").pop();I(s==="sha256"||s==="sha512","invalid kdf.pdf","kdf.pdf",n);const i=Nt(t,"crypto.kdfparams.c:int!"),o=Nt(t,"crypto.kdfparams.dklen:int!");return I(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:i,dkLen:o,algorithm:s}}}I(!1,"unsupported key-derivation function","kdf",e)}function M_(t,e){const r=JSON.parse(t),n=N1(e),s=__(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:y}=s,p=Ci(n,f,d,h,y);return kg(r,p)}H(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:i,N:o,r:a,p:c,dkLen:l}=s,u=Qa(n,i,o,a,c,l);return kg(r,u)}function j8(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function D_(t,e,r){const n=JSON.parse(t),s=N1(e),i=__(n);if(i.name==="pbkdf2"){r&&(r(0),await j8(0));const{salt:d,count:h,dkLen:y,algorithm:p}=i,b=Ci(s,d,h,y,p);return r&&(r(1),await j8(0)),kg(n,b)}H(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:o,N:a,r:c,p:l,dkLen:u}=i,f=await Ka(s,o,a,c,l,u,r);return kg(n,f)}function B_(t){const e=t.salt!=null?Q(t.salt,"options.salt"):_r(32);let r=1<<17,n=8,s=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(s=t.scrypt.p)),I(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),I(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),I(typeof s=="number"&&s>0&&Number.isSafeInteger(s),"invalid scrypt p parameter","options.p",s),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:s}}function L_(t,e,r,n){const s=Q(r.privateKey,"privateKey"),i=n.iv!=null?Q(n.iv,"options.iv"):_r(16);I(i.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?Q(n.uuid,"options.uuid"):_r(16);I(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const a=t.slice(0,16),c=t.slice(16,32),l=new ad(a,i),u=Q(l.encrypt(s)),f=De(Ue([c,u])),d={address:r.address.substring(2).toLowerCase(),id:eN(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:z(i).substring(2)},ciphertext:z(u).substring(2),kdf:"scrypt",kdfparams:{salt:z(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:f.substring(2)}};if(r.mnemonic){const h=n.client!=null?n.client:`ethers/${Bk}`,y=r.mnemonic.path||N_,p=r.mnemonic.locale||"en",b=t.slice(32,64),g=Q(r.mnemonic.entropy,"account.mnemonic.entropy"),v=_r(16),m=new ad(b,v),k=Q(m.encrypt(g)),A=new Date,R="UTC--"+(A.getUTCFullYear()+"-"+Kd(A.getUTCMonth()+1,2)+"-"+Kd(A.getUTCDate(),2)+"T"+Kd(A.getUTCHours(),2)+"-"+Kd(A.getUTCMinutes(),2)+"-"+Kd(A.getUTCSeconds(),2)+".0Z")+"--"+d.address;d["x-ethers"]={client:h,gethFilename:R,path:y,locale:p,mnemonicCounter:z(v).substring(2),mnemonicCiphertext:z(k).substring(2),version:"0.1"}}return JSON.stringify(d)}function CS(t,e,r){r==null&&(r={});const n=N1(e),s=B_(r),i=Qa(n,s.salt,s.N,s.r,s.p,64);return L_(Q(i),s,t,r)}async function kS(t,e,r){r==null&&(r={});const n=N1(e),s=B_(r),i=await Ka(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return L_(Q(i),s,t,r)}const yy="m/44'/60'/0'/0/0",Rae=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),gi=2147483648,Nae=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_ae="0123456789abcdef";function Sg(t,e){let r="";for(;t;)r=_ae[t%16]+r,t=Math.trunc(t/16);for(;r.length=0;o-=8)s[33+(o>>3)]=t>>24-o&255;const i=Q(Ga("sha512",e,s));return{IL:i.slice(0,32),IR:i.slice(32)}}function F_(t,e){const r=e.split("/");I(r.length>0,"invalid path","path",e),r[0]==="m"&&(I(t.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${t.depth}`,"path",e),r.shift());let n=t;for(let s=0;s=16&&s.length<=64,"invalid seed","seed","[REDACTED]");const i=Q(Ga("sha512",Rae,s)),o=new Ms(z(i.slice(0,32)));return new gs(Qs,o,"0x00000000",z(i.slice(32)),"m",0,0,n,null)},j(gs,Xc);let ju=gs;class cd extends wg{constructor(r,n,s,i,o,a,c,l,u){super(n,u);_(this,"publicKey");_(this,"fingerprint");_(this,"parentFingerprint");_(this,"chainCode");_(this,"path");_(this,"index");_(this,"depth");xo(r,Qs,"HDNodeVoidWallet"),fe(this,{publicKey:s});const f=ct(qa(Jr(s)),0,4);fe(this,{publicKey:s,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:l})}connect(r){return new cd(Qs,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return H(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),W2(Ue(["0x0488B21E",Sg(this.depth,1),this.parentFingerprint,Sg(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=Pe(r,"index");I(n<=4294967295,"invalid index","index",n);let s=this.path;s&&(s+="/"+(n&~gi),n&gi&&(s+="'"));const{IR:i,IL:o}=j_(n,this.chainCode,this.publicKey,null),a=Ms.addPoints(o,this.publicKey,!0),c=Ad(a);return new cd(Qs,c,a,this.fingerprint,z(i),s,n,this.depth+1,this.provider)}derivePath(r){return F_(this,r)}}function Mae(t){const e=Pe(t,"index");return I(e>=0&&e=0&&e{setTimeout(()=>{e()},t)})}var i1,di,G2;let U_=(di=class extends M0{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new Ms(e):e;super(n,r)}connect(e){return new di(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await kS(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return CS(r,e)}static async fromEncryptedJson(e,r,n){var i;let s=null;return $2(e)?s=await D_(e,r,n):z2(e)&&(n&&(n(0),await F8(0)),s=H2(e,r),n&&(n(1),await F8(0))),Y(i=di,i1,G2).call(i,s)}static fromEncryptedJsonSync(e,r){var s;let n=null;return $2(e)?n=M_(e,r):z2(e)?n=H2(e,r):I(!1,"invalid JSON wallet","json","[ REDACTED ]"),Y(s=di,i1,G2).call(s,n)}static createRandom(e){const r=ju.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=ju.fromPhrase(e);return r?n.connect(r):n}},i1=new WeakSet,G2=function(e){if(I(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=Cl.fromEntropy(e.mnemonic.entropy),s=ju.fromMnemonic(n,e.mnemonic.path);if(s.address===e.address&&s.privateKey===e.privateKey)return s;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new di(e.privateKey);return I(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},j(di,i1),di);const Bae=")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";function Lae(t,e){const r=(1<=t;){const c=s>>i-t;s&=(1<{const s=n.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);I(s!==null,"internal error parsing accents","accents",e);let i=0;const o=Lae(parseInt(s[3]),s[4]),a=parseInt(s[2]),c=new RegExp(`([${s[1]}])`,"g");r=r.replace(c,(l,u)=>(--o[i]===0&&(u=String.fromCharCode(u.charCodeAt(0),a),i++),u))}),r.split(",")}var o1;class Fae extends bS{constructor(r,n,s,i){super(r,n,i);j(this,o1);T(this,o1,s)}get _accent(){return w(this,o1)}_decodeWords(){return jae(this._data,this._accent)}}o1=new WeakMap;const Uae={en:go.wordlist()},$ae=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Kt,AbstractProvider:id,AbstractSigner:Id,AlchemyProvider:R0,AnkrProvider:O0,BaseContract:nd,BaseWallet:M0,Block:Q7,BrowserProvider:aae,ChainstackProvider:N0,CloudflareProvider:y_,ConstructorFragment:ui,Contract:hn,ContractEventPayload:Z7,ContractFactory:pS,ContractTransactionReceipt:X7,ContractTransactionResponse:Qv,ContractUnknownEventPayload:fS,EnsPlugin:R1,EnsResolver:I0,ErrorDescription:q7,ErrorFragment:Hr,EtherSymbol:use,EtherscanPlugin:mS,EtherscanProvider:v_,EventFragment:Is,EventLog:Kv,EventPayload:Uk,FallbackFragment:oi,FallbackProvider:C_,FeeData:b2,FeeDataNetworkPlugin:C2,FetchCancelSignal:QR,FetchRequest:qt,FetchResponse:so,FetchUrlFeeDataNetworkPlugin:u_,FixedNumber:w0,Fragment:La,FunctionFragment:Ps,GasCostPlugin:O1,HDNodeVoidWallet:cd,HDNodeWallet:ju,Indexed:x2,InfuraProvider:od,InfuraWebSocketProvider:E_,Interface:ft,IpcSocketProvider:lae,JsonRpcApiProvider:vS,JsonRpcProvider:lr,JsonRpcSigner:dy,LangEn:go,Log:Td,LogDescription:H7,MaxInt256:lse,MaxUint256:n7,MessagePrefix:s7,MinInt256:cse,Mnemonic:Cl,MulticoinProviderPlugin:o_,N:ose,NamedFragment:I1,Network:ut,NetworkPlugin:Ya,NonceManager:F2,ParamType:cr,PocketProvider:Eg,QuickNodeProvider:_0,Result:ml,Signature:us,SigningKey:Ms,SocketBlockSubscriber:m_,SocketEventSubscriber:b_,SocketPendingSubscriber:x_,SocketProvider:w_,SocketSubscriber:Xv,StructFragment:Sa,Transaction:bl,TransactionDescription:G7,TransactionReceipt:lS,TransactionResponse:rd,Typed:xr,TypedDataEncoder:js,UndecodedEventLog:uS,UnmanagedSubscriber:P0,Utf8ErrorFuncs:VR,VoidSigner:wg,Wallet:U_,WebSocketProvider:xS,WeiPerEther:ase,Wordlist:I_,WordlistOwl:bS,WordlistOwlA:Fae,ZeroAddress:wi,ZeroHash:xl,accessListify:wo,assert:H,assertArgument:I,assertArgumentCount:Lk,assertNormalize:jk,assertPrivate:xo,checkResultErrors:Sre,computeAddress:Ad,computeHmac:Ga,concat:Ue,copyRequest:td,dataLength:ka,dataSlice:ct,decodeBase58:FR,decodeBase64:UR,decodeBytes32String:toe,decodeRlp:k1,decryptCrowdsaleJson:H2,decryptKeystoreJson:D_,decryptKeystoreJsonSync:M_,defaultPath:yy,defineProperties:fe,dnsEncode:O7,encodeBase58:Fk,encodeBase64:$R,encodeBytes32String:eoe,encodeRlp:Ba,encryptKeystoreJson:kS,encryptKeystoreJsonSync:CS,ensNormalize:P7,formatEther:Cre,formatUnits:ZR,fromTwos:b0,getAccountPath:Mae,getAddress:Ae,getBigInt:xe,getBytes:Q,getBytesCopy:rr,getCreate2Address:vse,getCreateAddress:eS,getDefaultProvider:oae,getIcapAddress:gse,getIndexedAccountPath:Dae,getNumber:Pe,getUint:C1,hashMessage:Gv,hexlify:z,id:Br,isAddress:hg,isAddressable:tS,isBytesLike:bi,isCallException:Bv,isCrowdsaleJson:z2,isError:Ut,isHexString:Ke,isKeystoreJson:$2,isValidName:hie,keccak256:De,lock:fse,makeError:pt,mask:da,namehash:xg,parseEther:r2,parseUnits:dg,pbkdf2:Ci,randomBytes:_r,recoverAddress:ed,resolveAddress:ir,resolveProperties:Pt,ripemd160:qa,scrypt:Ka,scryptSync:Qa,sha256:Jr,sha512:S1,showThrottleMessage:Xa,solidityPacked:Le,solidityPackedKeccak256:io,solidityPackedSha256:Rie,stripZerosLeft:ore,toBeArray:nr,toBeHex:Rn,toBigInt:kd,toNumber:jR,toQuantity:gr,toTwos:Fv,toUtf8Bytes:xt,toUtf8CodePoints:dre,toUtf8String:Ls,uuidV4:eN,verifyMessage:R7,verifyTypedData:jie,version:Bk,wordlists:Uae,zeroPadBytes:Lv,zeroPadValue:is},Symbol.toStringTag,{value:"Module"})),Wae=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var Vae=Object.freeze({__proto__:null,abi:Wae});const zae=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],Hae={isValidSignatureBytes32:"0x1626ba7e"};var Gae=Object.freeze({__proto__:null,abi:zae,returns:Hae});const qae=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var Kae=Object.freeze({__proto__:null,abi:qae});const Qae=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var Jae=Object.freeze({__proto__:null,abi:Qae});const Yae=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var Xae=Object.freeze({__proto__:null,abi:Yae});const Zae=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var ece=Object.freeze({__proto__:null,abi:Zae});const tce=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var rce=Object.freeze({__proto__:null,abi:tce});const nce=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var sce=Object.freeze({__proto__:null,abi:nce});const Gt={erc6492:Kae,erc5719:Vae,erc1271:Gae,factory:Jae,mainModule:Xae,mainModuleUpgradable:ece,sequenceUtils:rce,requireFreshSigner:sce},ice=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Gt},Symbol.toStringTag,{value:"Module"}));function Ag(){return Ag=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ve({},n,s)).then(i=>me(i).then(o=>({status:o.status})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),ve({},n,s)).then(i=>me(i).then(o=>({version:o.version})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),ve({},n,s)).then(i=>me(i).then(o=>({status:o.status})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.clock=(n,s)=>this.fetch(this.url("Clock"),ve({},n,s)).then(i=>me(i).then(o=>({serverTime:o.serverTime})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getSequenceContext=(n,s)=>this.fetch(this.url("GetSequenceContext"),ve({},n,s)).then(i=>me(i).then(o=>({data:o.data})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getAuthToken=(n,s,i)=>this.fetch(this.url("GetAuthToken"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,jwtToken:a.jwtToken,address:a.address,user:a.user})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getAuthToken2=(n,s,i)=>this.fetch(this.url("GetAuthToken2"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,jwtToken:a.jwtToken,address:a.address,user:a.user})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sendPasswordlessLink=(n,s,i)=>this.fetch(this.url("SendPasswordlessLink"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.friendList=(n,s,i)=>this.fetch(this.url("FriendList"),ve(n,s,i)).then(o=>me(o).then(a=>({page:a.page,friends:a.friends})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getFriendByAddress=(n,s,i)=>this.fetch(this.url("GetFriendByAddress"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.searchFriends=(n,s,i)=>this.fetch(this.url("SearchFriends"),ve(n,s,i)).then(o=>me(o).then(a=>({friends:a.friends})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.addFriend=(n,s,i)=>this.fetch(this.url("AddFriend"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateFriendNickname=(n,s,i)=>this.fetch(this.url("UpdateFriendNickname"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.removeFriend=(n,s,i)=>this.fetch(this.url("RemoveFriend"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.contractCall=(n,s,i)=>this.fetch(this.url("ContractCall"),ve(n,s,i)).then(o=>me(o).then(a=>({returns:a.returns})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.decodeContractCall=(n,s,i)=>this.fetch(this.url("DecodeContractCall"),ve(n,s,i)).then(o=>me(o).then(a=>({call:a.call})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.lookupContractCallSelectors=(n,s,i)=>this.fetch(this.url("LookupContractCallSelectors"),ve(n,s,i)).then(o=>me(o).then(a=>({signatures:a.signatures})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageFetch=(n,s,i)=>this.fetch(this.url("UserStorageFetch"),ve(n,s,i)).then(o=>me(o).then(a=>({object:a.object})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageSave=(n,s,i)=>this.fetch(this.url("UserStorageSave"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageDelete=(n,s,i)=>this.fetch(this.url("UserStorageDelete"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageFetchAll=(n,s,i)=>this.fetch(this.url("UserStorageFetchAll"),ve(n,s,i)).then(o=>me(o).then(a=>({objects:a.objects})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMoonpayLink=(n,s,i)=>this.fetch(this.url("GetMoonpayLink"),ve(n,s,i)).then(o=>me(o).then(a=>({signedUrl:a.signedUrl})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.resolveENSAddress=(n,s,i)=>this.fetch(this.url("ResolveENSAddress"),ve(n,s,i)).then(o=>me(o).then(a=>({address:a.address,ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidSignature=(n,s,i)=>this.fetch(this.url("IsValidSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidMessageSignature=(n,s,i)=>this.fetch(this.url("IsValidMessageSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidTypedDataSignature=(n,s,i)=>this.fetch(this.url("IsValidTypedDataSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidETHAuthProof=(n,s,i)=>this.fetch(this.url("IsValidETHAuthProof"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetClientToken=(n,s)=>this.fetch(this.url("SardineGetClientToken"),ve({},n,s)).then(i=>me(i).then(o=>({token:o.token})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetNFTCheckoutToken=(n,s,i)=>this.fetch(this.url("SardineGetNFTCheckoutToken"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetNFTCheckoutOrderStatus=(n,s,i)=>this.fetch(this.url("SardineGetNFTCheckoutOrderStatus"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetSupportedRegions=(n,s)=>this.fetch(this.url("SardineGetSupportedRegions"),ve({},n,s)).then(i=>me(i).then(o=>({regions:o.regions})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetSupportedFiatCurrencies=(n,s)=>this.fetch(this.url("SardineGetSupportedFiatCurrencies"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetSupportedTokens=(n,s)=>this.fetch(this.url("SardineGetSupportedTokens"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetEnabledTokens=(n,s)=>this.fetch(this.url("SardineGetEnabledTokens"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetQuote=(n,s,i)=>this.fetch(this.url("SardineGetQuote"),ve(n,s,i)).then(o=>me(o).then(a=>({quote:a.quote})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSardineClientToken=(n,s)=>this.fetch(this.url("GetSardineClientToken"),ve({},n,s)).then(i=>me(i).then(o=>({token:o.token})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getSardineNFTCheckoutToken=(n,s,i)=>this.fetch(this.url("GetSardineNFTCheckoutToken"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSardineNFTCheckoutOrderStatus=(n,s,i)=>this.fetch(this.url("GetSardineNFTCheckoutOrderStatus"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getCoinPrices=(n,s,i)=>this.fetch(this.url("GetCoinPrices"),ve(n,s,i)).then(o=>me(o).then(a=>({tokenPrices:a.tokenPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getCollectiblePrices=(n,s,i)=>this.fetch(this.url("GetCollectiblePrices"),ve(n,s,i)).then(o=>me(o).then(a=>({tokenPrices:a.tokenPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getExchangeRate=(n,s,i)=>this.fetch(this.url("GetExchangeRate"),ve(n,s,i)).then(o=>me(o).then(a=>({exchangeRate:a.exchangeRate})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.memoryStore=(n,s,i)=>this.fetch(this.url("MemoryStore"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.memoryLoad=(n,s,i)=>this.fetch(this.url("MemoryLoad"),ve(n,s,i)).then(o=>me(o).then(a=>({value:a.value})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getInviteInfo=(n,s)=>this.fetch(this.url("GetInviteInfo"),ve({},n,s)).then(i=>me(i).then(o=>({inviteInfo:o.inviteInfo})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.isValidAccessCode=(n,s,i)=>this.fetch(this.url("IsValidAccessCode"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.internalClaimAccessCode=(n,s,i)=>this.fetch(this.url("InternalClaimAccessCode"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.blockNumberAtTime=(n,s,i)=>this.fetch(this.url("BlockNumberAtTime"),ve(n,s,i)).then(o=>me(o).then(a=>({blocks:a.blocks})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.paperSessionSecret=(n,s,i)=>this.fetch(this.url("PaperSessionSecret"),ve(n,s,i)).then(o=>me(o).then(a=>({secret:a.secret})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.paperSessionSecret2=(n,s,i)=>this.fetch(this.url("PaperSessionSecret2"),ve(n,s,i)).then(o=>me(o).then(a=>({secret:a.secret})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.linkWallet=(n,s,i)=>this.fetch(this.url("LinkWallet"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getLinkedWallets=(n,s,i)=>this.fetch(this.url("GetLinkedWallets"),ve(n,s,i)).then(o=>me(o).then(a=>({linkedWallets:a.linkedWallets})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.removeLinkedWallet=(n,s,i)=>this.fetch(this.url("RemoveLinkedWallet"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.generateWaaSVerificationURL=(n,s,i)=>this.fetch(this.url("GenerateWaaSVerificationURL"),ve(n,s,i)).then(o=>me(o).then(a=>({nonce:a.nonce,verificationURL:a.verificationURL})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.validateWaaSVerificationNonce=(n,s,i)=>this.fetch(this.url("ValidateWaaSVerificationNonce"),ve(n,s,i)).then(o=>me(o).then(a=>({walletAddress:a.walletAddress})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSwapPrices=(n,s,i)=>this.fetch(this.url("GetSwapPrices"),ve(n,s,i)).then(o=>me(o).then(a=>({swapPrices:a.swapPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSwapQuote=(n,s,i)=>this.fetch(this.url("GetSwapQuote"),ve(n,s,i)).then(o=>me(o).then(a=>({swapQuote:a.swapQuote})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listCurrencyGroups=(n,s)=>this.fetch(this.url("ListCurrencyGroups"),ve({},n,s)).then(i=>me(i).then(o=>({currencyGroups:o.currencyGroups})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.addOffchainInventory=(n,s,i)=>this.fetch(this.url("AddOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({inventoryId:a.inventoryId})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getOffchainInventory=(n,s,i)=>this.fetch(this.url("GetOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({inventory:a.inventory})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listOffchainInventories=(n,s,i)=>this.fetch(this.url("ListOffchainInventories"),ve(n,s,i)).then(o=>me(o).then(a=>({inventory:a.inventory})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateOffchainInventory=(n,s,i)=>this.fetch(this.url("UpdateOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.deleteOffchainInventory=(n,s,i)=>this.fetch(this.url("DeleteOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.requestOffchainPayment=(n,s,i)=>this.fetch(this.url("RequestOffchainPayment"),ve(n,s,i)).then(o=>me(o).then(a=>({payment:a.payment})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listOffchainPayments=(n,s,i)=>this.fetch(this.url("ListOffchainPayments"),ve(n,s,i)).then(o=>me(o).then(a=>({page:a.page,payments:a.payments})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const ve=(t={},e={},r=null)=>({method:"POST",headers:Ag({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),me=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),SS.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(pce[n]||Rt).new(r)}return r});let Rt=class W_ extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,W_.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},V_=class z_ extends Rt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,z_.prototype)}},ye=class H_ extends Rt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,H_.prototype)}},G_=class q_ extends Rt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,q_.prototype)}},K_=class Q_ extends Rt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Q_.prototype)}},J_=class Y_ extends Rt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Y_.prototype)}},SS=class X_ extends Rt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,X_.prototype)}},Z_=class eM extends Rt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eM.prototype)}},tM=class rM extends Rt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rM.prototype)}},nM=class sM extends Rt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sM.prototype)}},iM=class oM extends Rt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,oM.prototype)}},aM=class cM extends Rt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cM.prototype)}},lM=class uM extends Rt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uM.prototype)}},fM=class dM extends Rt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dM.prototype)}},hM=class pM extends Rt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pM.prototype)}},yM=class gM extends Rt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gM.prototype)}},vM=class mM extends Rt{constructor(e="Geoblocked",r=1006,n="Geoblocked region",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mM.prototype)}},xM=class bM extends Rt{constructor(e="InvalidArgument",r=2e3,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bM.prototype)}},wM=class EM extends Rt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,EM.prototype)}},CM=class kM extends Rt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kM.prototype)}},SM=class AM extends Rt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,AM.prototype)}},hce=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.Aborted="Aborted",t.Geoblocked="Geoblocked",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.NotFound="NotFound",t}({});const pce={0:V_,[-1]:ye,[-2]:G_,[-3]:K_,[-4]:J_,[-5]:SS,[-6]:Z_,[-7]:tM,[-8]:nM,[-9]:iM,[-10]:aM,1e3:lM,1001:fM,1002:hM,1005:yM,1006:vM,2e3:xM,2002:wM,2003:CM,3e3:SM};class gy extends $_{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,fetch),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=Ag({},i.headers,o),fetch(s,i)},this.fetch=this._fetch}}const yce=Object.freeze(Object.defineProperty({__proto__:null,API:$_,AbortedError:yM,GeoblockedError:vM,InvalidArgumentError:xM,NotFoundError:SM,PermissionDeniedError:fM,QueryFailedError:CM,SardinePaymentType:uce,SardineQuoteType:fce,SequenceAPIClient:gy,SessionExpiredError:hM,SortOrder:lce,TokenType:dce,UnauthorizedError:lM,UnavailableError:wM,WebRPCSchemaHash:cce,WebRPCSchemaVersion:ace,WebRPCVersion:oce,WebrpcBadMethodError:K_,WebrpcBadRequestError:J_,WebrpcBadResponseError:SS,WebrpcBadRouteError:G_,WebrpcClientDisconnectedError:nM,WebrpcEndpointError:V_,WebrpcError:Rt,WebrpcInternalErrorError:tM,WebrpcRequestFailedError:ye,WebrpcServerPanicError:Z_,WebrpcStreamFinishedError:aM,WebrpcStreamLostError:iM,errors:hce},Symbol.toStringTag,{value:"Module"})),TM="3.7.7",gce=TM,Pd=typeof Buffer=="function",U8=typeof TextDecoder=="function"?new TextDecoder:void 0,$8=typeof TextEncoder=="function"?new TextEncoder:void 0,vce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",gh=Array.prototype.slice.call(vce),_p=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(gh),mce=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,pr=String.fromCharCode.bind(String),W8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),IM=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),PM=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),OM=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=gh[e>>18&63]+gh[e>>12&63]+gh[e>>6&63]+gh[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},AS=typeof btoa=="function"?t=>btoa(t):Pd?t=>Buffer.from(t,"binary").toString("base64"):OM,q2=Pd?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?IM(q2(t)):q2(t),xce=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?pr(192|e>>>6)+pr(128|e&63):pr(224|e>>>12&15)+pr(128|e>>>6&63)+pr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return pr(240|e>>>18&7)+pr(128|e>>>12&63)+pr(128|e>>>6&63)+pr(128|e&63)}},bce=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,RM=t=>t.replace(bce,xce),V8=Pd?t=>Buffer.from(t,"utf8").toString("base64"):$8?t=>q2($8.encode(t)):t=>AS(RM(t)),Fu=(t,e=!1)=>e?IM(V8(t)):V8(t),z8=t=>Fu(t,!0),wce=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ece=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return pr((r>>>10)+55296)+pr((r&1023)+56320);case 3:return pr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return pr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},NM=t=>t.replace(wce,Ece),_M=t=>{if(t=t.replace(/\s+/g,""),!mce.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?pr(e>>16&255,e>>8&255):pr(e>>16&255,e>>8&255,e&255);return r},TS=typeof atob=="function"?t=>atob(PM(t)):Pd?t=>Buffer.from(t,"base64").toString("binary"):_M,MM=Pd?t=>W8(Buffer.from(t,"base64")):t=>W8(TS(t).split("").map(e=>e.charCodeAt(0))),DM=t=>MM(BM(t)),Cce=Pd?t=>Buffer.from(t,"base64").toString("utf8"):U8?t=>U8.decode(MM(t)):t=>NM(TS(t)),BM=t=>PM(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),K2=t=>Cce(BM(t)),kce=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},LM=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),jM=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,LM(r));t("fromBase64",function(){return K2(this)}),t("toBase64",function(e){return Fu(this,e)}),t("toBase64URI",function(){return Fu(this,!0)}),t("toBase64URL",function(){return Fu(this,!0)}),t("toUint8Array",function(){return DM(this)})},FM=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,LM(r));t("toBase64",function(e){return vy(this,e)}),t("toBase64URI",function(){return vy(this,!0)}),t("toBase64URL",function(){return vy(this,!0)})},Sce=()=>{jM(),FM()},kl={version:TM,VERSION:gce,atob:TS,atobPolyfill:_M,btoa:AS,btoaPolyfill:OM,fromBase64:K2,toBase64:Fu,encode:Fu,encodeURI:z8,encodeURL:z8,utob:RM,btou:NM,decode:K2,isValid:kce,fromUint8Array:vy,toUint8Array:DM,extendString:jM,extendUint8Array:FM,extendBuiltins:Sce};var Q2=function(){return Q2=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),Ice=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},Pce=function(t,e,r){return dc(void 0,void 0,void 0,function(){var n,s;return hc(this,function(i){return n=r.messageDigest(),s=R7(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Oce=function(t,e,r){return dc(void 0,void 0,void 0,function(){var n,s,i,o,a;return hc(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=c.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new hn(r.address,i,t),[4,o.isValidSignature(n,Q(r.signature))];case 2:return a=c.sent(),a===Rce?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},Rce="0x1626ba7e",Tg=function(){function t(){for(var e=[],r=0;r0&&(c+="."+s.extra),[2,c]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),dc(n,void 0,void 0,function(){var o,a,c,l,u,f,d,h,y,p;return hc(this,function(b){switch(b.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],a!==J2)throw new Error("ethauth: not an ethauth proof");return d=kl.decode(l),h=JSON.parse(d),y=new IS({address:c,claims:h,signature:u,extra:f}),[4,this.validateProof(y,i)];case 1:if(p=b.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,y]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),dc(n,void 0,void 0,function(){var o,a;return hc(this,function(c){switch(c.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return dc(n,void 0,void 0,function(){var i,c,o,a,c;return hc(this,function(l){switch(l.label){case 0:i=[],c=0,l.label=1;case 1:if(!(c{const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=atob(e),n=new Uint8Array(r.length);for(let o=0;ot!=null&&(typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Ke(t)||typeof t=="bigint"),nl=t=>{const e=t.toString(16);return`${e.length%2===0?"0x":"0x0"}${e}`},VM=(t,e=18)=>{let[r,n="0"]=t.split(".");const s=r.startsWith("-");if(s&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)r=`${Math.round(+`${r}.${n}`)}`,n="";else if(n.length>e){const[i,o,a]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${o}.${a}`);c>9?n=`${BigInt(i)+1n}0`.padStart(i.length+1,"0"):n=`${i}${c}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${s?"-":""}${r}${n}`)},_ce=t=>VM(t,18),zM=(t,e=18)=>{let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");const s=r.slice(0,r.length-e);let i=r.slice(r.length-e);return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`},Mce=t=>zM(t,18),Os=(t,e)=>typeof e=="bigint"?{$bigint:e.toString()}:e,Zv=(t,e)=>e!==null&&typeof e=="object"&&"$bigint"in e&&typeof e.$bigint=="string"?BigInt(e.$bigint):e!==null&&typeof e=="object"&&e.type==="BigNumber"&&Ke(e.hex)?BigInt(e.hex):e,Dce=t=>kl.encode(t,!0),PS=t=>kl.encode(JSON.stringify(t,Os),!0),Bce=t=>{if(t!=null)return kl.decode(t)},OS=t=>{if(t!=null)return JSON.parse(kl.decode(t),Zv)},RS=t=>Q(typeof t=="string"?Br(t):De(t)),HM=(t,e,r)=>Le(["string","uint256","address","bytes32"],["",e,t,r]),Y2=(t,e,r)=>De(HM(t,e,r)),GM=()=>typeof window>"u"&&typeof process=="object",Lce=()=>!GM(),qM=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(kl.decode(e[1]))};function Ig(){return Ig=Object.assign?Object.assign.bind():function(t){for(var e=1;eIe.configure(t);class Vt{static bufferIndexOf(e,r,n=!1){if(n)return Vt.binarySearch(e,r,Vt.compare);const s=(i,o)=>{if(i===o)return!0;if(i.length!==o.length)return!1;for(let a=0;a=0;c--)if(n(e[c],r)!==0)return c+1;return 0}else a<0?s=o+1:i=o-1}return-1}static compare(e,r){const n=Math.min(e.length,r.length);for(let s=0;sVt.bufferify(e(r))}}class jce extends Vt{constructor(e,r={}){super(),this.hashFn=void 0,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sortLeaves=!!r.sortLeaves,this.sortPairs=!!r.sortPairs,this.hashFn=Vt.bufferifyFn(De),this.processLeaves(e)}getOptions(){return{sortLeaves:this.sortLeaves,sortPairs:this.sortPairs}}processLeaves(e){this.leaves=e.map(Vt.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(Vt.compare)),this.createHashes(this.leaves)}createHashes(e){for(this.layers=[e];e.length>1;){const r=this.layers.length;this.layers.push([]);const n=e.length;for(let s=0;s=n){this.layers[r].push(...e.slice(n));break}else if(s+1===e.length&&e.length%2===1){this.layers[r].push(e[s]);continue}const i=e[s],o=s+1===e.length?i:e[s+1],a=[i,o];this.sortPairs&&a.sort(Vt.compare);const c=this.hashFn(Ue(a));this.layers[r].push(c)}e=this.layers[r]}}getRoot(){return this.layers.length===0?Uint8Array.from([]):this.layers[this.layers.length-1][0]||Uint8Array.from([])}getHexRoot(){return Vt.bufferToHex(this.getRoot())}getProof(e,r){if(typeof e>"u")throw new Error("leaf is required");e=Vt.bufferify(e);const n=[];if(!Number.isInteger(r)){r=-1;for(let s=0;sVt.bufferToHex(n.data))}verify(e,r,n){let s=Vt.bufferify(r);if(n=Vt.bufferify(n),!Array.isArray(e)||!r||!n)return!1;for(let i=0;ithis.toLeaf(r));return new jce(e,{sortPairs:!0,sortLeaves:!0})}generateRoot(){return this.tree||(this.tree=this.generateTree()),this.tree.getHexRoot()}generateProof(e){if(!this.elements.includes(e))throw new Error("Element not found");return this.tree||(this.tree=this.generateTree()),this.tree.getHexProof(this.toLeaf(e))}verifyProof(e,r){if(!this.elements.includes(e))throw new Error("Element not found");return this.tree||(this.tree=this.generateTree()),this.tree.verify(r,this.toLeaf(e),this.generateRoot())}}const Uce=t=>io(["address","uint256"],[t.address.toLowerCase(),t.tokenId]),B0=(t,e,r)=>{const n=new qt(t);return r&&n.setHeader("Authorization",`BEARER ${r}`),e&&n.setHeader("X-Access-Key",e),n};let $ce=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Br(JSON.stringify(s,Wce))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Wce(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Vce(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function zce(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function Hce(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const Gce=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),JM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},YM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},XM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},qce=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),ZM=t=>{const e=Ig({},t.types);return delete e.EIP712Domain,js.hash(t.domain,e,t.message)},Od=t=>Q(ZM(t)),{defineProperties:Kce,resolveProperties:Qce}=$ae,Jce=t=>t.replace(/([^:]\/)\/+/g,"$1"),Yce=Object.freeze(Object.defineProperty({__proto__:null,Logger:KM,MAX_UINT_256:$M,MerkleTreeGenerator:Fce,PromiseCache:$ce,base64Decode:Bce,base64DecodeObject:OS,base64Encode:Dce,base64EncodeObject:PS,bigintReplacer:Os,bigintReviver:Zv,configureLogger:QM,defineProperties:Kce,encodeMessageDigest:RS,encodeTypedDataDigest:Od,encodeTypedDataHash:ZM,extractProjectIdFromAccessKey:Nce,formatEther:Mce,formatUnits:zM,getFetchRequest:B0,getRandomInt:Gce,getSaleItemsLeaf:Uce,isBigNumberish:WM,isBrowser:Lce,isNode:GM,jwtDecodeClaims:qM,logger:Ie,packMessageData:HM,parseEther:_ce,parseUnits:VM,promisify:Vce,queryStringFromObject:zce,queryStringToObject:Hce,resolveProperties:Qce,sanitizeAlphanumeric:YM,sanitizeHost:XM,sanitizeNumberString:JM,sleep:qce,subDigestOf:Y2,toHexString:nl,urlClean:Jce},Symbol.toStringTag,{value:"Module"}));function ld(){return ld=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Number(t),Zce=t=>{if(t)return eD(t)},tD=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const s=n.map(l=>l.chainId).sort(),i=s.filter((l,u)=>s.indexOf(l)!==u);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(tD(t,!0,e),t),ele=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},tle=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},nD=t=>rD(sD(t)),os=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Number(e);return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(typeof e=="bigint"){const r=Number(e);return t.find(n=>n.chainId===r)}else return}},rle=(t,e)=>t?t.name===e||t.chainId===e:!1,nle=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},em=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",iD=t=>em("https://${network}-indexer.sequence.app",{network:t}),oD=t=>em("https://${network}-relayer.sequence.app",{network:t}),aD=t=>em("https://nodes.sequence.app/${network}",{network:t});function NS(t){return os(_1,t)}function cD(t){return typeof t=="bigint"?t:WM(t)?BigInt(t):BigInt(t.chainId)}const Ne=(t,e)=>{const r=D0[t];if(!r)throw new Error(`Network with chainId ${t} not found`);const n=aD(r.name);return ld({},r,{rpcUrl:n,indexerUrl:iD(r.name),relayer:{url:oD(r.name),provider:{url:n}}},e)},lD=[ld({},D0[M.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),ld({},D0[M.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],_1=nD([ld({},Ne(M.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),Ne(M.MAINNET),Ne(M.BSC),Ne(M.AVALANCHE),Ne(M.ARBITRUM),Ne(M.ARBITRUM_NOVA),Ne(M.OPTIMISM),Ne(M.OPTIMISM_SEPOLIA),Ne(M.POLYGON_ZKEVM),Ne(M.GNOSIS),Ne(M.RINKEBY,{disabled:!0}),Ne(M.GOERLI,{disabled:!0}),Ne(M.SEPOLIA),Ne(M.POLYGON_MUMBAI,{disabled:!0}),Ne(M.POLYGON_AMOY),Ne(M.BSC_TESTNET),Ne(M.ARBITRUM_SEPOLIA),Ne(M.BASE),Ne(M.BASE_SEPOLIA),Ne(M.HOMEVERSE),Ne(M.HOMEVERSE_TESTNET),Ne(M.XAI),Ne(M.XAI_SEPOLIA),Ne(M.AVALANCHE_TESTNET),Ne(M.XR_SEPOLIA),Ne(M.B3),Ne(M.B3_SEPOLIA),Ne(M.APECHAIN),Ne(M.APECHAIN_TESTNET),Ne(M.BLAST),Ne(M.BLAST_SEPOLIA),Ne(M.TELOS),Ne(M.TELOS_TESTNET),Ne(M.BORNE_TESTNET),Ne(M.SKALE_NEBULA),Ne(M.SKALE_NEBULA_TESTNET),Ne(M.SONEIUM),Ne(M.SONEIUM_MINATO),Ne(M.TOY_TESTNET),Ne(M.IMMUTABLE_ZKEVM),Ne(M.IMMUTABLE_ZKEVM_TESTNET),Ne(M.ROOT_NETWORK),Ne(M.ROOT_NETWORK_PORCINI),Ne(M.LAOS),Ne(M.LAOS_SIGMA_TESTNET),...lD]);class uD{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=fD(e,this.sender)}request(e){return this.handler.request(e)}}const fD=(t,e)=>{if(t.length===0)return e;const r=s=>s.requestHandler?s.requestHandler:s;let n;n=r(t[t.length-1])(e.request);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return{request:n}};function dD(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function hD(t){return t!==void 0&&t.send!==void 0}class pD{constructor(e,r){this.provider=void 0,this.defaultChainId=void 0,this.request=n=>(n.chainId||(n.chainId=this.defaultChainId),this.provider(n)),hD(e)?this.provider=n=>e.send(n.method,n.params,n.chainId):dD(e)?this.provider=n=>e.send(n.method,n.params||[]):this.provider=e,this.defaultChainId=r}send(e,r,n){const s={method:e,params:r,chainId:n};return this.request(s)}}class sle{constructor(e){this.requestHandler=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.requestHandler=X2(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.requestHandler=X2(this.isAllowedFunc)}}const X2=t=>e=>r=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");return e(r)};class _S{constructor(e){var r=this;this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.requestHandler=n=>async function(s){if(r.cachableJsonRpcMethods.includes(s.method)||r.cachableJsonRpcMethodsByBlock.includes(s.method)){const o=r.cacheKey(s.method,s.params,s.chainId||r.defaultChainId),a=r.getCacheValue(o);if(a&&a!=="")return{id:s.id,result:a}}const i=await n(s);if((r.cachableJsonRpcMethods.includes(s.method)||r.cachableJsonRpcMethodsByBlock.includes(s.method))&&i&&r.shouldCacheResponse(s,i)){const o=r.cacheKey(s.method,s.params,s.chainId||r.defaultChainId);r.cachableJsonRpcMethods.includes(s.method)?r.setCacheValue(o,i):r.setCacheByBlockValue(o,i)}return i},this.cacheKey=(n,s,i)=>{let o="";return i?o=`${i}:${n}:`:o=`:${n}:`,!s||s.length===0?o+"[]":o+JSON.stringify(s)},this.getCache=()=>this.cache,this.setCache=n=>{this.cache=n,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=n=>{if(this.cache[n])return this.cache[n];if(this.cacheByBlock[n])return this.cacheByBlock[n]},this.setCacheValue=(n,s)=>{this.cache[n]=s,this.onUpdateCallback&&this.onUpdateCallback(n,s)},this.setCacheByBlockValue=(n,s)=>{this.cacheByBlock[n]=s,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(n,s)=>!(!s||n.method==="eth_getCode"&&s.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class yD{constructor(e){var r=this;this.options=void 0,this.requestHandler=n=>async function(s){switch(s.method){case"net_version":if(r.options.chainId)return`${r.options.chainId}`;break;case"eth_chainId":if(r.options.chainId)return gr(r.options.chainId);break;case"eth_accounts":if(r.options.accountAddress)return[Ae(r.options.accountAddress)];break;case"sequence_getWalletContext":if(r.options.walletContext)return r.options.walletContext;break}return n(s)},this.options=e}}const gD=t=>async e=>{try{return await t(e)}catch(r){throw typeof r=="string"?new Error(r):new Error(r.message)}},vD=t=>async e=>{const r=e.chainId?` chainId:${e.chainId}`:"";Ie.info(`[provider request]${r} id:${e.id} method:${e.method} params:`,e.params);try{const n=await t(e);return Ie.info(`[provider response]${r} id:${e.id} method:${e.method} params:`,e.params,"result:",n),n}catch(n){Ie.warn(`[provider response]${r} id:${e.id} method:${e.method} params:`,e.params,"error:",n)}},ile=t=>e=>async r=>{const n=t(r);switch(r.method){case"net_version":return`${n}`;case"eth_chainId":return gr(n)}return e(r)},mD=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class ole{constructor(e){this.provider=void 0,this.requestHandler=r=>n=>mD.includes(n.method)?this.provider.request(n):r(n),this.provider=e}}class ale{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...mD],this.provider=void 0,this.rpcUrl=void 0,this.requestHandler=r=>n=>this.provider&&!this.privateJsonRpcMethods.includes(n.method)?this.provider.send(n.method,n.params||[]):(Ie.debug("[public-provider] sending request to signer window",n.method),r(n)),e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new lr(e))}}class xD{constructor(){var e=this;this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.requestHandler=r=>async function(n){if(!e.singleflightJsonRpcMethods.includes(n.method))return r(n);const s=e.requestKey(n.method,n.params||[],n.chainId);if(!e.inflight[s])e.inflight[s]=[];else return new Promise((i,o)=>{e.inflight[s].push({id:n.id,callback:(a,c)=>{a?o(a):i(c)}})});try{const i=await r(n);return e.inflight[s].forEach(({callback:o})=>o(void 0,i)),i}catch(i){throw e.inflight[s].forEach(({callback:o})=>o(i,void 0)),i}finally{delete e.inflight[s]}},this.requestKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+JSON.stringify(n)},this.inflight={}}}function Hl(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var cle=0;function MS(t){return"__private_"+cle+++"_"+t}var tc=MS("chainId"),hb=MS("nextId"),Qd=MS("sender");class bD extends lr{constructor(e,r,n){var s;super(e,r==null?void 0:r.chainId,n),s=this,this.url=e,Object.defineProperty(this,tc,{writable:!0,value:void 0}),Object.defineProperty(this,hb,{writable:!0,value:1}),Object.defineProperty(this,Qd,{writable:!0,value:void 0}),this.fetch=async function(l){if(s.url===void 0)throw new Error("missing provider URL");const{method:u,params:f}=l,d={method:u,params:f,id:Hl(s,hb)[hb]++,jsonrpc:"2.0"},h=typeof s.url=="string"?new qt(s.url):s.url;h.body=JSON.stringify(d);try{const y=await h.send();if(y.body)try{const p=JSON.parse(Ls(y.body));return lle(p)}catch{throw new Error("invalid JSON response")}return null}catch(y){throw y}};const i=r==null?void 0:r.chainId,o=r==null?void 0:r.middlewares,a=r==null?void 0:r.blockCache;Hl(this,tc)[tc]=i;const c=new uD(o??[new yD({chainId:i}),new xD,new _S({defaultChainId:i,blockCache:a})],new pD(this.fetch,i));Hl(this,Qd)[Qd]=c}async request(e){return Hl(this,Qd)[Qd].request(e)}async send(e,r,n){return this.request({method:e,params:r,chainId:n})}async getNetwork(){const e=Hl(this,tc)[tc];if(e){const r=D0[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return ut.from({name:n,chainId:e,ensAddress:s})}else{const r=await this.send("eth_chainId",[]);return Hl(this,tc)[tc]=Number(r),this.getNetwork()}}}function lle(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const ule=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:sle,CachedProvider:_S,ChainId:M,EagerProvider:yD,JsonRpcHandler:pD,JsonRpcProvider:bD,JsonRpcRouter:uD,NetworkType:Te,PublicProvider:ale,SigningProvider:ole,SingleflightMiddleware:xD,allNetworks:_1,allowProviderMiddleware:X2,checkNetworkConfig:rle,createJsonRpcMiddlewareStack:fD,ensureUniqueNetworks:ele,ensureValidNetworks:rD,exceptionProviderMiddleware:gD,findNetworkConfig:os,findSupportedNetwork:NS,getChainId:eD,hardhatNetworks:lD,indexerURL:iD,isJsonRpcProvider:dD,isJsonRpcSender:hD,isNetworkConfig:Xce,isValidNetworkConfig:tD,loggingProviderMiddleware:vD,maybeChainId:Zce,networkProviderMiddleware:ile,networks:D0,networksIndex:nle,nodesURL:aD,relayerURL:oD,sortNetworks:sD,stringTemplate:em,toChainIdNumber:cD,updateNetworkConfig:tle,validateAndSortNetworks:nD},Symbol.toStringTag,{value:"Module"}));function vr(){return vr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(BS(s))return Le(["uint8","uint8","address"],[sl.Address,s.weight,s.address]);if(s.isDynamic){const i=Q(s.signature);return Le(["uint8","uint8","address","uint16","bytes"],[sl.DynamicSignature,s.weight,s.address,i.length,i])}return Le(["uint8","uint8","bytes"],[sl.EOASignature,s.weight,s.signature])});return Le(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function AD(t,e,r){const n=M1(e),s=await Promise.all(t.signers.map(async i=>{if(BS(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!DS(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:D1(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function Dh(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=0n;const i=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=Q(c.signature);return s+=BigInt(a.weight),c.isDynamic||l.length!==66?vr({},a,{isDynamic:!0,signature:c.signature,address:a.address}):vr({},a,{isDynamic:!1,signature:c.signature})});return{encoded:LS({version:1,threshold:t.threshold,signers:i}),weight:s}}const jS={decode:t=>SD(t),encode:t=>LS(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>AD(t,e,r),encodeSigners:(t,e,r,n)=>Dh(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=jS.encodeSigners(t,e,[],0);return r>=BigInt(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var mle=Object.freeze({__proto__:null,SignaturePartType:sl,isAddressMember:BS,isUnrecoveredSignatureMember:CD,isUnrecoveredSignature:kD,decodeSignature:SD,encodeSignature:LS,recoverSignature:AD,encodeSigners:Dh,SignatureCoder:jS});const FS={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>De(Kt.defaultAbiCoder().encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Le(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>0n,signersOf:t=>t.signers.map(e=>({address:e.address,weight:Number(e.weight)})),fromSimple:t=>{if(BigInt(t.checkpoint)!==0n)throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new ft([...Gt.mainModule.abi,...Gt.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[FS.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:BigInt(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:BigInt(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:BigInt(n.weight),address:n.address}));return{version:e.version,threshold:BigInt(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&BigInt(e.checkpoint)!==0n)throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=Dh(t,r,[]);if(a>=BigInt(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Number(i)-Number(o))){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=Dh(t,r,[]);if(a>=BigInt(t.threshold))return o}return Dh(t,r,[]).encoded}};var xle=Object.freeze({__proto__:null,ConfigCoder:FS}),ble=Object.freeze({__proto__:null});const TD=1,ID={version:TD,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Qi=Object.freeze({__proto__:null,config:xle,context:ble,signature:mle,version:TD,DeployedWalletContext:ID});const US="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function PD(t){return De(OD(t))}function OD(t){return Le(["bytes32","bytes32"],[US,t])}function RD(t){const e=Q(t);if(e.length===64&&z(e.slice(0,32))===US)return z(e.slice(32,64))}function wle(t){return RD(t)!==void 0}var Ele=Object.freeze({__proto__:null,SetImageHashPrefix:US,hashSetImageHash:PD,messageSetImageHash:OD,decodeMessageSetImageHash:RD,isMessageSetImageHash:wle});let Zt=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Ot=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const Pg=66;function Sl(t){return t.left!==void 0&&t.right!==void 0}function Rd(t){return t.tree!==void 0}function B1(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function Og(t){let e=Q(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case Ot.Signature:{const i=e[0],o=z(e.slice(1,Pg+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(Pg+1)}break;case Ot.Address:{const i=e[0],o=Ae(z(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case Ot.DynamicSignature:{const i=e[0],o=Ae(z(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=z(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Ot.Node:{const i=z(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case Ot.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=Og(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case Ot.Subdigest:{const i=z(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case Ot.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=Og(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${z(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class ND extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function il(t,e,r){if(Sl(t)){const[n,s]=await Promise.all([il(t.left,e,r),il(t.right,e,r)]);return{left:n,right:s}}if(Rd(t))return{weight:t.weight,threshold:t.threshold,tree:await il(t.tree,e,r)};if(B1(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await DS(t.address,e,t.signature,r))throw new ND(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:D1(e,t.signature),signature:t.signature,subdigest:e};return t}const Tr={concat:(t,e)=>Le(["bytes","bytes"],[t,e]),node:t=>Le(["uint8","bytes32"],[Ot.Node,t]),branch:t=>{const e=Q(t);return Le(["uint8","uint24","bytes"],[Ot.Branch,e.length,e])},nested:(t,e,r)=>{const n=Q(r);return Le(["uint8","uint8","uint16","uint24","bytes"],[Ot.Nested,t,e,n.length,n])},subdigest:t=>Le(["uint8","bytes32"],[Ot.Subdigest,t]),signature:(t,e)=>Le(["uint8","uint8","bytes"],[Ot.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=Q(r);return Le(["uint8","uint8","address","uint24","bytes"],[Ot.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Le(["uint8","uint8","address"],[Ot.Address,t,e])};function Bh(t,e,r,n,s={}){const i=Lh(t.tree,e,r,s);return BigInt(n)===0n?{encoded:Le(["uint8","uint16","uint32","bytes"],[Zt.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:BigInt(t.threshold)>255n?{encoded:Le(["uint8","uint16","uint32","bytes"],[Zt.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:Le(["uint8","uint8","uint32","bytes"],[Zt.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function Lh(t,e,r,n={}){const s=!n.disableTrim;if(Us(t)){const i=Lh(t.left,e,r),o=Lh(t.right,e,r),a=Qr(t.left),c=Qr(t.right);return s&&i.weight===0n&&o.weight===0n&&!a&&!c?{encoded:Tr.node(es(t)),weight:0n}:s&&o.weight===0n&&!c?{encoded:Tr.concat(i.encoded,Tr.node(es(t.right))),weight:i.weight}:s&&i.weight===0n&&!a?{encoded:Tr.concat(Tr.node(es(t.left)),Tr.branch(o.encoded)),weight:o.weight}:{encoded:Tr.concat(i.encoded,Tr.branch(o.encoded)),weight:i.weight+o.weight}}if(Co(t)){const i=Lh(t.tree,e,r);return s&&i.weight===0n?{encoded:Tr.node(es(t)),weight:0n}:{encoded:Tr.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(ko(t))return{encoded:Tr.node(es(t)),weight:0n};if(Eo(t)){const i=r.includes(t.subdigest);return{encoded:Tr.subdigest(t.subdigest),weight:i?$M:0n}}if(Qr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Tr.dynamicSignature(t.weight,t.address,a),weight:BigInt(t.weight)}:{encoded:Tr.signature(t.weight,a),weight:BigInt(t.weight)}}else return{encoded:Tr.address(t.weight,t.address),weight:0n};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function $S(t){return VS(t)?$S(t.suffix[t.suffix.length-1]):t.config}function WS(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function L1(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(WS)}function _D(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function VS(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(_D)}function tm(t){const e=Q(t),r=e[0];switch(r){case Zt.Legacy:return{version:2,type:Zt.Legacy,decoded:my(e)};case Zt.Dynamic:return{version:2,type:Zt.Dynamic,decoded:my(e.slice(1))};case Zt.NoChainIdDynamic:return{version:2,type:Zt.NoChainIdDynamic,decoded:my(e.slice(1))};case Zt.Chained:return MD(e);default:throw new Error(`Invalid signature type: ${r}`)}}function my(t){const e=Q(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=Og(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function MD(t){const e=Q(t),r=e[0];if(r!==Zt.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sQ(Ta(i))),s=Le(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return Le(["uint8","bytes"],[Zt.Chained,s])}function Ta(t){if(bi(t))return z(t);if(L1(t)||VS(t))return rm(Ta(t),(t.suffix||[]).map(Ta));const e=WS(t)?t.decoded:t.config;switch(t.type){case Zt.Legacy:if(BigInt(e.threshold)>255n)throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return Z2(e);case Zt.NoChainIdDynamic:case Zt.Dynamic:return Le(["uint8","bytes"],[t.type,Z2(e)]);case Zt.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function Z2(t){return Le(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,jh(t.tree)])}function jh(t){if(Us(t)||Sl(t)){const e=Q(jh(t.right)),r=Q(jh(t.left));return Us(t.right)||Sl(t.right)?Le(["bytes","uint8","uint24","bytes"],[r,Ot.Branch,e.length,e]):Le(["bytes","bytes"],[r,e])}if(Co(t)||Rd(t)){const e=Q(jh(t.tree));return Le(["uint8","uint8","uint16","uint24","bytes"],[Ot.Nested,t.weight,t.threshold,e.length,e])}if(B1(t)||Qr(t)&&t.signature!==void 0){const e=Q(t.signature);if(t.isDynamic||e.length!==Pg){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Le(["uint8","uint8","address","uint24","bytes"],[Ot.DynamicSignature,t.weight,t.address,e.length,e])}else return Le(["uint8","uint8","bytes"],[Ot.Signature,t.weight,e])}if(Qr(t))return Le(["uint8","uint8","address"],[Ot.Address,t.weight,t.address]);if(ko(t))return Le(["uint8","bytes32"],[Ot.Node,t.nodeHash]);if(Eo(t))return Le(["uint8","bytes32"],[Ot.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Fh(t){return Us(t)?[...Fh(t.left),...Fh(t.right)]:Co(t)?Fh(t.tree):Qr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Uh(t){return Sl(t)?[...Uh(t.left),...Uh(t.right)]:Rd(t)?Uh(t.tree):B1(t)?[t.signature]:[]}function xy(t){return Sl(t)?[...xy(t.left),...xy(t.right)]:Rd(t)?xy(t.tree):Eo(t)?[t.subdigest]:[]}async function Rg(t){const e=typeof t=="string"?tm(t):t;if(L1(e)){const n=await Promise.all([Rg(vr({},e,{suffix:void 0})),...e.suffix.map(s=>Rg(s))]);return rm(n[0],n.slice(1))}const{trimmed:r}=await $h(e.decoded.tree);return Ta(vr({},e,{decoded:vr({},e.decoded,{tree:r})}))}async function $h(t,e=!0){if(Sl(t)){const[r,n]=await Promise.all([$h(t.left),$h(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await il(t,xl,void 0);return{weight:0,trimmed:{nodeHash:es(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Rd(t)){const r=await $h(t.tree);if(r.weight===0)try{const n=await il(t,xl,void 0);return{weight:0,trimmed:{nodeHash:es(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return ko(t)&&jD(t.nodeHash)?{weight:0,trimmed:vr({},LD(t.nodeHash))}:B1(t)||Qr(t)&&t.signature!==void 0?{weight:Number(t.weight),trimmed:t}:!e&&Eo(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const nm={decode:t=>tm(t),encode:t=>Ta(t),trim:t=>Rg(t),supportsNoChainId:!0,recover:(t,e,r)=>zS(t,e,r),encodeSigners:(t,e,r,n)=>Bh(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=nm.encodeSigners(t,e,[],0);return r>=BigInt(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=bi(t)?t:Ta(t),s=r.map(i=>bi(i)?i:Ta(i));return rm(n,s)},hashSetImageHash:function(t){return PD(t)},signaturesOf(t){return Fh(t.tree)},signaturesOfDecoded:function(t){return Uh(t.decoded.tree)}};var Cle=Object.freeze({__proto__:null,SignatureType:Zt,SignaturePartType:Ot,SignaturePartTypeLength:Pg,isUnrecoveredNode:Sl,isUnrecoveredNestedLeaf:Rd,isUnrecoveredSignatureLeaf:B1,decodeSignatureTree:Og,InvalidSignatureLeafError:ND,recoverTopology:il,partEncoder:Tr,encodeSigners:Bh,encodeTree:Lh,deepestConfigOfSignature:$S,isUnrecoveredSignature:WS,isUnrecoveredChainedSignature:L1,isSignature:_D,isChainedSignature:VS,decodeSignature:tm,decodeSignatureBody:my,decodeChainedSignature:MD,setImageHashStruct:DD,recoverSignature:zS,encodeChain:rm,encodeSignature:Ta,encodeSignatureBody:Z2,encodeSignatureTree:jh,signaturesOf:Fh,signaturesOfDecoded:Uh,subdigestsOfDecoded:xy,trimSignature:Rg,trimUnrecoveredTree:$h,SignatureCoder:nm});function Qr(t){return t.address!==void 0&&t.weight!==void 0}function Eo(t){return t.subdigest!==void 0&&t.address===void 0}function Wh(t){return Us(t)?JSON.stringify({left:Wh(t.left),right:Wh(t.right)}):Co(t)?JSON.stringify({weight:BigInt(t.weight).toString(),threshold:BigInt(t.threshold).toString(),tree:Wh(t.tree)}):Qr(t)?JSON.stringify({address:t.address,weight:BigInt(t.weight).toString()}):JSON.stringify(t)}function Vh(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Vh(e.left),right:Vh(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:BigInt(e.weight),threshold:BigInt(e.threshold),tree:Vh(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:BigInt(e.weight)}:e}function Co(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function ko(t){return t.nodeHash!==void 0}function HS(t){return Qr(t)||Eo(t)||Co(t)||ko(t)}function Us(t){return t.left!==void 0&&t.right!==void 0}function kle(t){return Us(t)||HS(t)}function BD(t){return Le(["uint96","address"],[t.weight,t.address])}function LD(t){const e=Q(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=BigInt(z(e.slice(0,12))),n=Ae(z(e.slice(12)));return{weight:r,address:n}}function jD(t){const e=Q(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function es(t){if(Qr(t))return BD(t);if(Eo(t))return io(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(Co(t)){const e=es(t.tree);return io(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return ko(t)?t.nodeHash:io(["bytes32","bytes32"],[es(t.left),es(t.right)])}function Sle(t){const e=[];let r=t;for(;!HS(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function Ale(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function GS(t){return io(["bytes32","uint256"],[io(["bytes32","uint256"],[es(t.tree),t.threshold]),t.checkpoint])}function FD(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Uu(t){return Qr(t)||Eo(t)?[t]:Co(t)?[{threshold:t.threshold,weight:t.weight,members:Uu(t.tree)}]:ko(t)?[]:[...Uu(t.left),...Uu(t.right)]}function eE(t){return ko(t)?!0:Us(t)?eE(t.left)||eE(t.right):!1}function Tle(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Uu(t.tree)}}const UD=(t,e)=>t.map(r=>FD(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function qS(t){if(t.length===0)throw new Error("Empty members array");return UD(t,qS).reduce((r,n)=>({left:r,right:n}))}function KS(t){if(t.length===0)throw new Error("Empty members array");const e=UD(t,KS);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function QS(t){return t.length>8?KS(t):qS(t)}function $D(t,e=QS){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Ng(t,e){return Eo(t)?t.subdigest===e:Us(t)?Ng(t.left,e)||Ng(t.right,e):!1}function tE(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Co(n)?e.push(n.tree):Us(n)?(e.push(n.left),e.push(n.right)):Qr(n)&&r.add({address:n.address,weight:Number(n.weight)})}return Array.from(r)}function _g(t){return Us(t)?_g(t.left)&&_g(t.right):!ko(t)}const sm={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>GS(t),hasSubdigest:(t,e)=>Ng(t.tree,e),checkpointOf:t=>BigInt(t.checkpoint),signersOf:t=>tE(t.tree),fromSimple:t=>{var e;return $D(vr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>_g(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new ft(Gt.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[sm.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new ft(Gt.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=i.decodeFunctionData(i.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(BigInt((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0)!==0n)throw new Error("Invalid transaction bundle, expected value to be 0");if(BigInt((n=(s=t.transactions[0])==null?void 0:s.gasLimit)!=null?n:0)!==0n)throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:BigInt(t.threshold).toString(),checkpoint:BigInt(t.checkpoint).toString(),tree:Wh(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:BigInt(e.threshold),checkpoint:BigInt(e.checkpoint),tree:Vh(e.tree)}},editConfig:function(t,e){var r,n;const s=Uu(t.tree);if(e.add)for(const i of e.add)s.find(o=>Qr(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Qr(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:QS(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=Bh(t,r,[],0);if(a>=BigInt(t.threshold))return o}const n=tE(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=Bh(t,r,[],0);if(a>=BigInt(t.threshold))return o}return Bh(t,r,[],0).encoded}};var Ile=Object.freeze({__proto__:null,isSignerLeaf:Qr,isSubdigestLeaf:Eo,topologyToJSON:Wh,topologyFromJSON:Vh,isNestedLeaf:Co,isNodeLeaf:ko,isLeaf:HS,isNode:Us,isTopology:kle,encodeSignerLeaf:BD,decodeSignerLeaf:LD,isEncodedSignerLeaf:jD,hashNode:es,leftFace:Sle,isWalletConfig:Ale,imageHash:GS,isSimpleNestedMember:FD,topologyToMembers:Uu,hasUnknownNodes:eE,toSimpleWalletConfig:Tle,legacyTopologyBuilder:qS,merkleTopologyBuilder:KS,optimized2SignersTopologyBuilder:QS,toWalletConfig:$D,hasSubdigest:Ng,signersOf:tE,isComplete:_g,ConfigCoder:sm}),Ple=Object.freeze({__proto__:null});const Ole={config:sm,signature:nm},WD=2,VD={version:WD,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var _e=Object.freeze({__proto__:null,config:Ile,signature:Cle,context:Ple,chained:Ele,coders:Ole,version:WD,DeployedWalletContext:VD}),Rle=Object.freeze({__proto__:null});function rE(t,e){const r=De(Le(["bytes","bytes32"],[t.walletCreationCode,is(t.mainModule,32)])),n=De(Le(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ae(ct(n,12))}async function Nle(t,e,r,n,s,i){return(await Promise.all(tB.map(async a=>{try{const c=a.signature.SignatureCoder.decode(z(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:z(e),chainId:n},s),u=a.config.ConfigCoder.imageHashOf(l.config);if(rE(i[a.version],u).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:z(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return rE(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function _le(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Mle(t){const e=Object.keys(t).length;return t[e]}const Dle={1:ID,2:VD};var Ble=Object.freeze({__proto__:null,addressOf:rE,isValidCounterfactual:Nle,isValidVersionedContext:_le,latestContext:Mle,defaultContexts:Dle});const im=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`;function Lle(t,e,r,n){return vr({},t,{chainId:r,intent:{id:n,wallet:e}})}function jle(t){return De(Kt.defaultAbiCoder().encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Fle(t){const e=Kt.defaultAbiCoder().decode(["uint256",im],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function zD(t,e){return Kt.defaultAbiCoder().encode(["uint256",im],[t,L0(e)])}function HD(t,e){return De(zD(t,e))}function Ule(t,e,r,n){return M1({address:t,chainId:e,digest:HD(r,n)})}function $le(t,e,r){return M1({address:t,chainId:e,digest:De(Kt.defaultAbiCoder().encode(["string",im],["guest:",L0(r)]))})}function GD(t,e){return e.map(r=>JS(t,r))}function JS(t,e){if(e.to&&e.to!==wi)return{nonce:zh(e.nonce)?void 0:BigInt(e.nonce),transaction:{delegateCall:!1,revertOnError:!1,gasLimit:zh(e.gasLimit)?void 0:BigInt(e.gasLimit),to:e.to,value:BigInt(e.value||0),data:e.data||"0x"}};{const r=new ft(Gt.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:typeof e.nonce=="number"?BigInt(e.nonce):void 0,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:zh(e.gasLimit)?void 0:BigInt(e.gasLimit),to:t,value:BigInt(e.value||0),data:n}}}}function om(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function qD(t){return t.every(om)}function L0(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:zh(e.gasLimit)?0n:BigInt(e.gasLimit),target:(r=e.to)!=null?r:wi,value:zh(e.value)?0n:e.value,data:e.data||"0x"}})}function Wle(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function Vle(t,e){const r=BigInt(t),n=BigInt(e),s=2n**96n;if(n/s!==0n)throw new Error("Space already encoded");return n+r*s}function zle(t){const e=BigInt(t),r=2n**96n;return[e/r,e%r]}function Hle(t,e){return Array.isArray(e)?qD(e)?e:GD(t,e).map(n=>n.transaction):om(e)?[e]:[JS(t,e).transaction]}function KD(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&om(r),!0)}function QD(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&KD(t)}function Gle(t){const e=new ft(Gt.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),QD(t)?[L0(t.transactions),t.nonce,t.signature]:[L0(t.transactions),0,new Uint8Array([])])}const JD="0x61c2926c",YD=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`,nE=(t,e)=>{const r=[],n=new ft(Gt.mainModule.abi);for(const s of e){const i=Q(s.data||"0x");if(s.to===t&&z(i.slice(0,4))===JD){const o=i.slice(4),a=Kt.defaultAbiCoder().decode([YD],o)[0];r.push(...nE(s.to,a.map(c=>vr({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=nE(t,o.map(c=>vr({},c.toObject(),{to:c.target})));r.push(...a)}catch{r.push(s)}}return r},zh=t=>t==null;var qle=Object.freeze({__proto__:null,MetaTransactionsType:im,intendTransactionBundle:Lle,intendedTransactionID:jle,unpackMetaTransactionsData:Fle,packMetaTransactionsData:zD,digestOfTransactions:HD,subdigestOfTransactions:Ule,subdigestOfGuestModuleTransactions:$le,toSequenceTransactions:GD,toSequenceTransaction:JS,isSequenceTransaction:om,hasSequenceTransactions:qD,sequenceTxAbiEncode:L0,fromTxAbiEncode:Wle,encodeNonce:Vle,decodeNonce:zle,fromTransactionish:Hle,isTransactionBundle:KD,isSignedTransactionBundle:QD,encodeBundleExecData:Gle,selfExecuteSelector:JD,selfExecuteAbi:YD,unwind:nE});const XD="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",Kle="0x6492649264926492649264926492649264926492649264926492649264926492";async function ZD(t,e,r,n){try{return await t.call({data:Ue([XD,Kt.defaultAbiCoder().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}catch{return!1}}var Qle=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:XD,EIP_6492_SUFFIX:Kle,validateEIP6492Offchain:ZD});class Jle{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new hn(e,[...Gt.mainModuleUpgradable.abi,...Gt.mainModule.abi,...Gt.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>Q(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Kt.defaultAbiCoder().encode(["address"],[e]),n=await this.provider.getStorage(e,r).then(s=>Q(s));if(n.length===20)return Ae(z(n));if(n.length===32)return Kt.defaultAbiCoder().decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return ZD(this.provider,e,r,n)}}var Yle=Object.freeze({__proto__:null,OnChainReader:Jle});function Xle(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var de=Object.freeze({__proto__:null,config:Rle,signature:fle,context:Ble,signer:vle,EIP1271:ple,transaction:qle,reader:Yle,EIP6492:Qle,isWalletSignRequestMetadata:Xle});const sE=[{config:FS,signature:jS},{config:sm,signature:nm}];function eB(t){const e=t-1;if(e<0||e>=sE.length)throw new Error(`No coder for version: ${t}`);return sE[e]}function Zle(t){return eB(t)}var er=Object.freeze({__proto__:null,ALL_CODERS:sE,coderFor:eB,genericCoderFor:Zle});const Vr="2.2.3",tB=[Qi,_e],eue=Object.freeze(Object.defineProperty({__proto__:null,VERSION:Vr,allVersions:tB,commons:de,universal:er,v1:Qi,v2:_e},Symbol.toStringTag,{value:"Module"}));function tue(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:s,chainId:i}=e;let o=n,a=s;const c=Object.values(this.contexts),l=[];for(let u=1;uQ(i).length===0))return H8;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Number(s),gasLimit:Number(s)}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const i=await new hn(e,Gt.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return de.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=de.transaction.intendedTransactionID(e));let o=!1;const a=async function(u,f){let d=0;for(;!o;){try{return await u()}catch(h){if(d++,s!==void 0&&d>=s)throw Ie.error(`giving up after ${d} failed attempts${f?`: ${f}`:""}`,h),h;Ie.warn(`attempt #${d} failed${f?`: ${f}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${f?`: ${f}`:""}`)},c=async function(){let u=i.fromBlockLog;if(u<0&&(u=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+u),typeof e!="string")throw new Error("impossible");const f=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,u-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,u-i.deltaBlocksLog)} to ${d}`);u=d;const p=(await Promise.all(h.map(b=>a(()=>i.provider.getTransactionReceipt(b.transactionHash),`unable to get receipt for transaction ${b.transactionHash}`)))).find(b=>b==null?void 0:b.logs.find(g=>g.topics.length===0&&g.data.replace("0x","")===f||g.topics.length===1&&g.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&g.data.length>=64&&g.data.replace("0x","").startsWith(f)));if(p){const b=await a(()=>i.provider.getTransaction(p.hash),`unable to get transaction ${p.hash}`);if(!b)throw new Error(`Transaction response not found for ${e}`);const g=b;return g.receipt=p,g}o||await new Promise(b=>setTimeout(b,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function cue(t){return t&&typeof t=="object"&&typeof t.getNetwork=="function"&&typeof t.getBlockNumber=="function"}function lue(t){return typeof t=="object"&&lE(t.signer)}class uue extends oB{constructor(e){if(super(lE(e)?{provider:e.provider}:ao({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=lE(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&Ie.warn("LocalRelayer doesn't accept fee quotes");const s=de.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(ao({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}function lE(t){return t&&typeof t=="object"&&typeof t.provider=="object"&&typeof t.getAddress=="function"&&typeof t.connect=="function"}const fue="v1",due="v0.4.1",hue="1e27d0fd295aa5897878939595ef0c6adc54b1a3";let ha=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),pue=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),yue=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),gue=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class aB{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=(n,s)=>this.fetch(this.url("Ping"),Xe({},n,s)).then(i=>Ze(i).then(o=>({status:o.status})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),Xe({},n,s)).then(i=>Ze(i).then(o=>({version:o.version})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),Xe({},n,s)).then(i=>Ze(i).then(o=>({status:o.status})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.getSequenceContext=(n,s)=>this.fetch(this.url("GetSequenceContext"),Xe({},n,s)).then(i=>Ze(i).then(o=>({data:o.data})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),Xe({},n,s)).then(i=>Ze(i).then(o=>({chainID:o.chainID})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.sendMetaTxn=(n,s,i)=>this.fetch(this.url("SendMetaTxn"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,txnHash:a.txnHash})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnNonce=(n,s,i)=>this.fetch(this.url("GetMetaTxnNonce"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({nonce:a.nonce})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnReceipt=(n,s,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({receipt:a.receipt})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.simulate=(n,s,i)=>this.fetch(this.url("Simulate"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({results:a.results})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateMetaTxnGasLimits=(n,s,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({payload:a.payload})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.feeTokens=(n,s)=>this.fetch(this.url("FeeTokens"),Xe({},n,s)).then(i=>Ze(i).then(o=>({isFeeRequired:o.isFeeRequired,tokens:o.tokens})),i=>{throw Ye.new({cause:`fetch(): ${i.message||""}`})}),this.feeOptions=(n,s,i)=>this.fetch(this.url("FeeOptions"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({options:a.options,sponsored:a.sponsored,quote:a.quote})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnNetworkFeeOptions=(n,s,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({options:a.options})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTransactions=(n,s,i)=>this.fetch(this.url("GetMetaTransactions"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.sentTransactions=(n,s,i)=>this.fetch(this.url("SentTransactions"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.pendingTransactions=(n,s,i)=>this.fetch(this.url("PendingTransactions"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getGasTank=(n,s,i)=>this.fetch(this.url("GetGasTank"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({gasTank:a.gasTank})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.addGasTank=(n,s,i)=>this.fetch(this.url("AddGasTank"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,gasTank:a.gasTank})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateGasTank=(n,s,i)=>this.fetch(this.url("UpdateGasTank"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,gasTank:a.gasTank})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getGasSponsor=(n,s,i)=>this.fetch(this.url("GetGasSponsor"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({gasSponsor:a.gasSponsor})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.addressGasSponsors=(n,s,i)=>this.fetch(this.url("AddressGasSponsors"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,gasSponsors:a.gasSponsors})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.listGasSponsors=(n,s,i)=>this.fetch(this.url("ListGasSponsors"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,gasSponsors:a.gasSponsors})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.addGasSponsor=(n,s,i)=>this.fetch(this.url("AddGasSponsor"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,gasSponsor:a.gasSponsor})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateGasSponsor=(n,s,i)=>this.fetch(this.url("UpdateGasSponsor"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,gasSponsor:a.gasSponsor})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.removeGasSponsor=(n,s,i)=>this.fetch(this.url("RemoveGasSponsor"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.reportGasSponsorUsage=(n,s,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({gasSponsorUsage:a.gasSponsorUsage})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.nextGasTankBalanceAdjustmentNonce=(n,s,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({nonce:a.nonce})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.adjustGasTankBalance=(n,s,i)=>this.fetch(this.url("AdjustGasTankBalance"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({status:a.status,adjustment:a.adjustment})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.getGasTankBalanceAdjustment=(n,s,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({adjustment:a.adjustment})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.listGasTankBalanceAdjustments=(n,s,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),Xe(n,s,i)).then(o=>Ze(o).then(a=>({page:a.page,adjustments:a.adjustments})),o=>{throw Ye.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Xe=(t={},e={},r=null)=>({method:"POST",headers:ao({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Ze=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),YS.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(mue[n]||Lt).new(r)}return r});let Lt=class cB extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,cB.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},lB=class uB extends Lt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uB.prototype)}},Ye=class fB extends Lt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fB.prototype)}},dB=class hB extends Lt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hB.prototype)}},pB=class yB extends Lt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yB.prototype)}},gB=class vB extends Lt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vB.prototype)}},YS=class mB extends Lt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mB.prototype)}},xB=class bB extends Lt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bB.prototype)}},wB=class EB extends Lt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,EB.prototype)}},CB=class kB extends Lt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kB.prototype)}},SB=class AB extends Lt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,AB.prototype)}},TB=class IB extends Lt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,IB.prototype)}},PB=class OB extends Lt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,OB.prototype)}},RB=class NB extends Lt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NB.prototype)}},_B=class MB extends Lt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,MB.prototype)}},DB=class BB extends Lt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,BB.prototype)}},LB=class jB extends Lt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jB.prototype)}},FB=class UB extends Lt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UB.prototype)}},$B=class WB extends Lt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,WB.prototype)}},VB=class zB extends Lt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zB.prototype)}},vue=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.MethodNotFound="MethodNotFound",t.Aborted="Aborted",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.NotFound="NotFound",t}({});const mue={0:lB,[-1]:Ye,[-2]:dB,[-3]:pB,[-4]:gB,[-5]:YS,[-6]:xB,[-7]:wB,[-8]:CB,[-9]:SB,[-10]:TB,1e3:PB,1001:RB,1003:_B,1005:DB,2001:LB,2002:FB,2003:$B,3e3:VB};var ud=Object.freeze({__proto__:null,WebRPCVersion:fue,WebRPCSchemaVersion:due,WebRPCSchemaHash:hue,ETHTxnStatus:ha,TransferType:pue,FeeTokenType:yue,SortOrder:gue,Relayer:aB,WebrpcError:Lt,WebrpcEndpointError:lB,WebrpcRequestFailedError:Ye,WebrpcBadRouteError:dB,WebrpcBadMethodError:pB,WebrpcBadRequestError:gB,WebrpcBadResponseError:YS,WebrpcServerPanicError:xB,WebrpcInternalErrorError:wB,WebrpcClientDisconnectedError:CB,WebrpcStreamLostError:SB,WebrpcStreamFinishedError:TB,UnauthorizedError:PB,PermissionDeniedError:RB,MethodNotFoundError:_B,AbortedError:DB,InvalidArgumentError:LB,UnavailableError:FB,QueryFailedError:$B,NotFoundError:VB,errors:vue});const xue=[ha.DROPPED,ha.SUCCEEDED,ha.PARTIALLY_FAILED,ha.FAILED],bue=[ha.DROPPED,ha.PARTIALLY_FAILED,ha.FAILED];function wue(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&GB(t.provider)}class HB{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const s={},{jwtAuth:i,projectAccessKey:o}=this.options;return i&&i.length>0&&(s.Authorization=`BEARER ${i}`),o&&o.length>0&&(s["X-Access-Key"]=o),n.headers=ao({},s,n.headers),fetch(r,n)},this.service=new aB(e.url,this._fetch),GB(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,s=B0(e.provider.url,n,r);this.provider=new lr(s,void 0,{staticNetwork:!0})}}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=de.transaction.intendedTransactionID(e)),Ie.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&xue.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Kt.defaultAbiCoder().encode([de.transaction.MetaTransactionsType],[de.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(c=>c.symbol).join(", ");Ie.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw Ie.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:de.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return Ie.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o,Os)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return Ie.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:s,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:z(r),simulate:n==null?void 0:n.simulate},ao({},n!=null&&n.projectAccessKey?{"X-Access-Key":n.projectAccessKey}:void 0));return{options:s,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){Ie.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?nl(BigInt(r)):void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=BigInt(s.nonce),[o,a]=de.transaction.decodeNonce(i);return Ie.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0,s){var i=this;Ie.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e,Os)} with quote ${JSON.stringify(r,Os)}`);let o;if(r!==void 0&&(typeof r._quote=="string"?o=r._quote:Ie.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw Ie.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const a=de.transaction.encodeBundleExecData(e),c=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:a},quote:o},ao({},s?{"X-Access-Key":s}:void 0));if(Ie.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(c,Os)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},u=async function(d){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),p=(h=y.receipt)==null?void 0:h.transactionHash;if(!p)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(p,d)};return l.wait=u,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||bue.includes(a.status))throw new Eue(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:Number(c.blockNumber),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return i.provider.waitForTransaction(c.transactionHash,l)}}}}class Eue{constructor(e){this.receipt=e}}function GB(t){return t&&typeof t=="object"&&typeof t.getNetwork=="function"&&typeof t.getBlockNumber=="function"}function qB(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const Cue=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:uue,ProviderRelayer:oB,ProviderRelayerDefaults:iB,RpcRelayer:HB,RpcRelayerProto:ud,isLocalRelayerOptions:lue,isProviderRelayerOptions:aue,isRelayer:qB,isRpcRelayerOptions:wue,proto:ud},Symbol.toStringTag,{value:"Module"}));function KB(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class QB{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return new Uint8Array([2])}}var uE=Object.freeze({__proto__:null,isSapientSigner:KB,SignerWrapper:QB});let pa=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function JB(t){return t===void 0||t.state===pa.INITIAL||t.state===pa.SIGNING}class am{constructor(e,r=am.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${z(_r(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>KB(r)?r:new QB(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const s=await n.buildDeployTransaction(e);r===void 0?r=s:s!=null&&s.transactions&&(r.transactions=s.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:c}=e,l={ended:!1,message:i,signers:{}};let u=o??{};const f=p=>{u=p,r.notifyObservers(n,l,u)},d=()=>{try{r.notifyObservers(n,l,u);const p=Object.entries(l.signers).filter(([b,g])=>JB(g));if(a&&a(l,f)||p.length===0){l.ended=!0,s(l),r.notifyObservers(n,l,u);return}}catch(p){console.error("Error while notifying observers",p)}};let h=r.signers;if(c){const p=await Promise.all(r.signers.map(async function(b){return b.getAddress()}));h=r.signers.filter((b,g)=>c.includes(p[g]))}const y=await Promise.allSettled(h.map(async function(p){const b=await p.getAddress();l.signers[b]={state:pa.SIGNING,request:p.sign(i,o??{}).then(g=>{const v=p.suffix();return l.signers[b]={state:pa.SIGNED,signature:g,suffix:v},d(),g}).catch(g=>{throw l.signers[b]={state:pa.ERROR,error:g},d(),g})}}));for(let p=0;pPt(e))):Pt(t)}const q8=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===pa.SIGNED){const s=Q(n.suffix),i=Le(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class $u extends Id{constructor(e){var r;const n=BigInt(e.chainId);if(n===0n&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super((r=e.provider)!=null?r:null),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=n,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=de.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new $u(Fo({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new de.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:de.transaction.encodeBundleExecData(r),revertOnError:!0}],s=await this.buildDeployTransaction();return s&&n.unshift(...s.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(de.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);let n;switch(this.chainId){case BigInt(M.SKALE_NEBULA):n=10000000n;break}const s=$u.buildDeployTransaction(this.context,r,n);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(s.transactions=i.transactions.concat(s.transactions))}return s}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Fo({},r,{chainId:this.chainId,intent:{id:z(_r(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r,n=100000n){const s=new ft(Gt.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:s.encodeFunctionData(s.getFunction("deploy"),[e.mainModule,r]),gasLimit:n,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return Number(r)}async signDigest(e,r){const n=Y2(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const s=Fo({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),i=Q(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:i,metadata:s,callback:(c,l)=>{const u=q8(c),f=Fo({},s,{parts:u});return l(f),this.coders.signature.hasEnoughSigningPower(this.config,u)}}),a=q8(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(De(e),{message:e})}signTypedData(e,r,n){const s=Od({domain:e,types:r,message:n});return this.signDigest(s)}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=BigInt(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return de.transaction.encodeNonce(r,n)}randomNonce(){const e=BigInt(z(_r(12)));return de.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const s=await G8(e),i=de.transaction.fromTransactionish(this.address,s);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=de.transaction.digestOfTransactions(o,i),c=Fo({digest:a,transactions:i},n),l=await this.signDigest(a,c);return{intent:{id:Y2(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:o,signature:l}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n={serial:!0}:n=this.randomNonce();const s=await this.signTransactions(e,n),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await G8(e),n=de.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const c=o.gasLimit?Number(o.gasLimit):i[a].gasLimit;return Fo({},o,i[a],{gasLimit:c})})}connect(e,r){return new $u({coders:this.coders,context:this.context,config:this.config,chainId:this.chainId,address:this.address,orchestrator:this.orchestrator,reader:this._reader,provider:e,relayer:r??this.relayer})}signTransaction(e){throw new Error("Method not implemented.")}}function Js(){return Js=Object.assign?Object.assign.bind():function(t){for(var e=1;e=BigInt(s.value))return s}else if(s.token.contractAddress&&s.token.type===ud.FeeTokenType.ERC20_TOKEN&&await new hn(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)>=BigInt(s.value))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,s,i,o,a;const c=await this.account.prepareTransactions({txs:e,chainId:this.chainId,stubSignatureOverrides:(n=(s=this.options)==null?void 0:s.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((i=(o=this.options)==null?void 0:o.selectFee)!=null?i:this.defaultSelectFee.bind(this))(e,c.feeOptions),f=[...c.transactions,...Sue(u)];return this.account.sendTransaction(f,this.chainId,c.feeQuote,void 0,void 0,((a=this.options)==null?void 0:a.nonceSpace)!==void 0?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(Js({},e,{blockTag:r}))}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(Number(this.chainId))}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}getNonce(e){throw new Error("Method not implemented.")}populateCall(e){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}async populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class Tue{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return 0n}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Zi{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=Ae(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||cE.DefaultMigrations,this.migrator=new aE.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new Aue(this,e,r)}static async new(e){var r;const s=new aE.Migrator(e.tracker,(r=e.migrations)!=null?r:cE.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),c=e.contexts[s.version],l=de.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Zi({address:l,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=BigInt(e),n=this.networks.find(s=>r===BigInt(s.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);const n=new ut(r.name,r.chainId);return r.provider||new lr(B0(r.rpcUrl,this.projectAccessKey,this.jwt),n,{staticNetwork:n})}reader(e){return BigInt(e)===0n?new Tue:new de.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return qB(r.relayer)?r.relayer:new HB(Js({},r.relayer,{projectAccessKey:this.projectAccessKey,jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=er.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=BigInt(e)===0n;return new $u({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(A=>{if(!A)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return A}),o=i.then(A=>rB.counterfactualVersion(this.address,A.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const P=await n.reader(e).implementation(n.address);if(!P)throw new Error(`Implementation not found for wallet ${n.address}`);const R=Object.values(n.contexts);for(let N=0;N0?p[p.length-1].nextImageHash:d,g=await this.tracker.configOfImageHash({imageHash:b});if(!g)throw new Error(`Config not found for imageHash ${b}`);const v=await s,m=await i,k=er.coderFor(h).config.checkpointOf(g);return{original:Js({},m,{version:await o}),onChain:{imageHash:f,config:await l,version:u,deployed:v},fullyMigrated:h===this.version,signedMigrations:y,version:h,presignedConfigurations:p,imageHash:b,config:g,checkpoint:k,canOnchainValidate:u===this.version&&v}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),s=await this.predecorateTransactions([],e,r);return de.transaction.fromTransactionish(this.address,s).length>0&&n.push(await this.signTransactions(s,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}async decorateTransactions(e,r,n){var s,i;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(s=n)!=null?s:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:c}=a?o:e[0],l={entrypoint:c,chainId:n,intent:(i=e[0])==null?void 0:i.intent,transactions:[...o.transactions,...e.map(u=>({to:u.entrypoint,data:de.transaction.encodeBundleExecData(u),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const u=de.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,l.transactions);l.intent===void 0?l.intent={id:u,wallet:this.address}:l.intent.id=u}return l}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitnessFor(e,r=0){const n=Br(`This is a Sequence account woo! ${Date.now()}`),s=await this.status(r),i=this.coders.config.fromSimple({threshold:e.length,checkpoint:0,signers:e.map(u=>({address:u,weight:1}))}),a=await this.walletFor(r,s.original.context,i,this.coders).signDigest(n),c=this.coders.signature.decode(a),l=this.coders.signature.signaturesOfDecoded(c);if(l.length===0)throw new Error("No signatures found");return this.tracker.saveWitnesses({wallet:this.address,digest:n,chainId:r,signatures:l})}async publishWitness(){const e=Br(`This is a Sequence account woo! ${Date.now()}`),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore",i){const o=BigInt(r)===0n?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,a).signDigest(e,i),u=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(s){case"ignore":return u;case"eip6492":return this.buildEIP6492Signature(await u,a,r)}return u}buildOnChainSignature(e){const r=de.signature.subdigestOf({digest:z(e),chainId:0,address:this.address}),n=z(r),s=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),i=new ft(Gt.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:i.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(s),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:s});const a=this.coders.signature.encodeSigners(s,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const s=await this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Kt.defaultAbiCoder().encode(["address","bytes","bytes"],[s.entrypoint,de.transaction.encodeBundleExecData(s),e]);return Le(["bytes","bytes32"],[i,de.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,Js({},e,{checkpoint:this.coders.config.checkpointOf(r)+1n}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s,referenceChainId:1});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const s=await this.orchestrator.buildDeployTransaction({chainId:r}),i=(n=s==null?void 0:s.transactions)!=null?n:[];if(!e.onChain.deployed){let c;switch(BigInt(r)){case BigInt(M.SKALE_NEBULA):c=10000000n;break}const l=$u.buildDeployTransaction(e.original.context,e.original.imageHash,c);i.push(...l.transactions)}i.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:de.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:de.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,i),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:i,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Js({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(De(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=this.walletForStatus(r,i),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},c=s!=null&&s.serial?{serial:!0}:(s==null?void 0:s.nonceSpace)!==void 0?{space:s.nonceSpace}:void 0,l=await o.signTransactions(e,c,a);return Js({},l,{signature:await this.decorateSignature(l.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=er.coderFor(i.version).config,c=a.imageHashOf(i),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i,o){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,s,i,o);const a=s||await this.status(r);this.mustBeFullyMigrated(a);const c=await this.decorateTransactions(e,a,r);return i==null||i(c),this.relayer(r).relay(c,n,void 0,o)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,s,i){const o=s||await this.status(r),a=this.walletForStatus(r,o),c=await this.predecorateTransactions(e,o,r),l=de.transaction.fromTransactionish(this.address,c),u=a.coders.config.buildStubSignature(a.config,n),f=z(_r(32)),d={chainId:r,intent:{id:f,wallet:this.address},signature:u,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),y=de.transaction.encodeBundleExecData(h),p=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,y,i);return Js({},p,{decorated:h})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions,projectAccessKey:e.projectAccessKey}),i=de.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),c=s?e:await this.predecorateTransactions(e,a,r),u=de.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,f=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];return u!==void 0&&u.transactions.length>0&&d.push(u),d.push(...f.filter(h=>h.transactions.length>0)),this.sendSignedTransactions(d,r,n,void 0,i,o==null?void 0:o.projectAccessKey)}async signTypedData(e,r,n,s,i="ignore"){const o=Od({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:s}){try{var i;const o=await e.status(n);let a=(i=r(o.presignedConfigurations))==null?void 0:i.nextImageHash;if(!a&&o.onChain.version!==o.version){const f=r(o.signedMigrations);if(f){const{toVersion:d,toConfig:h}=f;a=er.genericCoderFor(d).config.imageHashOf(h)}}a||(a=o.onChain.imageHash);const c=await e.tracker.configOfImageHash({imageHash:a});if(!c)throw new Error(`unable to find config for image hash ${a}`);return er.genericCoderFor(c.version).config.signersOf(c).map(f=>Js({},f,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${s}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>er.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===o.length-1,u=await e.tracker.configOfImageHash({imageHash:a});if(!u){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}er.genericCoderFor(u.version).config.signersOf(u).forEach(h=>{const y=r.find(p=>p.address===h.address&&p.network===s);if(y&&l&&y.flaggedForRemoval){y.flaggedForRemoval=!1;return}y||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!l})})}))})),r}}function Iue(t){return t instanceof Zi}const Pue=Object.freeze(Object.defineProperty({__proto__:null,Account:Zi,isAccount:Iue},Symbol.toStringTag,{value:"Module"}));function fd(){return fd=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),et({},n,s)).then(i=>ot(i).then(o=>({status:o.status})),i=>{throw tt.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),et({},n,s)).then(i=>ot(i).then(o=>({version:o.version})),i=>{throw tt.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),et({},n,s)).then(i=>ot(i).then(o=>({status:o.status})),i=>{throw tt.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),et({},n,s)).then(i=>ot(i).then(o=>({chainID:o.chainID})),i=>{throw tt.new({cause:`fetch(): ${i.message||""}`})}),this.getEtherBalance=(n,s,i)=>this.fetch(this.url("GetEtherBalance"),et(n,s,i)).then(o=>ot(o).then(a=>({balance:a.balance})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getNativeTokenBalance=(n,s,i)=>this.fetch(this.url("GetNativeTokenBalance"),et(n,s,i)).then(o=>ot(o).then(a=>({balance:a.balance})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesSummary=(n,s,i)=>this.fetch(this.url("GetTokenBalancesSummary"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesDetails=(n,s,i)=>this.fetch(this.url("GetTokenBalancesDetails"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesByContract=(n,s,i)=>this.fetch(this.url("GetTokenBalancesByContract"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,s,i)=>this.fetch(this.url("GetTokenSupplies"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,s,i)=>this.fetch(this.url("GetTokenSuppliesMap"),et(n,s,i)).then(o=>ot(o).then(a=>({supplies:a.supplies})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,s,i)=>this.fetch(this.url("GetTransactionHistory"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,s,i)=>this.fetch(this.url("SyncBalance"),et(n,s,i)).then(o=>ot(o).then(a=>({})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,s,i)=>this.fetch(this.url("FetchTransactionReceipt"),et(n,s,i)).then(o=>ot(o).then(a=>({receipt:a.receipt})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,s,i)=>this.fetch(this.url("GetOrderbookOrders"),et(n,s,i)).then(o=>ot(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,s,i)=>this.fetch(this.url("GetTopOrders"),et(n,s,i)).then(o=>ot(o).then(a=>({orders:a.orders})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,s,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),et(n,s,i)).then(o=>ot(o).then(a=>({receipt:a.receipt})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,s,i)=>this.fetch(this.url("GetAllWebhookListeners"),et(n,s,i)).then(o=>ot(o).then(a=>({listeners:a.listeners})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,s,i)=>this.fetch(this.url("GetWebhookListener"),et(n,s,i)).then(o=>ot(o).then(a=>({listener:a.listener})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,s,i)=>this.fetch(this.url("AddWebhookListener"),et(n,s,i)).then(o=>ot(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,s,i)=>this.fetch(this.url("UpdateWebhookListener"),et(n,s,i)).then(o=>ot(o).then(a=>({status:a.status})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,s,i)=>this.fetch(this.url("RemoveWebhookListener"),et(n,s,i)).then(o=>ot(o).then(a=>({status:a.status})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,s,i)=>this.fetch(this.url("ToggleWebhookListener"),et(n,s,i)).then(o=>ot(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,s,i)=>this.fetch(this.url("PauseAllWebhookListeners"),et(n,s,i)).then(o=>ot(o).then(a=>({status:a.status})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,s,i)=>this.fetch(this.url("ResumeAllWebhookListeners"),et(n,s,i)).then(o=>ot(o).then(a=>({status:a.status})),o=>{throw tt.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeReceipts"),et(n,s.headers,s.signal)).then(async function(o){await pb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeEvents=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeEvents"),et(n,s.headers,s.signal)).then(async function(o){await pb(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeBalanceUpdates=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeBalanceUpdates"),et(n,s.headers,s.signal)).then(async function(o){await pb(o,s,i)},o=>{s.onError(o,i)});return i()},this.hostname=e.replace(/\/*$/,""),this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const pb=async(t,e,r)=>{const{onMessage:n,onOpen:s,onClose:i,onError:o}=e;if(!t.ok){try{await ot(t)}catch(y){o(y,r)}return}if(!t.body){o(j0.new({status:t.status,cause:"Invalid response, missing body"}),r);return}s&&s();const a=t.body.getReader(),c=new TextDecoder;let l="",u=Date.now();const f=11*1e3;let d=!1;const h=setInterval(()=>{Date.now()-u>f&&(d=!0,clearInterval(h),a.releaseLock())},f);for(;;){let y,p;try{if({value:y,done:p}=await a.read(),d)throw new Error("Timeout, no data or heartbeat received");u=Date.now(),l+=c.decode(y,{stream:!0})}catch(g){let v="";g instanceof Error&&(v=g.message),g instanceof DOMException&&g.name==="AbortError"?o(tt.new({message:"AbortError",cause:`AbortError: ${v}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(XS.new({cause:`reader.read(): ${v}`}),r);return}let b=l.split(` +`);for(let g=0;g({method:"POST",headers:fd({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),ot=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),j0.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(OL[n]||lt).new(r)}return r});let lt=class XB extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,XB.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},ZB=class eL extends lt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eL.prototype)}},tt=class tL extends lt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tL.prototype)}},rL=class nL extends lt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nL.prototype)}},sL=class iL extends lt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,iL.prototype)}},oL=class aL extends lt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aL.prototype)}},j0=class cL extends lt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cL.prototype)}},lL=class uL extends lt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uL.prototype)}},fL=class dL extends lt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dL.prototype)}},hL=class pL extends lt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pL.prototype)}},XS=class yL extends lt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yL.prototype)}},gL=class vL extends lt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vL.prototype)}},mL=class xL extends lt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xL.prototype)}},bL=class wL extends lt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wL.prototype)}},EL=class CL extends lt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,CL.prototype)}};class cm extends lt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cm.prototype)}}class lm extends lt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lm.prototype)}}class um extends lt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,um.prototype)}}class fm extends lt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fm.prototype)}}let kL=class SL extends lt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,SL.prototype)}};class dm extends lt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dm.prototype)}}let AL=class TL extends lt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,TL.prototype)}};class hm extends lt{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hm.prototype)}}let IL=class PL extends lt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,PL.prototype)}};class pm extends lt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pm.prototype)}}class ym extends lt{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ym.prototype)}}let Wue=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.MethodNotFound="MethodNotFound",t.RequestConflict="RequestConflict",t.Aborted="Aborted",t.Timeout="Timeout",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.ResourceExhausted="ResourceExhausted",t.NotFound="NotFound",t.ProjectNotFound="ProjectNotFound",t.MetadataCallFailed="MetadataCallFailed",t}({});const OL={0:ZB,[-1]:tt,[-2]:rL,[-3]:sL,[-4]:oL,[-5]:j0,[-6]:lL,[-7]:fL,[-8]:hL,[-9]:XS,[-10]:gL,1e3:mL,1001:bL,1002:EL,1003:cm,1004:lm,1005:um,2e3:fm,2001:kL,2002:dm,2003:AL,2004:hm,3e3:IL,3002:pm,3003:ym},ZS="Webrpc",RL="webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0",Vue="v1",zue="v0.4.0",Hue="71cd081c5ca2372bf92a897ae1aa4ebf93ffd0fc";function Gue(t){const e=t.get(ZS);return e?que(e):{webrpcGenVersion:"",codeGenName:"",codeGenVersion:"",schemaName:"",schemaVersion:""}}function que(t){const e=t.split(";");if(e.length<3)return{webrpcGenVersion:"",codeGenName:"",codeGenVersion:"",schemaName:"",schemaVersion:""};const[r,n]=e[0].split("@"),[s,i]=e[1].split("@"),[o,a]=e[2].split("@");return{webrpcGenVersion:n,codeGenName:s,codeGenVersion:i,schemaName:o,schemaVersion:a}}let Kue=function(t){return t.UNKNOWN="UNKNOWN",t.NATIVE="NATIVE",t.ERC20="ERC20",t.ERC721="ERC721",t.ERC1155="ERC1155",t.SEQUENCE_WALLET="SEQUENCE_WALLET",t.ERC20_BRIDGE="ERC20_BRIDGE",t.ERC721_BRIDGE="ERC721_BRIDGE",t.ERC1155_BRIDGE="ERC1155_BRIDGE",t.SEQ_MARKETPLACE="SEQ_MARKETPLACE",t}({}),Que=function(t){return t.UNKNOWN="UNKNOWN",t.BLOCK_ADDED="BLOCK_ADDED",t.BLOCK_REMOVED="BLOCK_REMOVED",t}({}),Jue=function(t){return t.EVENT="EVENT",t.TOKEN_TRANSFER="TOKEN_TRANSFER",t.NATIVE_TOKEN_TRANSFER="NATIVE_TOKEN_TRANSFER",t.SEQUENCE_TXN="SEQUENCE_TXN",t}({}),Yue=function(t){return t.OPEN="OPEN",t.CLOSED="CLOSED",t.CANCELLED="CANCELLED",t}({}),Xue=function(t){return t.UNKNOWN="UNKNOWN",t.SEND="SEND",t.RECEIVE="RECEIVE",t}({}),Zue=function(t){return t.FAILED="FAILED",t.SUCCESSFUL="SUCCESSFUL",t}({}),efe=function(t){return t.LegacyTxnType="LegacyTxnType",t.AccessListTxnType="AccessListTxnType",t.DynamicFeeTxnType="DynamicFeeTxnType",t}({}),tfe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({}),rfe=function(t){return t.VERIFIED="VERIFIED",t.UNVERIFIED="UNVERIFIED",t.ALL="ALL",t}({});class NL{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/IndexerGateway/",this.getNativeTokenBalance=(n,s,i)=>this.fetch(this.url("GetNativeTokenBalance"),Si(n,s,i)).then(o=>Ai(o).then(a=>({balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),Si(n,s,i)).then(o=>Ai(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesSummary=(n,s,i)=>this.fetch(this.url("GetTokenBalancesSummary"),Si(n,s,i)).then(o=>Ai(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesDetails=(n,s,i)=>this.fetch(this.url("GetTokenBalancesDetails"),Si(n,s,i)).then(o=>Ai(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesByContract=(n,s,i)=>this.fetch(this.url("GetTokenBalancesByContract"),Si(n,s,i)).then(o=>Ai(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),Si(n,s,i)).then(o=>Ai(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw ps.new({cause:`fetch(): ${o.message||""}`})}),this.ping=(n,s)=>this.fetch(this.url("Ping"),Si({},n,s)).then(i=>Ai(i).then(o=>({status:o.status})),i=>{throw ps.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),Si({},n,s)).then(i=>Ai(i).then(o=>({version:o.version})),i=>{throw ps.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),Si({},n,s)).then(i=>Ai(i).then(o=>({status:o.status})),i=>{throw ps.new({cause:`fetch(): ${i.message||""}`})}),this.hostname=e.replace(/\/*$/,""),this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Si=(t={},e={},r=null)=>{const n=fd({},e,{"Content-Type":"application/json"});return n[ZS]=RL,{method:"POST",headers:n,body:JSON.stringify(t||{}),signal:r}},Ai=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),eA.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(sfe[n]||je).new(r)}return r});let je=class _L extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,_L.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},ML=class DL extends je{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DL.prototype)}},ps=class BL extends je{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,BL.prototype)}},LL=class jL extends je{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jL.prototype)}},FL=class UL extends je{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UL.prototype)}},$L=class WL extends je{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,WL.prototype)}},eA=class VL extends je{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VL.prototype)}},zL=class HL extends je{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HL.prototype)}},GL=class qL extends je{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,qL.prototype)}},KL=class QL extends je{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,QL.prototype)}},JL=class YL extends je{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,YL.prototype)}},XL=class ZL extends je{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZL.prototype)}},ej=class tj extends je{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tj.prototype)}},rj=class nj extends je{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nj.prototype)}},sj=class ij extends je{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ij.prototype)}},oj=class aj extends je{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aj.prototype)}},cj=class lj extends je{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lj.prototype)}},uj=class fj extends je{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fj.prototype)}},dj=class hj extends je{constructor(e="Geoblocked",r=1006,n="Geoblocked region",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hj.prototype)}},pj=class yj extends je{constructor(e="RateLimited",r=1007,n="Rate-limited. Please slow down.",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yj.prototype)}},gj=class vj extends je{constructor(e="ProjectNotFound",r=1100,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vj.prototype)}};class gm extends je{constructor(e="AccessKeyNotFound",r=1101,n="Access key not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gm.prototype)}}class vm extends je{constructor(e="AccessKeyMismatch",r=1102,n="Access key mismatch",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vm.prototype)}}class mm extends je{constructor(e="InvalidOrigin",r=1103,n="Invalid origin for Access Key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mm.prototype)}}class xm extends je{constructor(e="InvalidService",r=1104,n="Service not enabled for Access key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xm.prototype)}}class bm extends je{constructor(e="UnauthorizedUser",r=1105,n="Unauthorized user",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bm.prototype)}}class wm extends je{constructor(e="QuotaExceeded",r=1200,n="Quota exceeded",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wm.prototype)}}class Em extends je{constructor(e="RateLimit",r=1201,n="Rate limit exceeded",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Em.prototype)}}class Cm extends je{constructor(e="NoDefaultKey",r=1300,n="No default access key found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Cm.prototype)}}class km extends je{constructor(e="MaxAccessKeys",r=1301,n="Access keys limit reached",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,km.prototype)}}class Sm extends je{constructor(e="AtLeastOneKey",r=1302,n="You need at least one Access Key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Sm.prototype)}}let mj=class xj extends je{constructor(e="Timeout",r=1900,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xj.prototype)}},bj=class wj extends je{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wj.prototype)}},Ej=class Cj extends je{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Cj.prototype)}},kj=class Sj extends je{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Sj.prototype)}};class Am extends je{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Am.prototype)}}let Aj=class Tj extends je{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Tj.prototype)}};class Tm extends je{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Tm.prototype)}}let nfe=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.MethodNotFound="MethodNotFound",t.RequestConflict="RequestConflict",t.Aborted="Aborted",t.Geoblocked="Geoblocked",t.RateLimited="RateLimited",t.ProjectNotFound="ProjectNotFound",t.AccessKeyNotFound="AccessKeyNotFound",t.AccessKeyMismatch="AccessKeyMismatch",t.InvalidOrigin="InvalidOrigin",t.InvalidService="InvalidService",t.UnauthorizedUser="UnauthorizedUser",t.QuotaExceeded="QuotaExceeded",t.RateLimit="RateLimit",t.NoDefaultKey="NoDefaultKey",t.MaxAccessKeys="MaxAccessKeys",t.AtLeastOneKey="AtLeastOneKey",t.Timeout="Timeout",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.ResourceExhausted="ResourceExhausted",t.NotFound="NotFound",t.MetadataCallFailed="MetadataCallFailed",t}({});const sfe={0:ML,[-1]:ps,[-2]:LL,[-3]:FL,[-4]:$L,[-5]:eA,[-6]:zL,[-7]:GL,[-8]:KL,[-9]:JL,[-10]:XL,1e3:ej,1001:rj,1002:sj,1003:oj,1004:cj,1005:uj,1006:dj,1007:pj,1100:gj,1101:gm,1102:vm,1103:mm,1104:xm,1105:bm,1200:wm,1201:Em,1300:Cm,1301:km,1302:Sm,1900:mj,2001:bj,2002:Ej,2003:kj,2004:Am,3e3:Aj,3003:Tm};var ife=Object.freeze({__proto__:null,WebrpcHeader:ZS,WebrpcHeaderValue:RL,WebRPCVersion:Vue,WebRPCSchemaVersion:zue,WebRPCSchemaHash:Hue,VersionFromHeader:Gue,ContractType:Kue,EventLogType:Que,EventLogDataType:Jue,OrderStatus:Yue,TxnTransferType:Xue,TransactionStatus:Zue,TransactionType:efe,SortOrder:tfe,ContractVerificationStatus:rfe,IndexerGateway:NL,WebrpcError:je,WebrpcEndpointError:ML,WebrpcRequestFailedError:ps,WebrpcBadRouteError:LL,WebrpcBadMethodError:FL,WebrpcBadRequestError:$L,WebrpcBadResponseError:eA,WebrpcServerPanicError:zL,WebrpcInternalErrorError:GL,WebrpcClientDisconnectedError:KL,WebrpcStreamLostError:JL,WebrpcStreamFinishedError:XL,UnauthorizedError:ej,PermissionDeniedError:rj,SessionExpiredError:sj,MethodNotFoundError:oj,RequestConflictError:cj,AbortedError:uj,GeoblockedError:dj,RateLimitedError:pj,ProjectNotFoundError:gj,AccessKeyNotFoundError:gm,AccessKeyMismatchError:vm,InvalidOriginError:mm,InvalidServiceError:xm,UnauthorizedUserError:bm,QuotaExceededError:wm,RateLimitError:Em,NoDefaultKeyError:Cm,MaxAccessKeysError:km,AtLeastOneKeyError:Sm,TimeoutError:mj,InvalidArgumentError:bj,UnavailableError:Ej,QueryFailedError:kj,ResourceExhaustedError:Am,NotFoundError:Aj,MetadataCallFailedError:Tm,errors:nfe});class Ij extends YB{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,fetch),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=fd({},i.headers,o),fetch(s,i)},this.fetch=this._fetch}}class Pj extends NL{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,fetch),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=fd({},i.headers,o),fetch(s,i)},this.fetch=this._fetch}}const ofe=Object.freeze(Object.defineProperty({__proto__:null,AbortedError:um,ContractType:_ue,ContractVerificationStatus:$ue,EventLogDataType:Due,EventLogType:Mue,Indexer:YB,IndexerGateway:ife,InvalidArgumentError:kL,MetadataCallFailedError:ym,MethodNotFoundError:cm,NotFoundError:IL,OrderStatus:Bue,PermissionDeniedError:bL,ProjectNotFoundError:pm,QueryFailedError:AL,RequestConflictError:lm,ResourceExhaustedError:hm,SequenceIndexer:Ij,SequenceIndexerGateway:Pj,SessionExpiredError:EL,SortOrder:Uue,TimeoutError:fm,TransactionStatus:jue,TransactionType:Fue,TxnTransferType:Lue,UnauthorizedError:mL,UnavailableError:dm,WebRPCSchemaHash:Nue,WebRPCSchemaVersion:Rue,WebRPCVersion:Oue,WebrpcBadMethodError:sL,WebrpcBadRequestError:oL,WebrpcBadResponseError:j0,WebrpcBadRouteError:rL,WebrpcClientDisconnectedError:hL,WebrpcEndpointError:ZB,WebrpcError:lt,WebrpcInternalErrorError:fL,WebrpcRequestFailedError:tt,WebrpcServerPanicError:lL,WebrpcStreamFinishedError:gL,WebrpcStreamLostError:XS,errors:Wue},Symbol.toStringTag,{value:"Module"}));function F0(){return F0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),we({},n,s)).then(i=>Ee(i).then(o=>({status:o.status})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),we({},n,s)).then(i=>Ee(i).then(o=>({version:o.version})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),we({},n,s)).then(i=>Ee(i).then(o=>({status:o.status})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.getTokenMetadata=(n,s,i)=>this.fetch(this.url("GetTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.refreshTokenMetadata=(n,s,i)=>this.fetch(this.url("RefreshTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskId:a.taskId})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.enqueueTokensForRefresh=(n,s,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskId:a.taskId})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenRefreshStatus=(n,s,i)=>this.fetch(this.url("GetTokenRefreshStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenRefreshResult=(n,s,i)=>this.fetch(this.url("GetTokenRefreshResult"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status,tokens:a.tokens,failureReasons:a.failureReasons})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.cancelRefreshJob=(n,s,i)=>this.fetch(this.url("CancelRefreshJob"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenMetadataBatch=(n,s,i)=>this.fetch(this.url("GetTokenMetadataBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractTokenMetadata:a.contractTokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokenMetadata=(n,s,i)=>this.fetch(this.url("SearchTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokenMetadata:a.tokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokenIDs=(n,s,i)=>this.fetch(this.url("SearchTokenIDs"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokenIds:a.tokenIds})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.tokenCollectionFilters=(n,s,i)=>this.fetch(this.url("TokenCollectionFilters"),we(n,s,i)).then(o=>Ee(o).then(a=>({filters:a.filters})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractInfo=(n,s,i)=>this.fetch(this.url("GetContractInfo"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfo:a.contractInfo})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractInfoBatch=(n,s,i)=>this.fetch(this.url("GetContractInfoBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoMap:a.contractInfoMap})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContractInfo=(n,s,i)=>this.fetch(this.url("SearchContractInfo"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoList:a.contractInfoList})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContractInfoBatch=(n,s,i)=>this.fetch(this.url("SearchContractInfoBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoByChain:a.contractInfoByChain})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchMetadata=(n,s,i)=>this.fetch(this.url("SearchMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata,contractInfo:a.contractInfo})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokens=(n,s,i)=>this.fetch(this.url("SearchTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata,nextPage:a.nextPage})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContracts=(n,s,i)=>this.fetch(this.url("SearchContracts"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfo:a.contractInfo,nextPage:a.nextPage})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapTokenQuantity=(n,s,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),we(n,s,i)).then(o=>Ee(o).then(a=>({quantity:a.quantity})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapUnitPrices=(n,s,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),we(n,s,i)).then(o=>Ee(o).then(a=>({prices:a.prices})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapUnitPricesWithQuantities=(n,s,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),we(n,s,i)).then(o=>Ee(o).then(a=>({prices:a.prices})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.addContractToMintMonitor=(n,s,i)=>this.fetch(this.url("AddContractToMintMonitor"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.removeContractFromMintMonitor=(n,s,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.mintMonitorJobStatus=(n,s,i)=>this.fetch(this.url("MintMonitorJobStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({task:a.task})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.mintMonitorTriggerJob=(n,s,i)=>this.fetch(this.url("MintMonitorTriggerJob"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.syncContractTokens=(n,s,i)=>this.fetch(this.url("SyncContractTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskID:a.taskID})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.abortContractSync=(n,s,i)=>this.fetch(this.url("AbortContractSync"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.contractSyncJobStatus=(n,s,i)=>this.fetch(this.url("ContractSyncJobStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({refreshTask:a.refreshTask,syncTask:a.syncTask})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directoryGetNetworks=(n,s,i)=>this.fetch(this.url("DirectoryGetNetworks"),we(n,s,i)).then(o=>Ee(o).then(a=>({networks:a.networks})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directoryGetCollections=(n,s,i)=>this.fetch(this.url("DirectoryGetCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directorySearchCollections=(n,s,i)=>this.fetch(this.url("DirectorySearchCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}class Rj{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Collections/",this.createCollection=(n,s,i)=>this.fetch(this.url("CreateCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getCollection=(n,s,i)=>this.fetch(this.url("GetCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listCollections=(n,s,i)=>this.fetch(this.url("ListCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,collections:a.collections})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateCollection=(n,s,i)=>this.fetch(this.url("UpdateCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteCollection=(n,s,i)=>this.fetch(this.url("DeleteCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.publishCollection=(n,s,i)=>this.fetch(this.url("PublishCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.unpublishCollection=(n,s,i)=>this.fetch(this.url("UnpublishCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createContractCollection=(n,s,i)=>this.fetch(this.url("CreateContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollection:a.contractCollection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractCollection=(n,s,i)=>this.fetch(this.url("GetContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollection:a.contractCollection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listContractCollections=(n,s,i)=>this.fetch(this.url("ListContractCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollections:a.contractCollections,collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateContractCollection=(n,s,i)=>this.fetch(this.url("UpdateContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteContractCollection=(n,s,i)=>this.fetch(this.url("DeleteContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createToken=(n,s,i)=>this.fetch(this.url("CreateToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token,assets:a.assets})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getToken=(n,s,i)=>this.fetch(this.url("GetToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token,assets:a.assets})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listTokens=(n,s,i)=>this.fetch(this.url("ListTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokens:a.tokens})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateToken=(n,s,i)=>this.fetch(this.url("UpdateToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteToken=(n,s,i)=>this.fetch(this.url("DeleteToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createAsset=(n,s,i)=>this.fetch(this.url("CreateAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getAsset=(n,s,i)=>this.fetch(this.url("GetAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateAsset=(n,s,i)=>this.fetch(this.url("UpdateAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteAsset=(n,s,i)=>this.fetch(this.url("DeleteAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}class pfe{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Admin/",this.addContractsToTokenDirectory=(n,s,i)=>this.fetch(this.url("AddContractsToTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.removeContractsFromTokenDirectory=(n,s,i)=>this.fetch(this.url("RemoveContractsFromTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.modifyFeatureIndex=(n,s,i)=>this.fetch(this.url("ModifyFeatureIndex"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getFeatureIndex=(n,s,i)=>this.fetch(this.url("GetFeatureIndex"),we(n,s,i)).then(o=>Ee(o).then(a=>({featured:a.featured})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listTokenDirectory=(n,s,i)=>this.fetch(this.url("ListTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,collections:a.collections})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const we=(t={},e={},r=null)=>({method:"POST",headers:F0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Ee=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),tA.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(gfe[n]||nt).new(r)}return r});let nt=class Nj extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,Nj.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},_j=class Mj extends nt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Mj.prototype)}},be=class Dj extends nt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Dj.prototype)}},Bj=class Lj extends nt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lj.prototype)}},jj=class Fj extends nt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Fj.prototype)}},Uj=class $j extends nt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$j.prototype)}},tA=class Wj extends nt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Wj.prototype)}},Vj=class zj extends nt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zj.prototype)}},Hj=class Gj extends nt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Gj.prototype)}},qj=class Kj extends nt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Kj.prototype)}},Qj=class Jj extends nt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Jj.prototype)}},Yj=class Xj extends nt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Xj.prototype)}},Zj=class eF extends nt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eF.prototype)}},tF=class rF extends nt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rF.prototype)}},nF=class sF extends nt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sF.prototype)}};class Im extends nt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Im.prototype)}}class Pm extends nt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Pm.prototype)}}class Om extends nt{constructor(e="Fail",r=1005,n="Request Failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Om.prototype)}}class Rm extends nt{constructor(e="Geoblocked",r=1006,n="Geoblocked region",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Rm.prototype)}}class Nm extends nt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Nm.prototype)}}let iF=class oF extends nt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,oF.prototype)}};class _m extends nt{constructor(e="RequiredArgument",r=2002,n="Required argument missing",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,_m.prototype)}}let aF=class cF extends nt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cF.prototype)}},lF=class uF extends nt{constructor(e="ValidationFailed",r=2004,n="Validation failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uF.prototype)}};class Mm extends nt{constructor(e="RateLimited",r=2005,n="Rate limited",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Mm.prototype)}}let fF=class dF extends nt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dF.prototype)}};class Dm extends nt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Dm.prototype)}}class Bm extends nt{constructor(e="ChainNotFound",r=3003,n="Chain not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Bm.prototype)}}class Lm extends nt{constructor(e="TokenDirectoryDisabled",r=4001,n="Token Directory is disabled",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lm.prototype)}}let yfe=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.MethodNotFound="MethodNotFound",t.RequestConflict="RequestConflict",t.Fail="Fail",t.Geoblocked="Geoblocked",t.Timeout="Timeout",t.InvalidArgument="InvalidArgument",t.RequiredArgument="RequiredArgument",t.QueryFailed="QueryFailed",t.ValidationFailed="ValidationFailed",t.RateLimited="RateLimited",t.NotFound="NotFound",t.ProjectNotFound="ProjectNotFound",t.ChainNotFound="ChainNotFound",t.TokenDirectoryDisabled="TokenDirectoryDisabled",t}({});const gfe={0:_j,[-1]:be,[-2]:Bj,[-3]:jj,[-4]:Uj,[-5]:tA,[-6]:Vj,[-7]:Hj,[-8]:qj,[-9]:Qj,[-10]:Yj,1e3:Zj,1001:tF,1002:nF,1003:Im,1004:Pm,1005:Om,1006:Rm,2e3:Nm,2001:iF,2002:_m,2003:aF,2004:lF,2005:Mm,3e3:fF,3002:Dm,3003:Bm,4001:Lm};class hF extends Oj{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,fetch),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=F0({},i.headers,o),fetch(s,i)},this.fetch=this._fetch}}class vfe extends Rj{constructor(e="https://metadata.sequence.app",r){super(e.endsWith("/")?e.slice(0,-1):e,fetch),this.jwtAuth=r,this._fetch=(n,s)=>{const i={},o=this.jwtAuth;return o&&o.length>0&&(i.Authorization=`BEARER ${o}`),s.headers=F0({},s.headers,i),fetch(n,s)},this.fetch=this._fetch}}const mfe=Object.freeze(Object.defineProperty({__proto__:null,Admin:pfe,ChainNotFoundError:Bm,Collections:Rj,ContractType:ufe,FailError:Om,GeoblockedError:Rm,InvalidArgumentError:iF,Metadata:Oj,MethodNotFoundError:Im,NotFoundError:fF,PermissionDeniedError:tF,ProjectNotFoundError:Dm,PropertyType:ffe,QueryFailedError:aF,RateLimitedError:Mm,RequestConflictError:Pm,RequiredArgumentError:_m,SequenceCollections:vfe,SequenceMetadata:hF,SessionExpiredError:nF,SwapType:dfe,TaskStatus:hfe,TimeoutError:Nm,TokenDirectoryDisabledError:Lm,UnauthorizedError:Zj,ValidationFailedError:lF,WebRPCSchemaHash:lfe,WebRPCSchemaVersion:cfe,WebRPCVersion:afe,WebrpcBadMethodError:jj,WebrpcBadRequestError:Uj,WebrpcBadResponseError:tA,WebrpcBadRouteError:Bj,WebrpcClientDisconnectedError:qj,WebrpcEndpointError:_j,WebrpcError:nt,WebrpcInternalErrorError:Hj,WebrpcRequestFailedError:be,WebrpcServerPanicError:Vj,WebrpcStreamFinishedError:Yj,WebrpcStreamLostError:Qj,errors:yfe},Symbol.toStringTag,{value:"Module"}));function xfe(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function bfe(t){return t.startsWith("ipfs://")}class pF{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(de.signer.canRecover(n)){const c=de.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await de.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Efe(wfe(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=z(await(s||new Cfe).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===z(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return yF(t,e,r,a,s,i+1)}class Cfe{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>bfe(n)?xfe(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()}}}const kfe=(t,e)=>e.some(r=>t instanceof r);let K8,Q8;function Sfe(){return K8||(K8=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Afe(){return Q8||(Q8=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gF=new WeakMap,fE=new WeakMap,vF=new WeakMap,yb=new WeakMap,rA=new WeakMap;function Tfe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ia(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&gF.set(r,t)}).catch(()=>{}),rA.set(e,t),e}function Ife(t){if(fE.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});fE.set(t,e)}let dE={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return fE.get(t);if(e==="objectStoreNames")return t.objectStoreNames||vF.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ia(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Pfe(t){dE=t(dE)}function Ofe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(gb(this),e,...r);return vF.set(n,e.sort?e.sort():[e]),Ia(n)}:Afe().includes(t)?function(...e){return t.apply(gb(this),e),Ia(gF.get(this))}:function(...e){return Ia(t.apply(gb(this),e))}}function Rfe(t){return typeof t=="function"?Ofe(t):(t instanceof IDBTransaction&&Ife(t),kfe(t,Sfe())?new Proxy(t,dE):t)}function Ia(t){if(t instanceof IDBRequest)return Tfe(t);if(yb.has(t))return yb.get(t);const e=Rfe(t);return e!==t&&(yb.set(t,e),rA.set(e,t)),e}const gb=t=>rA.get(t);function Nfe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ia(o);return n&&o.addEventListener("upgradeneeded",c=>{n(Ia(o.result),c.oldVersion,c.newVersion,Ia(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const _fe=["get","getKey","getAll","getAllKeys","count"],Mfe=["put","add","delete","clear"],vb=new Map;function J8(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(vb.get(e))return vb.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=Mfe.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||_fe.includes(r)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),s&&c.done]))[0]};return vb.set(e,i),i}Pfe(t=>({...t,get:(e,r,n)=>J8(e,r)||t.get(e,r,n),has:(e,r)=>!!J8(e,r)||t.has(e,r)}));var Dfe=Object.freeze({__proto__:null});function Ei(){return Ei=Object.assign?Object.assign.bind():function(t){for(var e=1;e{try{const{Signer:d,Subdigest:h,Digest:y,"To-Config":p}=f;let b;switch(f["Signature-Type"]){case"eip-712":case"eth_sign":case"erc-1271":b=f["Signature-Type"];break;default:throw new Error(`unknown signature type ${f["Signature-Type"]}`)}let g;try{g=BigInt(f["To-Checkpoint"])}catch{throw new Error(`to checkpoint is not a number: ${f["To-Checkpoint"]}`)}if(g<=i)return[];if(!hg(d))throw new Error(`signer is not an address: ${d}`);if(!Ke(h,32))throw new Error(`subdigest is not a hash: ${h}`);if(!Ke(y,32))throw new Error(`digest is not a hash: ${y}`);let v;try{v=BigInt(f["Chain-ID"])}catch{throw new Error(`chain id is not a number: ${f["Chain-ID"]}`)}if(!Ke(p,32))throw new Error(`to config is not a hash: ${p}`);return[{id:u,signatureType:b,signer:d,subdigest:h,digest:y,chainId:v,toImageHash:p,toCheckpoint:g}]}catch(d){return console.warn(`invalid wallet ${n} config update ${u}:`,d),[]}}),a=new Map;let c=[];for(const u of o){let f=a.get(u.toImageHash);f||(f=new Map,a.set(u.toImageHash,f),c.push(u)),f.set(u.signer,u)}e.longestPath?c.sort(({toCheckpoint:u},{toCheckpoint:f})=>u===f?0:uu===f?0:u[v,{signature:"0x",isDynamic:!1}])),[],0);if(g>=BigInt(u.threshold)){d=b;break}}if(!d){console.warn(`unreachable configs with checkpoint > ${u.checkpoint} from config ${f}`);break}const p=d.toImageHash;try{const b=await this.configOfImageHash({imageHash:p});if(!b)throw new Error(`unable to find config ${p}`);if(!_e.config.isWalletConfig(b))throw new Error(`config ${p} is not v2`);const g=new Map((await Promise.all(y.map(async function(k){const{id:A,subdigest:P,signatureType:R}=h.get(k);try{let N=await(await Mp(A,r.options.rateLimitRetryDelayMs,r.options.arweaveUrl)).text();switch(R){case"eip-712":N+="01";break;case"eth_sign":N+="02";break;case"erc-1271":N+="03";break}if(r.eip5719)try{N=z(await r.eip5719.runByEIP5719(k,P,N))}catch{console.warn(`unable to run eip-5719 on config update ${A}`)}const V=de.signer.tryRecoverSigner(P,N);return[[k,{signature:N,isDynamic:V!==k}]]}catch(N){return console.warn(`unable to fetch signer ${k} config update ${A}:`,N),[]}}))).flat()),{encoded:v,weight:m}=_e.signature.encodeSigners(u,g,[],0);if(mk>BigInt(u.checkpoint))}catch(b){console.warn(`unable to reconstruct wallet ${n} update from config ${f} to config ${p}:`,b),c=c.filter(({toImageHash:g})=>g!==p)}}return l}savePresignedConfiguration(e){throw new Error("arweave backend does not support saving config updates")}saveWitnesses(e){throw new Error("arweave backend does not support saving signatures")}async configOfImageHash(e){var r=this;if(!e.noCache){const s=this.configs.get(e.imageHash);if(s)try{return await s}catch{const o=this.configs.get(e.imageHash);if(o)return o}}const n=async function(s){const i=Object.entries(await Jd({Type:"config",Config:s},r.options)).flatMap(([o,a])=>{try{const c=Number(a.Version);if(!c)throw new Error(`invalid version: ${a.Version}`);return[{id:o,version:c}]}catch(c){return console.warn(`config ${s} at ${o} invalid:`,c),[]}});switch(i.length){case 0:r.configs.set(s,Promise.resolve(void 0));return;case 1:break;default:console.warn(`multiple configs ${s} at ${i.map(({id:o})=>o).join(", ")}`);break}for(const{id:o,version:a}of i)try{const c=Ei({},await(await Mp(o,r.options.rateLimitRetryDelayMs,r.options.arweaveUrl)).json(),{version:a});c.tree&&(c.tree=Zl(c.tree));const l=er.coderFor(a).config.imageHashOf(c);if(l!==s)throw new Error(`image hash is ${l}, expected ${s}`);return r.configs.set(s,Promise.resolve(c)),c}catch(c){console.warn(`config at ${o} invalid:`,c)}r.configs.set(s,Promise.resolve(void 0))}(e.imageHash);return e.noCache||this.configs.set(e.imageHash,n),n}saveWalletConfig(e){throw new Error("arweave backend does not support saving configs")}async imageHashOfCounterfactualWallet(e){const r=Ae(e.wallet),n=Object.entries(await Jd({Type:"wallet",Wallet:r},this.options)).flatMap(([s,i])=>{try{const{"Deploy-Config":o}=i,a=Number(i["Deploy-Version"]);if(!a)throw new Error(`invalid version: ${i["Deploy-Version"]}`);if(!o)throw new Error("no deploy config");const c=de.context.defaultContexts[a];if(!c)throw new Error(`unknown version: ${a}`);if(de.context.addressOf(c,o)!==r)throw new Error(`incorrect v${a} deploy config: ${o}`);return[{id:s,imageHash:o,context:c}]}catch(o){return console.warn(`wallet ${r} at ${s} invalid:`,o),[]}});switch(n.length){case 0:return;case 1:break;default:console.warn(`multiple deploy configs for wallet ${r} at ${n.map(({id:s})=>s).join(", ")}, using first`);break}return n[0]}saveCounterfactualWallet(e){throw new Error("arweave backend does not support saving wallets")}async walletsOfSigner(e){var r=this;const n=Ae(e.signer),s=new Map;for(const[i,o]of Object.entries(await Jd({Type:["signature","config update"],Signer:n,Witness:e.allSignatures?void 0:"true"},this.options))){const{Wallet:a,Subdigest:c,Digest:l,"Chain-ID":u}=o;try{if(s.has(a))continue;let f;switch(o["Signature-Type"]){case"eip-712":f="01";break;case"eth_sign":f="02";break;case"erc-1271":f="03";break;default:throw new Error(`unknown signature type ${o["Signature-Type"]}`)}if(c!==de.signature.subdigestOf({digest:l,chainId:u,address:a}))throw new Error("incorrect subdigest");const d=Mp(i,this.options.rateLimitRetryDelayMs,this.options.arweaveUrl).then(async function(h){const y=await h.text()+f;if(r.eip5719)try{return z(await r.eip5719.runByEIP5719(n,c,y))}catch{console.warn(`unable to run eip-5719 on signature ${i}`)}return y});s.set(a,{digest:l,chainId:BigInt(u),signature:d})}catch(f){console.warn(`signer ${n} signature ${i} of wallet ${a} invalid:`,f)}}return Promise.all([...s.entries()].map(async function([i,{digest:o,chainId:a,signature:c}]){return{wallet:i,proof:{digest:o,chainId:a,signature:await c}}}))}async getMigration(e,r,n,s){const i=Ae(e),o=Object.entries(await Jd({Type:"migration",Migration:i,"Chain-ID":BigInt(s).toString(),"From-Version":`${n}`,"From-Config":r},this.options)).flatMap(([m,k])=>{try{const{"To-Config":A,Executor:P}=k,R=Number(k["To-Version"]);if(!R)throw new Error(`invalid version: ${k["To-Version"]}`);if(!Ke(A,32))throw new Error(`to config is not a hash: ${A}`);if(!hg(P))throw new Error(`executor is not an address: ${P}`);return{id:m,toVersion:R,toImageHash:A,executor:P}}catch(A){return console.warn(`chain ${s} migration ${m} for v${n} wallet ${i} from config ${r} invalid:`,A),[]}});switch(o.length){case 0:return;case 1:break;default:console.warn(`multiple chain ${s} migrations for v${n} wallet ${i} from config ${r} at ${o.map(({id:m})=>m).join(", ")}, using first`);break}const{id:a,toVersion:c,toImageHash:l,executor:u}=o[0],[f,d]=await Promise.all([Mp(a,this.options.rateLimitRetryDelayMs,this.options.arweaveUrl).then(m=>m.text()),this.configOfImageHash({imageHash:l})]);if(!d)throw new Error(`unable to find to config ${l} for migration`);const h=new ft(Bfe),[y,p,b]=h.decodeFunctionData("execute",f),g=de.transaction.fromTxAbiEncode(y),v=de.transaction.subdigestOfTransactions(i,s,p,g);return{tx:{entrypoint:u,transactions:g,nonce:p,chainId:s,intent:{id:v,wallet:i},signature:b},fromVersion:n,toVersion:Number(c),toConfig:d}}saveMigration(e,r,n){throw new Error("arweave backend does not support saving migrations")}}async function Jd(t,e){var r,n,s,i;const o=(r=e==null?void 0:e.namespace)!=null?r:ol.namespace,a=e==null?void 0:e.owners,c=(n=e==null?void 0:e.graphqlUrl)!=null?n:ol.graphqlUrl,l=(s=e==null?void 0:e.rateLimitRetryDelayMs)!=null?s:ol.rateLimitRetryDelayMs,u=(i=e==null?void 0:e.pageSize)!=null?i:100,f=e==null?void 0:e.maxResults,d=Object.entries(t).flatMap(([y,p])=>p===void 0?[]:[`{ name: "${o?`${o}-${y}`:y}", values: [${typeof p=="string"?`"${p}"`:p.map(b=>`"${b}"`).join(", ")}] }`]),h=[];for(let y=!0;y&&(f===void 0||h.length`"${v}"`).join(", ")}]`}) { + pageInfo { + hasNextPage + } + edges { + cursor + node { + id + tags { + name + value + } + } + } + } + } + `;let b;for(;b=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:p}),redirect:"follow"}),b.status===429;)console.warn(`rate limited by ${c}, trying again in ${l/1e3} seconds at ${new Date(Date.now()+l).toLocaleTimeString()}`),await new Promise(v=>setTimeout(v,l));const{data:{transactions:g}}=await b.json();h.push(...g.edges),y=g.pageInfo.hasNextPage}return Object.fromEntries(h.map(({node:{id:y,tags:p}})=>[y,Object.fromEntries(p.map(({name:b,value:g})=>[o&&b.startsWith(`${o}-`)?b.slice(o.length+1):b,g]))]))}async function Mp(t,e=ol.rateLimitRetryDelayMs,r=ol.arweaveUrl){for(;;){const n=await fetch(`${r}/${t}`,{redirect:"follow"});if(n.status!==429)return n;console.warn(`rate limited by ${r}, trying again in ${e/1e3} seconds at ${new Date(Date.now()+e).toLocaleTimeString()}`),await new Promise(s=>setTimeout(s,e))}}function Zl(t){return typeof t=="string"?{nodeHash:t}:typeof t=="object"&&(t==null?void 0:t.node)!==void 0?{nodeHash:t.node}:t instanceof Array&&t.length===2?{left:Zl(t[0]),right:Zl(t[1])}:_e.config.isNode(t)?{left:Zl(t.left),right:Zl(t.right)}:_e.config.isNestedLeaf(t)?Ei({},t,{tree:Zl(t.tree)}):t}var jfe=Object.freeze({__proto__:null,defaults:ol,ArweaveReader:Lfe});class Ffe{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),jr(e,"? "),jr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),jr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),jr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),jr(e,"? "),jr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),jr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),jr(e,"? "),jr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),jr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),jr(e,"? "),jr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),jr({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),jr(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),jr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function jr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,Os,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var Ufe=Object.freeze({__proto__:null,DebugConfigTracker:Ffe});class mF{constructor(){this.configs={},this.v2Nodes={},this.counterfactualWallets={},this.payloads={},this.signatures={},this.migrations={},this.loadConfig=e=>Promise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var s;return Promise.resolve(((s=this.migrations[e])==null||(s=s[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:s,toImageHash:i}),Promise.resolve())}}function Wu(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=BigInt(n._hex):Array.isArray(n)?e[r]=n.map(s=>Wu(s)):typeof n=="object"&&n!==null?e[r]=Wu(n):e[r]=n}return e}class $fe{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>Wu(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>Wu(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>Wu(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(c=>({subdigest:c.subdigest,toImageHash:c.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await Nfe(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function xF(t){return t.left!==void 0&&t.right!==void 0}function bF(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function hE(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var Wfe=Object.freeze({__proto__:null,isPlainNode:xF,isPlainNested:bF,isPlainV2Config:hE,MemoryTrackerStore:mF,recreateBigNumbers:Wu,IndexedDBStore:$fe});class nA{constructor(e,r=new mF,n=!1){var s=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(xF(o)){const[a,c]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:c}}return bF(o)?{weight:BigInt(o.weight),threshold:BigInt(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(_e.config.isNodeLeaf(i))return;const o=_e.config.hashNode(i);if(_e.config.isNode(i)){const a=s.saveTopology(i.left),c=s.saveTopology(i.right),l=s.store.saveV2Node(o,{left:_e.config.hashNode(i.left),right:_e.config.hashNode(i.right)});await Promise.all([a,c,l]);return}if(_e.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),c=s.store.saveV2Node(o,{weight:BigInt(i.weight).toString(),threshold:BigInt(i.threshold).toString(),tree:_e.config.hashNode(i.tree)});await Promise.all([a,c]);return}if(_e.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(_e.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Qi.config.ConfigCoder.isWalletConfig(o)){const a=Qi.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(_e.config.ConfigCoder.isWalletConfig(o)){const a=_e.config.ConfigCoder.imageHashOf(o);if(_e.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!hE(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(hE(a)){const c={version:2,threshold:BigInt(a.threshold),checkpoint:BigInt(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,c=er.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(l=>{const u=de.context.addressOf(l,c);return s.store.saveCounterfactualWallet(u,c,l)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=de.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=_e.signature.SignatureCoder.decode(i.signature),a=er.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),c=_e.chained.messageSetImageHash(a),l=De(c),u={message:c,address:i.wallet,chainId:0,digest:l},f=s.savePayload({payload:u}),d=s.saveWalletConfig({config:i.nextConfig}),h=await _e.signature.SignatureCoder.recover(o,u,s.provider),y=_e.signature.signaturesOf(h.config.tree);await Promise.all([f,d,s.saveWalletConfig({config:h.config}),...y.map(p=>s.store.saveSignatureOfSubdigest(p.address,h.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:c}=i,l=await s.configOfImageHash({imageHash:a});if(!l||!_e.config.ConfigCoder.isWalletConfig(l))return[];const u=_e.config.signersOf(l.tree).map(m=>m.address),f=await Promise.all(u.map(m=>s.store.loadSubdigestsOfSigner(m))),d=[...new Set(f.flat())],y=(await Promise.all([...new Set(d)].map(async function(m){return Ei({},await s.payloadOfSubdigest({subdigest:m}),{subdigest:m})}))).filter(m=>(m==null?void 0:m.message)&&(m==null?void 0:m.address)&&m.address===o).map(m=>({payload:m,nextImageHash:_e.chained.decodeMessageSetImageHash(m.message)})).filter(m=>m==null?void 0:m.nextImageHash);let p;const g=(await Promise.all(y.map(async function({nextImageHash:m,payload:k}){const A=await s.configOfImageHash({imageHash:m});if(!A||!_e.config.isWalletConfig(A))return;const P=BigInt(A.checkpoint);return{nextConfig:A,nextCheckpoint:P,nextImageHash:m,payload:k}}))).filter(m=>m!==void 0).filter(m=>m.nextCheckpoint>BigInt(l.checkpoint)).sort((m,k)=>m.nextCheckpoint>k.nextCheckpoint?c?1:-1:c?-1:1);for(const m of g){const{nextConfig:k,nextCheckpoint:A,nextImageHash:P,payload:R}=m;if(p){const F=p.checkpoint;if(c){if(A>=F)continue}else if(A<=F)continue}const N=new Map((await Promise.all(u.map(async function(F){const X=await s.store.loadSignatureOfSubdigest(F,R.subdigest);if(!X)return[F,void 0];const re=z(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(F,R.subdigest,X):X),le=de.signer.tryRecoverSigner(R.subdigest,re)!==F;return[F,{isDynamic:le,signature:re}]}))).filter(F=>!!F[1]));if(N.size===0)continue;const V=_e.signature.SignatureCoder.encodeSigners(l,N,[],0);V.weightde.signer.canRecover(c)).map(c=>{const l=de.signer.recoverSigner(a,c);return s.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(l=>s.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(u=>u!==void 0)),c=[];for(const l of a){const u=l.address;if(c.find(h=>h.wallet===u))continue;const f=de.signature.subdigestOf(l),d=await s.store.loadSignatureOfSubdigest(i.signer,f);d&&c.push({wallet:u,proof:{digest:l.digest,chainId:BigInt(l.chainId),signature:z(d)}})}return c},this.cachedEIP5719=new pF(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!_e.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=sB.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(_e.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=de.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=De(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},u=de.signature.subdigestOf(l),f=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=Qi.signature.SignatureCoder.decode(r.tx.signature),y=await Qi.signature.SignatureCoder.recover(h,l,this.provider),p=Qi.signature.SignatureCoder.signaturesOf(y.config);await Promise.all([f,d,this.saveWalletConfig({config:y.config}),this.store.saveMigrationsSubdigest(e,s,s+1,u,i),...p.map(b=>this.store.saveSignatureOfSubdigest(b.address,y.subdigest,b.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),c=er.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(u){const{subdigest:f,toImageHash:d}=u,h=await i.payloadOfSubdigest({subdigest:f});if(!h||!h.message||BigInt(s)!==BigInt(h.chainId))return;const y=c.config.signersOf(o).map(m=>m.address),p=new Map((await Promise.all(y.map(async function(m){const k=await i.store.loadSignatureOfSubdigest(m,f);if(!k)return[m,void 0];const A=z(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(m,f,k):k),P=de.signer.tryRecoverSigner(f,A)!==m;return[m,{isDynamic:P,signature:A}]}))).filter(m=>!!m[1])),b=c.signature.encodeSigners(o,p,[],s);if(!b||b.weightu.filter(f=>f!==void 0)))[0]}updateProvider(e){this.provider=e}}var Vfe=Object.freeze({__proto__:null,LocalConfigTracker:nA});let mb=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class zfe{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=(n,s)=>this.fetch(this.url("Ping"),Un({},n,s)).then(i=>$n(i).then(o=>({})),i=>{throw xn.new({cause:`fetch(): ${i.message||""}`})}),this.config=(n,s,i)=>this.fetch(this.url("Config"),Un(n,s,i)).then(o=>$n(o).then(a=>({version:a.version,config:a.config})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.wallets=(n,s,i)=>this.fetch(this.url("Wallets"),Un(n,s,i)).then(o=>$n(o).then(a=>({wallets:a.wallets,cursor:a.cursor})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.deployHash=(n,s,i)=>this.fetch(this.url("DeployHash"),Un(n,s,i)).then(o=>$n(o).then(a=>({deployHash:a.deployHash,context:a.context})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.configUpdates=(n,s,i)=>this.fetch(this.url("ConfigUpdates"),Un(n,s,i)).then(o=>$n(o).then(a=>({updates:a.updates})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.migrations=(n,s,i)=>this.fetch(this.url("Migrations"),Un(n,s,i)).then(o=>$n(o).then(a=>({migrations:a.migrations})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveConfig=(n,s,i)=>this.fetch(this.url("SaveConfig"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveWallet=(n,s,i)=>this.fetch(this.url("SaveWallet"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignature=(n,s,i)=>this.fetch(this.url("SaveSignature"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignerSignatures=(n,s,i)=>this.fetch(this.url("SaveSignerSignatures"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignerSignatures2=(n,s,i)=>this.fetch(this.url("SaveSignerSignatures2"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.saveMigration=(n,s,i)=>this.fetch(this.url("SaveMigration"),Un(n,s,i)).then(o=>$n(o).then(a=>({})),o=>{throw xn.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e.replace(/\/*$/,""),this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Un=(t={},e={},r=null)=>({method:"POST",headers:Ei({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),$n=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),TF.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(rde[n]||vn).new(r)}return r});let vn=class wF extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,wF.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},Hfe=class EF extends vn{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,EF.prototype)}},xn=class CF extends vn{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,CF.prototype)}},Gfe=class kF extends vn{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kF.prototype)}},qfe=class SF extends vn{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,SF.prototype)}},Kfe=class AF extends vn{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,AF.prototype)}},TF=class IF extends vn{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,IF.prototype)}},Qfe=class PF extends vn{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,PF.prototype)}},Jfe=class OF extends vn{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,OF.prototype)}},Yfe=class RF extends vn{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,RF.prototype)}},Xfe=class NF extends vn{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NF.prototype)}},Zfe=class _F extends vn{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,_F.prototype)}},ede=class MF extends vn{constructor(e="InvalidArgument",r=1,n="invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,MF.prototype)}},tde=class DF extends vn{constructor(e="NotFound",r=2,n="not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DF.prototype)}};const rde={0:Hfe,[-1]:xn,[-2]:Gfe,[-3]:qfe,[-4]:Kfe,[-5]:TF,[-6]:Qfe,[-7]:Jfe,[-8]:Yfe,[-9]:Xfe,[-10]:Zfe,1:ede,2:tde};class nde{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new zfe(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(xb(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=er.genericCoderFor(r.version).config.imageHashOf(r),s=_e.signature.setImageHashStruct(n),i=De(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Dp(r),referenceChainID:e.referenceChainId!==void 0?BigInt(e.referenceChainId).toString():void 0})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>de.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:xu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return sde(r,n)}catch(r){if(xb(r))return;throw r}}async saveWalletConfig(e){const r=Dp(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(xb(r))return;throw r}}async saveCounterfactualWallet(e){const r=Dp(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:s,chainID:i,type:o,signature:a}])=>{switch(o){case mb.EIP712:a+=Rn(de.signer.SigType.EIP712).slice(2);break;case mb.EthSign:a+=Rn(de.signer.SigType.ETH_SIGN).slice(2);break;case mb.EIP1271:a+=Rn(de.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:BigInt(i)}}})}async getMigration(e,r,n,s){var i=this;const o=xu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(f){const d=a[f];if(d){const h=Object.keys(d).map(Number).sort((y,p)=>p-y);for(const y of h)for(const[p,b]of Object.entries(d[y]))try{const g=await i.configOfImageHash({imageHash:p});if(g)return{fromVersion:n,toVersion:y,toConfig:g,tx:{entrypoint:b.executor,transactions:b.transactions,nonce:b.nonce,signature:b.signature,chainId:f,intent:{id:de.transaction.subdigestOfTransactions(e,f,b.nonce,b.transactions),wallet:e}}}}catch(g){console.error(g)}}},l=await c(o);if(l)return l;for(const u in a)if(u!==o){const f=await c(u);if(f)return f}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Dp(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(ide),nonce:xu(r.tx.nonce),signature:r.tx.signature,chainID:xu(r.tx.chainId)})}}function Dp(t){switch(t.version){case 1:if(Qi.config.ConfigCoder.isWalletConfig(t))return{threshold:kc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:kc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(_e.config.ConfigCoder.isWalletConfig(t))return{threshold:kc(t.threshold),checkpoint:kc(t.checkpoint),tree:by(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function by(t){return _e.config.isNode(t)?{left:by(t.left),right:by(t.right)}:_e.config.isSignerLeaf(t)?{weight:kc(t.weight),address:t.address}:_e.config.isNestedLeaf(t)?{weight:kc(t.weight),threshold:kc(t.threshold),tree:by(t.tree)}:_e.config.isNodeLeaf(t)?{node:t.nodeHash}:Ei({},t)}function sde(t,e){switch(t){case 1:return Ei({},e,{version:t});case 2:return Ei({},e,{version:t,tree:wy(e.tree)});default:throw new Error(`unknown version ${t}`)}}function wy(t){switch(typeof t){case"object":const e=Ei({},t);return e.left!==void 0&&(e.left=wy(e.left)),e.right!==void 0&&(e.right=wy(e.right)),e.tree!==void 0&&(e.tree=wy(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function ide(t){return{to:t.to,value:t.value!==void 0?xu(t.value):void 0,data:t.data!==void 0?z(t.data):void 0,gasLimit:t.gasLimit!==void 0?xu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function kc(t){return Number(t)}function xu(t){return BigInt(t).toString()}function xb(t){return typeof t=="object"&&t.status===404}var ode=Object.freeze({__proto__:null,RemoteConfigTracker:nde});function pE(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function vh(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class ade{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await pE(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:er.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const s=new nA(void 0),i=await vh(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await pE(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await vh(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:c,signature:l}})=>{const u=`${o}-${a}-${c}`;let f=i.get(u);f||(f={wallet:o,digest:a,chainId:c,signatures:[]},i.set(u,f)),f.signatures.push(l)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await vh(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),i=(await vh(n.map(async function(c){const l=c[c.length-1],u=await r.configOfImageHash({imageHash:l.nextImageHash});if(u)return{checkpoint:er.genericCoderFor(u.version).config.checkpointOf(u),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint>c.checkpoint)?l:c);if(!i)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return i.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class cde{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthf&&(!u||f.checkpoint>u.checkpoint)?f:u))==null?void 0:c.result)!=null?a:[]}return s||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class Y8{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Br(JSON.stringify(s,lde))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function lde(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):typeof e=="bigint"?e.toString():e}function ude(t){return t instanceof BF}class BF{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new Y8}invalidateCache(){this.cache=new Y8}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof nA&&this.tracker.updateProvider(e)}}var sA=Object.freeze({__proto__:null,arweave:jfe,debug:Ufe,local:Vfe,remote:ode,stores:Wfe,raceUntil:pE,allSafe:vh,MultipleTracker:ade,CachedTracker:cde,isDedupedTracker:ude,DedupedTracker:BF});const fde=Object.freeze(Object.defineProperty({__proto__:null,tracker:Dfe,trackers:sA},Symbol.toStringTag,{value:"Module"})),LF=60*60*24*7,dde=60;class X8{constructor(e,r,n={},s){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.indexerGateway=void 0,this.projectAccessKey=void 0,this.projectAccessKey=s}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:LF,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new gy(n,void 0,s)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const l=this.status.jwt,u=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"rejected",reason:l})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Tg,n=BigInt(this.settings.sequenceApiChainId),s=os(this.account.networks,n);if(!s)throw Error("No network found");r.chainId=Number(n);const i=new ut(s.name,n);return r.provider=new lr(B0(s.rpcUrl,this.projectAccessKey),i,{staticNetwork:i}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new gy(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new hF(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=os(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const s=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new Ij(n.indexerUrl,void 0,s))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}async getIndexerGateway(e=!0){if(!this.indexerGateway){const r=(await this.getJWT(e)).token;this.indexerGateway=new Pj(this.settings.sequenceMetadataUrl,void 0,r)}return this.indexerGateway}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:a};return this.proofStrings.set(e,c),c}}const jF=async(t,e,r)=>{const n=Ae(await t.getAddress());if(!n||n===""||n==="0x")throw FF;const s=new IS;if(s.address=n,!r||!r.app||r.app==="")throw new iA("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.claims.n=r.nonce,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):LF);const i=s.messageTypedData(),o=cD(e);s.signature=await(t instanceof Zi?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const c=await new Tg().encodeProof(s,!0);return{typedData:i,proofString:c}};class iA extends Error{constructor(e){super(e),this.name="AuthError"}}const FF=new iA("auth error: account address is empty");function pc(){return pc=Object.assign?Object.assign.bind():function(t){for(var e=1;eF.wallet));let N;if(R){if(f==null||f(R),N=new Zi({address:R,tracker:m,networks:v,contexts:g,orchestrator:p,projectAccessKey:b}),l&&l.length>0){let F=await N.status(A);if(F.original.version!==F.version||N.version!==F.version){const{migratedAllChains:le,failedChains:ee}=await N.isMigratedAllChains();if(ee.some(B=>yE.includes(B)))throw Error(`Failed to fetch account status on ${ee.join(", ")}`);if(!le){if(y&&!await y(N))throw Error("Migration cancelled, cannot open session");const{failedChains:B}=await N.signAllMigrations(h||(Z=>Z));if(B.some(Z=>yE.includes(Z)))throw Error(`Failed to sign migrations on ${B.join(", ")}`);sA.isDedupedTracker(m)&&m.invalidateCache();let G;if([G,F]=await Promise.all([N.isMigratedAllChains().then(Z=>Z.migratedAllChains),N.status(A)]),!G)throw Error("Failed to migrate account")}}F.onChain.version!==F.version&&await N.doBootstrap(A,void 0,F);const X=F.config,re=N.coders.config.editConfig(X,{add:l,threshold:c});if(N.coders.config.imageHashOf(X)!==N.coders.config.imageHashOf(re)){const le=N.coders.config.editConfig(re,{checkpoint:N.coders.config.checkpointOf(X)+1n});await N.updateConfig(le)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(N=await Zi.new({config:{threshold:c,checkpoint:0,signers:l},tracker:m,contexts:g,orchestrator:p,networks:v,projectAccessKey:b}),f==null||f(N.address),await N.publishWitness(),!(await m.walletsOfSigner({signer:a,noCache:!0})).some(X=>X.wallet===N.address))throw Error("Account not found on tracker")}let V;return k&&(V=new X8(N,k),V.auth(),V.onAuth(F=>{F.status==="fulfilled"&&N.setJwt(F.value)})),new Hh(v,g,N,V)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o,projectAccessKey:a}=e,{contexts:c,networks:l,tracker:u,services:f}=pc({},Ey,n);let d;if(UF(r)){var h,y,p;const A=r.config.address||de.context.addressOf(c[1],Qi.config.ConfigCoder.imageHashOf(pc({},r.config,{version:1}))),P=((h=(y=r.jwt)==null?void 0:y.expiration)!=null?h:0)R.migratedAllChains)){if(i&&!await i(d))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await d.signAllMigrations(s),!await d.isMigratedAllChains().then(R=>R.migratedAllChains))throw Error("Failed to migrate account")}}else if($F(r)){var b,g,v;const A=((b=(g=r.jwt)==null?void 0:g.expiration)!=null?b:0)async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},pde=Object.freeze(Object.defineProperty({__proto__:null,AuthError:iA,CRITICAL_CHAINS:yE,ErrAccountIsRequired:FF,Session:Hh,SessionSettingsDefault:Ey,ValidateSequenceWalletProof:hde,isSessionDumpV1:UF,isSessionDumpV2:$F,signAuthorization:jF},Symbol.toStringTag,{value:"Module"}));function U0(){return U0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Sr({},n,s)).then(i=>Ar(i).then(o=>({status:o.status})),i=>{throw fr.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),Sr({},n,s)).then(i=>Ar(i).then(o=>({version:o.version})),i=>{throw fr.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),Sr({},n,s)).then(i=>Ar(i).then(o=>({status:o.status})),i=>{throw fr.new({cause:`fetch(): ${i.message||""}`})}),this.getSignerConfig=(n,s,i)=>this.fetch(this.url("GetSignerConfig"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({signerConfig:a.signerConfig})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.sign=(n,s,i)=>this.fetch(this.url("Sign"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({sig:a.sig})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.signWith=(n,s,i)=>this.fetch(this.url("SignWith"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({sig:a.sig})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.patch=(n,s,i)=>this.fetch(this.url("Patch"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({txs:a.txs})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.authMethods=(n,s,i)=>this.fetch(this.url("AuthMethods"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({methods:a.methods,active:a.active})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.setPIN=(n,s,i)=>this.fetch(this.url("SetPIN"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.resetPIN=(n,s,i)=>this.fetch(this.url("ResetPIN"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.createTOTP=(n,s,i)=>this.fetch(this.url("CreateTOTP"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({uri:a.uri})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.commitTOTP=(n,s,i)=>this.fetch(this.url("CommitTOTP"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({codes:a.codes})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.resetTOTP=(n,s,i)=>this.fetch(this.url("ResetTOTP"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.reset2FA=(n,s,i)=>this.fetch(this.url("Reset2FA"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.recoveryCodes=(n,s,i)=>this.fetch(this.url("RecoveryCodes"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({codes:a.codes})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.resetRecoveryCodes=(n,s,i)=>this.fetch(this.url("ResetRecoveryCodes"),Sr(n,s,i)).then(o=>Ar(o).then(a=>({codes:a.codes})),o=>{throw fr.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Sr=(t={},e={},r=null)=>({method:"POST",headers:U0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Ar=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),QF.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(Ide[n]||$t).new(r)}return r});let $t=class VF extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,VF.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},yde=class zF extends $t{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zF.prototype)}},fr=class HF extends $t{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HF.prototype)}},gde=class GF extends $t{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,GF.prototype)}},vde=class qF extends $t{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,qF.prototype)}},mde=class KF extends $t{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,KF.prototype)}},QF=class JF extends $t{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JF.prototype)}},xde=class YF extends $t{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,YF.prototype)}},bde=class XF extends $t{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XF.prototype)}},wde=class ZF extends $t{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZF.prototype)}},Ede=class eU extends $t{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eU.prototype)}},Cde=class tU extends $t{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tU.prototype)}},kde=class rU extends $t{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rU.prototype)}},Sde=class nU extends $t{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nU.prototype)}};class oA extends $t{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,oA.prototype)}}class aA extends $t{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aA.prototype)}}class cA extends $t{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cA.prototype)}}let Ade=class sU extends $t{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sU.prototype)}};class lA extends $t{constructor(e="ValidationFailed",r=2004,n="Validation Failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lA.prototype)}}let Tde=class iU extends $t{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,iU.prototype)}};const Ide={0:yde,[-1]:fr,[-2]:gde,[-3]:vde,[-4]:mde,[-5]:QF,[-6]:xde,[-7]:bde,[-8]:wde,[-9]:Ede,[-10]:Cde,1e3:kde,1002:Sde,1005:oA,2001:aA,2002:cA,2003:Ade,2004:lA,3e3:Tde};class Pde{constructor(e,r,n=!1,s){this.address=e,this.url=r,this.appendSuffix=n,this.projectAccessKey=s,this.guard=void 0,this._fetch=(i,o)=>{const a={},c=this.projectAccessKey;return c&&c.length>0&&(a["X-Access-Key"]=c),o.headers=U0({},o.headers,a),fetch(i,o)},this.guard=new WF(r,this._fetch)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!de.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const s=r.guardTotpCode,i=er.genericCoderFor(r.config.version),{encoded:o}=i.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:z(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:Number(r.chainId)},token:s?{id:Mg.TOTP,token:s}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await gE(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return U0({},r,{methods:r.methods.map(Ode)})}async setPin(e,r){const n=await Yd(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Yd(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Yd(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await gE(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Yd(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Yd(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,s){return Kt.defaultAbiCoder().encode(["address","uint256","bytes","bytes"],[e,s,r,n])}suffix(){return new Uint8Array(this.appendSuffix?[3]:[])}}let Mg=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function Ode(t){switch(t){case Mg.PIN:case Mg.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function oU(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function gE(t){if(oU(t))return t;{const e=uE.isSapientSigner(t.signer)?t.signer:new uE.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,s=aU(t.walletAddress,n),i=Od(s);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:z(await e.sign(i,{}))}}}async function Yd(t){if("wallet"in t){var e;const r=new Date,n=cU(r),s=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:s}}else return t}function aU(t,e){return{domain:lU,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:Ae(t),timestamp:uU(e)}}}function cU(t){return{domain:lU,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:uU(t)}}}const lU={name:"Sequence Guard",version:"1",chainId:1};function uU(t){return t.toUTCString().replace("GMT","UTC")}const Rde=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:Mg,Guard:WF,GuardSigner:Pde,getAuthUpdateProofTypedData:cU,getOwnershipProofTypedData:aU,isSignedOwnershipProof:oU,signOwnershipProof:gE},Symbol.toStringTag,{value:"Module"}));var fU={exports:{}};/*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + */(function(t,e){(function(r){var n=Object.hasOwnProperty,s=Array.isArray?Array.isArray:function(S){return Object.prototype.toString.call(S)==="[object Array]"},i=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",c=typeof Reflect=="object",l=typeof setImmediate=="function",u=l?setImmediate:setTimeout,f=a?c&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(E){var S=Object.getOwnPropertyNames(E);return S.push.apply(S,Object.getOwnPropertySymbols(E)),S}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(E){E&&(this._conf=E,E.delimiter&&(this.delimiter=E.delimiter),E.maxListeners!==r&&(this._maxListeners=E.maxListeners),E.wildcard&&(this.wildcard=E.wildcard),E.newListener&&(this._newListener=E.newListener),E.removeListener&&(this._removeListener=E.removeListener),E.verboseMemoryLeak&&(this.verboseMemoryLeak=E.verboseMemoryLeak),E.ignoreErrors&&(this.ignoreErrors=E.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function y(E,S){var O="(node) warning: possible EventEmitter memory leak detected. "+E+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(O+=" Event name: "+S+"."),typeof process<"u"&&process.emitWarning){var D=new Error(O);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=E,process.emitWarning(D)}else console.error(O),console.trace&&console.trace()}var p=function(E,S,O){var D=arguments.length;switch(D){case 0:return[];case 1:return[E];case 2:return[E,S];case 3:return[E,S,O];default:for(var L=new Array(D);D--;)L[D]=arguments[D];return L}};function b(E,S){for(var O={},D,L=E.length,W=0,q=0;q0;)E=W[J],q.call(te,E,O[E]);this._listeners={},this._listenersCount=0,$()}}});function v(E,S,O,D){var L=Object.assign({},S);if(!E)return L;if(typeof E!="object")throw TypeError("options must be an object");var W=Object.keys(E),q=W.length,te,J,$;function K(he){throw Error('Invalid "'+te+'" option value'+(he?". Reason: "+he:""))}for(var ue=0;ue0;)if(te===E[J])return W;q(S)}}var A=k(["function"]),P=k(["object","function"]);function R(E,S,O){var D,L,W=0,q,te=new E(function(J,$,K){O=v(O,{timeout:0,overload:!1},{timeout:function(ke,Me){return ke*=1,(typeof ke!="number"||ke<0||!Number.isFinite(ke))&&Me("timeout must be a positive number"),ke}}),D=!O.overload&&typeof E.prototype.cancel=="function"&&typeof K=="function";function ue(){L&&(L=null),W&&(clearTimeout(W),W=0)}var he=function(ke){ue(),J(ke)},oe=function(ke){ue(),$(ke)};D?S(he,oe,K):(L=[function(ke){oe(ke||Error("canceled"))}],S(he,oe,function(ke){if(q)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof ke!="function")throw TypeError("onCancel callback must be a function");L.push(ke)}),q=!0),O.timeout>0&&(W=setTimeout(function(){var ke=Error("timeout");ke.code="ETIMEDOUT",W=0,te.cancel(ke),$(ke)},O.timeout))});return D||(te.cancel=function(J){if(L){for(var $=L.length,K=1;K<$;K++)L[K](J);L[0](J),L=null}}),te}function N(E){var S=this._observers;if(!S)return-1;for(var O=S.length,D=0;D0;)oe=se[te],oe!=="_listeners"&&(ae=V(E,S,O[oe],D+1,L),ae&&(he?he.push.apply(he,ae):he=ae));return he}else if(Er==="**"){for(rn=D+1===L||D+2===L&&U==="*",rn&&O._listeners&&(he=V(E,S,O,L,L)),se=f(O),te=se.length;te-- >0;)oe=se[te],oe!=="_listeners"&&(oe==="*"||oe==="**"?(O[oe]._listeners&&!rn&&(ae=V(E,S,O[oe],L,L),ae&&(he?he.push.apply(he,ae):he=ae)),ae=V(E,S,O[oe],D,L)):oe===U?ae=V(E,S,O[oe],D+2,L):ae=V(E,S,O[oe],D,L),ae&&(he?he.push.apply(he,ae):he=ae));return he}else O[Er]&&(he=V(E,S,O[Er],D+1,L));if(ke=O["*"],ke&&V(E,S,ke,D+1,L),Me=O["**"],Me)if(D0;)oe=se[te],oe!=="_listeners"&&(oe===U?V(E,S,Me[oe],D+2,L):oe===Er?V(E,S,Me[oe],D+1,L):(bt={},bt[oe]=Me[oe],V(E,S,{"**":bt},D+1,L)));else Me._listeners?V(E,S,Me,L,L):Me["*"]&&Me["*"]._listeners&&V(E,S,Me["*"],L,L);return he}function F(E,S,O){var D=0,L=0,W,q=this.delimiter,te=q.length,J;if(typeof E=="string")if((W=E.indexOf(q))!==-1){J=new Array(5);do J[D++]=E.slice(L,W),L=W+te;while((W=E.indexOf(q,L))!==-1);J[D++]=E.slice(L)}else J=[E],D=1;else J=E,D=E.length;if(D>1){for(W=0;W+10&&$._listeners.length>this._maxListeners&&($._listeners.warned=!0,y.call(this,$._listeners.length,K))):$._listeners=S,!0;return!0}function X(E,S,O,D){for(var L=f(E),W=L.length,q,te,J,$=E._listeners,K;W-- >0;)te=L[W],q=E[te],te==="_listeners"?J=O:J=O?O.concat(te):[te],K=D||typeof te=="symbol",$&&S.push(K?J:J.join(this.delimiter)),typeof q=="object"&&X.call(this,q,S,J,K);return S}function re(E){for(var S=f(E),O=S.length,D,L,W;O-- >0;)L=S[O],D=E[L],D&&(W=!0,L!=="_listeners"&&!re(D)&&delete E[L]);return W}function le(E,S,O){this.emitter=E,this.event=S,this.listener=O}le.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function ee(E,S,O){if(O===!0)L=!0;else if(O===!1)D=!0;else{if(!O||typeof O!="object")throw TypeError("options should be an object or true");var D=O.async,L=O.promisify,W=O.nextTick,q=O.objectify}if(D||W||L){var te=S,J=S._origin||S;if(W&&!o)throw Error("process.nextTick is not supported");L===r&&(L=S.constructor.name==="AsyncFunction"),S=function(){var $=arguments,K=this,ue=this.event;return L?W?Promise.resolve():new Promise(function(he){u(he)}).then(function(){return K.event=ue,te.apply(K,$)}):(W?process.nextTick:u)(function(){K.event=ue,te.apply(K,$)})},S._async=!0,S._origin=J}return[S,q?new le(this,E,S):this]}function B(E){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,E)}B.EventEmitter2=B,B.prototype.listenTo=function(E,S,O){if(typeof E!="object")throw TypeError("target musts be an object");var D=this;O=v(O,{on:r,off:r,reducers:r},{on:A,off:A,reducers:P});function L(W){if(typeof W!="object")throw TypeError("events must be an object");var q=O.reducers,te=N.call(D,E),J;te===-1?J=new g(D,E,O):J=D._observers[te];for(var $=f(W),K=$.length,ue,he=typeof q=="function",oe=0;oe0;)L=O[D],(!E||L._target===E)&&(L.unsubscribe(S),W=!0);return W},B.prototype.delimiter=".",B.prototype.setMaxListeners=function(E){E!==r&&(this._maxListeners=E,this._conf||(this._conf={}),this._conf.maxListeners=E)},B.prototype.getMaxListeners=function(){return this._maxListeners},B.prototype.event="",B.prototype.once=function(E,S,O){return this._once(E,S,!1,O)},B.prototype.prependOnceListener=function(E,S,O){return this._once(E,S,!0,O)},B.prototype._once=function(E,S,O,D){return this._many(E,1,S,O,D)},B.prototype.many=function(E,S,O,D){return this._many(E,S,O,!1,D)},B.prototype.prependMany=function(E,S,O,D){return this._many(E,S,O,!0,D)},B.prototype._many=function(E,S,O,D,L){var W=this;if(typeof O!="function")throw new Error("many only accepts instances of Function");function q(){return--S===0&&W.off(E,q),O.apply(this,arguments)}return q._origin=O,this._on(E,q,D,L)},B.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var E=arguments[0],S,O=this.wildcard,D,L,W,q,te;if(E==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(O&&(S=E,E!=="newListener"&&E!=="removeListener"&&typeof E=="object")){if(L=E.length,a){for(W=0;W3)for(D=new Array(J-1),q=1;q3)for(L=new Array($-1),te=1;te<$;te++)L[te-1]=arguments[te];for(q=0,W=K.length;q0&&this._events[E].length>this._maxListeners&&(this._events[E].warned=!0,y.call(this,this._events[E].length,E))):this._events[E]=S,L)},B.prototype.off=function(E,S){if(typeof S!="function")throw new Error("removeListener only takes instances of Function");var O,D=[];if(this.wildcard){var L=typeof E=="string"?E.split(this.delimiter):E.slice();if(D=V.call(this,null,L,this.listenerTree,0),!D)return this}else{if(!this._events[E])return this;O=this._events[E],D.push({_listeners:O})}for(var W=0;W0){for(D=this._all,S=0,O=D.length;S0;)D=S[O[W]],typeof D=="function"?L.push(D):L.push.apply(L,D);return L}else{if(this.wildcard){if(q=this.listenerTree,!q)return[];var te=[],J=typeof E=="string"?E.split(this.delimiter):E.slice();return V.call(this,te,J,q,0),te}return S?(D=S[E],D?typeof D=="function"?[D]:D:[]):[]}},B.prototype.eventNames=function(E){var S=this._events;return this.wildcard?X.call(this,this.listenerTree,[],null,E):S?f(S):[]},B.prototype.listenerCount=function(E){return this.listeners(E).length},B.prototype.hasListeners=function(E){if(this.wildcard){var S=[],O=typeof E=="string"?E.split(this.delimiter):E.slice();return V.call(this,S,O,this.listenerTree,0),S.length>0}var D=this._events,L=this._all;return!!(L&&L.length||D&&(E===r?f(D).length:D[E]))},B.prototype.listenersAny=function(){return this._all?this._all:[]},B.prototype.waitFor=function(E,S){var O=this,D=typeof S;return D==="number"?S={timeout:S}:D==="function"&&(S={filter:S}),S=v(S,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:A,Promise:m}),R(S.Promise,function(L,W,q){function te(){var J=S.filter;if(!(J&&!J.apply(O,arguments)))if(O.off(E,te),S.handleError){var $=arguments[0];$?W($):L(p.apply(null,arguments).slice(1))}else L(p.apply(null,arguments))}q(function(){O.off(E,te)}),O._on(E,te,!1)},{timeout:S.timeout,overload:S.overload})};function G(E,S,O){O=v(O,{Promise,timeout:0,overload:!1},{Promise:m});var D=O.Promise;return R(D,function(L,W,q){var te;if(typeof E.addEventListener=="function"){te=function(){L(p.apply(null,arguments))},q(function(){E.removeEventListener(S,te)}),E.addEventListener(S,te,{once:!0});return}var J=function(){$&&E.removeListener("error",$),L(p.apply(null,arguments))},$;S!=="error"&&($=function(K){E.removeListener(S,J),W(K)},E.once("error",$)),q(function(){$&&E.removeListener("error",$),E.removeListener(S,J)}),E.once(S,J)},{timeout:O.timeout,overload:O.overload})}var Z=B.prototype;Object.defineProperties(B,{defaultMaxListeners:{get:function(){return Z._maxListeners},set:function(E){if(typeof E!="number"||E<0||Number.isNaN(E))throw TypeError("n must be a non-negative number");Z._maxListeners=E},enumerable:!0},once:{value:G,writable:!0,configurable:!0}}),Object.defineProperties(Z,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),t.exports=B})()})(fU);var jm=fU.exports;function Nde(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function uA(t,...e){if(!Nde(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 Z8(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 _de(t,e){uA(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),Hs=(t,e)=>t<<32-e|t>>>e,Mde=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Dde(t){uA(t);let e="";for(let r=0;rt().update(dU(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Fde(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(r>>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}const Ude=(t,e,r)=>t&e^~t&r,$de=(t,e,r)=>t&e^t&r^e&r;class Wde extends Lde{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=bb(this.buffer)}update(e){Z8(this);const{view:r,buffer:n,blockLen:s}=this;e=dU(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f>>3,p=Hs(h,17)^Hs(h,19)^h>>>10;Ro[f]=p+Ro[f-7]+y+Ro[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Hs(a,6)^Hs(a,11)^Hs(a,25),h=u+d+Ude(a,c,l)+Vde[f]+Ro[f]|0,p=(Hs(n,2)^Hs(n,13)^Hs(n,22))+$de(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+p|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){Ro.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Hde=jde(()=>new zde);var Gde=class{constructor(t,e){_(this,"hostname");_(this,"fetch");_(this,"path","/rpc/Databeat/");_(this,"ping",(t,e)=>this.fetch(this.url("Ping"),Xd({},t,e)).then(r=>Zd(r).then(n=>({status:n.status})),r=>{throw eu.new({cause:`fetch(): ${r.message||""}`})}));_(this,"version",(t,e)=>this.fetch(this.url("Version"),Xd({},t,e)).then(r=>Zd(r).then(n=>({version:n.version})),r=>{throw eu.new({cause:`fetch(): ${r.message||""}`})}));_(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),Xd({},t,e)).then(r=>Zd(r).then(n=>({status:n.status})),r=>{throw eu.new({cause:`fetch(): ${r.message||""}`})}));_(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),Xd(t,e,r)).then(n=>Zd(n).then(s=>({ok:s.ok})),n=>{throw eu.new({cause:`fetch(): ${n.message||""}`})}));_(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),Xd(t,e,r)).then(n=>Zd(n).then(s=>({ok:s.ok})),n=>{throw eu.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},Xd=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),Zd=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),xU.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(lhe[n]||Qt).new(r)}return r}),Qt=class hU extends Error{constructor(r,n,s,i,o){super(s);_(this,"name");_(this,"code");_(this,"message");_(this,"status");_(this,"cause");_(this,"msg");this.name=r||"WebrpcError",this.code=typeof n=="number"?n:0,this.message=s||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=o,Object.setPrototypeOf(this,hU.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},qde=class pU extends Qt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pU.prototype)}},eu=class yU extends Qt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yU.prototype)}},Kde=class gU extends Qt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gU.prototype)}},Qde=class vU extends Qt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vU.prototype)}},Jde=class mU extends Qt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mU.prototype)}},xU=class bU extends Qt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bU.prototype)}},Yde=class wU extends Qt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wU.prototype)}},Xde=class EU extends Qt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,EU.prototype)}},Zde=class CU extends Qt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,CU.prototype)}},ehe=class kU extends Qt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kU.prototype)}},the=class SU extends Qt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,SU.prototype)}},rhe=class AU extends Qt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,AU.prototype)}},nhe=class TU extends Qt{constructor(e="PermissionDenied",r=2e3,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,TU.prototype)}},she=class IU extends Qt{constructor(e="SessionExpired",r=2001,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,IU.prototype)}},ihe=class PU extends Qt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,PU.prototype)}},ohe=class OU extends Qt{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,OU.prototype)}},ahe=class RU extends Qt{constructor(e="QueryFailed",r=4001,n="DB query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,RU.prototype)}},che=class NU extends Qt{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NU.prototype)}},lhe={0:qde,[-1]:eu,[-2]:Kde,[-3]:Qde,[-4]:Jde,[-5]:xU,[-6]:Yde,[-7]:Xde,[-8]:Zde,[-9]:ehe,[-10]:the,1e3:rhe,2e3:nhe,2001:she,3e3:ihe,4e3:ohe,4001:ahe,4002:che},uhe=class extends Gde{constructor(e,r){const n=globalThis.fetch.bind(globalThis);super(e.endsWith("/")?e.slice(0,-1):e,n);_(this,"_globalFetch");_(this,"_fetch",(e,r)=>{var n;if(this.auth){let s={};((n=this.auth.jwt)==null?void 0:n.length)>0&&(s.Authorization=`BEARER ${this.auth.jwt}`),this.auth.headers&&(s={...s,...this.auth.headers}),r.headers={...r.headers,...s}}return this._globalFetch(e,r)});this.auth=r,this._globalFetch=n,this.fetch=this._fetch}},e4=150,rc={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},fhe=class{constructor(t,e,r){_(this,"rpc");_(this,"auth");_(this,"options");_(this,"enabled");_(this,"ident");_(this,"userId");_(this,"sessionId");_(this,"allowUserTracking");_(this,"projectId");_(this,"queue");_(this,"flushTimeout");_(this,"defaultProps");_(this,"dedupeIdentKey");_(this,"dedupeViewKey");_(this,"ts");_(this,"flush",async()=>{if(this.flushTimeout!==null&&(clearTimeout(this.flushTimeout),this.flushTimeout=null),!this.enabled||this.options.noop||this.options.strictMode&&!this.allowUserTracking||this.queue.length===0)return;const t=this.dedupedQueue();this.queue=[];try{await this.rpc.tick({events:t})}catch(e){console.warn(`databeat flush failed: ${e}`)}});_(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;ee4&&(this.queue=this.queue.splice(this.queue.length-e4)),this.enabled&&(e&&e.flush?await this.flush():this.flushTimeout===null&&(this.flushTimeout=setTimeout(()=>{this.flush()},this.options.flushInterval)))}trackView(t={}){const e={...this.defaultProps,...t},r=r4(),n=`${r}:${JSON.stringify(e)}:${this.userId}:${this.sessionId}`;this.dedupeViewKey!==n&&(this.dedupeViewKey=n,this.track({event:"VIEW",source:r,props:e}))}isEnabled(){return this.enabled}isAnon(){return this.ident===0}getIdent(){return this.ident}getUserId(){return this.userId}getSessionId(){return this.sessionId}getStorageTS(){if(this.ts)return this.ts;const t=vE();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!_U(this.auth)){this.enabled=!1;return}eo()&&(this.enabled=!0,this.ts=Gl({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){eo()&&(this.enabled=!1,this.ts=Gl({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},eo=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",t4=(t,e)=>{if(!_U(e))return!1;if(!eo())return!0;const r=vE();return r===null?t??!0:r.on},_U=t=>{var e;return!!(((e=t==null?void 0:t.jwt)==null?void 0:e.length)>0||t!=null&&t.headers&&Object.keys(t.headers).length>0)},r4=()=>{try{return window.location.pathname}catch{return""}},dhe=()=>{if(!eo())return{};const t=new URL(window.location.href).searchParams,e={};return e.origin=window.location.origin,t.get("ref")&&t.get("ref")!==""&&(e.ref=t.get("ref")||""),t.get("source")&&t.get("source")!==""&&(e.source=t.get("source")||""),t.get("utm_source")&&t.get("utm_source")!==""&&(e.utmSource=t.get("utm_source")||""),t.get("utm_campaign")&&t.get("utm_campaign")!==""&&(e.utmCampaign=t.get("utm_campaign")||""),t.get("utm_medium")&&t.get("utm_medium")!==""&&(e.utmMedium=t.get("utm_medium")||""),t.get("utm_content")&&t.get("utm_content")!==""&&(e.utmContent=t.get("utm_content")||""),t.get("utm_term")&&t.get("utm_term")!==""&&(e.utmTerm=t.get("utm_term")||""),document.referrer&&document.referrer!==""&&(e.referrer=document.referrer),t.get("gclid")&&t.get("gclid")!==""&&(e.gclid=t.get("gclid")||""),t.get("wbraid")&&t.get("wbraid")!==""&&(e.wbraid=t.get("wbraid")||""),e},Dg="_dbeat",vE=()=>{try{return JSON.parse(window.localStorage.getItem(Dg))}catch{return null}},Gl=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(Dg,JSON.stringify(t)),t.ts}catch{return}},hhe=(t,e,r)=>{if(!t||t===null||t==="")return{userId:`${Math.floor(Math.random()*1e14)}`,ident:0};if(r.userIdentTracking&&e)return{userId:t,ident:2};if(r.privacy.userIdHash===!0||!r.userIdentTracking||!e)return eo()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:Dde(Hde(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},phe=()=>{if(eo()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(Dg);if(e&&e.length>0)return e;{const r=n4(16);return window.sessionStorage.setItem(Dg,r),r}}else return n4(16)},n4=t=>{let e="";for(let r=0;r[Br(t).slice(0,10),t]));function mE(t,e){const r=de.transaction.fromTransactionish(t,e);de.transaction.unwind(t,r).forEach(s=>ghe(t,s))}function ghe(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=Q(e.data);if(r.length>=4&&!vhe(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden");if(e.data){const n=z(e.data).slice(0,10),s=yhe.get(n);if(s){const i=s.slice(0,s.indexOf("("));throw new Error(`${i} calls are forbidden`)}}}function vhe(t){const e=new ft(Gt.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;e++mhe;class F1{constructor(e){var r=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new jm.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.projectAccessKey=void 0,this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&n.type!=="init"&&i(new Error("message idx not set"));const o=(c,l)=>{if(c)i(c);else if(l)s(l);else throw new Error("no valid response to return")},a=n.idx;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.isOpened()?r.sendMessage(n):(Ie.debug("pushing to pending requests",n),r.pendingMessageRequests.push(n))})},this.waitUntilOpened=async function(n=fA){let s=!1;return Promise.race([new Promise((i,o)=>{const a=setTimeout(()=>{clearTimeout(a),s||(r.state=Yn.CLOSED,r.events.emit("close",{code:1005,message:"opening wallet timed out"})),o(new Error("opening wallet timed out"))},n)}),new Promise(i=>{if(r.isOpened()){var o;s=!0,i((o=r.openPayload)==null?void 0:o.session);return}r.events.once("open",a=>{r.openPayload=a,s=!0,i(a.session)})})])},this.waitUntilConnected=async function(){await r.waitUntilOpened();const n=new Promise(i=>{if(r.connectPayload){i(r.connectPayload);return}r.events.once("connect",o=>{r.connectPayload=o,i(o)})}),s=new Promise((i,o)=>{r.events.once("close",a=>{o(a?new Error(`wallet closed due to ${JSON.stringify(a)}`):new Error("user closed the wallet"))})});return Promise.race([n,s])},this.state=Yn.CLOSED,this._registered=!1,this._init=yt.NIL,this.projectAccessKey=e}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Yn.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}async request(e){return this.state===Yn.CLOSED&&(this.confirmationOnly=!0),this.openWallet(void 0,{type:"jsonRpcRequest",method:e.method},e.chainId),this.isOpened()||await this.waitUntilOpened(),(await this.sendMessageRequest({idx:LU(),type:We.MESSAGE,data:e,chainId:e.chainId,clientVersion:Vr,projectAccessKey:this.projectAccessKey})).data}handleMessage(e){var r=this;if(e.type===We.INIT){Ie.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){Ie.error("invalid init nonce");return}this._init=yt.OK,this.sendMessage({idx:-1,type:We.INIT,data:{sessionId:this._sessionId,nonce:c},clientVersion:Vr})}if(this._init!==yt.OK)return;Ie.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===We.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){Ie.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw Ie.error(c),this.close(),c}this.state=Yn.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(l){r.sendMessage(l)});return}if(e.type===We.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===We.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ae(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===We.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===We.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===We.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===We.CLOSE&&this.state!==Yn.CLOSED&&this.close(e.data),e.type===We.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===We.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Yn.CLOSED&&(this.state=Yn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,Ie.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(tr({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function xhe(t){return bhe.some(e=>e.predicate(t))}const bhe=[{name:"Decentraland Exception",predicate:Ehe},{name:"0x v3 Exception",predicate:Che}],whe=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function Ehe(t){try{const e=Ls(t);return whe.test(e)}catch{return!1}}function Che(t){const e=new ft(khe);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const khe=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Cy=xt(`Ethereum Signed Message: +`),dA=t=>bi(t)?Q(t):xt(t),Fm=t=>{const e=dA(t);return xhe(e)?e:Q(Ue([Cy,xt(String(e.length)),e]))},She=t=>{if(JSON.stringify(t.slice(0,Cy.length))!==JSON.stringify(Cy))return t;const e=t.slice(Cy.length),r=String(e.length).length;let n,s;try{s=Number(Ls(e.slice(0,r)))}catch{s=Number(z(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},dd=async(t,e,r,n)=>new de.reader.OnChainReader(n).isValidSignature(t,e,r),jU=async(t,e,r,n)=>{const s=Fm(e),i=RS(s);return dd(t,i,r,n)},FU=(t,e,r,n)=>dd(t,Od(e),r,n),Bg=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",UU=()=>!!navigator.userAgent.match(/UnitySequence/i),$U=t=>t.onChain.deployed&&t.fullyMigrated;class WU{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class $0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!$0.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function Lg(){return $0.isAvailable()?new $0:new WU}async function VU(t){return Array.isArray(t)?Promise.all(t.map(e=>Pt(e))):Pt(t)}const s4="@sequence.transportSession";class U1{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.handleMessage=async function(n){const s=n;if(r._init!==yt.OK){if(s.type===We.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case We.OPEN:{if(r._init!==yt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case We.CLOSE:return r._init!==yt.OK,void 0;case We.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:Ie.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=JM(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=NS(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!Bg()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=XM(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=YM(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){Ie.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{Lg().setItem(s4,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Lg().getItem(s4);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=yt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,s)=>{this.registered&&this.notifyDisconnect(n,s)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(gr(n.find(s=>s.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,s)=>{this.notifyChainChanged(n,s)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}request(e){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:s,error:i}=e;this.sendMessage({idx:-1,type:We.OPEN,data:{chainId:r,sessionId:n,session:s,error:i},clientVersion:Vr})}notifyClose(e){this.sendMessage({idx:-1,type:We.CLOSE,data:e?{error:e}:null,clientVersion:Vr})}notifyConnect(e){this.sendMessage({idx:-1,type:We.CONNECT,data:e,clientVersion:Vr})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:We.DISCONNECT,data:e?{error:e}:null,origin:r,clientVersion:Vr})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:We.ACCOUNTS_CHANGED,data:e,origin:r,clientVersion:Vr})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:We.CHAIN_CHANGED,data:e,origin:r,clientVersion:Vr})}notifyNetworks(e){this.sendMessage({idx:-1,type:We.NETWORKS,data:e,clientVersion:Vr})}notifyWalletContext(e){this.sendMessage({idx:-1,type:We.WALLET_CONTEXT,data:e,clientVersion:Vr})}isValidInitAck(e){if(this._init===yt.OK)return Ie.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==We.INIT)return Ie.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(Ie.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(Ie.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===yt.OK){e();return}if(this._init!==yt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{Ie.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},fA/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=yt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:We.INIT,data:{nonce:this._initNonce},clientVersion:Vr}),this._init=yt.SENT_NONCE})}}class Ahe{constructor(){this.app=void 0,this.wallet=void 0;const e=new xE,r=new xE;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class xE{constructor(){this.conn=void 0,this.events=new jm.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class zU extends F1{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,s)=>{if(this.state===Yn.CLOSED){this.state=Yn.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:We.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i},clientVersion:Vr})}},this.state=Yn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=yt.OK}closeWallet(){this.sendMessage({idx:-1,type:We.CLOSE,data:null,clientVersion:Vr}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class The extends U1{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=yt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function HU(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...s)=>{n.logfromjs(`${t}: ${wb(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${wb(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${wb(s)}`)},window.logsOverriddenForUnreal=!0}}function wb(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let ql;class GU extends F1{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;HU("dapp"),ql&&(ql.unregister(),ql=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),ql=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),ql===this&&(ql=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new j1;r&&(i.pathname=r.toLowerCase()),this._init=yt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",PS(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e,Os):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class Ihe extends U1{constructor(e){super(e),this.onMessageFromUnreal=r=>{Ie.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new j1(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:OS(n.get("intent"))}},this._init=yt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;HU("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){Ie.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;Ie.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;Ie.error(c),this.notifyClose({message:c}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==We.INIT&&this._init!==yt.OK){Ie.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e,Os);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const hA="sequence-extension-message-handler";class Phe extends U1{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=yt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:hA})}sendMessage(e){Ie.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class qU extends F1{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===hA&&(this._init=yt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Ohe extends jm.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;Ie.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case We.MESSAGE:if(i)this.emit(We.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case We.DISCONNECT:case We.ACCOUNTS_CHANGED:case We.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(c,l)=>{if(c)i(c);else if(l)s(l);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let Kl;class KU extends F1{constructor(e,r){super(r),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{Kl&&(Kl.unregister(),Kl=this),window.addEventListener("message",this.onWindowEvent),Kl=this,this.on("open",()=>{const n=this.walletWindow,s=setInterval(()=>{n&&n.closed&&(clearInterval(s),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),Kl===this&&(Kl=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(n,s,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const o=new URL(this.walletURL.href),a=new j1;n&&n!==""&&(o.pathname=n.toLowerCase()),this._init=yt.NIL,this._sessionId=`${performance.now()}`,a.set("sid",this._sessionId),s&&(s.type==="connect"&&(s.options||(s.options={app:window.location.origin}),!Bg()&&!UU()&&s.options&&(s.options.origin=window.location.origin)),a.set("intent",PS(s))),i&&a.set("net",`${i}`);let c,l;Bg()?(c=[450,750],l=[Math.abs(window.screen.width/2-c[0]/2),Math.abs(window.screen.height/2-c[1]/2)]):(c=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-c[0]/2),Math.abs(window.screenY+window.innerHeight/2-c[1]/2)]);const u=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${c[0]},height=${c[1]},left=${l[0]},top=${l[1]}`;o.search=a.toString(),this.walletWindow=window.open(o.href,"sequence.app",u)},this.onWindowEvent=n=>{if(n.origin!==this.walletURL.origin)return;let s;try{s=JSON.parse(n.data,Zv)}catch{return}if(!s)throw new Error("ProviderMessage object is empty");this.handleMessage(s)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){Ie.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e,Os):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class Rhe extends U1{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){var s,i;if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let o;try{o=JSON.parse(n.data,Zv)}catch{return}if((i=(s=o).origin)!=null||(s.origin=n.origin),Ie.debug("RECEIVED MESSAGE",o),r._init!==yt.OK&&r.isValidInitAck(o)&&(r.appOrigin=n.origin),r._init===yt.OK&&(!r.appOrigin||r.appOrigin.length<8)){Ie.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(o)},this.getWindowTransportSession=n=>{const s=new j1(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:OS(s.get("intent"))}},this._init=yt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{search:n}=new URL(e||window.location.href);let s=this.getWindowTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){Ie.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;Ie.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;Ie.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e,Os);e.type===We.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==yt.OK){Ie.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):Ie.error("unable to postMessage as parentOrigin is invalid")}}function QU(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class Um{constructor(e=[]){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e,r){var n,s,i,o;const a=new Um;if((n=e.windowTransport)!=null&&n.enabled&&typeof window=="object"&&e.walletAppURL){const c=new KU(e.walletAppURL,r);a.add(c)}if((s=e.proxyTransport)!=null&&s.enabled){const c=new zU(e.proxyTransport.appPort);a.add(c)}if((i=e.extensionTransport)!=null&&i.enabled){const c=new qU(e.extensionTransport.runtime);a.add(c)}if((o=e.unrealTransport)!=null&&o.enabled&&e.windowTransport&&e.walletAppURL){const c=new GU(e.walletAppURL);a.add(c)}return a.register(),a}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;n({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:s}=r;if(n){const a=this._connectOptions;let c;if(this.prompter!==null){var i;c=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=Mhe){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:M.MAINNET,i=NS(s).chainId,o={connected:!0,chainId:gr(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await jF(this.account,i,a)}catch(c){return Ie.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(i),o}async sendMessageRequest(e){var r;const s=Number(((r=e.clientVersion)==null?void 0:r.split(".")[0])||"0")<2,i={id:e.data.id,jsonrpc:"2.0",result:null,error:void 0};try{const o=await this.request({method:e.data.method,params:e.data.params,chainId:e.chainId,origin:e.origin,projectAccessKey:e.projectAccessKey});return tr({},e,{data:s?tr({},i,{result:o}):o})}catch(o){return tr({},e,{data:s?tr({},i,{error:o}):{error:o}})}}async request(e){await this.getAccount();try{var r,n;if((!this.account||this.account===null)&&!Bhe.includes(e.method))throw BU;const l=this.account;if(!l)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(r=this.account)==null?void 0:r.providerFor((n=e.chainId)!=null?n:this.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${e.chainId}`);const f=Lhe(u)?u:void 0;switch(e.method){case"net_version":{if(!f)throw new Error("Account provider doesn't support send method");return await f.send("net_version",[])}case"eth_chainId":{if(!f)throw new Error("Account provider doesn't support send method");return await f.send("eth_chainId",[])}case"eth_accounts":return[l.address];case"eth_getBalance":{const[d,h]=e.params,y=await u.getBalance(d,h);return nl(y)}case"sequence_sign":case"personal_sign":case"eth_sign":{let d;switch(e.method){case"sequence_sign":case"personal_sign":{const[b,g]=e.params;d=b;break}case"eth_sign":{const[b,g]=e.params;d=g;break}}let h="";const y=Fm(d),p=e.method==="sequence_sign";if(this.prompter===null){var s;h=await l.signMessage(y,(s=e.chainId)!=null?s:this.defaultChainId(),p?"eip6492":"ignore")}else h=await this.prompter.promptSignMessage({chainId:e.chainId,message:Q(y),eip6492:p},e.origin,e.projectAccessKey);if(h&&h.length>0)return h;throw new Error("declined by user")}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[d,h]=e.params;let y;if(typeof h=="string")try{y=JSON.parse(h)}catch(g){console.warn("walletRequestHandler: error parsing typedData",g)}else y=h;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let p="";const b=e.method==="sequence_signTypedData_v4";if(this.prompter===null){var i;p=await l.signTypedData(y.domain,y.types,y.message,(i=e.chainId)!=null?i:this.defaultChainId(),b?"eip6492":"ignore")}else p=await this.prompter.promptSignMessage({chainId:e.chainId,typedData:y,eip6492:b},e.origin,e.projectAccessKey);if(p&&p.length>0)return p;throw new Error("declined by user")}case"eth_sendTransaction":{const d=_he(e.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));mE(l.address,d);let h="";if(this.prompter===null){var o,a;const y=await l.sendTransaction(d,(o=e.chainId)!=null?o:this.defaultChainId());h=(a=y==null?void 0:y.hash)!=null?a:""}else h=await this.prompter.promptSendTransaction(d,e.chainId,e.origin,e.projectAccessKey);if(h)return h;throw new Error("declined by user")}case"eth_signTransaction":{const[d]=e.params;if(Ae(d.from)!==l.address)throw new Error("sender address does not match wallet");if(mE(l.address,d),this.prompter===null){var c;return await l.signTransactions(d,(c=e.chainId)!=null?c:this.defaultChainId())}else return await this.prompter.promptSignTransaction(d,e.chainId,e.origin,e.projectAccessKey)}case"eth_sendRawTransaction":if(de.transaction.isSignedTransactionBundle(e.params[0])){const d=Number(e.params[0].chainId);return(await l.relayer(d).relay(e.params[0])).hash}else return(await u.broadcastTransaction(e.params[0])).hash;case"eth_getTransactionCount":{const d=Ae(e.params[0]),h=e.params[1],y=await u.getTransactionCount(d,h);return nl(BigInt(y))}case"eth_blockNumber":return await u.getBlockNumber();case"eth_getBlockByNumber":return await u.getBlock(e.params[0]);case"eth_getBlockByHash":return await u.getBlock(e.params[0]);case"eth_getTransactionByHash":return await u.getTransaction(e.params[0]);case"eth_call":{const[d,h]=e.params;return await u.call(tr({},d,{blockTag:h}))}case"eth_getCode":{const[d,h]=e.params;return await u.getCode(d,h)}case"eth_estimateGas":{const[d]=e.params;return await u.estimateGas(d)}case"eth_gasPrice":{const d=await u.getFeeData();return d.gasPrice===null?null:nl(d.gasPrice)}case"wallet_switchEthereumChain":{const[d]=e.params;if(!d.chainId||d.chainId.length===0)throw new Error("invalid chainId");const h=BigInt(d.chainId);return this.setDefaultChainId(Number(h)),null}case"sequence_getWalletContext":return l.contexts;case"sequence_getWalletConfig":{const[d]=e.params;return d?[(await l.status(d)).onChain.config]:await Promise.all(l.networks.map(async function(h){return(await l.status(h.chainId)).onChain.config}))}case"sequence_getWalletState":{const[d]=e.params;return d?[i4(d,await l.status(d))]:await Promise.all(l.networks.map(async function(h){const y=await l.status(h.chainId);return i4(h.chainId,y)}))}case"sequence_getNetworks":return await this.getNetworks(!0);case"sequence_isSequence":return!0;case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[d]=e.params;if(!d)throw new Error("invalid request, method argument defaultChainId cannot be empty");return this.setDefaultChainId(d),await this.getNetworks(!0)}default:{if(!f)throw new Error("Account provider doesn't support send method");return await f.send(e.method,e.params)}}}catch(l){throw Ie.error(l),{message:typeof l=="string"?l:(l==null?void 0:l.message)||"unkown error",code:4001}}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=tr({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(Ie.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(s=>tr({},s,{provider:void 0,relayer:void 0}))};if(e){const s=os(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",gr(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",gr(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){Ie.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,a=await r.status(s);if(o(a))return!0;if(await e.promptConfirmWalletDeploy(s,i)){const l=await r.status(s);return o(l)?!0:(Ie.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function i4(t,e){return{context:e.original.context,config:e.onChain.config,address:de.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const Bhe=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];function Lhe(t){return t&&typeof t=="object"&&typeof t.send=="function"&&typeof t.getNetwork=="function"}function jhe(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}class Nd{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!_d.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Nd(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new pA(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await VU(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await new Promise(c=>{(async function u(){const f=await o.getTransaction(i);if(f!==null)return c(f);await o.once("block",u)})()})}catch(a){throw a.transactionHash=i,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r){return this.getProvider(r==null?void 0:r.chainId).call(e)}getChainId(){return Promise.resolve(this.client.getChainId())}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}getNonce(e){throw new Error("SequenceSigner does not support getNonce")}populateCall(e){throw new Error("SequenceSigner does not support populateCall")}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class pA extends Nd{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class Fhe{constructor(e){if(this.signer=e,pA.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return dd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=Fm(r),a=RS(o);return dd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,Od(r),n,s)}}const Uhe=["method"],o4=["connect","disconnect","chainChanged","accountsChanged"];class _d extends id{constructor(e,r,n=_1,s){super(e.getChainId(),s),this.client=e,this.providerFor=r,this.networks=n,this.options=s,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,this.eip1193EventListeners=new Map,e.onConnect(i=>{var o;(o=this.eip1193EventListeners.get("connect"))==null||o.forEach(a=>a(i))}),e.onDisconnect(i=>{var o;(o=this.eip1193EventListeners.get("disconnect"))==null||o.forEach(a=>a(i))}),e.onDefaultChainIdChanged(i=>{var o;(o=this.eip1193EventListeners.get("chainChanged"))==null||o.forEach(a=>a(i))}),e.onAccountsChanged(i=>{var o;(o=this.eip1193EventListeners.get("accountsChanged"))==null||o.forEach(a=>a(i))}),this.signer=new Nd(this.client,this),this.utils=new Fhe(this.signer)}async on(e,r){if(o4.includes(e)){const n=this.eip1193EventListeners.get(e)||new Set;return n.add(r),this.eip1193EventListeners.set(e,n),this}return super.on(e,r)}async off(e,r){if(o4.includes(e)){const n=this.eip1193EventListeners.get(e);return n&&(r?n.delete(r):n.clear()),this}return super.off(e,r)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(tr({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=os(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new YU(this.client,this.providerFor,r,this.options)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async _perform(e){var r;const{method:n}=e,s=jhe(e,Uhe),i=await this._getSubprovider(),o=(r=i.getRpcRequest(e))!=null?r:{method:n,args:Object.values(s)};if(!o)throw new Error(`Unsupported method ${e.method}`);return i.send(o.method,o.args)}async perform(e,r){if(e==="eth_chainId")return gr(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const n=r[0],s=JU(n);return this.setDefaultChainId(s)}return e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4"?this.client.request({method:e,params:r,chainId:this.getChainId()}):this._perform(tr({method:e},r))}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async _detectNetwork(){const e=this.client.getChainId(),r=os(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return new ut(r.name,r.chainId)}async detectNetwork(){return this._detectNetwork()}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getFeeData(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getFeeData()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorage(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).getStorage(e,r,n)}async call(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).call(e)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBlock(e,r)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return hg(e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}_d.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function JU(t){return typeof t=="object"?JU(t.chainId):Number(t)}class YU extends _d{constructor(e,r,n,s){super(e,r,void 0,s),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=os(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return new ut(r.name,r.chainId)}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}let $he=function(t){return t[t.INIT=0]="INIT",t[t.VIEW=1]="VIEW",t[t.SIGN_MESSAGE_REQUEST=2]="SIGN_MESSAGE_REQUEST",t[t.SIGN_TYPED_DATA_REQUEST=3]="SIGN_TYPED_DATA_REQUEST",t[t.SEND_TRANSACTION_REQUEST=4]="SEND_TRANSACTION_REQUEST",t}({});class XU extends fhe{}const ZU=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new XU(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>eo()?{origin:window.location.origin}:{}})};class al{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(al.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){try{const e=this.store.getItem(al.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}catch(e){console.error("Error parsing session",e)}}async clearSession(){return this.store.removeItem(al.SESSION_LOCALSTORE_KEY)}}al.SESSION_LOCALSTORE_KEY="@sequence.session";class cl{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(cl.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(cl.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(cl.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}cl.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class yA{constructor(e,r,n){var s,i;if(this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,this.projectAccessKey=void 0,this.analytics=void 0,QU(e))this.transport=Um.new(e,n==null?void 0:n.projectAccessKey);else if(MU(e))this.transport=e;else throw new Error("Invalid transport");const o=n==null?void 0:n.defaultChainId;if(this.defaultEIP6492=(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new al(r),this.defaultChainId=new cl(r,o),this.transport.on("accountsChanged",l=>{var u;l.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(u=this.callbacks.accountsChanged)==null||u.forEach(f=>f(l))}),this.transport.on("connect",l=>{var u;const f=gr(this.getChainId());(u=this.callbacks.connect)==null||u.forEach(d=>d(tr({},l,{chainId:f})))}),this.transport.on("disconnect",(l,u)=>{var f;(f=this.callbacks.disconnect)==null||f.forEach(d=>d(l,u))}),this.transport.on("networks",l=>{var u;(u=this.callbacks.networks)==null||u.forEach(f=>f(l))}),this.transport.on("walletContext",l=>{var u;(u=this.callbacks.walletContext)==null||u.forEach(f=>f(l))}),this.transport.on("open",l=>{var u;(u=this.callbacks.open)==null||u.forEach(f=>f(l))}),this.transport.on("close",()=>{var l;(l=this.callbacks.close)==null||l.forEach(u=>u())}),this.transport.on("chainChanged",(l,u)=>{var f;(f=this.callbacks.chainChanged)==null||f.forEach(d=>d(l,u))}),this.defaultChainId.onDefaultChainIdChanged(l=>{var u;const f=gr(l);(u=this.callbacks.chainChanged)==null||u.forEach(d=>d(f))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=ZU(this.projectAccessKey)),(i=this.session.getSession())!=null&&i.accountAddress){var a,c;(a=this.analytics)==null||a.identify((c=this.session.getSession())==null||(c=c.accountAddress)==null?void 0:c.toLowerCase())}}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:tr({},e,{networkId:this.getChainId(),clientVersion:Vr})});const r=await this.transport.waitUntilConnected().catch(i=>i instanceof Error?{connected:!1,error:i.message}:{connected:!1,error:JSON.stringify(i)});if(r.chainId&&(r.chainId=BigInt(r.chainId).toString()),r.connected){var n;if(!r.session)throw new Error("impossible state, connect response is missing session");if(this.session.setSession(r.session),(n=r.session)!=null&&n.accountAddress){var s;(s=this.analytics)==null||s.identify(r.session.accountAddress.toLowerCase())}}return r}disconnect(){var e;return this.isOpened()&&this.closeWallet(),(e=this.analytics)==null||e.reset(),this.session.clearSession()}async request(e){e.method=this.mapSignMethod(e.method);const r=await this.transport.request(e);return Whe(r)}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.request({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){var n;const s=this.signMethod(r);return(n=this.analytics)==null||n.track({event:"SIGN_MESSAGE_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),e=z(dA(e)),this.request({method:s,params:[e,this.getAddress()],chainId:r==null?void 0:r.chainId})}async signTypedData(e,r){var n;const s=this.signTypedDataMethod(r),i=js.getPayload(e.domain,e.types,e.message);return(n=this.analytics)==null||n.track({event:"SIGN_TYPED_DATA_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.request({method:s,params:[this.getAddress(),i],chainId:(r==null?void 0:r.chainId)||e.domain.chainId&&Number(e.domain.chainId)||this.getChainId()})}async sendTransaction(e,r){var n;const s=Array.isArray(e)?e:[e],i=Nhe(s);return(n=this.analytics)==null||n.track({event:"SEND_TRANSACTION_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.request({method:"eth_sendTransaction",params:[i],chainId:r==null?void 0:r.chainId})}async getWalletContext(){return this.request({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.request({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()],chainId:e==null?void 0:e.chainId});return Array.isArray(r)?r[0]:r}}const Whe=t=>t&&typeof t=="object"&&"jsonrpc"in t&&"result"in t?t.result:t,bE={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let fi;const e$=(t,e)=>{var r,n;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(fi)return fi;const s=tr({},bE,e,{transports:tr({},bE.transports,e==null?void 0:e.transports)});let i=[];const o=(d=[])=>{var h;i=Vhe(_1,d,(h=s.networks)!=null?h:[]),i=i.map(y=>(y.rpcUrl.includes(t)||(y.rpcUrl=y.rpcUrl+`/${t}`),y))};o();const a=s.defaultNetwork?(r=os(i,s.defaultNetwork))==null?void 0:r.chainId:void 0;if(!a&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const c=s.localStorage||Lg(),l=new yA(s.transports,c,{defaultChainId:a,defaultEIP6492:s.defaultEIP6492,projectAccessKey:t,analytics:s.analytics});o((n=l.getSession())==null?void 0:n.networks),l.onConnect(d=>{var h;o((h=d.session)==null?void 0:h.networks)});const u={},f=d=>{const h=os(i,d);if(!h)throw new Error(`no network config found for chainId: ${d}`);const{rpcUrl:y}=h;return u[y]||(u[y]=new bD(y,{middlewares:[vD,gD,new _S]},{cacheTimeout:-1})),u[y]};return fi=new _d(l,f),fi},t$=()=>{fi&&(fi.client.closeWallet(),fi.client.transport.unregister(),fi=void 0)},r$=()=>{if(!fi)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return fi},Vhe=(...t)=>{const e=new Map;for(const r of t.flat())if(r.chainId&&r.rpcUrl){const n=e.get(r.chainId);e.set(r.chainId,tr({},n,r))}return Array.from(e.values())},zhe=Object.freeze(Object.defineProperty({__proto__:null,Analytics:XU,AnalyticsEventType:$he,BaseInjectedTransport:Ohe,BaseProviderTransport:F1,BaseWalletTransport:U1,CHANNEL_ID:hA,DefaultChainIdTracker:cl,DefaultProviderConfig:bE,ErrSignedInRequired:BU,EventType:We,ExtensionMessageHandler:Phe,ExtensionMessageProvider:qU,InitState:yt,LocalStorage:$0,MemoryItemStore:WU,MuxMessageProvider:Um,OpenState:Yn,PROVIDER_OPEN_TIMEOUT:fA,ProviderError:DU,ProxyMessageChannel:Ahe,ProxyMessageChannelPort:xE,ProxyMessageHandler:The,ProxyMessageProvider:zU,SequenceClient:yA,SequenceClientSession:al,SequenceProvider:_d,SequenceSigner:Nd,SingleNetworkSequenceProvider:YU,SingleNetworkSequenceSigner:pA,UnrealMessageHandler:Ihe,UnrealMessageProvider:GU,WalletRequestHandler:Dhe,WindowMessageHandler:Rhe,WindowMessageProvider:KU,WindowSessionParams:j1,getWallet:r$,initWallet:e$,isBrowserExtension:Bg,isMuxTransportTemplate:QU,isProviderTransport:MU,isUnityPlugin:UU,isValidMessageSignature:jU,isValidSignature:dd,isValidTypedDataSignature:FU,isWalletUpToDate:$U,messageToBytes:dA,nextMessageIdx:LU,prefixEIP191Message:Fm,resolveArrayProperties:VU,setupAnalytics:ZU,trimEIP191Prefix:She,unregisterWallet:t$,useBestStore:Lg,validateTransactionRequest:mE},Symbol.toStringTag,{value:"Module"}));function tn(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var Hhe=tn({__proto__:null},[ice]),Ghe=tn({__proto__:null},[yce]),qhe=tn({__proto__:null},[pde]),Khe=tn({__proto__:null},[Rde]),Qhe=tn({__proto__:null},[ofe]),Jhe=tn({__proto__:null},[mfe]),Yhe=tn({__proto__:null},[ule]),Xhe=tn({__proto__:null},[zhe]),Zhe=tn({__proto__:null},[Cue]);const e0e=de.transaction;var t0e=Object.freeze({__proto__:null,transactions:e0e}),r0e=tn({__proto__:null,isValidSignature:dd,isValidMessageSignature:jU,isValidTypedDataSignature:FU,isWalletUpToDate:$U},[Yce]),n0e=tn({__proto__:null},[eue]),s0e=tn({__proto__:null},[kue]),i0e=tn({__proto__:null},[fde]),o0e=tn({__proto__:null},[oue]),a0e=tn({__proto__:null},[Pue]),Ge=Object.freeze({__proto__:null,abi:Hhe,api:Ghe,auth:qhe,guard:Khe,indexer:Qhe,metadata:Jhe,network:Yhe,provider:Xhe,relayer:Zhe,transactions:t0e,utils:r0e,core:n0e,signhub:s0e,sessions:i0e,migration:o0e,account:a0e,initWallet:e$,getWallet:r$,unregisterWallet:t$,SequenceProvider:_d,SequenceClient:yA,SequenceSigner:Nd});const a4=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var c0e="_1e9z9271";const l0e=({message:t,loading:e})=>{const r=()=>t?` +...`:"...";return ie.jsx(dQ,{label:"Console",defaultOpen:!0,children:ie.jsxs(Ce,{as:"pre",color:"text80",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),ie.jsx(Ce,{className:c0e,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var u0e="_1q07ov40";const No=t=>{const{label:e,children:r,style:n,className:s}=t;return ie.jsxs(Ce,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:s,style:n,children:[e&&ie.jsx(Ce,{marginBottom:"2",children:ie.jsx(f0e,{children:e})}),ie.jsx(Ce,{className:u0e,children:zr.Children.map(r,(i,o)=>ie.jsx(Ce,{children:i},o))})]})},f0e=t=>ie.jsx(It,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),d0e=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},c4=t=>"0x"+t.toString(16),h0e="/demo-dapp/assets/logo-EKCqYZBG.svg",l4="/demo-dapp/assets/skyweaver-banner-AT9gQtXT.png",p0e="/demo-dapp/assets/skyweaver-banner-large-Dt2dVXke.png";QM({logLevel:"DEBUG"});const n$=[{name:"production",walletUrl:"https://sequence.app",projectAccessKey:"AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA"},{name:"development",walletUrl:"https://dev.sequence.app",projectAccessKey:"AQAAAAAAAAVCXiQ9f_57R44MjorZ4SmGdhA"},{name:"local",walletUrl:"http://localhost:3333",projectAccessKey:"AQAAAAAAAAVCXiQ9f_57R44MjorZ4SmGdhA"}],y0e="https://api.sequence.app",u4=d0e()||M.MAINNET,Sc=new URLSearchParams(window.location.search),s$=Sc.get("env")??"production",i$=n$.find(t=>t.name===s$),bu=Sc.get("walletAppURL")??i$.walletUrl,{projectAccessKey:f4}=i$,g0e=Sc.has("showProhibitedActions");bu&&bu.length>0?Ge.initWallet(f4,{defaultNetwork:u4,transports:{walletAppURL:bu}}):Ge.initWallet(f4,{defaultNetwork:u4,transports:{walletAppURL:bu}});const v0e=()=>{const[t,e]=x.useState(null),[r,n]=x.useState(null),[s,i]=x.useState(!1),[o,a]=x.useState(!1),c=Ge.getWallet().getProvider(),[l,u]=x.useState(c.getChainId()),[f,d]=x.useState(!1),[h,y]=x.useState(!1);x.useMemo(()=>{c.on("chainChanged",U=>{u(Number(BigInt(U)))})},[]),x.useEffect(()=>{a(c.isConnected())},[c]),x.useEffect(()=>{he()},[o]),x.useEffect(()=>{c.client.onOpen(()=>{console.log("wallet window opened")}),c.client.onClose(()=>{console.log("wallet window closed")})},[c]);const p={app:"Demo Dapp",askForEmail:!0},b=async(U={app:"Demo dapp"})=>{if(o){ue(),K("Wallet already connected!"),i(!1);return}U={...p,...U,settings:{...p.settings,...U.settings}};try{ue(),K("Connecting");const se=Ge.getWallet(),ae=await se.connect(U);if(U.authorize&&ae.connected){let Re=Sc.get("apiUrl");(!Re||Re.length===0)&&(Re=y0e);const it=new Ge.api.SequenceAPIClient(Re),{isValid:Wt}=await it.isValidETHAuthProof({chainId:ae.chainId,walletAddress:ae.session.accountAddress,ethAuthProofString:ae.proof.proofString});K(`isValid (API)?: ${Wt}`)}if(U.authorize){const Re=new Tg;if(ae.proof){const it=await Re.decodeProof(ae.proof.proofString,!0),Wt=await se.utils.isValidTypedDataSignature(se.getAddress(),ae.proof.typedData,it.signature,Number(BigInt(ae.chainId)));K(`connected using chainId: ${BigInt(ae.chainId).toString()}`),K(`isValid (client)?: ${Wt}`)}}i(!1),ae.connected?(K("Wallet connected!"),K(`shared email: ${ae.email}`),a(!0)):K("Failed to connect wallet - "+ae.error)}catch(se){console.error(se),oe()}},g=()=>{Ge.getWallet().disconnect(),he(),a(!1)},v=()=>{Ge.getWallet().openWallet()},m=()=>{const U=Ge.getWallet(),ae={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};U.openWallet("wallet/add-funds",ae)},k=()=>{Ge.getWallet().closeWallet()},A=async()=>{ue();const U=Ge.getWallet();K(`isConnected?: ${U.isConnected()}`),i(!1)},P=async()=>{ue();const U=Ge.getWallet();K(`isOpened?: ${U.isOpened()}`),i(!1)},R=async()=>{try{ue();const U=c.getChainId();K(`top chainId: ${U}`);const ae=c.getProvider().getChainId();K(`provider.getChainId(): ${ae}`);const it=await c.getSigner().getChainId();K(`signer.getChainId(): ${it}`),i(!1)}catch(U){console.error(U),oe()}},N=async()=>{try{ue();const U=Ge.getWallet(),se=U.getAddress();K(`getAddress(): ${se}`);const Re=U.getProvider().listAccounts();K(`accounts: ${JSON.stringify(Re)}`),i(!1)}catch(U){console.error(U),oe()}},V=async()=>{try{ue();const U=Ge.getWallet(),se=U.getProvider(),ae=U.getAddress(),Re=await se.getBalance(ae);K(`balance check 1: ${Re.toString()}`);const Wt=await U.getSigner().getBalance();K(`balance check 2: ${Wt.toString()}`),i(!1)}catch(U){console.error(U),oe()}},F=async()=>{try{ue();const se=await Ge.getWallet().getNetworks();K(`networks: ${JSON.stringify(se,null,2)}`),i(!1)}catch(U){console.error(U),oe()}},X=async()=>{try{ue();const U=Ge.getWallet();K("signing message...");const se=U.getSigner(),ae=`1915 Robert Frost +The Road Not Taken + +Two roads diverged in a yellow wood, +And sorry I could not travel both +And be one traveler, long I stood +And looked down one as far as I could +To where it bent in the undergrowth + +Then took the other, as just as fair, +And having perhaps the better claim, +Because it was grassy and wanted wear +Though as for that the passing there +Had worn them really about the same, + +And both that morning equally lay +In leaves no step had trodden black. +Oh, I kept the first for another day! +Yet knowing how way leads on to way, +I doubted if I should ever come back. + +I shall be telling this with a sigh +Somewhere ages and ages hence: +Two roads diverged in a wood, and Iā€” +I took the one less traveled by, +And that has made all the difference. + +ā˜ ā˜€ ā˜‚`,Re=await se.signMessage(ae);K(`signature: ${Re}`);const it=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${it}`),!it)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},re=async()=>{try{ue();const U=Ge.getWallet();K("signing message...");const se=U.getSigner(),ae=z(xt("Hello, world!")),Re=await se.signMessage(ae);K(`signature: ${Re}`);const it=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${it}`),!it)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},le=async()=>{try{ue();const U=Ge.getWallet();K("signing message...");const se=U.getSigner(),ae=xt("Hello, world!"),Re=await se.signMessage(ae);K(`signature: ${Re}`);const it=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${it}`),!it)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},ee=async()=>{try{ue();const U=Ge.getWallet();K("signing typedData...");const se={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},ae=U.getSigner(),Re=await ae.signTypedData(se.domain,se.types,se.message);K(`signature: ${Re}`);const it=await U.utils.isValidTypedDataSignature(U.getAddress(),se,Re,await ae.getChainId());K(`isValid?: ${it}`),i(!1)}catch(U){console.error(U),oe()}},B=async()=>{try{ue();const U=Ge.getWallet(),se="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",ae=new ft(["function withdraw(uint256 amount)"]),Re={to:se,data:ae.encodeFunctionData("withdraw",["1000000000000000000"])},Wt=await U.getProvider().estimateGas(Re);K(`estimated gas needed for wmatic withdrawal : ${Wt.toString()}`),i(!1)}catch(U){console.error(U),oe()}},G=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner(),K(`Transfer txn on ${U.getChainId()} chainId`);const ae=await U.getAddress(),Re={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:ae,value:r2("1.234"),data:"0x"},it={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:ae,value:r2("0.4242"),data:"0x"},Wt=U.provider,ki=await Wt.getBalance(ae);K(`balance of ${ae}, before: ${ki}`);const $m=await U.sendTransaction([Re,it]);K(`txnResponse: ${JSON.stringify($m)}`);const Wm=await Wt.getBalance(ae);K(`balance of ${ae}, after: ${Wm}`),i(!1)}catch(se){console.error(se),oe()}},Z=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae=await U.getAddress(),Re=dg("1",1),Wt={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new ft(a4).encodeFunctionData("transfer",[ae,c4(Re)])},ki=await U.sendTransaction([Wt],{chainId:M.SEPOLIA});K(`txnResponse: ${JSON.stringify(ki)}`),i(!1)}catch(se){console.error(se),oe()}},E=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae=await U.getAddress(),Re=dg("0.05",18),Wt={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new ft(a4).encodeFunctionData("transfer",[ae,c4(Re)])},ki=await U.sendTransaction([Wt]);K(`txnResponse: ${JSON.stringify(ki)}`),i(!1)}catch(se){console.error(se),oe()}},S=async()=>{try{const U=Ge.getWallet(),se=U.getChainId()===M.ARBITRUM?M.OPTIMISM:M.ARBITRUM;G(U.getSigner(se))}catch(U){console.error(U),oe()}},O=async()=>{try{ue(),K("TODO"),i(!1)}catch(U){console.error(U),oe()}},D=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],Re="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",it=new hn(Re,ae),Wt=await it.symbol();K(`Token symbol: ${Wt}`);const ki=await it.balanceOf(await U.getAddress());K(`Token Balance: ${ki.toString()}`),i(!1)}catch(se){console.error(se),oe()}},L=async()=>{try{ue();const U=Ge.getWallet(),ae=await U.getSigner().getAddress(),it=(await U.getNetworks()).find(Wm=>Wm.chainId===M.POLYGON);if(!it)throw new Error("Could not find Polygon network in networks list");const Wt=new Ge.indexer.SequenceIndexer(it.indexerUrl),ki=await Wt.getTokenBalances({accountAddress:ae,includeMetadata:!0});K(`tokens in your account: ${JSON.stringify(ki)}`);const $m=await Wt.getTokenBalances({accountAddress:ae,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});K(`skyweaver collectibles in your account: ${JSON.stringify($m)}`),i(!1)}catch(U){console.error(U),oe()}},W=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ft(Gt.mainModule.abi).encodeFunctionData("updateImplementation",[wi])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},q=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ft(Gt.mainModuleUpgradable.abi).encodeFunctionData("updateImageHash",[xl])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},te=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),delegateCall:!0},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},J=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ft(["function addHook(bytes4 _signature, address _implementation)"]).encodeFunctionData("addHook",["0x01234567",wi])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},$=async U=>{try{ue();const se=Ge.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ft(["function setExtraImageHash(bytes32 _imageHash, uint256 _expiration)"]).encodeFunctionData("setExtraImageHash",[xl,n7])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},K=(U,se=!1)=>(console.log(U),e(se?U:ae=>`${ae} + +${U}`)),ue=()=>{i(!0)},he=()=>{i(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},oe=()=>{i(!1),e("An error occurred")},ke=[M.RINKEBY,M.HARDHAT,M.HARDHAT_2,M.KOVAN,M.ROPSTEN,M.HOMEVERSE_TESTNET,M.BASE_GOERLI],Me=Object.values(Ge.network.networks).filter(U=>U.type===Te.MAINNET).sort((U,se)=>U.chainId-se.chainId),bt=Object.values(Ge.network.networks).filter(U=>U.type===Te.TESTNET).sort((U,se)=>U.chainId-se.chainId),rn=[...Me,...bt].filter(U=>!U.deprecated&&!ke.includes(U.chainId));x.useEffect(()=>{r&&!f&&(console.log(r),b({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${l4}`}}),n(null))},[r,f]);const Er=U=>(U=U.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(U));return ie.jsxs(Ce,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[ie.jsx(Ce,{marginBottom:"10",children:ie.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:ie.jsx(xk,{height:"6",alt:"logo",src:h0e})})}),ie.jsx(Ce,{children:ie.jsx(It,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ie.jsx(Ce,{marginTop:"1",marginBottom:"4",children:ie.jsx(It,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),ie.jsxs(CK,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ie.jsx(JK,{}),ie.jsx(It,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ie.jsx(F6,{background:"buttonGlass"}),ie.jsx(Ce,{marginBottom:"4",children:ie.jsx(g3,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:U=>{g(),Sc.set("env",U),Sc.delete("walletAppURL"),window.location.search=Sc.toString()},value:s$,options:[...Object.values(n$).map(U=>({label:ie.jsx(Ce,{alignItems:"center",gap:"2",children:ie.jsx(It,{capitalize:!0,children:U.name})}),value:String(U.name)}))]})}),ie.jsxs(Ce,{marginBottom:"4",children:[ie.jsx(It,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),ie.jsxs(Ce,{as:"a",href:bu,target:"_blank",rel:"noopener",textDecoration:"none",gap:"1",marginTop:"1",alignItems:"center",color:"text80",children:[ie.jsx(It,{as:"div",variant:"normal",color:"text80",children:bu}),ie.jsx(GK,{})]})]}),ie.jsx(F6,{background:"buttonGlass"}),ie.jsx(Ce,{marginBottom:"4",children:ie.jsx(g3,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:U=>c.setDefaultChainId(Number(U)),value:String(l),options:[...Object.values(rn).map(U=>({label:ie.jsxs(Ce,{alignItems:"center",gap:"2",children:[ie.jsx(Lte,{src:U.logoURI,size:"sm"}),ie.jsx(It,{children:U.title})]}),value:String(U.chainId)}))]})}),ie.jsxs(No,{label:"Connection",children:[ie.jsx(ze,{width:"full",shape:"square",onClick:()=>b(),label:"Connect"}),ie.jsx(ze,{width:"full",shape:"square",onClick:()=>b({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),ie.jsx(ze,{width:"full",shape:"square",onClick:()=>b({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${p0e}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ie.jsx(ze,{width:"full",shape:"square",onClick:()=>{d(!0)},label:"Connect with Email"}),ie.jsx(ze,{width:"full",shape:"square",onClick:()=>{b({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${l4}`}})},label:"Connect with Google"}),ie.jsx(ze,{width:"full",shape:"square",onClick:()=>g(),label:"Disconnect"})]}),ie.jsxs(No,{label:"Basics",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Open Wallet"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>m(),label:"Open Wallet with Settings"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>k(),label:"Close Wallet"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Is Connected?"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Is Opened?"})]}),ie.jsxs(No,{label:"State",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>R(),label:"ChainID"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Networks"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>N(),label:"Get Accounts"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>V(),label:"Get Balance"})]}),ie.jsxs(No,{label:"Signing",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>X(),label:"Sign Message"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>re(),label:"Sign Message (Hex)"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>le(),label:"Sign Message (Bytes)"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>ee(),label:"Sign TypedData"})]}),ie.jsx(No,{label:"Simulation",children:ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>B(),label:"Estimate Unwrap Gas"})}),ie.jsxs(No,{label:"Transactions",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>G(),label:"Send funds"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>S(),label:"Send on L2"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Send DAI"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>O(),label:"Send ERC-1155 Tokens"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Send USDC on Sepolia"})]}),ie.jsxs(No,{label:"Various",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Read Symbol and Balance"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>L(),label:"Fetch Token Balances"})]}),g0e&&ie.jsxs(No,{label:"Prohibited Actions - FOR TESTING ONLY! DO NOT CONFIRM!",children:[ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>W(),label:"Update Implementation"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>q(),label:"Update Image Hash"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>te(),label:"Delegate Call"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>J(),label:"Add Hook"}),ie.jsx(ze,{width:"full",shape:"square",disabled:!o,onClick:()=>$(),label:"Set Extra Image Hash"})]}),ie.jsx(UP,{children:f&&ie.jsx(MZ,{onClose:()=>d(!1),size:"sm",children:ie.jsx(Ce,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:ie.jsxs(Ce,{flexDirection:"column",children:[ie.jsx(Ce,{marginTop:"6",children:ie.jsx(It,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),ie.jsx(Ce,{marginTop:"4",children:ie.jsx(Sk,{onChange:U=>{n(U.target.value)}})}),h?ie.jsx(Ce,{marginTop:"6",children:ie.jsx(It,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,ie.jsx(Ce,{gap:"2",marginY:"4",children:ie.jsx(ze,{variant:"primary",label:"Login",onClick:()=>{Er(r)?(y(!1),d(!1)):y(!0)},"data-id":"login"})})]})})})}),ie.jsx(l0e,{message:t,loading:s})]})},m0e=zr.memo(v0e),x0e=DR(document.getElementById("root"));x0e.render(ie.jsx(zr.StrictMode,{children:ie.jsx(IZ,{children:ie.jsx(m0e,{})})})); diff --git a/assets/index-DHa5VEuO.js b/assets/index-DHa5VEuO.js deleted file mode 100644 index ca908ca..0000000 --- a/assets/index-DHa5VEuO.js +++ /dev/null @@ -1,186 +0,0 @@ -var XF=Object.defineProperty;var eS=t=>{throw TypeError(t)};var ZF=(t,e,r)=>e in t?XF(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var _=(t,e,r)=>ZF(t,typeof e!="symbol"?e+"":e,r),Em=(t,e,r)=>e.has(t)||eS("Cannot "+r);var w=(t,e,r)=>(Em(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>e.has(t)?eS("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),T=(t,e,r,n)=>(Em(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Y=(t,e,r)=>(Em(t,e,"access private method"),r);var Pl=(t,e,r,n)=>({set _(s){T(t,e,s,r)},get _(){return w(t,e,n)}});function eU(t,e){for(var r=0;rn[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function q8(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var K8={exports:{}},Wg={},Q8={exports:{}},Ue={};/** - * @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 r1=Symbol.for("react.element"),tU=Symbol.for("react.portal"),rU=Symbol.for("react.fragment"),nU=Symbol.for("react.strict_mode"),sU=Symbol.for("react.profiler"),iU=Symbol.for("react.provider"),oU=Symbol.for("react.context"),aU=Symbol.for("react.forward_ref"),cU=Symbol.for("react.suspense"),lU=Symbol.for("react.memo"),uU=Symbol.for("react.lazy"),tS=Symbol.iterator;function fU(t){return t===null||typeof t!="object"?null:(t=tS&&t[tS]||t["@@iterator"],typeof t=="function"?t:null)}var J8={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y8=Object.assign,X8={};function ld(t,e,r){this.props=t,this.context=e,this.refs=X8,this.updater=r||J8}ld.prototype.isReactComponent={};ld.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};ld.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Z8(){}Z8.prototype=ld.prototype;function eE(t,e,r){this.props=t,this.context=e,this.refs=X8,this.updater=r||J8}var tE=eE.prototype=new Z8;tE.constructor=eE;Y8(tE,ld.prototype);tE.isPureReactComponent=!0;var rS=Array.isArray,e4=Object.prototype.hasOwnProperty,rE={current:null},t4={key:!0,ref:!0,__self:!0,__source:!0};function r4(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)e4.call(e,n)&&!t4.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1>>1,L=E[D];if(0>>1;Ds(te,O))Js($,te)?(E[D]=$,E[J]=O,D=J):(E[D]=te,E[q]=O,D=q);else if(Js($,O))E[D]=$,E[J]=O,D=J;else break e}}return S}function s(E,S){var O=E.sortIndex-S.sortIndex;return O!==0?O:E.id-S.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,y=!1,p=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(E){for(var S=r(l);S!==null;){if(S.callback===null)n(l);else if(S.startTime<=E)n(l),S.sortIndex=S.expirationTime,e(c,S);else break;S=r(l)}}function k(E){if(p=!1,m(E),!y)if(r(c)!==null)y=!0,G(A);else{var S=r(l);S!==null&&Z(k,S.startTime-E)}}function A(E,S){y=!1,p&&(p=!1,g(N),N=-1),h=!0;var O=d;try{for(m(S),f=r(c);f!==null&&(!(f.expirationTime>S)||E&&!X());){var D=f.callback;if(typeof D=="function"){f.callback=null,d=f.priorityLevel;var L=D(f.expirationTime<=S);S=t.unstable_now(),typeof L=="function"?f.callback=L:f===r(c)&&n(c),m(S)}else n(c);f=r(c)}if(f!==null)var W=!0;else{var q=r(l);q!==null&&Z(k,q.startTime-S),W=!1}return W}finally{f=null,d=O,h=!1}}var P=!1,R=null,N=-1,V=5,F=-1;function X(){return!(t.unstable_now()-FE||125D?(E.sortIndex=O,e(l,E),r(c)===null&&E===r(l)&&(p?(g(N),N=-1):p=!0,Z(k,O-D))):(E.sortIndex=L,e(c,E),y||h||(y=!0,G(A))),E},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(E){var S=d;return function(){var O=d;d=S;try{return E.apply(this,arguments)}finally{d=O}}}})(a4);o4.exports=a4;var CU=o4.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 kU=x,Rn=CU;function ne(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tb=Object.prototype.hasOwnProperty,SU=/^[: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]*$/,sS={},iS={};function AU(t){return tb.call(iS,t)?!0:tb.call(sS,t)?!1:SU.test(t)?iS[t]=!0:(sS[t]=!0,!1)}function TU(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function IU(t,e,r,n){if(e===null||typeof e>"u"||TU(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Yr(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){xr[t]=new Yr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];xr[e]=new Yr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){xr[t]=new Yr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){xr[t]=new Yr(t,2,!1,t,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(t){xr[t]=new Yr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){xr[t]=new Yr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){xr[t]=new Yr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){xr[t]=new Yr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){xr[t]=new Yr(t,5,!1,t.toLowerCase(),null,!1,!1)});var sE=/[\-:]([a-z])/g;function iE(t){return t[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(t){var e=t.replace(sE,iE);xr[e]=new Yr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(sE,iE);xr[e]=new Yr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(sE,iE);xr[e]=new Yr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){xr[t]=new Yr(t,1,!1,t.toLowerCase(),null,!1,!1)});xr.xlinkHref=new Yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){xr[t]=new Yr(t,1,!1,t.toLowerCase(),null,!0,!0)});function oE(t,e,r,n){var s=xr.hasOwnProperty(e)?xr[e]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var c=` -`+s[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Sm=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?Jd(t):""}function PU(t){switch(t.tag){case 5:return Jd(t.type);case 16:return Jd("Lazy");case 13:return Jd("Suspense");case 19:return Jd("SuspenseList");case 0:case 2:case 15:return t=Am(t.type,!1),t;case 11:return t=Am(t.type.render,!1),t;case 1:return t=Am(t.type,!0),t;default:return""}}function ib(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Xl:return"Fragment";case Yl:return"Portal";case rb:return"Profiler";case aE:return"StrictMode";case nb:return"Suspense";case sb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case u4:return(t.displayName||"Context")+".Consumer";case l4:return(t._context.displayName||"Context")+".Provider";case cE:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case lE:return e=t.displayName||null,e!==null?e:ib(t.type)||"Memo";case No:e=t._payload,t=t._init;try{return ib(t(e))}catch{}}return null}function OU(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ib(e);case 8:return e===aE?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Sa(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function d4(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function RU(t){var e=d4(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function L1(t){t._valueTracker||(t._valueTracker=RU(t))}function h4(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=d4(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function my(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ob(t,e){var r=e.checked;return kt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function aS(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Sa(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function p4(t,e){e=e.checked,e!=null&&oE(t,"checked",e,!1)}function ab(t,e){p4(t,e);var r=Sa(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?cb(t,e.type,r):e.hasOwnProperty("defaultValue")&&cb(t,e.type,Sa(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function cS(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function cb(t,e,r){(e!=="number"||my(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var Yd=Array.isArray;function bu(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=j1.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function zh(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var ph={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},NU=["Webkit","ms","Moz","O"];Object.keys(ph).forEach(function(t){NU.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ph[e]=ph[t]})});function m4(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||ph.hasOwnProperty(t)&&ph[t]?(""+e).trim():e+"px"}function x4(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=m4(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var _U=kt({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 fb(t,e){if(e){if(_U[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ne(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ne(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ne(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ne(62))}}function db(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 hb=null;function uE(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var pb=null,wu=null,Eu=null;function fS(t){if(t=i1(t)){if(typeof pb!="function")throw Error(ne(280));var e=t.stateNode;e&&(e=qg(e),pb(t.stateNode,t.type,e))}}function b4(t){wu?Eu?Eu.push(t):Eu=[t]:wu=t}function w4(){if(wu){var t=wu,e=Eu;if(Eu=wu=null,fS(t),e)for(t=0;t>>=0,t===0?32:31-(zU(t)/HU|0)|0}var F1=64,U1=4194304;function Xd(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ey(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=Xd(a):(i&=o,i!==0&&(n=Xd(i)))}else o=r&~s,o!==0?n=Xd(o):i!==0&&(n=Xd(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function n1(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Is(e),t[e]=r}function QU(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=gh),bS=" ",wS=!1;function $4(t,e){switch(t){case"keyup":return C$.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W4(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Zl=!1;function S$(t,e){switch(t){case"compositionend":return W4(e);case"keypress":return e.which!==32?null:(wS=!0,bS);case"textInput":return t=e.data,t===bS&&wS?null:t;default:return null}}function A$(t,e){if(Zl)return t==="compositionend"||!mE&&$4(t,e)?(t=F4(),_p=yE=oa=null,Zl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=SS(r)}}function G4(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?G4(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function q4(){for(var t=window,e=my();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=my(t.document)}return e}function xE(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function D$(t){var e=q4(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&G4(r.ownerDocument.documentElement,r)){if(n!==null&&xE(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=AS(r,i);var o=AS(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,eu=null,bb=null,mh=null,wb=!1;function TS(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;wb||eu==null||eu!==my(n)||(n=eu,"selectionStart"in n&&xE(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),mh&&Jh(mh,n)||(mh=n,n=Sy(bb,"onSelect"),0nu||(t.current=Tb[nu],Tb[nu]=null,nu--)}function ft(t,e){nu++,Tb[nu]=t.current,t.current=e}var Aa={},_r=Ba(Aa),ln=Ba(!1),il=Aa;function _f(t,e){var r=t.type.contextTypes;if(!r)return Aa;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function un(t){return t=t.childContextTypes,t!=null}function Ty(){gt(ln),gt(_r)}function MS(t,e,r){if(_r.current!==Aa)throw Error(ne(168));ft(_r,e),ft(ln,r)}function rT(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(ne(108,OU(t)||"Unknown",s));return kt({},r,n)}function Iy(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Aa,il=_r.current,ft(_r,t),ft(ln,ln.current),!0}function DS(t,e,r){var n=t.stateNode;if(!n)throw Error(ne(169));r?(t=rT(t,e,il),n.__reactInternalMemoizedMergedChildContext=t,gt(ln),gt(_r),ft(_r,t)):gt(ln),ft(ln,r)}var Oi=null,Kg=!1,Um=!1;function nT(t){Oi===null?Oi=[t]:Oi.push(t)}function q$(t){Kg=!0,nT(t)}function La(){if(!Um&&Oi!==null){Um=!0;var t=0,e=nt;try{var r=Oi;for(nt=1;t>=o,s-=o,Gi=1<<32-Is(e)+s|r<N?(V=R,R=null):V=R.sibling;var F=d(g,R,m[N],k);if(F===null){R===null&&(R=V);break}t&&R&&F.alternate===null&&e(g,R),v=i(F,v,N),P===null?A=F:P.sibling=F,P=F,R=V}if(N===m.length)return r(g,R),vt&&Za(g,N),A;if(R===null){for(;NN?(V=R,R=null):V=R.sibling;var X=d(g,R,F.value,k);if(X===null){R===null&&(R=V);break}t&&R&&X.alternate===null&&e(g,R),v=i(X,v,N),P===null?A=X:P.sibling=X,P=X,R=V}if(F.done)return r(g,R),vt&&Za(g,N),A;if(R===null){for(;!F.done;N++,F=m.next())F=f(g,F.value,k),F!==null&&(v=i(F,v,N),P===null?A=F:P.sibling=F,P=F);return vt&&Za(g,N),A}for(R=n(g,R);!F.done;N++,F=m.next())F=h(R,g,N,F.value,k),F!==null&&(t&&F.alternate!==null&&R.delete(F.key===null?N:F.key),v=i(F,v,N),P===null?A=F:P.sibling=F,P=F);return t&&R.forEach(function(re){return e(g,re)}),vt&&Za(g,N),A}function b(g,v,m,k){if(typeof m=="object"&&m!==null&&m.type===Xl&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case B1:e:{for(var A=m.key,P=v;P!==null;){if(P.key===A){if(A=m.type,A===Xl){if(P.tag===7){r(g,P.sibling),v=s(P,m.props.children),v.return=g,g=v;break e}}else if(P.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===No&&jS(A)===P.type){r(g,P.sibling),v=s(P,m.props),v.ref=Dd(g,P,m),v.return=g,g=v;break e}r(g,P);break}else e(g,P);P=P.sibling}m.type===Xl?(v=Jc(m.props.children,g.mode,k,m.key),v.return=g,g=v):(k=$p(m.type,m.key,m.props,null,g.mode,k),k.ref=Dd(g,v,m),k.return=g,g=k)}return o(g);case Yl:e:{for(P=m.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===m.containerInfo&&v.stateNode.implementation===m.implementation){r(g,v.sibling),v=s(v,m.children||[]),v.return=g,g=v;break e}else{r(g,v);break}else e(g,v);v=v.sibling}v=Km(m,g.mode,k),v.return=g,g=v}return o(g);case No:return P=m._init,b(g,v,P(m._payload),k)}if(Yd(m))return y(g,v,m,k);if(Od(m))return p(g,v,m,k);q1(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,v!==null&&v.tag===6?(r(g,v.sibling),v=s(v,m),v.return=g,g=v):(r(g,v),v=qm(m,g.mode,k),v.return=g,g=v),o(g)):r(g,v)}return b}var Df=aT(!0),cT=aT(!1),Ry=Ba(null),Ny=null,ou=null,CE=null;function kE(){CE=ou=Ny=null}function SE(t){var e=Ry.current;gt(Ry),t._currentValue=e}function Ob(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function ku(t,e){Ny=t,CE=ou=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(cn=!0),t.firstContext=null)}function is(t){var e=t._currentValue;if(CE!==t)if(t={context:t,memoizedValue:e,next:null},ou===null){if(Ny===null)throw Error(ne(308));ou=t,Ny.dependencies={lanes:0,firstContext:t}}else ou=ou.next=t;return e}var pc=null;function AE(t){pc===null?pc=[t]:pc.push(t)}function lT(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,AE(e)):(r.next=s.next,s.next=r),e.interleaved=r,oo(t,n)}function oo(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var _o=!1;function TE(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function uT(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Yi(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ya(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,Ge&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,oo(t,r)}return s=n.interleaved,s===null?(e.next=e,AE(n)):(e.next=s.next,s.next=e),n.interleaved=e,oo(t,r)}function Dp(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,dE(t,r)}}function FS(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function _y(t,e,r,n){var s=t.updateQueue;_o=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var c=a,l=c.next;c.next=null,o===null?i=l:o.next=l,o=c;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(i!==null){var f=s.baseState;o=0,u=l=c=null,a=i;do{var d=a.lane,h=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,p=a;switch(d=e,h=r,p.tag){case 1:if(y=p.payload,typeof y=="function"){f=y.call(h,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=p.payload,d=typeof y=="function"?y.call(h,f,d):y,d==null)break e;f=kt({},f,d);break e;case 2:_o=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,o|=d;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;d=a,a=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(u===null&&(c=f),s.baseState=c,s.firstBaseUpdate=l,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);cl|=o,t.lanes=o,t.memoizedState=f}}function US(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;er?r:4,t(!0);var n=Wm.transition;Wm.transition={};try{t(!1),e()}finally{nt=r,Wm.transition=n}}function TT(){return os().memoizedState}function Y$(t,e,r){var n=va(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},IT(t))PT(e,r);else if(r=lT(t,e,r,n),r!==null){var s=qr();Ps(r,t,n,s),OT(r,e,n)}}function X$(t,e,r){var n=va(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(IT(t))PT(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,_s(a,o)){var c=e.interleaved;c===null?(s.next=s,AE(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}r=lT(t,e,s,n),r!==null&&(s=qr(),Ps(r,t,n,s),OT(r,e,n))}}function IT(t){var e=t.alternate;return t===Ct||e!==null&&e===Ct}function PT(t,e){xh=Dy=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function OT(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,dE(t,r)}}var By={readContext:is,useCallback:Er,useContext:Er,useEffect:Er,useImperativeHandle:Er,useInsertionEffect:Er,useLayoutEffect:Er,useMemo:Er,useReducer:Er,useRef:Er,useState:Er,useDebugValue:Er,useDeferredValue:Er,useTransition:Er,useMutableSource:Er,useSyncExternalStore:Er,useId:Er,unstable_isNewReconciler:!1},Z$={readContext:is,useCallback:function(t,e){return Hs().memoizedState=[t,e===void 0?null:e],t},useContext:is,useEffect:WS,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Lp(4194308,4,ET.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Lp(4194308,4,t,e)},useInsertionEffect:function(t,e){return Lp(4,2,t,e)},useMemo:function(t,e){var r=Hs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Hs();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Y$.bind(null,Ct,t),[n.memoizedState,t]},useRef:function(t){var e=Hs();return t={current:t},e.memoizedState=t},useState:$S,useDebugValue:DE,useDeferredValue:function(t){return Hs().memoizedState=t},useTransition:function(){var t=$S(!1),e=t[0];return t=J$.bind(null,t[1]),Hs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ct,s=Hs();if(vt){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=e(),ir===null)throw Error(ne(349));al&30||pT(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,WS(gT.bind(null,n,i,t),[t]),n.flags|=2048,s0(9,yT.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Hs(),e=ir.identifierPrefix;if(vt){var r=qi,n=Gi;r=(n&~(1<<32-Is(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=r0++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[ii]=e,t[Zh]=n,UT(t,e,!1,!1),e.stateNode=t;e:{switch(o=db(r,n),r){case"dialog":dt("cancel",t),dt("close",t),s=n;break;case"iframe":case"object":case"embed":dt("load",t),s=n;break;case"video":case"audio":for(s=0;sjf&&(e.flags|=128,n=!0,Bd(i,!1),e.lanes=4194304)}else{if(!n)if(t=My(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Bd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!vt)return Cr(e),null}else 2*_t()-i.renderingStartTime>jf&&r!==1073741824&&(e.flags|=128,n=!0,Bd(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=_t(),e.sibling=null,r=bt.current,ft(bt,n?r&1|2:r&1),e):(Cr(e),null);case 22:case 23:return $E(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?kn&1073741824&&(Cr(e),e.subtreeFlags&6&&(e.flags|=8192)):Cr(e),null;case 24:return null;case 25:return null}throw Error(ne(156,e.tag))}function aW(t,e){switch(wE(e),e.tag){case 1:return un(e.type)&&Ty(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Bf(),gt(ln),gt(_r),OE(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return PE(e),null;case 13:if(gt(bt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ne(340));Mf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return gt(bt),null;case 4:return Bf(),null;case 10:return SE(e.type._context),null;case 22:case 23:return $E(),null;case 24:return null;default:return null}}var Q1=!1,Or=!1,cW=typeof WeakSet=="function"?WeakSet:Set,ge=null;function au(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){At(t,e,n)}else r.current=null}function Fb(t,e,r){try{r()}catch(n){At(t,e,n)}}var ZS=!1;function lW(t,e){if(Eb=Cy,t=q4(),xE(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=o+s),f!==i||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===s&&(a=o),d===i&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Cb={focusedElem:t,selectionRange:r},Cy=!1,ge=e;ge!==null;)if(e=ge,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ge=t;else for(;ge!==null;){e=ge;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var p=y.memoizedProps,b=y.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?p:ps(e.type,p),b);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var m=e.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(k){At(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,ge=t;break}ge=e.return}return y=ZS,ZS=!1,y}function bh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Fb(e,r,i)}s=s.next}while(s!==n)}}function Yg(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Ub(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function VT(t){var e=t.alternate;e!==null&&(t.alternate=null,VT(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ii],delete e[Zh],delete e[Ab],delete e[H$],delete e[G$])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function zT(t){return t.tag===5||t.tag===3||t.tag===4}function e6(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zT(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function $b(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Ay));else if(n!==4&&(t=t.child,t!==null))for($b(t,e,r),t=t.sibling;t!==null;)$b(t,e,r),t=t.sibling}function Wb(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Wb(t,e,r),t=t.sibling;t!==null;)Wb(t,e,r),t=t.sibling}var dr=null,Es=!1;function wo(t,e,r){for(r=r.child;r!==null;)HT(t,e,r),r=r.sibling}function HT(t,e,r){if(fi&&typeof fi.onCommitFiberUnmount=="function")try{fi.onCommitFiberUnmount(Vg,r)}catch{}switch(r.tag){case 5:Or||au(r,e);case 6:var n=dr,s=Es;dr=null,wo(t,e,r),dr=n,Es=s,dr!==null&&(Es?(t=dr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):dr.removeChild(r.stateNode));break;case 18:dr!==null&&(Es?(t=dr,r=r.stateNode,t.nodeType===8?Fm(t.parentNode,r):t.nodeType===1&&Fm(t,r),Kh(t)):Fm(dr,r.stateNode));break;case 4:n=dr,s=Es,dr=r.stateNode.containerInfo,Es=!0,wo(t,e,r),dr=n,Es=s;break;case 0:case 11:case 14:case 15:if(!Or&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Fb(r,e,o),s=s.next}while(s!==n)}wo(t,e,r);break;case 1:if(!Or&&(au(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){At(r,e,a)}wo(t,e,r);break;case 21:wo(t,e,r);break;case 22:r.mode&1?(Or=(n=Or)||r.memoizedState!==null,wo(t,e,r),Or=n):wo(t,e,r);break;default:wo(t,e,r)}}function t6(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new cW),e.forEach(function(n){var s=mW.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ls(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=_t()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fW(n/1960))-n,10t?16:t,aa===null)var n=!1;else{if(t=aa,aa=null,Fy=0,Ge&6)throw Error(ne(331));var s=Ge;for(Ge|=4,ge=t.current;ge!==null;){var i=ge,o=i.child;if(ge.flags&16){var a=i.deletions;if(a!==null){for(var c=0;c_t()-FE?Qc(t,0):jE|=r),fn(t,e)}function ZT(t,e){e===0&&(t.mode&1?(e=U1,U1<<=1,!(U1&130023424)&&(U1=4194304)):e=1);var r=qr();t=oo(t,e),t!==null&&(n1(t,e,r),fn(t,r))}function vW(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),ZT(t,r)}function mW(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(e),ZT(t,r)}var eI;eI=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ln.current)cn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return cn=!1,iW(t,e,r);cn=!!(t.flags&131072)}else cn=!1,vt&&e.flags&1048576&&sT(e,Oy,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;jp(t,e),t=e.pendingProps;var s=_f(e,_r.current);ku(e,r),s=NE(null,e,n,t,s,r);var i=_E();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,un(n)?(i=!0,Iy(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,TE(e),s.updater=Jg,e.stateNode=s,s._reactInternals=e,Nb(e,n,t,r),e=Db(null,e,n,!0,i,r)):(e.tag=0,vt&&i&&bE(e),$r(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(jp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=bW(n),t=ps(n,t),s){case 0:e=Mb(null,e,n,t,r);break e;case 1:e=JS(null,e,n,t,r);break e;case 11:e=KS(null,e,n,t,r);break e;case 14:e=QS(null,e,n,ps(n.type,t),r);break e}throw Error(ne(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:ps(n,s),Mb(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:ps(n,s),JS(t,e,n,s,r);case 3:e:{if(LT(e),t===null)throw Error(ne(387));n=e.pendingProps,i=e.memoizedState,s=i.element,uT(t,e),_y(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Lf(Error(ne(423)),e),e=YS(t,e,n,r,s);break e}else if(n!==s){s=Lf(Error(ne(424)),e),e=YS(t,e,n,r,s);break e}else for(Tn=pa(e.stateNode.containerInfo.firstChild),In=e,vt=!0,Cs=null,r=cT(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Mf(),n===s){e=ao(t,e,r);break e}$r(t,e,n,r)}e=e.child}return e;case 5:return fT(e),t===null&&Pb(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,kb(n,s)?o=null:i!==null&&kb(n,i)&&(e.flags|=32),BT(t,e),$r(t,e,o,r),e.child;case 6:return t===null&&Pb(e),null;case 13:return jT(t,e,r);case 4:return IE(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Df(e,null,n,r):$r(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:ps(n,s),KS(t,e,n,s,r);case 7:return $r(t,e,e.pendingProps,r),e.child;case 8:return $r(t,e,e.pendingProps.children,r),e.child;case 12:return $r(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,ft(Ry,n._currentValue),n._currentValue=o,i!==null)if(_s(i.value,o)){if(i.children===s.children&&!ln.current){e=ao(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Yi(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),Ob(i.return,r,e),a.lanes|=r;break}c=c.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),Ob(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}$r(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,ku(e,r),s=is(s),n=n(s),e.flags|=1,$r(t,e,n,r),e.child;case 14:return n=e.type,s=ps(n,e.pendingProps),s=ps(n.type,s),QS(t,e,n,s,r);case 15:return MT(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:ps(n,s),jp(t,e),e.tag=1,un(n)?(t=!0,Iy(e)):t=!1,ku(e,r),RT(e,n,s),Nb(e,n,s,r),Db(null,e,n,!0,t,r);case 19:return FT(t,e,r);case 22:return DT(t,e,r)}throw Error(ne(156,e.tag))};function tI(t,e){return I4(t,e)}function xW(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function es(t,e,r,n){return new xW(t,e,r,n)}function VE(t){return t=t.prototype,!(!t||!t.isReactComponent)}function bW(t){if(typeof t=="function")return VE(t)?1:0;if(t!=null){if(t=t.$$typeof,t===cE)return 11;if(t===lE)return 14}return 2}function ma(t,e){var r=t.alternate;return r===null?(r=es(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function $p(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")VE(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Xl:return Jc(r.children,s,i,e);case aE:o=8,s|=8;break;case rb:return t=es(12,r,e,s|2),t.elementType=rb,t.lanes=i,t;case nb:return t=es(13,r,e,s),t.elementType=nb,t.lanes=i,t;case sb:return t=es(19,r,e,s),t.elementType=sb,t.lanes=i,t;case f4:return Zg(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case l4:o=10;break e;case u4:o=9;break e;case cE:o=11;break e;case lE:o=14;break e;case No:o=16,n=null;break e}throw Error(ne(130,t==null?t:typeof t,""))}return e=es(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function Jc(t,e,r,n){return t=es(7,t,n,e),t.lanes=r,t}function Zg(t,e,r,n){return t=es(22,t,n,e),t.elementType=f4,t.lanes=r,t.stateNode={isHidden:!1},t}function qm(t,e,r){return t=es(6,t,null,e),t.lanes=r,t}function Km(t,e,r){return e=es(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function wW(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Im(0),this.expirationTimes=Im(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Im(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function zE(t,e,r,n,s,i,o,a,c){return t=new wW(t,e,r,a,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=es(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},TE(i),t}function EW(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iI)}catch(t){console.error(t)}}iI(),i4.exports=_n;var ja=i4.exports;const TW=q8(ja),oI=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),sv=x.createContext({});function IW(){return x.useContext(sv).visualElement}const iv=x.createContext(null),ov=typeof document<"u",Wy=ov?x.useLayoutEffect:x.useEffect,aI=x.createContext({strict:!1});function PW(t,e,r,n){const s=IW(),i=x.useContext(aI),o=x.useContext(iv),a=x.useContext(oI).reducedMotion,c=x.useRef();n=n||i.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:s,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return x.useInsertionEffect(()=>{l&&l.update(r,o)}),Wy(()=>{l&&l.render()}),x.useEffect(()=>{l&&l.updateFeatures()}),(window.HandoffAppearAnimations?Wy:x.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function lu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function OW(t,e,r){return x.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):lu(r)&&(r.current=n))},[e])}function o0(t){return typeof t=="string"||Array.isArray(t)}function av(t){return typeof t=="object"&&typeof t.start=="function"}const KE=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],QE=["initial",...KE];function cv(t){return av(t.animate)||QE.some(e=>o0(t[e]))}function cI(t){return!!(cv(t)||t.variants)}function RW(t,e){if(cv(t)){const{initial:r,animate:n}=t;return{initial:r===!1||o0(r)?r:void 0,animate:o0(n)?n:void 0}}return t.inherit!==!1?e:{}}function NW(t){const{initial:e,animate:r}=RW(t,x.useContext(sv));return x.useMemo(()=>({initial:e,animate:r}),[l6(e),l6(r)])}function l6(t){return Array.isArray(t)?t.join(" "):t}const u6={animation:["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},a0={};for(const t in u6)a0[t]={isEnabled:e=>u6[t].some(r=>!!e[r])};function _W(t){for(const e in t)a0[e]={...a0[e],...t[e]}}function JE(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ch={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let MW=1;function DW(){return JE(()=>{if(Ch.hasEverUpdated)return MW++})}const YE=x.createContext({}),lI=x.createContext({}),BW=Symbol.for("motionComponentSymbol");function LW({preloadedFeatures:t,createVisualElement:e,useRender:r,useVisualState:n,Component:s}){t&&_W(t);function i(a,c){let l;const u={...x.useContext(oI),...a,layoutId:jW(a)},{isStatic:f}=u,d=NW(a),h=f?void 0:DW(),y=n(a,f);if(!f&&ov){d.visualElement=PW(s,y,u,e);const p=x.useContext(lI),b=x.useContext(aI).strict;d.visualElement&&(l=d.visualElement.loadFeatures(u,b,t,h,p))}return x.createElement(sv.Provider,{value:d},l&&d.visualElement?x.createElement(l,{visualElement:d.visualElement,...u}):null,r(s,a,h,OW(y,d.visualElement,c),y,f,d.visualElement))}const o=x.forwardRef(i);return o[BW]=s,o}function jW({layoutId:t}){const e=x.useContext(YE).id;return e&&t!==void 0?e+"-"+t:t}function FW(t){function e(n,s={}){return LW(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const UW=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function XE(t){return typeof t!="string"||t.includes("-")?!1:!!(UW.indexOf(t)>-1||/[A-Z]/.test(t))}const Vy={};function $W(t){Object.assign(Vy,t)}const lv=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(lv);function uI(t,{layout:e,layoutId:r}){return Sl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Vy[t]||t==="opacity")}const hn=t=>!!(t&&t.getVelocity),WW={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},VW=lv.length;function zW(t,{enableHardwareAcceleration:e=!0,allowTransformNone:r=!0},n,s){let i="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(t),dI=fI("--"),qb=fI("var(--"),HW=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ff=(t,e,r)=>Math.min(Math.max(r,t),e),Al={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kh={...Al,transform:t=>Ff(0,1,t)},X1={...Al,default:1},Sh=t=>Math.round(t*1e5)/1e5,c0=/(-)?([\d]*\.?[\d])+/g,Kb=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,GW=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function a1(t){return typeof t=="string"}const c1=t=>({test:e=>a1(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Po=c1("deg"),hi=c1("%"),Oe=c1("px"),qW=c1("vh"),KW=c1("vw"),f6={...hi,parse:t=>hi.parse(t)/100,transform:t=>hi.transform(t*100)},d6={...Al,transform:Math.round},hI={borderWidth:Oe,borderTopWidth:Oe,borderRightWidth:Oe,borderBottomWidth:Oe,borderLeftWidth:Oe,borderRadius:Oe,radius:Oe,borderTopLeftRadius:Oe,borderTopRightRadius:Oe,borderBottomRightRadius:Oe,borderBottomLeftRadius:Oe,width:Oe,maxWidth:Oe,height:Oe,maxHeight:Oe,size:Oe,top:Oe,right:Oe,bottom:Oe,left:Oe,padding:Oe,paddingTop:Oe,paddingRight:Oe,paddingBottom:Oe,paddingLeft:Oe,margin:Oe,marginTop:Oe,marginRight:Oe,marginBottom:Oe,marginLeft:Oe,rotate:Po,rotateX:Po,rotateY:Po,rotateZ:Po,scale:X1,scaleX:X1,scaleY:X1,scaleZ:X1,skew:Po,skewX:Po,skewY:Po,distance:Oe,translateX:Oe,translateY:Oe,translateZ:Oe,x:Oe,y:Oe,z:Oe,perspective:Oe,transformPerspective:Oe,opacity:kh,originX:f6,originY:f6,originZ:Oe,zIndex:d6,fillOpacity:kh,strokeOpacity:kh,numOctaves:d6};function ZE(t,e,r,n){const{style:s,vars:i,transform:o,transformOrigin:a}=t;let c=!1,l=!1,u=!0;for(const f in e){const d=e[f];if(dI(f)){i[f]=d;continue}const h=hI[f],y=HW(d,h);if(Sl.has(f)){if(c=!0,o[f]=y,!u)continue;d!==(h.default||0)&&(u=!1)}else f.startsWith("origin")?(l=!0,a[f]=y):s[f]=y}if(e.transform||(c||n?s.transform=zW(t.transform,r,u,n):s.transform&&(s.transform="none")),l){const{originX:f="50%",originY:d="50%",originZ:h=0}=a;s.transformOrigin=`${f} ${d} ${h}`}}const eC=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pI(t,e,r){for(const n in e)!hn(e[n])&&!uI(n,r)&&(t[n]=e[n])}function QW({transformTemplate:t},e,r){return x.useMemo(()=>{const n=eC();return ZE(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function JW(t,e,r){const n=t.style||{},s={};return pI(s,n,t),Object.assign(s,QW(t,e,r)),t.transformValues?t.transformValues(s):s}function YW(t,e,r){const n={},s=JW(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const XW=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function zy(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||XW.has(t)}let yI=t=>!zy(t);function ZW(t){t&&(yI=e=>e.startsWith("on")?!zy(e):t(e))}try{ZW(require("@emotion/is-prop-valid").default)}catch{}function eV(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(yI(s)||r===!0&&zy(s)||!e&&!zy(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function h6(t,e,r){return typeof t=="string"?t:Oe.transform(e+r*t)}function tV(t,e,r){const n=h6(e,t.x,t.width),s=h6(r,t.y,t.height);return`${n} ${s}`}const rV={offset:"stroke-dashoffset",array:"stroke-dasharray"},nV={offset:"strokeDashoffset",array:"strokeDasharray"};function sV(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?rV:nV;t[i.offset]=Oe.transform(-n);const o=Oe.transform(e),a=Oe.transform(r);t[i.array]=`${o} ${a}`}function tC(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(ZE(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:y}=t;d.transform&&(y&&(h.transform=d.transform),delete d.transform),y&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=tV(y,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&sV(d,i,o,a,!1)}const gI=()=>({...eC(),attrs:{}}),rC=t=>typeof t=="string"&&t.toLowerCase()==="svg";function iV(t,e,r,n){const s=x.useMemo(()=>{const i=gI();return tC(i,e,{enableHardwareAcceleration:!1},rC(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};pI(i,t.style,t),s.style={...i,...s.style}}return s}function oV(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const l=(XE(r)?iV:YW)(n,o,a,r),f={...eV(n,typeof r=="string",t),...l,ref:i},{children:d}=n,h=x.useMemo(()=>hn(d)?d.get():d,[d]);return s&&(f["data-projection-id"]=s),x.createElement(r,{...f,children:h})}}const nC=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function vI(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const mI=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function xI(t,e,r,n){vI(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(mI.has(s)?s:nC(s),e.attrs[s])}function sC(t,e){const{style:r}=t,n={};for(const s in r)(hn(r[s])||e.style&&hn(e.style[s])||uI(s,t))&&(n[s]=r[s]);return n}function bI(t,e){const r=sC(t,e);for(const n in t)if(hn(t[n])||hn(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function iC(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Hy=t=>Array.isArray(t),aV=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),cV=t=>Hy(t)?t[t.length-1]||0:t;function Wp(t){const e=hn(t)?t.get():t;return aV(e)?e.toValue():e}function lV({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:uV(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const wI=t=>(e,r)=>{const n=x.useContext(sv),s=x.useContext(iv),i=()=>lV(t,e,n,s);return r?i():JE(i)};function uV(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Wp(i[d]);let{initial:o,animate:a}=t;const c=cv(t),l=cI(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!av(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const y=iC(t,h);if(!y)return;const{transitionEnd:p,transition:b,...g}=y;for(const v in g){let m=g[v];if(Array.isArray(m)){const k=u?m.length-1:0;m=m[k]}m!==null&&(s[v]=m)}for(const v in p)s[v]=p[v]}),s}const fV={useVisualState:wI({scrapeMotionValuesFromProps:bI,createRenderState:gI,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}tC(r,n,{enableHardwareAcceleration:!1},rC(e.tagName),t.transformTemplate),xI(e,r)}})},dV={useVisualState:wI({scrapeMotionValuesFromProps:sC,createRenderState:eC})};function hV(t,{forwardMotionProps:e=!1},r,n){return{...XE(t)?fV:dV,preloadedFeatures:r,useRender:oV(e),createVisualElement:n,Component:t}}function Ki(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}const EI=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function uv(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const pV=t=>e=>EI(e)&&t(e,uv(e));function Xi(t,e,r,n){return Ki(t,e,pV(r),n)}const yV=(t,e)=>r=>e(t(r)),xa=(...t)=>t.reduce(yV);function CI(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const p6=CI("dragHorizontal"),y6=CI("dragVertical");function kI(t){let e=!1;if(t==="y")e=y6();else if(t==="x")e=p6();else{const r=p6(),n=y6();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function SI(){const t=kI(!0);return t?(t(),!1):!0}class Fa{constructor(e){this.isMounted=!1,this.node=e}update(){}}function g6(t,e){const r="pointer"+(e?"enter":"leave"),n="onHover"+(e?"Start":"End"),s=(i,o)=>{if(i.type==="touch"||SI())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[n]&&a[n](i,o)};return Xi(t.current,r,s,{passive:!t.getProps()[n]})}class gV extends Fa{mount(){this.unmount=xa(g6(this.node,!0),g6(this.node,!1))}unmount(){}}class vV extends Fa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xa(Ki(this.node.current,"focus",()=>this.onFocus()),Ki(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const AI=(t,e)=>e?t===e?!0:AI(t,e.parentElement):!1,Os=t=>t;function Qm(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,uv(r))}class mV extends Fa{constructor(){super(...arguments),this.removeStartListeners=Os,this.removeEndListeners=Os,this.removeAccessibleListeners=Os,this.startPointerPress=(e,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),i=Xi(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:u}=this.node.getProps();AI(this.node.current,a.target)?l&&l(a,c):u&&u(a,c)},{passive:!(n.onTap||n.onPointerUp)}),o=Xi(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=xa(i,o),this.startPress(e,r)},this.startAccessiblePress=()=>{const e=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Qm("up",this.node.getProps().onTap)};this.removeEndListeners(),this.removeEndListeners=Ki(this.node.current,"keyup",o),Qm("down",(a,c)=>{this.startPress(a,c)})},r=Ki(this.node.current,"keydown",e),n=()=>{this.isPressing&&Qm("cancel",(i,o)=>this.cancelPress(i,o))},s=Ki(this.node.current,"blur",n);this.removeAccessibleListeners=xa(r,s)}}startPress(e,r){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&n(e,r)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!SI()}cancelPress(e,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&n(e,r)}mount(){const e=this.node.getProps(),r=Xi(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Ki(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xa(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Qb=new WeakMap,Jm=new WeakMap,xV=t=>{const e=Qb.get(t.target);e&&e(t)},bV=t=>{t.forEach(xV)};function wV({root:t,...e}){const r=t||document;Jm.has(r)||Jm.set(r,{});const n=Jm.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(bV,{root:t,...e})),n[s]}function EV(t,e,r){const n=wV(e);return Qb.set(t,r),n.observe(t),()=>{Qb.delete(t),n.unobserve(t)}}const CV={some:0,all:1};class kV extends Fa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}viewportFallback(){requestAnimationFrame(()=>{this.hasEnteredView=!0;const{onViewportEnter:e}=this.node.getProps();e&&e(null),this.node.animationState&&this.node.animationState.setActive("whileInView",!0)})}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:i,fallback:o=!0}=e;if(typeof IntersectionObserver>"u"){o&&this.viewportFallback();return}const a={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:CV[s]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=u?f:d;h&&h(l)};return EV(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:r}=this.node;["amount","margin","root"].some(SV(e,r))&&this.startObserver()}unmount(){}}function SV({viewport:t={}},{viewport:e={}}={}){return r=>t[r]!==e[r]}const AV={inView:{Feature:kV},tap:{Feature:mV},focus:{Feature:vV},hover:{Feature:gV}};function TI(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),IV=t=>/^0[^.\s]+$/.test(t),Zi={delta:0,timestamp:0},II=1/60*1e3,PV=typeof performance<"u"?()=>performance.now():()=>Date.now(),PI=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(PV()),II);function OV(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&s,d=f?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),f&&s&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=OV(()=>l0=!0),t),{}),Rr=l1.reduce((t,e)=>{const r=fv[e];return t[e]=(n,s=!1,i=!1)=>(l0||_V(),r.schedule(n,s,i)),t},{}),Ta=l1.reduce((t,e)=>(t[e]=fv[e].cancel,t),{}),Ym=l1.reduce((t,e)=>(t[e]=()=>fv[e].process(Zi),t),{}),NV=t=>fv[t].process(Zi),OI=t=>{l0=!1,Zi.delta=Jb?II:Math.max(Math.min(t-Zi.timestamp,RV),1),Zi.timestamp=t,Yb=!0,l1.forEach(NV),Yb=!1,l0&&(Jb=!1,PI(OI))},_V=()=>{l0=!0,Jb=!0,Yb||PI(OI)};function oC(t,e){t.indexOf(e)===-1&&t.push(e)}function aC(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class cC{constructor(){this.subscriptions=[]}add(e){return oC(this.subscriptions,e),()=>aC(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class DV{constructor(e,r={}){this.version="9.1.7",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=Zi;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Rr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Rr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=MV(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new cC);const n=this.events[e].add(r);return e==="change"?()=>{n(),Rr.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?lC(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Uf(t,e){return new DV(t,e)}const uC=(t,e)=>r=>!!(a1(r)&&GW.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),RI=(t,e,r)=>n=>{if(!a1(n))return n;const[s,i,o,a]=n.match(c0);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},BV=t=>Ff(0,255,t),Xm={...Al,transform:t=>Math.round(BV(t))},gc={test:uC("rgb","red"),parse:RI("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Xm.transform(t)+", "+Xm.transform(e)+", "+Xm.transform(r)+", "+Sh(kh.transform(n))+")"};function LV(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const Xb={test:uC("#"),parse:LV,transform:gc.transform},uu={test:uC("hsl","hue"),parse:RI("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+hi.transform(Sh(e))+", "+hi.transform(Sh(r))+", "+Sh(kh.transform(n))+")"},Ur={test:t=>gc.test(t)||Xb.test(t)||uu.test(t),parse:t=>gc.test(t)?gc.parse(t):uu.test(t)?uu.parse(t):Xb.parse(t),transform:t=>a1(t)?t:t.hasOwnProperty("red")?gc.transform(t):uu.transform(t)},NI="${c}",_I="${n}";function jV(t){var e,r;return isNaN(t)&&a1(t)&&(((e=t.match(c0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Kb))===null||r===void 0?void 0:r.length)||0)>0}function Gy(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(Kb);s&&(r=s.length,t=t.replace(Kb,NI),e.push(...s.map(Ur.parse)));const i=t.match(c0);return i&&(n=i.length,t=t.replace(c0,_I),e.push(...i.map(Al.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function MI(t){return Gy(t).values}function DI(t){const{values:e,numColors:r,tokenised:n}=Gy(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function UV(t){const e=MI(t);return DI(t)(e.map(FV))}const Ia={test:jV,parse:MI,createTransformer:DI,getAnimatableNone:UV},$V=new Set(["brightness","contrast","saturate","opacity"]);function WV(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(c0)||[];if(!n)return t;const s=r.replace(n,"");let i=$V.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const VV=/([a-z-]*)\(.*?\)/g,Zb={...Ia,getAnimatableNone:t=>{const e=t.match(VV);return e?e.map(WV).join(" "):t}},zV={...hI,color:Ur,backgroundColor:Ur,outlineColor:Ur,fill:Ur,stroke:Ur,borderColor:Ur,borderTopColor:Ur,borderRightColor:Ur,borderBottomColor:Ur,borderLeftColor:Ur,filter:Zb,WebkitFilter:Zb},fC=t=>zV[t];function dC(t,e){let r=fC(t);return r!==Zb&&(r=Ia),r.getAnimatableNone?r.getAnimatableNone(e):void 0}const BI=t=>e=>e.test(t),HV={test:t=>t==="auto",parse:t=>t},LI=[Al,Oe,hi,Po,KW,qW,HV],jd=t=>LI.find(BI(t)),GV=[...LI,Ur,Ia],qV=t=>GV.find(BI(t));function KV(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function QV(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function dv(t,e,r){const n=t.getProps();return iC(n,e,r!==void 0?r:n.custom,KV(t),QV(t))}function JV(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Uf(r))}function YV(t,e){const r=dv(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=cV(i[o]);JV(t,o,a)}}function XV(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,nz={current:!1},hC=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pC=t=>e=>1-t(1-e),yC=t=>t*t,sz=pC(yC),gC=hC(yC),Et=(t,e,r)=>-r*t+r*e+t;function Zm(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function iz({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;s=Zm(c,a,t+1/3),i=Zm(c,a,t),o=Zm(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const ex=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},oz=[Xb,gc,uu],az=t=>oz.find(e=>e.test(t));function v6(t){const e=az(t);let r=e.parse(t);return e===uu&&(r=iz(r)),r}const jI=(t,e)=>{const r=v6(t),n=v6(e),s={...r};return i=>(s.red=ex(r.red,n.red,i),s.green=ex(r.green,n.green,i),s.blue=ex(r.blue,n.blue,i),s.alpha=Et(r.alpha,n.alpha,i),gc.transform(s))};function FI(t,e){return typeof t=="number"?r=>Et(t,e,r):Ur.test(t)?jI(t,e):$I(t,e)}const UI=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>FI(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=FI(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},$I=(t,e)=>{const r=Ia.createTransformer(e),n=Gy(t),s=Gy(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?xa(UI(n.values,s.values),r):o=>`${o>0?e:t}`},f0=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},m6=(t,e)=>r=>Et(t,e,r);function lz(t){return typeof t=="number"?m6:typeof t=="string"?Ur.test(t)?jI:$I:Array.isArray(t)?UI:typeof t=="object"?cz:m6}function uz(t,e,r){const n=[],s=r||lz(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=uz(e,n,s),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Ff(t[0],t[i-1],l)):c}function fz(t,e){const r=t[t.length-1];for(let n=1;n<=e;n++){const s=f0(0,e,n);t.push(Et(r,1,s))}}function dz(t){const e=[0];return fz(e,t.length-1),e}function hz(t,e){return t.map(r=>r*e)}const VI=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,pz=1e-7,yz=12;function gz(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=VI(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>pz&&++agz(i,0,1,t,r);return i=>i===0||i===1?i:VI(s(i),e,n)}const HI=t=>1-Math.sin(Math.acos(t)),vC=pC(HI),vz=hC(vC),GI=zI(.33,1.53,.69,.99),mC=pC(GI),mz=hC(mC),xz=t=>(t*=2)<1?.5*mC(t):.5*(2-Math.pow(2,-10*(t-1))),x6={linear:Os,easeIn:yC,easeInOut:gC,easeOut:sz,circIn:HI,circInOut:vz,circOut:vC,backIn:mC,backInOut:mz,backOut:GI,anticipate:xz},b6=t=>{if(Array.isArray(t)){u0(t.length===4);const[e,r,n,s]=t;return zI(e,r,n,s)}else if(typeof t=="string")return u0(x6[t]!==void 0),x6[t];return t},bz=t=>Array.isArray(t)&&typeof t[0]!="number";function wz(t,e){return t.map(()=>e||gC).splice(0,t.length-1)}function ew({keyframes:t,ease:e=gC,times:r,duration:n=300}){t=[...t];const s=bz(e)?e.map(b6):b6(e),i={done:!1,value:t[0]},o=hz(r&&r.length===t.length?r:dz(t),n);function a(){return WI(o,t,{ease:Array.isArray(s)?s:wz(t,s)})}let c=a();return{next:l=>(i.value=c(l),i.done=l>=n,i),flipTarget:()=>{t.reverse(),c=a()}}}const tx=.001,Ez=.01,Cz=10,kz=.05,Sz=1;function Az({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i,o=1-e;o=Ff(kz,Sz,o),t=Ff(Ez,Cz,t/1e3),o<1?(s=l=>{const u=l*o,f=u*t,d=u-r,h=tw(l,o),y=Math.exp(-f);return tx-d/h*y},i=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,y=Math.exp(-f),p=tw(Math.pow(l,2),o);return(-s(l)+tx>0?-1:1)*((d-h)*y)/p}):(s=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-tx+u*f},i=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=Iz(s,i,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const Tz=12;function Iz(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function Rz(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!w6(t,Oz)&&w6(t,Pz)){const r=Az(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Nz=5;function qI({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=Rz(n);let h=_z,y=u?-(u/1e3):0;const p=c/(2*Math.sqrt(a*l));function b(){const g=i-s,v=Math.sqrt(a/l)/1e3,m=Math.abs(g)<5;if(r||(r=m?.01:2),e||(e=m?.005:.5),p<1){const k=tw(v,p);h=A=>{const P=Math.exp(-p*v*A);return i-P*((y+p*v*g)/k*Math.sin(k*A)+g*Math.cos(k*A))}}else if(p===1)h=k=>i-Math.exp(-v*k)*(g+(y+v*g)*k);else{const k=v*Math.sqrt(p*p-1);h=A=>{const P=Math.exp(-p*v*A),R=Math.min(k*A,300);return i-P*((y+p*v*g)*Math.sinh(R)+k*g*Math.cosh(R))/k}}}return b(),{next:g=>{const v=h(g);if(d)o.done=g>=f;else{let m=y;if(g!==0)if(p<1){const P=Math.max(0,g-Nz);m=lC(v-h(P),g-P)}else m=0;const k=Math.abs(m)<=r,A=Math.abs(i-v)<=e;o.done=k&&A}return o.value=o.done?i:v,o},flipTarget:()=>{y=-y,[s,i]=[i,s],b()}}}qI.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const _z=t=>0;function Mz({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let c=r*e;const l=o+c,u=i===void 0?l:i(l);return u!==l&&(c=u-o),{next:f=>{const d=-c*Math.exp(-f/n);return a.done=!(d>s||d<-s),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const Dz={decay:Mz,keyframes:ew,tween:ew,spring:qI};function KI(t,e,r=0){return t-e-r}function Bz(t,e=0,r=0,n=!0){return n?KI(e+-t,e,r):e-(t-e)+r}function Lz(t,e,r,n){return n?t>=e+r:t<=-r}const jz=t=>{const e=({delta:r})=>t(r);return{start:()=>Rr.update(e,!0),stop:()=>Ta.update(e)}};function Ky({duration:t,driver:e=jz,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:d,type:h="keyframes",...y}){const p=r;let b,g=0,v=t,m=!1,k=!0,A;const P=Dz[o.length>2?"keyframes":h]||ew,R=o[0],N=o[o.length-1];let V={done:!1,value:R};const{needsInterpolation:F}=P;F&&F(R,N)&&(A=WI([0,100],[R,N],{clamp:!1}),o=[0,100]);const X=P({...y,duration:t,keyframes:o});function re(){g++,s==="reverse"?(k=g%2===0,r=Bz(r,v,i,k)):(r=KI(r,v,i),s==="mirror"&&X.flipTarget()),m=!1,f&&f()}function le(){b&&b.stop(),u&&u()}function ee(G){k||(G=-G),r+=G,m||(V=X.next(Math.max(0,r)),A&&(V.value=A(V.value)),m=k?V.done:r<=0),d&&d(V.value),m&&(g===0&&(v=v!==void 0?v:r),g{l&&l(),b&&b.stop()},set currentTime(G){r=p,ee(G)},sample:G=>{r=p;const Z=t&&typeof t=="number"?Math.max(t*.5,50):50;let E=0;for(ee(0);E<=G;){const S=G-E;ee(Math.min(S,Z)),E+=Z}return V}}}function Fz(t){return!t||Array.isArray(t)||typeof t=="string"&&QI[t]}const eh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,QI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:eh([0,.65,.55,1]),circOut:eh([.55,0,1,.45]),backIn:eh([.31,.01,.66,-.59]),backOut:eh([.33,1.53,.69,.99])};function Uz(t){if(t)return Array.isArray(t)?eh(t):QI[t]}function $z(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:s,easing:Uz(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const E6={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},rx={},JI={};for(const t in E6)JI[t]=()=>(rx[t]===void 0&&(rx[t]=E6[t]()),rx[t]);function Wz(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Vz=new Set(["opacity","clipPath","filter","transform"]),Z1=10;function zz(t,e,{onUpdate:r,onComplete:n,...s}){if(!(JI.waapi()&&Vz.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=s;if(s.type==="spring"||!Fz(s.ease)){if(s.repeat===1/0)return;const f=Ky({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let y=0;for(;!d.done&&y<2e4;)d=f.sample(y),h.push(d.value),y+=Z1;o=h,a=y-Z1,l="linear"}const u=$z(t.owner.current,e,o,{...s,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(Wz(o,s)),Rr.update(()=>u.cancel()),n&&n()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const d=Ky({...s,autoplay:!1});t.setWithVelocity(d.sample(f-Z1).value,d.sample(f).value,Z1)}Rr.update(()=>u.cancel())}}}function YI(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ta.read(n),t(i-e))};return Rr.read(n,!0),()=>Ta.read(n)}function Hz({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:YI(s,-e)}:s()}function Gz({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){const y=t[0];let p;function b(k){return r!==void 0&&kn}function g(k){return r===void 0?n:n===void 0||Math.abs(r-k){f&&f(A),k.onUpdate&&k.onUpdate(A)},onComplete:d,onStop:h})}function m(k){v({type:"spring",stiffness:o,damping:a,restDelta:c,...k})}if(b(y))m({velocity:e,keyframes:[y,g(y)]});else{let k=s*e+y;typeof l<"u"&&(k=l(k));const A=g(k),P=A===r?-1:1;let R,N;const V=F=>{R=N,N=F,e=lC(F-R,Zi.delta),(P===1&&F>A||P===-1&&Fp&&p.stop()}}const qz={type:"spring",stiffness:500,damping:25,restSpeed:10},Kz=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Qz={type:"keyframes",duration:.8},Jz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yz=(t,{keyframes:e})=>e.length>2?Qz:Sl.has(t)?t.startsWith("scale")?Kz(e[1]):qz:Jz,rw=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Ia.test(e)&&!e.startsWith("url("));function Xz({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function C6(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function k6(t){return typeof t=="number"?0:dC("",t)}function XI(t,e){return t[e]||t.default||t}function Zz(t,e,r,n){const s=rw(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=dC(e,r):C6(i)&&typeof r=="string"?i=k6(r):!Array.isArray(r)&&C6(r)&&typeof i=="string"&&(r=k6(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const xC=(t,e,r,n={})=>s=>{const i=XI(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Vp(o);const c=Zz(e,t,r,i),l=c[0],u=c[c.length-1],f=rw(t,l),d=rw(t,u);let h={keyframes:c,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:y=>{e.set(y),i.onUpdate&&i.onUpdate(y)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!f||!d||nz.current||i.type===!1)return Hz(h);if(i.type==="inertia")return Gz(h);if(Xz(i)||(h={...h,...Yz(t,h)}),h.duration&&(h.duration=Vp(h.duration)),h.repeatDelay&&(h.repeatDelay=Vp(h.repeatDelay)),e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=zz(e,t,h);if(y)return y}return Ky(h)};function eH(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>nw(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=nw(t,e,r);else{const s=typeof e=="function"?dv(t,e,r.custom):e;n=ZI(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function nw(t,e,r={}){const n=dv(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const i=n?()=>ZI(t,n,r):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return tH(t,e,l+c,u,f,r)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[i,o]:[o,i];return c().then(l)}else return Promise.all([i(),o(r.delay)])}function ZI(t,e,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:i=t.getDefaultTransition(),transitionEnd:o,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(i=n);const l=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const f in a){const d=t.getValue(f),h=a[f];if(!d||h===void 0||u&&nH(u,f))continue;const y={delay:r,elapsed:0,...i};if(window.HandoffAppearAnimations&&!d.hasAnimated){const b=t.getProps()[rz];b&&(y.elapsed=window.HandoffAppearAnimations(b,f,d,Rr))}let p=d.start(xC(f,d,h,t.shouldReduceMotion&&Sl.has(f)?{type:!1}:y));qy(c)&&(c.add(f),p=p.then(()=>c.remove(f))),l.push(p)}return Promise.all(l).then(()=>{o&&YV(t,o)})}function tH(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,c=s===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(rH).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(nw(l,e,{...i,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function rH(t,e){return t.sortNodePosition(e)}function nH({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const sH=[...KE].reverse(),iH=KE.length;function oH(t){return e=>Promise.all(e.map(({animation:r,options:n})=>eH(t,r,n)))}function aH(t){let e=oH(t);const r=lH();let n=!0;const s=(c,l)=>{const u=dv(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function i(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let y={},p=1/0;for(let g=0;gp&&A;const F=Array.isArray(k)?k:[k];let X=F.reduce(s,{});P===!1&&(X={});const{prevResolvedValues:re={}}=m,le={...re,...X},ee=B=>{V=!0,h.delete(B),m.needsAnimating[B]=!0};for(const B in le){const G=X[B],Z=re[B];y.hasOwnProperty(B)||(G!==Z?Hy(G)&&Hy(Z)?!TI(G,Z)||N?ee(B):m.protectedKeys[B]=!0:G!==void 0?ee(B):h.add(B):G!==void 0&&h.has(B)?ee(B):m.protectedKeys[B]=!0)}m.prevProp=k,m.prevResolvedValues=X,m.isActive&&(y={...y,...X}),n&&t.blockInitialAnimation&&(V=!1),V&&!R&&d.push(...F.map(B=>({animation:B,options:{type:v,...c}})))}if(h.size){const g={};h.forEach(v=>{const m=t.getBaseTarget(v);m!==void 0&&(g[v]=m)}),d.push({animation:g})}let b=!!d.length;return n&&u.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var y;return(y=h.animationState)===null||y===void 0?void 0:y.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function cH(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!TI(e,t):!1}function Qa(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function lH(){return{animate:Qa(!0),whileInView:Qa(),whileHover:Qa(),whileTap:Qa(),whileDrag:Qa(),whileFocus:Qa(),exit:Qa()}}class uH extends Fa{constructor(e){super(e),e.animationState||(e.animationState=aH(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),av(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:r}=this.node.prevProps||{};e!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let fH=0;class dH extends Fa{constructor(){super(...arguments),this.id=fH++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e,{custom:n??this.node.getProps().custom});r&&!e&&i.then(()=>r(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const hH={animation:{Feature:uH},exit:{Feature:dH}},S6=(t,e)=>Math.abs(t-e);function pH(t,e){const r=S6(t.x,e.x),n=S6(t.y,e.y);return Math.sqrt(r**2+n**2)}class eP{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=sx(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=pH(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=l,{timestamp:h}=Zi;this.history.push({...d,timestamp:h});const{onStart:y,onMove:p}=this.handlers;u||(y&&y(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=nx(u,this.transformPagePoint),Rr.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=sx(l.type==="pointercancel"?this.lastMoveEventInfo:nx(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,h),d&&d(l,h)},!EI(e))return;this.handlers=r,this.transformPagePoint=n;const s=uv(e),i=nx(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=Zi;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,sx(i,this.history)),this.removeListeners=xa(Xi(window,"pointermove",this.handlePointerMove),Xi(window,"pointerup",this.handlePointerUp),Xi(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ta.update(this.updatePoint)}}function nx(t,e){return e?{point:e(t.point)}:t}function A6(t,e){return{x:t.x-e.x,y:t.y-e.y}}function sx({point:t},e){return{point:t,delta:A6(t,tP(e)),offset:A6(t,yH(e)),velocity:gH(e,.1)}}function yH(t){return t[0]}function tP(t){return t[t.length-1]}function gH(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=tP(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Vp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Nn(t){return t.max-t.min}function sw(t,e=0,r=.01){return Math.abs(t-e)<=r}function T6(t,e,r,n=.5){t.origin=n,t.originPoint=Et(e.min,e.max,t.origin),t.scale=Nn(r)/Nn(e),(sw(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Et(r.min,r.max,t.origin)-t.originPoint,(sw(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ah(t,e,r,n){T6(t.x,e.x,r.x,n?n.originX:void 0),T6(t.y,e.y,r.y,n?n.originY:void 0)}function I6(t,e,r){t.min=r.min+e.min,t.max=t.min+Nn(e)}function vH(t,e,r){I6(t.x,e.x,r.x),I6(t.y,e.y,r.y)}function P6(t,e,r){t.min=e.min-r.min,t.max=t.min+Nn(e)}function Th(t,e,r){P6(t.x,e.x,r.x),P6(t.y,e.y,r.y)}function mH(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?Et(r,t,n.max):Math.min(t,r)),t}function O6(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function xH(t,{top:e,left:r,bottom:n,right:s}){return{x:O6(t.x,r,s),y:O6(t.y,e,n)}}function R6(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=f0(e.min,e.max-n,t.min):n>s&&(r=f0(t.min,t.max-s,e.min)),Ff(0,1,r)}function EH(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const iw=.35;function CH(t=iw){return t===!1?t=0:t===!0&&(t=iw),{x:N6(t,"left","right"),y:N6(t,"top","bottom")}}function N6(t,e,r){return{min:_6(t,e),max:_6(t,r)}}function _6(t,e){return typeof t=="number"?t:t[e]||0}const M6=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ih=()=>({x:M6(),y:M6()}),D6=()=>({min:0,max:0}),Lt=()=>({x:D6(),y:D6()});function Gs(t){return[t("x"),t("y")]}function rP({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function kH({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function SH(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function ix(t){return t===void 0||t===1}function ow({scale:t,scaleX:e,scaleY:r}){return!ix(t)||!ix(e)||!ix(r)}function tc(t){return ow(t)||nP(t)||t.z||t.rotate||t.rotateX||t.rotateY}function nP(t){return B6(t.x)||B6(t.y)}function B6(t){return t&&t!=="0%"}function Qy(t,e,r){const n=t-r,s=e*n;return r+s}function L6(t,e,r,n,s){return s!==void 0&&(t=Qy(t,s,n)),Qy(t,r,n)+e}function aw(t,e=0,r=1,n,s){t.min=L6(t.min,e,r,n,s),t.max=L6(t.max,e,r,n,s)}function sP(t,{x:e,y:r}){aw(t.x,e.translate,e.scale,e.originPoint),aw(t.y,r.translate,r.scale,r.originPoint)}function AH(t,e,r,n=!1){const s=r.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function Mo(t,e){t.min=t.min+e,t.max=t.max+e}function F6(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=Et(t.min,t.max,i);aw(t,e[r],e[n],o,e.scale)}const TH=["x","scaleX","originX"],IH=["y","scaleY","originY"];function fu(t,e){F6(t.x,e,TH),F6(t.y,e,IH)}function iP(t,e){return rP(SH(t.getBoundingClientRect(),e))}function PH(t,e,r){const n=iP(t,r),{scroll:s}=e;return s&&(Mo(n.x,s.offset.x),Mo(n.y,s.offset.y)),n}const OH=new WeakMap;class RH{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const s=c=>{this.stopAnimation(),r&&this.snapToCursor(uv(c,"page").point)},i=(c,l)=>{const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();if(u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=kI(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gs(y=>{let p=this.getAxisMotionValue(y).get()||0;if(hi.test(p)){const{projection:b}=this.visualElement;if(b&&b.layout){const g=b.layout.layoutBox[y];g&&(p=Nn(g)*(parseFloat(p)/100))}}this.originPoint[y]=p}),d&&d(c,l);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},o=(c,l)=>{const{dragPropagation:u,dragDirectionLock:f,onDirectionLock:d,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:y}=l;if(f&&this.currentDirection===null){this.currentDirection=NH(y),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",l.point,y),this.updateAxis("y",l.point,y),this.visualElement.render(),h&&h(c,l)},a=(c,l)=>this.stop(c,l);this.panSession=new eP(e,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&i(e,r)}cancel(){this.isDragging=!1;const{projection:e,animationState:r}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!ep(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=mH(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&lu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=xH(n.layoutBox,e):this.constraints=!1,this.elastic=CH(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Gs(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=EH(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!lu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=PH(n,s.root,this.visualElement.getTransformPagePoint());let o=bH(s.layout.layoutBox,i);if(r){const a=r(kH(o));this.hasMutatedConstraints=!!a,a&&(o=rP(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=Gs(u=>{if(!ep(u,r,this.currentDirection))return;let f=c&&c[u]||{};o&&(f={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,y={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,y)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(xC(e,n,0,r))}stopAnimation(){Gs(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const r="_drag"+e.toUpperCase(),n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Gs(r=>{const{drag:n}=this.getProps();if(!ep(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-Et(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!lu(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Gs(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();s[o]=wH({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Gs(o=>{if(!ep(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(Et(c,l,s[o]))})}addListeners(){if(!this.visualElement.current)return;OH.set(this.visualElement,this);const e=this.visualElement.current,r=Xi(e,"pointerdown",c=>{const{drag:l,dragListener:u=!0}=this.getProps();l&&u&&this.start(c)}),n=()=>{const{dragConstraints:c}=this.getProps();lu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),n();const o=Ki(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(Gs(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{o(),r(),i(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=iw,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function ep(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function NH(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}class _H extends Fa{constructor(e){super(e),this.removeGroupControls=Os,this.removeListeners=Os,this.controls=new RH(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Os}unmount(){this.removeGroupControls(),this.removeListeners()}}class MH extends Fa{constructor(){super(...arguments),this.removePointerDownListener=Os}onPointerDown(e){this.session=new eP(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:e,onStart:r,onMove:n,onEnd:(i,o)=>{delete this.session,s&&s(i,o)}}}mount(){this.removePointerDownListener=Xi(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function DH(){const t=x.useContext(iv);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=x.useId();return x.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function U6(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Fd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Oe.test(t))t=parseFloat(t);else return t;const r=U6(t,e.target.x),n=U6(t,e.target.y);return`${r}% ${n}%`}},oP=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function BH(t){const e=oP.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function cw(t,e,r=1){const[n,s]=BH(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():qb(s)?cw(s,e,r+1):s}function LH(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!qb(i))return;const o=cw(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!qb(i))continue;const o=cw(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const $6="_$css",jH={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(oP,h=>(i.push(h),$6)));const o=Ia.parse(t);if(o.length>5)return n;const a=Ia.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,u=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=Et(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let d=a(o);if(s){let h=0;d=d.replace($6,()=>{const y=i[h];return h++,y})}return d}};class FH extends Vr.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;$W(UH),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ch.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Rr.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=e;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function aP(t){const[e,r]=DH(),n=x.useContext(YE);return Vr.createElement(FH,{...t,layoutGroup:n,switchLayoutGroup:x.useContext(lI),isPresent:e,safeToRemove:r})}const UH={borderRadius:{...Fd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fd,borderTopRightRadius:Fd,borderBottomLeftRadius:Fd,borderBottomRightRadius:Fd,boxShadow:jH};function $H(t,e,r={}){const n=hn(t)?t:Uf(t);return n.start(xC("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const cP=["TopLeft","TopRight","BottomLeft","BottomRight"],WH=cP.length,W6=t=>typeof t=="string"?parseFloat(t):t,V6=t=>typeof t=="number"||Oe.test(t);function VH(t,e,r,n,s,i){s?(t.opacity=Et(0,r.opacity!==void 0?r.opacity:1,zH(n)),t.opacityExit=Et(e.opacity!==void 0?e.opacity:1,0,HH(n))):i&&(t.opacity=Et(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(f0(t,e,n))}function H6(t,e){t.min=e.min,t.max=e.max}function Dn(t,e){H6(t.x,e.x),H6(t.y,e.y)}function G6(t,e,r,n,s){return t-=e,t=Qy(t,1/r,n),s!==void 0&&(t=Qy(t,1/s,n)),t}function GH(t,e=0,r=1,n=.5,s,i=t,o=t){if(hi.test(e)&&(e=parseFloat(e),e=Et(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Et(i.min,i.max,n);t===i&&(a-=e),t.min=G6(t.min,e,r,a,s),t.max=G6(t.max,e,r,a,s)}function q6(t,e,[r,n,s],i,o){GH(t,e[r],e[n],e[s],e.scale,i,o)}const qH=["x","scaleX","originX"],KH=["y","scaleY","originY"];function K6(t,e,r,n){q6(t.x,e,qH,r?r.x:void 0,n?n.x:void 0),q6(t.y,e,KH,r?r.y:void 0,n?n.y:void 0)}function Q6(t){return t.translate===0&&t.scale===1}function uP(t){return Q6(t.x)&&Q6(t.y)}function lw(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function J6(t){return Nn(t.x)/Nn(t.y)}class QH{constructor(){this.members=[]}add(e){oC(this.members,e),e.scheduleRender()}remove(e){if(aC(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,r&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:r,resumingFrom:n}=e;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Y6(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const JH=(t,e)=>t.depth-e.depth;class YH{constructor(){this.children=[],this.isDirty=!1}add(e){oC(this.children,e),this.isDirty=!0}remove(e){aC(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(JH),this.isDirty=!1,this.children.forEach(e)}}function XH(t){window.MotionDebug&&window.MotionDebug.record(t)}const X6=["","X","Y","Z"],Z6=1e3;let ZH=0;const rc={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function fP({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=ZH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{rc.totalNodes=rc.resolvedTargetDeltas=rc.recalculatedProjection=0,this.nodes.forEach(rG),this.nodes.forEach(oG),this.nodes.forEach(aG),this.nodes.forEach(nG),XH(rc)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=YI(d,250),Ch.hasAnimatedSinceResize&&(Ch.hasAnimatedSinceResize=!1,this.nodes.forEach(tA))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||l)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||dG,{onLayoutAnimationStart:b,onLayoutAnimationComplete:g}=u.getProps(),v=!this.targetLayout||!lw(this.targetLayout,y)||h,m=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||m||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,m);const k={...XI(p,"layout"),onPlay:b,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else!d&&this.animationProgress===0&&tA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ta.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(cG),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const A=k/1e3;rA(f.x,o.x,A),rA(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Th(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uG(this.relativeTarget,this.relativeTargetOrigin,d,A),m&&lw(this.relativeTarget,m)&&(this.isProjectionDirty=!1),m||(m=Lt()),Dn(m,this.relativeTarget)),p&&(this.animationValues=u,VH(u,l,this.latestValues,A,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ta.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rr.update(()=>{Ch.hasAnimatedSinceResize=!0,this.currentAnimation=$H(0,Z6,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Z6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&dP(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Lt();const f=Nn(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=Nn(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}Dn(a,c),fu(a,u),Ah(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new QH),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(eA),this.root.sharedNodes.clear()}}}function eG(t){t.updateLayout()}function tG(t){var e;const r=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&r&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=r.source!==t.layout.source;i==="size"?Gs(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Nn(d);d.min=n[f].min,d.max=d.min+h}):dP(i,r.layoutBox,n)&&Gs(f=>{const d=o?r.measuredBox[f]:r.layoutBox[f],h=Nn(n[f]);d.max=d.min+h});const a=Ih();Ah(a,n,r.layoutBox);const c=Ih();o?Ah(c,t.applyTransform(s,!0),r.measuredBox):Ah(c,n,r.layoutBox);const l=!uP(a);let u=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const y=Lt();Th(y,r.layoutBox,d.layoutBox);const p=Lt();Th(p,n,h.layoutBox),lw(y,p)||(u=!0),f.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=y,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function rG(t){rc.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nG(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function sG(t){t.clearSnapshot()}function eA(t){t.clearMeasurements()}function iG(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function tA(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function oG(t){t.resolveTargetDelta()}function aG(t){t.calcProjection()}function cG(t){t.resetRotation()}function lG(t){t.removeLeadSnapshot()}function rA(t,e,r){t.translate=Et(e.translate,0,r),t.scale=Et(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function nA(t,e,r,n){t.min=Et(e.min,r.min,n),t.max=Et(e.max,r.max,n)}function uG(t,e,r,n){nA(t.x,e.x,r.x,n),nA(t.y,e.y,r.y,n)}function fG(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const dG={duration:.45,ease:[.4,0,.1,1]};function hG(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(t.path[i].instance){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function sA(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function pG(t){sA(t.x),sA(t.y)}function dP(t,e,r){return t==="position"||t==="preserve-aspect"&&!sw(J6(e),J6(r),.2)}const yG=fP({attachResizeListener:(t,e)=>Ki(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ox={current:void 0},hP=fP({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ox.current){const t=new yG(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),ox.current=t}return ox.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),gG={pan:{Feature:MH},drag:{Feature:_H,ProjectionNode:hP,MeasureLayout:aP}},vG=new Set(["width","height","top","left","right","bottom","x","y"]),pP=t=>vG.has(t),mG=t=>Object.keys(t).some(pP),iA=t=>t===Al||t===Oe,oA=(t,e)=>parseFloat(t.split(", ")[e]),aA=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return oA(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?oA(i[1],t):0}},xG=new Set(["x","y","z"]),bG=lv.filter(t=>!xG.has(t));function wG(t){const e=[];return bG.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const cA={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:aA(4,13),y:aA(5,14)},EG=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=cA[l](n,i)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=cA[l](c,i)}),t},CG=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(pP);let i=[],o=!1;const a=[];if(s.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=jd(u);const d=e[c];let h;if(Hy(d)){const y=d.length,p=d[0]===null?1:0;u=d[p],f=jd(u);for(let b=p;b=0?window.pageYOffset:null,l=EG(e,t,a);return i.length&&i.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),ov&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function kG(t,e,r,n){return mG(e)?CG(t,e,r,n):{target:e,transitionEnd:n}}const SG=(t,e,r,n)=>{const s=LH(t,e,n);return e=s.target,n=s.transitionEnd,kG(t,e,r,n)},uw={current:null},yP={current:!1};function AG(){if(yP.current=!0,!!ov)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>uw.current=t.matches;t.addListener(e),e()}else uw.current=!1}function TG(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(hn(i))t.addValue(s,i),qy(n)&&n.add(s);else if(hn(o))t.addValue(s,Uf(i,{owner:t})),qy(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Uf(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const gP=Object.keys(a0),IG=gP.length,lA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],PG=QE.length;class OG{constructor({parent:e,props:r,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Rr.render(this.render,!1,!0);const{latestValues:a,renderState:c}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=r,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=cv(r),this.isVariantNode=cI(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(r,{});for(const f in u){const d=u[f];a[f]!==void 0&&hn(d)&&(d.set(a[f],!1),qy(l)&&l.add(f))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),yP.current||AG(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uw.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ta.update(this.notifyUpdate),Ta.render(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,r){const n=Sl.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Rr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o){let a,c;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:y})}return c}updateFeatures(){for(const e in this.features){const r=this.features[e];r.isMounted?r.update(this.props,this.prevProps):(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}update(e,r){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;nr.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){this.values.delete(e);const r=this.valueSubscriptions.get(e);r&&(r(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Uf(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,s=typeof n=="string"||typeof n=="object"?(r=iC(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!hn(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new cC),this.events[e].add(r)}notify(e,...r){this.events[e]&&this.events[e].notify(...r)}}class vP extends OG{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){return e.style?e.style[r]:void 0}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:s},i){let o=ez(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){XV(this,n,o);const a=SG(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function RG(t){return window.getComputedStyle(t)}class NG extends vP{readValueFromInstance(e,r){if(Sl.has(r)){const n=fC(r);return n&&n.default||0}else{const n=RG(e),s=(dI(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return iP(e,r)}build(e,r,n,s){ZE(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return sC(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;hn(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){vI(e,r,n,s)}}class _G extends vP{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){if(Sl.has(r)){const n=fC(r);return n&&n.default||0}return r=mI.has(r)?r:nC(r),e.getAttribute(r)}measureInstanceViewportBox(){return Lt()}scrapeMotionValuesFromProps(e,r){return bI(e,r)}build(e,r,n,s){tC(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){xI(e,r,n,s)}mount(e){this.isSVGTag=rC(e.tagName),super.mount(e)}}const MG=(t,e)=>XE(t)?new _G(e,{enableHardwareAcceleration:!1}):new NG(e,{enableHardwareAcceleration:!0}),DG={layout:{ProjectionNode:hP,MeasureLayout:aP}},BG={...hH,...AV,...gG,...DG},Au=FW((t,e)=>hV(t,e,BG,MG));function mP(){const t=x.useRef(!1);return Wy(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function LG(){const t=mP(),[e,r]=x.useState(0),n=x.useCallback(()=>{t.current&&r(e+1)},[e]);return[x.useCallback(()=>Rr.postRender(n),[n]),e]}class jG extends x.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function FG({children:t,isPresent:e}){const r=x.useId(),n=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0});return x.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:c}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` - [data-motion-pop-id="${r}"] { - position: absolute !important; - width: ${i}px !important; - height: ${o}px !important; - top: ${a}px !important; - left: ${c}px !important; - } - `),()=>{document.head.removeChild(l)}},[e]),x.createElement(jG,{isPresent:e,childRef:n,sizeRef:s},x.cloneElement(t,{ref:n}))}const ax=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=JE(UG),c=x.useId(),l=x.useMemo(()=>({id:c,initial:e,isPresent:r,custom:s,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),i?void 0:[r]);return x.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),x.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=x.createElement(FG,{isPresent:r},t)),x.createElement(iv.Provider,{value:l},t)};function UG(){return new Map}function $G(t){return x.useEffect(()=>()=>t(),[])}const Hl=t=>t.key||"";function WG(t,e){t.forEach(r=>{const n=Hl(r);e.set(n,r)})}function VG(t){const e=[];return x.Children.forEach(t,r=>{x.isValidElement(r)&&e.push(r)}),e}const xP=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=LG();const c=x.useContext(YE).forceRender;c&&(a=c);const l=mP(),u=VG(t);let f=u;const d=new Set,h=x.useRef(f),y=x.useRef(new Map).current,p=x.useRef(!0);if(Wy(()=>{p.current=!1,WG(u,y),h.current=f}),$G(()=>{p.current=!0,y.clear(),d.clear()}),p.current)return x.createElement(x.Fragment,null,f.map(m=>x.createElement(ax,{key:Hl(m),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},m)));f=[...f];const b=h.current.map(Hl),g=u.map(Hl),v=b.length;for(let m=0;m{if(g.indexOf(m)!==-1)return;const k=y.get(m);if(!k)return;const A=b.indexOf(m),P=()=>{y.delete(m),d.delete(m);const R=h.current.findIndex(N=>N.key===m);if(h.current.splice(R,1),!d.size){if(h.current=u,l.current===!1)return;a(),n&&n()}};f.splice(A,0,x.createElement(ax,{key:Hl(k),isPresent:!1,onExitComplete:P,custom:e,presenceAffectsLayout:i,mode:o},k))}),f=f.map(m=>{const k=m.key;return d.has(k)?m:x.createElement(ax,{key:Hl(m),isPresent:!0,presenceAffectsLayout:i,mode:o},m)}),x.createElement(x.Fragment,null,d.size?f:f.map(m=>x.cloneElement(m)))},bP={black:"#000000",white:"#ffffff",inherit:"inherit",transparent:"transparent",positive:"#1FC266",negative:"#C2501F",info:"#0076CC",warning:"#F4B03E",gradientBackdrop:`linear-gradient( - 243.18deg, - rgba(86, 52, 189, 0.85) 0%, - rgba(49, 41, 223, 0.85) 63.54%, - rgba(7, 98, 149, 0.85) 100% - )`,gradientPrimary:"linear-gradient(89.69deg, #4411E1 0.27%, #7537F9 99.73%)",gradientSecondary:"linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%)",arbitrumDark:"#212D44",arbitrumLight:"#93D4FF",avalanceDark:"#810C0C",avalanceLight:"#FF8080",bscDark:"#584508",bscLight:"#FCCF43",ethereumDark:"#132362",ethereumLight:"#AABBFF",gnosisDark:"#084246",gnosisLight:"#8CF6FD",polygonDark:"#350881",polygonLight:"#C7A6FF"},zG={...bP,text100:"rgba(255, 255, 255, 1)",text80:"rgba(255, 255, 255, 0.8)",text50:"rgba(255, 255, 255, 0.5)",textInverse100:"rgba(0, 0, 0, 1)",backgroundPrimary:"rgba(0, 0, 0, 1)",backgroundSecondary:"rgba(255, 255, 255, 0.1)",backgroundContrast:"rgba(0, 0, 0, 0.5)",backgroundMuted:"rgba(255, 255, 255, 0.05)",backgroundControl:"rgba(255, 255, 255, 0.25)",backgroundInverse:"rgba(255, 255, 255, 1)",backgroundBackdrop:"rgba(34, 34, 34, 0.9)",backgroundOverlay:"rgba(0, 0, 0, 0.7)",backgroundRaised:"rgba(54, 54, 54, 0.7)",buttonGlass:"rgba(255, 255, 255, 0.15)",buttonEmphasis:"rgba(0, 0, 0, 0.5)",buttonInverse:"rgba(255, 255, 255, 0.8)",borderNormal:"rgba(255, 255, 255, 0.25)",borderFocus:"rgba(255, 255, 255, 0.5)"},HG={...bP,text100:"rgba(0, 0, 0, 1)",text80:"rgba(0, 0, 0, 0.8)",text50:"rgba(0, 0, 0, 0.5)",textInverse100:"rgba(255, 255, 255, 1)",backgroundPrimary:"rgba(244, 244, 244, 1)",backgroundSecondary:"rgba(0, 0, 0, 0.1)",backgroundContrast:"rgba(244, 244, 244, 0.5)",backgroundMuted:"rgba(0, 0, 0, 0.05)",backgroundControl:"rgba(0, 0, 0, 0.25)",backgroundInverse:"rgba(0, 0, 0, 1)",backgroundBackdrop:"rgba(221, 221, 221, 0.9)",backgroundOverlay:"rgba(244, 244, 244, 0.7)",backgroundRaised:"rgba(192, 192, 192, 0.7)",buttonGlass:"rgba(0, 0, 0, 0.15)",buttonEmphasis:"rgba(255, 255, 255, 0.5)",buttonInverse:"rgba(0, 0, 0, 0.8)",borderNormal:"rgba(0, 0, 0, 0.25)",borderFocus:"rgba(0, 0, 0, 0.5)"},GG={grey:{50:"#D1D1D1",100:"#B0B0B0",200:"#888888",300:"#6D6D6D",400:"#5D5D5D",500:"#4F4F4F",600:"#454545",700:"#3D3D3D",800:"#262626",900:"#1B1B1B",950:"#101010"},red:{50:"#FDF7EF",100:"#FBECD9",200:"#F6D7B2",300:"#F1BB80",400:"#EA954D",500:"#E5792A",600:"#D66020",700:"#C2501F",800:"#8E3B1E",900:"#72331C",950:"#3E170C"},green:{50:"#F0FDF5",100:"#DCFCE9",200:"#BAF8D4",300:"#85F0B3",400:"#48E089",500:"#1FC266",600:"#14A554",700:"#148144",800:"#156639",900:"#135431",950:"#042F19"},yellow:{50:"#FBFAEB",100:"#F6F2CB",200:"#EFE499",300:"#E5CE5F",400:"#DDB938",500:"#CDA125",600:"#B07E1E",700:"#8D5C1B",800:"#754A1E",900:"#653F1E",950:"#3A200E"},blue:{50:"#F0F8FF",100:"#E0F0FE",200:"#B9E0FE",300:"#7CC8FD",400:"#36AEFA",500:"#0C94EB",600:"#0076CC",700:"#015CA3",800:"#064F86",900:"#0B426F",950:"#072A4A"},indigo:{50:"#F2F2FF",100:"#E9E7FF",200:"#D3D1FF",300:"#B3ADFF",400:"#8E7EFF",500:"#6A4AFF",600:"#5826FF",700:"#4411E1",800:"#3D10C7",900:"#340FA3",950:"#1C066F"},violet:{50:"#F3F2FF",100:"#EBE8FF",200:"#D9D3FF",300:"#BDB0FF",400:"#9D84FF",500:"#7F52FF",600:"#7537F9",700:"#601CE5",800:"#5117C0",900:"#43159D",950:"#270A6B"}},qG={dark:zG,light:HG,palettes:GG},KG={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};var uA={colors:{black:"var(--seq-colors-black)",white:"var(--seq-colors-white)",inherit:"var(--seq-colors-inherit)",transparent:"var(--seq-colors-transparent)",positive:"var(--seq-colors-positive)",negative:"var(--seq-colors-negative)",info:"var(--seq-colors-info)",warning:"var(--seq-colors-warning)",gradientBackdrop:"var(--seq-colors-gradient-backdrop)",gradientPrimary:"var(--seq-colors-gradient-primary)",gradientSecondary:"var(--seq-colors-gradient-secondary)",arbitrumDark:"var(--seq-colors-arbitrum-dark)",arbitrumLight:"var(--seq-colors-arbitrum-light)",avalanceDark:"var(--seq-colors-avalance-dark)",avalanceLight:"var(--seq-colors-avalance-light)",bscDark:"var(--seq-colors-bsc-dark)",bscLight:"var(--seq-colors-bsc-light)",ethereumDark:"var(--seq-colors-ethereum-dark)",ethereumLight:"var(--seq-colors-ethereum-light)",gnosisDark:"var(--seq-colors-gnosis-dark)",gnosisLight:"var(--seq-colors-gnosis-light)",polygonDark:"var(--seq-colors-polygon-dark)",polygonLight:"var(--seq-colors-polygon-light)",text100:"var(--seq-colors-text100)",text80:"var(--seq-colors-text80)",text50:"var(--seq-colors-text50)",textInverse100:"var(--seq-colors-text-inverse100)",backgroundPrimary:"var(--seq-colors-background-primary)",backgroundSecondary:"var(--seq-colors-background-secondary)",backgroundContrast:"var(--seq-colors-background-contrast)",backgroundMuted:"var(--seq-colors-background-muted)",backgroundControl:"var(--seq-colors-background-control)",backgroundInverse:"var(--seq-colors-background-inverse)",backgroundBackdrop:"var(--seq-colors-background-backdrop)",backgroundOverlay:"var(--seq-colors-background-overlay)",backgroundRaised:"var(--seq-colors-background-raised)",buttonGlass:"var(--seq-colors-button-glass)",buttonEmphasis:"var(--seq-colors-button-emphasis)",buttonInverse:"var(--seq-colors-button-inverse)",borderNormal:"var(--seq-colors-border-normal)",borderFocus:"var(--seq-colors-border-focus)"}};function QG(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JG(t){var e=QG(t,"string");return typeof e=="symbol"?e:String(e)}function YG(t,e,r){return e=JG(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function cx(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),i=Object.keys(s),o=i.filter(c=>"mappings"in s[c]),a=c=>{var l=[],u={},f=cx({},c),d=!1;for(var h of o){var y=c[h];if(y!=null){var p=s[h];d=!0;for(var b of p.mappings)u[b]=y,f[b]==null&&delete f[b]}}var g=d?cx(cx({},u),f):c,v=function(){var A=g[m],P=s[m];try{if(P.mappings)return 1;if(typeof A=="string"||typeof A=="number")l.push(P.values[A].defaultClass);else if(Array.isArray(A))for(var R=0;Rt,eq=function(){return XG(ZG)(...arguments)},wP=eq({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},18:{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},20:{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"0.25":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},"0.5":{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},"1.5":{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},none:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},px:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},auto:{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},full:{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"1/2":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/3":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"2/3":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},"1/4":{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},"3/4":{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},fit:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},max:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},min:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"},vw:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},vh:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"}}},height:{values:{0:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},1:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},2:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},3:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},4:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},5:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},6:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},7:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},8:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},9:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},10:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},12:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},14:{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},16:{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},18:{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},20:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},"0.25":{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},"0.5":{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},"1.5":{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},none:{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},px:{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},auto:{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},full:{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"1/2":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},"1/3":{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},"2/3":{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},"1/4":{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},"3/4":{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},fit:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"},max:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},min:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},vw:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},vh:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},1:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},2:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},3:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},4:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},5:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},6:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},7:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},8:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},9:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},10:{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},12:{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},14:{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},16:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},18:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},20:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},"0.25":{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"0.5":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1.5":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},none:{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},px:{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},auto:{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},full:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},"1/2":{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},"1/3":{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},"2/3":{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},"1/4":{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"},"3/4":{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},fit:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},max:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},min:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},vw:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},vh:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},1:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},2:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},3:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},4:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},5:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},6:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},7:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},8:{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},9:{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},10:{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},12:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},14:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},16:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},18:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},20:{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"0.25":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"0.5":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1.5":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},none:{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},px:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},auto:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},full:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},"1/2":{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},"1/3":{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"},"2/3":{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},"1/4":{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},"3/4":{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},fit:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},max:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},min:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},vw:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},vh:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},1:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},2:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},3:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},4:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},5:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},6:{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},7:{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},8:{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},9:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},10:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},12:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},14:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},16:{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},18:{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},20:{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"0.25":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"0.5":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},"1.5":{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},none:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},px:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},auto:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},full:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"},"1/2":{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},"1/3":{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},"2/3":{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},"1/4":{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},"3/4":{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},fit:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},max:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},min:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},vw:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},vh:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},1:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},2:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},3:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},4:{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},5:{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},6:{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},7:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},8:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},9:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},10:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},12:{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},14:{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},16:{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},18:{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},20:{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},"0.25":{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},"0.5":{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},"1.5":{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},none:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},px:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"},auto:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},full:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},"1/2":{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},"1/3":{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},"2/3":{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},"1/4":{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},"3/4":{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},fit:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},max:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},min:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},vw:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},vh:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"}}},top:{values:{0:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},1:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},2:{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},3:{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},4:{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},5:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"},6:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},7:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},8:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},9:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},10:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},12:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},14:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},16:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},18:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},20:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},"0.25":{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},"0.5":{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},"1.5":{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},auto:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"}}},bottom:{values:{0:{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},1:{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},2:{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},3:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"},4:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},5:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},6:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},7:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},8:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},9:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},10:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},12:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},14:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},16:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},18:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},20:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},"0.25":{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},"0.5":{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"1.5":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},auto:{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"}}},left:{values:{0:{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},1:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"},2:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},3:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},4:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},5:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},6:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},7:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},8:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},9:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},10:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},12:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},14:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},16:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},18:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},20:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},right:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},18:{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},20:{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"0.25":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"},"0.5":{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},"1.5":{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},auto:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},1:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},2:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},3:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},4:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},5:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},6:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},7:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},8:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},9:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},10:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},12:{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},14:{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},16:{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"},18:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},20:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},"0.25":{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},"0.5":{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},"1.5":{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},1:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},2:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},3:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},4:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},5:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},6:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},7:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},8:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},9:{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},10:{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},12:{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"},14:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},16:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},18:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},20:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},"0.25":{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},"0.5":{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},"1.5":{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},1:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},2:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},3:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},4:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},5:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},6:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},7:{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},8:{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},9:{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"},10:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},12:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},14:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},16:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},18:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},20:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},"0.25":{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},"0.5":{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},"1.5":{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},1:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},2:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},3:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},4:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},5:{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},6:{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},7:{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},8:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"},9:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},10:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},12:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},14:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},16:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},18:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},20:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},"0.25":{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},"0.5":{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},"1.5":{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"}}},marginTop:{values:{0:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},1:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},2:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},3:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},4:{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},5:{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},6:{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},7:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"},8:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},9:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},10:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},12:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},14:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},16:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},18:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},20:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},"0.25":{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},"0.5":{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},"1.5":{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},auto:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},1:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},2:{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},3:{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},4:{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},5:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"},6:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},7:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},8:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},9:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},10:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},12:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},14:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},16:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},18:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},20:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},"0.25":{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},"0.5":{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},"1.5":{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},auto:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},1:{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},2:{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},3:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"},4:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},5:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},6:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},7:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},8:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},9:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},10:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},12:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},14:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},16:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},18:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},20:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},"0.25":{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},"0.5":{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"1.5":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},auto:{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"}}},marginRight:{values:{0:{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"},1:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},2:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},3:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"},4:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},5:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},6:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"},7:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},8:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},9:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"},10:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},12:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},14:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"},16:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},18:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},20:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},"0.25":{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},"0.5":{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},"1.5":{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"},auto:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"}}},gap:{values:{0:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},1:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},2:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},3:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},4:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"},5:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},6:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},7:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},8:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},9:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},10:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"},12:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},14:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},16:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},18:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},20:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},"0.25":{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"},"0.5":{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},"1.5":{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},thin:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},thick:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},thin:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"},thick:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},thin:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},thick:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"},thin:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},thick:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},xs:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"},sm:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},md:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},lg:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},circle:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},xs:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"},sm:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},md:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},lg:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"},circle:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},xs:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},sm:{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},md:{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},lg:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},circle:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},xs:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},sm:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},md:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"},lg:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},circle:{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},xsmall:{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"},small:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},normal:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"},medium:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},large:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"},xlarge:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},normal:{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"},medium:{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},semibold:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},bold:{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},none:{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},normal:{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},wide:{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},5:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},6:{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},7:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"},9:{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},inherit:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},left:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},right:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},display:{values:{block:{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},flex:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},grid:{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},"inline-block":{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},"inline-flex":{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"},none:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},contents:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"}}},position:{values:{absolute:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},fixed:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"},relative:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},sticky:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},"column-reverse":{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"},row:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},"row-reverse":{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ms",md:"fyvr11mt",lg:"fyvr11mu",xl:"fyvr11mv"},defaultClass:"fyvr11ms"},1:{conditions:{sm:"fyvr11mw",md:"fyvr11mx",lg:"fyvr11my",xl:"fyvr11mz"},defaultClass:"fyvr11mw"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11n0",md:"fyvr11n1",lg:"fyvr11n2",xl:"fyvr11n3"},defaultClass:"fyvr11n0"},1:{conditions:{sm:"fyvr11n4",md:"fyvr11n5",lg:"fyvr11n6",xl:"fyvr11n7"},defaultClass:"fyvr11n4"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11n8",md:"fyvr11n9",lg:"fyvr11na",xl:"fyvr11nb"},defaultClass:"fyvr11n8"},wrap:{conditions:{sm:"fyvr11nc",md:"fyvr11nd",lg:"fyvr11ne",xl:"fyvr11nf"},defaultClass:"fyvr11nc"},"wrap-reverse":{conditions:{sm:"fyvr11ng",md:"fyvr11nh",lg:"fyvr11ni",xl:"fyvr11nj"},defaultClass:"fyvr11ng"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11nk",md:"fyvr11nl",lg:"fyvr11nm",xl:"fyvr11nn"},defaultClass:"fyvr11nk"},center:{conditions:{sm:"fyvr11no",md:"fyvr11np",lg:"fyvr11nq",xl:"fyvr11nr"},defaultClass:"fyvr11no"},"flex-end":{conditions:{sm:"fyvr11ns",md:"fyvr11nt",lg:"fyvr11nu",xl:"fyvr11nv"},defaultClass:"fyvr11ns"},stretch:{conditions:{sm:"fyvr11nw",md:"fyvr11nx",lg:"fyvr11ny",xl:"fyvr11nz"},defaultClass:"fyvr11nw"},"space-around":{conditions:{sm:"fyvr11o0",md:"fyvr11o1",lg:"fyvr11o2",xl:"fyvr11o3"},defaultClass:"fyvr11o0"},"space-between":{conditions:{sm:"fyvr11o4",md:"fyvr11o5",lg:"fyvr11o6",xl:"fyvr11o7"},defaultClass:"fyvr11o4"},"space-evenly":{conditions:{sm:"fyvr11o8",md:"fyvr11o9",lg:"fyvr11oa",xl:"fyvr11ob"},defaultClass:"fyvr11o8"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11oc",md:"fyvr11od",lg:"fyvr11oe",xl:"fyvr11of"},defaultClass:"fyvr11oc"},center:{conditions:{sm:"fyvr11og",md:"fyvr11oh",lg:"fyvr11oi",xl:"fyvr11oj"},defaultClass:"fyvr11og"},"flex-end":{conditions:{sm:"fyvr11ok",md:"fyvr11ol",lg:"fyvr11om",xl:"fyvr11on"},defaultClass:"fyvr11ok"},stretch:{conditions:{sm:"fyvr11oo",md:"fyvr11op",lg:"fyvr11oq",xl:"fyvr11or"},defaultClass:"fyvr11oo"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11os",md:"fyvr11ot",lg:"fyvr11ou",xl:"fyvr11ov"},defaultClass:"fyvr11os"},center:{conditions:{sm:"fyvr11ow",md:"fyvr11ox",lg:"fyvr11oy",xl:"fyvr11oz"},defaultClass:"fyvr11ow"},"flex-end":{conditions:{sm:"fyvr11p0",md:"fyvr11p1",lg:"fyvr11p2",xl:"fyvr11p3"},defaultClass:"fyvr11p0"},stretch:{conditions:{sm:"fyvr11p4",md:"fyvr11p5",lg:"fyvr11p6",xl:"fyvr11p7"},defaultClass:"fyvr11p4"},baseline:{conditions:{sm:"fyvr11p8",md:"fyvr11p9",lg:"fyvr11pa",xl:"fyvr11pb"},defaultClass:"fyvr11p8"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11pc",md:"fyvr11pd",lg:"fyvr11pe",xl:"fyvr11pf"},defaultClass:"fyvr11pc"},center:{conditions:{sm:"fyvr11pg",md:"fyvr11ph",lg:"fyvr11pi",xl:"fyvr11pj"},defaultClass:"fyvr11pg"},"flex-end":{conditions:{sm:"fyvr11pk",md:"fyvr11pl",lg:"fyvr11pm",xl:"fyvr11pn"},defaultClass:"fyvr11pk"},stretch:{conditions:{sm:"fyvr11po",md:"fyvr11pp",lg:"fyvr11pq",xl:"fyvr11pr"},defaultClass:"fyvr11po"},baseline:{conditions:{sm:"fyvr11ps",md:"fyvr11pt",lg:"fyvr11pu",xl:"fyvr11pv"},defaultClass:"fyvr11ps"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11pw",md:"fyvr11px",lg:"fyvr11py",xl:"fyvr11pz"},defaultClass:"fyvr11pw"},hidden:{conditions:{sm:"fyvr11q0",md:"fyvr11q1",lg:"fyvr11q2",xl:"fyvr11q3"},defaultClass:"fyvr11q0"},scroll:{conditions:{sm:"fyvr11q4",md:"fyvr11q5",lg:"fyvr11q6",xl:"fyvr11q7"},defaultClass:"fyvr11q4"},visible:{conditions:{sm:"fyvr11q8",md:"fyvr11q9",lg:"fyvr11qa",xl:"fyvr11qb"},defaultClass:"fyvr11q8"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11qc",md:"fyvr11qd",lg:"fyvr11qe",xl:"fyvr11qf"},defaultClass:"fyvr11qc"},hidden:{conditions:{sm:"fyvr11qg",md:"fyvr11qh",lg:"fyvr11qi",xl:"fyvr11qj"},defaultClass:"fyvr11qg"},scroll:{conditions:{sm:"fyvr11qk",md:"fyvr11ql",lg:"fyvr11qm",xl:"fyvr11qn"},defaultClass:"fyvr11qk"},visible:{conditions:{sm:"fyvr11qo",md:"fyvr11qp",lg:"fyvr11qq",xl:"fyvr11qr"},defaultClass:"fyvr11qo"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11qs",md:"fyvr11qt",lg:"fyvr11qu",xl:"fyvr11qv"},defaultClass:"fyvr11qs"},visible:{conditions:{sm:"fyvr11qw",md:"fyvr11qx",lg:"fyvr11qy",xl:"fyvr11qz"},defaultClass:"fyvr11qw"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11r0"},none:{defaultClass:"fyvr11r1"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11r2"},body:{defaultClass:"fyvr11r3"},mono:{defaultClass:"fyvr11r4"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11r5"},clip:{defaultClass:"fyvr11r6"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11r7"},lowercase:{defaultClass:"fyvr11r8"},uppercase:{defaultClass:"fyvr11r9"}}},textDecoration:{values:{none:{defaultClass:"fyvr11ra"},underline:{defaultClass:"fyvr11rb"}}},userSelect:{values:{none:{defaultClass:"fyvr11rc"},text:{defaultClass:"fyvr11rd"},all:{defaultClass:"fyvr11re"},auto:{defaultClass:"fyvr11rf"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11rg"},nowrap:{defaultClass:"fyvr11rh"},initial:{defaultClass:"fyvr11ri"},inherit:{defaultClass:"fyvr11rj"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11rk"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11rl"},"break-word":{defaultClass:"fyvr11rm"},initial:{defaultClass:"fyvr11rn"},inherit:{defaultClass:"fyvr11ro"}}},zIndex:{values:{0:{defaultClass:"fyvr11rp"},1:{defaultClass:"fyvr11rq"},10:{defaultClass:"fyvr11rr"},20:{defaultClass:"fyvr11rs"},30:{defaultClass:"fyvr11rt"},40:{defaultClass:"fyvr11ru"},50:{defaultClass:"fyvr11rv"},"-1":{defaultClass:"fyvr11rw"},auto:{defaultClass:"fyvr11rx"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11ry"},"16/9":{defaultClass:"fyvr11rz"},"4/3":{defaultClass:"fyvr11s0"},"3/1":{defaultClass:"fyvr11s1"},auto:{defaultClass:"fyvr11s2"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11s3",active:"fyvr11s4",disabled:"fyvr11s5",focus:"fyvr11s6",hover:"fyvr11s7",checked:"fyvr11s8"},defaultClass:"fyvr11s3"},white:{conditions:{base:"fyvr11s9",active:"fyvr11sa",disabled:"fyvr11sb",focus:"fyvr11sc",hover:"fyvr11sd",checked:"fyvr11se"},defaultClass:"fyvr11s9"},inherit:{conditions:{base:"fyvr11sf",active:"fyvr11sg",disabled:"fyvr11sh",focus:"fyvr11si",hover:"fyvr11sj",checked:"fyvr11sk"},defaultClass:"fyvr11sf"},transparent:{conditions:{base:"fyvr11sl",active:"fyvr11sm",disabled:"fyvr11sn",focus:"fyvr11so",hover:"fyvr11sp",checked:"fyvr11sq"},defaultClass:"fyvr11sl"},positive:{conditions:{base:"fyvr11sr",active:"fyvr11ss",disabled:"fyvr11st",focus:"fyvr11su",hover:"fyvr11sv",checked:"fyvr11sw"},defaultClass:"fyvr11sr"},negative:{conditions:{base:"fyvr11sx",active:"fyvr11sy",disabled:"fyvr11sz",focus:"fyvr11t0",hover:"fyvr11t1",checked:"fyvr11t2"},defaultClass:"fyvr11sx"},info:{conditions:{base:"fyvr11t3",active:"fyvr11t4",disabled:"fyvr11t5",focus:"fyvr11t6",hover:"fyvr11t7",checked:"fyvr11t8"},defaultClass:"fyvr11t3"},warning:{conditions:{base:"fyvr11t9",active:"fyvr11ta",disabled:"fyvr11tb",focus:"fyvr11tc",hover:"fyvr11td",checked:"fyvr11te"},defaultClass:"fyvr11t9"},gradientBackdrop:{conditions:{base:"fyvr11tf",active:"fyvr11tg",disabled:"fyvr11th",focus:"fyvr11ti",hover:"fyvr11tj",checked:"fyvr11tk"},defaultClass:"fyvr11tf"},gradientPrimary:{conditions:{base:"fyvr11tl",active:"fyvr11tm",disabled:"fyvr11tn",focus:"fyvr11to",hover:"fyvr11tp",checked:"fyvr11tq"},defaultClass:"fyvr11tl"},gradientSecondary:{conditions:{base:"fyvr11tr",active:"fyvr11ts",disabled:"fyvr11tt",focus:"fyvr11tu",hover:"fyvr11tv",checked:"fyvr11tw"},defaultClass:"fyvr11tr"},arbitrumDark:{conditions:{base:"fyvr11tx",active:"fyvr11ty",disabled:"fyvr11tz",focus:"fyvr11u0",hover:"fyvr11u1",checked:"fyvr11u2"},defaultClass:"fyvr11tx"},arbitrumLight:{conditions:{base:"fyvr11u3",active:"fyvr11u4",disabled:"fyvr11u5",focus:"fyvr11u6",hover:"fyvr11u7",checked:"fyvr11u8"},defaultClass:"fyvr11u3"},avalanceDark:{conditions:{base:"fyvr11u9",active:"fyvr11ua",disabled:"fyvr11ub",focus:"fyvr11uc",hover:"fyvr11ud",checked:"fyvr11ue"},defaultClass:"fyvr11u9"},avalanceLight:{conditions:{base:"fyvr11uf",active:"fyvr11ug",disabled:"fyvr11uh",focus:"fyvr11ui",hover:"fyvr11uj",checked:"fyvr11uk"},defaultClass:"fyvr11uf"},bscDark:{conditions:{base:"fyvr11ul",active:"fyvr11um",disabled:"fyvr11un",focus:"fyvr11uo",hover:"fyvr11up",checked:"fyvr11uq"},defaultClass:"fyvr11ul"},bscLight:{conditions:{base:"fyvr11ur",active:"fyvr11us",disabled:"fyvr11ut",focus:"fyvr11uu",hover:"fyvr11uv",checked:"fyvr11uw"},defaultClass:"fyvr11ur"},ethereumDark:{conditions:{base:"fyvr11ux",active:"fyvr11uy",disabled:"fyvr11uz",focus:"fyvr11v0",hover:"fyvr11v1",checked:"fyvr11v2"},defaultClass:"fyvr11ux"},ethereumLight:{conditions:{base:"fyvr11v3",active:"fyvr11v4",disabled:"fyvr11v5",focus:"fyvr11v6",hover:"fyvr11v7",checked:"fyvr11v8"},defaultClass:"fyvr11v3"},gnosisDark:{conditions:{base:"fyvr11v9",active:"fyvr11va",disabled:"fyvr11vb",focus:"fyvr11vc",hover:"fyvr11vd",checked:"fyvr11ve"},defaultClass:"fyvr11v9"},gnosisLight:{conditions:{base:"fyvr11vf",active:"fyvr11vg",disabled:"fyvr11vh",focus:"fyvr11vi",hover:"fyvr11vj",checked:"fyvr11vk"},defaultClass:"fyvr11vf"},polygonDark:{conditions:{base:"fyvr11vl",active:"fyvr11vm",disabled:"fyvr11vn",focus:"fyvr11vo",hover:"fyvr11vp",checked:"fyvr11vq"},defaultClass:"fyvr11vl"},polygonLight:{conditions:{base:"fyvr11vr",active:"fyvr11vs",disabled:"fyvr11vt",focus:"fyvr11vu",hover:"fyvr11vv",checked:"fyvr11vw"},defaultClass:"fyvr11vr"},text100:{conditions:{base:"fyvr11vx",active:"fyvr11vy",disabled:"fyvr11vz",focus:"fyvr11w0",hover:"fyvr11w1",checked:"fyvr11w2"},defaultClass:"fyvr11vx"},text80:{conditions:{base:"fyvr11w3",active:"fyvr11w4",disabled:"fyvr11w5",focus:"fyvr11w6",hover:"fyvr11w7",checked:"fyvr11w8"},defaultClass:"fyvr11w3"},text50:{conditions:{base:"fyvr11w9",active:"fyvr11wa",disabled:"fyvr11wb",focus:"fyvr11wc",hover:"fyvr11wd",checked:"fyvr11we"},defaultClass:"fyvr11w9"},textInverse100:{conditions:{base:"fyvr11wf",active:"fyvr11wg",disabled:"fyvr11wh",focus:"fyvr11wi",hover:"fyvr11wj",checked:"fyvr11wk"},defaultClass:"fyvr11wf"},backgroundPrimary:{conditions:{base:"fyvr11wl",active:"fyvr11wm",disabled:"fyvr11wn",focus:"fyvr11wo",hover:"fyvr11wp",checked:"fyvr11wq"},defaultClass:"fyvr11wl"},backgroundSecondary:{conditions:{base:"fyvr11wr",active:"fyvr11ws",disabled:"fyvr11wt",focus:"fyvr11wu",hover:"fyvr11wv",checked:"fyvr11ww"},defaultClass:"fyvr11wr"},backgroundContrast:{conditions:{base:"fyvr11wx",active:"fyvr11wy",disabled:"fyvr11wz",focus:"fyvr11x0",hover:"fyvr11x1",checked:"fyvr11x2"},defaultClass:"fyvr11wx"},backgroundMuted:{conditions:{base:"fyvr11x3",active:"fyvr11x4",disabled:"fyvr11x5",focus:"fyvr11x6",hover:"fyvr11x7",checked:"fyvr11x8"},defaultClass:"fyvr11x3"},backgroundControl:{conditions:{base:"fyvr11x9",active:"fyvr11xa",disabled:"fyvr11xb",focus:"fyvr11xc",hover:"fyvr11xd",checked:"fyvr11xe"},defaultClass:"fyvr11x9"},backgroundInverse:{conditions:{base:"fyvr11xf",active:"fyvr11xg",disabled:"fyvr11xh",focus:"fyvr11xi",hover:"fyvr11xj",checked:"fyvr11xk"},defaultClass:"fyvr11xf"},backgroundBackdrop:{conditions:{base:"fyvr11xl",active:"fyvr11xm",disabled:"fyvr11xn",focus:"fyvr11xo",hover:"fyvr11xp",checked:"fyvr11xq"},defaultClass:"fyvr11xl"},backgroundOverlay:{conditions:{base:"fyvr11xr",active:"fyvr11xs",disabled:"fyvr11xt",focus:"fyvr11xu",hover:"fyvr11xv",checked:"fyvr11xw"},defaultClass:"fyvr11xr"},backgroundRaised:{conditions:{base:"fyvr11xx",active:"fyvr11xy",disabled:"fyvr11xz",focus:"fyvr11y0",hover:"fyvr11y1",checked:"fyvr11y2"},defaultClass:"fyvr11xx"},buttonGlass:{conditions:{base:"fyvr11y3",active:"fyvr11y4",disabled:"fyvr11y5",focus:"fyvr11y6",hover:"fyvr11y7",checked:"fyvr11y8"},defaultClass:"fyvr11y3"},buttonEmphasis:{conditions:{base:"fyvr11y9",active:"fyvr11ya",disabled:"fyvr11yb",focus:"fyvr11yc",hover:"fyvr11yd",checked:"fyvr11ye"},defaultClass:"fyvr11y9"},buttonInverse:{conditions:{base:"fyvr11yf",active:"fyvr11yg",disabled:"fyvr11yh",focus:"fyvr11yi",hover:"fyvr11yj",checked:"fyvr11yk"},defaultClass:"fyvr11yf"},borderNormal:{conditions:{base:"fyvr11yl",active:"fyvr11ym",disabled:"fyvr11yn",focus:"fyvr11yo",hover:"fyvr11yp",checked:"fyvr11yq"},defaultClass:"fyvr11yl"},borderFocus:{conditions:{base:"fyvr11yr",active:"fyvr11ys",disabled:"fyvr11yt",focus:"fyvr11yu",hover:"fyvr11yv",checked:"fyvr11yw"},defaultClass:"fyvr11yr"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11yx",active:"fyvr11yy",disabled:"fyvr11yz",focus:"fyvr11z0",hover:"fyvr11z1",checked:"fyvr11z2"},defaultClass:"fyvr11yx"},white:{conditions:{base:"fyvr11z3",active:"fyvr11z4",disabled:"fyvr11z5",focus:"fyvr11z6",hover:"fyvr11z7",checked:"fyvr11z8"},defaultClass:"fyvr11z3"},inherit:{conditions:{base:"fyvr11z9",active:"fyvr11za",disabled:"fyvr11zb",focus:"fyvr11zc",hover:"fyvr11zd",checked:"fyvr11ze"},defaultClass:"fyvr11z9"},transparent:{conditions:{base:"fyvr11zf",active:"fyvr11zg",disabled:"fyvr11zh",focus:"fyvr11zi",hover:"fyvr11zj",checked:"fyvr11zk"},defaultClass:"fyvr11zf"},positive:{conditions:{base:"fyvr11zl",active:"fyvr11zm",disabled:"fyvr11zn",focus:"fyvr11zo",hover:"fyvr11zp",checked:"fyvr11zq"},defaultClass:"fyvr11zl"},negative:{conditions:{base:"fyvr11zr",active:"fyvr11zs",disabled:"fyvr11zt",focus:"fyvr11zu",hover:"fyvr11zv",checked:"fyvr11zw"},defaultClass:"fyvr11zr"},info:{conditions:{base:"fyvr11zx",active:"fyvr11zy",disabled:"fyvr11zz",focus:"fyvr1200",hover:"fyvr1201",checked:"fyvr1202"},defaultClass:"fyvr11zx"},warning:{conditions:{base:"fyvr1203",active:"fyvr1204",disabled:"fyvr1205",focus:"fyvr1206",hover:"fyvr1207",checked:"fyvr1208"},defaultClass:"fyvr1203"},gradientBackdrop:{conditions:{base:"fyvr1209",active:"fyvr120a",disabled:"fyvr120b",focus:"fyvr120c",hover:"fyvr120d",checked:"fyvr120e"},defaultClass:"fyvr1209"},gradientPrimary:{conditions:{base:"fyvr120f",active:"fyvr120g",disabled:"fyvr120h",focus:"fyvr120i",hover:"fyvr120j",checked:"fyvr120k"},defaultClass:"fyvr120f"},gradientSecondary:{conditions:{base:"fyvr120l",active:"fyvr120m",disabled:"fyvr120n",focus:"fyvr120o",hover:"fyvr120p",checked:"fyvr120q"},defaultClass:"fyvr120l"},arbitrumDark:{conditions:{base:"fyvr120r",active:"fyvr120s",disabled:"fyvr120t",focus:"fyvr120u",hover:"fyvr120v",checked:"fyvr120w"},defaultClass:"fyvr120r"},arbitrumLight:{conditions:{base:"fyvr120x",active:"fyvr120y",disabled:"fyvr120z",focus:"fyvr1210",hover:"fyvr1211",checked:"fyvr1212"},defaultClass:"fyvr120x"},avalanceDark:{conditions:{base:"fyvr1213",active:"fyvr1214",disabled:"fyvr1215",focus:"fyvr1216",hover:"fyvr1217",checked:"fyvr1218"},defaultClass:"fyvr1213"},avalanceLight:{conditions:{base:"fyvr1219",active:"fyvr121a",disabled:"fyvr121b",focus:"fyvr121c",hover:"fyvr121d",checked:"fyvr121e"},defaultClass:"fyvr1219"},bscDark:{conditions:{base:"fyvr121f",active:"fyvr121g",disabled:"fyvr121h",focus:"fyvr121i",hover:"fyvr121j",checked:"fyvr121k"},defaultClass:"fyvr121f"},bscLight:{conditions:{base:"fyvr121l",active:"fyvr121m",disabled:"fyvr121n",focus:"fyvr121o",hover:"fyvr121p",checked:"fyvr121q"},defaultClass:"fyvr121l"},ethereumDark:{conditions:{base:"fyvr121r",active:"fyvr121s",disabled:"fyvr121t",focus:"fyvr121u",hover:"fyvr121v",checked:"fyvr121w"},defaultClass:"fyvr121r"},ethereumLight:{conditions:{base:"fyvr121x",active:"fyvr121y",disabled:"fyvr121z",focus:"fyvr1220",hover:"fyvr1221",checked:"fyvr1222"},defaultClass:"fyvr121x"},gnosisDark:{conditions:{base:"fyvr1223",active:"fyvr1224",disabled:"fyvr1225",focus:"fyvr1226",hover:"fyvr1227",checked:"fyvr1228"},defaultClass:"fyvr1223"},gnosisLight:{conditions:{base:"fyvr1229",active:"fyvr122a",disabled:"fyvr122b",focus:"fyvr122c",hover:"fyvr122d",checked:"fyvr122e"},defaultClass:"fyvr1229"},polygonDark:{conditions:{base:"fyvr122f",active:"fyvr122g",disabled:"fyvr122h",focus:"fyvr122i",hover:"fyvr122j",checked:"fyvr122k"},defaultClass:"fyvr122f"},polygonLight:{conditions:{base:"fyvr122l",active:"fyvr122m",disabled:"fyvr122n",focus:"fyvr122o",hover:"fyvr122p",checked:"fyvr122q"},defaultClass:"fyvr122l"},text100:{conditions:{base:"fyvr122r",active:"fyvr122s",disabled:"fyvr122t",focus:"fyvr122u",hover:"fyvr122v",checked:"fyvr122w"},defaultClass:"fyvr122r"},text80:{conditions:{base:"fyvr122x",active:"fyvr122y",disabled:"fyvr122z",focus:"fyvr1230",hover:"fyvr1231",checked:"fyvr1232"},defaultClass:"fyvr122x"},text50:{conditions:{base:"fyvr1233",active:"fyvr1234",disabled:"fyvr1235",focus:"fyvr1236",hover:"fyvr1237",checked:"fyvr1238"},defaultClass:"fyvr1233"},textInverse100:{conditions:{base:"fyvr1239",active:"fyvr123a",disabled:"fyvr123b",focus:"fyvr123c",hover:"fyvr123d",checked:"fyvr123e"},defaultClass:"fyvr1239"},backgroundPrimary:{conditions:{base:"fyvr123f",active:"fyvr123g",disabled:"fyvr123h",focus:"fyvr123i",hover:"fyvr123j",checked:"fyvr123k"},defaultClass:"fyvr123f"},backgroundSecondary:{conditions:{base:"fyvr123l",active:"fyvr123m",disabled:"fyvr123n",focus:"fyvr123o",hover:"fyvr123p",checked:"fyvr123q"},defaultClass:"fyvr123l"},backgroundContrast:{conditions:{base:"fyvr123r",active:"fyvr123s",disabled:"fyvr123t",focus:"fyvr123u",hover:"fyvr123v",checked:"fyvr123w"},defaultClass:"fyvr123r"},backgroundMuted:{conditions:{base:"fyvr123x",active:"fyvr123y",disabled:"fyvr123z",focus:"fyvr1240",hover:"fyvr1241",checked:"fyvr1242"},defaultClass:"fyvr123x"},backgroundControl:{conditions:{base:"fyvr1243",active:"fyvr1244",disabled:"fyvr1245",focus:"fyvr1246",hover:"fyvr1247",checked:"fyvr1248"},defaultClass:"fyvr1243"},backgroundInverse:{conditions:{base:"fyvr1249",active:"fyvr124a",disabled:"fyvr124b",focus:"fyvr124c",hover:"fyvr124d",checked:"fyvr124e"},defaultClass:"fyvr1249"},backgroundBackdrop:{conditions:{base:"fyvr124f",active:"fyvr124g",disabled:"fyvr124h",focus:"fyvr124i",hover:"fyvr124j",checked:"fyvr124k"},defaultClass:"fyvr124f"},backgroundOverlay:{conditions:{base:"fyvr124l",active:"fyvr124m",disabled:"fyvr124n",focus:"fyvr124o",hover:"fyvr124p",checked:"fyvr124q"},defaultClass:"fyvr124l"},backgroundRaised:{conditions:{base:"fyvr124r",active:"fyvr124s",disabled:"fyvr124t",focus:"fyvr124u",hover:"fyvr124v",checked:"fyvr124w"},defaultClass:"fyvr124r"},buttonGlass:{conditions:{base:"fyvr124x",active:"fyvr124y",disabled:"fyvr124z",focus:"fyvr1250",hover:"fyvr1251",checked:"fyvr1252"},defaultClass:"fyvr124x"},buttonEmphasis:{conditions:{base:"fyvr1253",active:"fyvr1254",disabled:"fyvr1255",focus:"fyvr1256",hover:"fyvr1257",checked:"fyvr1258"},defaultClass:"fyvr1253"},buttonInverse:{conditions:{base:"fyvr1259",active:"fyvr125a",disabled:"fyvr125b",focus:"fyvr125c",hover:"fyvr125d",checked:"fyvr125e"},defaultClass:"fyvr1259"},borderNormal:{conditions:{base:"fyvr125f",active:"fyvr125g",disabled:"fyvr125h",focus:"fyvr125i",hover:"fyvr125j",checked:"fyvr125k"},defaultClass:"fyvr125f"},borderFocus:{conditions:{base:"fyvr125l",active:"fyvr125m",disabled:"fyvr125n",focus:"fyvr125o",hover:"fyvr125p",checked:"fyvr125q"},defaultClass:"fyvr125l"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr125r",active:"fyvr125s",disabled:"fyvr125t",focus:"fyvr125u",hover:"fyvr125v",checked:"fyvr125w"},defaultClass:"fyvr125r"},dashed:{conditions:{base:"fyvr125x",active:"fyvr125y",disabled:"fyvr125z",focus:"fyvr1260",hover:"fyvr1261",checked:"fyvr1262"},defaultClass:"fyvr125x"},dotted:{conditions:{base:"fyvr1263",active:"fyvr1264",disabled:"fyvr1265",focus:"fyvr1266",hover:"fyvr1267",checked:"fyvr1268"},defaultClass:"fyvr1263"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr1269",active:"fyvr126a",disabled:"fyvr126b",focus:"fyvr126c",hover:"fyvr126d",checked:"fyvr126e"},defaultClass:"fyvr1269"},white:{conditions:{base:"fyvr126f",active:"fyvr126g",disabled:"fyvr126h",focus:"fyvr126i",hover:"fyvr126j",checked:"fyvr126k"},defaultClass:"fyvr126f"},inherit:{conditions:{base:"fyvr126l",active:"fyvr126m",disabled:"fyvr126n",focus:"fyvr126o",hover:"fyvr126p",checked:"fyvr126q"},defaultClass:"fyvr126l"},transparent:{conditions:{base:"fyvr126r",active:"fyvr126s",disabled:"fyvr126t",focus:"fyvr126u",hover:"fyvr126v",checked:"fyvr126w"},defaultClass:"fyvr126r"},positive:{conditions:{base:"fyvr126x",active:"fyvr126y",disabled:"fyvr126z",focus:"fyvr1270",hover:"fyvr1271",checked:"fyvr1272"},defaultClass:"fyvr126x"},negative:{conditions:{base:"fyvr1273",active:"fyvr1274",disabled:"fyvr1275",focus:"fyvr1276",hover:"fyvr1277",checked:"fyvr1278"},defaultClass:"fyvr1273"},info:{conditions:{base:"fyvr1279",active:"fyvr127a",disabled:"fyvr127b",focus:"fyvr127c",hover:"fyvr127d",checked:"fyvr127e"},defaultClass:"fyvr1279"},warning:{conditions:{base:"fyvr127f",active:"fyvr127g",disabled:"fyvr127h",focus:"fyvr127i",hover:"fyvr127j",checked:"fyvr127k"},defaultClass:"fyvr127f"},gradientBackdrop:{conditions:{base:"fyvr127l",active:"fyvr127m",disabled:"fyvr127n",focus:"fyvr127o",hover:"fyvr127p",checked:"fyvr127q"},defaultClass:"fyvr127l"},gradientPrimary:{conditions:{base:"fyvr127r",active:"fyvr127s",disabled:"fyvr127t",focus:"fyvr127u",hover:"fyvr127v",checked:"fyvr127w"},defaultClass:"fyvr127r"},gradientSecondary:{conditions:{base:"fyvr127x",active:"fyvr127y",disabled:"fyvr127z",focus:"fyvr1280",hover:"fyvr1281",checked:"fyvr1282"},defaultClass:"fyvr127x"},arbitrumDark:{conditions:{base:"fyvr1283",active:"fyvr1284",disabled:"fyvr1285",focus:"fyvr1286",hover:"fyvr1287",checked:"fyvr1288"},defaultClass:"fyvr1283"},arbitrumLight:{conditions:{base:"fyvr1289",active:"fyvr128a",disabled:"fyvr128b",focus:"fyvr128c",hover:"fyvr128d",checked:"fyvr128e"},defaultClass:"fyvr1289"},avalanceDark:{conditions:{base:"fyvr128f",active:"fyvr128g",disabled:"fyvr128h",focus:"fyvr128i",hover:"fyvr128j",checked:"fyvr128k"},defaultClass:"fyvr128f"},avalanceLight:{conditions:{base:"fyvr128l",active:"fyvr128m",disabled:"fyvr128n",focus:"fyvr128o",hover:"fyvr128p",checked:"fyvr128q"},defaultClass:"fyvr128l"},bscDark:{conditions:{base:"fyvr128r",active:"fyvr128s",disabled:"fyvr128t",focus:"fyvr128u",hover:"fyvr128v",checked:"fyvr128w"},defaultClass:"fyvr128r"},bscLight:{conditions:{base:"fyvr128x",active:"fyvr128y",disabled:"fyvr128z",focus:"fyvr1290",hover:"fyvr1291",checked:"fyvr1292"},defaultClass:"fyvr128x"},ethereumDark:{conditions:{base:"fyvr1293",active:"fyvr1294",disabled:"fyvr1295",focus:"fyvr1296",hover:"fyvr1297",checked:"fyvr1298"},defaultClass:"fyvr1293"},ethereumLight:{conditions:{base:"fyvr1299",active:"fyvr129a",disabled:"fyvr129b",focus:"fyvr129c",hover:"fyvr129d",checked:"fyvr129e"},defaultClass:"fyvr1299"},gnosisDark:{conditions:{base:"fyvr129f",active:"fyvr129g",disabled:"fyvr129h",focus:"fyvr129i",hover:"fyvr129j",checked:"fyvr129k"},defaultClass:"fyvr129f"},gnosisLight:{conditions:{base:"fyvr129l",active:"fyvr129m",disabled:"fyvr129n",focus:"fyvr129o",hover:"fyvr129p",checked:"fyvr129q"},defaultClass:"fyvr129l"},polygonDark:{conditions:{base:"fyvr129r",active:"fyvr129s",disabled:"fyvr129t",focus:"fyvr129u",hover:"fyvr129v",checked:"fyvr129w"},defaultClass:"fyvr129r"},polygonLight:{conditions:{base:"fyvr129x",active:"fyvr129y",disabled:"fyvr129z",focus:"fyvr12a0",hover:"fyvr12a1",checked:"fyvr12a2"},defaultClass:"fyvr129x"},text100:{conditions:{base:"fyvr12a3",active:"fyvr12a4",disabled:"fyvr12a5",focus:"fyvr12a6",hover:"fyvr12a7",checked:"fyvr12a8"},defaultClass:"fyvr12a3"},text80:{conditions:{base:"fyvr12a9",active:"fyvr12aa",disabled:"fyvr12ab",focus:"fyvr12ac",hover:"fyvr12ad",checked:"fyvr12ae"},defaultClass:"fyvr12a9"},text50:{conditions:{base:"fyvr12af",active:"fyvr12ag",disabled:"fyvr12ah",focus:"fyvr12ai",hover:"fyvr12aj",checked:"fyvr12ak"},defaultClass:"fyvr12af"},textInverse100:{conditions:{base:"fyvr12al",active:"fyvr12am",disabled:"fyvr12an",focus:"fyvr12ao",hover:"fyvr12ap",checked:"fyvr12aq"},defaultClass:"fyvr12al"},backgroundPrimary:{conditions:{base:"fyvr12ar",active:"fyvr12as",disabled:"fyvr12at",focus:"fyvr12au",hover:"fyvr12av",checked:"fyvr12aw"},defaultClass:"fyvr12ar"},backgroundSecondary:{conditions:{base:"fyvr12ax",active:"fyvr12ay",disabled:"fyvr12az",focus:"fyvr12b0",hover:"fyvr12b1",checked:"fyvr12b2"},defaultClass:"fyvr12ax"},backgroundContrast:{conditions:{base:"fyvr12b3",active:"fyvr12b4",disabled:"fyvr12b5",focus:"fyvr12b6",hover:"fyvr12b7",checked:"fyvr12b8"},defaultClass:"fyvr12b3"},backgroundMuted:{conditions:{base:"fyvr12b9",active:"fyvr12ba",disabled:"fyvr12bb",focus:"fyvr12bc",hover:"fyvr12bd",checked:"fyvr12be"},defaultClass:"fyvr12b9"},backgroundControl:{conditions:{base:"fyvr12bf",active:"fyvr12bg",disabled:"fyvr12bh",focus:"fyvr12bi",hover:"fyvr12bj",checked:"fyvr12bk"},defaultClass:"fyvr12bf"},backgroundInverse:{conditions:{base:"fyvr12bl",active:"fyvr12bm",disabled:"fyvr12bn",focus:"fyvr12bo",hover:"fyvr12bp",checked:"fyvr12bq"},defaultClass:"fyvr12bl"},backgroundBackdrop:{conditions:{base:"fyvr12br",active:"fyvr12bs",disabled:"fyvr12bt",focus:"fyvr12bu",hover:"fyvr12bv",checked:"fyvr12bw"},defaultClass:"fyvr12br"},backgroundOverlay:{conditions:{base:"fyvr12bx",active:"fyvr12by",disabled:"fyvr12bz",focus:"fyvr12c0",hover:"fyvr12c1",checked:"fyvr12c2"},defaultClass:"fyvr12bx"},backgroundRaised:{conditions:{base:"fyvr12c3",active:"fyvr12c4",disabled:"fyvr12c5",focus:"fyvr12c6",hover:"fyvr12c7",checked:"fyvr12c8"},defaultClass:"fyvr12c3"},buttonGlass:{conditions:{base:"fyvr12c9",active:"fyvr12ca",disabled:"fyvr12cb",focus:"fyvr12cc",hover:"fyvr12cd",checked:"fyvr12ce"},defaultClass:"fyvr12c9"},buttonEmphasis:{conditions:{base:"fyvr12cf",active:"fyvr12cg",disabled:"fyvr12ch",focus:"fyvr12ci",hover:"fyvr12cj",checked:"fyvr12ck"},defaultClass:"fyvr12cf"},buttonInverse:{conditions:{base:"fyvr12cl",active:"fyvr12cm",disabled:"fyvr12cn",focus:"fyvr12co",hover:"fyvr12cp",checked:"fyvr12cq"},defaultClass:"fyvr12cl"},borderNormal:{conditions:{base:"fyvr12cr",active:"fyvr12cs",disabled:"fyvr12ct",focus:"fyvr12cu",hover:"fyvr12cv",checked:"fyvr12cw"},defaultClass:"fyvr12cr"},borderFocus:{conditions:{base:"fyvr12cx",active:"fyvr12cy",disabled:"fyvr12cz",focus:"fyvr12d0",hover:"fyvr12d1",checked:"fyvr12d2"},defaultClass:"fyvr12cx"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr12d3",active:"fyvr12d4",disabled:"fyvr12d5",focus:"fyvr12d6",hover:"fyvr12d7",checked:"fyvr12d8"},defaultClass:"fyvr12d3"},dashed:{conditions:{base:"fyvr12d9",active:"fyvr12da",disabled:"fyvr12db",focus:"fyvr12dc",hover:"fyvr12dd",checked:"fyvr12de"},defaultClass:"fyvr12d9"},dotted:{conditions:{base:"fyvr12df",active:"fyvr12dg",disabled:"fyvr12dh",focus:"fyvr12di",hover:"fyvr12dj",checked:"fyvr12dk"},defaultClass:"fyvr12df"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr12dl",active:"fyvr12dm",disabled:"fyvr12dn",focus:"fyvr12do",hover:"fyvr12dp",checked:"fyvr12dq"},defaultClass:"fyvr12dl"},white:{conditions:{base:"fyvr12dr",active:"fyvr12ds",disabled:"fyvr12dt",focus:"fyvr12du",hover:"fyvr12dv",checked:"fyvr12dw"},defaultClass:"fyvr12dr"},inherit:{conditions:{base:"fyvr12dx",active:"fyvr12dy",disabled:"fyvr12dz",focus:"fyvr12e0",hover:"fyvr12e1",checked:"fyvr12e2"},defaultClass:"fyvr12dx"},transparent:{conditions:{base:"fyvr12e3",active:"fyvr12e4",disabled:"fyvr12e5",focus:"fyvr12e6",hover:"fyvr12e7",checked:"fyvr12e8"},defaultClass:"fyvr12e3"},positive:{conditions:{base:"fyvr12e9",active:"fyvr12ea",disabled:"fyvr12eb",focus:"fyvr12ec",hover:"fyvr12ed",checked:"fyvr12ee"},defaultClass:"fyvr12e9"},negative:{conditions:{base:"fyvr12ef",active:"fyvr12eg",disabled:"fyvr12eh",focus:"fyvr12ei",hover:"fyvr12ej",checked:"fyvr12ek"},defaultClass:"fyvr12ef"},info:{conditions:{base:"fyvr12el",active:"fyvr12em",disabled:"fyvr12en",focus:"fyvr12eo",hover:"fyvr12ep",checked:"fyvr12eq"},defaultClass:"fyvr12el"},warning:{conditions:{base:"fyvr12er",active:"fyvr12es",disabled:"fyvr12et",focus:"fyvr12eu",hover:"fyvr12ev",checked:"fyvr12ew"},defaultClass:"fyvr12er"},gradientBackdrop:{conditions:{base:"fyvr12ex",active:"fyvr12ey",disabled:"fyvr12ez",focus:"fyvr12f0",hover:"fyvr12f1",checked:"fyvr12f2"},defaultClass:"fyvr12ex"},gradientPrimary:{conditions:{base:"fyvr12f3",active:"fyvr12f4",disabled:"fyvr12f5",focus:"fyvr12f6",hover:"fyvr12f7",checked:"fyvr12f8"},defaultClass:"fyvr12f3"},gradientSecondary:{conditions:{base:"fyvr12f9",active:"fyvr12fa",disabled:"fyvr12fb",focus:"fyvr12fc",hover:"fyvr12fd",checked:"fyvr12fe"},defaultClass:"fyvr12f9"},arbitrumDark:{conditions:{base:"fyvr12ff",active:"fyvr12fg",disabled:"fyvr12fh",focus:"fyvr12fi",hover:"fyvr12fj",checked:"fyvr12fk"},defaultClass:"fyvr12ff"},arbitrumLight:{conditions:{base:"fyvr12fl",active:"fyvr12fm",disabled:"fyvr12fn",focus:"fyvr12fo",hover:"fyvr12fp",checked:"fyvr12fq"},defaultClass:"fyvr12fl"},avalanceDark:{conditions:{base:"fyvr12fr",active:"fyvr12fs",disabled:"fyvr12ft",focus:"fyvr12fu",hover:"fyvr12fv",checked:"fyvr12fw"},defaultClass:"fyvr12fr"},avalanceLight:{conditions:{base:"fyvr12fx",active:"fyvr12fy",disabled:"fyvr12fz",focus:"fyvr12g0",hover:"fyvr12g1",checked:"fyvr12g2"},defaultClass:"fyvr12fx"},bscDark:{conditions:{base:"fyvr12g3",active:"fyvr12g4",disabled:"fyvr12g5",focus:"fyvr12g6",hover:"fyvr12g7",checked:"fyvr12g8"},defaultClass:"fyvr12g3"},bscLight:{conditions:{base:"fyvr12g9",active:"fyvr12ga",disabled:"fyvr12gb",focus:"fyvr12gc",hover:"fyvr12gd",checked:"fyvr12ge"},defaultClass:"fyvr12g9"},ethereumDark:{conditions:{base:"fyvr12gf",active:"fyvr12gg",disabled:"fyvr12gh",focus:"fyvr12gi",hover:"fyvr12gj",checked:"fyvr12gk"},defaultClass:"fyvr12gf"},ethereumLight:{conditions:{base:"fyvr12gl",active:"fyvr12gm",disabled:"fyvr12gn",focus:"fyvr12go",hover:"fyvr12gp",checked:"fyvr12gq"},defaultClass:"fyvr12gl"},gnosisDark:{conditions:{base:"fyvr12gr",active:"fyvr12gs",disabled:"fyvr12gt",focus:"fyvr12gu",hover:"fyvr12gv",checked:"fyvr12gw"},defaultClass:"fyvr12gr"},gnosisLight:{conditions:{base:"fyvr12gx",active:"fyvr12gy",disabled:"fyvr12gz",focus:"fyvr12h0",hover:"fyvr12h1",checked:"fyvr12h2"},defaultClass:"fyvr12gx"},polygonDark:{conditions:{base:"fyvr12h3",active:"fyvr12h4",disabled:"fyvr12h5",focus:"fyvr12h6",hover:"fyvr12h7",checked:"fyvr12h8"},defaultClass:"fyvr12h3"},polygonLight:{conditions:{base:"fyvr12h9",active:"fyvr12ha",disabled:"fyvr12hb",focus:"fyvr12hc",hover:"fyvr12hd",checked:"fyvr12he"},defaultClass:"fyvr12h9"},text100:{conditions:{base:"fyvr12hf",active:"fyvr12hg",disabled:"fyvr12hh",focus:"fyvr12hi",hover:"fyvr12hj",checked:"fyvr12hk"},defaultClass:"fyvr12hf"},text80:{conditions:{base:"fyvr12hl",active:"fyvr12hm",disabled:"fyvr12hn",focus:"fyvr12ho",hover:"fyvr12hp",checked:"fyvr12hq"},defaultClass:"fyvr12hl"},text50:{conditions:{base:"fyvr12hr",active:"fyvr12hs",disabled:"fyvr12ht",focus:"fyvr12hu",hover:"fyvr12hv",checked:"fyvr12hw"},defaultClass:"fyvr12hr"},textInverse100:{conditions:{base:"fyvr12hx",active:"fyvr12hy",disabled:"fyvr12hz",focus:"fyvr12i0",hover:"fyvr12i1",checked:"fyvr12i2"},defaultClass:"fyvr12hx"},backgroundPrimary:{conditions:{base:"fyvr12i3",active:"fyvr12i4",disabled:"fyvr12i5",focus:"fyvr12i6",hover:"fyvr12i7",checked:"fyvr12i8"},defaultClass:"fyvr12i3"},backgroundSecondary:{conditions:{base:"fyvr12i9",active:"fyvr12ia",disabled:"fyvr12ib",focus:"fyvr12ic",hover:"fyvr12id",checked:"fyvr12ie"},defaultClass:"fyvr12i9"},backgroundContrast:{conditions:{base:"fyvr12if",active:"fyvr12ig",disabled:"fyvr12ih",focus:"fyvr12ii",hover:"fyvr12ij",checked:"fyvr12ik"},defaultClass:"fyvr12if"},backgroundMuted:{conditions:{base:"fyvr12il",active:"fyvr12im",disabled:"fyvr12in",focus:"fyvr12io",hover:"fyvr12ip",checked:"fyvr12iq"},defaultClass:"fyvr12il"},backgroundControl:{conditions:{base:"fyvr12ir",active:"fyvr12is",disabled:"fyvr12it",focus:"fyvr12iu",hover:"fyvr12iv",checked:"fyvr12iw"},defaultClass:"fyvr12ir"},backgroundInverse:{conditions:{base:"fyvr12ix",active:"fyvr12iy",disabled:"fyvr12iz",focus:"fyvr12j0",hover:"fyvr12j1",checked:"fyvr12j2"},defaultClass:"fyvr12ix"},backgroundBackdrop:{conditions:{base:"fyvr12j3",active:"fyvr12j4",disabled:"fyvr12j5",focus:"fyvr12j6",hover:"fyvr12j7",checked:"fyvr12j8"},defaultClass:"fyvr12j3"},backgroundOverlay:{conditions:{base:"fyvr12j9",active:"fyvr12ja",disabled:"fyvr12jb",focus:"fyvr12jc",hover:"fyvr12jd",checked:"fyvr12je"},defaultClass:"fyvr12j9"},backgroundRaised:{conditions:{base:"fyvr12jf",active:"fyvr12jg",disabled:"fyvr12jh",focus:"fyvr12ji",hover:"fyvr12jj",checked:"fyvr12jk"},defaultClass:"fyvr12jf"},buttonGlass:{conditions:{base:"fyvr12jl",active:"fyvr12jm",disabled:"fyvr12jn",focus:"fyvr12jo",hover:"fyvr12jp",checked:"fyvr12jq"},defaultClass:"fyvr12jl"},buttonEmphasis:{conditions:{base:"fyvr12jr",active:"fyvr12js",disabled:"fyvr12jt",focus:"fyvr12ju",hover:"fyvr12jv",checked:"fyvr12jw"},defaultClass:"fyvr12jr"},buttonInverse:{conditions:{base:"fyvr12jx",active:"fyvr12jy",disabled:"fyvr12jz",focus:"fyvr12k0",hover:"fyvr12k1",checked:"fyvr12k2"},defaultClass:"fyvr12jx"},borderNormal:{conditions:{base:"fyvr12k3",active:"fyvr12k4",disabled:"fyvr12k5",focus:"fyvr12k6",hover:"fyvr12k7",checked:"fyvr12k8"},defaultClass:"fyvr12k3"},borderFocus:{conditions:{base:"fyvr12k9",active:"fyvr12ka",disabled:"fyvr12kb",focus:"fyvr12kc",hover:"fyvr12kd",checked:"fyvr12ke"},defaultClass:"fyvr12k9"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12kf",active:"fyvr12kg",disabled:"fyvr12kh",focus:"fyvr12ki",hover:"fyvr12kj",checked:"fyvr12kk"},defaultClass:"fyvr12kf"},dashed:{conditions:{base:"fyvr12kl",active:"fyvr12km",disabled:"fyvr12kn",focus:"fyvr12ko",hover:"fyvr12kp",checked:"fyvr12kq"},defaultClass:"fyvr12kl"},dotted:{conditions:{base:"fyvr12kr",active:"fyvr12ks",disabled:"fyvr12kt",focus:"fyvr12ku",hover:"fyvr12kv",checked:"fyvr12kw"},defaultClass:"fyvr12kr"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12kx",active:"fyvr12ky",disabled:"fyvr12kz",focus:"fyvr12l0",hover:"fyvr12l1",checked:"fyvr12l2"},defaultClass:"fyvr12kx"},white:{conditions:{base:"fyvr12l3",active:"fyvr12l4",disabled:"fyvr12l5",focus:"fyvr12l6",hover:"fyvr12l7",checked:"fyvr12l8"},defaultClass:"fyvr12l3"},inherit:{conditions:{base:"fyvr12l9",active:"fyvr12la",disabled:"fyvr12lb",focus:"fyvr12lc",hover:"fyvr12ld",checked:"fyvr12le"},defaultClass:"fyvr12l9"},transparent:{conditions:{base:"fyvr12lf",active:"fyvr12lg",disabled:"fyvr12lh",focus:"fyvr12li",hover:"fyvr12lj",checked:"fyvr12lk"},defaultClass:"fyvr12lf"},positive:{conditions:{base:"fyvr12ll",active:"fyvr12lm",disabled:"fyvr12ln",focus:"fyvr12lo",hover:"fyvr12lp",checked:"fyvr12lq"},defaultClass:"fyvr12ll"},negative:{conditions:{base:"fyvr12lr",active:"fyvr12ls",disabled:"fyvr12lt",focus:"fyvr12lu",hover:"fyvr12lv",checked:"fyvr12lw"},defaultClass:"fyvr12lr"},info:{conditions:{base:"fyvr12lx",active:"fyvr12ly",disabled:"fyvr12lz",focus:"fyvr12m0",hover:"fyvr12m1",checked:"fyvr12m2"},defaultClass:"fyvr12lx"},warning:{conditions:{base:"fyvr12m3",active:"fyvr12m4",disabled:"fyvr12m5",focus:"fyvr12m6",hover:"fyvr12m7",checked:"fyvr12m8"},defaultClass:"fyvr12m3"},gradientBackdrop:{conditions:{base:"fyvr12m9",active:"fyvr12ma",disabled:"fyvr12mb",focus:"fyvr12mc",hover:"fyvr12md",checked:"fyvr12me"},defaultClass:"fyvr12m9"},gradientPrimary:{conditions:{base:"fyvr12mf",active:"fyvr12mg",disabled:"fyvr12mh",focus:"fyvr12mi",hover:"fyvr12mj",checked:"fyvr12mk"},defaultClass:"fyvr12mf"},gradientSecondary:{conditions:{base:"fyvr12ml",active:"fyvr12mm",disabled:"fyvr12mn",focus:"fyvr12mo",hover:"fyvr12mp",checked:"fyvr12mq"},defaultClass:"fyvr12ml"},arbitrumDark:{conditions:{base:"fyvr12mr",active:"fyvr12ms",disabled:"fyvr12mt",focus:"fyvr12mu",hover:"fyvr12mv",checked:"fyvr12mw"},defaultClass:"fyvr12mr"},arbitrumLight:{conditions:{base:"fyvr12mx",active:"fyvr12my",disabled:"fyvr12mz",focus:"fyvr12n0",hover:"fyvr12n1",checked:"fyvr12n2"},defaultClass:"fyvr12mx"},avalanceDark:{conditions:{base:"fyvr12n3",active:"fyvr12n4",disabled:"fyvr12n5",focus:"fyvr12n6",hover:"fyvr12n7",checked:"fyvr12n8"},defaultClass:"fyvr12n3"},avalanceLight:{conditions:{base:"fyvr12n9",active:"fyvr12na",disabled:"fyvr12nb",focus:"fyvr12nc",hover:"fyvr12nd",checked:"fyvr12ne"},defaultClass:"fyvr12n9"},bscDark:{conditions:{base:"fyvr12nf",active:"fyvr12ng",disabled:"fyvr12nh",focus:"fyvr12ni",hover:"fyvr12nj",checked:"fyvr12nk"},defaultClass:"fyvr12nf"},bscLight:{conditions:{base:"fyvr12nl",active:"fyvr12nm",disabled:"fyvr12nn",focus:"fyvr12no",hover:"fyvr12np",checked:"fyvr12nq"},defaultClass:"fyvr12nl"},ethereumDark:{conditions:{base:"fyvr12nr",active:"fyvr12ns",disabled:"fyvr12nt",focus:"fyvr12nu",hover:"fyvr12nv",checked:"fyvr12nw"},defaultClass:"fyvr12nr"},ethereumLight:{conditions:{base:"fyvr12nx",active:"fyvr12ny",disabled:"fyvr12nz",focus:"fyvr12o0",hover:"fyvr12o1",checked:"fyvr12o2"},defaultClass:"fyvr12nx"},gnosisDark:{conditions:{base:"fyvr12o3",active:"fyvr12o4",disabled:"fyvr12o5",focus:"fyvr12o6",hover:"fyvr12o7",checked:"fyvr12o8"},defaultClass:"fyvr12o3"},gnosisLight:{conditions:{base:"fyvr12o9",active:"fyvr12oa",disabled:"fyvr12ob",focus:"fyvr12oc",hover:"fyvr12od",checked:"fyvr12oe"},defaultClass:"fyvr12o9"},polygonDark:{conditions:{base:"fyvr12of",active:"fyvr12og",disabled:"fyvr12oh",focus:"fyvr12oi",hover:"fyvr12oj",checked:"fyvr12ok"},defaultClass:"fyvr12of"},polygonLight:{conditions:{base:"fyvr12ol",active:"fyvr12om",disabled:"fyvr12on",focus:"fyvr12oo",hover:"fyvr12op",checked:"fyvr12oq"},defaultClass:"fyvr12ol"},text100:{conditions:{base:"fyvr12or",active:"fyvr12os",disabled:"fyvr12ot",focus:"fyvr12ou",hover:"fyvr12ov",checked:"fyvr12ow"},defaultClass:"fyvr12or"},text80:{conditions:{base:"fyvr12ox",active:"fyvr12oy",disabled:"fyvr12oz",focus:"fyvr12p0",hover:"fyvr12p1",checked:"fyvr12p2"},defaultClass:"fyvr12ox"},text50:{conditions:{base:"fyvr12p3",active:"fyvr12p4",disabled:"fyvr12p5",focus:"fyvr12p6",hover:"fyvr12p7",checked:"fyvr12p8"},defaultClass:"fyvr12p3"},textInverse100:{conditions:{base:"fyvr12p9",active:"fyvr12pa",disabled:"fyvr12pb",focus:"fyvr12pc",hover:"fyvr12pd",checked:"fyvr12pe"},defaultClass:"fyvr12p9"},backgroundPrimary:{conditions:{base:"fyvr12pf",active:"fyvr12pg",disabled:"fyvr12ph",focus:"fyvr12pi",hover:"fyvr12pj",checked:"fyvr12pk"},defaultClass:"fyvr12pf"},backgroundSecondary:{conditions:{base:"fyvr12pl",active:"fyvr12pm",disabled:"fyvr12pn",focus:"fyvr12po",hover:"fyvr12pp",checked:"fyvr12pq"},defaultClass:"fyvr12pl"},backgroundContrast:{conditions:{base:"fyvr12pr",active:"fyvr12ps",disabled:"fyvr12pt",focus:"fyvr12pu",hover:"fyvr12pv",checked:"fyvr12pw"},defaultClass:"fyvr12pr"},backgroundMuted:{conditions:{base:"fyvr12px",active:"fyvr12py",disabled:"fyvr12pz",focus:"fyvr12q0",hover:"fyvr12q1",checked:"fyvr12q2"},defaultClass:"fyvr12px"},backgroundControl:{conditions:{base:"fyvr12q3",active:"fyvr12q4",disabled:"fyvr12q5",focus:"fyvr12q6",hover:"fyvr12q7",checked:"fyvr12q8"},defaultClass:"fyvr12q3"},backgroundInverse:{conditions:{base:"fyvr12q9",active:"fyvr12qa",disabled:"fyvr12qb",focus:"fyvr12qc",hover:"fyvr12qd",checked:"fyvr12qe"},defaultClass:"fyvr12q9"},backgroundBackdrop:{conditions:{base:"fyvr12qf",active:"fyvr12qg",disabled:"fyvr12qh",focus:"fyvr12qi",hover:"fyvr12qj",checked:"fyvr12qk"},defaultClass:"fyvr12qf"},backgroundOverlay:{conditions:{base:"fyvr12ql",active:"fyvr12qm",disabled:"fyvr12qn",focus:"fyvr12qo",hover:"fyvr12qp",checked:"fyvr12qq"},defaultClass:"fyvr12ql"},backgroundRaised:{conditions:{base:"fyvr12qr",active:"fyvr12qs",disabled:"fyvr12qt",focus:"fyvr12qu",hover:"fyvr12qv",checked:"fyvr12qw"},defaultClass:"fyvr12qr"},buttonGlass:{conditions:{base:"fyvr12qx",active:"fyvr12qy",disabled:"fyvr12qz",focus:"fyvr12r0",hover:"fyvr12r1",checked:"fyvr12r2"},defaultClass:"fyvr12qx"},buttonEmphasis:{conditions:{base:"fyvr12r3",active:"fyvr12r4",disabled:"fyvr12r5",focus:"fyvr12r6",hover:"fyvr12r7",checked:"fyvr12r8"},defaultClass:"fyvr12r3"},buttonInverse:{conditions:{base:"fyvr12r9",active:"fyvr12ra",disabled:"fyvr12rb",focus:"fyvr12rc",hover:"fyvr12rd",checked:"fyvr12re"},defaultClass:"fyvr12r9"},borderNormal:{conditions:{base:"fyvr12rf",active:"fyvr12rg",disabled:"fyvr12rh",focus:"fyvr12ri",hover:"fyvr12rj",checked:"fyvr12rk"},defaultClass:"fyvr12rf"},borderFocus:{conditions:{base:"fyvr12rl",active:"fyvr12rm",disabled:"fyvr12rn",focus:"fyvr12ro",hover:"fyvr12rp",checked:"fyvr12rq"},defaultClass:"fyvr12rl"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12rr",active:"fyvr12rs",disabled:"fyvr12rt",focus:"fyvr12ru",hover:"fyvr12rv",checked:"fyvr12rw"},defaultClass:"fyvr12rr"},dashed:{conditions:{base:"fyvr12rx",active:"fyvr12ry",disabled:"fyvr12rz",focus:"fyvr12s0",hover:"fyvr12s1",checked:"fyvr12s2"},defaultClass:"fyvr12rx"},dotted:{conditions:{base:"fyvr12s3",active:"fyvr12s4",disabled:"fyvr12s5",focus:"fyvr12s6",hover:"fyvr12s7",checked:"fyvr12s8"},defaultClass:"fyvr12s3"}}},border:{values:{none:{conditions:{base:"fyvr12s9",active:"fyvr12sa",disabled:"fyvr12sb",focus:"fyvr12sc",hover:"fyvr12sd",checked:"fyvr12se"},defaultClass:"fyvr12s9"}}},color:{values:{black:{conditions:{base:"fyvr12sf",active:"fyvr12sg",disabled:"fyvr12sh",focus:"fyvr12si",hover:"fyvr12sj",checked:"fyvr12sk"},defaultClass:"fyvr12sf"},white:{conditions:{base:"fyvr12sl",active:"fyvr12sm",disabled:"fyvr12sn",focus:"fyvr12so",hover:"fyvr12sp",checked:"fyvr12sq"},defaultClass:"fyvr12sl"},inherit:{conditions:{base:"fyvr12sr",active:"fyvr12ss",disabled:"fyvr12st",focus:"fyvr12su",hover:"fyvr12sv",checked:"fyvr12sw"},defaultClass:"fyvr12sr"},transparent:{conditions:{base:"fyvr12sx",active:"fyvr12sy",disabled:"fyvr12sz",focus:"fyvr12t0",hover:"fyvr12t1",checked:"fyvr12t2"},defaultClass:"fyvr12sx"},positive:{conditions:{base:"fyvr12t3",active:"fyvr12t4",disabled:"fyvr12t5",focus:"fyvr12t6",hover:"fyvr12t7",checked:"fyvr12t8"},defaultClass:"fyvr12t3"},negative:{conditions:{base:"fyvr12t9",active:"fyvr12ta",disabled:"fyvr12tb",focus:"fyvr12tc",hover:"fyvr12td",checked:"fyvr12te"},defaultClass:"fyvr12t9"},info:{conditions:{base:"fyvr12tf",active:"fyvr12tg",disabled:"fyvr12th",focus:"fyvr12ti",hover:"fyvr12tj",checked:"fyvr12tk"},defaultClass:"fyvr12tf"},warning:{conditions:{base:"fyvr12tl",active:"fyvr12tm",disabled:"fyvr12tn",focus:"fyvr12to",hover:"fyvr12tp",checked:"fyvr12tq"},defaultClass:"fyvr12tl"},gradientBackdrop:{conditions:{base:"fyvr12tr",active:"fyvr12ts",disabled:"fyvr12tt",focus:"fyvr12tu",hover:"fyvr12tv",checked:"fyvr12tw"},defaultClass:"fyvr12tr"},gradientPrimary:{conditions:{base:"fyvr12tx",active:"fyvr12ty",disabled:"fyvr12tz",focus:"fyvr12u0",hover:"fyvr12u1",checked:"fyvr12u2"},defaultClass:"fyvr12tx"},gradientSecondary:{conditions:{base:"fyvr12u3",active:"fyvr12u4",disabled:"fyvr12u5",focus:"fyvr12u6",hover:"fyvr12u7",checked:"fyvr12u8"},defaultClass:"fyvr12u3"},arbitrumDark:{conditions:{base:"fyvr12u9",active:"fyvr12ua",disabled:"fyvr12ub",focus:"fyvr12uc",hover:"fyvr12ud",checked:"fyvr12ue"},defaultClass:"fyvr12u9"},arbitrumLight:{conditions:{base:"fyvr12uf",active:"fyvr12ug",disabled:"fyvr12uh",focus:"fyvr12ui",hover:"fyvr12uj",checked:"fyvr12uk"},defaultClass:"fyvr12uf"},avalanceDark:{conditions:{base:"fyvr12ul",active:"fyvr12um",disabled:"fyvr12un",focus:"fyvr12uo",hover:"fyvr12up",checked:"fyvr12uq"},defaultClass:"fyvr12ul"},avalanceLight:{conditions:{base:"fyvr12ur",active:"fyvr12us",disabled:"fyvr12ut",focus:"fyvr12uu",hover:"fyvr12uv",checked:"fyvr12uw"},defaultClass:"fyvr12ur"},bscDark:{conditions:{base:"fyvr12ux",active:"fyvr12uy",disabled:"fyvr12uz",focus:"fyvr12v0",hover:"fyvr12v1",checked:"fyvr12v2"},defaultClass:"fyvr12ux"},bscLight:{conditions:{base:"fyvr12v3",active:"fyvr12v4",disabled:"fyvr12v5",focus:"fyvr12v6",hover:"fyvr12v7",checked:"fyvr12v8"},defaultClass:"fyvr12v3"},ethereumDark:{conditions:{base:"fyvr12v9",active:"fyvr12va",disabled:"fyvr12vb",focus:"fyvr12vc",hover:"fyvr12vd",checked:"fyvr12ve"},defaultClass:"fyvr12v9"},ethereumLight:{conditions:{base:"fyvr12vf",active:"fyvr12vg",disabled:"fyvr12vh",focus:"fyvr12vi",hover:"fyvr12vj",checked:"fyvr12vk"},defaultClass:"fyvr12vf"},gnosisDark:{conditions:{base:"fyvr12vl",active:"fyvr12vm",disabled:"fyvr12vn",focus:"fyvr12vo",hover:"fyvr12vp",checked:"fyvr12vq"},defaultClass:"fyvr12vl"},gnosisLight:{conditions:{base:"fyvr12vr",active:"fyvr12vs",disabled:"fyvr12vt",focus:"fyvr12vu",hover:"fyvr12vv",checked:"fyvr12vw"},defaultClass:"fyvr12vr"},polygonDark:{conditions:{base:"fyvr12vx",active:"fyvr12vy",disabled:"fyvr12vz",focus:"fyvr12w0",hover:"fyvr12w1",checked:"fyvr12w2"},defaultClass:"fyvr12vx"},polygonLight:{conditions:{base:"fyvr12w3",active:"fyvr12w4",disabled:"fyvr12w5",focus:"fyvr12w6",hover:"fyvr12w7",checked:"fyvr12w8"},defaultClass:"fyvr12w3"},text100:{conditions:{base:"fyvr12w9",active:"fyvr12wa",disabled:"fyvr12wb",focus:"fyvr12wc",hover:"fyvr12wd",checked:"fyvr12we"},defaultClass:"fyvr12w9"},text80:{conditions:{base:"fyvr12wf",active:"fyvr12wg",disabled:"fyvr12wh",focus:"fyvr12wi",hover:"fyvr12wj",checked:"fyvr12wk"},defaultClass:"fyvr12wf"},text50:{conditions:{base:"fyvr12wl",active:"fyvr12wm",disabled:"fyvr12wn",focus:"fyvr12wo",hover:"fyvr12wp",checked:"fyvr12wq"},defaultClass:"fyvr12wl"},textInverse100:{conditions:{base:"fyvr12wr",active:"fyvr12ws",disabled:"fyvr12wt",focus:"fyvr12wu",hover:"fyvr12wv",checked:"fyvr12ww"},defaultClass:"fyvr12wr"},backgroundPrimary:{conditions:{base:"fyvr12wx",active:"fyvr12wy",disabled:"fyvr12wz",focus:"fyvr12x0",hover:"fyvr12x1",checked:"fyvr12x2"},defaultClass:"fyvr12wx"},backgroundSecondary:{conditions:{base:"fyvr12x3",active:"fyvr12x4",disabled:"fyvr12x5",focus:"fyvr12x6",hover:"fyvr12x7",checked:"fyvr12x8"},defaultClass:"fyvr12x3"},backgroundContrast:{conditions:{base:"fyvr12x9",active:"fyvr12xa",disabled:"fyvr12xb",focus:"fyvr12xc",hover:"fyvr12xd",checked:"fyvr12xe"},defaultClass:"fyvr12x9"},backgroundMuted:{conditions:{base:"fyvr12xf",active:"fyvr12xg",disabled:"fyvr12xh",focus:"fyvr12xi",hover:"fyvr12xj",checked:"fyvr12xk"},defaultClass:"fyvr12xf"},backgroundControl:{conditions:{base:"fyvr12xl",active:"fyvr12xm",disabled:"fyvr12xn",focus:"fyvr12xo",hover:"fyvr12xp",checked:"fyvr12xq"},defaultClass:"fyvr12xl"},backgroundInverse:{conditions:{base:"fyvr12xr",active:"fyvr12xs",disabled:"fyvr12xt",focus:"fyvr12xu",hover:"fyvr12xv",checked:"fyvr12xw"},defaultClass:"fyvr12xr"},backgroundBackdrop:{conditions:{base:"fyvr12xx",active:"fyvr12xy",disabled:"fyvr12xz",focus:"fyvr12y0",hover:"fyvr12y1",checked:"fyvr12y2"},defaultClass:"fyvr12xx"},backgroundOverlay:{conditions:{base:"fyvr12y3",active:"fyvr12y4",disabled:"fyvr12y5",focus:"fyvr12y6",hover:"fyvr12y7",checked:"fyvr12y8"},defaultClass:"fyvr12y3"},backgroundRaised:{conditions:{base:"fyvr12y9",active:"fyvr12ya",disabled:"fyvr12yb",focus:"fyvr12yc",hover:"fyvr12yd",checked:"fyvr12ye"},defaultClass:"fyvr12y9"},buttonGlass:{conditions:{base:"fyvr12yf",active:"fyvr12yg",disabled:"fyvr12yh",focus:"fyvr12yi",hover:"fyvr12yj",checked:"fyvr12yk"},defaultClass:"fyvr12yf"},buttonEmphasis:{conditions:{base:"fyvr12yl",active:"fyvr12ym",disabled:"fyvr12yn",focus:"fyvr12yo",hover:"fyvr12yp",checked:"fyvr12yq"},defaultClass:"fyvr12yl"},buttonInverse:{conditions:{base:"fyvr12yr",active:"fyvr12ys",disabled:"fyvr12yt",focus:"fyvr12yu",hover:"fyvr12yv",checked:"fyvr12yw"},defaultClass:"fyvr12yr"},borderNormal:{conditions:{base:"fyvr12yx",active:"fyvr12yy",disabled:"fyvr12yz",focus:"fyvr12z0",hover:"fyvr12z1",checked:"fyvr12z2"},defaultClass:"fyvr12yx"},borderFocus:{conditions:{base:"fyvr12z3",active:"fyvr12z4",disabled:"fyvr12z5",focus:"fyvr12z6",hover:"fyvr12z7",checked:"fyvr12z8"},defaultClass:"fyvr12z3"}}},cursor:{values:{default:{conditions:{base:"fyvr12z9",active:"fyvr12za",disabled:"fyvr12zb",focus:"fyvr12zc",hover:"fyvr12zd",checked:"fyvr12ze"},defaultClass:"fyvr12z9"},pointer:{conditions:{base:"fyvr12zf",active:"fyvr12zg",disabled:"fyvr12zh",focus:"fyvr12zi",hover:"fyvr12zj",checked:"fyvr12zk"},defaultClass:"fyvr12zf"},text:{conditions:{base:"fyvr12zl",active:"fyvr12zm",disabled:"fyvr12zn",focus:"fyvr12zo",hover:"fyvr12zp",checked:"fyvr12zq"},defaultClass:"fyvr12zl"}}},opacity:{values:{0:{conditions:{base:"fyvr12zr",active:"fyvr12zs",disabled:"fyvr12zt",focus:"fyvr12zu",hover:"fyvr12zv",checked:"fyvr12zw"},defaultClass:"fyvr12zr"},50:{conditions:{base:"fyvr12zx",active:"fyvr12zy",disabled:"fyvr12zz",focus:"fyvr1300",hover:"fyvr1301",checked:"fyvr1302"},defaultClass:"fyvr12zx"},80:{conditions:{base:"fyvr1303",active:"fyvr1304",disabled:"fyvr1305",focus:"fyvr1306",hover:"fyvr1307",checked:"fyvr1308"},defaultClass:"fyvr1303"},100:{conditions:{base:"fyvr1309",active:"fyvr130a",disabled:"fyvr130b",focus:"fyvr130c",hover:"fyvr130d",checked:"fyvr130e"},defaultClass:"fyvr1309"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr130f",active:"fyvr130g",disabled:"fyvr130h",focus:"fyvr130i",hover:"fyvr130j",checked:"fyvr130k"},defaultClass:"fyvr130f"},auto:{conditions:{base:"fyvr130l",active:"fyvr130m",disabled:"fyvr130n",focus:"fyvr130o",hover:"fyvr130p",checked:"fyvr130q"},defaultClass:"fyvr130l"}}},outline:{values:{none:{conditions:{base:"fyvr130r",active:"fyvr130s",disabled:"fyvr130t",focus:"fyvr130u",hover:"fyvr130v",checked:"fyvr130w"},defaultClass:"fyvr130r"}}},boxShadow:{values:{none:{conditions:{base:"fyvr130x",active:"fyvr130y",disabled:"fyvr130z",focus:"fyvr1310",hover:"fyvr1311",checked:"fyvr1312"},defaultClass:"fyvr130x"}}}}});const tq=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],fw=t=>(t.display||(t.display=Object.keys(t).some(e=>tq.includes(e))?"flex":void 0),wP(t));fw.properties=wP.properties;const rq="https://assets.sequence.info/",nq=5,sq={xs:"small",sm:"small",md:"medium",lg:"large",xl:"large"},EP=t=>t?sq[t]||t:"medium",iq=(t,e)=>t.replace(/\/(small|medium|large)\//,`/${EP(e)}/`),oq=(t,e)=>rq+`images/networks/${EP(e)}/${t}.webp?v${nq}`;function CP(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const{as:r="div",sx:n={},className:s,...i}=t,o={},a={};for(const l in i)fw.properties.has(l)?o[l]=i[l]:a[l]=i[l];const c=fw({...o,...n});return x.createElement(r,{className:or(c,s),...a,ref:e})});var kP={exports:{}},Ud={};/** - * @license React - * react-jsx-runtime.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 dA;function aq(){if(dA)return Ud;dA=1;var t=Vr,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!i.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:s.current}}return Ud.Fragment=r,Ud.jsx=o,Ud.jsxs=o,Ud}kP.exports=aq();var C=kP.exports;function cq(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function lq(t){var e=cq(t,"string");return typeof e=="symbol"?e:String(e)}function uq(t,e,r){return e=lq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hA(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function pA(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},St=t=>{var e=r=>{var n=t.defaultClassName,s=pA(pA({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[i][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)fq(u,s,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return yA(t.variantClassNames,r=>yA(r,n=>n.split(" ")[0]))}},e};St({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"_2q9vfj8 _2q9vfj0 fyvr11t3",warning:"_2q9vfj9 _2q9vfj1 fyvr11t9",success:"_2q9vfja _2q9vfj2 fyvr11sr",error:"_2q9vfjb _2q9vfj3 fyvr11sx"},size:{sm:"_2q9vfjc _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc _2q9vfj4 fyvr1zc fyvr111g fyvr144 fyvr1f4",md:"_2q9vfjd _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _2q9vfj5 fyvr1zg fyvr111k fyvr148 fyvr1f8",lg:"_2q9vfje _1qxj1ib9 _1qxj1ibd _1qxj1ib3 fyvr11r3 fyvr11is fyvr11kc fyvr11jw fyvr11jk _2q9vfj6 fyvr1zk fyvr111o fyvr14c fyvr1fc"}},defaultVariants:{},compoundVariants:[]});const gA=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return C.jsx(Ce,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var dq=St({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"_1qxj1iba _1qxj1ib0 fyvr11r2 fyvr11ic fyvr11ko fyvr11jo fyvr11j4",xlarge:"_1qxj1ibb _1qxj1ib1 fyvr11r3 fyvr11j0 fyvr11kk fyvr11js fyvr11jk",large:"_1qxj1ibc _1qxj1ib2 fyvr11r3 fyvr11iw fyvr11kg fyvr11jw fyvr11jg",medium:"_1qxj1ibd _1qxj1ib3 fyvr11r3 fyvr11is fyvr11kc fyvr11jw fyvr11jk",normal:"_1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8",small:"_1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc",xsmall:"_1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk",code:"_1qxj1ibh _1qxj1ib7 fyvr11r4 fyvr11io fyvr11k8 fyvr11js fyvr11j8"},ellipsis:{true:"_1qxj1ibi _1qxj1ib8 fyvr11q0 fyvr11qg fyvr11rh fyvr11r5"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const Tt=x.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=KG[n];return C.jsx(Ce,{as:r,className:or(s,dq({hidden:i,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var hq=St({defaultClassName:"_140wn8ni _140wn8n0 fyvr11q0 fyvr11qg fyvr11rh fyvr11ow fyvr12s9 fyvr11ra fyvr11l8 _4efw240",variantClassNames:{variant:{base:"_140wn8nj _140wn8n1 fyvr11sl fyvr12w9",ghost:"_140wn8nk _140wn8n2 fyvr11sl fyvr12w9",feature:"_140wn8nl _140wn8n3 fyvr11tr fyvr12sl",primary:"_140wn8nm _140wn8n4 fyvr11tl fyvr12sl",glass:"_140wn8nn _140wn8n5 fyvr11y3 fyvr12w9",emphasis:"_140wn8no _140wn8n6 fyvr11y9 fyvr12w9",raised:"_140wn8np _140wn8n7 fyvr11xx fyvr12w9",danger:"_140wn8nq _140wn8n8 fyvr11sx fyvr12sl",text:"_140wn8nr _1qxj1ib9 _1qxj1ibf _1qxj1ib5 fyvr11r3 fyvr11ik fyvr11k4 fyvr11k0 fyvr11jc _140wn8n9 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr11sl fyvr12wl"},shape:{circle:"_140wn8ns _140wn8na fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw",square:"_140wn8nt _140wn8nb fyvr11h8 fyvr11hw fyvr11fw fyvr11gk"},disabled:{true:"_140wn8nu _140wn8nc fyvr12z9 fyvr12zx",false:"_140wn8nv _140wn8nd fyvr12zf fyvr1309 fyvr1307"},size:{xs:"_140wn8nw _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk _140wn8ne fyvr1zg fyvr111k",sm:"_140wn8nx _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8nf fyvr1zk fyvr111o",md:"_140wn8ny _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8ng fyvr1zo fyvr111s",lg:"_140wn8nz _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _140wn8nh fyvr1zo fyvr111s"},iconOnly:{true:"_140wn8n10"},hasLeftIcon:{true:"_140wn8n11"},hasRightIcon:{true:"_140wn8n12"},activeOutline:{light:"_140wn8n13",bold:"_140wn8n14"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n15"],[{iconOnly:!0,size:"sm"},"_140wn8n16"],[{iconOnly:!0,size:"md"},"_140wn8n17"],[{iconOnly:!0,size:"lg"},"_140wn8n18"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n1b"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n1c"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1d"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1e"]]});const Ve=x.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:y="fit",shape:p="circle",type:b="button",...g}=t,v=u!==void 0&&l!==void 0,m=f!==void 0&&l!==void 0,k=u!==void 0&&l===void 0,A=d==="xs"?"xs":"sm";return C.jsx(Ce,{as:r,className:or(s,hq({activeOutline:n,disabled:i||c,hasLeftIcon:v,hasRightIcon:m,iconOnly:k,size:h==="text"?void 0:d,shape:h==="text"?void 0:p,variant:h})),disabled:i||c,display:o,fontWeight:a,ref:e,type:b,width:y,...g,children:k?C.jsx(u,{size:A}):C.jsxs(Ce,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[C.jsxs(Ce,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&C.jsx(u,{size:A}),C.jsx(Tt,{children:l})]}),f&&C.jsx(f,{size:A})]})})});var pq=St({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"rhmai64 rhmai60 fyvr11ec fyvr11eo fyvr11f0 fyvr11fc fyvr1307 fyvr12zf _4efw240"},disabled:{true:"rhmai65"},outlined:{true:"rhmai66 rhmai61 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr12rf fyvr12k3 fyvr125f fyvr12cr fyvr12rr fyvr12kf fyvr125r fyvr12d3"},blur:{true:"rhmai67 rhmai62 fyvr11r0"}},defaultVariants:{},compoundVariants:[]});const yq=x.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:c="full",...l}=t;return C.jsx(Ce,{className:or(r,pq({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function gq(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function hv(...t){return e=>t.forEach(r=>gq(r,e))}function We(...t){return x.useCallback(hv(...t),t)}function vq(t,e){const r=x.createContext(e);function n(i){const{children:o,...a}=i,c=x.useMemo(()=>a,Object.values(a));return C.jsx(r.Provider,{value:c,children:o})}function s(i){const o=x.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return n.displayName=t+"Provider",[n,s]}function Br(t,e=[]){let r=[];function n(i,o){const a=x.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...y}=f,p=(d==null?void 0:d[t][c])||a,b=x.useMemo(()=>y,Object.values(y));return C.jsx(p.Provider,{value:b,children:h})}function u(f,d){const h=(d==null?void 0:d[t][c])||a,y=x.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const s=()=>{const i=r.map(o=>x.createContext(o));return function(a){const c=(a==null?void 0:a[t])||i;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return s.scopeName=t,[n,mq(s,...e)]}function mq(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(i)[`__scope${l}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function ce(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Mr(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function as({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=xq({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Mr(r),c=x.useCallback(l=>{if(i){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else s(l)},[i,t,s,a]);return[o,c]}function xq({defaultProp:t,onChange:e}){const r=x.useState(t),[n]=r,s=x.useRef(n),i=Mr(e);return x.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function pv(t){const e=x.useRef({value:t,previous:t});return x.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var br=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function yv(t){const[e,r]=x.useState(void 0);return br(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function bq(t,e){return x.useReducer((r,n)=>e[r][n]??r,t)}var Xr=t=>{const{present:e,children:r}=t,n=wq(e),s=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),i=We(n.ref,Eq(s));return typeof r=="function"||n.isPresent?x.cloneElement(s,{ref:i}):null};Xr.displayName="Presence";function wq(t){const[e,r]=x.useState(),n=x.useRef({}),s=x.useRef(t),i=x.useRef("none"),o=t?"mounted":"unmounted",[a,c]=bq(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const l=tp(n.current);i.current=a==="mounted"?l:"none"},[a]),br(()=>{const l=n.current,u=s.current;if(u!==t){const d=i.current,h=tp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),br(()=>{if(e){const l=f=>{const h=tp(n.current).includes(f.animationName);f.target===e&&h&&ja.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(i.current=tp(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function tp(t){return(t==null?void 0:t.animationName)||"none"}function Eq(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var ul=x.forwardRef((t,e)=>{const{children:r,...n}=t,s=x.Children.toArray(r),i=s.find(Cq);if(i){const o=i.props.children,a=s.map(c=>c===i?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:c);return C.jsx(dw,{...n,ref:e,children:x.isValidElement(o)?x.cloneElement(o,void 0,a):null})}return C.jsx(dw,{...n,ref:e,children:r})});ul.displayName="Slot";var dw=x.forwardRef((t,e)=>{const{children:r,...n}=t;if(x.isValidElement(r)){const s=Sq(r);return x.cloneElement(r,{...kq(n,r.props),ref:e?hv(e,s):s})}return x.Children.count(r)>1?x.Children.only(null):null});dw.displayName="SlotClone";var SP=({children:t})=>C.jsx(C.Fragment,{children:t});function Cq(t){return x.isValidElement(t)&&t.type===SP}function kq(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function Sq(t){var e,r;let n=(e=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:e.get,s=n&&"isReactWarning"in n&&n.isReactWarning;return s?t.ref:(n=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,s=n&&"isReactWarning"in n&&n.isReactWarning,s?t.props.ref:t.props.ref||t.ref)}var Aq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Se=Aq.reduce((t,e)=>{const r=x.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?ul:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(a,{...o,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function bC(t,e){t&&ja.flushSync(()=>t.dispatchEvent(e))}var wC="Checkbox",[Tq,Zde]=Br(wC),[Iq,Pq]=Tq(wC),AP=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=x.useState(null),h=We(e,m=>d(m)),y=x.useRef(!1),p=f?!!f.closest("form"):!0,[b=!1,g]=as({prop:s,defaultProp:i,onChange:l}),v=x.useRef(b);return x.useEffect(()=>{const m=f==null?void 0:f.form;if(m){const k=()=>g(v.current);return m.addEventListener("reset",k),()=>m.removeEventListener("reset",k)}},[f,g]),C.jsxs(Iq,{scope:r,state:b,disabled:a,children:[C.jsx(Se.button,{type:"button",role:"checkbox","aria-checked":Yc(b)?"mixed":b,"aria-required":o,"data-state":PP(b),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onKeyDown:ce(t.onKeyDown,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:ce(t.onClick,m=>{g(k=>Yc(k)?!0:!k),p&&(y.current=m.isPropagationStopped(),y.current||m.stopPropagation())})}),p&&C.jsx(Oq,{control:f,bubbles:!y.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});AP.displayName=wC;var TP="CheckboxIndicator",IP=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=Pq(TP,r);return C.jsx(Xr,{present:n||Yc(i.state)||i.state===!0,children:C.jsx(Se.span,{"data-state":PP(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});IP.displayName=TP;var Oq=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=pv(r),a=yv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=Yc(r),f.call(c,Yc(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Yc(r)?!1:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Yc(t){return t==="indeterminate"}function PP(t){return Yc(t)?"indeterminate":t?"checked":"unchecked"}var Rq=AP,Nq=IP,_q=St({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"_43lu9r5 _43lu9r0 fyvr11p4 fyvr11mc fyvr11ck fyvr11l8",left:"_43lu9r6 _43lu9r1 fyvr11ow fyvr11mk fyvr11ck fyvr11l8",right:"_43lu9r7 _43lu9r2 fyvr11ow fyvr11mk fyvr11ck fyvr11l8",hidden:"_43lu9r8 _43lu9r3 fyvr11c8 fyvr11l8"}},defaultVariants:{},compoundVariants:[]});const dd=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?C.jsxs(Ce,{flexDirection:"column",gap:"0.5",children:[r&&C.jsx(Tt,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&C.jsx(Tt,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return C.jsxs(Ce,{as:"label",className:_q({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var hd=St({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const Mq=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),OP=({size:t="sm",...e})=>C.jsx(Ce,{as:Mq,className:hd({size:t}),...e}),Dq=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),RP=({size:t="sm",...e})=>C.jsx(Ce,{as:Dq,className:hd({size:t}),...e}),Bq=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),EC=({size:t="sm",...e})=>C.jsx(Ce,{as:Bq,className:hd({size:t}),...e}),Lq=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.608 6.75h-5.19v-1.5h7.75V13h-1.5V7.81l-7.72 7.72-1.06-1.06 7.72-7.72Z",clipRule:"evenodd"})}),jq=({size:t="sm",...e})=>C.jsx(Ce,{as:Lq,className:hd({size:t}),...e}),Fq=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),Uq=({size:t="sm",...e})=>C.jsx(Ce,{as:Fq,className:hd({size:t}),...e}),$q=t=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:C.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),Wq=({size:t="sm",...e})=>C.jsx(Ce,{as:$q,className:hd({size:t}),...e});var Vq=St({defaultClassName:"_1c9x66f1 _1c9x66f0 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr12rl fyvr12k9 fyvr125l fyvr12cx fyvr12rr fyvr12kf fyvr125r fyvr12d3 fyvr11l8 fyvr11ow fyvr11no fyvr11sl fyvr1309 fyvr1307 fyvr12zz fyvr12zf fyvr12zb _4efw240",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),zq="_1c9x66f4 fyvr12w9 fyvr11l8 fyvr11ow fyvr11no fyvr12g fyvr164";const Hq=({size:t="sm"})=>C.jsx(Nq,{className:zq,children:C.jsx(OP,{size:t==="lg"?"sm":"xs"})});x.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...c}=t;return C.jsx(dd,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:C.jsx(Rq,{className:Vq({size:a}),disabled:r,id:n??s,name:s,ref:e,...c,children:C.jsx(Hq,{size:a})})})});Vr.createContext(null);var Gq=gU.useId||(()=>{}),qq=0;function rs(t){const[e,r]=x.useState(Gq());return br(()=>{t||r(n=>n??String(qq++))},[t]),t||(e?`radix-${e}`:"")}var CC="Collapsible",[Kq,ehe]=Br(CC),[Qq,kC]=Kq(CC),NP=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[c=!1,l]=as({prop:n,defaultProp:s,onChange:o});return C.jsx(Qq,{scope:r,disabled:i,contentId:rs(),open:c,onOpenToggle:x.useCallback(()=>l(u=>!u),[l]),children:C.jsx(Se.div,{"data-state":AC(c),"data-disabled":i?"":void 0,...a,ref:e})})});NP.displayName=CC;var _P="CollapsibleTrigger",MP=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=kC(_P,r);return C.jsx(Se.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":AC(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:ce(t.onClick,s.onOpenToggle)})});MP.displayName=_P;var SC="CollapsibleContent",DP=x.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=kC(SC,t.__scopeCollapsible);return C.jsx(Xr,{present:r||s.open,children:({present:i})=>C.jsx(Jq,{...n,ref:e,present:i})})});DP.displayName=SC;var Jq=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=kC(SC,r),[a,c]=x.useState(n),l=x.useRef(null),u=We(e,l),f=x.useRef(0),d=f.current,h=x.useRef(0),y=h.current,p=o.open||a,b=x.useRef(p),g=x.useRef();return x.useEffect(()=>{const v=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(v)},[]),br(()=>{const v=l.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const m=v.getBoundingClientRect();f.current=m.height,h.current=m.width,b.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(n)}},[o.open,n]),C.jsx(Se.div,{"data-state":AC(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!p,...i,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:p&&s})});function AC(t){return t?"open":"closed"}var Yq=NP,Xq=MP,Zq=DP,vA="64px",eK="_4j62fl0",tK="_4j62fl2 _4j62fl1 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11l8 fyvr11ow fyvr11sl fyvr12g fyvr12zf fyvr11rc _4efw240",rK="_4j62fl4 _4j62fl3 fyvr1zk fyvr111o fyvr1uw fyvr1xg fyvr12g",nK="_4j62fl5";const sK=t=>{const{className:e,children:r,defaultOpen:n,open:s,onOpenChange:i,label:o,...a}=t,[c,l]=x.useState(n),u=s??c,f=h=>{s===void 0&&l(h)},d=h=>{f(h),i==null||i(h)};return C.jsx(Yq,{open:u,defaultOpen:n,onOpenChange:d,asChild:!0,children:C.jsxs(Ce,{as:Au.div,className:or(e,eK),initial:{height:u?"auto":vA},animate:{height:u?"auto":vA},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...a,children:[C.jsxs(Xq,{className:tK,children:[C.jsx(Tt,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:o}),C.jsx(Ce,{as:Au.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:u?180:0},animate:{rotate:u?180:0},transition:{ease:"linear",duration:.1},children:C.jsx(RP,{className:nK,color:"text50"})})]}),C.jsx(xP,{children:u&&C.jsx(Zq,{className:rK,asChild:!0,forceMount:!0,children:C.jsx(Au.div,{initial:{opacity:u?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function gv(t){const e=t+"CollectionProvider",[r,n]=Br(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:y,children:p}=h,b=Vr.useRef(null),g=Vr.useRef(new Map).current;return C.jsx(s,{scope:y,itemMap:g,collectionRef:b,children:p})};o.displayName=e;const a=t+"CollectionSlot",c=Vr.forwardRef((h,y)=>{const{scope:p,children:b}=h,g=i(a,p),v=We(y,g.collectionRef);return C.jsx(ul,{ref:v,children:b})});c.displayName=a;const l=t+"CollectionItemSlot",u="data-radix-collection-item",f=Vr.forwardRef((h,y)=>{const{scope:p,children:b,...g}=h,v=Vr.useRef(null),m=We(y,v),k=i(l,p);return Vr.useEffect(()=>(k.itemMap.set(v,{ref:v,...g}),()=>void k.itemMap.delete(v))),C.jsx(ul,{[u]:"",ref:m,children:b})});f.displayName=l;function d(h){const y=i(t+"CollectionConsumer",h);return Vr.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const g=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((k,A)=>g.indexOf(k.ref.current)-g.indexOf(A.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}var iK=x.createContext(void 0);function u1(t){const e=x.useContext(iK);return t||e||"ltr"}function oK(t,e=globalThis==null?void 0:globalThis.document){const r=Mr(t);x.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var aK="DismissableLayer",hw="dismissableLayer.update",cK="dismissableLayer.pointerDownOutside",lK="dismissableLayer.focusOutside",mA,BP=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pd=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...c}=t,l=x.useContext(BP),[u,f]=x.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=x.useState({}),y=We(e,R=>f(R)),p=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=p.indexOf(b),v=u?p.indexOf(u):-1,m=l.layersWithOutsidePointerEventsDisabled.size>0,k=v>=g,A=fK(R=>{const N=R.target,V=[...l.branches].some(F=>F.contains(N));!k||V||(s==null||s(R),o==null||o(R),R.defaultPrevented||a==null||a())},d),P=dK(R=>{const N=R.target;[...l.branches].some(F=>F.contains(N))||(i==null||i(R),o==null||o(R),R.defaultPrevented||a==null||a())},d);return oK(R=>{v===l.layers.size-1&&(n==null||n(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},d),x.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(mA=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),xA(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=mA)}},[u,d,r,l]),x.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),xA())},[u,l]),x.useEffect(()=>{const R=()=>h({});return document.addEventListener(hw,R),()=>document.removeEventListener(hw,R)},[]),C.jsx(Se.div,{...c,ref:y,style:{pointerEvents:m?k?"auto":"none":void 0,...t.style},onFocusCapture:ce(t.onFocusCapture,P.onFocusCapture),onBlurCapture:ce(t.onBlurCapture,P.onBlurCapture),onPointerDownCapture:ce(t.onPointerDownCapture,A.onPointerDownCapture)})});pd.displayName=aK;var uK="DismissableLayerBranch",LP=x.forwardRef((t,e)=>{const r=x.useContext(BP),n=x.useRef(null),s=We(e,n);return x.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),C.jsx(Se.div,{...t,ref:s})});LP.displayName=uK;function fK(t,e=globalThis==null?void 0:globalThis.document){const r=Mr(t),n=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){jP(cK,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function dK(t,e=globalThis==null?void 0:globalThis.document){const r=Mr(t),n=x.useRef(!1);return x.useEffect(()=>{const s=i=>{i.target&&!n.current&&jP(lK,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function xA(){const t=new CustomEvent(hw);document.dispatchEvent(t)}function jP(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?bC(s,i):s.dispatchEvent(i)}var hK=pd,pK=LP,lx=0;function TC(){x.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??bA()),document.body.insertAdjacentElement("beforeend",t[1]??bA()),lx++,()=>{lx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),lx--}},[])}function bA(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var ux="focusScope.autoFocusOnMount",fx="focusScope.autoFocusOnUnmount",wA={bubbles:!1,cancelable:!0},yK="FocusScope",vv=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,c]=x.useState(null),l=Mr(s),u=Mr(i),f=x.useRef(null),d=We(e,p=>c(p)),h=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let p=function(m){if(h.paused||!a)return;const k=m.target;a.contains(k)?f.current=k:Oo(f.current,{select:!0})},b=function(m){if(h.paused||!a)return;const k=m.relatedTarget;k!==null&&(a.contains(k)||Oo(f.current,{select:!0}))},g=function(m){if(document.activeElement===document.body)for(const A of m)A.removedNodes.length>0&&Oo(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",b);const v=new MutationObserver(g);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",b),v.disconnect()}}},[n,a,h.paused]),x.useEffect(()=>{if(a){CA.add(h);const p=document.activeElement;if(!a.contains(p)){const g=new CustomEvent(ux,wA);a.addEventListener(ux,l),a.dispatchEvent(g),g.defaultPrevented||(gK(wK(FP(a)),{select:!0}),document.activeElement===p&&Oo(a))}return()=>{a.removeEventListener(ux,l),setTimeout(()=>{const g=new CustomEvent(fx,wA);a.addEventListener(fx,u),a.dispatchEvent(g),g.defaultPrevented||Oo(p??document.body,{select:!0}),a.removeEventListener(fx,u),CA.remove(h)},0)}}},[a,l,u,h]);const y=x.useCallback(p=>{if(!r&&!n||h.paused)return;const b=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,g=document.activeElement;if(b&&g){const v=p.currentTarget,[m,k]=vK(v);m&&k?!p.shiftKey&&g===k?(p.preventDefault(),r&&Oo(m,{select:!0})):p.shiftKey&&g===m&&(p.preventDefault(),r&&Oo(k,{select:!0})):g===v&&p.preventDefault()}},[r,n,h.paused]);return C.jsx(Se.div,{tabIndex:-1,...o,ref:d,onKeyDown:y})});vv.displayName=yK;function gK(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Oo(n,{select:e}),document.activeElement!==r)return}function vK(t){const e=FP(t),r=EA(e,t),n=EA(e.reverse(),t);return[r,n]}function FP(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function EA(t,e){for(const r of t)if(!mK(r,{upTo:e}))return r}function mK(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function xK(t){return t instanceof HTMLInputElement&&"select"in t}function Oo(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&xK(t)&&e&&t.select()}}var CA=bK();function bK(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=kA(t,e),t.unshift(e)},remove(e){var r;t=kA(t,e),(r=t[0])==null||r.resume()}}}function kA(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function wK(t){return t.filter(e=>e.tagName!=="A")}const EK=["top","right","bottom","left"],ai=Math.min,Sn=Math.max,Jy=Math.round,rp=Math.floor,Pa=t=>({x:t,y:t}),CK={left:"right",right:"left",bottom:"top",top:"bottom"},kK={start:"end",end:"start"};function pw(t,e,r){return Sn(t,ai(e,r))}function co(t,e){return typeof t=="function"?t(e):t}function lo(t){return t.split("-")[0]}function yd(t){return t.split("-")[1]}function IC(t){return t==="x"?"y":"x"}function PC(t){return t==="y"?"height":"width"}function Oa(t){return["top","bottom"].includes(lo(t))?"y":"x"}function OC(t){return IC(Oa(t))}function SK(t,e,r){r===void 0&&(r=!1);const n=yd(t),s=OC(t),i=PC(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Yy(o)),[o,Yy(o)]}function AK(t){const e=Yy(t);return[yw(t),e,yw(e)]}function yw(t){return t.replace(/start|end/g,e=>kK[e])}function TK(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function IK(t,e,r,n){const s=yd(t);let i=TK(lo(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(yw)))),i}function Yy(t){return t.replace(/left|right|bottom|top/g,e=>CK[e])}function PK(t){return{top:0,right:0,bottom:0,left:0,...t}}function UP(t){return typeof t!="number"?PK(t):{top:t,right:t,bottom:t,left:t}}function Xy(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function SA(t,e,r){let{reference:n,floating:s}=t;const i=Oa(e),o=OC(e),a=PC(o),c=lo(e),l=i==="y",u=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(yd(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const OK=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=SA(l,n,c),d=n,h={},y=0;for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=co(t,e)||{};if(l==null)return{};const f=UP(u),d={x:r,y:n},h=OC(s),y=PC(h),p=await o.getDimensions(l),b=h==="y",g=b?"top":"left",v=b?"bottom":"right",m=b?"clientHeight":"clientWidth",k=i.reference[y]+i.reference[h]-d[h]-i.floating[y],A=d[h]-i.reference[h],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let R=P?P[m]:0;(!R||!await(o.isElement==null?void 0:o.isElement(P)))&&(R=a.floating[m]||i.floating[y]);const N=k/2-A/2,V=R/2-p[y]/2-1,F=ai(f[g],V),X=ai(f[v],V),re=F,le=R-p[y]-X,ee=R/2-p[y]/2+N,B=pw(re,ee,le),G=!c.arrow&&yd(s)!=null&&ee!==B&&i.reference[y]/2-(eeee<=0)){var X,re;const ee=(((X=i.flip)==null?void 0:X.index)||0)+1,B=R[ee];if(B)return{data:{index:ee,overflows:F},reset:{placement:B}};let G=(re=F.filter(Z=>Z.overflows[0]<=0).sort((Z,E)=>Z.overflows[1]-E.overflows[1])[0])==null?void 0:re.placement;if(!G)switch(h){case"bestFit":{var le;const Z=(le=F.filter(E=>{if(P){const S=Oa(E.placement);return S===v||S==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(S=>S>0).reduce((S,O)=>S+O,0)]).sort((E,S)=>E[1]-S[1])[0])==null?void 0:le[0];Z&&(G=Z);break}case"initialPlacement":G=a;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function AA(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function TA(t){return EK.some(e=>t[e]>=0)}const _K=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=co(t,e);switch(n){case"referenceHidden":{const i=await d0(e,{...s,elementContext:"reference"}),o=AA(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:TA(o)}}}case"escaped":{const i=await d0(e,{...s,altBoundary:!0}),o=AA(i,r.floating);return{data:{escapedOffsets:o,escaped:TA(o)}}}default:return{}}}}};async function MK(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=lo(r),a=yd(r),c=Oa(r)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,f=co(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const DK=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,c=await MK(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},BK=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y:v}=b;return{x:g,y:v}}},...c}=co(t,e),l={x:r,y:n},u=await d0(e,c),f=Oa(lo(s)),d=IC(f);let h=l[d],y=l[f];if(i){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=h+u[b],m=h-u[g];h=pw(v,h,m)}if(o){const b=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=y+u[b],m=y-u[g];y=pw(v,y,m)}const p=a.fn({...e,[d]:h,[f]:y});return{...p,data:{x:p.x-r,y:p.y-n}}}}},LK=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=co(t,e),u={x:r,y:n},f=Oa(s),d=IC(f);let h=u[d],y=u[f];const p=co(a,e),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const m=d==="y"?"height":"width",k=i.reference[d]-i.floating[m]+b.mainAxis,A=i.reference[d]+i.reference[m]-b.mainAxis;hA&&(h=A)}if(l){var g,v;const m=d==="y"?"width":"height",k=["top","left"].includes(lo(s)),A=i.reference[f]-i.floating[m]+(k&&((g=o.offset)==null?void 0:g[f])||0)+(k?0:b.crossAxis),P=i.reference[f]+i.reference[m]+(k?0:((v=o.offset)==null?void 0:v[f])||0)-(k?b.crossAxis:0);yP&&(y=P)}return{[d]:h,[f]:y}}}},jK=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=co(t,e),c=await d0(e,a),l=lo(r),u=yd(r),f=Oa(r)==="y",{width:d,height:h}=n.floating;let y,p;l==="top"||l==="bottom"?(y=l,p=u===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(p=l,y=u==="end"?"top":"bottom");const b=h-c.top-c.bottom,g=d-c.left-c.right,v=ai(h-c[y],b),m=ai(d-c[p],g),k=!e.middlewareData.shift;let A=v,P=m;if(f?P=u||k?ai(m,g):g:A=u||k?ai(v,b):b,k&&!u){const N=Sn(c.left,0),V=Sn(c.right,0),F=Sn(c.top,0),X=Sn(c.bottom,0);f?P=d-2*(N!==0||V!==0?N+V:Sn(c.left,c.right)):A=h-2*(F!==0||X!==0?F+X:Sn(c.top,c.bottom))}await o({...e,availableWidth:P,availableHeight:A});const R=await s.getDimensions(i.floating);return d!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}};function gd(t){return $P(t)?(t.nodeName||"").toLowerCase():"#document"}function Pn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function po(t){var e;return(e=($P(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $P(t){return t instanceof Node||t instanceof Pn(t).Node}function gi(t){return t instanceof Element||t instanceof Pn(t).Element}function vi(t){return t instanceof HTMLElement||t instanceof Pn(t).HTMLElement}function IA(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pn(t).ShadowRoot}function f1(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Ms(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function FK(t){return["table","td","th"].includes(gd(t))}function mv(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function RC(t){const e=NC(),r=Ms(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function UK(t){let e=Ra(t);for(;vi(e)&&!$f(e);){if(mv(e))return null;if(RC(e))return e;e=Ra(e)}return null}function NC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $f(t){return["html","body","#document"].includes(gd(t))}function Ms(t){return Pn(t).getComputedStyle(t)}function xv(t){return gi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ra(t){if(gd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||IA(t)&&t.host||po(t);return IA(e)?e.host:e}function WP(t){const e=Ra(t);return $f(e)?t.ownerDocument?t.ownerDocument.body:t.body:vi(e)&&f1(e)?e:WP(e)}function h0(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=WP(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Pn(s);return i?e.concat(o,o.visualViewport||[],f1(s)?s:[],o.frameElement&&r?h0(o.frameElement):[]):e.concat(s,h0(s,[],r))}function VP(t){const e=Ms(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=vi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Jy(r)!==i||Jy(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function _C(t){return gi(t)?t:t.contextElement}function Tu(t){const e=_C(t);if(!vi(e))return Pa(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=VP(e);let o=(i?Jy(r.width):r.width)/n,a=(i?Jy(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $K=Pa(0);function zP(t){const e=Pn(t);return!NC()||!e.visualViewport?$K:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function WK(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Pn(t)?!1:e}function fl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=_C(t);let o=Pa(1);e&&(n?gi(n)&&(o=Tu(n)):o=Tu(t));const a=WK(i,r,n)?zP(i):Pa(0);let c=(s.left+a.x)/o.x,l=(s.top+a.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(i){const d=Pn(i),h=n&&gi(n)?Pn(n):n;let y=d,p=y.frameElement;for(;p&&n&&h!==y;){const b=Tu(p),g=p.getBoundingClientRect(),v=Ms(p),m=g.left+(p.clientLeft+parseFloat(v.paddingLeft))*b.x,k=g.top+(p.clientTop+parseFloat(v.paddingTop))*b.y;c*=b.x,l*=b.y,u*=b.x,f*=b.y,c+=m,l+=k,y=Pn(p),p=y.frameElement}}return Xy({width:u,height:f,x:c,y:l})}function VK(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=po(n),a=e?mv(e.floating):!1;if(n===o||a&&i)return r;let c={scrollLeft:0,scrollTop:0},l=Pa(1);const u=Pa(0),f=vi(n);if((f||!f&&!i)&&((gd(n)!=="body"||f1(o))&&(c=xv(n)),vi(n))){const d=fl(n);l=Tu(n),u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x,y:r.y*l.y-c.scrollTop*l.y+u.y}}function zK(t){return Array.from(t.getClientRects())}function HP(t){return fl(po(t)).left+xv(t).scrollLeft}function HK(t){const e=po(t),r=xv(t),n=t.ownerDocument.body,s=Sn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Sn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+HP(t);const a=-r.scrollTop;return Ms(n).direction==="rtl"&&(o+=Sn(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function GK(t,e){const r=Pn(t),n=po(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,c=0;if(s){i=s.width,o=s.height;const l=NC();(!l||l&&e==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:a,y:c}}function qK(t,e){const r=fl(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=vi(t)?Tu(t):Pa(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,c=s*i.x,l=n*i.y;return{width:o,height:a,x:c,y:l}}function PA(t,e,r){let n;if(e==="viewport")n=GK(t,r);else if(e==="document")n=HK(po(t));else if(gi(e))n=qK(e,r);else{const s=zP(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Xy(n)}function GP(t,e){const r=Ra(t);return r===e||!gi(r)||$f(r)?!1:Ms(r).position==="fixed"||GP(r,e)}function KK(t,e){const r=e.get(t);if(r)return r;let n=h0(t,[],!1).filter(a=>gi(a)&&gd(a)!=="body"),s=null;const i=Ms(t).position==="fixed";let o=i?Ra(t):t;for(;gi(o)&&!$f(o);){const a=Ms(o),c=RC(o);!c&&a.position==="fixed"&&(s=null),(i?!c&&!s:!c&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||f1(o)&&!c&&GP(t,o))?n=n.filter(u=>u!==o):s=a,o=Ra(o)}return e.set(t,n),n}function QK(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?mv(e)?[]:KK(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=PA(e,u,s);return l.top=Sn(f.top,l.top),l.right=ai(f.right,l.right),l.bottom=ai(f.bottom,l.bottom),l.left=Sn(f.left,l.left),l},PA(e,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function JK(t){const{width:e,height:r}=VP(t);return{width:e,height:r}}function YK(t,e,r){const n=vi(e),s=po(e),i=r==="fixed",o=fl(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=Pa(0);if(n||!n&&!i)if((gd(e)!=="body"||f1(s))&&(a=xv(e)),n){const f=fl(e,!0,i,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else s&&(c.x=HP(s));const l=o.left+a.scrollLeft-c.x,u=o.top+a.scrollTop-c.y;return{x:l,y:u,width:o.width,height:o.height}}function dx(t){return Ms(t).position==="static"}function OA(t,e){return!vi(t)||Ms(t).position==="fixed"?null:e?e(t):t.offsetParent}function qP(t,e){const r=Pn(t);if(mv(t))return r;if(!vi(t)){let s=Ra(t);for(;s&&!$f(s);){if(gi(s)&&!dx(s))return s;s=Ra(s)}return r}let n=OA(t,e);for(;n&&FK(n)&&dx(n);)n=OA(n,e);return n&&$f(n)&&dx(n)&&!RC(n)?r:n||UK(t)||r}const XK=async function(t){const e=this.getOffsetParent||qP,r=this.getDimensions,n=await r(t.floating);return{reference:YK(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ZK(t){return Ms(t).direction==="rtl"}const eQ={convertOffsetParentRelativeRectToViewportRelativeRect:VK,getDocumentElement:po,getClippingRect:QK,getOffsetParent:qP,getElementRects:XK,getClientRects:zK,getDimensions:JK,getScale:Tu,isElement:gi,isRTL:ZK};function tQ(t,e){let r=null,n;const s=po(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=rp(u),y=rp(s.clientWidth-(l+f)),p=rp(s.clientHeight-(u+d)),b=rp(l),v={rootMargin:-h+"px "+-y+"px "+-p+"px "+-b+"px",threshold:Sn(0,ai(1,c))||1};let m=!0;function k(A){const P=A[0].intersectionRatio;if(P!==c){if(!m)return o();P?o(!1,P):n=setTimeout(()=>{o(!1,1e-7)},1e3)}m=!1}try{r=new IntersectionObserver(k,{...v,root:s.ownerDocument})}catch{r=new IntersectionObserver(k,v)}r.observe(t)}return o(!0),i}function rQ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=_C(t),u=s||i?[...l?h0(l):[],...h0(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const f=l&&a?tQ(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(g=>{let[v]=g;v&&v.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var m;(m=h)==null||m.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let y,p=c?fl(t):null;c&&b();function b(){const g=fl(t);p&&(g.x!==p.x||g.y!==p.y||g.width!==p.width||g.height!==p.height)&&r(),p=g,y=requestAnimationFrame(b)}return r(),()=>{var g;u.forEach(v=>{s&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),f==null||f(),(g=h)==null||g.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const nQ=DK,sQ=BK,iQ=NK,oQ=jK,aQ=_K,RA=RK,cQ=LK,lQ=(t,e,r)=>{const n=new Map,s={platform:eQ,...r},i={...s.platform,_c:n};return OK(t,e,{...s,platform:i})};var zp=typeof document<"u"?x.useLayoutEffect:x.useEffect;function Zy(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!Zy(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Zy(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function KP(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function NA(t,e){const r=KP(t);return Math.round(e*r)/r}function _A(t){const e=x.useRef(t);return zp(()=>{e.current=t}),e}function uQ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=x.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=x.useState(n);Zy(d,n)||h(n);const[y,p]=x.useState(null),[b,g]=x.useState(null),v=x.useCallback(Z=>{Z!==P.current&&(P.current=Z,p(Z))},[]),m=x.useCallback(Z=>{Z!==R.current&&(R.current=Z,g(Z))},[]),k=i||y,A=o||b,P=x.useRef(null),R=x.useRef(null),N=x.useRef(u),V=c!=null,F=_A(c),X=_A(s),re=x.useCallback(()=>{if(!P.current||!R.current)return;const Z={placement:e,strategy:r,middleware:d};X.current&&(Z.platform=X.current),lQ(P.current,R.current,Z).then(E=>{const S={...E,isPositioned:!0};le.current&&!Zy(N.current,S)&&(N.current=S,ja.flushSync(()=>{f(S)}))})},[d,e,r,X]);zp(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(Z=>({...Z,isPositioned:!1})))},[l]);const le=x.useRef(!1);zp(()=>(le.current=!0,()=>{le.current=!1}),[]),zp(()=>{if(k&&(P.current=k),A&&(R.current=A),k&&A){if(F.current)return F.current(k,A,re);re()}},[k,A,re,F,V]);const ee=x.useMemo(()=>({reference:P,floating:R,setReference:v,setFloating:m}),[v,m]),B=x.useMemo(()=>({reference:k,floating:A}),[k,A]),G=x.useMemo(()=>{const Z={position:r,left:0,top:0};if(!B.floating)return Z;const E=NA(B.floating,u.x),S=NA(B.floating,u.y);return a?{...Z,transform:"translate("+E+"px, "+S+"px)",...KP(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:E,top:S}},[r,a,B.floating,u.x,u.y]);return x.useMemo(()=>({...u,update:re,refs:ee,elements:B,floatingStyles:G}),[u,re,ee,B,G])}const fQ=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?RA({element:n.current,padding:s}).fn(r):{}:n?RA({element:n,padding:s}).fn(r):{}}}},dQ=(t,e)=>({...nQ(t),options:[t,e]}),hQ=(t,e)=>({...sQ(t),options:[t,e]}),pQ=(t,e)=>({...cQ(t),options:[t,e]}),yQ=(t,e)=>({...iQ(t),options:[t,e]}),gQ=(t,e)=>({...oQ(t),options:[t,e]}),vQ=(t,e)=>({...aQ(t),options:[t,e]}),mQ=(t,e)=>({...fQ(t),options:[t,e]});var xQ="Arrow",QP=x.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return C.jsx(Se.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});QP.displayName=xQ;var bQ=QP,MC="Popper",[JP,vd]=Br(MC),[wQ,YP]=JP(MC),XP=t=>{const{__scopePopper:e,children:r}=t,[n,s]=x.useState(null);return C.jsx(wQ,{scope:e,anchor:n,onAnchorChange:s,children:r})};XP.displayName=MC;var ZP="PopperAnchor",eO=x.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=YP(ZP,r),o=x.useRef(null),a=We(e,o);return x.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.jsx(Se.div,{...s,ref:a})});eO.displayName=ZP;var DC="PopperContent",[EQ,CQ]=JP(DC),tO=x.forwardRef((t,e)=>{var r,n,s,i,o,a;const{__scopePopper:c,side:l="bottom",sideOffset:u=0,align:f="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:p=[],collisionPadding:b=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:k,...A}=t,P=YP(DC,c),[R,N]=x.useState(null),V=We(e,_e=>N(_e)),[F,X]=x.useState(null),re=yv(F),le=(re==null?void 0:re.width)??0,ee=(re==null?void 0:re.height)??0,B=l+(f!=="center"?"-"+f:""),G=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},Z=Array.isArray(p)?p:[p],E=Z.length>0,S={padding:G,boundary:Z.filter(SQ),altBoundary:E},{refs:O,floatingStyles:D,placement:L,isPositioned:W,middlewareData:q}=uQ({strategy:"fixed",placement:B,whileElementsMounted:(..._e)=>rQ(..._e,{animationFrame:m==="always"}),elements:{reference:P.anchor},middleware:[dQ({mainAxis:u+ee,alignmentAxis:d}),y&&hQ({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?pQ():void 0,...S}),y&&yQ({...S}),gQ({...S,apply:({elements:_e,rects:xt,availableWidth:tn,availableHeight:wr})=>{const{width:U,height:se}=xt.reference,ae=_e.floating.style;ae.setProperty("--radix-popper-available-width",`${tn}px`),ae.setProperty("--radix-popper-available-height",`${wr}px`),ae.setProperty("--radix-popper-anchor-width",`${U}px`),ae.setProperty("--radix-popper-anchor-height",`${se}px`)}}),F&&mQ({element:F,padding:h}),AQ({arrowWidth:le,arrowHeight:ee}),v&&vQ({strategy:"referenceHidden",...S})]}),[te,J]=sO(L),$=Mr(k);br(()=>{W&&($==null||$())},[W,$]);const K=(r=q.arrow)==null?void 0:r.x,ue=(n=q.arrow)==null?void 0:n.y,he=((s=q.arrow)==null?void 0:s.centerOffset)!==0,[oe,ke]=x.useState();return br(()=>{R&&ke(window.getComputedStyle(R).zIndex)},[R]),C.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:W?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(i=q.transformOrigin)==null?void 0:i.x,(o=q.transformOrigin)==null?void 0:o.y].join(" "),...((a=q.hide)==null?void 0:a.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:C.jsx(EQ,{scope:c,placedSide:te,onArrowChange:X,arrowX:K,arrowY:ue,shouldHideArrow:he,children:C.jsx(Se.div,{"data-side":te,"data-align":J,...A,ref:V,style:{...A.style,animation:W?void 0:"none"}})})})});tO.displayName=DC;var rO="PopperArrow",kQ={top:"bottom",right:"left",bottom:"top",left:"right"},nO=x.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=CQ(rO,n),o=kQ[i.placedSide];return C.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:C.jsx(bQ,{...s,ref:r,style:{...s.style,display:"block"}})})});nO.displayName=rO;function SQ(t){return t!==null}var AQ=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s;const{placement:i,rects:o,middlewareData:a}=e,l=((r=a.arrow)==null?void 0:r.centerOffset)!==0,u=l?0:t.arrowWidth,f=l?0:t.arrowHeight,[d,h]=sO(i),y={start:"0%",center:"50%",end:"100%"}[h],p=(((n=a.arrow)==null?void 0:n.x)??0)+u/2,b=(((s=a.arrow)==null?void 0:s.y)??0)+f/2;let g="",v="";return d==="bottom"?(g=l?y:`${p}px`,v=`${-f}px`):d==="top"?(g=l?y:`${p}px`,v=`${o.floating.height+f}px`):d==="right"?(g=`${-f}px`,v=l?y:`${b}px`):d==="left"&&(g=`${o.floating.width+f}px`,v=l?y:`${b}px`),{data:{x:g,y:v}}}});function sO(t){const[e,r="center"]=t.split("-");return[e,r]}var BC=XP,LC=eO,jC=tO,FC=nO,TQ="Portal",d1=x.forwardRef((t,e)=>{var r;const{container:n,...s}=t,[i,o]=x.useState(!1);br(()=>o(!0),[]);const a=n||i&&((r=globalThis==null?void 0:globalThis.document)==null?void 0:r.body);return a?TW.createPortal(C.jsx(Se.div,{...s,ref:e}),a):null});d1.displayName=TQ;var hx="rovingFocusGroup.onEntryFocus",IQ={bubbles:!1,cancelable:!0},bv="RovingFocusGroup",[gw,iO,PQ]=gv(bv),[OQ,md]=Br(bv,[PQ]),[RQ,NQ]=OQ(bv),oO=x.forwardRef((t,e)=>C.jsx(gw.Provider,{scope:t.__scopeRovingFocusGroup,children:C.jsx(gw.Slot,{scope:t.__scopeRovingFocusGroup,children:C.jsx(_Q,{...t,ref:e})})}));oO.displayName=bv;var _Q=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=t,d=x.useRef(null),h=We(e,d),y=u1(i),[p=null,b]=as({prop:o,defaultProp:a,onChange:c}),[g,v]=x.useState(!1),m=Mr(l),k=iO(r),A=x.useRef(!1),[P,R]=x.useState(0);return x.useEffect(()=>{const N=d.current;if(N)return N.addEventListener(hx,m),()=>N.removeEventListener(hx,m)},[m]),C.jsx(RQ,{scope:r,orientation:n,dir:y,loop:s,currentTabStopId:p,onItemFocus:x.useCallback(N=>b(N),[b]),onItemShiftTab:x.useCallback(()=>v(!0),[]),onFocusableItemAdd:x.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:x.useCallback(()=>R(N=>N-1),[]),children:C.jsx(Se.div,{tabIndex:g||P===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ce(t.onMouseDown,()=>{A.current=!0}),onFocus:ce(t.onFocus,N=>{const V=!A.current;if(N.target===N.currentTarget&&V&&!g){const F=new CustomEvent(hx,IQ);if(N.currentTarget.dispatchEvent(F),!F.defaultPrevented){const X=k().filter(G=>G.focusable),re=X.find(G=>G.active),le=X.find(G=>G.id===p),B=[re,le,...X].filter(Boolean).map(G=>G.ref.current);lO(B,u)}}A.current=!1}),onBlur:ce(t.onBlur,()=>v(!1))})})}),aO="RovingFocusGroupItem",cO=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=rs(),c=i||a,l=NQ(aO,r),u=l.currentTabStopId===c,f=iO(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return x.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),C.jsx(gw.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:C.jsx(Se.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...o,ref:e,onMouseDown:ce(t.onMouseDown,y=>{n?l.onItemFocus(c):y.preventDefault()}),onFocus:ce(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:ce(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){l.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const p=BQ(y,l.orientation,l.dir);if(p!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let g=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")g.reverse();else if(p==="prev"||p==="next"){p==="prev"&&g.reverse();const v=g.indexOf(y.currentTarget);g=l.loop?LQ(g,v+1):g.slice(v+1)}setTimeout(()=>lO(g))}})})})});cO.displayName=aO;var MQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DQ(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function BQ(t,e,r){const n=DQ(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return MQ[n]}function lO(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function LQ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var UC=oO,$C=cO,jQ=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Rl=new WeakMap,np=new WeakMap,sp={},px=0,uO=function(t){return t&&(t.host||uO(t.parentNode))},FQ=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=uO(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},UQ=function(t,e,r,n){var s=FQ(e,Array.isArray(t)?t:[t]);sp[r]||(sp[r]=new WeakMap);var i=sp[r],o=[],a=new Set,c=new Set(s),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};s.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(n),y=h!==null&&h!=="false",p=(Rl.get(d)||0)+1,b=(i.get(d)||0)+1;Rl.set(d,p),i.set(d,b),o.push(d),p===1&&y&&np.set(d,!0),b===1&&d.setAttribute(r,"true"),y||d.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return u(e),a.clear(),px++,function(){o.forEach(function(f){var d=Rl.get(f)-1,h=i.get(f)-1;Rl.set(f,d),i.set(f,h),d||(np.has(f)||f.removeAttribute(n),np.delete(f)),h||f.removeAttribute(r)}),px--,px||(Rl=new WeakMap,Rl=new WeakMap,np=new WeakMap,sp={})}},WC=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=jQ(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),UQ(n,s,r,"aria-hidden")):function(){return null}},oi=function(){return oi=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return nJ;var e=sJ(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},oJ=pO(),Iu="data-scroll-locked",aJ=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(WQ,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(a,"px ").concat(n,`; - } - body[`).concat(Iu,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(s,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(a,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Hp,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Gp,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Hp," .").concat(Hp,` { - right: 0 `).concat(n,`; - } - - .`).concat(Gp," .").concat(Gp,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(Iu,`] { - `).concat(VQ,": ").concat(a,`px; - } -`)},DA=function(){var t=parseInt(document.body.getAttribute(Iu)||"0",10);return isFinite(t)?t:0},cJ=function(){x.useEffect(function(){return document.body.setAttribute(Iu,(DA()+1).toString()),function(){var t=DA()-1;t<=0?document.body.removeAttribute(Iu):document.body.setAttribute(Iu,t.toString())}},[])},lJ=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;cJ();var i=x.useMemo(function(){return iJ(s)},[s]);return x.createElement(oJ,{styles:aJ(i,!e,s,r?"":"!important")})},vw=!1;if(typeof window<"u")try{var ip=Object.defineProperty({},"passive",{get:function(){return vw=!0,!0}});window.addEventListener("test",ip,ip),window.removeEventListener("test",ip,ip)}catch{vw=!1}var Nl=vw?{passive:!1}:!1,uJ=function(t){return t.tagName==="TEXTAREA"},yO=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!uJ(t)&&r[e]==="visible")},fJ=function(t){return yO(t,"overflowY")},dJ=function(t){return yO(t,"overflowX")},BA=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=gO(t,n);if(s){var i=vO(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},hJ=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},pJ=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},gO=function(t,e){return t==="v"?fJ(e):dJ(e)},vO=function(t,e){return t==="v"?hJ(e):pJ(e)},yJ=function(t,e){return t==="h"&&e==="rtl"?-1:1},gJ=function(t,e,r,n,s){var i=yJ(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=vO(t,a),y=h[0],p=h[1],b=h[2],g=p-b-i*y;(y||g)&&gO(t,a)&&(f+=g,d+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(d)<1||!s))&&(l=!0),l},op=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},LA=function(t){return[t.deltaX,t.deltaY]},jA=function(t){return t&&"current"in t?t.current:t},vJ=function(t,e){return t[0]===e[0]&&t[1]===e[1]},mJ=function(t){return` - .block-interactivity-`.concat(t,` {pointer-events: none;} - .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},xJ=0,_l=[];function bJ(t){var e=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),s=x.useState(xJ++)[0],i=x.useState(pO)[0],o=x.useRef(t);x.useEffect(function(){o.current=t},[t]),x.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var p=$Q([t.lockRef.current],(t.shards||[]).map(jA)).filter(Boolean);return p.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=x.useCallback(function(p,b){if("touches"in p&&p.touches.length===2)return!o.current.allowPinchZoom;var g=op(p),v=r.current,m="deltaX"in p?p.deltaX:v[0]-g[0],k="deltaY"in p?p.deltaY:v[1]-g[1],A,P=p.target,R=Math.abs(m)>Math.abs(k)?"h":"v";if("touches"in p&&R==="h"&&P.type==="range")return!1;var N=BA(R,P);if(!N)return!0;if(N?A=R:(A=R==="v"?"h":"v",N=BA(R,P)),!N)return!1;if(!n.current&&"changedTouches"in p&&(m||k)&&(n.current=A),!A)return!0;var V=n.current||A;return gJ(V,b,p,V==="h"?m:k,!0)},[]),c=x.useCallback(function(p){var b=p;if(!(!_l.length||_l[_l.length-1]!==i)){var g="deltaY"in b?LA(b):op(b),v=e.current.filter(function(A){return A.name===b.type&&(A.target===b.target||b.target===A.shadowParent)&&vJ(A.delta,g)})[0];if(v&&v.should){b.cancelable&&b.preventDefault();return}if(!v){var m=(o.current.shards||[]).map(jA).filter(Boolean).filter(function(A){return A.contains(b.target)}),k=m.length>0?a(b,m[0]):!o.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),l=x.useCallback(function(p,b,g,v){var m={name:p,delta:b,target:g,should:v,shadowParent:wJ(g)};e.current.push(m),setTimeout(function(){e.current=e.current.filter(function(k){return k!==m})},1)},[]),u=x.useCallback(function(p){r.current=op(p),n.current=void 0},[]),f=x.useCallback(function(p){l(p.type,LA(p),p.target,a(p,t.lockRef.current))},[]),d=x.useCallback(function(p){l(p.type,op(p),p.target,a(p,t.lockRef.current))},[]);x.useEffect(function(){return _l.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Nl),document.addEventListener("touchmove",c,Nl),document.addEventListener("touchstart",u,Nl),function(){_l=_l.filter(function(p){return p!==i}),document.removeEventListener("wheel",c,Nl),document.removeEventListener("touchmove",c,Nl),document.removeEventListener("touchstart",u,Nl)}},[]);var h=t.removeScrollBar,y=t.inert;return x.createElement(x.Fragment,null,y?x.createElement(i,{styles:mJ(s)}):null,h?x.createElement(lJ,{gapMode:t.gapMode}):null)}function wJ(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const EJ=JQ(hO,bJ);var Ev=x.forwardRef(function(t,e){return x.createElement(wv,oi({},t,{ref:e,sideCar:EJ}))});Ev.classNames=wv.classNames;var mw=["Enter"," "],CJ=["ArrowDown","PageUp","Home"],mO=["ArrowUp","PageDown","End"],kJ=[...CJ,...mO],SJ={ltr:[...mw,"ArrowRight"],rtl:[...mw,"ArrowLeft"]},AJ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},h1="Menu",[p0,TJ,IJ]=gv(h1),[Tl,xO]=Br(h1,[IJ,vd,md]),Cv=vd(),bO=md(),[PJ,Il]=Tl(h1),[OJ,p1]=Tl(h1),wO=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:i,modal:o=!0}=t,a=Cv(e),[c,l]=x.useState(null),u=x.useRef(!1),f=Mr(i),d=u1(s);return x.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),C.jsx(BC,{...a,children:C.jsx(PJ,{scope:e,open:r,onOpenChange:f,content:c,onContentChange:l,children:C.jsx(OJ,{scope:e,onClose:x.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:o,children:n})})})};wO.displayName=h1;var RJ="MenuAnchor",VC=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Cv(r);return C.jsx(LC,{...s,...n,ref:e})});VC.displayName=RJ;var zC="MenuPortal",[NJ,EO]=Tl(zC,{forceMount:void 0}),CO=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,i=Il(zC,e);return C.jsx(NJ,{scope:e,forceMount:r,children:C.jsx(Xr,{present:r||i.open,children:C.jsx(d1,{asChild:!0,container:s,children:n})})})};CO.displayName=zC;var ns="MenuContent",[_J,HC]=Tl(ns),kO=x.forwardRef((t,e)=>{const r=EO(ns,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Il(ns,t.__scopeMenu),o=p1(ns,t.__scopeMenu);return C.jsx(p0.Provider,{scope:t.__scopeMenu,children:C.jsx(Xr,{present:n||i.open,children:C.jsx(p0.Slot,{scope:t.__scopeMenu,children:o.modal?C.jsx(MJ,{...s,ref:e}):C.jsx(DJ,{...s,ref:e})})})})}),MJ=x.forwardRef((t,e)=>{const r=Il(ns,t.__scopeMenu),n=x.useRef(null),s=We(e,n);return x.useEffect(()=>{const i=n.current;if(i)return WC(i)},[]),C.jsx(GC,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),DJ=x.forwardRef((t,e)=>{const r=Il(ns,t.__scopeMenu);return C.jsx(GC,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),GC=x.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,disableOutsideScroll:y,...p}=t,b=Il(ns,r),g=p1(ns,r),v=Cv(r),m=bO(r),k=TJ(r),[A,P]=x.useState(null),R=x.useRef(null),N=We(e,R,b.onContentChange),V=x.useRef(0),F=x.useRef(""),X=x.useRef(0),re=x.useRef(null),le=x.useRef("right"),ee=x.useRef(0),B=y?Ev:x.Fragment,G=y?{as:ul,allowPinchZoom:!0}:void 0,Z=S=>{var O,D;const L=F.current+S,W=k().filter(ue=>!ue.disabled),q=document.activeElement,te=(O=W.find(ue=>ue.ref.current===q))==null?void 0:O.textValue,J=W.map(ue=>ue.textValue),$=qJ(J,L,te),K=(D=W.find(ue=>ue.textValue===$))==null?void 0:D.ref.current;(function ue(he){F.current=he,window.clearTimeout(V.current),he!==""&&(V.current=window.setTimeout(()=>ue(""),1e3))})(L),K&&setTimeout(()=>K.focus())};x.useEffect(()=>()=>window.clearTimeout(V.current),[]),TC();const E=x.useCallback(S=>{var O,D;return le.current===((O=re.current)==null?void 0:O.side)&&QJ(S,(D=re.current)==null?void 0:D.area)},[]);return C.jsx(_J,{scope:r,searchRef:F,onItemEnter:x.useCallback(S=>{E(S)&&S.preventDefault()},[E]),onItemLeave:x.useCallback(S=>{var O;E(S)||((O=R.current)==null||O.focus(),P(null))},[E]),onTriggerLeave:x.useCallback(S=>{E(S)&&S.preventDefault()},[E]),pointerGraceTimerRef:X,onPointerGraceIntentChange:x.useCallback(S=>{re.current=S},[]),children:C.jsx(B,{...G,children:C.jsx(vv,{asChild:!0,trapped:s,onMountAutoFocus:ce(i,S=>{var O;S.preventDefault(),(O=R.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:C.jsx(pd,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:h,children:C.jsx(UC,{asChild:!0,...m,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:A,onCurrentTabStopIdChange:P,onEntryFocus:ce(c,S=>{g.isUsingKeyboardRef.current||S.preventDefault()}),preventScrollOnEntryFocus:!0,children:C.jsx(jC,{role:"menu","aria-orientation":"vertical","data-state":UO(b.open),"data-radix-menu-content":"",dir:g.dir,...v,...p,ref:N,style:{outline:"none",...p.style},onKeyDown:ce(p.onKeyDown,S=>{const D=S.target.closest("[data-radix-menu-content]")===S.currentTarget,L=S.ctrlKey||S.altKey||S.metaKey,W=S.key.length===1;D&&(S.key==="Tab"&&S.preventDefault(),!L&&W&&Z(S.key));const q=R.current;if(S.target!==q||!kJ.includes(S.key))return;S.preventDefault();const J=k().filter($=>!$.disabled).map($=>$.ref.current);mO.includes(S.key)&&J.reverse(),HJ(J)}),onBlur:ce(t.onBlur,S=>{S.currentTarget.contains(S.target)||(window.clearTimeout(V.current),F.current="")}),onPointerMove:ce(t.onPointerMove,y0(S=>{const O=S.target,D=ee.current!==S.clientX;if(S.currentTarget.contains(O)&&D){const L=S.clientX>ee.current?"right":"left";le.current=L,ee.current=S.clientX}}))})})})})})})});kO.displayName=ns;var BJ="MenuGroup",qC=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{role:"group",...n,ref:e})});qC.displayName=BJ;var LJ="MenuLabel",SO=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});SO.displayName=LJ;var eg="MenuItem",FA="menu.itemSelect",kv=x.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=x.useRef(null),o=p1(eg,t.__scopeMenu),a=HC(eg,t.__scopeMenu),c=We(e,i),l=x.useRef(!1),u=()=>{const f=i.current;if(!r&&f){const d=new CustomEvent(FA,{bubbles:!0,cancelable:!0});f.addEventListener(FA,h=>n==null?void 0:n(h),{once:!0}),bC(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return C.jsx(AO,{...s,ref:c,disabled:r,onClick:ce(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)==null||d.call(t,f),l.current=!0},onPointerUp:ce(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)==null||d.click()}),onKeyDown:ce(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||mw.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});kv.displayName=eg;var AO=x.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=HC(eg,r),a=bO(r),c=x.useRef(null),l=We(e,c),[u,f]=x.useState(!1),[d,h]=x.useState("");return x.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[i.children]),C.jsx(p0.ItemSlot,{scope:r,disabled:n,textValue:s??d,children:C.jsx($C,{asChild:!0,...a,focusable:!n,children:C.jsx(Se.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:l,onPointerMove:ce(t.onPointerMove,y0(y=>{n?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ce(t.onPointerLeave,y0(y=>o.onItemLeave(y))),onFocus:ce(t.onFocus,()=>f(!0)),onBlur:ce(t.onBlur,()=>f(!1))})})})}),jJ="MenuCheckboxItem",TO=x.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return C.jsx(NO,{scope:t.__scopeMenu,checked:r,children:C.jsx(kv,{role:"menuitemcheckbox","aria-checked":tg(r)?"mixed":r,...s,ref:e,"data-state":QC(r),onSelect:ce(s.onSelect,()=>n==null?void 0:n(tg(r)?!0:!r),{checkForDefaultPrevented:!1})})})});TO.displayName=jJ;var IO="MenuRadioGroup",[FJ,UJ]=Tl(IO,{value:void 0,onValueChange:()=>{}}),PO=x.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,i=Mr(n);return C.jsx(FJ,{scope:t.__scopeMenu,value:r,onValueChange:i,children:C.jsx(qC,{...s,ref:e})})});PO.displayName=IO;var OO="MenuRadioItem",RO=x.forwardRef((t,e)=>{const{value:r,...n}=t,s=UJ(OO,t.__scopeMenu),i=r===s.value;return C.jsx(NO,{scope:t.__scopeMenu,checked:i,children:C.jsx(kv,{role:"menuitemradio","aria-checked":i,...n,ref:e,"data-state":QC(i),onSelect:ce(n.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})})});RO.displayName=OO;var KC="MenuItemIndicator",[NO,$J]=Tl(KC,{checked:!1}),_O=x.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=$J(KC,r);return C.jsx(Xr,{present:n||tg(i.checked)||i.checked===!0,children:C.jsx(Se.span,{...s,ref:e,"data-state":QC(i.checked)})})});_O.displayName=KC;var WJ="MenuSeparator",MO=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return C.jsx(Se.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});MO.displayName=WJ;var VJ="MenuArrow",DO=x.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=Cv(r);return C.jsx(FC,{...s,...n,ref:e})});DO.displayName=VJ;var zJ="MenuSub",[the,BO]=Tl(zJ),th="MenuSubTrigger",LO=x.forwardRef((t,e)=>{const r=Il(th,t.__scopeMenu),n=p1(th,t.__scopeMenu),s=BO(th,t.__scopeMenu),i=HC(th,t.__scopeMenu),o=x.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:c}=i,l={__scopeMenu:t.__scopeMenu},u=x.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return x.useEffect(()=>u,[u]),x.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),c(null)}},[a,c]),C.jsx(VC,{asChild:!0,...l,children:C.jsx(AO,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":UO(r.open),...t,ref:hv(e,s.onTriggerChange),onClick:f=>{var d;(d=t.onClick)==null||d.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ce(t.onPointerMove,y0(f=>{i.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:ce(t.onPointerLeave,y0(f=>{var d,h;u();const y=(d=r.content)==null?void 0:d.getBoundingClientRect();if(y){const p=(h=r.content)==null?void 0:h.dataset.side,b=p==="right",g=b?-5:5,v=y[b?"left":"right"],m=y[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+g,y:f.clientY},{x:v,y:y.top},{x:m,y:y.top},{x:m,y:y.bottom},{x:v,y:y.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ce(t.onKeyDown,f=>{var d;const h=i.searchRef.current!=="";t.disabled||h&&f.key===" "||SJ[n.dir].includes(f.key)&&(r.onOpenChange(!0),(d=r.content)==null||d.focus(),f.preventDefault())})})})});LO.displayName=th;var jO="MenuSubContent",FO=x.forwardRef((t,e)=>{const r=EO(ns,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,i=Il(ns,t.__scopeMenu),o=p1(ns,t.__scopeMenu),a=BO(jO,t.__scopeMenu),c=x.useRef(null),l=We(e,c);return C.jsx(p0.Provider,{scope:t.__scopeMenu,children:C.jsx(Xr,{present:n||i.open,children:C.jsx(p0.Slot,{scope:t.__scopeMenu,children:C.jsx(GC,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:l,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ce(t.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ce(t.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ce(t.onKeyDown,u=>{var f;const d=u.currentTarget.contains(u.target),h=AJ[o.dir].includes(u.key);d&&h&&(i.onOpenChange(!1),(f=a.trigger)==null||f.focus(),u.preventDefault())})})})})})});FO.displayName=jO;function UO(t){return t?"open":"closed"}function tg(t){return t==="indeterminate"}function QC(t){return tg(t)?"indeterminate":t?"checked":"unchecked"}function HJ(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function GJ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function qJ(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=GJ(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function KJ(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function QJ(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return KJ(r,e)}function y0(t){return e=>e.pointerType==="mouse"?t(e):void 0}var JJ=wO,YJ=VC,XJ=CO,ZJ=kO,eY=qC,tY=SO,rY=kv,nY=TO,sY=PO,iY=RO,oY=_O,aY=MO,cY=DO,lY=LO,uY=FO,JC="DropdownMenu",[fY,rhe]=Br(JC,[xO]),Zr=xO(),[dY,$O]=fY(JC),hY=t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=t,c=Zr(e),l=x.useRef(null),[u=!1,f]=as({prop:s,defaultProp:i,onChange:o});return C.jsx(dY,{scope:e,triggerId:rs(),triggerRef:l,contentId:rs(),open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(d=>!d),[f]),modal:a,children:C.jsx(JJ,{...c,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};hY.displayName=JC;var WO="DropdownMenuTrigger",pY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,i=$O(WO,r),o=Zr(r);return C.jsx(YJ,{asChild:!0,...o,children:C.jsx(Se.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:hv(e,i.triggerRef),onPointerDown:ce(t.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:ce(t.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});pY.displayName=WO;var yY="DropdownMenuPortal",gY=t=>{const{__scopeDropdownMenu:e,...r}=t,n=Zr(e);return C.jsx(XJ,{...n,...r})};gY.displayName=yY;var VO="DropdownMenuContent",vY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=$O(VO,r),i=Zr(r),o=x.useRef(!1);return C.jsx(ZJ,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...n,ref:e,onCloseAutoFocus:ce(t.onCloseAutoFocus,a=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:ce(t.onInteractOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;(!s.modal||u)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vY.displayName=VO;var mY="DropdownMenuGroup",xY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(eY,{...s,...n,ref:e})});xY.displayName=mY;var bY="DropdownMenuLabel",wY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(tY,{...s,...n,ref:e})});wY.displayName=bY;var EY="DropdownMenuItem",CY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(rY,{...s,...n,ref:e})});CY.displayName=EY;var kY="DropdownMenuCheckboxItem",zO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(nY,{...s,...n,ref:e})});zO.displayName=kY;var SY="DropdownMenuRadioGroup",AY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(sY,{...s,...n,ref:e})});AY.displayName=SY;var TY="DropdownMenuRadioItem",HO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(iY,{...s,...n,ref:e})});HO.displayName=TY;var IY="DropdownMenuItemIndicator",GO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(oY,{...s,...n,ref:e})});GO.displayName=IY;var PY="DropdownMenuSeparator",OY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(aY,{...s,...n,ref:e})});OY.displayName=PY;var RY="DropdownMenuArrow",NY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(cY,{...s,...n,ref:e})});NY.displayName=RY;var _Y="DropdownMenuSubTrigger",MY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(lY,{...s,...n,ref:e})});MY.displayName=_Y;var DY="DropdownMenuSubContent",BY=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=Zr(r);return C.jsx(uY,{...s,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});BY.displayName=DY;var LY=zO,jY=HO,qO=GO,KO="_1k2mbvi4 _1k2mbvi3 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr1zs fyvr111g fyvr1v0 fyvr1x4 fyvr1310 fyvr130u fyvr11l8 fyvr11ow fyvr11o4 fyvr12zf fyvr11rc fyvr11m4 fyvr12wf",QO="_1k2mbvi5";const FY=({children:t})=>C.jsx(qO,{className:QO,children:t});x.forwardRef(({className:t,children:e,...r},n)=>C.jsxs(LY,{className:or(KO,t),...r,ref:n,children:[C.jsx(FY,{children:C.jsx(OP,{size:"xs"})}),C.jsx(Tt,{variant:"small",children:e})]}));x.forwardRef(({className:t,children:e,...r},n)=>C.jsxs(jY,{className:or(KO,t),...r,ref:n,children:[C.jsx(qO,{className:QO,children:C.jsx(Tt,{children:"ā€¢"})}),C.jsx(Tt,{variant:"small",children:e})]}));const YC=x.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return C.jsx(Ve,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),UY=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var $Y="_1hq71vk1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _1hq71vk0 fyvr11eg fyvr11es fyvr11f4 fyvr11fg fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr12rf fyvr12k3 fyvr125f fyvr12cr fyvr12rx fyvr12kl fyvr125x fyvr12d9 fyvr11ow fyvr11lk fyvr11mk fyvr11nk fyvr1h4 fyvr11m4",WY=St({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"_1hq71vk6 _1hq71vk2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"_1hq71vk7 _1hq71vk3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"_1hq71vk8 _1hq71vk4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),VY="_1hq71vka _1hq71vk9 fyvr130x fyvr130r fyvr11lw fyvr12zr fyvr1m0 fyvr1qg fyvr1o8 fyvr1so";const zY={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*, video/*",pdf:".pdf,application/pdf",mp4:".mp4,video/mp4",csv:".csv,text/csv",json:".json,application/json"};x.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=x.useRef(null),y=UY(h,e),[p,b]=x.useState(null),g=m=>{const k=m.currentTarget.files;if(!k||!k[0])return;const A=k[0],P=A.name,R=A.size/1e3;b({name:P,size:R,extension:P.split(".").pop()??""}),l==null||l(A)},v=f.map(m=>zY[m]).join(",");return C.jsx(dd,{description:n,disabled:s,display:"grid",id:i??c,label:o,labelLocation:a,children:C.jsxs(Ce,{width:"full",minWidth:"0",justifyContent:p?"space-between":"flex-start",gap:"2",color:p?"text100":"text50",className:or($Y,WY({borderRadius:r})),children:[p?C.jsxs(Ce,{flexDirection:"row",gap:"2",alignItems:"center",minWidth:"0",children:[C.jsx(Tt,{ellipsis:!0,children:p.name}),C.jsxs(Tt,{color:"text50",variant:"xsmall",whiteSpace:"nowrap",children:[p.size.toFixed(2)," kb"]})]}):C.jsx(Tt,{ellipsis:!0,children:u}),C.jsx(Ce,{accept:v,as:"input",className:VY,cursor:"pointer",disabled:s,id:i??c,name:c,onChange:g,ref:y,type:"file",...d}),p&&C.jsx(YC,{cursor:"pointer",icon:EC,size:"xs",onClick:m=>{var k;m.preventDefault(),m.stopPropagation(),(k=h.current)!=null&&k.value&&(h.current.value=""),l==null||l(null),b(null)},zIndex:"10"})]})})});var HY=St({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const xw=1e3,Pu=64,mx=Pu/2,xx=(t,e=xw)=>t%e/(xw/Pu),Ml=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},GY=(t,e,r)=>{const n=t%360,s=(t+120)%360,i=r%360;return{a:`hsl(${n}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${i}deg 100% 50%)`}},qY=(t,e)=>{const r=[];for(let n=0;n{const i=Pu/10+xx(n.r,xw*1.5/(s+1));return{...GY(n.a,n.b,n.c),x:xx(n.x),y:xx(n.y),r:i}})};x.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=qY(r,s);return C.jsxs(Ce,{as:"svg",className:or(e,HY({size:n})),viewBox:`0 0 ${Pu} ${Pu}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[C.jsxs("defs",{children:[C.jsx("clipPath",{id:"circle-clip",children:C.jsx("circle",{cx:mx,cy:mx,r:mx})}),C.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[C.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),C.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),C.jsx("feGaussianBlur",{stdDeviation:Pu/10,result:"effect1_foregroundBlur"})]}),C.jsxs("linearGradient",{id:`gradient-background-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[C.jsx("stop",{offset:"0",stopColor:o[0].c}),C.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map((a,c)=>C.jsxs(x.Fragment,{children:[C.jsxs("radialGradient",{id:`gradient-primary-${r}-${c}`,children:[C.jsx("stop",{offset:"0",stopColor:a.a}),C.jsx("stop",{offset:"1",stopColor:a.b})]}),C.jsxs("radialGradient",{id:`gradient-secondary-${r}-${c}`,children:[C.jsx("stop",{offset:"0",stopColor:a.c}),C.jsx("stop",{offset:"1",stopColor:a.b})]})]},c))]}),C.jsxs("g",{clipPath:"url(#circle-clip)",children:[C.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${r})`}),C.jsx("g",{filter:"url(#blur)",children:o.map((a,c)=>C.jsxs(x.Fragment,{children:[C.jsx("circle",{fill:`url(#gradient-primary-${r}-${c})`,cx:a.x,cy:a.y,r:a.r}),C.jsx("circle",{fill:`url(#gradient-secondary-${r}-${c})`,cx:a.y,cy:a.x,r:a.r/2})]},c))})]})]})});const XC=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=x.useState(!1),o=a=>{i(!0),r==null||r(a)};return C.jsx(Ce,{as:Au.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})};var ZC="Dialog",[JO,nhe]=Br(ZC),[KY,Fs]=JO(ZC),YO=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=x.useRef(null),c=x.useRef(null),[l=!1,u]=as({prop:n,defaultProp:s,onChange:i});return C.jsx(KY,{scope:e,triggerRef:a,contentRef:c,contentId:rs(),titleId:rs(),descriptionId:rs(),open:l,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(f=>!f),[u]),modal:o,children:r})};YO.displayName=ZC;var XO="DialogTrigger",QY=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Fs(XO,r),i=We(e,s.triggerRef);return C.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":rk(s.open),...n,ref:i,onClick:ce(t.onClick,s.onOpenToggle)})});QY.displayName=XO;var ek="DialogPortal",[JY,ZO]=JO(ek,{forceMount:void 0}),e9=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=Fs(ek,e);return C.jsx(JY,{scope:e,forceMount:r,children:x.Children.map(n,o=>C.jsx(Xr,{present:r||i.open,children:C.jsx(d1,{asChild:!0,container:s,children:o})}))})};e9.displayName=ek;var rg="DialogOverlay",t9=x.forwardRef((t,e)=>{const r=ZO(rg,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Fs(rg,t.__scopeDialog);return i.modal?C.jsx(Xr,{present:n||i.open,children:C.jsx(YY,{...s,ref:e})}):null});t9.displayName=rg;var YY=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Fs(rg,r);return C.jsx(Ev,{as:ul,allowPinchZoom:!0,shards:[s.contentRef],children:C.jsx(Se.div,{"data-state":rk(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),dl="DialogContent",r9=x.forwardRef((t,e)=>{const r=ZO(dl,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Fs(dl,t.__scopeDialog);return C.jsx(Xr,{present:n||i.open,children:i.modal?C.jsx(XY,{...s,ref:e}):C.jsx(ZY,{...s,ref:e})})});r9.displayName=dl;var XY=x.forwardRef((t,e)=>{const r=Fs(dl,t.__scopeDialog),n=x.useRef(null),s=We(e,r.contentRef,n);return x.useEffect(()=>{const i=n.current;if(i)return WC(i)},[]),C.jsx(n9,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(t.onFocusOutside,i=>i.preventDefault())})}),ZY=x.forwardRef((t,e)=>{const r=Fs(dl,t.__scopeDialog),n=x.useRef(!1),s=x.useRef(!1);return C.jsx(n9,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)==null||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=i.target;((a=r.triggerRef.current)==null?void 0:a.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),n9=x.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Fs(dl,r),c=x.useRef(null),l=We(e,c);return TC(),C.jsxs(C.Fragment,{children:[C.jsx(vv,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:C.jsx(pd,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":rk(a.open),...o,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(rX,{titleId:a.titleId}),C.jsx(sX,{contentRef:c,descriptionId:a.descriptionId})]})]})}),tk="DialogTitle",eX=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Fs(tk,r);return C.jsx(Se.h2,{id:s.titleId,...n,ref:e})});eX.displayName=tk;var s9="DialogDescription",tX=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Fs(s9,r);return C.jsx(Se.p,{id:s.descriptionId,...n,ref:e})});tX.displayName=s9;var i9="DialogClose",o9=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Fs(i9,r);return C.jsx(Se.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,()=>s.onOpenChange(!1))})});o9.displayName=i9;function rk(t){return t?"open":"closed"}var a9="DialogTitleWarning",[she,c9]=vq(a9,{contentName:dl,titleName:tk,docsSlug:"dialog"}),rX=({titleId:t})=>{const e=c9(a9),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return x.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},nX="DialogDescriptionWarning",sX=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${c9(nX).contentName}}.`;return x.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},iX=YO,oX=e9,aX=t9,cX=r9,lX=o9,uX=St({defaultClassName:"_1vqx0w91 _1vqx0w90 fyvr12g fyvr164",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]}),fX=St({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});const dX=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return C.jsx(Ce,{className:fX({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:C.jsx(Ce,{className:uX({direction:n}),background:"backgroundPrimary",...s,children:e})})};function hX(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function pX(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function l9(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n={};for(var s in t){var i=t[s],o=[...r,s];typeof i=="string"||typeof i=="number"||i==null?n[s]=e(i,o):typeof i=="object"&&!Array.isArray(i)?n[s]=l9(i,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(i)?"Array":typeof i,'"'))}return n}function UA(t,e,r){t.style.setProperty(hX(e),r)}function $A(t,e,r){if(typeof r=="object"){var n=e;l9(r,(a,c)=>{a!=null&&UA(t,pX(n,c),String(a))})}else{var s=e;for(var i in s){var o=s[i];o!=null&&UA(t,i,s[i])}}}const nk=["dark","light"],WA="dark",yX="data-theme",VA="@sequence.theme",gX=t=>nk.includes(t),vX=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),u9=t=>t?`${VA}.${t}`:VA,mX=t=>{const e=localStorage.getItem(u9(t));return e&&nk.includes(e)?e:null},xX=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":matchMedia("(prefers-color-scheme: dark)").matches?"dark":null,f9=x.createContext(null),bX=t=>{const[e,r]=x.useState(t.theme||WA);x.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),x.useEffect(()=>{const s=t.theme||mX(t.scope)||t.prefersColorScheme&&xX()||WA;r(s)},[t.theme,t.scope,t.prefersColorScheme]),x.useEffect(()=>{const s=document.querySelector(t.root||":root");s&&(gX(e)?(s.setAttribute(yX,e),$A(s,uA,{colors:qG[e]})):vX(e)&&$A(s,uA,{colors:e}),t.root&&s.classList.add("seq-root"))},[e,t.root]);const n=x.useMemo(()=>({theme:e,root:t.root,setTheme:s=>{nk.includes(s)&&(localStorage.setItem(u9(t.scope),s),r(s))}}),[e,t.root,t.scope]);return C.jsx(f9.Provider,{value:n,children:t.children})},wX=()=>{const t=x.useContext(f9);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var EX="_5b32m91 _5b32m90 fyvr11no fyvr11ow fyvr11l8 fyvr11m0 fyvr11rs fyvr1m0 fyvr1qg fyvr1so fyvr1o8",CX="_5b32m93 _5b32m92 fyvr11m0 fyvr1m0 fyvr1qg fyvr1so fyvr1o8",kX=St({defaultClassName:"_5b32m95 _5b32m94 fyvr11hg fyvr11i4 fyvr11fo fyvr11g6 fyvr11gc fyvr11gu fyvr11q0 fyvr11qg fyvr1310 fyvr130u fyvr11l8 fyvr11mc fyvr11m0 fyvr11wl fyvr1o8 fyvr1qe",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),SX="_5b32m9b _5b32m9a fyvr113s fyvr1160 fyvr1188 fyvr11ag fyvr11lw fyvr1so fyvr1m0 fyvr11rs";const AX=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u,rootProps:f={}}=t,{root:d}=wX(),[h,y]=x.useState(null);return x.useEffect(()=>{y(document.querySelector(d||"body"))},[d]),h?C.jsx(iX,{modal:!0,defaultOpen:!0,onOpenChange:o,children:C.jsx(oX,{forceMount:!0,container:h,children:C.jsxs(Ce,{...f,className:or("seq-root",EX,f==null?void 0:f.className),children:[C.jsx(Ce,{as:aX,asChild:!0,background:r,className:CX,forceMount:!0,children:C.jsx(Au.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),C.jsx(cX,{asChild:!0,className:kX({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:p=>{i?o==null||o():p.preventDefault()},onInteractOutside:p=>{i||p.preventDefault()},children:C.jsxs(Au.div,{initial:s?!1:{y:"100%",opacity:c==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?C.jsx(dX,{children:n}):n,i&&C.jsx(lX,{asChild:!0,children:C.jsx(YC,{icon:EC,backdropFilter:"blur",size:"xs",className:SX,"aria-label":"Close"})})]},"modal-content")})]})})}):null};var TX="_1acm19y1 _1acm19y0 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1zk fyvr111o fyvr11lk fyvr11ow fyvr11sl fyvr12w9 fyvr1h4 fyvr11cg",IX=St({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"_1acm19y6 _1acm19y2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"_1acm19y7 _1acm19y3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"_1acm19y8 _1acm19y4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),PX=St({defaultClassName:"_1acm19ya _1acm19y9 fyvr1z4 fyvr1118 fyvr1vc fyvr1xg fyvr130x fyvr130r fyvr11l4 fyvr11sl fyvr12w9 fyvr12s9 fyvr12g fyvr164",variantClassNames:{numeric:{false:"_1acm19yb _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8",true:"_1acm19yc _1qxj1ib9 _1qxj1ibc _1qxj1ib2 fyvr11r3 fyvr11iw fyvr11kg fyvr11jw fyvr11jg"}},defaultVariants:{},compoundVariants:[]});const sk=x.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:y="text",numeric:p=!1,...b}=t;return C.jsx(dd,{description:i,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:C.jsx(Ce,{width:"full",children:C.jsxs(Ce,{className:or(TX,IX({borderRadius:s})),children:[u&&C.jsx(u,{size:"sm"}),C.jsx(Ce,{as:r,autoComplete:n,spellCheck:"false",className:PX({numeric:p}),disabled:o,id:a??d,name:d,ref:e,type:y,...b}),f&&C.jsx(f,{size:"sm"}),h]})})})}),OX=RegExp("^\\d*(?:\\\\[.])?\\d*$");function RX(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}x.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||OX.test(RX(u)))&&(s==null||s({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),i==null||i(l),f!==u&&(s==null||s({...l,target:{...l.target,value:f}}))};return C.jsx(sk,{name:r,onChange:a,onBlur:c,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});St({defaultClassName:"_1jujggt1",variantClassNames:{size:{sm:"_1jujggt2",normal:"_1jujggt3",md:"_1jujggt4",lg:"_1jujggt5",xl:"_1jujggt6"}},defaultVariants:{},compoundVariants:[]});var ik="Progress",ok=100,[NX,ihe]=Br(ik),[_X,MX]=NX(ik),DX=x.forwardRef((t,e)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:i=LX,...o}=t;(s||s===0)&&!zA(s)&&console.error(jX(`${s}`,"Progress"));const a=zA(s)?s:ok;n!==null&&!HA(n,a)&&console.error(FX(`${n}`,"Progress"));const c=HA(n,a)?n:null,l=ng(c)?i(c,a):void 0;return C.jsx(_X,{scope:r,value:c,max:a,children:C.jsx(Se.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ng(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":h9(c,a),"data-value":c??void 0,"data-max":a,...o,ref:e})})});DX.displayName=ik;var d9="ProgressIndicator",BX=x.forwardRef((t,e)=>{const{__scopeProgress:r,...n}=t,s=MX(d9,r);return C.jsx(Se.div,{"data-state":h9(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:e})});BX.displayName=d9;function LX(t,e){return`${Math.round(t/e*100)}%`}function h9(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ng(t){return typeof t=="number"}function zA(t){return ng(t)&&!isNaN(t)&&t>0}function HA(t,e){return ng(t)&&!isNaN(t)&&t<=e&&t>=0}function jX(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ok}\`.`}function FX(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - - a positive number - - less than the value passed to \`max\` (or ${ok} if no \`max\` prop is set) - - \`null\` or \`undefined\` if the progress is indeterminate. - -Defaulting to \`null\`.`}var ak="Radio",[UX,p9]=Br(ak),[$X,WX]=UX(ak),y9=x.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=x.useState(null),d=We(e,p=>f(p)),h=x.useRef(!1),y=u?!!u.closest("form"):!0;return C.jsxs($X,{scope:r,checked:s,disabled:o,children:[C.jsx(Se.button,{type:"button",role:"radio","aria-checked":s,"data-state":m9(s),"data-disabled":o?"":void 0,disabled:o,value:a,...l,ref:d,onClick:ce(t.onClick,p=>{s||c==null||c(),y&&(h.current=p.isPropagationStopped(),h.current||p.stopPropagation())})}),y&&C.jsx(VX,{control:u,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}})]})});y9.displayName=ak;var g9="RadioIndicator",v9=x.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=WX(g9,r);return C.jsx(Xr,{present:n||i.checked,children:C.jsx(Se.span,{"data-state":m9(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});v9.displayName=g9;var VX=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=pv(r),a=yv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function m9(t){return t?"checked":"unchecked"}var zX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ck="RadioGroup",[HX,ohe]=Br(ck,[md,p9]),x9=md(),b9=p9(),[GX,qX]=HX(ck),w9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=x9(r),y=u1(l),[p,b]=as({prop:i,defaultProp:s,onChange:f});return C.jsx(GX,{scope:r,name:n,required:o,disabled:a,value:p,onValueChange:b,children:C.jsx(UC,{asChild:!0,...h,orientation:c,dir:y,loop:u,children:C.jsx(Se.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:y,...d,ref:e})})})});w9.displayName=ck;var E9="RadioGroupItem",C9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=qX(E9,r),o=i.disabled||n,a=x9(r),c=b9(r),l=x.useRef(null),u=We(e,l),f=i.value===s.value,d=x.useRef(!1);return x.useEffect(()=>{const h=p=>{zX.includes(p.key)&&(d.current=!0)},y=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),C.jsx($C,{asChild:!0,...a,focusable:!o,active:f,children:C.jsx(y9,{disabled:o,required:i.required,checked:f,...c,...s,name:i.name,ref:u,onCheck:()=>i.onValueChange(s.value),onKeyDown:ce(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ce(s.onFocus,()=>{var h;d.current&&((h=l.current)==null||h.click())})})})});C9.displayName=E9;var KX="RadioGroupIndicator",k9=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=b9(r);return C.jsx(v9,{...s,...n,ref:e})});k9.displayName=KX;var QX=w9,JX=C9,YX=k9,XX=St({defaultClassName:"io59uy3 io59uy0 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw fyvr1uw fyvr1x0 fyvr1z4 fyvr1118 fyvr12rl fyvr12k9 fyvr125l fyvr12cx fyvr12rr fyvr12kf fyvr125r fyvr12d3 fyvr11sl fyvr12zf fyvr12zb fyvr1307 fyvr12zz _4efw240",variantClassNames:{size:{sm:"io59uy4 io59uy1 fyvr11eg fyvr11es fyvr11f4 fyvr11fg",lg:"io59uy5 io59uy2 fyvr11ek fyvr11ew fyvr11f8 fyvr11fk"}},defaultVariants:{},compoundVariants:[]}),ZX=St({defaultClassName:"io59uy8 io59uy7 io59uy6 fyvr11l8 fyvr11ow fyvr11no fyvr11m4 fyvr12g fyvr164 fyvr12w9",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]});const eZ=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return C.jsx(Ce,{alignItems:"center",children:C.jsx(dd,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:C.jsx(JX,{className:XX({size:n}),value:s,id:e,disabled:i,children:C.jsx(YX,{className:ZX({size:n})})})})})};x.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...c}=t;return C.jsx(QX,{disabled:n,name:i,ref:e,...c,children:C.jsx(Ce,{flexDirection:r,gap:s,children:o.map(({label:l,value:u,disabled:f})=>C.jsx(eZ,{id:`${i}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function GA(t,[e,r]){return Math.min(r,Math.max(e,t))}var tZ="VisuallyHidden",y1=x.forwardRef((t,e)=>C.jsx(Se.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));y1.displayName=tZ;var rZ=y1,nZ=[" ","Enter","ArrowUp","ArrowDown"],sZ=[" ","Enter"],g1="Select",[Sv,Av,iZ]=gv(g1),[xd,ahe]=Br(g1,[iZ,vd]),Tv=vd(),[oZ,Ua]=xd(g1),[aZ,cZ]=xd(g1),S9=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,y=Tv(e),[p,b]=x.useState(null),[g,v]=x.useState(null),[m,k]=x.useState(!1),A=u1(l),[P=!1,R]=as({prop:n,defaultProp:s,onChange:i}),[N,V]=as({prop:o,defaultProp:a,onChange:c}),F=x.useRef(null),X=p?!!p.closest("form"):!0,[re,le]=x.useState(new Set),ee=Array.from(re).map(B=>B.props.value).join(";");return C.jsx(BC,{...y,children:C.jsxs(oZ,{required:h,scope:e,trigger:p,onTriggerChange:b,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:m,onValueNodeHasChildrenChange:k,contentId:rs(),value:N,onValueChange:V,open:P,onOpenChange:R,dir:A,triggerPointerDownPosRef:F,disabled:d,children:[C.jsx(Sv.Provider,{scope:e,children:C.jsx(aZ,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(B=>{le(G=>new Set(G).add(B))},[]),onNativeOptionRemove:x.useCallback(B=>{le(G=>{const Z=new Set(G);return Z.delete(B),Z})},[]),children:r})}),X?C.jsxs(H9,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:N,onChange:B=>V(B.target.value),disabled:d,children:[N===void 0?C.jsx("option",{value:""}):null,Array.from(re)]},ee):null]})})};S9.displayName=g1;var A9="SelectTrigger",T9=x.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=Tv(r),o=Ua(A9,r),a=o.disabled||n,c=We(e,o.onTriggerChange),l=Av(r),[u,f,d]=G9(y=>{const p=l().filter(v=>!v.disabled),b=p.find(v=>v.value===o.value),g=q9(p,y,b);g!==void 0&&o.onValueChange(g.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return C.jsx(LC,{asChild:!0,...i,children:C.jsx(Se.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":z9(o.value)?"":void 0,...s,ref:c,onClick:ce(s.onClick,y=>{y.currentTarget.focus()}),onPointerDown:ce(s.onPointerDown,y=>{const p=y.target;p.hasPointerCapture(y.pointerId)&&p.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)},y.preventDefault())}),onKeyDown:ce(s.onKeyDown,y=>{const p=u.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&f(y.key),!(p&&y.key===" ")&&nZ.includes(y.key)&&(h(),y.preventDefault())})})})});T9.displayName=A9;var I9="SelectValue",P9=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o="",...a}=t,c=Ua(I9,r),{onValueNodeHasChildrenChange:l}=c,u=i!==void 0,f=We(e,c.onValueNodeChange);return br(()=>{l(u)},[l,u]),C.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:z9(c.value)?C.jsx(C.Fragment,{children:o}):i})});P9.displayName=I9;var lZ="SelectIcon",O9=x.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return C.jsx(Se.span,{"aria-hidden":!0,...s,ref:e,children:n||"ā–¼"})});O9.displayName=lZ;var hl="SelectContent",R9=x.forwardRef((t,e)=>{const r=Ua(hl,t.__scopeSelect),[n,s]=x.useState();if(br(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?ja.createPortal(C.jsx(N9,{scope:t.__scopeSelect,children:C.jsx(Sv.Slot,{scope:t.__scopeSelect,children:C.jsx("div",{children:t.children})})}),i):null}return C.jsx(_9,{...t,ref:e})});R9.displayName=hl;var Ai=10,[N9,$a]=xd(hl),uZ="SelectContentImpl",_9=x.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:y,hideWhenDetached:p,avoidCollisions:b,...g}=t,v=Ua(hl,r),[m,k]=x.useState(null),[A,P]=x.useState(null),R=We(e,$=>k($)),[N,V]=x.useState(null),[F,X]=x.useState(null),re=Av(r),[le,ee]=x.useState(!1),B=x.useRef(!1);x.useEffect(()=>{if(m)return WC(m)},[m]),TC();const G=x.useCallback($=>{const[K,...ue]=re().map(ke=>ke.ref.current),[he]=ue.slice(-1),oe=document.activeElement;for(const ke of $)if(ke===oe||(ke==null||ke.scrollIntoView({block:"nearest"}),ke===K&&A&&(A.scrollTop=0),ke===he&&A&&(A.scrollTop=A.scrollHeight),ke==null||ke.focus(),document.activeElement!==oe))return},[re,A]),Z=x.useCallback(()=>G([N,m]),[G,N,m]);x.useEffect(()=>{le&&Z()},[le,Z]);const{onOpenChange:E,triggerPointerDownPosRef:S}=v;x.useEffect(()=>{if(m){let $={x:0,y:0};const K=he=>{var oe,ke;$={x:Math.abs(Math.round(he.pageX)-(((oe=S.current)==null?void 0:oe.x)??0)),y:Math.abs(Math.round(he.pageY)-(((ke=S.current)==null?void 0:ke.y)??0))}},ue=he=>{$.x<=10&&$.y<=10?he.preventDefault():m.contains(he.target)||E(!1),document.removeEventListener("pointermove",K),S.current=null};return S.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ue,{capture:!0})}}},[m,E,S]),x.useEffect(()=>{const $=()=>E(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[E]);const[O,D]=G9($=>{const K=re().filter(oe=>!oe.disabled),ue=K.find(oe=>oe.ref.current===document.activeElement),he=q9(K,$,ue);he&&setTimeout(()=>he.ref.current.focus())}),L=x.useCallback(($,K,ue)=>{const he=!B.current&&!ue;(v.value!==void 0&&v.value===K||he)&&(V($),he&&(B.current=!0))},[v.value]),W=x.useCallback(()=>m==null?void 0:m.focus(),[m]),q=x.useCallback(($,K,ue)=>{const he=!B.current&&!ue;(v.value!==void 0&&v.value===K||he)&&X($)},[v.value]),te=n==="popper"?bw:M9,J=te===bw?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:y,hideWhenDetached:p,avoidCollisions:b}:{};return C.jsx(N9,{scope:r,content:m,viewport:A,onViewportChange:P,itemRefCallback:L,selectedItem:N,onItemLeave:W,itemTextRefCallback:q,focusSelectedItem:Z,selectedItemText:F,position:n,isPositioned:le,searchRef:O,children:C.jsx(Ev,{as:ul,allowPinchZoom:!0,children:C.jsx(vv,{asChild:!0,trapped:v.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:ce(s,$=>{var K;(K=v.trigger)==null||K.focus({preventScroll:!0}),$.preventDefault()}),children:C.jsx(pd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:C.jsx(te,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:$=>$.preventDefault(),...g,...J,onPlaced:()=>ee(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:ce(g.onKeyDown,$=>{const K=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!K&&$.key.length===1&&D($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let he=re().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);if(["ArrowUp","End"].includes($.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const oe=$.target,ke=he.indexOf(oe);he=he.slice(ke+1)}setTimeout(()=>G(he)),$.preventDefault()}})})})})})})});_9.displayName=uZ;var fZ="SelectItemAlignedPosition",M9=x.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Ua(hl,r),o=$a(hl,r),[a,c]=x.useState(null),[l,u]=x.useState(null),f=We(e,R=>u(R)),d=Av(r),h=x.useRef(!1),y=x.useRef(!0),{viewport:p,selectedItem:b,selectedItemText:g,focusSelectedItem:v}=o,m=x.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&l&&p&&b&&g){const R=i.trigger.getBoundingClientRect(),N=l.getBoundingClientRect(),V=i.valueNode.getBoundingClientRect(),F=g.getBoundingClientRect();if(i.dir!=="rtl"){const oe=F.left-N.left,ke=V.left-oe,_e=R.left-ke,xt=R.width+_e,tn=Math.max(xt,N.width),wr=window.innerWidth-Ai,U=GA(ke,[Ai,wr-tn]);a.style.minWidth=xt+"px",a.style.left=U+"px"}else{const oe=N.right-F.right,ke=window.innerWidth-V.right-oe,_e=window.innerWidth-R.right-ke,xt=R.width+_e,tn=Math.max(xt,N.width),wr=window.innerWidth-Ai,U=GA(ke,[Ai,wr-tn]);a.style.minWidth=xt+"px",a.style.right=U+"px"}const X=d(),re=window.innerHeight-Ai*2,le=p.scrollHeight,ee=window.getComputedStyle(l),B=parseInt(ee.borderTopWidth,10),G=parseInt(ee.paddingTop,10),Z=parseInt(ee.borderBottomWidth,10),E=parseInt(ee.paddingBottom,10),S=B+G+le+E+Z,O=Math.min(b.offsetHeight*5,S),D=window.getComputedStyle(p),L=parseInt(D.paddingTop,10),W=parseInt(D.paddingBottom,10),q=R.top+R.height/2-Ai,te=re-q,J=b.offsetHeight/2,$=b.offsetTop+J,K=B+G+$,ue=S-K;if(K<=q){const oe=b===X[X.length-1].ref.current;a.style.bottom="0px";const ke=l.clientHeight-p.offsetTop-p.offsetHeight,_e=Math.max(te,J+(oe?W:0)+ke+Z),xt=K+_e;a.style.height=xt+"px"}else{const oe=b===X[0].ref.current;a.style.top="0px";const _e=Math.max(q,B+p.offsetTop+(oe?L:0)+J)+ue;a.style.height=_e+"px",p.scrollTop=K-q+p.offsetTop}a.style.margin=`${Ai}px 0`,a.style.minHeight=O+"px",a.style.maxHeight=re+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,l,p,b,g,i.dir,n]);br(()=>m(),[m]);const[k,A]=x.useState();br(()=>{l&&A(window.getComputedStyle(l).zIndex)},[l]);const P=x.useCallback(R=>{R&&y.current===!0&&(m(),v==null||v(),y.current=!1)},[m,v]);return C.jsx(hZ,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:P,children:C.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:C.jsx(Se.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});M9.displayName=fZ;var dZ="SelectPopperPosition",bw=x.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ai,...i}=t,o=Tv(r);return C.jsx(jC,{...o,...i,ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});bw.displayName=dZ;var[hZ,lk]=xd(hl,{}),ww="SelectViewport",D9=x.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:n,...s}=t,i=$a(ww,r),o=lk(ww,r),a=We(e,i.onViewportChange),c=x.useRef(0);return C.jsxs(C.Fragment,{children:[C.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),C.jsx(Sv.Slot,{scope:r,children:C.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:ce(s.onScroll,l=>{const u=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&f){const h=Math.abs(c.current-u.scrollTop);if(h>0){const y=window.innerHeight-Ai*2,p=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),g=Math.max(p,b);if(g0?k:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});D9.displayName=ww;var B9="SelectGroup",[pZ,yZ]=xd(B9),L9=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=rs();return C.jsx(pZ,{scope:r,id:s,children:C.jsx(Se.div,{role:"group","aria-labelledby":s,...n,ref:e})})});L9.displayName=B9;var j9="SelectLabel",gZ=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=yZ(j9,r);return C.jsx(Se.div,{id:s.id,...n,ref:e})});gZ.displayName=j9;var sg="SelectItem",[vZ,F9]=xd(sg),U9=x.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Ua(sg,r),c=$a(sg,r),l=a.value===n,[u,f]=x.useState(i??""),[d,h]=x.useState(!1),y=We(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,n,s)}),p=rs(),b=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return C.jsx(vZ,{scope:r,value:n,disabled:s,textId:p,isSelected:l,onItemTextChange:x.useCallback(g=>{f(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:C.jsx(Sv.ItemSlot,{scope:r,value:n,disabled:s,textValue:u,children:C.jsx(Se.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:ce(o.onFocus,()=>h(!0)),onBlur:ce(o.onBlur,()=>h(!1)),onPointerUp:ce(o.onPointerUp,b),onPointerMove:ce(o.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:ce(o.onKeyDown,g=>{var v;((v=c.searchRef)==null?void 0:v.current)!==""&&g.key===" "||(sZ.includes(g.key)&&b(),g.key===" "&&g.preventDefault())})})})})});U9.displayName=sg;var rh="SelectItemText",$9=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Ua(rh,r),a=$a(rh,r),c=F9(rh,r),l=cZ(rh,r),[u,f]=x.useState(null),d=We(e,g=>f(g),c.onItemTextChange,g=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,g,c.value,c.disabled)}),h=u==null?void 0:u.textContent,y=x.useMemo(()=>C.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:b}=l;return br(()=>(p(y),()=>b(y)),[p,b,y]),C.jsxs(C.Fragment,{children:[C.jsx(Se.span,{id:c.textId,...i,ref:d}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?ja.createPortal(i.children,o.valueNode):null]})});$9.displayName=rh;var W9="SelectItemIndicator",mZ=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return F9(W9,r).isSelected?C.jsx(Se.span,{"aria-hidden":!0,...n,ref:e}):null});mZ.displayName=W9;var Ew="SelectScrollUpButton",xZ=x.forwardRef((t,e)=>{const r=$a(Ew,t.__scopeSelect),n=lk(Ew,t.__scopeSelect),[s,i]=x.useState(!1),o=We(e,n.onScrollButtonChange);return br(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollTop>0;i(l)};const c=r.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?C.jsx(V9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});xZ.displayName=Ew;var Cw="SelectScrollDownButton",bZ=x.forwardRef((t,e)=>{const r=$a(Cw,t.__scopeSelect),n=lk(Cw,t.__scopeSelect),[s,i]=x.useState(!1),o=We(e,n.onScrollButtonChange);return br(()=>{if(r.viewport&&r.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)c.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),s?C.jsx(V9,{...t,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=r;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});bZ.displayName=Cw;var V9=x.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:n,...s}=t,i=$a("SelectScrollButton",r),o=x.useRef(null),a=Av(r),c=x.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),br(()=>{var l;const u=a().find(f=>f.ref.current===document.activeElement);(l=u==null?void 0:u.ref.current)==null||l.scrollIntoView({block:"nearest"})},[a]),C.jsx(Se.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(n,50))}),onPointerMove:ce(s.onPointerMove,()=>{var l;(l=i.onItemLeave)==null||l.call(i),o.current===null&&(o.current=window.setInterval(n,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{c()})})}),wZ="SelectSeparator",EZ=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t;return C.jsx(Se.div,{"aria-hidden":!0,...n,ref:e})});EZ.displayName=wZ;var kw="SelectArrow",CZ=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Tv(r),i=Ua(kw,r),o=$a(kw,r);return i.open&&o.position==="popper"?C.jsx(FC,{...s,...n,ref:e}):null});CZ.displayName=kw;function z9(t){return t===""||t===void 0}var H9=x.forwardRef((t,e)=>{const{value:r,...n}=t,s=x.useRef(null),i=We(e,s),o=pv(r);return x.useEffect(()=>{const a=s.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),C.jsx(y1,{asChild:!0,children:C.jsx("select",{...n,ref:i,defaultValue:r})})});H9.displayName="BubbleSelect";function G9(t){const e=Mr(t),r=x.useRef(""),n=x.useRef(0),s=x.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),i=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function q9(t,e,r){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=kZ(t,Math.max(i,0));s.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==r?c:void 0}function kZ(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var SZ=S9,AZ=T9,TZ=P9,IZ=O9,PZ=R9,OZ=D9,RZ=L9,NZ=U9,_Z=$9,MZ="gohwum1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 gohwum0 fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11ow fyvr11sl fyvr11lk fyvr11jc fyvr12w9 fyvr11cc fyvr11o4 fyvr11rc fyvr12zf fyvr12s9",DZ=St({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"gohwum6 gohwum2 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg",sm:"gohwum7 gohwum3 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk",md:"gohwum8 gohwum4 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go"}},defaultVariants:{},compoundVariants:[]}),BZ="gohwuma gohwum9 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk fyvr11q0 fyvr11qg fyvr11r0 fyvr11y3 fyvr12w9 fyvr11rt",LZ="gohwume _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 gohwumd fyvr1zk fyvr111o fyvr1v8 fyvr1xc fyvr1310 fyvr1311 fyvr130u fyvr130v fyvr11l8 fyvr11o4 fyvr11ow fyvr12zf fyvr12zb fyvr12w9 fyvr1309 fyvr12zz";const jZ=x.forwardRef(({children:t,className:e,...r},n)=>C.jsx(NZ,{className:or(LZ,e),...r,ref:n,children:C.jsx(_Z,{children:t})})),qA=x.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return C.jsx(dd,{disabled:n,display:"grid",id:s??c,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:C.jsxs(SZ,{disabled:n,name:c,...f,children:[C.jsxs(AZ,{id:s??c,className:or(MZ,DZ({borderRadius:r})),ref:e,children:[C.jsx(TZ,{placeholder:u}),C.jsx(Ce,{as:IZ,display:"inline-flex",children:C.jsx(RP,{})})]}),C.jsx(PZ,{className:BZ,children:C.jsx(OZ,{children:C.jsx(RZ,{children:l.map(({value:d,label:h,...y})=>C.jsx(jZ,{value:d,...y,children:h},d))})})})]})})});x.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,c=o?C.jsx(YC,{icon:EC,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return C.jsx(sk,{ref:e,name:i,leftIcon:Uq,controls:r||c,placeholder:s,value:o,onChange:l=>n==null?void 0:n(l),...a})});var FZ=St({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});x.forwardRef((t,e)=>{const{size:r="md",...n}=t;return C.jsx(Ce,{className:FZ({size:r}),color:"text50",ref:e,...n,children:C.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[C.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),C.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});x.forwardRef(({children:t},e)=>C.jsx(Ce,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));var uk="Switch",[UZ,che]=Br(uk),[$Z,WZ]=UZ(uk),VZ=x.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=x.useState(null),h=We(e,v=>d(v)),y=x.useRef(!1),p=f?!!f.closest("form"):!0,[b=!1,g]=as({prop:s,defaultProp:i,onChange:l});return C.jsxs($Z,{scope:r,checked:b,disabled:a,children:[C.jsx(Se.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":Q9(b),"data-disabled":a?"":void 0,disabled:a,value:c,...u,ref:h,onClick:ce(t.onClick,v=>{g(m=>!m),p&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),p&&C.jsx(HZ,{control:f,bubbles:!y.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}})]})});VZ.displayName=uk;var K9="SwitchThumb",zZ=x.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=WZ(K9,r);return C.jsx(Se.span,{"data-state":Q9(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});zZ.displayName=K9;var HZ=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=x.useRef(null),o=pv(r),a=yv(e);return x.useEffect(()=>{const c=i.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Q9(t){return t?"checked":"unchecked"}St({defaultClassName:"nwwh3z8",variantClassNames:{variant:{pill:"nwwh3z9",line:"nwwh3za nwwh3z1 fyvr11k8"},active:{true:"nwwh3zb nwwh3z2 fyvr130d",false:"nwwh3zc"},disabled:{true:"nwwh3zd nwwh3z3 fyvr12zx"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"nwwh3z4 fyvr11yf fyvr12wr"],[{active:!1,variant:"pill"},"nwwh3z5 fyvr11sl fyvr12wf"],[{active:!0,variant:"line"},"nwwh3z6 fyvr12w9"],[{active:!1,variant:"line"},"nwwh3z7 fyvr12wf"]]});var fk="Tabs",[GZ,lhe]=Br(fk,[md]),J9=md(),[qZ,dk]=GZ(fk),KZ=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=u1(a),[f,d]=as({prop:n,onChange:s,defaultProp:i});return C.jsx(qZ,{scope:r,baseId:rs(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c,children:C.jsx(Se.div,{dir:u,"data-orientation":o,...l,ref:e})})});KZ.displayName=fk;var Y9="TabsList",QZ=x.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=dk(Y9,r),o=J9(r);return C.jsx(UC,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:C.jsx(Se.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});QZ.displayName=Y9;var X9="TabsTrigger",JZ=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=dk(X9,r),a=J9(r),c=eR(o.baseId,n),l=tR(o.baseId,n),u=n===o.value;return C.jsx($C,{asChild:!0,...a,focusable:!s,active:u,children:C.jsx(Se.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:ce(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:ce(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:ce(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!s&&f&&o.onValueChange(n)})})})});JZ.displayName=X9;var Z9="TabsContent",YZ=x.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=dk(Z9,r),c=eR(a.baseId,n),l=tR(a.baseId,n),u=n===a.value,f=x.useRef(u);return x.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),C.jsx(Xr,{present:s||u,children:({present:d})=>C.jsx(Se.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:d&&i})})});YZ.displayName=Z9;function eR(t,e){return`${t}-trigger-${e}`}function tR(t,e){return`${t}-content-${e}`}var XZ="_1ppqbnx1 _1qxj1ib9 _1qxj1ibg _1qxj1ib6 fyvr11r3 fyvr11ig fyvr11k4 fyvr11k0 fyvr11jk _1ppqbnx0 fyvr11h4 fyvr11hs fyvr11fs fyvr11gg fyvr1zc fyvr111g fyvr1v0 fyvr1x4 fyvr11lk fyvr11cc fyvr11rh";x.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return C.jsxs(Ce,{className:XZ,ref:e,background:"buttonGlass",color:"text80",...s,children:[r&&C.jsx(r,{size:"xs"}),C.jsx(Tt,{children:n})]})});var ZZ="ToastProvider",[rR,eee,tee]=gv("Toast"),[nR,uhe]=Br("Toast",[tee]),[fhe,Iv]=nR(ZZ),sR="ToastViewport",ree=["F8"],Sw="toast.viewportPause",Aw="toast.viewportResume",nee=x.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=ree,label:s="Notifications ({hotkey})",...i}=t,o=Iv(sR,r),a=eee(r),c=x.useRef(null),l=x.useRef(null),u=x.useRef(null),f=x.useRef(null),d=We(e,f,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;x.useEffect(()=>{const b=g=>{var v;n.every(k=>g[k]||g.code===k)&&((v=f.current)==null||v.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),x.useEffect(()=>{const b=c.current,g=f.current;if(y&&b&&g){const v=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(Sw);g.dispatchEvent(P),o.isClosePausedRef.current=!0}},m=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(Aw);g.dispatchEvent(P),o.isClosePausedRef.current=!1}},k=P=>{!b.contains(P.relatedTarget)&&m()},A=()=>{b.contains(document.activeElement)||m()};return b.addEventListener("focusin",v),b.addEventListener("focusout",k),b.addEventListener("pointermove",v),b.addEventListener("pointerleave",A),window.addEventListener("blur",v),window.addEventListener("focus",m),()=>{b.removeEventListener("focusin",v),b.removeEventListener("focusout",k),b.removeEventListener("pointermove",v),b.removeEventListener("pointerleave",A),window.removeEventListener("blur",v),window.removeEventListener("focus",m)}}},[y,o.isClosePausedRef]);const p=x.useCallback(({tabbingDirection:b})=>{const v=a().map(m=>{const k=m.ref.current,A=[k,...bee(k)];return b==="forwards"?A:A.reverse()});return(b==="forwards"?v.reverse():v).flat()},[a]);return x.useEffect(()=>{const b=f.current;if(b){const g=v=>{var m,k,A;const P=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!P){const N=document.activeElement,V=v.shiftKey;if(v.target===b&&V){(m=l.current)==null||m.focus();return}const re=p({tabbingDirection:V?"backwards":"forwards"}),le=re.findIndex(ee=>ee===N);bx(re.slice(le+1))?v.preventDefault():V?(k=l.current)==null||k.focus():(A=u.current)==null||A.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[a,p]),C.jsxs(pK,{ref:c,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&C.jsx(Tw,{ref:l,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"forwards"});bx(b)}}),C.jsx(rR.Slot,{scope:r,children:C.jsx(Se.ol,{tabIndex:-1,...i,ref:d})}),y&&C.jsx(Tw,{ref:u,onFocusFromOutsideViewport:()=>{const b=p({tabbingDirection:"backwards"});bx(b)}})]})});nee.displayName=sR;var iR="ToastFocusProxy",Tw=x.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=Iv(iR,r);return C.jsx(y1,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var a;const c=o.relatedTarget;!((a=i.viewport)!=null&&a.contains(c))&&n()}})});Tw.displayName=iR;var Pv="Toast",see="toast.swipeStart",iee="toast.swipeMove",oee="toast.swipeCancel",aee="toast.swipeEnd",cee=x.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a=!0,c]=as({prop:n,defaultProp:s,onChange:i});return C.jsx(Xr,{present:r||a,children:C.jsx(fee,{open:a,...o,ref:e,onClose:()=>c(!1),onPause:Mr(t.onPause),onResume:Mr(t.onResume),onSwipeStart:ce(t.onSwipeStart,l=>{l.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(t.onSwipeMove,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","move"),l.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ce(t.onSwipeCancel,l=>{l.currentTarget.setAttribute("data-swipe","cancel"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(t.onSwipeEnd,l=>{const{x:u,y:f}=l.detail.delta;l.currentTarget.setAttribute("data-swipe","end"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),l.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),l.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),l.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});cee.displayName=Pv;var[lee,uee]=nR(Pv,{onClose(){}}),fee=x.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...y}=t,p=Iv(Pv,r),[b,g]=x.useState(null),v=We(e,ee=>g(ee)),m=x.useRef(null),k=x.useRef(null),A=s||p.duration,P=x.useRef(0),R=x.useRef(A),N=x.useRef(0),{onToastAdd:V,onToastRemove:F}=p,X=Mr(()=>{var ee;(b==null?void 0:b.contains(document.activeElement))&&((ee=p.viewport)==null||ee.focus()),o()}),re=x.useCallback(ee=>{!ee||ee===1/0||(window.clearTimeout(N.current),P.current=new Date().getTime(),N.current=window.setTimeout(X,ee))},[X]);x.useEffect(()=>{const ee=p.viewport;if(ee){const B=()=>{re(R.current),l==null||l()},G=()=>{const Z=new Date().getTime()-P.current;R.current=R.current-Z,window.clearTimeout(N.current),c==null||c()};return ee.addEventListener(Sw,G),ee.addEventListener(Aw,B),()=>{ee.removeEventListener(Sw,G),ee.removeEventListener(Aw,B)}}},[p.viewport,A,c,l,re]),x.useEffect(()=>{i&&!p.isClosePausedRef.current&&re(A)},[i,A,p.isClosePausedRef,re]),x.useEffect(()=>(V(),()=>F()),[V,F]);const le=x.useMemo(()=>b?uR(b):null,[b]);return p.viewport?C.jsxs(C.Fragment,{children:[le&&C.jsx(dee,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:le}),C.jsx(lee,{scope:r,onClose:X,children:ja.createPortal(C.jsx(rR.ItemSlot,{scope:r,children:C.jsx(hK,{asChild:!0,onEscapeKeyDown:ce(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||X(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:C.jsx(Se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:ce(t.onKeyDown,ee=>{ee.key==="Escape"&&(a==null||a(ee.nativeEvent),ee.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,X()))}),onPointerDown:ce(t.onPointerDown,ee=>{ee.button===0&&(m.current={x:ee.clientX,y:ee.clientY})}),onPointerMove:ce(t.onPointerMove,ee=>{if(!m.current)return;const B=ee.clientX-m.current.x,G=ee.clientY-m.current.y,Z=!!k.current,E=["left","right"].includes(p.swipeDirection),S=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,O=E?S(0,B):0,D=E?0:S(0,G),L=ee.pointerType==="touch"?10:2,W={x:O,y:D},q={originalEvent:ee,delta:W};Z?(k.current=W,ap(iee,f,q,{discrete:!1})):KA(W,p.swipeDirection,L)?(k.current=W,ap(see,u,q,{discrete:!1}),ee.target.setPointerCapture(ee.pointerId)):(Math.abs(B)>L||Math.abs(G)>L)&&(m.current=null)}),onPointerUp:ce(t.onPointerUp,ee=>{const B=k.current,G=ee.target;if(G.hasPointerCapture(ee.pointerId)&&G.releasePointerCapture(ee.pointerId),k.current=null,m.current=null,B){const Z=ee.currentTarget,E={originalEvent:ee,delta:B};KA(B,p.swipeDirection,p.swipeThreshold)?ap(aee,h,E,{discrete:!0}):ap(oee,d,E,{discrete:!0}),Z.addEventListener("click",S=>S.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),dee=t=>{const{__scopeToast:e,children:r,...n}=t,s=Iv(Pv,e),[i,o]=x.useState(!1),[a,c]=x.useState(!1);return mee(()=>o(!0)),x.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:C.jsx(d1,{asChild:!0,children:C.jsx(y1,{...n,children:i&&C.jsxs(C.Fragment,{children:[s.label," ",r]})})})},hee="ToastTitle",pee=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});pee.displayName=hee;var yee="ToastDescription",gee=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return C.jsx(Se.div,{...n,ref:e})});gee.displayName=yee;var oR="ToastAction",vee=x.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?C.jsx(lR,{altText:r,asChild:!0,children:C.jsx(cR,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${oR}\`. Expected non-empty \`string\`.`),null)});vee.displayName=oR;var aR="ToastClose",cR=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=uee(aR,r);return C.jsx(lR,{asChild:!0,children:C.jsx(Se.button,{type:"button",...n,ref:e,onClick:ce(t.onClick,s.onClose)})})});cR.displayName=aR;var lR=x.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return C.jsx(Se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function uR(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),xee(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...uR(n))}}),e}function ap(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?bC(s,i):s.dispatchEvent(i)}var KA=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function mee(t=()=>{}){const e=Mr(t);br(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function xee(t){return t.nodeType===t.ELEMENT_NODE}function bee(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function bx(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}St({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});x.createContext(null);var wee="_15pztn1 _1qxj1ib9 _1qxj1ibe _1qxj1ib4 fyvr11r3 fyvr11io fyvr11k8 fyvr11k0 fyvr11j8 _15pztn0 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go fyvr1vc fyvr1xg fyvr1zk fyvr111o fyvr11ow fyvr11sl fyvr12w9 fyvr12s9 fyvr130r fyvr12g fyvr11l8",Eee="_15pztn2";x.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return C.jsx(dd,{description:i,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:C.jsx(Ce,{as:r,autoComplete:n,spellCheck:"false",className:or(wee,d&&Eee),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:s,...h})})});var Cee=St({defaultClassName:"_18h918k5 _18h918k0 fyvr11q0 fyvr11qg fyvr11no fyvr11ow fyvr11l8",variantClassNames:{size:{xs:"_18h918k6",sm:"_18h918k7",md:"_18h918k8",lg:"_18h918k9",xl:"_18h918ka"},borderRadius:{circle:"_18h918kb _18h918k1 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw",lg:"_18h918kc _18h918k2 fyvr11hg fyvr11i4 fyvr11g4 fyvr11gs",md:"_18h918kd _18h918k3 fyvr11hc fyvr11i0 fyvr11g0 fyvr11go",sm:"_18h918ke _18h918k4 fyvr11h8 fyvr11hw fyvr11fw fyvr11gk"}},defaultVariants:{},compoundVariants:[]}),kee="_18h918kf";const See=x.memo(t=>{const{chainId:e,borderRadius:r="circle",className:n,disableAnimation:s=!1,style:i,src:o,size:a="md",...c}=t,l=o||iq(oq(e),a);return C.jsx(Ce,{className:or(n,Cee({borderRadius:r,size:a})),style:i,flexShrink:"0",...c,children:C.jsx(XC,{className:kee,disableAnimation:s,src:l})})});var Aee=St({defaultClassName:"bnrreb1 bnrreb0 fyvr11no fyvr11ow fyvr11m4 fyvr11l8",variantClassNames:{size:{xs:"bnrreb2",sm:"bnrreb3",md:"bnrreb4",lg:"bnrreb5",xl:"bnrreb6"}},defaultVariants:{},compoundVariants:[]}),Tee="bnrreb7",Iee="bnrreb9 bnrreb8 fyvr11hk fyvr11i8 fyvr11g8 fyvr11gw fyvr11q0 fyvr11qg fyvr11no fyvr11ow fyvr11wr fyvr12g fyvr164 fyvr11l8",QA="bnrreba";const JA="40%",YA="-2%",Pee=x.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",withNetwork:c,...l}=t;return C.jsxs(Ce,{className:or(r,Aee({size:a})),style:s,flexShrink:"0",...l,children:[i?C.jsx(XC,{className:or(Tee,c&&QA),disableAnimation:n,borderRadius:e,overflow:"hidden",src:i}):C.jsx(Tt,{className:or(Iee,c&&QA),variant:"normal",fontWeight:"medium",color:"text50",borderRadius:e,overflow:"hidden",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)}),c&&C.jsx(See,{chainId:c,position:"absolute",zIndex:"1",disableAnimation:n,style:{width:JA,height:JA,right:YA,bottom:YA}})]})});var[Ov,dhe]=Br("Tooltip",[vd]),Rv=vd(),fR="TooltipProvider",Oee=700,Iw="tooltip.open",[Ree,hk]=Ov(fR),Nee=t=>{const{__scopeTooltip:e,delayDuration:r=Oee,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,[o,a]=x.useState(!0),c=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),C.jsx(Ree,{scope:e,isOpenDelayed:o,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a(!0),n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:x.useCallback(u=>{c.current=u},[]),disableHoverableContent:s,children:i})};Nee.displayName=fR;var Nv="Tooltip",[_ee,v1]=Ov(Nv),Mee=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=t,c=hk(Nv,t.__scopeTooltip),l=Rv(e),[u,f]=x.useState(null),d=rs(),h=x.useRef(0),y=o??c.disableHoverableContent,p=a??c.delayDuration,b=x.useRef(!1),[g=!1,v]=as({prop:n,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(Iw))):c.onClose(),i==null||i(R)}}),m=x.useMemo(()=>g?b.current?"delayed-open":"instant-open":"closed",[g]),k=x.useCallback(()=>{window.clearTimeout(h.current),b.current=!1,v(!0)},[v]),A=x.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),P=x.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,v(!0)},p)},[p,v]);return x.useEffect(()=>()=>window.clearTimeout(h.current),[]),C.jsx(BC,{...l,children:C.jsx(_ee,{scope:e,contentId:d,open:g,stateAttribute:m,trigger:u,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayed?P():k()},[c.isOpenDelayed,P,k]),onTriggerLeave:x.useCallback(()=>{y?A():window.clearTimeout(h.current)},[A,y]),onOpen:k,onClose:A,disableHoverableContent:y,children:r})})};Mee.displayName=Nv;var Pw="TooltipTrigger",Dee=x.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=v1(Pw,r),i=hk(Pw,r),o=Rv(r),a=x.useRef(null),c=We(e,a,s.onTriggerChange),l=x.useRef(!1),u=x.useRef(!1),f=x.useCallback(()=>l.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),C.jsx(LC,{asChild:!0,...o,children:C.jsx(Se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:ce(t.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:ce(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:ce(t.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ce(t.onFocus,()=>{l.current||s.onOpen()}),onBlur:ce(t.onBlur,s.onClose),onClick:ce(t.onClick,s.onClose)})})});Dee.displayName=Pw;var pk="TooltipPortal",[Bee,Lee]=Ov(pk,{forceMount:void 0}),jee=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:s}=t,i=v1(pk,e);return C.jsx(Bee,{scope:e,forceMount:r,children:C.jsx(Xr,{present:r||i.open,children:C.jsx(d1,{asChild:!0,container:s,children:n})})})};jee.displayName=pk;var Wf="TooltipContent",Fee=x.forwardRef((t,e)=>{const r=Lee(Wf,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=v1(Wf,t.__scopeTooltip);return C.jsx(Xr,{present:n||o.open,children:o.disableHoverableContent?C.jsx(dR,{side:s,...i,ref:e}):C.jsx(Uee,{side:s,...i,ref:e})})}),Uee=x.forwardRef((t,e)=>{const r=v1(Wf,t.__scopeTooltip),n=hk(Wf,t.__scopeTooltip),s=x.useRef(null),i=We(e,s),[o,a]=x.useState(null),{trigger:c,onClose:l}=r,u=s.current,{onPointerInTransitChange:f}=n,d=x.useCallback(()=>{a(null),f(!1)},[f]),h=x.useCallback((y,p)=>{const b=y.currentTarget,g={x:y.clientX,y:y.clientY},v=zee(g,b.getBoundingClientRect()),m=Hee(g,v),k=Gee(p.getBoundingClientRect()),A=Kee([...m,...k]);a(A),f(!0)},[f]);return x.useEffect(()=>()=>d(),[d]),x.useEffect(()=>{if(c&&u){const y=b=>h(b,u),p=b=>h(b,c);return c.addEventListener("pointerleave",y),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",p)}}},[c,u,h,d]),x.useEffect(()=>{if(o){const y=p=>{const b=p.target,g={x:p.clientX,y:p.clientY},v=(c==null?void 0:c.contains(b))||(u==null?void 0:u.contains(b)),m=!qee(g,o);v?d():m&&(d(),l())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,u,o,l,d]),C.jsx(dR,{...t,ref:i})}),[$ee,Wee]=Ov(Nv,{isInside:!1}),dR=x.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,c=v1(Wf,r),l=Rv(r),{onClose:u}=c;return x.useEffect(()=>(document.addEventListener(Iw,u),()=>document.removeEventListener(Iw,u)),[u]),x.useEffect(()=>{if(c.trigger){const f=d=>{const h=d.target;h!=null&&h.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),C.jsx(pd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:C.jsxs(jC,{"data-state":c.stateAttribute,...l,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[C.jsx(SP,{children:n}),C.jsx($ee,{scope:r,isInside:!0,children:C.jsx(rZ,{id:c.contentId,role:"tooltip",children:s||n})})]})})});Fee.displayName=Wf;var hR="TooltipArrow",Vee=x.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Rv(r);return Wee(hR,r).isInside?null:C.jsx(FC,{...s,...n,ref:e})});Vee.displayName=hR;function zee(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Hee(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function Gee(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function qee(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;in!=u>n&&r<(l-a)*(n-c)/(u-c)+a&&(s=!s)}return s}function Kee(t){const e=t.slice();return e.sort((r,n)=>r.xn.x?1:r.yn.y?1:0),Qee(e)}function Qee(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var pR,XA=ja;pR=XA.createRoot,XA.hydrateRoot;const yk="6.13.4";function Jee(t,e,r){const n=e.split("|").map(i=>i.trim());for(let i=0;iPromise.resolve(t[n])))).reduce((n,s,i)=>(n[e[i]]=s,n),{})}function fe(t,e,r){for(let n in e){let s=e[n];const i=r?r[n]:null;i&&Jee(s,i,n),Object.defineProperty(t,n,{enumerable:!0,value:s,writable:!1})}}function du(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(du).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return du(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${du(r)}: ${du(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Ft(t,e){return t&&t.code===e}function _v(t){return Ft(t,"CALL_EXCEPTION")}function ht(t,e,r){let n=t;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${du(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];i.push(o+"="+du(a))}}i.push(`code=${e}`),i.push(`version=${yk}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return fe(s,{code:e}),r&&Object.assign(s,r),s.shortMessage==null&&fe(s,{shortMessage:n}),s}function H(t,e,r,n){if(!t)throw ht(e,r,n)}function I(t,e,r,n){H(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function gk(t,e,r){r==null&&(r=""),r&&(r=": "+r),H(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),H(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const Yee=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"Ć©".normalize("NFD")!=="eĢ")throw new Error("broken");t.push(e)}catch{}return t},[]);function vk(t){H(Yee.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function yo(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),H(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function yR(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i>4]+ZA[s&15]}return r}function Fe(t){return"0x"+t.map(e=>z(e).substring(2)).join("")}function ba(t){return qe(t,!0)?(t.length-2)/2:Q(t).length}function at(t,e,r){const n=Q(t);return r!=null&&r>n.length&&H(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),z(n.slice(e??0,r??n.length))}function Xee(t){let e=z(t).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function gR(t,e,r){const n=Q(t);H(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),r?s.set(n,e-n.length):s.set(n,0),z(s)}function ss(t,e){return gR(t,e,!0)}function Mv(t,e){return gR(t,e,!1)}const Dv=BigInt(0),ks=BigInt(1),hu=9007199254740991;function g0(t,e){const r=m1(t,"value"),n=BigInt(Pe(e,"width"));if(H(r>>n===Dv,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-ks){const s=(ks<=-hu&&t<=hu,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){I(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}I(!1,"invalid BigNumberish value",e||"value",t)}function m1(t,e){const r=xe(t,e);return H(r>=Dv,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const e3="0123456789abcdef";function bd(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=e3[r>>4],e+=e3[r&15];return BigInt(e)}return xe(t)}function Pe(t,e){switch(typeof t){case"bigint":return I(t>=-hu&&t<=hu,"overflow",e||"value",t),Number(t);case"number":return I(Number.isInteger(t),"underflow",e||"value",t),I(t>=-hu&&t<=hu,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return Pe(BigInt(t),e)}catch(r){I(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}I(!1,"invalid numeric value",e||"value",t)}function vR(t){return Pe(bd(t))}function On(t,e){let n=m1(t,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{const s=Pe(e,"width");for(H(s*2>=n.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});n.length>6===2;o++)i++;return i}return t==="OVERRUN"?r.length-e-1:0}function rte(t,e,r,n,s){return t==="OVERLONG"?(I(typeof s=="number","invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),wR(t,e,r))}const ER=Object.freeze({error:tte,ignore:wR,replace:rte});function CR(t,e){e==null&&(e=ER.error);const r=Q(t,"bytes"),n=[];let s=0;for(;s>7)){n.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?s+=e("UNEXPECTED_CONTINUE",s-1,r,n):s+=e("BAD_PREFIX",s-1,r,n);continue}if(s-1+o>=r.length){s+=e("OVERRUN",s-1,r,n);continue}let c=i&(1<<8-o-1)-1;for(let l=0;l1114111){s+=e("OUT_OF_RANGE",s-1-o,r,n,c);continue}if(c>=55296&&c<=57343){s+=e("UTF16_SURROGATE",s-1-o,r,n,c);continue}if(c<=a){s+=e("OVERLONG",s-1-o,r,n,c);continue}n.push(c)}}return n}function mt(t,e){I(typeof t=="string","invalid string value","str",t),e!=null&&(vk(e),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);I(n>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return new Uint8Array(r)}function nte(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ds(t,e){return nte(CR(t,e))}function ste(t,e){return CR(mt(t,e))}function kR(t){async function e(r,n){H(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();H(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),H(s==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=ht("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{i=ht("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(h){throw clearTimeout(a),i||h}clearTimeout(a);const u={};l.headers.forEach((h,y)=>{u[y.toLowerCase()]=h});const f=await l.arrayBuffer(),d=f==null?null:new Uint8Array(f);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:d}}return e}const ite=12,ote=250;let t3=kR();const ate=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),cte=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let wx=!1;async function SR(t,e){try{const r=t.match(ate);if(!r)throw new Error("invalid data");return new eo(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?xR(r[3]):lte(r[3]))}catch{return new eo(599,"BAD REQUEST (invalid data: URI)",{},null,new Gt(t))}}function AR(t){async function e(r,n){try{const s=r.match(cte);if(!s)throw new Error("invalid link");return new Gt(`${t}${s[2]}`)}catch{return new eo(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Gt(r))}}return e}const lp={data:SR,ipfs:AR("https://gateway.ipfs.io/ipfs/")},TR=new WeakMap;var Ec,Fo;class IR{constructor(e){j(this,Ec);j(this,Fo);T(this,Ec,[]),T(this,Fo,!1),TR.set(e,()=>{if(!w(this,Fo)){T(this,Fo,!0);for(const r of w(this,Ec))setTimeout(()=>{r()},0);T(this,Ec,[])}})}addListener(e){H(!w(this,Fo),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),w(this,Ec).push(e)}get cancelled(){return w(this,Fo)}checkSignal(){H(!this.cancelled,"cancelled","CANCELLED",{})}}Ec=new WeakMap,Fo=new WeakMap;function up(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var Uu,$u,gs,Ri,Wu,Vu,Qt,bn,Ni,Cc,kc,Sc,Qs,vs,Uo,Ac,nh;const Dg=class Dg{constructor(e){j(this,Ac);j(this,Uu);j(this,$u);j(this,gs);j(this,Ri);j(this,Wu);j(this,Vu);j(this,Qt);j(this,bn);j(this,Ni);j(this,Cc);j(this,kc);j(this,Sc);j(this,Qs);j(this,vs);j(this,Uo);T(this,Vu,String(e)),T(this,Uu,!1),T(this,$u,!0),T(this,gs,{}),T(this,Ri,""),T(this,Wu,3e5),T(this,vs,{slotInterval:ote,maxAttempts:ite}),T(this,Uo,null)}get url(){return w(this,Vu)}set url(e){T(this,Vu,String(e))}get body(){return w(this,Qt)==null?null:new Uint8Array(w(this,Qt))}set body(e){if(e==null)T(this,Qt,void 0),T(this,bn,void 0);else if(typeof e=="string")T(this,Qt,mt(e)),T(this,bn,"text/plain");else if(e instanceof Uint8Array)T(this,Qt,e),T(this,bn,"application/octet-stream");else if(typeof e=="object")T(this,Qt,mt(JSON.stringify(e))),T(this,bn,"application/json");else throw new Error("invalid body")}hasBody(){return w(this,Qt)!=null}get method(){return w(this,Ri)?w(this,Ri):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),T(this,Ri,String(e).toUpperCase())}get headers(){const e=Object.assign({},w(this,gs));return w(this,Ni)&&(e.authorization=`Basic ${bR(mt(w(this,Ni)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&w(this,bn)&&(e["content-type"]=w(this,bn)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){w(this,gs)[String(e).toLowerCase()]=String(r)}clearHeaders(){T(this,gs,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"timeout must be non-zero","timeout",e),T(this,Wu,e)}get preflightFunc(){return w(this,Cc)||null}set preflightFunc(e){T(this,Cc,e)}get processFunc(){return w(this,kc)||null}set processFunc(e){T(this,kc,e)}get retryFunc(){return w(this,Sc)||null}set retryFunc(e){T(this,Sc,e)}get getUrlFunc(){return w(this,Uo)||t3}set getUrlFunc(e){T(this,Uo,e)}toString(){return``}setThrottleParams(e){e.slotInterval!=null&&(w(this,vs).slotInterval=e.slotInterval),e.maxAttempts!=null&&(w(this,vs).maxAttempts=e.maxAttempts)}send(){return H(w(this,Qs)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),T(this,Qs,new IR(this)),Y(this,Ac,nh).call(this,0,r3()+this.timeout,0,this,new eo(0,"",{},null,this))}cancel(){H(w(this,Qs)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=TR.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();H(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const s=new Dg(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,T(s,gs,Object.assign({},w(this,gs))),w(this,Qt)&&T(s,Qt,new Uint8Array(w(this,Qt))),T(s,bn,w(this,bn)),s}clone(){const e=new Dg(this.url);return T(e,Ri,w(this,Ri)),w(this,Qt)&&T(e,Qt,w(this,Qt)),T(e,bn,w(this,bn)),T(e,gs,Object.assign({},w(this,gs))),T(e,Ni,w(this,Ni)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),T(e,Cc,w(this,Cc)),T(e,kc,w(this,kc)),T(e,Sc,w(this,Sc)),T(e,vs,Object.assign({},w(this,vs))),T(e,Uo,w(this,Uo)),e}static lockConfig(){wx=!0}static getGateway(e){return lp[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(wx)throw new Error("gateways locked");lp[e]=r}static registerGetUrl(e){if(wx)throw new Error("gateways locked");t3=e}static createGetUrlFunc(e){return kR()}static createDataGateway(){return SR}static createIpfsGatewayFunc(e){return AR(e)}};Uu=new WeakMap,$u=new WeakMap,gs=new WeakMap,Ri=new WeakMap,Wu=new WeakMap,Vu=new WeakMap,Qt=new WeakMap,bn=new WeakMap,Ni=new WeakMap,Cc=new WeakMap,kc=new WeakMap,Sc=new WeakMap,Qs=new WeakMap,vs=new WeakMap,Uo=new WeakMap,Ac=new WeakSet,nh=async function(e,r,n,s,i){var u,f,d;if(e>=w(this,vs).maxAttempts)return i.makeServerError("exceeded maximum retry limit");H(r3()<=r,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:s}),n>0&&await ute(n);let o=this.clone();const a=(o.url.split(":")[0]||"").toLowerCase();if(a in lp){const h=await lp[a](o.url,up(w(s,Qs)));if(h instanceof eo){let y=h;if(this.processFunc){up(w(s,Qs));try{y=await this.processFunc(o,y)}catch(p){(p.throttle==null||typeof p.stall!="number")&&y.makeServerError("error in post-processing function",p).assertOk()}}return y}o=h}this.preflightFunc&&(o=await this.preflightFunc(o));const c=await this.getUrlFunc(o,up(w(s,Qs)));let l=new eo(c.statusCode,c.statusMessage,c.headers,c.body,s);if(l.statusCode===301||l.statusCode===302){try{const h=l.headers.location||"";return Y(u=o.redirect(h),Ac,nh).call(u,e+1,r,0,s,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){const h=l.headers["retry-after"];let y=w(this,vs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(y=parseInt(h)),Y(f=o.clone(),Ac,nh).call(f,e+1,r,y,s,l)}if(this.processFunc){up(w(s,Qs));try{l=await this.processFunc(o,l)}catch(h){(h.throttle==null||typeof h.stall!="number")&&l.makeServerError("error in post-processing function",h).assertOk();let y=w(this,vs).slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return h.stall>=0&&(y=h.stall),Y(d=o.clone(),Ac,nh).call(d,e+1,r,y,s,l)}}return l};let Gt=Dg;var L0,j0,F0,wn,zu,Tc;const q5=class q5{constructor(e,r,n,s,i){j(this,L0);j(this,j0);j(this,F0);j(this,wn);j(this,zu);j(this,Tc);T(this,L0,e),T(this,j0,r),T(this,F0,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),T(this,wn,s==null?null:new Uint8Array(s)),T(this,zu,i||null),T(this,Tc,{message:""})}toString(){return``}get statusCode(){return w(this,L0)}get statusMessage(){return w(this,j0)}get headers(){return Object.assign({},w(this,F0))}get body(){return w(this,wn)==null?null:new Uint8Array(w(this,wn))}get bodyText(){try{return w(this,wn)==null?"":Ds(w(this,wn))}catch{H(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{H(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw fe(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return w(this,wn)!=null}get request(){return w(this,zu)}ok(){return w(this,Tc).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=w(this,Tc);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{w(this,wn)&&(s=Ds(w(this,wn)))}catch{}H(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};L0=new WeakMap,j0=new WeakMap,F0=new WeakMap,wn=new WeakMap,zu=new WeakMap,Tc=new WeakMap;let eo=q5;function r3(){return new Date().getTime()}function lte(t){return mt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function ute(t){return new Promise(e=>setTimeout(e,t))}const fte=BigInt(-1),fs=BigInt(0),pu=BigInt(1),dte=BigInt(5),Dl={};let Ou="0000";for(;Ou.length<80;)Ou+=Ou;function Ja(t){let e=Ou;for(;e.length=-s&&tfs?t=g0(ca(t,n),n):t=-g0(ca(-t,n),n)}else{const s=pu<=0&&ti[a]==null?l:(I(typeof i[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,i[a]),i[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}I(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),I(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const s=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:s}}function hte(t,e){let r="";t0?n*=Ja(s):s<0&&(r*=Ja(-s)),rn?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=w(this,ot);return w(this,ot)fs&&(e+=w(this,jr)-pu),e=w(this,ot)/w(this,jr)*w(this,jr),Y(this,tt,Ci).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=dte*Ja(r-1);let s=this.value+n;const i=Ja(r);return s=s/i*i,$d(s,w(this,ms),"round"),new Bo(Dl,s,w(this,ms))}isZero(){return w(this,ot)===fs}isNegative(){return w(this,ot)0){const c=Ja(a);H(o%c===fs,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Ja(-a));return $d(o,i,"fromValue"),new Bo(Dl,o,i)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);I(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const s=Ex(r);let i=n[2]||"0",o=n[3]||"";for(;o.length{H(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const s=n3(t,e+1,n);return r(e+1+n+s),s3(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),s3(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=n3(t,e+1,n);r(e+1+n+s);const i=z(t.slice(e+1+n,e+1+n+s));return{consumed:1+n+s,result:i}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const s=z(t.slice(e+1,e+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:pte(t[e])}}function x1(t){const e=Q(t,"data"),r=PR(e,0);return I(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function i3(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function OR(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(OR(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=i3(n.length);return s.unshift(247+s.length),s.concat(n)}const e=Array.prototype.slice.call(Q(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=i3(e.length);return r.unshift(183+r.length),r.concat(e)}const o3="0123456789abcdef";function Na(t){let e="0x";for(const r of OR(t))e+=o3[r>>4],e+=o3[r&15];return e}const RR=["wei","kwei","mwei","gwei","szabo","finney","ether"];function NR(t,e){let r=18;if(typeof e=="string"){const n=RR.indexOf(e);I(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Pe(e,"unit"));return v0.fromValue(t,r,{decimals:r,width:512}).toString()}function og(t,e){I(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=RR.indexOf(e);I(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=Pe(e,"unit"));return v0.fromString(t,{decimals:r,width:512}).value}function yte(t){return NR(t,18)}function Dw(t){return og(t,18)}function _R(t){const e=Q(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=z(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Hr=32,Bw=new Uint8Array(Hr),gte=["then"],fp={},MR=new WeakMap;function oc(t){return MR.get(t)}function a3(t,e){MR.set(t,e)}function Wd(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function Lw(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof pl?Lw(oc(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof pl&&(o=Lw(oc(o),o,r)),n[s]=o),n},{})}var Hu;const vu=class vu extends Array{constructor(...r){const n=r[0];let s=r[1],i=(r[2]||[]).slice(),o=!0;n!==fp&&(s=r,i=[],o=!1);super(s.length);j(this,Hu);s.forEach((l,u)=>{this[u]=l});const a=i.reduce((l,u)=>(typeof u=="string"&&l.set(u,(l.get(u)||0)+1),l),new Map);if(a3(this,Object.freeze(s.map((l,u)=>{const f=i[u];return f!=null&&a.get(f)===1?f:null}))),T(this,Hu,[]),w(this,Hu)==null&&w(this,Hu),!o)return;Object.freeze(this);const c=new Proxy(this,{get:(l,u,f)=>{if(typeof u=="string"){if(u.match(/^[0-9]+$/)){const h=Pe(u,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const y=l[h];return y instanceof Error&&Wd(`index ${h}`,y),y}if(gte.indexOf(u)>=0)return Reflect.get(l,u,f);const d=l[u];if(d instanceof Function)return function(...h){return d.apply(this===f?l:this,h)};if(!(u in l))return l.getValue.apply(this===f?l:this,[u])}return Reflect.get(l,u,f)}});return a3(c,oc(this)),c}toArray(r){const n=[];return this.forEach((s,i)=>{s instanceof Error&&Wd(`index ${i}`,s),r&&s instanceof vu&&(s=s.toArray(r)),n.push(s)}),n}toObject(r){const n=oc(this);return n.reduce((s,i,o)=>(H(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),Lw(n,this,r)),{})}slice(r,n){r==null&&(r=0),r<0&&(r+=this.length,r<0&&(r=0)),n==null&&(n=this.length),n<0&&(n+=this.length,n<0&&(n=0)),n>this.length&&(n=this.length);const s=oc(this),i=[],o=[];for(let a=r;a{w(this,_i)[e]=c3(r)}}}_i=new WeakMap,Ic=new WeakMap,Gu=new WeakSet,qp=function(e){return w(this,_i).push(e),T(this,Ic,w(this,Ic)+e.length),e.length};var rn,En,Pc,Oc,$o,El,Uw,DR;const K5=class K5{constructor(e,r,n){j(this,El);_(this,"allowLoose");j(this,rn);j(this,En);j(this,Pc);j(this,Oc);j(this,$o);fe(this,{allowLoose:!!r}),T(this,rn,tr(e)),T(this,Pc,0),T(this,Oc,null),T(this,$o,n??1024),T(this,En,0)}get data(){return z(w(this,rn))}get dataLength(){return w(this,rn).length}get consumed(){return w(this,En)}get bytes(){return new Uint8Array(w(this,rn))}subReader(e){const r=new K5(w(this,rn).slice(w(this,En)+e),this.allowLoose,w(this,$o));return T(r,Oc,this),r}readBytes(e,r){let n=Y(this,El,DR).call(this,0,e,!!r);return Y(this,El,Uw).call(this,e),T(this,En,w(this,En)+n.length),n.slice(0,e)}readValue(){return bd(this.readBytes(Hr))}readIndex(){return vR(this.readBytes(Hr))}};rn=new WeakMap,En=new WeakMap,Pc=new WeakMap,Oc=new WeakMap,$o=new WeakMap,El=new WeakSet,Uw=function(e){var r;if(w(this,Oc))return Y(r=w(this,Oc),El,Uw).call(r,e);T(this,Pc,w(this,Pc)+e),H(w(this,$o)<1||w(this,Pc)<=w(this,$o)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${w(this,$o)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:tr(w(this,rn)),offset:w(this,En),length:e,info:{bytesRead:w(this,Pc),dataLength:this.dataLength}})},DR=function(e,r,n){let s=Math.ceil(r/Hr)*Hr;return w(this,En)+s>w(this,rn).length&&(this.allowLoose&&n&&w(this,En)+r<=w(this,rn).length?s=r:H(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:tr(w(this,rn)),length:w(this,rn).length,offset:w(this,En)+s})),w(this,rn).slice(w(this,En),w(this,En)+s)};let Fw=K5;function An(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function bk(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function BR(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");An(t.outputLen),An(t.blockLen)}function Vf(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 LR(t,e){bk(t);const r=e.outputLen;if(t.lengtht instanceof Uint8Array,Kp=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Qp=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Ws=(t,e)=>t<<32-e|t>>>e,mte=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!mte)throw new Error("Non little-endian hardware is not supported");const xte=async()=>{};async function l3(t,e,r){let n=Date.now();for(let s=0;s=0&&in+s.length,0));let r=0;return t.forEach(n=>{if(!jR(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}let wk=class{clone(){return this._cloneInto()}};const Ete={}.toString;function FR(t,e){if(e!==void 0&&Ete.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Lv(t){const e=n=>t().update(zf(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function Cte(t=32){if(Cx&&typeof Cx.getRandomValues=="function")return Cx.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class UR extends wk{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,BR(e);const n=zf(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 s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?e.create().update(n).digest():n);for(let o=0;onew UR(t,e).update(r).digest();jv.create=(t,e)=>new UR(t,e);function kte(t,e,r,n){BR(t);const s=FR({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(An(i),An(o),An(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=zf(e),l=zf(r),u=new Uint8Array(o),f=jv.create(t,c),d=f._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:f,PRFSalt:d}}function Ste(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function Ek(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=kte(t,e,r,n);let l;const u=new Uint8Array(4),f=Qp(u),d=new Uint8Array(a.outputLen);for(let h=1,y=0;y>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class Ck extends wk{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Qp(this.buffer)}update(e){Vf(this);const{view:r,buffer:n,blockLen:s}=this;e=zf(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;ft&e^~t&r,Ite=(t,e,r)=>t&e^t&r^e&r,Pte=new Uint32Array([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]),Eo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Co=new Uint32Array(64);let Ote=class extends Ck{constructor(){super(64,32,8,!1),this.A=Eo[0]|0,this.B=Eo[1]|0,this.C=Eo[2]|0,this.D=Eo[3]|0,this.E=Eo[4]|0,this.F=Eo[5]|0,this.G=Eo[6]|0,this.H=Eo[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let f=0;f<16;f++,r+=4)Co[f]=e.getUint32(r,!1);for(let f=16;f<64;f++){const d=Co[f-15],h=Co[f-2],y=Ws(d,7)^Ws(d,18)^d>>>3,p=Ws(h,17)^Ws(h,19)^h>>>10;Co[f]=p+Co[f-7]+y+Co[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Ws(a,6)^Ws(a,11)^Ws(a,25),h=u+d+Tte(a,c,l)+Pte[f]+Co[f]|0,p=(Ws(n,2)^Ws(n,13)^Ws(n,22))+Ite(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+p|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){Co.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const wd=Lv(()=>new Ote),dp=BigInt(2**32-1),$w=BigInt(32);function $R(t,e=!1){return e?{h:Number(t&dp),l:Number(t>>$w&dp)}:{h:Number(t>>$w&dp)|0,l:Number(t&dp)|0}}function WR(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;sBigInt(t>>>0)<<$w|BigInt(e>>>0),Nte=(t,e,r)=>t>>>r,_te=(t,e,r)=>t<<32-r|e>>>r,Mte=(t,e,r)=>t>>>r|e<<32-r,Dte=(t,e,r)=>t<<32-r|e>>>r,Bte=(t,e,r)=>t<<64-r|e>>>r-32,Lte=(t,e,r)=>t>>>r-32|e<<64-r,jte=(t,e)=>e,Fte=(t,e)=>t,VR=(t,e,r)=>t<>>32-r,zR=(t,e,r)=>e<>>32-r,HR=(t,e,r)=>e<>>64-r,GR=(t,e,r)=>t<>>64-r;function Ute(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const $te=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Wte=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Vte=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),zte=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Hte=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Gte=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Be={fromBig:$R,split:WR,toBig:Rte,shrSH:Nte,shrSL:_te,rotrSH:Mte,rotrSL:Dte,rotrBH:Bte,rotrBL:Lte,rotr32H:jte,rotr32L:Fte,rotlSH:VR,rotlSL:zR,rotlBH:HR,rotlBL:GR,add:Ute,add3L:$te,add3H:Wte,add4L:Vte,add4H:zte,add5H:Gte,add5L:Hte},[qte,Kte]=Be.split(["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))),ko=new Uint32Array(80),So=new Uint32Array(80);class Qte extends Ck{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:f,Fl:d,Gh:h,Gl:y,Hh:p,Hl:b}=this;return[e,r,n,s,i,o,a,c,l,u,f,d,h,y,p,b]}set(e,r,n,s,i,o,a,c,l,u,f,d,h,y,p,b){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=f|0,this.Fl=d|0,this.Gh=h|0,this.Gl=y|0,this.Hh=p|0,this.Hl=b|0}process(e,r){for(let m=0;m<16;m++,r+=4)ko[m]=e.getUint32(r),So[m]=e.getUint32(r+=4);for(let m=16;m<80;m++){const k=ko[m-15]|0,A=So[m-15]|0,P=Be.rotrSH(k,A,1)^Be.rotrSH(k,A,8)^Be.shrSH(k,A,7),R=Be.rotrSL(k,A,1)^Be.rotrSL(k,A,8)^Be.shrSL(k,A,7),N=ko[m-2]|0,V=So[m-2]|0,F=Be.rotrSH(N,V,19)^Be.rotrBH(N,V,61)^Be.shrSH(N,V,6),X=Be.rotrSL(N,V,19)^Be.rotrBL(N,V,61)^Be.shrSL(N,V,6),re=Be.add4L(R,X,So[m-7],So[m-16]),le=Be.add4H(re,P,F,ko[m-7],ko[m-16]);ko[m]=le|0,So[m]=re|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:f,El:d,Fh:h,Fl:y,Gh:p,Gl:b,Hh:g,Hl:v}=this;for(let m=0;m<80;m++){const k=Be.rotrSH(f,d,14)^Be.rotrSH(f,d,18)^Be.rotrBH(f,d,41),A=Be.rotrSL(f,d,14)^Be.rotrSL(f,d,18)^Be.rotrBL(f,d,41),P=f&h^~f&p,R=d&y^~d&b,N=Be.add5L(v,A,R,Kte[m],So[m]),V=Be.add5H(N,g,k,P,qte[m],ko[m]),F=N|0,X=Be.rotrSH(n,s,28)^Be.rotrBH(n,s,34)^Be.rotrBH(n,s,39),re=Be.rotrSL(n,s,28)^Be.rotrBL(n,s,34)^Be.rotrBL(n,s,39),le=n&i^n&a^i&a,ee=s&o^s&c^o&c;g=p|0,v=b|0,p=h|0,b=y|0,h=f|0,y=d|0,{h:f,l:d}=Be.add(l|0,u|0,V|0,F|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const B=Be.add3L(F,re,ee);n=Be.add3H(B,V,X,le),s=B|0}({h:n,l:s}=Be.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=Be.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=Be.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Be.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:f,l:d}=Be.add(this.Eh|0,this.El|0,f|0,d|0),{h,l:y}=Be.add(this.Fh|0,this.Fl|0,h|0,y|0),{h:p,l:b}=Be.add(this.Gh|0,this.Gl|0,p|0,b|0),{h:g,l:v}=Be.add(this.Hh|0,this.Hl|0,g|0,v|0),this.set(n,s,i,o,a,c,l,u,f,d,h,y,p,b,g,v)}roundClean(){ko.fill(0),So.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const kk=Lv(()=>new Qte);function Jte(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const u3=Jte(),f3=u3.crypto||u3.msCrypto;function qR(t){switch(t){case"sha256":return wd.create();case"sha512":return kk.create()}I(!1,"invalid hashing algorithm name","algorithm",t)}function Yte(t,e){const r={sha256:wd,sha512:kk}[t];return I(r!=null,"invalid hmac algorithm","algorithm",t),jv.create(r,e)}function Xte(t,e,r,n,s){const i={sha256:wd,sha512:kk}[s];return I(i!=null,"invalid pbkdf2 algorithm","algorithm",s),Ek(i,t,e,{c:r,dkLen:n})}function Zte(t){H(f3!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),I(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return f3.getRandomValues(e),e}let KR=!1;const QR=function(t,e,r){return Yte(t,e).update(r).digest()};let JR=QR;function Wa(t,e,r){const n=Q(e,"key"),s=Q(r,"data");return z(JR(t,n,s))}Wa._=QR;Wa.lock=function(){KR=!0};Wa.register=function(t){if(KR)throw new Error("computeHmac is locked");JR=t};Object.freeze(Wa);const[YR,XR,ZR]=[[],[],[]],ere=BigInt(0),Vd=BigInt(1),tre=BigInt(2),rre=BigInt(7),nre=BigInt(256),sre=BigInt(113);for(let t=0,e=Vd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],YR.push(2*(5*n+r)),XR.push((t+1)*(t+2)/2%64);let s=ere;for(let i=0;i<7;i++)e=(e<>rre)*sre)%nre,e&tre&&(s^=Vd<<(Vd<r>32?HR(t,e,r):VR(t,e,r),h3=(t,e,r)=>r>32?GR(t,e,r):zR(t,e,r);function are(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=d3(l,u,1)^r[a],d=h3(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=XR[o],c=d3(s,i,a),l=h3(s,i,a),u=YR[o];s=t[u],i=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=ire[n],t[1]^=ore[n]}r.fill(0)}class Sk extends wk{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,An(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Kp(this.state)}keccak(){are(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Vf(this);const{blockLen:r,state:n}=this;e=zf(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return An(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(LR(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new Sk(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const cre=(t,e,r)=>Lv(()=>new Sk(e,t,r)),lre=cre(1,136,256/8);let eN=!1;const tN=function(t){return lre(t)};let rN=tN;function Me(t){const e=Q(t,"data");return z(rN(e))}Me._=tN;Me.lock=function(){eN=!0};Me.register=function(t){if(eN)throw new TypeError("keccak256 is locked");rN=t};Object.freeze(Me);const ure=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),nN=Uint8Array.from({length:16},(t,e)=>e),fre=nN.map(t=>(9*t+5)%16);let Ak=[nN],Tk=[fre];for(let t=0;t<4;t++)for(let e of[Ak,Tk])e.push(e[t].map(r=>ure[r]));const sN=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),dre=Ak.map((t,e)=>t.map(r=>sN[e][r])),hre=Tk.map((t,e)=>t.map(r=>sN[e][r])),pre=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),yre=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),hp=(t,e)=>t<>>32-e;function p3(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const pp=new Uint32Array(16);class gre extends Ck{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:s,h4:i}=this;return[e,r,n,s,i]}set(e,r,n,s,i){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=s|0,this.h4=i|0}process(e,r){for(let h=0;h<16;h++,r+=4)pp[h]=e.getUint32(r,!0);let n=this.h0|0,s=n,i=this.h1|0,o=i,a=this.h2|0,c=a,l=this.h3|0,u=l,f=this.h4|0,d=f;for(let h=0;h<5;h++){const y=4-h,p=pre[h],b=yre[h],g=Ak[h],v=Tk[h],m=dre[h],k=hre[h];for(let A=0;A<16;A++){const P=hp(n+p3(h,i,a,l)+pp[g[A]]+p,m[A])+f|0;n=f,f=l,l=hp(a,10)|0,a=i,i=P}for(let A=0;A<16;A++){const P=hp(s+p3(y,o,c,u)+pp[v[A]]+b,k[A])+d|0;s=d,d=u,u=hp(c,10)|0,c=o,o=P}}this.set(this.h1+a+u|0,this.h2+l+d|0,this.h3+f+s|0,this.h4+n+o|0,this.h0+i+c|0)}roundClean(){pp.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const vre=Lv(()=>new gre);let iN=!1;const oN=function(t){return vre(t)};let aN=oN;function Va(t){const e=Q(t,"data");return z(aN(e))}Va._=oN;Va.lock=function(){iN=!0};Va.register=function(t){if(iN)throw new TypeError("ripemd160 is locked");aN=t};Object.freeze(Va);let cN=!1;const lN=function(t,e,r,n,s){return Xte(t,e,r,n,s)};let uN=lN;function wi(t,e,r,n,s){const i=Q(t,"password"),o=Q(e,"salt");return z(uN(i,o,r,n,s))}wi._=lN;wi.lock=function(){cN=!0};wi.register=function(t){if(cN)throw new Error("pbkdf2 is locked");uN=t};Object.freeze(wi);let fN=!1;const dN=function(t){return new Uint8Array(Zte(t))};let hN=dN;function Nr(t){return hN(t)}Nr._=dN;Nr.lock=function(){fN=!0};Nr.register=function(t){if(fN)throw new Error("randomBytes is locked");hN=t};Object.freeze(Nr);const Ke=(t,e)=>t<>>32-e;function y3(t,e,r,n,s,i){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],f=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],y=t[e++]^r[n++],p=t[e++]^r[n++],b=t[e++]^r[n++],g=t[e++]^r[n++],v=t[e++]^r[n++],m=t[e++]^r[n++],k=t[e++]^r[n++],A=t[e++]^r[n++],P=o,R=a,N=c,V=l,F=u,X=f,re=d,le=h,ee=y,B=p,G=b,Z=g,E=v,S=m,O=k,D=A;for(let L=0;L<8;L+=2)F^=Ke(P+E|0,7),ee^=Ke(F+P|0,9),E^=Ke(ee+F|0,13),P^=Ke(E+ee|0,18),B^=Ke(X+R|0,7),S^=Ke(B+X|0,9),R^=Ke(S+B|0,13),X^=Ke(R+S|0,18),O^=Ke(G+re|0,7),N^=Ke(O+G|0,9),re^=Ke(N+O|0,13),G^=Ke(re+N|0,18),V^=Ke(D+Z|0,7),le^=Ke(V+D|0,9),Z^=Ke(le+V|0,13),D^=Ke(Z+le|0,18),R^=Ke(P+V|0,7),N^=Ke(R+P|0,9),V^=Ke(N+R|0,13),P^=Ke(V+N|0,18),re^=Ke(X+F|0,7),le^=Ke(re+X|0,9),F^=Ke(le+re|0,13),X^=Ke(F+le|0,18),Z^=Ke(G+B|0,7),ee^=Ke(Z+G|0,9),B^=Ke(ee+Z|0,13),G^=Ke(B+ee|0,18),E^=Ke(D+O|0,7),S^=Ke(E+D|0,9),O^=Ke(S+E|0,13),D^=Ke(O+S|0,18);s[i++]=o+P|0,s[i++]=a+R|0,s[i++]=c+N|0,s[i++]=l+V|0,s[i++]=u+F|0,s[i++]=f+X|0,s[i++]=d+re|0,s[i++]=h+le|0,s[i++]=y+ee|0,s[i++]=p+B|0,s[i++]=b+G|0,s[i++]=g+Z|0,s[i++]=v+E|0,s[i++]=m+S|0,s[i++]=k+O|0,s[i++]=A+D|0}function Ru(t,e,r,n,s){let i=n+0,o=n+16*s;for(let a=0;a<16;a++)r[o+a]=t[e+(2*s-1)*16+a];for(let a=0;a0&&(o+=16),y3(r,i,t,e+=16,r,o)}function pN(t,e,r){const n=FR({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:s,r:i,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(An(s),An(i),An(o),An(a),An(c),An(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const f=128*i,d=f/4;if(s<=1||s&s-1||s>=2**(f/8)||s>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/f)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const h=f*(s+o);if(h>l)throw new Error(`Scrypt: parameters too large, ${h} (128 * r * (N + p)) > ${l} (maxmem)`);const y=Ek(wd,t,e,{c:1,dkLen:f*o}),p=Kp(y),b=Kp(new Uint8Array(f*s)),g=Kp(new Uint8Array(f));let v=()=>{};if(u){const m=2*s*o,k=Math.max(Math.floor(m/1e4),1);let A=0;v=()=>{A++,u&&(!(A%k)||A===m)&&u(A/m)}}return{N:s,r:i,p:o,dkLen:a,blockSize32:d,V:b,B32:p,B:y,tmp:g,blockMixCb:v,asyncTick:c}}function yN(t,e,r,n,s){const i=Ek(wd,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function mre(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:f,blockMixCb:d}=pN(t,e,r);for(let h=0;h{Ru(c,b,c,b+=a,s),d()}),Ru(c,(n-1)*a,l,p,s),d(),await l3(n,h,()=>{const g=l[p+a-16]%n;for(let v=0;vt instanceof Uint8Array,wre=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function Hf(t){if(!Uv(t))throw new Error("Uint8Array expected");let e="";for(let r=0;rn+s.length,0));let r=0;return t.forEach(n=>{if(!Uv(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function Cre(t,e){if(t.length!==e.length)return!1;for(let r=0;rIN;t>>=Fv,e+=1);return e}function Are(t,e){return t>>BigInt(e)&Fv}const Tre=(t,e,r)=>t|(r?Fv:IN)<(bre<new Uint8Array(t),g3=t=>Uint8Array.from(t);function ON(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=kx(t),s=kx(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...f)=>r(s,n,...f),c=(f=kx())=>{s=a(g3([0]),f),n=a(),f.length!==0&&(s=a(g3([1]),f),n=a())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{o(),c(f);let h;for(;!(h=d(l()));)c();return o(),h}}const Ire={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function w1(t,e,r={}){const n=(s,i,o)=>{const a=Ire[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=t[s];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(e))n(s,i,!1);for(const[s,i]of Object.entries(r))n(s,i,!0);return t}const Pre=Object.freeze(Object.defineProperty({__proto__:null,bitGet:Are,bitLen:Sre,bitMask:Rk,bitSet:Tre,bytesToHex:Hf,bytesToNumberBE:Xc,bytesToNumberLE:Pk,concatBytes:m0,createHmacDrbg:ON,ensureBytes:ys,equalBytes:Cre,hexToBytes:Gf,hexToNumber:Ik,numberToBytesBE:qf,numberToBytesLE:Ok,numberToHexUnpadded:PN,numberToVarBytesBE:Ere,utf8ToBytes:kre,validateObject:w1},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const nr=BigInt(0),Mt=BigInt(1),ac=BigInt(2),Ore=BigInt(3),Ww=BigInt(4),v3=BigInt(5),m3=BigInt(8);BigInt(9);BigInt(16);function on(t,e){const r=t%e;return r>=nr?r:e+r}function Rre(t,e,r){if(r<=nr||e 0");if(r===Mt)return nr;let n=Mt;for(;e>nr;)e&Mt&&(n=n*t%r),t=t*t%r,e>>=Mt;return n}function Bn(t,e,r){let n=t;for(;e-- >nr;)n*=n,n%=r;return n}function Vw(t,e){if(t===nr||e<=nr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=on(t,e),n=e,s=nr,i=Mt;for(;r!==nr;){const a=n/r,c=n%r,l=s-i*a;n=r,r=c,s=i,i=l}if(n!==Mt)throw new Error("invert: does not exist");return on(s,e)}function Nre(t){const e=(t-Mt)/ac;let r,n,s;for(r=t-Mt,n=0;r%ac===nr;r/=ac,n++);for(s=ac;s(n[s]="function",n),e);return w1(t,r)}function Bre(t,e,r){if(r 0");if(r===nr)return t.ONE;if(r===Mt)return e;let n=t.ONE,s=e;for(;r>nr;)r&Mt&&(n=t.mul(n,s)),s=t.sqr(s),r>>=Mt;return n}function Lre(t,e){const r=new Array(e.length),n=e.reduce((i,o,a)=>t.is0(o)?i:(r[a]=i,t.mul(i,o)),t.ONE),s=t.inv(n);return e.reduceRight((i,o,a)=>t.is0(o)?i:(r[a]=t.mul(i,r[a]),t.mul(i,o)),s),r}function RN(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function jre(t,e,r=!1,n={}){if(t<=nr)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=RN(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=_re(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:Rk(s),ZERO:nr,ONE:Mt,create:c=>on(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return nr<=c&&cc===nr,isOdd:c=>(c&Mt)===Mt,neg:c=>on(-c,t),eql:(c,l)=>c===l,sqr:c=>on(c*c,t),add:(c,l)=>on(c+l,t),sub:(c,l)=>on(c-l,t),mul:(c,l)=>on(c*l,t),pow:(c,l)=>Bre(a,c,l),div:(c,l)=>on(c*Vw(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Vw(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Lre(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?Ok(c,i):qf(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?Pk(c):Xc(c)}});return Object.freeze(a)}function NN(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function _N(t){const e=NN(t);return e+Math.ceil(e/2)}function Fre(t,e,r=!1){const n=t.length,s=NN(e),i=_N(e);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?Xc(t):Pk(t),a=on(o,e-Mt)+Mt;return r?Ok(a,s):qf(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ure=BigInt(0),Sx=BigInt(1);function $re(t,e){const r=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(e/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:r,unsafeLadder(s,i){let o=t.ZERO,a=s;for(;i>Ure;)i&Sx&&(o=o.add(a)),a=a.double(),i>>=Sx;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let l=s,u=l;for(let f=0;f>=h,b>c&&(b-=d,o+=Sx);const g=p,v=p+Math.abs(b)-1,m=y%2!==0,k=b<0;b===0?u=u.add(r(m,i[g])):l=l.add(r(k,i[v]))}return{p:l,f:u}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let l=i.get(s);return l||(l=this.precomputeWindow(s,c),c!==1&&i.set(s,a(l))),this.wNAF(c,l,o)}}}function MN(t){return Dre(t.Fp),w1(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...RN(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Wre(t){const e=MN(t);w1(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:Vre,hexToBytes:zre}=Pre,vc={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(t){const{Err:e}=vc;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Vre(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=vc,r=typeof t=="string"?zre(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:s,l:i}=vc._parseInt(r.subarray(2)),{d:o,l:a}=vc._parseInt(i);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),s=e(r(t.r)),i=n.length/2,o=s.length/2,a=r(i),c=r(o);return`30${r(o+i+4)}02${c}${s}02${a}${n}`}},zi=BigInt(0),Qn=BigInt(1);BigInt(2);const x3=BigInt(3);BigInt(4);function Hre(t){const e=Wre(t),{Fp:r}=e,n=e.toBytes||((y,p,b)=>{const g=p.toAffine();return m0(Uint8Array.from([4]),r.toBytes(g.x),r.toBytes(g.y))}),s=e.fromBytes||(y=>{const p=y.subarray(1),b=r.fromBytes(p.subarray(0,r.BYTES)),g=r.fromBytes(p.subarray(r.BYTES,2*r.BYTES));return{x:b,y:g}});function i(y){const{a:p,b}=e,g=r.sqr(y),v=r.mul(g,y);return r.add(r.add(v,r.mul(y,p)),b)}if(!r.eql(r.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function o(y){return typeof y=="bigint"&&zir.eql(m,r.ZERO);return v(b)&&v(g)?f.ZERO:new f(b,g,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const b=r.invertBatch(p.map(g=>g.pz));return p.map((g,v)=>g.toAffine(b[v])).map(f.fromAffine)}static fromHex(p){const b=f.fromAffine(s(ys("pointHex",p)));return b.assertValidity(),b}static fromPrivateKey(p){return f.BASE.multiply(c(p))}_setWindowSize(p){this._WINDOW_SIZE=p,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y:b}=this.toAffine();if(!r.isValid(p)||!r.isValid(b))throw new Error("bad point: x or y not FE");const g=r.sqr(b),v=i(p);if(!r.eql(g,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(r.isOdd)return!r.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:b,py:g,pz:v}=this,{px:m,py:k,pz:A}=p,P=r.eql(r.mul(b,A),r.mul(m,v)),R=r.eql(r.mul(g,A),r.mul(k,v));return P&&R}negate(){return new f(this.px,r.neg(this.py),this.pz)}double(){const{a:p,b}=e,g=r.mul(b,x3),{px:v,py:m,pz:k}=this;let A=r.ZERO,P=r.ZERO,R=r.ZERO,N=r.mul(v,v),V=r.mul(m,m),F=r.mul(k,k),X=r.mul(v,m);return X=r.add(X,X),R=r.mul(v,k),R=r.add(R,R),A=r.mul(p,R),P=r.mul(g,F),P=r.add(A,P),A=r.sub(V,P),P=r.add(V,P),P=r.mul(A,P),A=r.mul(X,A),R=r.mul(g,R),F=r.mul(p,F),X=r.sub(N,F),X=r.mul(p,X),X=r.add(X,R),R=r.add(N,N),N=r.add(R,N),N=r.add(N,F),N=r.mul(N,X),P=r.add(P,N),F=r.mul(m,k),F=r.add(F,F),N=r.mul(F,X),A=r.sub(A,N),R=r.mul(F,V),R=r.add(R,R),R=r.add(R,R),new f(A,P,R)}add(p){u(p);const{px:b,py:g,pz:v}=this,{px:m,py:k,pz:A}=p;let P=r.ZERO,R=r.ZERO,N=r.ZERO;const V=e.a,F=r.mul(e.b,x3);let X=r.mul(b,m),re=r.mul(g,k),le=r.mul(v,A),ee=r.add(b,g),B=r.add(m,k);ee=r.mul(ee,B),B=r.add(X,re),ee=r.sub(ee,B),B=r.add(b,v);let G=r.add(m,A);return B=r.mul(B,G),G=r.add(X,le),B=r.sub(B,G),G=r.add(g,v),P=r.add(k,A),G=r.mul(G,P),P=r.add(re,le),G=r.sub(G,P),N=r.mul(V,B),P=r.mul(F,le),N=r.add(P,N),P=r.sub(re,N),N=r.add(re,N),R=r.mul(P,N),re=r.add(X,X),re=r.add(re,X),le=r.mul(V,le),B=r.mul(F,B),re=r.add(re,le),le=r.sub(X,le),le=r.mul(V,le),B=r.add(B,le),X=r.mul(re,B),R=r.add(R,X),X=r.mul(G,B),P=r.mul(ee,P),P=r.sub(P,X),X=r.mul(ee,re),N=r.mul(G,N),N=r.add(N,X),new f(P,R,N)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return h.wNAFCached(this,l,p,b=>{const g=r.invertBatch(b.map(v=>v.pz));return b.map((v,m)=>v.toAffine(g[m])).map(f.fromAffine)})}multiplyUnsafe(p){const b=f.ZERO;if(p===zi)return b;if(a(p),p===Qn)return this;const{endo:g}=e;if(!g)return h.unsafeLadder(this,p);let{k1neg:v,k1:m,k2neg:k,k2:A}=g.splitScalar(p),P=b,R=b,N=this;for(;m>zi||A>zi;)m&Qn&&(P=P.add(N)),A&Qn&&(R=R.add(N)),N=N.double(),m>>=Qn,A>>=Qn;return v&&(P=P.negate()),k&&(R=R.negate()),R=new f(r.mul(R.px,g.beta),R.py,R.pz),P.add(R)}multiply(p){a(p);let b=p,g,v;const{endo:m}=e;if(m){const{k1neg:k,k1:A,k2neg:P,k2:R}=m.splitScalar(b);let{p:N,f:V}=this.wNAF(A),{p:F,f:X}=this.wNAF(R);N=h.constTimeNegate(k,N),F=h.constTimeNegate(P,F),F=new f(r.mul(F.px,m.beta),F.py,F.pz),g=N.add(F),v=V.add(X)}else{const{p:k,f:A}=this.wNAF(b);g=k,v=A}return f.normalizeZ([g,v])[0]}multiplyAndAddUnsafe(p,b,g){const v=f.BASE,m=(A,P)=>P===zi||P===Qn||!A.equals(v)?A.multiplyUnsafe(P):A.multiply(P),k=m(this,b).add(m(p,g));return k.is0()?void 0:k}toAffine(p){const{px:b,py:g,pz:v}=this,m=this.is0();p==null&&(p=m?r.ONE:r.inv(v));const k=r.mul(b,p),A=r.mul(g,p),P=r.mul(v,p);if(m)return{x:r.ZERO,y:r.ZERO};if(!r.eql(P,r.ONE))throw new Error("invZ was invalid");return{x:k,y:A}}isTorsionFree(){const{h:p,isTorsionFree:b}=e;if(p===Qn)return!0;if(b)return b(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:b}=e;return p===Qn?this:b?b(f,this):this.multiplyUnsafe(e.h)}toRawBytes(p=!0){return this.assertValidity(),n(f,this,p)}toHex(p=!0){return Hf(this.toRawBytes(p))}}f.BASE=new f(e.Gx,e.Gy,r.ONE),f.ZERO=new f(r.ZERO,r.ONE,r.ZERO);const d=e.nBitLength,h=$re(f,e.endo?Math.ceil(d/2):d);return{CURVE:e,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function Gre(t){const e=MN(t);return w1(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function qre(t){const e=Gre(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(B){return ziHf(qf(B,e.nByteLength));function y(B){const G=n>>Qn;return B>G}function p(B){return y(B)?a(-B):B}const b=(B,G,Z)=>Xc(B.slice(G,Z));class g{constructor(G,Z,E){this.r=G,this.s=Z,this.recovery=E,this.assertValidity()}static fromCompact(G){const Z=e.nByteLength;return G=ys("compactSignature",G,Z*2),new g(b(G,0,Z),b(G,Z,2*Z))}static fromDER(G){const{r:Z,s:E}=vc.toSig(ys("DER",G));return new g(Z,E)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(G){return new g(this.r,this.s,G)}recoverPublicKey(G){const{r:Z,s:E,recovery:S}=this,O=R(ys("msgHash",G));if(S==null||![0,1,2,3].includes(S))throw new Error("recovery id invalid");const D=S===2||S===3?Z+e.n:Z;if(D>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const L=S&1?"03":"02",W=l.fromHex(L+h(D)),q=c(D),te=a(-O*q),J=a(E*q),$=l.BASE.multiplyAndAddUnsafe(W,te,J);if(!$)throw new Error("point at infinify");return $.assertValidity(),$}hasHighS(){return y(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Gf(this.toDERHex())}toDERHex(){return vc.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Gf(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const v={isValidPrivateKey(B){try{return u(B),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const B=_N(e.n);return Fre(e.randomBytes(B),e.n)},precompute(B=8,G=l.BASE){return G._setWindowSize(B),G.multiply(BigInt(3)),G}};function m(B,G=!0){return l.fromPrivateKey(B).toRawBytes(G)}function k(B){const G=B instanceof Uint8Array,Z=typeof B=="string",E=(G||Z)&&B.length;return G?E===s||E===i:Z?E===2*s||E===2*i:B instanceof l}function A(B,G,Z=!0){if(k(B))throw new Error("first arg must be private key");if(!k(G))throw new Error("second arg must be public key");return l.fromHex(G).multiply(u(B)).toRawBytes(Z)}const P=e.bits2int||function(B){const G=Xc(B),Z=B.length*8-e.nBitLength;return Z>0?G>>BigInt(Z):G},R=e.bits2int_modN||function(B){return a(P(B))},N=Rk(e.nBitLength);function V(B){if(typeof B!="bigint")throw new Error("bigint expected");if(!(zi<=B&&Bue in Z))throw new Error("sign() legacy options not supported");const{hash:E,randomBytes:S}=e;let{lowS:O,prehash:D,extraEntropy:L}=Z;O==null&&(O=!0),B=ys("msgHash",B),D&&(B=ys("prehashed msgHash",E(B)));const W=R(B),q=u(G),te=[V(q),V(W)];if(L!=null){const ue=L===!0?S(r.BYTES):L;te.push(ys("extraEntropy",ue))}const J=m0(...te),$=W;function K(ue){const he=P(ue);if(!d(he))return;const oe=c(he),ke=l.BASE.multiply(he).toAffine(),_e=a(ke.x);if(_e===zi)return;const xt=a(oe*a($+_e*q));if(xt===zi)return;let tn=(ke.x===_e?0:2)|Number(ke.y&Qn),wr=xt;return O&&y(xt)&&(wr=p(xt),tn^=1),new g(_e,wr,tn)}return{seed:J,k2sig:K}}const X={lowS:e.lowS,prehash:!1},re={lowS:e.lowS,prehash:!1};function le(B,G,Z=X){const{seed:E,k2sig:S}=F(B,G,Z),O=e;return ON(O.hash.outputLen,O.nByteLength,O.hmac)(E,S)}l.BASE._setWindowSize(8);function ee(B,G,Z,E=re){var ke;const S=B;if(G=ys("msgHash",G),Z=ys("publicKey",Z),"strict"in E)throw new Error("options.strict was renamed to lowS");const{lowS:O,prehash:D}=E;let L,W;try{if(typeof S=="string"||S instanceof Uint8Array)try{L=g.fromDER(S)}catch(_e){if(!(_e instanceof vc.Err))throw _e;L=g.fromCompact(S)}else if(typeof S=="object"&&typeof S.r=="bigint"&&typeof S.s=="bigint"){const{r:_e,s:xt}=S;L=new g(_e,xt)}else throw new Error("PARSE");W=l.fromHex(Z)}catch(_e){if(_e.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(O&&L.hasHighS())return!1;D&&(G=e.hash(G));const{r:q,s:te}=L,J=R(G),$=c(te),K=a(J*$),ue=a(q*$),he=(ke=l.BASE.multiplyAndAddUnsafe(W,K,ue))==null?void 0:ke.toAffine();return he?a(he.x)===q:!1}return{CURVE:e,getPublicKey:m,getSharedSecret:A,sign:le,verify:ee,ProjectivePoint:l,Signature:g,utils:v}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Kre(t){return{hash:t,hmac:(e,...r)=>jv(t,e,wte(...r)),randomBytes:Cte}}function Qre(t,e){const r=n=>qre({...t,...Kre(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const DN=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),b3=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Jre=BigInt(1),zw=BigInt(2),w3=(t,e)=>(t+e/zw)/e;function Yre(t){const e=DN,r=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,f=Bn(u,r,e)*u%e,d=Bn(f,r,e)*u%e,h=Bn(d,zw,e)*l%e,y=Bn(h,s,e)*h%e,p=Bn(y,i,e)*y%e,b=Bn(p,a,e)*p%e,g=Bn(b,c,e)*b%e,v=Bn(g,a,e)*p%e,m=Bn(v,r,e)*u%e,k=Bn(m,o,e)*y%e,A=Bn(k,n,e)*l%e,P=Bn(A,zw,e);if(!Hw.eql(Hw.sqr(P),t))throw new Error("Cannot find square root");return P}const Hw=jre(DN,void 0,void 0,{sqrt:Yre}),Ro=Qre({a:BigInt(0),b:BigInt(7),Fp:Hw,n:b3,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=b3,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Jre*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=w3(i*t,e),c=w3(-n*t,e);let l=on(t-a*r-c*s,e),u=on(-a*n-c*i,e);const f=l>o,d=u>o;if(f&&(l=e-l),d&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},wd);BigInt(0);Ro.ProjectivePoint;const xi="0x0000000000000000000000000000000000000000",yl="0x0000000000000000000000000000000000000000000000000000000000000000",Xre=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Zre=BigInt("1000000000000000000"),BN=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ene=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),tne=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),rne="Īž",LN=`Ethereum Signed Message: -`,E3=BigInt(0),C3=BigInt(1),k3=BigInt(2),S3=BigInt(27),A3=BigInt(28),yp=BigInt(35),Bl={};function T3(t){return ss(rr(t),32)}var qu,Ku,Qu,Rc;const ds=class ds{constructor(e,r,n,s){j(this,qu);j(this,Ku);j(this,Qu);j(this,Rc);yo(e,Bl,"Signature"),T(this,qu,r),T(this,Ku,n),T(this,Qu,s),T(this,Rc,null)}get r(){return w(this,qu)}set r(e){I(ba(e)===32,"invalid r","value",e),T(this,qu,z(e))}get s(){return w(this,Ku)}set s(e){I(ba(e)===32,"invalid s","value",e);const r=z(e);I(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),T(this,Ku,r)}get v(){return w(this,Qu)}set v(e){const r=Pe(e,"value");I(r===27||r===28,"invalid v","v",e),T(this,Qu,r)}get networkV(){return w(this,Rc)}get legacyChainId(){const e=this.networkV;return e==null?null:ds.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=Q(this.s);return this.yParity&&(e[0]|=128),z(e)}get compactSerialized(){return Fe([this.r,this.yParityAndS])}get serialized(){return Fe([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new ds(Bl,this.r,this.s,this.v);return this.networkV&&T(e,Rc,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=xe(e,"v");return r==S3||r==A3?E3:(I(r>=yp,"invalid EIP-155 v","v",e),(r-yp)/k3)}static getChainIdV(e,r){return xe(e)*k3+BigInt(35+r-27)}static getNormalizedV(e){const r=xe(e);return r===E3||r===S3?27:r===C3||r===A3?28:(I(r>=yp,"invalid v","v",e),r&C3?27:28)}static from(e){function r(l,u){I(l,u,"signature",e)}if(e==null)return new ds(Bl,yl,yl,27);if(typeof e=="string"){const l=Q(e,"signature");if(l.length===64){const u=z(l.slice(0,32)),f=l.slice(32,64),d=f[0]&128?28:27;return f[0]&=127,new ds(Bl,u,z(f),d)}if(l.length===65){const u=z(l.slice(0,32)),f=l.slice(32,64);r((f[0]&128)===0,"non-canonical s");const d=ds.getNormalizedV(l[64]);return new ds(Bl,u,z(f),d)}r(!1,"invalid raw signature length")}if(e instanceof ds)return e.clone();const n=e.r;r(n!=null,"missing r");const s=T3(n),i=function(l,u){if(l!=null)return T3(l);if(u!=null){r(qe(u,32),"invalid yParityAndS");const f=Q(u);return f[0]&=127,z(f)}r(!1,"missing s")}(e.s,e.yParityAndS);r((Q(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,f){if(l!=null){const d=xe(l);return{networkV:d>=yp?d:void 0,v:ds.getNormalizedV(d)}}if(u!=null)return r(qe(u,32),"invalid yParityAndS"),{v:Q(u)[0]&128?28:27};if(f!=null){switch(Pe(f,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new ds(Bl,s,i,a);return o&&T(c,Rc,o),r(e.yParity==null||Pe(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};qu=new WeakMap,Ku=new WeakMap,Qu=new WeakMap,Rc=new WeakMap;let cs=ds;var Mi;const fc=class fc{constructor(e){j(this,Mi);I(ba(e)===32,"invalid private key","privateKey","[REDACTED]"),T(this,Mi,z(e))}get privateKey(){return w(this,Mi)}get publicKey(){return fc.computePublicKey(w(this,Mi))}get compressedPublicKey(){return fc.computePublicKey(w(this,Mi),!0)}sign(e){I(ba(e)===32,"invalid digest length","digest",e);const r=Ro.sign(tr(e),tr(w(this,Mi)),{lowS:!0});return cs.from({r:On(r.r,32),s:On(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=fc.computePublicKey(e);return z(Ro.getSharedSecret(tr(w(this,Mi)),Q(r),!1))}static computePublicKey(e,r){let n=Q(e,"key");if(n.length===32){const i=Ro.getPublicKey(n,!!r);return z(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=Ro.ProjectivePoint.fromHex(n);return z(s.toRawBytes(r))}static recoverPublicKey(e,r){I(ba(e)===32,"invalid digest length","digest",e);const n=cs.from(r);let s=Ro.Signature.fromCompact(tr(Fe([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(tr(e));return I(i!=null,"invalid signautre for digest","signature",r),"0x"+i.toHex(!1)}static addPoints(e,r,n){const s=Ro.ProjectivePoint.fromHex(fc.computePublicKey(e).substring(2)),i=Ro.ProjectivePoint.fromHex(fc.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};Mi=new WeakMap;let Rs=fc;function nne(){Wa.lock(),Me.lock(),wi.lock(),Nr.lock(),Va.lock(),za.lock(),Ha.lock(),Qr.lock(),b1.lock(),Nr.lock()}const sne=BigInt(0),ine=BigInt(36);function I3(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=Q(Me(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const Nk={};for(let t=0;t<10;t++)Nk[String(t)]=String(t);for(let t=0;t<26;t++)Nk[String.fromCharCode(65+t)]=String(10+t);const P3=15;function jN(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Nk[n]).join("");for(;e.length>=P3;){let n=e.substring(0,P3);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const one=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function ane(t){t=t.toLowerCase();let e=sne;for(let r=0;re.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return w(this,Nc)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return w(this,Nc)===!0?-1:w(this,Nc)===!1?this.value.length:null}static from(e,r){return new Ii(Ti,e,r)}static uint8(e){return pe(e,8)}static uint16(e){return pe(e,16)}static uint24(e){return pe(e,24)}static uint32(e){return pe(e,32)}static uint40(e){return pe(e,40)}static uint48(e){return pe(e,48)}static uint56(e){return pe(e,56)}static uint64(e){return pe(e,64)}static uint72(e){return pe(e,72)}static uint80(e){return pe(e,80)}static uint88(e){return pe(e,88)}static uint96(e){return pe(e,96)}static uint104(e){return pe(e,104)}static uint112(e){return pe(e,112)}static uint120(e){return pe(e,120)}static uint128(e){return pe(e,128)}static uint136(e){return pe(e,136)}static uint144(e){return pe(e,144)}static uint152(e){return pe(e,152)}static uint160(e){return pe(e,160)}static uint168(e){return pe(e,168)}static uint176(e){return pe(e,176)}static uint184(e){return pe(e,184)}static uint192(e){return pe(e,192)}static uint200(e){return pe(e,200)}static uint208(e){return pe(e,208)}static uint216(e){return pe(e,216)}static uint224(e){return pe(e,224)}static uint232(e){return pe(e,232)}static uint240(e){return pe(e,240)}static uint248(e){return pe(e,248)}static uint256(e){return pe(e,256)}static uint(e){return pe(e,256)}static int8(e){return pe(e,-8)}static int16(e){return pe(e,-16)}static int24(e){return pe(e,-24)}static int32(e){return pe(e,-32)}static int40(e){return pe(e,-40)}static int48(e){return pe(e,-48)}static int56(e){return pe(e,-56)}static int64(e){return pe(e,-64)}static int72(e){return pe(e,-72)}static int80(e){return pe(e,-80)}static int88(e){return pe(e,-88)}static int96(e){return pe(e,-96)}static int104(e){return pe(e,-104)}static int112(e){return pe(e,-112)}static int120(e){return pe(e,-120)}static int128(e){return pe(e,-128)}static int136(e){return pe(e,-136)}static int144(e){return pe(e,-144)}static int152(e){return pe(e,-152)}static int160(e){return pe(e,-160)}static int168(e){return pe(e,-168)}static int176(e){return pe(e,-176)}static int184(e){return pe(e,-184)}static int192(e){return pe(e,-192)}static int200(e){return pe(e,-200)}static int208(e){return pe(e,-208)}static int216(e){return pe(e,-216)}static int224(e){return pe(e,-224)}static int232(e){return pe(e,-232)}static int240(e){return pe(e,-240)}static int248(e){return pe(e,-248)}static int256(e){return pe(e,-256)}static int(e){return pe(e,-256)}static bytes1(e){return Qe(e,1)}static bytes2(e){return Qe(e,2)}static bytes3(e){return Qe(e,3)}static bytes4(e){return Qe(e,4)}static bytes5(e){return Qe(e,5)}static bytes6(e){return Qe(e,6)}static bytes7(e){return Qe(e,7)}static bytes8(e){return Qe(e,8)}static bytes9(e){return Qe(e,9)}static bytes10(e){return Qe(e,10)}static bytes11(e){return Qe(e,11)}static bytes12(e){return Qe(e,12)}static bytes13(e){return Qe(e,13)}static bytes14(e){return Qe(e,14)}static bytes15(e){return Qe(e,15)}static bytes16(e){return Qe(e,16)}static bytes17(e){return Qe(e,17)}static bytes18(e){return Qe(e,18)}static bytes19(e){return Qe(e,19)}static bytes20(e){return Qe(e,20)}static bytes21(e){return Qe(e,21)}static bytes22(e){return Qe(e,22)}static bytes23(e){return Qe(e,23)}static bytes24(e){return Qe(e,24)}static bytes25(e){return Qe(e,25)}static bytes26(e){return Qe(e,26)}static bytes27(e){return Qe(e,27)}static bytes28(e){return Qe(e,28)}static bytes29(e){return Qe(e,29)}static bytes30(e){return Qe(e,30)}static bytes31(e){return Qe(e,31)}static bytes32(e){return Qe(e,32)}static address(e){return new Ii(Ti,"address",e)}static bool(e){return new Ii(Ti,"bool",!!e)}static bytes(e){return new Ii(Ti,"bytes",e)}static string(e){return new Ii(Ti,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Ii(Ti,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===O3}static dereference(e,r){if(Ii.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};Nc=new WeakMap;let mr=Ii;class une extends go{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=mr.dereference(r,"string");try{n=Ae(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Ae(On(e.readValue(),20))}}class fne extends go{constructor(r){super(r.name,r.type,"_",r.dynamic);_(this,"coder");this.coder=r}defaultValue(){return this.coder.defaultValue()}encode(r,n){return this.coder.encode(r,n)}decode(r){return this.coder.decode(r)}}function FN(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return H(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),H(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else I(!1,"invalid tuple value","tuple",r);I(e.length===n.length,"types/value length mismatch","tuple",r);let s=new jw,i=new jw,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=i.length;c.encode(i,u);let d=s.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(s,u)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function UN(t,e){let r=[],n=[],s=t.subReader(0);return e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readIndex(),c=s.subReader(a);try{o=i.decode(c)}catch(l){if(Ft(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(Ft(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}if(o==null)throw new Error("investigate");r.push(o),n.push(i.localName||null)}),pl.fromItems(r,n)}class dne extends go{constructor(r,n,s){const i=r.type+"["+(n>=0?n:"")+"]",o=n===-1||r.dynamic;super("array",i,s,o);_(this,"coder");_(this,"length");fe(this,{coder:r,length:n})}defaultValue(){const r=this.coder.defaultValue(),n=[];for(let s=0;so||s<-(o+xne))&&this._throwError("value out-of-bounds",n),s=Bv(s,8*Hr)}else(sca(i,this.size*8))&&this._throwError("value out-of-bounds",n);return r.writeValue(s)}decode(r){let n=ca(r.readValue(),this.size*8);return this.signed&&(n=g0(n,this.size*8)),n}}class Ene extends $N{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,mt(mr.dereference(r,"string")))}decode(e){return Ds(super.decode(e))}}class gp extends go{constructor(r,n){let s=!1;const i=[];r.forEach(a=>{a.dynamic&&(s=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,n,s);_(this,"coders");fe(this,{coders:Object.freeze(r.slice())})}defaultValue(){const r=[];this.coders.forEach(s=>{r.push(s.defaultValue())});const n=this.coders.reduce((s,i)=>{const o=i.localName;return o&&(s[o]||(s[o]=0),s[o]++),s},{});return this.coders.forEach((s,i)=>{let o=s.localName;!o||n[o]!==1||(o==="length"&&(o="_length"),r[o]==null&&(r[o]=r[i]))}),Object.freeze(r)}encode(r,n){const s=mr.dereference(n,"tuple");return FN(r,this.coders,s)}decode(r){return UN(r,this.coders)}}function Dr(t){return Me(mt(t))}var Cne="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const R3=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),N3=4;function kne(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let A=1;A>--c&1}const f=31,d=2**f,h=d>>>1,y=h>>1,p=d-1;let b=0;for(let A=0;A1;){let F=P+R>>>1;A>>1|u(),N=N<<1^h,V=(V^h)<<1|h|1;v=N,m=1+V-N}let k=n-4;return g.map(A=>{switch(A-k){case 3:return k+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return k+256+(t[a++]<<8|t[a++]);case 1:return k+t[a++];default:return A-1}})}function Sne(t){let e=0;return()=>t[e++]}function WN(t){return Sne(kne(Ane(t)))}function Ane(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>e[s.charCodeAt(0)]=i);let r=t.length,n=new Uint8Array(6*r>>3);for(let s=0,i=0,o=0,a=0;s=8&&(n[i++]=a>>(o-=8));return n}function Tne(t){return t&1?~t>>1:t>>1}function Ine(t,e){let r=Array(t);for(let n=0,s=0;n{let e=x0(t);if(e.length)return e})}function zN(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Pne(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(One(r,t))}return e.flat()}function b0(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function HN(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;sn[o].push(i));return n}function Pne(t,e){let r=1+e(),n=e(),s=b0(e);return HN(s.length,1+t,e).flatMap((o,a)=>{let[c,...l]=o;return Array(s[a]).fill().map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})})}function One(t,e){let r=1+e();return HN(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Rne(t){let e=[],r=x0(t);return s(n([]),[]),e;function n(i){let o=t(),a=b0(()=>{let c=x0(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&e.push(a);for(let l of o)for(let u of l.Q)s(l,[...a,u],c)}}}function Nne(t){return t.toString(16).toUpperCase().padStart(2,"0")}function GN(t){return`{${Nne(t)}}`}function _ne(t){let e=[];for(let r=0,n=t.length;r>24&255}function QN(t){return t&16777215}let Gw,_3,qw,Jp;function $ne(){let t=WN(Dne);Gw=new Map(VN(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),_3=new Set(x0(t)),qw=new Map,Jp=new Map;for(let[e,r]of zN(t)){if(!_3.has(e)&&r.length==2){let[n,s]=r,i=Jp.get(n);i||(i=new Map,Jp.set(n,i)),i.set(s,e)}qw.set(e,r.reverse())}}function JN(t){return t>=w0&&t=cg&&t=lg&&eug&&e0&&s(ug+l)}else{let o=qw.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=sh(e[0]);for(let o=1;o0&&s>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),s=o;else{let c=Wne(n,a);c>=0?n=c:s==0&&o==0?(e.push(n),n=a):(r.push(a),s=o)}}return n>=0&&e.push(n,...r),e}function XN(t){return YN(t).map(QN)}function zne(t){return Vne(YN(t))}const M3=45,ZN=".",e7=65039,t7=1,dg=t=>Array.from(t);function E0(t,e){return t.P.has(e)||t.Q.has(e)}class Hne extends Array{get is_emoji(){return!0}}let Kw,r7,mc,Qw,n7,Nu,Tx,Gl,sc,D3,Jw;function Dk(){if(Kw)return;let t=WN(Cne);const e=()=>x0(t),r=()=>new Set(e()),n=(u,f)=>f.forEach(d=>u.add(d));Kw=new Map(zN(t)),r7=r(),mc=e(),Qw=new Set(e().map(u=>mc[u])),mc=new Set(mc),n7=r(),r();let s=VN(t),i=t();const o=()=>{let u=new Set;return e().forEach(f=>n(u,s[f])),n(u,e()),u};Nu=b0(u=>{let f=b0(t).map(d=>d+96);if(f.length){let d=u>=i;f[0]-=32,f=Kf(f),d&&(f=`Restricted[${f}]`);let h=o(),y=o(),p=!t();return{N:f,P:h,Q:y,M:p,R:d}}}),Tx=r(),Gl=new Map;let a=e().concat(dg(Tx)).sort((u,f)=>u-f);a.forEach((u,f)=>{let d=t(),h=a[f]=d?a[f-d]:{V:[],M:new Map};h.V.push(u),Tx.has(u)||Gl.set(u,h)});for(let{V:u,M:f}of new Set(Gl.values())){let d=[];for(let y of u){let p=Nu.filter(g=>E0(g,y)),b=d.find(({G:g})=>p.some(v=>g.has(v)));b||(b={G:new Set,V:[]},d.push(b)),b.V.push(y),n(b.G,p)}let h=d.flatMap(y=>dg(y.G));for(let{G:y,V:p}of d){let b=new Set(h.filter(g=>!y.has(g)));for(let g of p)f.set(g,b)}}sc=new Set;let c=new Set;const l=u=>sc.has(u)?c.add(u):sc.add(u);for(let u of Nu){for(let f of u.P)l(f);for(let f of u.Q)l(f)}for(let u of sc)!Gl.has(u)&&!c.has(u)&&Gl.set(u,t7);n(sc,XN(sc)),D3=Rne(t).map(u=>Hne.from(u)).sort(Mne),Jw=new Map;for(let u of D3){let f=[Jw];for(let d of u){let h=f.map(y=>{let p=y.get(d);return p||(p=new Map,y.set(d,p)),p});d===e7?f.push(...h):f=h}for(let d of f)d.V=u}}function Bk(t){return(s7(t)?"":`${Lk($v([t]))} `)+GN(t)}function Lk(t){return`"${t}"ā€Ž`}function Gne(t){if(t.length>=4&&t[2]==M3&&t[3]==M3)throw new Error(`invalid label extension: "${Kf(t.slice(0,4))}"`)}function qne(t){for(let r=t.lastIndexOf(95);r>0;)if(t[--r]!==95)throw new Error("underscore allowed only at start")}function Kne(t){let e=t[0],r=R3.get(e);if(r)throw Ph(`leading ${r}`);let n=t.length,s=-1;for(let i=1;ie&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let s=0,i=t.length;for(let o=0;o{let i=_ne(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=rse(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(qne(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))Gne(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(mc.has(u[0]))throw Ph("leading combining mark");for(let p=1;po.has(a)):dg(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>E0(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function Zne(t){let e=Nu;for(let r of t){let n=e.filter(s=>E0(s,r));if(!n.length)throw Nu.some(s=>E0(s,r))?o7(e[0],r):i7(r);if(e=n,n.length==1)break}return e}function ese(t){return t.map(({input:e,error:r,output:n})=>{if(r){let s=r.message;throw new Error(t.length==1?s:`Invalid label ${Lk($v(e,63))}: ${s}`)}return Kf(n)}).join(ZN)}function i7(t){return new Error(`disallowed character: ${Bk(t)}`)}function o7(t,e){let r=Bk(e),n=Nu.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function Ph(t){return new Error(`illegal placement: ${t}`)}function tse(t,e){for(let r of e)if(!E0(t,r))throw o7(t,r);if(t.M){let r=XN(e);for(let n=1,s=r.length;nN3)throw new Error(`excessive non-spacing marks: ${Lk($v(r.slice(n-1,i)))} (${i-n}/${N3})`);n=i}}}function rse(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=sse(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(sc.has(o))s.push(o);else{let a=Kw.get(o);if(a)s.push(...a);else if(!r7.has(o))throw i7(o)}}}return s.length&&n.push(e(s)),n}function nse(t){return t.filter(e=>e!=e7)}function sse(t,e){let r=Jw,n,s=t.length;for(;s&&(r=r.get(t[--s]),!!r);){let{V:i}=r;i&&(n=i,t.length=s)}return n}const a7=new Uint8Array(32);a7.fill(0);function B3(t){return I(t.length!==0,"invalid ENS name; empty component","comp",t),t}function jk(t){const e=mt(c7(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s{I(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Ix(t,e){return{address:Ae(t),storageKeys:e.map((r,n)=>(I(qe(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function vo(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(I(r.length===2,"invalid slot set",`value[${n}]`,r),Ix(r[0],r[1])):(I(r!=null&&typeof r=="object","invalid address-slot set","value",t),Ix(r.address,r.storageKeys)));I(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return Ix(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function Ed(t){let e;return typeof t=="string"?e=Rs.computePublicKey(t,!1):e=t.publicKey,Ae(Me("0x"+e.substring(4)).substring(26))}function Jf(t,e){return Ed(Rs.recoverPublicKey(t,e))}const Yt=BigInt(0),ose=BigInt(2),ase=BigInt(27),cse=BigInt(28),lse=BigInt(35),use=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Px=4096*32;function L3(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=Qr(e).substring(4),"0x"+r}function Wv(t){return t==="0x"?null:Ae(t)}function Fk(t,e){try{return vo(t)}catch(r){I(!1,r.message,e,t)}}function E1(t,e){return t==="0x"?0:Pe(t,e)}function Dt(t,e){if(t==="0x")return Yt;const r=xe(t,e);return I(r<=use,"value exceeds uint size",e,r),r}function yt(t,e){const r=xe(t,"value"),n=rr(r);return I(n.length<=32,"value too large",`tx.${e}`,r),n}function Uk(t){return vo(t).map(e=>[e.address,e.storageKeys])}function fse(t,e){I(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;rs.data),r.map(s=>s.commitment),r.map(s=>s.proof)])]):Fe(["0x03",Na(n)])}var Js,Ju,Yu,Xu,Zu,ef,tf,rf,nf,sf,of,af,_c,Wo,Di,Vo,cf,Yp;const Pi=class Pi{constructor(){j(this,cf);j(this,Js);j(this,Ju);j(this,Yu);j(this,Xu);j(this,Zu);j(this,ef);j(this,tf);j(this,rf);j(this,nf);j(this,sf);j(this,of);j(this,af);j(this,_c);j(this,Wo);j(this,Di);j(this,Vo);T(this,Js,null),T(this,Ju,null),T(this,Xu,0),T(this,Zu,Yt),T(this,ef,null),T(this,tf,null),T(this,rf,null),T(this,Yu,"0x"),T(this,nf,Yt),T(this,sf,Yt),T(this,of,null),T(this,af,null),T(this,_c,null),T(this,Wo,null),T(this,Vo,null),T(this,Di,null)}get type(){return w(this,Js)}set type(e){switch(e){case null:T(this,Js,null);break;case 0:case"legacy":T(this,Js,0);break;case 1:case"berlin":case"eip-2930":T(this,Js,1);break;case 2:case"london":case"eip-1559":T(this,Js,2);break;case 3:case"cancun":case"eip-4844":T(this,Js,3);break;default:I(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=w(this,Ju);return e==null&&this.type===3?xi:e}set to(e){T(this,Ju,e==null?null:Ae(e))}get nonce(){return w(this,Xu)}set nonce(e){T(this,Xu,Pe(e,"value"))}get gasLimit(){return w(this,Zu)}set gasLimit(e){T(this,Zu,xe(e))}get gasPrice(){const e=w(this,ef);return e==null&&(this.type===0||this.type===1)?Yt:e}set gasPrice(e){T(this,ef,e==null?null:xe(e,"gasPrice"))}get maxPriorityFeePerGas(){const e=w(this,tf);return e??(this.type===2||this.type===3?Yt:null)}set maxPriorityFeePerGas(e){T(this,tf,e==null?null:xe(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){const e=w(this,rf);return e??(this.type===2||this.type===3?Yt:null)}set maxFeePerGas(e){T(this,rf,e==null?null:xe(e,"maxFeePerGas"))}get data(){return w(this,Yu)}set data(e){T(this,Yu,z(e))}get value(){return w(this,nf)}set value(e){T(this,nf,xe(e,"value"))}get chainId(){return w(this,sf)}set chainId(e){T(this,sf,xe(e))}get signature(){return w(this,of)||null}set signature(e){T(this,of,e==null?null:cs.from(e))}get accessList(){const e=w(this,af)||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){T(this,af,e==null?null:vo(e))}get maxFeePerBlobGas(){const e=w(this,_c);return e==null&&this.type===3?Yt:e}set maxFeePerBlobGas(e){T(this,_c,e==null?null:xe(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=w(this,Wo);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){I(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;rObject.assign({},e))}set blobs(e){if(e==null){T(this,Vo,null);return}const r=[],n=[];for(let s=0;s=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=w(this,_c)!=null||w(this,Wo);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&H(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),H(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),H(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Pi.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Pi;if(typeof e=="string"){const n=Q(e);if(n[0]>=127)return Pi.from(dse(n));switch(n[0]){case 1:return Pi.from(gse(n));case 2:return Pi.from(pse(n));case 3:return Pi.from(mse(n))}H(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Pi;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=cs.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(I(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),I(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(I(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),I(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};Js=new WeakMap,Ju=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,ef=new WeakMap,tf=new WeakMap,rf=new WeakMap,nf=new WeakMap,sf=new WeakMap,of=new WeakMap,af=new WeakMap,_c=new WeakMap,Wo=new WeakMap,Di=new WeakMap,Vo=new WeakMap,cf=new WeakSet,Yp=function(e,r){H(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const n=e?this.signature:null;switch(this.inferType()){case 0:return hse(this,n);case 1:return vse(this,n);case 2:return yse(this,n);case 3:return xse(this,n,r?this.blobs:null)}H(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let gl=Pi;function Vv(t){return typeof t=="string"&&(t=mt(t)),Me(Fe([mt(LN),mt(String(t.length)),t]))}function u7(t,e){const r=Vv(t);return Jf(r,e)}const bse=new RegExp("^bytes([0-9]+)$"),wse=new RegExp("^(u?int)([0-9]*)$"),Ese=new RegExp("^(.*)\\[([0-9]*)\\]$");function f7(t,e,r){switch(t){case"address":return Q(r?ss(e,32):Ae(e));case"string":return mt(e);case"bytes":return Q(e);case"bool":return e=e?"0x01":"0x00",Q(r?ss(e,32):e)}let n=t.match(wse);if(n){let s=n[1]==="int",i=parseInt(n[2]||"256");return I((!n[2]||n[2]===String(i))&&i%8===0&&i!==0&&i<=256,"invalid number type","type",t),r&&(i=256),s&&(e=Bv(e,i)),Q(ss(rr(e),i/8))}if(n=t.match(bse),n){const s=parseInt(n[1]);return I(String(s)===n[1]&&s!==0&&s<=32,"invalid bytes type","type",t),I(ba(e)===s,`invalid value for ${t}`,"value",e),r?Q(Mv(e,32)):e}if(n=t.match(Ese),n&&Array.isArray(e)){const s=n[1],i=parseInt(n[2]||String(e.length));I(i===e.length,`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(f7(s,a,!0))}),Q(Fe(o))}I(!1,"invalid type","type",t)}function Le(t,e){I(t.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(f7(n,e[s]))}),z(Fe(r))}function to(t,e){return Me(Le(t,e))}function Cse(t,e){return Qr(Le(t,e))}const d7=new Uint8Array(32);d7.fill(0);const kse=BigInt(-1),h7=BigInt(0),p7=BigInt(1),Sse=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Ase(t){const e=Q(t),r=e.length%32;return r?Fe([e,d7.slice(r)]):z(e)}const Tse=On(p7,32),Ise=On(h7,32),j3={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ox=["name","version","chainId","verifyingContract","salt"];function F3(t){return function(e){return I(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Pse={name:F3("name"),version:F3("version"),chainId:function(t){const e=xe(t,"domain.chainId");return I(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):yr(e)},verifyingContract:function(t){try{return Ae(t).toLowerCase()}catch{}I(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=Q(t,"domain.salt");return I(e.length===32,'invalid domain value "salt"',"domain.salt",t),z(e)}};function Rx(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);I(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const s=ca(Sse,r?n-1:n),i=r?(s+p7)*kse:h7;return function(o){const a=xe(o,"value");return I(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),On(r?Bv(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return I(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const s=Q(n);return I(s.length===r,`invalid length for ${t}`,"value",n),Ase(n)}}}switch(t){case"address":return function(e){return ss(Ae(e),32)};case"bool":return function(e){return e?Tse:Ise};case"bytes":return function(e){return Me(e)};case"string":return function(e){return Dr(e)}}return null}function U3(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function vp(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var U0,Bi,lf,Bg,y7;const Vn=class Vn{constructor(e){j(this,Bg);_(this,"primaryType");j(this,U0);j(this,Bi);j(this,lf);T(this,Bi,new Map),T(this,lf,new Map);const r=new Map,n=new Map,s=new Map,i={};Object.keys(e).forEach(c=>{i[c]=e[c].map(({name:l,type:u})=>{let{base:f,index:d}=vp(u);return f==="int"&&!e.int&&(f="int256"),f==="uint"&&!e.uint&&(f="uint256"),{name:l,type:f+(d||"")}}),r.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),T(this,U0,JSON.stringify(i));for(const c in i){const l=new Set;for(const u of i[c]){I(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const f=vp(u.type).base;I(f!==c,`circular type reference to ${JSON.stringify(f)}`,"types",e),!Rx(f)&&(I(n.has(f),`unknown type ${JSON.stringify(f)}`,"types",e),n.get(f).push(c),r.get(c).add(f))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);I(o.length!==0,"missing primary type","types",e),I(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),fe(this,{primaryType:o[0]});function a(c,l){I(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const f of l)s.get(f).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of s){const u=Array.from(l);u.sort(),w(this,Bi).set(c,U3(c,i[c])+u.map(f=>U3(f,i[f])).join(""))}}get types(){return JSON.parse(w(this,U0))}getEncoder(e){let r=w(this,lf).get(e);return r||(r=Y(this,Bg,y7).call(this,e),w(this,lf).set(e,r)),r}encodeType(e){const r=w(this,Bi).get(e);return I(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Me(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Rx(e))return n(e,r);const s=vp(e).array;if(s)return I(s.count===-1||s.count===r.length,`array length mismatch; expected length ${s.count}`,"value",r),r.map(o=>this._visit(s.prefix,o,n));const i=this.types[e];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});I(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Vn(e)}static getPrimaryType(e){return Vn.from(e).primaryType}static hashStruct(e,r,n){return Vn.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const s=j3[n];I(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>Ox.indexOf(n.name)-Ox.indexOf(s.name)),Vn.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Fe(["0x1901",Vn.hashDomain(e),Vn.from(r).hash(n)])}static hash(e,r,n){return Me(Vn.encode(e,r,n))}static async resolveNames(e,r,n,s){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const i={};e.verifyingContract&&!qe(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Vn.from(r);o.visit(n,(a,c)=>(a==="address"&&!qe(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}}static getPayload(e,r,n){Vn.hashDomain(e);const s={},i=[];Ox.forEach(c=>{const l=e[c];l!=null&&(s[c]=Pse[c](l),i.push({name:c,type:j3[c]}))});const o=Vn.from(r);r=o.types;const a=Object.assign({},r);return I(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return z(Q(l));if(c.match(/^u?int/))return xe(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return I(typeof l=="string","invalid string","value",l),l}I(!1,"unsupported type","type",c)})}}};U0=new WeakMap,Bi=new WeakMap,lf=new WeakMap,Bg=new WeakSet,y7=function(e){{const s=Rx(e);if(s)return s}const r=vp(e).array;if(r){const s=r.prefix,i=this.getEncoder(s);return o=>{I(r.count===-1||r.count===o.length,`array length mismatch; expected length ${r.count}`,"value",o);let a=o.map(i);return w(this,Bi).has(s)&&(a=a.map(Me)),Me(Fe(a))}}const n=this.types[e];if(n){const s=Dr(w(this,Bi).get(e));return i=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(i[a]);return w(this,Bi).has(c)?Me(l):l});return o.unshift(s),Fe(o)}}I(!1,`unknown type: ${e}`,"type",e)};let Bs=Vn;function Ose(t,e,r,n){return Jf(Bs.hash(t,e,r),n)}function Gr(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const Rse="external public payable override",Nse=Gr(Rse.split(" ")),g7="constant external internal payable private public pure view override",_se=Gr(g7.split(" ")),v7="constructor error event fallback function receive struct",m7=Gr(v7.split(" ")),x7="calldata memory storage payable indexed",Mse=Gr(x7.split(" ")),Dse="tuple returns",Bse=[v7,x7,Dse,g7].join(" "),Lse=Gr(Bse.split(" ")),jse={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Fse=new RegExp("^(\\s*)"),Use=new RegExp("^([0-9]+)"),$se=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),b7=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),w7=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var fr,xs,$0,Yw;const Lg=class Lg{constructor(e){j(this,$0);j(this,fr);j(this,xs);T(this,fr,0),T(this,xs,e.slice())}get offset(){return w(this,fr)}get length(){return w(this,xs).length-w(this,fr)}clone(){return new Lg(w(this,xs))}reset(){T(this,fr,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=Y(this,$0,Yw).call(this,w(this,fr)+1,e.match+1);return T(this,fr,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;w(this,fr)=w(this,xs).length)throw new Error("out-of-bounds");return w(this,xs)[w(this,fr)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return Pl(this,fr)._++,e}toString(){const e=[];for(let r=w(this,fr);r`}};fr=new WeakMap,xs=new WeakMap,$0=new WeakSet,Yw=function(e=0,r=0){return new Lg(w(this,xs).slice(e,r).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))};let Ls=Lg;function Ga(t){const e=[],r=o=>{const a=i0&&e[e.length-1].type==="NUMBER"){const f=e.pop().text;u=f+u,e[e.length-1].value=Pe(f)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match($se),a){if(c.text=a[1],i+=c.text.length,Lse.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(w7)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(Use),a){c.text=a[1],c.type="NUMBER",i+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`)}return new Ls(e.map(o=>Object.freeze(o)))}function $3(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function zv(t,e){if(e.peekKeyword(m7)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function uo(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function E7(t){let e=uo(t,_se);return $3(e,Gr("constant payable nonpayable".split(" "))),$3(e,Gr("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function ro(t,e){return t.popParams().map(r=>ar.from(r,e))}function C7(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return xe(t.pop().text);throw new Error("invalid gas")}return null}function vl(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Wse=new RegExp(/^(.*)\[([0-9]*)\]$/);function W3(t){const e=t.match(w7);if(I(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);I(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);I(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const wt={},pn=Symbol.for("_ethers_internal"),V3="_ParamTypeInternal",z3="_ErrorInternal",H3="_EventInternal",G3="_ConstructorInternal",q3="_FallbackInternal",K3="_FunctionInternal",Q3="_StructInternal";var uf,Xp;const zn=class zn{constructor(e,r,n,s,i,o,a,c){j(this,uf);_(this,"name");_(this,"type");_(this,"baseType");_(this,"indexed");_(this,"components");_(this,"arrayLength");_(this,"arrayChildren");if(yo(e,wt,"ParamType"),Object.defineProperty(this,pn,{value:V3}),o&&(o=Object.freeze(o.slice())),s==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(s==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");fe(this,{name:r,type:n,baseType:s,indexed:i,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const s={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(s.indexed=this.indexed),this.isTuple()&&(s.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(s)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(s=>n.arrayChildren.walk(s,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((s,i)=>n.components[i].walk(s,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],s=[e];return Y(this,uf,Xp).call(this,n,e,r,i=>{s[0]=i}),n.length&&await Promise.all(n),s[0]}static from(e,r){if(zn.isParamType(e))return e;if(typeof e=="string")try{return zn.from(Ga(e),r)}catch{I(!1,"invalid param type","obj",e)}else if(e instanceof Ls){let a="",c="",l=null;uo(e,Gr(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(p=>zn.from(p)),a=`tuple(${l.map(p=>p.format()).join(",")})`):(a=W3(e.popType("TYPE")),c=a);let u=null,f=null;for(;e.length&&e.peekType("BRACKET");){const p=e.pop();u=new zn(wt,"",a,c,null,l,f,u),f=p.value,a+=p.text,c="array",l=null}let d=null;if(uo(e,Mse).has("indexed")){if(!r)throw new Error("");d=!0}const y=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new zn(wt,y,a,c,d,l,f,u)}const n=e.name;I(!n||typeof n=="string"&&n.match(b7),"invalid name","obj.name",n);let s=e.indexed;s!=null&&(I(r,"parameter cannot be indexed","obj.indexed",e.indexed),s=!!s);let i=e.type,o=i.match(Wse);if(o){const a=parseInt(o[2]||"-1"),c=zn.from({type:o[1],components:e.components});return new zn(wt,n||"",i,"array",s,null,a,c)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const a=e.components!=null?e.components.map(l=>zn.from(l)):null;return new zn(wt,n||"",i,"tuple",s,a,null,null)}return i=W3(e.type),new zn(wt,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[pn]===V3}};uf=new WeakSet,Xp=function(e,r,n,s){if(this.isArray()){if(!Array.isArray(r))throw new Error("invalid array value");if(this.arrayLength!==-1&&r.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,a=r.slice();a.forEach((c,l)=>{var u;Y(u=o,uf,Xp).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}if(this.isTuple()){const o=this.components;let a;if(Array.isArray(r))a=r.slice();else{if(r==null||typeof r!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in r))throw new Error(`missing value for component ${c.name}`);return r[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{var u;Y(u=o[l],uf,Xp).call(u,e,c,n,f=>{a[l]=f})}),s(a);return}const i=n(this.type,r);i.then?e.push(async function(){s(await i)}()):s(i)};let ar=zn;class _a{constructor(e,r,n){_(this,"type");_(this,"inputs");yo(e,wt,"Fragment"),n=Object.freeze(n.slice()),fe(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{_a.from(JSON.parse(e))}catch{}return _a.from(Ga(e))}if(e instanceof Ls)switch(e.peekKeyword(m7)){case"constructor":return ci.from(e);case"error":return zr.from(e);case"event":return Ss.from(e);case"fallback":case"receive":return si.from(e);case"function":return As.from(e);case"struct":return wa.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return ci.from(e);case"error":return zr.from(e);case"event":return Ss.from(e);case"fallback":case"receive":return si.from(e);case"function":return As.from(e);case"struct":return wa.from(e)}H(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}I(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return ci.isFragment(e)}static isError(e){return zr.isFragment(e)}static isEvent(e){return Ss.isFragment(e)}static isFunction(e){return As.isFragment(e)}static isStruct(e){return wa.isFragment(e)}}class C1 extends _a{constructor(r,n,s,i){super(r,n,i);_(this,"name");I(typeof s=="string"&&s.match(b7),"invalid identifier","name",s),i=Object.freeze(i.slice()),fe(this,{name:s})}}function C0(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}class zr extends C1{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,pn,{value:z3})}get selector(){return Dr(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+C0(e,this.inputs)),r.join(" ")}static from(e){if(zr.isFragment(e))return e;if(typeof e=="string")return zr.from(Ga(e));if(e instanceof Ls){const r=zv("error",e),n=ro(e);return vl(e),new zr(wt,r,n)}return new zr(wt,e.name,e.inputs?e.inputs.map(ar.from):[])}static isFragment(e){return e&&e[pn]===z3}}class Ss extends C1{constructor(r,n,s,i){super(r,"event",n,s);_(this,"anonymous");Object.defineProperty(this,pn,{value:H3}),fe(this,{anonymous:i})}get topicHash(){return Dr(this.format("sighash"))}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("event"),n.push(this.name+C0(r,this.inputs)),r!=="sighash"&&this.anonymous&&n.push("anonymous"),n.join(" ")}static getTopicHash(r,n){return n=(n||[]).map(i=>ar.from(i)),new Ss(wt,r,n,!1).topicHash}static from(r){if(Ss.isFragment(r))return r;if(typeof r=="string")try{return Ss.from(Ga(r))}catch{I(!1,"invalid event fragment","obj",r)}else if(r instanceof Ls){const n=zv("event",r),s=ro(r,!0),i=!!uo(r,Gr(["anonymous"])).has("anonymous");return vl(r),new Ss(wt,n,s,i)}return new Ss(wt,r.name,r.inputs?r.inputs.map(n=>ar.from(n,!0)):[],!!r.anonymous)}static isFragment(r){return r&&r[pn]===H3}}class ci extends _a{constructor(r,n,s,i,o){super(r,n,s);_(this,"payable");_(this,"gas");Object.defineProperty(this,pn,{value:G3}),fe(this,{payable:i,gas:o})}format(r){if(H(r!=null&&r!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),r==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r)))});const n=[`constructor${C0(r,this.inputs)}`];return this.payable&&n.push("payable"),this.gas!=null&&n.push(`@${this.gas.toString()}`),n.join(" ")}static from(r){if(ci.isFragment(r))return r;if(typeof r=="string")try{return ci.from(Ga(r))}catch{I(!1,"invalid constuctor fragment","obj",r)}else if(r instanceof Ls){uo(r,Gr(["constructor"]));const n=ro(r),s=!!uo(r,Nse).has("payable"),i=C7(r);return vl(r),new ci(wt,"constructor",n,s,i)}return new ci(wt,"constructor",r.inputs?r.inputs.map(ar.from):[],!!r.payable,r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[pn]===G3}}class si extends _a{constructor(r,n,s){super(r,"fallback",n);_(this,"payable");Object.defineProperty(this,pn,{value:q3}),fe(this,{payable:s})}format(r){const n=this.inputs.length===0?"receive":"fallback";if(r==="json"){const s=this.payable?"payable":"nonpayable";return JSON.stringify({type:n,stateMutability:s})}return`${n}()${this.payable?" payable":""}`}static from(r){if(si.isFragment(r))return r;if(typeof r=="string")try{return si.from(Ga(r))}catch{I(!1,"invalid fallback fragment","obj",r)}else if(r instanceof Ls){const n=r.toString(),s=r.peekKeyword(Gr(["fallback","receive"]));if(I(s,"type must be fallback or receive","obj",n),r.popKeyword(Gr(["fallback","receive"]))==="receive"){const c=ro(r);return I(c.length===0,"receive cannot have arguments","obj.inputs",c),uo(r,Gr(["payable"])),vl(r),new si(wt,[],!0)}let o=ro(r);o.length?I(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(c=>c.format("minimal")).join(", ")):o=[ar.from("bytes")];const a=E7(r);if(I(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),uo(r,Gr(["returns"])).has("returns")){const c=ro(r);I(c.length===1&&c[0].type==="bytes","invalid fallback outputs","obj.outputs",c.map(l=>l.format("minimal")).join(", "))}return vl(r),new si(wt,o,a==="payable")}if(r.type==="receive")return new si(wt,[],!0);if(r.type==="fallback"){const n=[ar.from("bytes")],s=r.stateMutability==="payable";return new si(wt,n,s)}I(!1,"invalid fallback description","obj",r)}static isFragment(r){return r&&r[pn]===q3}}class As extends C1{constructor(r,n,s,i,o,a){super(r,"function",n,i);_(this,"constant");_(this,"outputs");_(this,"stateMutability");_(this,"payable");_(this,"gas");Object.defineProperty(this,pn,{value:K3}),o=Object.freeze(o.slice()),fe(this,{constant:s==="view"||s==="pure",gas:a,outputs:o,payable:s==="payable",stateMutability:s})}get selector(){return Dr(this.format("sighash")).substring(0,10)}format(r){if(r==null&&(r="sighash"),r==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(s=>JSON.parse(s.format(r))),outputs:this.outputs.map(s=>JSON.parse(s.format(r)))});const n=[];return r!=="sighash"&&n.push("function"),n.push(this.name+C0(r,this.inputs)),r!=="sighash"&&(this.stateMutability!=="nonpayable"&&n.push(this.stateMutability),this.outputs&&this.outputs.length&&(n.push("returns"),n.push(C0(r,this.outputs))),this.gas!=null&&n.push(`@${this.gas.toString()}`)),n.join(" ")}static getSelector(r,n){return n=(n||[]).map(i=>ar.from(i)),new As(wt,r,"view",n,[],null).selector}static from(r){if(As.isFragment(r))return r;if(typeof r=="string")try{return As.from(Ga(r))}catch{I(!1,"invalid function fragment","obj",r)}else if(r instanceof Ls){const s=zv("function",r),i=ro(r),o=E7(r);let a=[];uo(r,Gr(["returns"])).has("returns")&&(a=ro(r));const c=C7(r);return vl(r),new As(wt,s,o,i,a,c)}let n=r.stateMutability;return n==null&&(n="payable",typeof r.constant=="boolean"?(n="view",r.constant||(n="payable",typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable"))):typeof r.payable=="boolean"&&!r.payable&&(n="nonpayable")),new As(wt,r.name,n,r.inputs?r.inputs.map(ar.from):[],r.outputs?r.outputs.map(ar.from):[],r.gas!=null?r.gas:null)}static isFragment(r){return r&&r[pn]===K3}}class wa extends C1{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,pn,{value:Q3})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return wa.from(Ga(e))}catch{I(!1,"invalid struct fragment","obj",e)}else if(e instanceof Ls){const r=zv("struct",e),n=ro(e);return vl(e),new wa(wt,r,n)}return new wa(wt,e.name,e.inputs?e.inputs.map(ar.from):[])}static isFragment(e){return e&&e[pn]===Q3}}const Us=new Map;Us.set(0,"GENERIC_PANIC");Us.set(1,"ASSERT_FALSE");Us.set(17,"OVERFLOW");Us.set(18,"DIVIDE_BY_ZERO");Us.set(33,"ENUM_RANGE_ERROR");Us.set(34,"BAD_STORAGE_DATA");Us.set(49,"STACK_UNDERFLOW");Us.set(50,"ARRAY_RANGE_ERROR");Us.set(65,"OUT_OF_MEMORY");Us.set(81,"UNINITIALIZED_FUNCTION_CALL");const Vse=new RegExp(/^bytes([0-9]*)$/),zse=new RegExp(/^(u?int)([0-9]*)$/);let Nx=null,J3=1024;function Hse(t,e,r,n){let s="missing revert data",i=null;const o=null;let a=null;if(r){s="execution reverted";const l=Q(r);if(r=z(r),l.length===0)s+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)s+=" (could not decode reason; invalid data length)";else if(z(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[i]},s+=`: ${JSON.stringify(i)}`}catch{s+=" (could not decode reason; invalid string data)"}else if(z(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},i=`Panic due to ${Us.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Ae(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Ae(e.from)),ht(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var zo,ql;const jg=class jg{constructor(){j(this,zo)}getDefaultValue(e){const r=e.map(s=>Y(this,zo,ql).call(this,ar.from(s)));return new gp(r,"_").defaultValue()}encode(e,r){gk(r.length,e.length,"types/values length mismatch");const n=e.map(o=>Y(this,zo,ql).call(this,ar.from(o))),s=new gp(n,"_"),i=new jw;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>Y(this,zo,ql).call(this,ar.from(o)));return new gp(s,"_").decode(new Fw(r,n,J3))}static _setDefaultMaxInflation(e){I(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),J3=e}static defaultAbiCoder(){return Nx==null&&(Nx=new jg),Nx}static getBuiltinCallException(e,r,n){return Hse(e,r,n,jg.defaultAbiCoder())}};zo=new WeakSet,ql=function(e){if(e.isArray())return new dne(Y(this,zo,ql).call(this,e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new gp(e.components.map(n=>Y(this,zo,ql).call(this,n)),e.name);switch(e.baseType){case"address":return new une(e.name);case"bool":return new hne(e.name);case"string":return new Ene(e.name);case"bytes":return new pne(e.name);case"":return new vne(e.name)}let r=e.type.match(zse);if(r){let n=parseInt(r[2]||"256");return I(n!==0&&n<=256&&n%8===0,"invalid "+r[1]+" bit length","param",e),new wne(n/8,r[1]==="int",e.name)}if(r=e.type.match(Vse),r){let n=parseInt(r[1]);return I(n!==0&&n<=32,"invalid bytes length","param",e),new yne(n,e.name)}I(!1,"invalid type","type",e.type)};let qt=jg;function Gse(t){const e=mt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Mv(e,32)}function qse(t){const e=Q(t,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return Ds(e.slice(0,r))}class k7{constructor(e,r,n){_(this,"fragment");_(this,"name");_(this,"signature");_(this,"topic");_(this,"args");const s=e.name,i=e.format();fe(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class S7{constructor(e,r,n,s){_(this,"fragment");_(this,"name");_(this,"args");_(this,"signature");_(this,"selector");_(this,"value");const i=e.name,o=e.format();fe(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class A7{constructor(e,r,n){_(this,"fragment");_(this,"name");_(this,"args");_(this,"signature");_(this,"selector");const s=e.name,i=e.format();fe(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class Xw{constructor(e){_(this,"hash");_(this,"_isIndexed");fe(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const Y3={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},X3={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&Y3[t.toString()]&&(e=Y3[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Ys,Xs,Zs,Tr,yi,Zp,ey;const dc=class dc{constructor(e){j(this,yi);_(this,"fragments");_(this,"deploy");_(this,"fallback");_(this,"receive");j(this,Ys);j(this,Xs);j(this,Zs);j(this,Tr);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,T(this,Zs,new Map),T(this,Ys,new Map),T(this,Xs,new Map);const n=[];for(const o of r)try{n.push(_a.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}fe(this,{fragments:Object.freeze(n)});let s=null,i=!1;T(this,Tr,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}fe(this,{deploy:o});return;case"fallback":o.inputs.length===0?i=!0:(I(!s||o.payable!==s.payable,"conflicting fallback fragments",`fragments[${a}]`,o),s=o,i=s.payable);return;case"function":c=w(this,Zs);break;case"event":c=w(this,Xs);break;case"error":c=w(this,Ys);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||fe(this,{deploy:ci.from("constructor()")}),fe(this,{fallback:s,receive:i})}format(e){const r=e?"minimal":"full";return this.fragments.map(s=>s.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return qt.defaultAbiCoder()}getFunctionName(e){const r=Y(this,yi,Zp).call(this,e,null,!1);return I(r,"no matching function","key",e),r.name}hasFunction(e){return!!Y(this,yi,Zp).call(this,e,null,!1)}getFunction(e,r){return Y(this,yi,Zp).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(w(this,Zs).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;nn.localeCompare(s));for(let n=0;n1){const i=s.map(o=>JSON.stringify(o.format())).join(", ");I(!1,`ambiguous error description (i.e. ${i})`,"name",e)}return s[0]}if(e=zr.from(e).format(),e==="Error(string)")return zr.from("error Error(string)");if(e==="Panic(uint256)")return zr.from("error Panic(uint256)");const n=w(this,Ys).get(e);return n||null}forEachError(e){const r=Array.from(w(this,Ys).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;ni.type==="string"?Dr(o):i.type==="bytes"?Me(z(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=On(o):i.type.match(/^bytes/)?o=Mv(o,32):i.type==="address"&&w(this,Tr).encode(["address"],[o]),ss(z(o),32));for(r.forEach((i,o)=>{const a=e.inputs[o];if(!a.indexed){I(i==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?I(!1,"filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);I(o,"unknown event","eventFragment",e),e=o}const n=[],s=[],i=[];return e.anonymous||n.push(e.topicHash),I(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Dr(c));else if(o.type==="bytes")n.push(Me(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(w(this,Tr).encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:w(this,Tr).encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const h=this.getEvent(e);I(h,"unknown event","eventFragment",e),e=h}if(n!=null&&!e.anonymous){const h=e.topicHash;I(qe(n[0],32)&&n[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const s=[],i=[],o=[];e.inputs.forEach((h,y)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(s.push(ar.from({type:"bytes32",name:h.name})),o.push(!0)):(s.push(h),o.push(!1)):(i.push(h),o.push(!1))});const a=n!=null?w(this,Tr).decode(s,Fe(n)):null,c=w(this,Tr).decode(i,r,!0),l=[],u=[];let f=0,d=0;return e.inputs.forEach((h,y)=>{let p=null;if(h.indexed)if(a==null)p=new Xw(null);else if(o[y])p=new Xw(a[d++]);else try{p=a[d++]}catch(b){p=b}else try{p=c[f++]}catch(b){p=b}l.push(p),u.push(h.name||null)}),pl.fromItems(l,u)}parseTransaction(e){const r=Q(e.data,"tx.data"),n=xe(e.value!=null?e.value:0,"tx.value"),s=this.getFunction(z(r.slice(0,4)));if(!s)return null;const i=w(this,Tr).decode(s.inputs,r.slice(4));return new S7(s,s.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new k7(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=z(e),n=this.getError(at(r,0,4));if(!n)return null;const s=w(this,Tr).decode(n.inputs,at(r,4));return new A7(n,n.selector,s)}static from(e){return e instanceof dc?e:typeof e=="string"?new dc(JSON.parse(e)):typeof e.formatJson=="function"?new dc(e.formatJson()):typeof e.format=="function"?new dc(e.format("json")):new dc(e)}};Ys=new WeakMap,Xs=new WeakMap,Zs=new WeakMap,Tr=new WeakMap,yi=new WeakSet,Zp=function(e,r,n){if(qe(e)){const i=e.toLowerCase();for(const o of w(this,Zs).values())if(i===o.selector)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of w(this,Zs))o.split("(")[0]===e&&i.push(a);if(r){const o=r.length>0?r[r.length-1]:null;let a=r.length,c=!0;mr.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=i.length-1;l>=0;l--){const u=i[l].inputs.length;u!==a&&(!c||u!==a-1)&&i.splice(l,1)}for(let l=i.length-1;l>=0;l--){const u=i[l].inputs;for(let f=0;f=u.length){if(r[f].type==="overrides")continue;i.splice(l,1);break}if(r[f].type!==u[f].baseType){i.splice(l,1);break}}}}if(i.length===1&&r&&r.length!==i[0].inputs.length){const o=r[r.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&i.splice(0,1)}if(i.length===0)return null;if(i.length>1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");I(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return i[0]}const s=w(this,Zs).get(As.from(e).format());return s||null},ey=function(e,r,n){if(qe(e)){const i=e.toLowerCase();for(const o of w(this,Xs).values())if(i===o.topicHash)return o;return null}if(e.indexOf("(")===-1){const i=[];for(const[o,a]of w(this,Xs))o.split("(")[0]===e&&i.push(a);if(r){for(let o=i.length-1;o>=0;o--)i[o].inputs.length=0;o--){const a=i[o].inputs;for(let c=0;c1&&n){const o=i.map(a=>JSON.stringify(a.format())).join(", ");I(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return i[0]}const s=w(this,Xs).get(Ss.from(e).format());return s||null};let ut=dc;const T7=BigInt(0);function _u(t){return t??null}function Nt(t){return t==null?null:t.toString()}class Zw{constructor(e,r,n){_(this,"gasPrice");_(this,"maxFeePerGas");_(this,"maxPriorityFeePerGas");fe(this,{gasPrice:_u(e),maxFeePerGas:_u(r),maxPriorityFeePerGas:_u(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Nt(e),maxFeePerGas:Nt(r),maxPriorityFeePerGas:Nt(n)}}}function Yf(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=z(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const s of r)!(s in t)||t[s]==null||(e[s]=xe(t[s],`request.${s}`));const n="type,nonce".split(/,/);for(const s of n)!(s in t)||t[s]==null||(e[s]=Pe(t[s],`request.${s}`));return t.accessList&&(e.accessList=vo(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(s=>mi(s)?z(s):Object.assign({},s))),e}var Li;class I7{constructor(e,r){_(this,"provider");_(this,"number");_(this,"hash");_(this,"timestamp");_(this,"parentHash");_(this,"parentBeaconBlockRoot");_(this,"nonce");_(this,"difficulty");_(this,"gasLimit");_(this,"gasUsed");_(this,"stateRoot");_(this,"receiptsRoot");_(this,"blobGasUsed");_(this,"excessBlobGas");_(this,"miner");_(this,"prevRandao");_(this,"extraData");_(this,"baseFeePerGas");j(this,Li);T(this,Li,e.transactions.map(n=>typeof n!="string"?new Xf(n,r):n)),fe(this,{provider:r,hash:_u(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:_u(e.prevRandao),extraData:e.extraData,baseFeePerGas:_u(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return w(this,Li).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=w(this,Li).slice();return e.length===0?[]:(H(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:s,gasUsed:i,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:y,timestamp:p,transactions:b}=this;return{_type:"Block",baseFeePerGas:Nt(e),difficulty:Nt(r),extraData:n,gasLimit:Nt(s),gasUsed:Nt(i),blobGasUsed:Nt(this.blobGasUsed),excessBlobGas:Nt(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:f,timestamp:p,parentBeaconBlockRoot:d,stateRoot:h,receiptsRoot:y,transactions:b}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>enew Cd(s,r))));let n=T7;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),fe(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return w(this,W0)}toJSON(){const{to:e,from:r,contractAddress:n,hash:s,index:i,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Nt(this.cumulativeGasUsed),from:r,gasPrice:Nt(this.gasPrice),blobGasUsed:Nt(this.blobGasUsed),blobGasPrice:Nt(this.blobGasPrice),gasUsed:Nt(this.gasUsed),hash:s,index:i,logs:l,logsBloom:c,root:f,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e{if(a)return null;const{blockNumber:d,nonce:h}=await It({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h{if(d==null||d.status!==0)return d;H(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const y=[],p=()=>{y.forEach(g=>g())};if(y.push(()=>{a=!0}),s>0){const g=setTimeout(()=>{p(),h(ht("wait for transaction timeout","TIMEOUT"))},s);y.push(()=>{clearTimeout(g)})}const b=async g=>{if(await g.confirmations()>=n){p();try{d(l(g))}catch(v){h(v)}}};if(y.push(()=>{this.provider.off(this.hash,b)}),this.provider.on(this.hash,b),i>=0){const g=async()=>{try{await c()}catch(v){if(Ft(v,"TRANSACTION_REPLACED")){p(),h(v);return}}a||this.provider.once("block",g)};y.push(()=>{this.provider.off("block",g)}),this.provider.once("block",g)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return H(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),O7(this)}reorderedEvent(e){return H(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),H(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),P7(this,e)}replaceableTransaction(e){I(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new Q5(this,this.provider);return T(r,Ho,e),r}};Ho=new WeakMap;let Xf=Q5;function Kse(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function P7(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function O7(t){return{orphan:"drop-transaction",tx:t}}function Qse(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class Hv extends Cd{constructor(r,n,s){super(r,r.provider);_(this,"interface");_(this,"fragment");_(this,"args");const i=n.decodeEventLog(s,r.data,r.topics);fe(this,{args:i,fragment:s,interface:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class Vk extends Cd{constructor(r,n){super(r,r.provider);_(this,"error");fe(this,{error:n})}}var ff;class R7 extends Wk{constructor(r,n,s){super(s,n);j(this,ff);T(this,ff,r)}get logs(){return super.logs.map(r=>{const n=r.topics.length?w(this,ff).getEvent(r.topics[0]):null;if(n)try{return new Hv(r,w(this,ff),n)}catch(s){return new Vk(r,s)}return r})}}ff=new WeakMap;var V0;class Gv extends Xf{constructor(r,n,s){super(s,n);j(this,V0);T(this,V0,r)}async wait(r,n){const s=await super.wait(r,n);return s==null?null:new R7(w(this,V0),this.provider,s)}}V0=new WeakMap;class zk extends xk{constructor(r,n,s,i){super(r,n,s);_(this,"log");fe(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class N7 extends zk{constructor(e,r,n,s,i){super(e,r,n,new Hv(i,e.interface,s));const o=e.interface.decodeEventLog(s,this.log.data,this.log.topics);fe(this,{args:o,fragment:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const Z3=BigInt(0);function _7(t){return t&&typeof t.call=="function"}function M7(t){return t&&typeof t.estimateGas=="function"}function qv(t){return t&&typeof t.resolveName=="function"}function D7(t){return t&&typeof t.sendTransaction=="function"}function B7(t){if(t!=null){if(qv(t))return t;if(t.provider)return t.provider}}var z0;class Jse{constructor(e,r,n){j(this,z0);_(this,"fragment");if(fe(this,{fragment:r}),r.inputs.lengthn[c]==null?null:a.walkAsync(n[c],(u,f)=>u==="address"?Array.isArray(f)?Promise.all(f.map(d=>sr(d,i))):sr(f,i):f)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return w(this,z0)}}z0=new WeakMap;function ml(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function xc(t){return t==null?null:t.provider||null}async function Hk(t,e){const r=mr.dereference(t,"overrides");I(typeof r=="object","invalid overrides parameter","overrides",t);const n=Yf(r);return I(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),I(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function L7(t,e,r){const n=ml(t,"resolveName"),s=qv(n)?n:null;return await Promise.all(e.map((i,o)=>i.walkAsync(r[o],(a,c)=>(c=mr.dereference(c,a),a==="address"?sr(c,s):c))))}function Yse(t){const e=async function(o){const a=await Hk(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await sr(a.from,B7(t.runner)));const c=t.interface,l=xe(a.value||Z3,"overrides.value")===Z3,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&I(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),I(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const f=c.receive||c.fallback&&c.fallback.payable;return I(f||l,"cannot send value to non-payable fallback","overrides.value",a.value),I(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=ml(t.runner,"call");H(_7(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw _v(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;H(D7(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=xc(t.runner);return new Gv(t.interface,l,c)},s=async function(o){const a=ml(t.runner,"estimateGas");return H(M7(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},i=async o=>await n(o);return fe(i,{_contract:t,estimateGas:s,populateTransaction:e,send:n,staticCall:r}),i}function Xse(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return H(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let f={};if(u.inputs.length+1===l.length&&(f=await Hk(l.pop()),f.from&&(f.from=await sr(f.from,B7(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const d=await L7(t.runner,u.inputs,l);return Object.assign({},f,await It({to:t.getAddress(),data:t.interface.encodeFunctionData(u,d)}))},s=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},i=async function(...l){const u=t.runner;H(D7(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const f=await u.sendTransaction(await n(...l)),d=xc(t.runner);return new Gv(t.interface,d,f)},o=async function(...l){const u=ml(t.runner,"estimateGas");return H(M7(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=ml(t.runner,"call");H(_7(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const f=await n(...l);let d="0x";try{d=await u.call(f)}catch(y){throw _v(y)&&y.data?t.interface.makeError(y.data,f):y}const h=r(...l);return t.interface.decodeFunctionResult(h,d)},c=async(...l)=>r(...l).constant?await s(...l):await i(...l);return fe(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:i,staticCall:s,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return H(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function Zse(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return H(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new Jse(t,r(...s),s)};return fe(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const s=t.interface.getEvent(e);return H(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const pg=Symbol.for("_ethersInternal_contract"),j7=new WeakMap;function eie(t,e){j7.set(t[pg],e)}function xn(t){return j7.get(t[pg])}function tie(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function Gk(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(qe(o,32))return o;const a=t.interface.getEvent(o);return I(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(i):i(o))}else e==="*"?r=[null]:typeof e=="string"?qe(e,32)?r=[e]:(n=t.interface.getEvent(e),I(n,"unknown fragment","event",e),r=[n.topicHash]):tie(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):I(!1,"unknown event name","event",e);r=r.map(i=>{if(i==null)return null;if(Array.isArray(i)){const o=Array.from(new Set(i.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return i.toLowerCase()});const s=r.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:s,topics:r}}async function ih(t,e){const{subs:r}=xn(t);return r.get((await Gk(t,e)).tag)||null}async function e8(t,e,r){const n=xc(t.runner);H(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await Gk(t,r),{addr:a,subs:c}=xn(t);let l=c.get(i);if(!l){const f={address:a||t,topics:o},d=b=>{let g=s;if(g==null)try{g=t.interface.getEvent(b.topics[0])}catch{}if(g){const v=g,m=s?t.interface.decodeEventLog(s,b.data,b.topics):[];t2(t,r,m,k=>new N7(t,k,r,v,b))}else t2(t,r,[],v=>new zk(t,v,r,b))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(n.on(f,d))},stop:async()=>{if(h.length==0)return;let b=h;h=[],await Promise.all(b),n.off(f,d)}},c.set(i,l)}return l}let e2=Promise.resolve();async function rie(t,e,r,n){await e2;const s=await ih(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),s.listeners.length===0&&(s.stop(),xn(t).subs.delete(s.tag)),i>0}async function t2(t,e,r,n){try{await e2}catch{}const s=rie(t,e,r,n);return e2=s,await s}const mp=["then"];var H8;H8=pg;const Wh=class Wh{constructor(e,r,n,s){_(this,"target");_(this,"interface");_(this,"runner");_(this,"filters");_(this,H8);_(this,"fallback");I(typeof e=="string"||Mk(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=ut.from(r);fe(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,pg,{value:{}});let o,a=null,c=null;if(s){const f=xc(n);c=new Gv(this.interface,f,s)}let l=new Map;if(typeof e=="string")if(qe(e))a=e,o=Promise.resolve(e);else{const f=ml(n,"resolveName");if(!qv(f))throw ht("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=f.resolveName(e).then(d=>{if(d==null)throw ht("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return xn(this).addr=d,d})}else o=e.getAddress().then(f=>{if(f==null)throw new Error("TODO");return xn(this).addr=f,f});eie(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(f,d,h)=>{if(typeof d=="symbol"||mp.indexOf(d)>=0)return Reflect.get(f,d,h);try{return this.getEvent(d)}catch(y){if(!Ft(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(f,d)=>mp.indexOf(d)>=0?Reflect.has(f,d):Reflect.has(f,d)||this.interface.hasEvent(String(d))});return fe(this,{filters:u}),fe(this,{fallback:i.receive||i.fallback?Yse(this):null}),new Proxy(this,{get:(f,d,h)=>{if(typeof d=="symbol"||d in f||mp.indexOf(d)>=0)return Reflect.get(f,d,h);try{return f.getFunction(d)}catch(y){if(!Ft(y,"INVALID_ARGUMENT")||y.argument!=="key")throw y}},has:(f,d)=>typeof d=="symbol"||d in f||mp.indexOf(d)>=0?Reflect.has(f,d):f.interface.hasFunction(d)})}connect(e){return new Wh(this.target,this.interface,e)}attach(e){return new Wh(e,this.interface,this.runner)}async getAddress(){return await xn(this).addrPromise}async getDeployedCode(){const e=xc(this.runner);H(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const n=xc(this.runner);return H(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((s,i)=>{const o=async()=>{try{if(await this.getDeployedCode()!=null)return s(this);n.once("block",o)}catch(a){i(a)}};o()})}deploymentTransaction(){return xn(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),Xse(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Zse(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:s,addrPromise:i}=xn(this),o=s||await i,{fragment:a,topics:c}=await Gk(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=xc(this.runner);return H(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(f=>{let d=a;if(d==null)try{d=this.interface.getEvent(f.topics[0])}catch{}if(d)try{return new Hv(f,this.interface,d)}catch(h){return new Vk(f,h)}return new Cd(f,u)})}async on(e,r){const n=await e8(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await e8(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await t2(this,e,r,null)}async listenerCount(e){if(e){const s=await ih(this,e);return s?s.listeners.length:0}const{subs:r}=xn(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await ih(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=xn(this);let n=[];for(const{listeners:s}of r.values())n=n.concat(s.map(({listener:i})=>i));return n}async off(e,r){const n=await ih(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(r==null||n.listeners.length===0)&&(n.stop(),xn(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await ih(this,e);if(!r)return this;r.stop(),xn(this).subs.delete(r.tag)}else{const{subs:r}=xn(this);for(const{tag:n,stop:s}of r.values())s(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends Wh{constructor(s,i=null){super(s,e,i)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};let Zf=Wh;function nie(){return Zf}class dn extends nie(){}class qk{constructor(e,r,n){_(this,"interface");_(this,"bytecode");_(this,"runner");const s=ut.from(e);r instanceof Uint8Array||(typeof r=="object"&&(r=r.object),r.startsWith("0x")||(r="0x"+r)),r=z(Q(r)),fe(this,{bytecode:r,interface:s,runner:n||null})}attach(e){return new Zf(e,this.interface,this.runner)}async getDeployTransaction(...e){let r={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(r=await Hk(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const s=await L7(this.runner,n.inputs,e),i=Fe([this.bytecode,this.interface.encodeDeploy(s)]);return Object.assign({},r,{data:i})}async deploy(...e){const r=await this.getDeployTransaction(...e);H(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(r),s=_k(n);return new Zf(s,this.interface,this.runner,n)}connect(e){return new qk(this.interface,this.bytecode,e)}static fromSolidity(e,r){I(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let s="";return e.bytecode?s=e.bytecode:e.evm&&e.evm.bytecode&&(s=e.evm.bytecode),new this(n,s,r)}}function _x(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):I(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class F7{constructor(e){_(this,"name");fe(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const U7=new RegExp("^(ipfs)://(.*)$","i"),t8=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),U7,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var Go,Mc,qo,Kl,Fg,$7;const mu=class mu{constructor(e,r,n){j(this,qo);_(this,"provider");_(this,"address");_(this,"name");j(this,Go);j(this,Mc);fe(this,{provider:e,address:r,name:n}),T(this,Go,null),T(this,Mc,new dn(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return w(this,Go)==null&&T(this,Go,(async()=>{try{return await w(this,Mc).supportsInterface("0x9061b923")}catch(e){if(Ft(e,"CALL_EXCEPTION"))return!1;throw T(this,Go,null),e}})()),await w(this,Go)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await Y(this,qo,Kl).call(this,"addr(bytes32)");return i==null||i===xi?null:i}catch(i){if(Ft(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let i=e+2147483648;const o=await Y(this,qo,Kl).call(this,"addr(bytes32,uint)",[i]);if(qe(o,20))return Ae(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof F7&&i.supportsCoinType(e)){r=i;break}if(r==null)return null;const n=await Y(this,qo,Kl).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const s=await r.decodeAddress(e,n);if(s!=null)return s;H(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await Y(this,qo,Kl).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await Y(this,qo,Kl).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=r[1]==="e3010170"?"ipfs":"ipns",i=parseInt(r[4],16);if(r[5].length===i*2)return`${s}://${mk("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;H(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function k1(t,e){return r=>{const n={};for(const s in t){let i=s;if(e&&s in e&&!(i in r)){for(const o of e[s])if(o in r){i=o;break}}try{const o=t[s](r[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";H(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function sie(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}I(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function ed(t){return I(qe(t,!0),"invalid data","value",t),t}function pr(t){return I(qe(t,32),"invalid hash","value",t),t}const iie=k1({address:Ae,blockHash:pr,blockNumber:Pe,data:ed,index:Pe,removed:ze(sie,!1),topics:Kv(pr),transactionHash:pr,transactionIndex:Pe},{index:["logIndex"]});function oie(t){return iie(t)}const aie=k1({hash:ze(pr),parentHash:pr,parentBeaconBlockRoot:ze(pr,null),number:Pe,timestamp:Pe,nonce:ze(ed),difficulty:xe,gasLimit:xe,gasUsed:xe,stateRoot:ze(pr,null),receiptsRoot:ze(pr,null),blobGasUsed:ze(xe,null),excessBlobGas:ze(xe,null),miner:ze(Ae),prevRandao:ze(pr,null),extraData:ed,baseFeePerGas:ze(xe)},{prevRandao:["mixHash"]});function cie(t){const e=aie(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:W7(r)),e}const lie=k1({transactionIndex:Pe,blockNumber:Pe,transactionHash:pr,address:Ae,topics:Kv(pr),data:ed,index:Pe,blockHash:pr},{index:["logIndex"]});function uie(t){return lie(t)}const fie=k1({to:ze(Ae,null),from:ze(Ae,null),contractAddress:ze(Ae,null),index:Pe,root:ze(z),gasUsed:xe,blobGasUsed:ze(xe,null),logsBloom:ze(ed),blockHash:pr,hash:pr,logs:Kv(uie),blockNumber:Pe,cumulativeGasUsed:xe,effectiveGasPrice:ze(xe),blobGasPrice:ze(xe,null),status:ze(Pe),type:ze(Pe,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function die(t){return fie(t)}function W7(t){t.to&&xe(t.to)===r8&&(t.to="0x0000000000000000000000000000000000000000");const e=k1({hash:pr,index:ze(Pe,void 0),type:r=>r==="0x"||r==null?0:Pe(r),accessList:ze(vo,null),blobVersionedHashes:ze(Kv(pr,!0),null),blockHash:ze(pr,null),blockNumber:ze(Pe,null),transactionIndex:ze(Pe,null),from:Ae,gasPrice:ze(xe),maxPriorityFeePerGas:ze(xe),maxFeePerGas:ze(xe),maxFeePerBlobGas:ze(xe,null),gasLimit:xe,to:ze(Ae,null),value:xe,nonce:Pe,data:ed,creates:ze(Ae,null),chainId:ze(xe,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=_k(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=cs.from(t.signature):e.signature=cs.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&xe(e.blockHash)===r8&&(e.blockHash=null),e}const hie="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class qa{constructor(e){_(this,"name");fe(this,{name:e})}clone(){return new qa(this.name)}}class S1 extends qa{constructor(r,n){r==null&&(r=0);super(`org.ethers.network.plugins.GasCost#${r||0}`);_(this,"effectiveBlock");_(this,"txBase");_(this,"txCreate");_(this,"txDataZero");_(this,"txDataNonzero");_(this,"txAccessListStorageKey");_(this,"txAccessListAddress");const s={effectiveBlock:r};function i(o,a){let c=(n||{})[o];c==null&&(c=a),I(typeof c=="number",`invalud value for ${o}`,"costs",n),s[o]=c}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),fe(this,s)}clone(){return new S1(this.effectiveBlock,this)}}class A1 extends qa{constructor(r,n){super("org.ethers.plugins.network.Ens");_(this,"address");_(this,"targetNetwork");fe(this,{address:r||hie,targetNetwork:n??1})}clone(){return new A1(this.address,this.targetNetwork)}}var Dc;const J5=class J5 extends qa{constructor(r){super("org.ethers.plugins.network.FeeData");j(this,Dc);T(this,Dc,r)}get feeDataFunc(){return w(this,Dc)}async getFeeData(r){return await w(this,Dc).call(this,r)}clone(){return new J5(w(this,Dc))}};Dc=new WeakMap;let r2=J5;var H0,G0;class V7 extends qa{constructor(r,n){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");j(this,H0);j(this,G0);T(this,H0,r),T(this,G0,n)}get url(){return w(this,H0)}get processFunc(){return w(this,G0)}clone(){return this}}H0=new WeakMap,G0=new WeakMap;const Mx=new Map;var df,hf,Ko;const xu=class xu{constructor(e,r){j(this,df);j(this,hf);j(this,Ko);T(this,df,e),T(this,hf,xe(r)),T(this,Ko,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return w(this,df)}set name(e){T(this,df,e)}get chainId(){return w(this,hf)}set chainId(e){T(this,hf,xe(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===xe(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===xe(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===xe(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(w(this,Ko).values())}attachPlugin(e){if(w(this,Ko).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return w(this,Ko).set(e.name,e.clone()),this}getPlugin(e){return w(this,Ko).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new xu(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new S1;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let s=2;s9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function s8(t){return new V7(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),e()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:n8(a.maxFee,9),maxPriorityFeePerGas:n8(a.maxPriorityFee,9)}}catch(i){H(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let i8=!1;function pie(){if(i8)return;i8=!0;function t(e,r,n){const s=function(){const i=new lt(e,r);return n.ensNetwork!=null&&i.attachPlugin(new A1(null,n.ensNetwork)),i.attachPlugin(new S1),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};lt.register(e,s),lt.register(r,s),n.altNames&&n.altNames.forEach(i=>{lt.register(i,s)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[s8("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[s8("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function n2(t){return JSON.parse(JSON.stringify(t))}var ji,Hn,Qo,ei,pf,ty;class yie{constructor(e){j(this,pf);j(this,ji);j(this,Hn);j(this,Qo);j(this,ei);T(this,ji,e),T(this,Hn,null),T(this,Qo,4e3),T(this,ei,-2)}get pollingInterval(){return w(this,Qo)}set pollingInterval(e){T(this,Qo,e)}start(){w(this,Hn)||(T(this,Hn,w(this,ji)._setTimeout(Y(this,pf,ty).bind(this),w(this,Qo))),Y(this,pf,ty).call(this))}stop(){w(this,Hn)&&(w(this,ji)._clearTimeout(w(this,Hn)),T(this,Hn,null))}pause(e){this.stop(),e&&T(this,ei,-2)}resume(){this.start()}}ji=new WeakMap,Hn=new WeakMap,Qo=new WeakMap,ei=new WeakMap,pf=new WeakSet,ty=async function(){try{const e=await w(this,ji).getBlockNumber();if(w(this,ei)===-2){T(this,ei,e);return}if(e!==w(this,ei)){for(let r=w(this,ei)+1;r<=e;r++){if(w(this,Hn)==null)return;await w(this,ji).emit("block",r)}T(this,ei,e)}}catch{}w(this,Hn)!=null&&T(this,Hn,w(this,ji)._setTimeout(Y(this,pf,ty).bind(this),w(this,Qo)))};var Bc,Lc,Jo;class Kk{constructor(e){j(this,Bc);j(this,Lc);j(this,Jo);T(this,Bc,e),T(this,Jo,!1),T(this,Lc,r=>{this._poll(r,w(this,Bc))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){w(this,Jo)||(T(this,Jo,!0),w(this,Lc).call(this,-2),w(this,Bc).on("block",w(this,Lc)))}stop(){w(this,Jo)&&(T(this,Jo,!1),w(this,Bc).off("block",w(this,Lc)))}pause(e){this.stop()}resume(){this.start()}}Bc=new WeakMap,Lc=new WeakMap,Jo=new WeakMap;var yf,Fi;class gie extends Kk{constructor(r,n){super(r);j(this,yf);j(this,Fi);T(this,yf,n),T(this,Fi,-2)}pause(r){r&&T(this,Fi,-2),super.pause(r)}async _poll(r,n){const s=await n.getBlock(w(this,yf));s!=null&&(w(this,Fi)===-2?T(this,Fi,s.number):s.number>w(this,Fi)&&(n.emit(w(this,yf),s.number),T(this,Fi,s.number)))}}yf=new WeakMap,Fi=new WeakMap;var Ug;class vie extends Kk{constructor(r,n){super(r);j(this,Ug);T(this,Ug,n2(n))}async _poll(r,n){throw new Error("@TODO")}}Ug=new WeakMap;var gf;class mie extends Kk{constructor(r,n){super(r);j(this,gf);T(this,gf,n)}async _poll(r,n){const s=await n.getTransactionReceipt(w(this,gf));s&&n.emit(w(this,gf),s)}}gf=new WeakMap;var Ui,vf,mf,Yo,Gn,$g,z7;class Qk{constructor(e,r){j(this,$g);j(this,Ui);j(this,vf);j(this,mf);j(this,Yo);j(this,Gn);T(this,Ui,e),T(this,vf,n2(r)),T(this,mf,Y(this,$g,z7).bind(this)),T(this,Yo,!1),T(this,Gn,-2)}start(){w(this,Yo)||(T(this,Yo,!0),w(this,Gn)===-2&&w(this,Ui).getBlockNumber().then(e=>{T(this,Gn,e)}),w(this,Ui).on("block",w(this,mf)))}stop(){w(this,Yo)&&(T(this,Yo,!1),w(this,Ui).off("block",w(this,mf)))}pause(e){this.stop(),e&&T(this,Gn,-2)}resume(){this.start()}}Ui=new WeakMap,vf=new WeakMap,mf=new WeakMap,Yo=new WeakMap,Gn=new WeakMap,$g=new WeakSet,z7=async function(e){if(w(this,Gn)===-2)return;const r=n2(w(this,vf));r.fromBlock=w(this,Gn)+1,r.toBlock=e;const n=await w(this,Ui).getLogs(r);if(n.length===0){w(this,Gn){if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class S0{constructor(e){_(this,"name");fe(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function wie(t){return JSON.parse(JSON.stringify(t))}function s2(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function Dx(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(qe(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:ry("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:ry("orphan",r),filter:wie(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?s2(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{qe(a)?s.push(a):i.push((async()=>{s.push(await sr(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),i.length&&await Promise.all(i),n.address=s2(s.map(a=>a.toLowerCase()))}return{filter:n,tag:ry("event",n),type:"event"}}I(!1,"unknown ProviderEvent","event",t)}function Bx(){return new Date().getTime()}const Eie={cacheTimeout:250,pollingInterval:4e3};var Ir,Xo,Pr,xf,Cn,jc,Zo,$i,q0,qn,bf,wf,je,vn,i2,o2,oh,a2,ah,ny;class td{constructor(e,r){j(this,je);j(this,Ir);j(this,Xo);j(this,Pr);j(this,xf);j(this,Cn);j(this,jc);j(this,Zo);j(this,$i);j(this,q0);j(this,qn);j(this,bf);j(this,wf);if(T(this,wf,Object.assign({},Eie,r||{})),e==="any")T(this,jc,!0),T(this,Cn,null);else if(e){const n=lt.from(e);T(this,jc,!1),T(this,Cn,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else T(this,jc,!1),T(this,Cn,null);T(this,$i,-1),T(this,Zo,new Map),T(this,Ir,new Map),T(this,Xo,new Map),T(this,Pr,null),T(this,xf,!1),T(this,q0,1),T(this,qn,new Map),T(this,bf,!1)}get pollingInterval(){return w(this,wf).pollingInterval}get provider(){return this}get plugins(){return Array.from(w(this,Xo).values())}attachPlugin(e){if(w(this,Xo).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return w(this,Xo).set(e.name,e.connect(this)),this}getPlugin(e){return w(this,Xo).get(e)||null}get disableCcipRead(){return w(this,bf)}set disableCcipRead(e){T(this,bf,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:f}}),o.push(f)}H(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new I7(cie(e),this)}_wrapLog(e,r){return new Cd(oie(e),this)}_wrapTransactionReceipt(e,r){return new Wk(die(e),this)}_wrapTransactionResponse(e,r){return new Xf(W7(e),this)}_detectNetwork(){H(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){H(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=Pe(await Y(this,je,vn).call(this,{method:"getBlockNumber"}),"%response");return w(this,$i)>=0&&T(this,$i,e),e}_getAddress(e){return sr(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(qe(e))return qe(e,32)?e:yr(e);if(typeof e=="bigint"&&(e=Pe(e,"blockTag")),typeof e=="number")return e>=0?yr(e):w(this,$i)>=0?yr(w(this,$i)+e):this.getBlockNumber().then(r=>yr(r+e));I(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?s2(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,s=(c,l,u)=>{let f;switch(c.length){case 0:break;case 1:f=c[0];break;default:c.sort(),f=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const d={};return f&&(d.address=f),r.length&&(d.topics=r),l&&(d.fromBlock=l),u&&(d.toBlock=u),n&&(d.blockHash=n),d};let i=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)i.push(this._getAddress(c));else i.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(e){const r=Yf(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=sr(r[s],this);xp(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);xp(s)?n.push(async function(){r.blockTag=await s}()):r.blockTag=s}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(w(this,Cn)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw w(this,Cn)===s&&T(this,Cn,null),i}})();return T(this,Cn,s),(await s).clone()}const e=w(this,Cn),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(w(this,jc)?(this.emit("network",n,r),w(this,Cn)===e&&T(this,Cn,Promise.resolve(n))):H(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await It({_block:Y(this,je,a2).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await Y(this,je,vn).call(this,{method:"getGasPrice"});return xe(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await Y(this,je,vn).call(this,{method:"getPriorityFee"});return xe(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(s,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*xie+c),new Zw(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new Gt(n.url),i=await n.processFunc(r,this,s);return new Zw(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return xp(r)&&(r=await r),xe(await Y(this,je,vn).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await It({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await Y(this,je,o2).call(this,Y(this,je,i2).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return xe(await Y(this,je,oh).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return Pe(await Y(this,je,oh).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return z(await Y(this,je,oh).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=xe(r,"position");return z(await Y(this,je,oh).call(this,{method:"getStorage",position:s},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:s}=await It({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=gl.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:s}=await It({network:this.getNetwork(),params:Y(this,je,a2).call(this,e,!!r)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(e){const{network:r,params:n}=await It({network:this.getNetwork(),params:Y(this,je,vn).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await It({network:this.getNetwork(),params:Y(this,je,vn).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await Y(this,je,vn).call(this,{method:"getTransaction",hash:e});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await It({network:this.getNetwork(),result:Y(this,je,vn).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:z(r)}async getLogs(e){let r=this._getFilter(e);xp(r)&&(r=await r);const{network:n,params:s}=await It({network:this.getNetwork(),params:Y(this,je,vn).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){H(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await k0.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Ae(e);const r=hg(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await k0.getEnsAddress(this),i=await new dn(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(i==null||i===xi)return null;const a=await new dn(i,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(a)!==e?null:a}catch(n){if(Ft(n,"BAD_DATA")&&n.value==="0x"||Ft(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const s=r??1;return s===0?this.getTransactionReceipt(e):new Promise(async(i,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=s){i(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(ht("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){H(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=w(this,qn).get(e);r&&(r.timer&&clearTimeout(r.timer),w(this,qn).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=Pl(this,q0)._++,s=()=>{w(this,qn).delete(n),e()};if(this.paused)w(this,qn).set(n,{timer:null,func:s,time:r});else{const i=setTimeout(s,r);w(this,qn).set(n,{timer:i,func:s,time:Bx()})}return n}_forEachSubscriber(e){for(const r of w(this,Ir).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new S0(e.type);case"block":{const r=new yie(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new gie(this,e.type);case"event":return new Qk(this,e.filter);case"transaction":return new mie(this,e.hash);case"orphan":return new vie(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of w(this,Ir).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),w(this,Pr)!=null&&r.pause(w(this,Pr));break}}async on(e,r){const n=await Y(this,je,ny).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,w(this,Pr)!=null&&n.subscriber.pause(w(this,Pr))),this}async once(e,r){const n=await Y(this,je,ny).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,w(this,Pr)!=null&&n.subscriber.pause(w(this,Pr))),this}async emit(e,...r){const n=await Y(this,je,ah).call(this,e,r);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new xk(this,o?null:i,e);try{i.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),w(this,Ir).delete(n.tag)),s>0}async listenerCount(e){if(e){const n=await Y(this,je,ah).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of w(this,Ir).values())r+=n.length;return r}async listeners(e){if(e){const n=await Y(this,je,ah).call(this,e);return n?n.listeners.map(({listener:s})=>s):[]}let r=[];for(const{listeners:n}of w(this,Ir).values())r=r.concat(n.map(({listener:s})=>s));return r}async off(e,r){const n=await Y(this,je,ah).call(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),w(this,Ir).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:s}=await Y(this,je,ny).call(this,e);n&&s.stop(),w(this,Ir).delete(r)}else for(const[r,{started:n,subscriber:s}]of w(this,Ir))n&&s.stop(),w(this,Ir).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return w(this,xf)}destroy(){this.removeAllListeners();for(const e of w(this,qn).keys())this._clearTimeout(e);T(this,xf,!0)}get paused(){return w(this,Pr)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(T(this,$i,-1),w(this,Pr)!=null){if(w(this,Pr)==!!e)return;H(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),T(this,Pr,!!e);for(const r of w(this,qn).values())r.timer&&clearTimeout(r.timer),r.time=Bx()-r.time}resume(){if(w(this,Pr)!=null){this._forEachSubscriber(e=>e.resume()),T(this,Pr,null);for(const e of w(this,qn).values()){let r=e.time;r<0&&(r=0),e.time=Bx(),setTimeout(e.func,r)}}}}Ir=new WeakMap,Xo=new WeakMap,Pr=new WeakMap,xf=new WeakMap,Cn=new WeakMap,jc=new WeakMap,Zo=new WeakMap,$i=new WeakMap,q0=new WeakMap,qn=new WeakMap,bf=new WeakMap,wf=new WeakMap,je=new WeakSet,vn=async function(e){const r=w(this,wf).cacheTimeout;if(r<0)return await this._perform(e);const n=ry(e.method,e);let s=w(this,Zo).get(n);return s||(s=this._perform(e),w(this,Zo).set(n,s),setTimeout(()=>{w(this,Zo).get(n)===s&&w(this,Zo).delete(n)},r)),await s},i2=async function(e,r,n){H(n=0&&r==="latest"&&s.to!=null&&at(i.data,0,4)==="0x556f1830"){const o=i.data,a=await sr(s.to,this);let c;try{c=Tie(at(i.data,4))}catch(f){H(!1,f.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:s,info:{data:o}})}H(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:s,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});const l=await this.ccipReadFetch(s,c.calldata,c.urls);H(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:s,info:{data:i.data,errorArgs:c.errorArgs}});const u={to:a,data:Fe([c.selector,Aie([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{const f=await Y(this,je,i2).call(this,u,r,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:f}),f}catch(f){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:f}),f}}throw i}},o2=async function(e){const{value:r}=await It({network:this.getNetwork(),value:e});return r},oh=async function(e,r,n){let s=this._getAddress(r),i=this._getBlockTag(n);return(typeof s!="string"||typeof i!="string")&&([s,i]=await Promise.all([s,i])),await Y(this,je,o2).call(this,Y(this,je,vn).call(this,Object.assign(e,{address:s,blockTag:i})))},a2=async function(e,r){if(qe(e,32))return await Y(this,je,vn).call(this,{method:"getBlock",blockHash:e,includeTransactions:r});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await Y(this,je,vn).call(this,{method:"getBlock",blockTag:n,includeTransactions:r})},ah=async function(e,r){let n=await Dx(e,this);return n.type==="event"&&r&&r.length>0&&r[0].removed===!0&&(n=await Dx({orphan:"drop-log",log:r[0]},this)),w(this,Ir).get(n.tag)||null},ny=async function(e){const r=await Dx(e,this),n=r.tag;let s=w(this,Ir).get(n);return s||(s={subscriber:this._getSubscriber(r),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},w(this,Ir).set(n,s)),s};function Cie(t,e){try{const r=c2(t,e);if(r)return Ds(r)}catch{}return null}function c2(t,e){if(t==="0x")return null;try{const r=Pe(at(t,e,e+32)),n=Pe(at(t,r,r+32));return at(t,r+32,r+32+n)}catch{}return null}function o8(t){const e=rr(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function kie(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const Sie=new Uint8Array([]);function Aie(t){const e=[];let r=0;for(let n=0;n=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=at(t,0,32);H(at(r,0,12)===at(a8,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=at(r,12);try{const n=[],s=Pe(at(t,32,64)),i=Pe(at(t,s,s+32)),o=at(t,s+32);for(let a=0;ae[n]),e}function Ll(t,e){if(t.provider)return t.provider;H(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function c8(t,e){let r=Yf(e);if(r.to!=null&&(r.to=sr(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),sr(n,t)]).then(([s,i])=>(I(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else r.from=t.getAddress();return await It(r)}class kd{constructor(e){_(this,"provider");fe(this,{provider:e||null})}async getNonce(e){return Ll(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await c8(this,e)}async populateTransaction(e){const r=Ll(this,"populateTransaction"),n=await c8(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=xe(n.chainId);I(o===s.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?I(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&i&&I(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();H(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(H(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):H(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await It(n)}async estimateGas(e){return Ll(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Ll(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Ll(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Ll(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const s=gl.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var Ef,sy;const Y5=class Y5 extends kd{constructor(r,n){super(n);j(this,Ef);_(this,"address");fe(this,{address:r})}async getAddress(){return this.address}connect(r){return new Y5(this.address,r)}async signTransaction(r){Y(this,Ef,sy).call(this,"transactions","signTransaction")}async signMessage(r){Y(this,Ef,sy).call(this,"messages","signMessage")}async signTypedData(r,n,s){Y(this,Ef,sy).call(this,"typed-data","signTypedData")}};Ef=new WeakSet,sy=function(r,n){H(!1,`VoidSigner cannot sign ${r}`,"UNSUPPORTED_OPERATION",{operation:n})};let yg=Y5;const l8=new Set;function Ka(t){l8.has(t)||(l8.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function Iie(t){return JSON.parse(JSON.stringify(t))}var Fr,ti,Fc,ea,Uc,Cf,Ma,l2,u2;class H7{constructor(e){j(this,Ma);j(this,Fr);j(this,ti);j(this,Fc);j(this,ea);j(this,Uc);j(this,Cf);T(this,Fr,e),T(this,ti,null),T(this,Fc,Y(this,Ma,l2).bind(this)),T(this,ea,!1),T(this,Uc,null),T(this,Cf,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){w(this,ea)||(T(this,ea,!0),Y(this,Ma,l2).call(this,-2))}stop(){w(this,ea)&&(T(this,ea,!1),T(this,Cf,!0),Y(this,Ma,u2).call(this),w(this,Fr).off("block",w(this,Fc)))}pause(e){e&&Y(this,Ma,u2).call(this),w(this,Fr).off("block",w(this,Fc))}resume(){this.start()}}Fr=new WeakMap,ti=new WeakMap,Fc=new WeakMap,ea=new WeakMap,Uc=new WeakMap,Cf=new WeakMap,Ma=new WeakSet,l2=async function(e){try{w(this,ti)==null&&T(this,ti,this._subscribe(w(this,Fr)));let r=null;try{r=await w(this,ti)}catch(i){if(!Ft(i,"UNSUPPORTED_OPERATION")||i.operation!=="eth_newFilter")throw i}if(r==null){T(this,ti,null),w(this,Fr)._recoverSubscriber(this,this._recover(w(this,Fr)));return}const n=await w(this,Fr).getNetwork();if(w(this,Uc)||T(this,Uc,n),w(this,Uc).chainId!==n.chainId)throw new Error("chaid changed");if(w(this,Cf))return;const s=await w(this,Fr).send("eth_getFilterChanges",[r]);await this._emitResults(w(this,Fr),s)}catch(r){console.log("@TODO",r)}w(this,Fr).once("block",w(this,Fc))},u2=function(){const e=w(this,ti);e&&(T(this,ti,null),e.then(r=>{w(this,Fr).destroyed||w(this,Fr).send("eth_uninstallFilter",[r])}))};var $c;class Pie extends H7{constructor(r,n){super(r);j(this,$c);T(this,$c,Iie(n))}_recover(r){return new Qk(r,w(this,$c))}async _subscribe(r){return await r.send("eth_newFilter",[w(this,$c)])}async _emitResults(r,n){for(const s of n)r.emit(w(this,$c),r._wrapLog(s,r._network))}}$c=new WeakMap;class Oie extends H7{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const Rie="bigint,boolean,function,number,string,symbol".split(/,/g);function iy(t){if(t==null||Rie.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(iy);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function Nie(t){return new Promise(e=>{setTimeout(e,t)})}function jl(t){return t&&t.toLowerCase()}function u8(t){return t&&typeof t.pollingInterval=="number"}const G7={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class oy extends kd{constructor(r,n){super(r);_(this,"address");n=Ae(n),fe(this,{address:n})}connect(r){H(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(r){return await this.populateCall(r)}async sendUncheckedTransaction(r){const n=iy(r),s=[];if(n.from){const o=n.from;s.push((async()=>{const a=await sr(o,this.provider);I(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=a})())}else n.from=this.address;if(n.gasLimit==null&&s.push((async()=>{n.gasLimit=await this.provider.estimateGas({...n,from:this.address})})()),n.to!=null){const o=n.to;s.push((async()=>{n.to=await sr(o,this.provider)})())}s.length&&await Promise.all(s);const i=this.provider.getRpcTransaction(n);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(r){const n=await this.provider.getBlockNumber(),s=await this.sendUncheckedTransaction(r);return await new Promise((i,o)=>{const a=[1e3,100];let c=0;const l=async()=>{try{const u=await this.provider.getTransaction(s);if(u!=null){i(u.replaceableTransaction(n));return}}catch(u){if(Ft(u,"CANCELLED")||Ft(u,"BAD_DATA")||Ft(u,"NETWORK_ERROR")||Ft(u,"UNSUPPORTED_OPERATION")){u.info==null&&(u.info={}),u.info.sendTransactionHash=s,o(u);return}if(Ft(u,"INVALID_ARGUMENT")&&(c++,u.info==null&&(u.info={}),u.info.sendTransactionHash=s,c>10)){o(u);return}this.provider.emit("error",ht("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:u}))}this.provider._setTimeout(()=>{l()},a.pop()||4e3)};l()})}async signTransaction(r){const n=iy(r);if(n.from){const i=await sr(n.from,this.provider);I(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",r),n.from=i}else n.from=this.address;const s=this.provider.getRpcTransaction(n);return await this.provider.send("eth_signTransaction",[s])}async signMessage(r){const n=typeof r=="string"?mt(r):r;return await this.provider.send("personal_sign",[z(n),this.address.toLowerCase()])}async signTypedData(r,n,s){const i=iy(s),o=await Bs.resolveNames(r,n,i,async a=>{const c=await sr(a);return I(c!=null,"TypedData does not support null address","value",a),c});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Bs.getPayload(o.domain,n,o.value))])}async unlock(r){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),r,null])}async _legacySignMessage(r){const n=typeof r=="string"?mt(r):r;return await this.provider.send("eth_sign",[this.address.toLowerCase(),z(n)])}}var Wc,kf,Wi,ri,bs,Kn,nn,K0,f2;class Jk extends td{constructor(r,n){super(r,n);j(this,K0);j(this,Wc);j(this,kf);j(this,Wi);j(this,ri);j(this,bs);j(this,Kn);j(this,nn);T(this,kf,1),T(this,Wc,Object.assign({},G7,n||{})),T(this,Wi,[]),T(this,ri,null),T(this,Kn,null),T(this,nn,null);{let i=null;const o=new Promise(a=>{i=a});T(this,bs,{promise:o,resolve:i})}const s=this._getOption("staticNetwork");typeof s=="boolean"?(I(!s||r!=="any","staticNetwork cannot be used on special network 'any'","options",n),s&&r!=null&&T(this,Kn,lt.from(r))):s&&(I(r==null||s.matches(r),"staticNetwork MUST match network object","options",n),T(this,Kn,s))}_getOption(r){return w(this,Wc)[r]}get _network(){return H(w(this,Kn),"network is not available yet","NETWORK_ERROR"),w(this,Kn)}async _perform(r){if(r.method==="call"||r.method==="estimateGas"){let s=r.transaction;if(s&&s.type!=null&&xe(s.type)&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Object.assign({},r,{transaction:Object.assign({},s,{type:void 0})}))}}const n=this.getRpcRequest(r);return n!=null?await this.send(n.method,n.args):super._perform(r)}async _detectNetwork(){const r=this._getOption("staticNetwork");if(r)if(r===!0){if(w(this,Kn))return w(this,Kn)}else return r;return w(this,nn)?await w(this,nn):this.ready?(T(this,nn,(async()=>{try{const n=lt.from(xe(await this.send("eth_chainId",[])));return T(this,nn,null),n}catch(n){throw T(this,nn,null),n}})()),await w(this,nn)):(T(this,nn,(async()=>{const n={id:Pl(this,kf)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:n});let s;try{s=(await this._send(n))[0],T(this,nn,null)}catch(i){throw T(this,nn,null),this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:s}),"result"in s)return lt.from(xe(s.result));throw this.getRpcError(n,s)})()),await w(this,nn))}_start(){w(this,bs)==null||w(this,bs).resolve==null||(w(this,bs).resolve(),T(this,bs,null),(async()=>{for(;w(this,Kn)==null&&!this.destroyed;)try{T(this,Kn,await this._detectNetwork())}catch(r){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",ht("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:r}})),await Nie(1e3)}Y(this,K0,f2).call(this)})())}async _waitUntilReady(){if(w(this,bs)!=null)return await w(this,bs).promise}_getSubscriber(r){return r.type==="pending"?new Oie(this):r.type==="event"?this._getOption("polling")?new Qk(this,r.filter):new Pie(this,r.filter):r.type==="orphan"&&r.filter.orphan==="drop-log"?new S0("orphan"):super._getSubscriber(r)}get ready(){return w(this,bs)==null}getRpcTransaction(r){const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(s=>{if(r[s]==null)return;let i=s;s==="gasLimit"&&(i="gas"),n[i]=yr(xe(r[s],`tx.${s}`))}),["from","to","data"].forEach(s=>{r[s]!=null&&(n[s]=z(r[s]))}),r.accessList&&(n.accessList=vo(r.accessList)),r.blobVersionedHashes&&(n.blobVersionedHashes=r.blobVersionedHashes.map(s=>s.toLowerCase())),n}getRpcRequest(r){switch(r.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[jl(r.address),r.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[jl(r.address),r.blockTag]};case"getCode":return{method:"eth_getCode",args:[jl(r.address),r.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[jl(r.address),"0x"+r.position.toString(16),r.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[r.signedTransaction]};case"getBlock":if("blockTag"in r)return{method:"eth_getBlockByNumber",args:[r.blockTag,!!r.includeTransactions]};if("blockHash"in r)return{method:"eth_getBlockByHash",args:[r.blockHash,!!r.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[r.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[r.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(r.transaction),r.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(r.transaction)]};case"getLogs":return r.filter&&r.filter.address!=null&&(Array.isArray(r.filter.address)?r.filter.address=r.filter.address.map(jl):r.filter.address=jl(r.filter.address)),{method:"eth_getLogs",args:[r.filter]}}return null}getRpcError(r,n){const{method:s}=r,{error:i}=n;if(s==="eth_estimateGas"&&i.message){const c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return ht("insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.params[0],info:{payload:r,error:i}})}if(s==="eth_call"||s==="eth_estimateGas"){const c=d2(i),l=qt.getBuiltinCallException(s==="eth_call"?"call":"estimateGas",r.params[0],c?c.data:null);return l.info={error:i,payload:r},l}const o=JSON.stringify(_ie(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return ht("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[s]||"unknown",reason:"rejected",info:{payload:r,error:i}});if(s==="eth_sendRawTransaction"||s==="eth_sendTransaction"){const c=r.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return ht("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return ht("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return ht("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return ht("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:s,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?ht("unsupported operation","UNSUPPORTED_OPERATION",{operation:r.method,info:{error:i,payload:r}}):ht("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:r})}send(r,n){if(this.destroyed)return Promise.reject(ht("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r}));const s=Pl(this,kf)._++,i=new Promise((o,a)=>{w(this,Wi).push({resolve:o,reject:a,payload:{method:r,params:n,id:s,jsonrpc:"2.0"}})});return Y(this,K0,f2).call(this),i}async getSigner(r){r==null&&(r=0);const n=this.send("eth_accounts",[]);if(typeof r=="number"){const i=await n;if(r>=i.length)throw new Error("no such account");return new oy(this,i[r])}const{accounts:s}=await It({network:this.getNetwork(),accounts:n});r=Ae(r);for(const i of s)if(Ae(i)===r)return new oy(this,r);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(n=>new oy(this,n))}destroy(){w(this,ri)&&(clearTimeout(w(this,ri)),T(this,ri,null));for(const{payload:r,reject:n}of w(this,Wi))n(ht("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:r.method}));T(this,Wi,[]),super.destroy()}}Wc=new WeakMap,kf=new WeakMap,Wi=new WeakMap,ri=new WeakMap,bs=new WeakMap,Kn=new WeakMap,nn=new WeakMap,K0=new WeakSet,f2=function(){if(w(this,ri))return;const r=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");T(this,ri,setTimeout(()=>{T(this,ri,null);const n=w(this,Wi);for(T(this,Wi,[]);n.length;){const s=[n.shift()];for(;n.length&&s.length!==w(this,Wc).batchMaxCount;)if(s.push(n.shift()),JSON.stringify(s.map(o=>o.payload)).length>w(this,Wc).batchMaxSize){n.unshift(s.pop());break}(async()=>{const i=s.length===1?s[0].payload:s.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:c,payload:l}of s){if(this.destroyed){c(ht("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const u=o.filter(f=>f.id===l.id)[0];if(u==null){const f=ht("missing response for request","BAD_DATA",{value:o,info:{payload:l}});this.emit("error",f),c(f);continue}if("error"in u){c(this.getRpcError(l,u));continue}a(u.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of s)a(o)}})()}},r))};var ta;class q7 extends Jk{constructor(r,n){super(r,n);j(this,ta);let s=this._getOption("pollingInterval");s==null&&(s=G7.pollingInterval),T(this,ta,s)}_getSubscriber(r){const n=super._getSubscriber(r);return u8(n)&&(n.pollingInterval=w(this,ta)),n}get pollingInterval(){return w(this,ta)}set pollingInterval(r){if(!Number.isInteger(r)||r<0)throw new Error("invalid interval");T(this,ta,r),this._forEachSubscriber(n=>{u8(n)&&(n.pollingInterval=w(this,ta))})}}ta=new WeakMap;var Sf,G8;let cr=(G8=class extends q7{constructor(r,n,s){r==null&&(r="http://localhost:8545");super(n,s);j(this,Sf);typeof r=="string"?T(this,Sf,new Gt(r)):T(this,Sf,r.clone())}_getConnection(){return w(this,Sf).clone()}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){const n=this._getConnection();n.body=JSON.stringify(r),n.setHeader("content-type","application/json");const s=await n.send();s.assertOk();let i=s.bodyJson;return Array.isArray(i)||(i=[i]),i}},Sf=new WeakMap,G8);function d2(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&qe(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=d2(t[e]);if(r)return r}return null}if(typeof t=="string")try{return d2(JSON.parse(t))}catch{}return null}function h2(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)h2(t[r],e);if(typeof t=="string")try{return h2(JSON.parse(t),e)}catch{}}}function _ie(t){const e=[];return h2(t,e),e}const bp="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Mie(t){switch(t){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}I(!1,"unsupported network","network",t)}class A0 extends cr{constructor(r,n){r==null&&(r="mainnet");const s=lt.from(r);n==null&&(n=bp);const i={polling:!0,staticNetwork:s},o=A0.getRequest(s,n);super(o,s,i);_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new A0(r,this.apiKey)}catch{}return super._getProvider(r)}static getRequest(r,n){n==null&&(n=bp);const s=new Gt(`https://${Mie(r.name)}/${n}`);return s.allowGzip=!0,n===bp&&(s.retryFunc=async(i,o,a)=>(Ka("AnkrProvider"),!0)),s}getRpcError(r,n){return r.method==="eth_sendRawTransaction"&&n&&n.error&&n.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(n.error.message="replacement transaction underpriced"),super.getRpcError(r,n)}isCommunityResource(){return this.apiKey===bp}}const wp="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function Die(t){switch(t){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}I(!1,"unsupported network","network",t)}class T0 extends cr{constructor(r,n){r==null&&(r="mainnet");const s=lt.from(r);n==null&&(n=wp);const i=T0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new T0(r,this.apiKey)}catch{}return super._getProvider(r)}async _perform(r){if(r.method==="getTransactionResult"){const{trace:n,tx:s}=await It({trace:this.send("trace_transaction",[r.hash]),tx:this.getTransaction(r.hash)});if(n==null||s==null)return null;let i,o=!1;try{i=n[0].result.output,o=n[0].error==="Reverted"}catch{}if(i)return H(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:s,invocation:null,revert:null}),i;H(!1,"could not parse trace result","BAD_DATA",{value:n})}return await super._perform(r)}isCommunityResource(){return this.apiKey===wp}static getRequest(r,n){n==null&&(n=wp);const s=new Gt(`https://${Die(r.name)}/v2/${n}`);return s.allowGzip=!0,n===wp&&(s.retryFunc=async(i,o,a)=>(Ka("alchemy"),!0)),s}}function Ep(t){switch(t){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}I(!1,"unsupported network","network",t)}function Bie(t){switch(t){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}I(!1,"unsupported network","network",t)}class I0 extends cr{constructor(r,n){r==null&&(r="mainnet");const s=lt.from(r);n==null&&(n=Ep(s.name));const i=I0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"apiKey");fe(this,{apiKey:n})}_getProvider(r){try{return new I0(r,this.apiKey)}catch{}return super._getProvider(r)}isCommunityResource(){return this.apiKey===Ep(this._network.name)}static getRequest(r,n){n==null&&(n=Ep(r.name));const s=new Gt(`https://${Bie(r.name)}/${n}`);return s.allowGzip=!0,n===Ep(r.name)&&(s.retryFunc=async(i,o,a)=>(Ka("ChainstackProvider"),!0)),s}}class K7 extends cr{constructor(e){e==null&&(e="mainnet");const r=lt.from(e);I(r.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",r,{staticNetwork:r})}}const f8=2e3;function Lie(t){return t&&typeof t.then=="function"}const Q7="org.ethers.plugins.provider.Etherscan";class Yk extends qa{constructor(r){super(Q7);_(this,"baseUrl");fe(this,{baseUrl:r})}clone(){return new Yk(this.baseUrl)}}const jie=["enableCcipRead"];let Fie=1;var Af;class J7 extends td{constructor(r,n){const s=n??null;super();_(this,"network");_(this,"apiKey");j(this,Af);const i=lt.from(r);T(this,Af,i.getPlugin(Q7)),fe(this,{apiKey:s,network:i}),this.getBaseUrl()}getBaseUrl(){if(w(this,Af))return w(this,Af).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}I(!1,"unsupported network","network",this.network)}getUrl(r,n){const s=Object.keys(n).reduce((o,a)=>{const c=n[a];return c!=null&&(o+=`&${a}=${c}`),o},""),i=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${r}${s}${i}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(r,n){return n.module=r,n.apikey=this.apiKey,n}async detectNetwork(){return this.network}async fetch(r,n,s){const i=Fie++,o=s?this.getPostUrl():this.getUrl(r,n),a=s?this.getPostData(r,n):null;this.emit("debug",{action:"sendRequest",id:i,url:o,payload:a});const c=new Gt(o);c.setThrottleParams({slotInterval:1e3}),c.retryFunc=(f,d,h)=>(this.isCommunityResource()&&Ka("Etherscan"),Promise.resolve(!0)),c.processFunc=async(f,d)=>{const h=d.hasBody()?JSON.parse(Ds(d.body)):{},y=(typeof h.result=="string"?h.result:"").toLowerCase().indexOf("rate limit")>=0;return r==="proxy"?h&&h.status==0&&h.message=="NOTOK"&&y&&(this.emit("debug",{action:"receiveError",id:i,reason:"proxy-NOTOK",error:h}),d.throwThrottleError(h.result,f8)):y&&(this.emit("debug",{action:"receiveError",id:i,reason:"null result",error:h.result}),d.throwThrottleError(h.result,f8)),d},a&&(c.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),c.body=Object.keys(a).map(f=>`${f}=${a[f]}`).join("&"));const l=await c.send();try{l.assertOk()}catch(f){this.emit("debug",{action:"receiveError",id:i,error:f,reason:"assertOk"}),H(!1,"response error","SERVER_ERROR",{request:c,response:l})}l.hasBody()||(this.emit("debug",{action:"receiveError",id:i,error:"missing body",reason:"null body"}),H(!1,"missing response","SERVER_ERROR",{request:c,response:l}));const u=JSON.parse(Ds(l.body));return r==="proxy"?(u.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:i,result:u,reason:"invalid JSON-RPC"}),H(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:c,response:l,info:{result:u}})),u.error&&(this.emit("debug",{action:"receiveError",id:i,result:u,reason:"JSON-RPC error"}),H(!1,"error response","SERVER_ERROR",{request:c,response:l,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result):u.status==0&&(u.message==="No records found"||u.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result):((u.status!=1||typeof u.message=="string"&&!u.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:i,result:u}),H(!1,"error response","SERVER_ERROR",{request:c,response:l,info:{result:u}})),this.emit("debug",{action:"receiveRequest",id:i,result:u}),u.result)}_getTransactionPostData(r){const n={};for(let s in r){if(jie.indexOf(s)>=0||r[s]==null)continue;let i=r[s];if(!(s==="type"&&i===0)&&!(s==="blockTag"&&i==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[s])i=yr(i);else if(s==="accessList")i="["+vo(i).map(o=>`{address:"${o.address}",storageKeys:["${o.storageKeys.join('","')}"]}`).join(",")+"]";else if(s==="blobVersionedHashes"){if(i.length===0)continue;H(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:r}})}else i=z(i);n[s]=i}}return n}_checkError(r,n,s){let i="";if(Ft(n,"SERVER_ERROR")){try{i=n.info.result.error.message}catch{}if(!i)try{i=n.info.message}catch{}}if(r.method==="estimateGas"&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&H(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:r.transaction}),(r.method==="call"||r.method==="estimateGas")&&i.match(/execution reverted/i)){let o="";try{o=n.info.result.error.data}catch{}const a=qt.getBuiltinCallException(r.method,r.transaction,o);throw a.info={request:r,error:n},a}if(i&&r.method==="broadcastTransaction"){const o=gl.from(r.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&H(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:o}),i.match(/insufficient funds/)&&H(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:o}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&H(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:o})}throw n}async _detectNetwork(){return this.network}async _perform(r){switch(r.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:r.address,tag:r.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:r.address,tag:r.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:r.address,tag:r.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:r.address,position:r.position,tag:r.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:r.signedTransaction},!0).catch(n=>this._checkError(r,n,r.signedTransaction));case"getBlock":if("blockTag"in r)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:r.blockTag,boolean:r.includeTransactions?"true":"false"});H(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:r.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:r.hash});case"call":{if(r.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const n=this._getTransactionPostData(r.transaction);n.module="proxy",n.action="eth_call";try{return await this.fetch("proxy",n,!0)}catch(s){return this._checkError(r,s,r.transaction)}}case"estimateGas":{const n=this._getTransactionPostData(r.transaction);n.module="proxy",n.action="eth_estimateGas";try{return await this.fetch("proxy",n,!0)}catch(s){return this._checkError(r,s,r.transaction)}}}return super._perform(r)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(r){let n=this._getAddress(r);Lie(n)&&(n=await n);try{const s=await this.fetch("contract",{action:"getabi",address:n}),i=JSON.parse(s);return new dn(n,i,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}Af=new WeakMap;function Uie(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const $ie=Uie().WebSocket;var ni,Q0,ra,Vc,na;class Qv{constructor(e,r){j(this,ni);j(this,Q0);j(this,ra);j(this,Vc);j(this,na);T(this,ni,e),T(this,Q0,JSON.stringify(r)),T(this,ra,null),T(this,Vc,null),T(this,na,null)}get filter(){return JSON.parse(w(this,Q0))}start(){T(this,ra,w(this,ni).send("eth_subscribe",this.filter).then(e=>(w(this,ni)._register(e,this),e)))}stop(){w(this,ra).then(e=>{w(this,ni).destroyed||w(this,ni).send("eth_unsubscribe",[e])}),T(this,ra,null)}pause(e){H(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),T(this,Vc,!!e)}resume(){T(this,Vc,null)}_handleMessage(e){if(w(this,ra)!=null&&w(this,Vc)===null){let r=w(this,na);r==null?r=this._emit(w(this,ni),e):r=r.then(async()=>{await this._emit(w(this,ni),e)}),T(this,na,r.then(()=>{w(this,na)===r&&T(this,na,null)}))}}async _emit(e,r){throw new Error("sub-classes must implemente this; _emit")}}ni=new WeakMap,Q0=new WeakMap,ra=new WeakMap,Vc=new WeakMap,na=new WeakMap;class Y7 extends Qv{constructor(e){super(e,["newHeads"])}async _emit(e,r){e.emit("block",parseInt(r.number))}}class X7 extends Qv{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,r){e.emit("pending",r)}}var J0;class Z7 extends Qv{constructor(r,n){super(r,["logs",n]);j(this,J0);T(this,J0,JSON.stringify(n))}get logFilter(){return JSON.parse(w(this,J0))}async _emit(r,n){r.emit(this.logFilter,r._wrapLog(n,r._network))}}J0=new WeakMap;var zc,Tf,sa;class e_ extends Jk{constructor(r,n){const s=Object.assign({},n??{});I(s.batchMaxCount==null||s.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",n),s.batchMaxCount=1,s.staticNetwork==null&&(s.staticNetwork=!0);super(r,s);j(this,zc);j(this,Tf);j(this,sa);T(this,zc,new Map),T(this,Tf,new Map),T(this,sa,new Map)}_getSubscriber(r){switch(r.type){case"close":return new S0("close");case"block":return new Y7(this);case"pending":return new X7(this);case"event":return new Z7(this,r.filter);case"orphan":if(r.filter.orphan==="drop-log")return new S0("drop-log")}return super._getSubscriber(r)}_register(r,n){w(this,Tf).set(r,n);const s=w(this,sa).get(r);if(s){for(const i of s)n._handleMessage(i);w(this,sa).delete(r)}}async _send(r){I(!Array.isArray(r),"WebSocket does not support batch send","payload",r);const n=new Promise((s,i)=>{w(this,zc).set(r.id,{payload:r,resolve:s,reject:i})});return await this._waitUntilReady(),await this._write(JSON.stringify(r)),[await n]}async _processMessage(r){const n=JSON.parse(r);if(n&&typeof n=="object"&&"id"in n){const s=w(this,zc).get(n.id);if(s==null){this.emit("error",ht("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:n}));return}w(this,zc).delete(n.id),s.resolve(n)}else if(n&&n.method==="eth_subscription"){const s=n.params.subscription,i=w(this,Tf).get(s);if(i)i._handleMessage(n.params.result);else{let o=w(this,sa).get(s);o==null&&(o=[],w(this,sa).set(s,o)),o.push(n.params.result)}}else{this.emit("error",ht("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:n}));return}}async _write(r){throw new Error("sub-classes must override this")}}zc=new WeakMap,Tf=new WeakMap,sa=new WeakMap;var Hc,ws;class Xk extends e_{constructor(r,n,s){super(n,s);j(this,Hc);j(this,ws);typeof r=="string"?(T(this,Hc,()=>new $ie(r)),T(this,ws,w(this,Hc).call(this))):typeof r=="function"?(T(this,Hc,r),T(this,ws,r())):(T(this,Hc,null),T(this,ws,r)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(i){console.log("failed to start WebsocketProvider",i)}},this.websocket.onmessage=i=>{this._processMessage(i.data)}}get websocket(){if(w(this,ws)==null)throw new Error("websocket closed");return w(this,ws)}async _write(r){this.websocket.send(r)}async destroy(){w(this,ws)!=null&&(w(this,ws).close(),T(this,ws,null)),super.destroy()}}Hc=new WeakMap,ws=new WeakMap;const ch="84842078b09946638c03157f83405213";function Wie(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}I(!1,"unsupported network","network",t)}class t_ extends Xk{constructor(r,n){const s=new rd(r,n),i=s._getConnection();H(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const o=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(o,s._network);_(this,"projectId");_(this,"projectSecret");fe(this,{projectId:s.projectId,projectSecret:s.projectSecret})}isCommunityResource(){return this.projectId===ch}}class rd extends cr{constructor(r,n,s){r==null&&(r="mainnet");const i=lt.from(r);n==null&&(n=ch),s==null&&(s=null);const o=rd.getRequest(i,n,s);super(o,i,{staticNetwork:i});_(this,"projectId");_(this,"projectSecret");fe(this,{projectId:n,projectSecret:s})}_getProvider(r){try{return new rd(r,this.projectId,this.projectSecret)}catch{}return super._getProvider(r)}isCommunityResource(){return this.projectId===ch}static getWebSocketProvider(r,n){return new t_(r,n)}static getRequest(r,n,s){n==null&&(n=ch),s==null&&(s=null);const i=new Gt(`https://${Wie(r.name)}/v3/${n}`);return i.allowGzip=!0,s&&i.setCredentials("",s),n===ch&&(i.retryFunc=async(o,a,c)=>(Ka("InfuraProvider"),!0)),i}}const Cp="919b412a057b5e9c9b6dce193c5a60242d6efadb";function Vie(t){switch(t){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}I(!1,"unsupported network","network",t)}class P0 extends cr{constructor(r,n){r==null&&(r="mainnet");const s=lt.from(r);n==null&&(n=Cp);const i=P0.getRequest(s,n);super(i,s,{staticNetwork:s});_(this,"token");fe(this,{token:n})}_getProvider(r){try{return new P0(r,this.token)}catch{}return super._getProvider(r)}isCommunityResource(){return this.token===Cp}static getRequest(r,n){n==null&&(n=Cp);const s=new Gt(`https://${Vie(r.name)}/${n}`);return s.allowGzip=!0,n===Cp&&(s.retryFunc=async(i,o,a)=>(Ka("QuickNodeProvider"),!0)),s}}const zie=BigInt("1"),Hie=BigInt("2");function Gie(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}}function qie(t){return new Promise(e=>{setTimeout(e,t)})}function p2(){return new Date().getTime()}function Lx(t){return JSON.stringify(t,(e,r)=>typeof r=="bigint"?{type:"bigint",value:r.toString()}:r)}const d8={stallTimeout:400,priority:1,weight:1},h8={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function Kie(t,e){for(;(t.blockNumber<0||t.blockNumber{try{const r=await t.provider.getBlockNumber();r>t.blockNumber&&(t.blockNumber=r)}catch(r){t.blockNumber=-2,t._lastFatalError=r,t._lastFatalErrorTimestamp=p2()}t._updateNumber=null})()),await t._updateNumber,t.outOfSync++,!t._lastFatalError););}function Oh(t){if(t==null)return"null";if(Array.isArray(t))return"["+t.map(Oh).join(",")+"]";if(typeof t=="object"&&typeof t.toJSON=="function")return Oh(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":case"number":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{"+e.map(r=>`${JSON.stringify(r)}:${Oh(t[r])}`).join(",")+"}"}}throw console.log("Could not serialize",t),new Error("Hmm...")}function jx(t){if("error"in t){const r=t.error;return{tag:Oh(r),value:r}}const e=t.result;return{tag:Oh(e),value:e}}function ay(t,e){const r=new Map;for(const{value:s,tag:i,weight:o}of e){const a=r.get(i)||{value:s,weight:0};a.weight+=o,r.set(i,a)}let n=null;for(const s of r.values())s.weight>=t&&(!n||s.weight>n.weight)&&(n=s);if(n)return n.value}function y2(t,e){let r=0;const n=new Map;let s=null;const i=[];for(const{value:a,tag:c,weight:l}of e)if(a instanceof Error){const u=n.get(c)||{value:a,weight:0};u.weight+=l,n.set(c,u),(s==null||u.weight>s.weight)&&(s=u)}else i.push(BigInt(a)),r+=l;if(r=t?s.value:void 0;i.sort((a,c)=>aa?1:0);const o=Math.floor(i.length/2);return i.length%2?i[o]:(i[o-1]+i[o]+zie)/Hie}function Fx(t,e){const r=ay(t,e);if(r!==void 0)return r;for(const n of e)if(n.value)return n.value}function Qie(t,e){if(t===1)return Pe(y2(t,e),"%internal");const r=new Map,n=(o,a)=>{const c=r.get(o)||{result:o,weight:0};c.weight+=a,r.set(o,c)};for(const{weight:o,value:a}of e){const c=Pe(a);n(c-1,o),n(c,o),n(c+1,o)}let s=0,i;for(const{weight:o,result:a}of r.values())o>=t&&(o>s||i!=null&&o===s&&a>i)&&(s=o,i=a);return i}var sn,Vi,If,yn,n_,g2,s_,i_,v2;class r_ extends td{constructor(r,n,s){super(n,s);j(this,yn);_(this,"quorum");_(this,"eventQuorum");_(this,"eventWorkers");j(this,sn);j(this,Vi);j(this,If);T(this,sn,r.map(i=>i instanceof td?Object.assign({provider:i},d8,h8):Object.assign({},d8,i,h8))),T(this,Vi,-2),T(this,If,null),s&&s.quorum!=null?this.quorum=s.quorum:this.quorum=Math.ceil(w(this,sn).reduce((i,o)=>(i+=o.weight,i),0)/2),this.eventQuorum=1,this.eventWorkers=1,I(this.quorum<=w(this,sn).reduce((i,o)=>i+o.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return w(this,sn).map(r=>{const n=Object.assign({},r);for(const s in n)s[0]==="_"&&delete n[s];return n})}async _detectNetwork(){return lt.from(xe(await this._perform({method:"chainId"})))}async _translatePerform(r,n){switch(n.method){case"broadcastTransaction":return await r.broadcastTransaction(n.signedTransaction);case"call":return await r.call(Object.assign({},n.transaction,{blockTag:n.blockTag}));case"chainId":return(await r.getNetwork()).chainId;case"estimateGas":return await r.estimateGas(n.transaction);case"getBalance":return await r.getBalance(n.address,n.blockTag);case"getBlock":{const s="blockHash"in n?n.blockHash:n.blockTag;return await r.getBlock(s,n.includeTransactions)}case"getBlockNumber":return await r.getBlockNumber();case"getCode":return await r.getCode(n.address,n.blockTag);case"getGasPrice":return(await r.getFeeData()).gasPrice;case"getPriorityFee":return(await r.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await r.getLogs(n.filter);case"getStorage":return await r.getStorage(n.address,n.position,n.blockTag);case"getTransaction":return await r.getTransaction(n.hash);case"getTransactionCount":return await r.getTransactionCount(n.address,n.blockTag);case"getTransactionReceipt":return await r.getTransactionReceipt(n.hash);case"getTransactionResult":return await r.getTransactionResult(n.hash)}}async _perform(r){if(r.method==="broadcastTransaction"){const o=w(this,sn).map(l=>null),a=w(this,sn).map(async({provider:l,weight:u},f)=>{try{const d=await l._perform(r);o[f]=Object.assign(jx({result:d}),{weight:u})}catch(d){o[f]=Object.assign(jx({error:d}),{weight:u})}});for(;;){const l=o.filter(d=>d!=null);for(const{value:d}of l)if(!(d instanceof Error))return d;const u=ay(this.quorum,o.filter(d=>d!=null));if(Ft(u,"INSUFFICIENT_FUNDS"))throw u;const f=a.filter((d,h)=>o[h]==null);if(f.length===0)break;await Promise.race(f)}const c=Fx(this.quorum,o);if(H(c!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:r,results:o.map(Lx)}}),c instanceof Error)throw c;return c}await Y(this,yn,s_).call(this);const n=new Set;let s=0;for(;;){const o=Y(this,yn,g2).call(this,n,r);if(o==null||(s+=o.config.weight,s>=this.quorum))break}const i=await Y(this,yn,v2).call(this,n,r);for(const o of n)o.perform&&o.result==null&&o.config.lateResponses++;return i}async destroy(){for(const{provider:r}of w(this,sn))r.destroy();super.destroy()}}sn=new WeakMap,Vi=new WeakMap,If=new WeakMap,yn=new WeakSet,n_=function(r){const n=Array.from(r).map(i=>i.config),s=w(this,sn).slice();Gie(s),s.sort((i,o)=>i.priority-o.priority);for(const i of s)if(!i._lastFatalError&&n.indexOf(i)===-1)return i;return null},g2=function(r,n){const s=Y(this,yn,n_).call(this,r);if(s==null)return null;const i={config:s,result:null,didBump:!1,perform:null,staller:null},o=p2();return i.perform=(async()=>{try{s.requests++;const c=await this._translatePerform(s.provider,n);i.result={result:c}}catch(c){s.errorResponses++,i.result={error:c}}const a=p2()-o;s._totalTime+=a,s.rollingDuration=.95*s.rollingDuration+.05*a,i.perform=null})(),i.staller=(async()=>{await qie(s.stallTimeout),i.staller=null})(),r.add(i),i},s_=async function(){let r=w(this,If);if(!r){const n=[];w(this,sn).forEach(s=>{n.push((async()=>{await Kie(s,0),s._lastFatalError||(s._network=await s.provider.getNetwork())})())}),T(this,If,r=(async()=>{await Promise.all(n);let s=null;for(const i of w(this,sn)){if(i._lastFatalError)continue;const o=i._network;s==null?s=o.chainId:o.chainId!==s&&H(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await r},i_=async function(r,n){const s=[];for(const i of r)if(i.result!=null){const{tag:o,value:a}=jx(i.result);s.push({tag:o,value:a,weight:i.config.weight})}if(!(s.reduce((i,o)=>i+o.weight,0)!o._lastFatalError).map(o=>({value:o.blockNumber,tag:Pe(o.blockNumber).toString(),weight:o.weight}))))));const i=Qie(this.quorum,s);return i===void 0?void 0:(i>w(this,Vi)&&T(this,Vi,i),w(this,Vi))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return y2(this.quorum,s);case"getBlock":return"blockTag"in n&&n.blockTag==="pending"?Fx(this.quorum,s):ay(this.quorum,s);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return ay(this.quorum,s);case"broadcastTransaction":return Fx(this.quorum,s)}H(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${Lx(n.method)})`})}},v2=async function(r,n){if(r.size===0)throw new Error("no runners?!");const s=[];let i=0;for(const a of r){if(a.perform&&s.push(a.perform),a.staller){s.push(a.staller);continue}a.didBump||(a.didBump=!0,i++)}const o=await Y(this,yn,i_).call(this,r,n);if(o!==void 0){if(o instanceof Error)throw o;return o}for(let a=0;a0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:n,results:Array.from(r).map(a=>Lx(a.result))}}),await Promise.race(s),await Y(this,yn,v2).call(this,r,n)};function Jie(t){return t&&typeof t.send=="function"&&typeof t.close=="function"}const Yie="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function Xie(t,e){e==null&&(e={});const r=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof t=="string"&&t.match(/^https?:/))return new cr(t);if(typeof t=="string"&&t.match(/^wss?:/)||Jie(t))return new Xk(t);let n=null;try{n=lt.from(t)}catch{}const s=[];if(r("publicPolygon")&&n&&(n.name==="matic"?s.push(new cr("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&s.push(new cr("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),r("alchemy"))try{s.push(new T0(t,e.alchemy))}catch{}if(r("ankr")&&e.ankr!=null)try{s.push(new A0(t,e.ankr))}catch{}if(r("chainstack"))try{s.push(new I0(t,e.chainstack))}catch{}if(r("cloudflare"))try{s.push(new K7(t))}catch{}if(r("etherscan"))try{s.push(new J7(t,e.etherscan))}catch{}if(r("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),s.push(new rd(t,o,a))}catch{}if(r("quicknode"))try{let o=e.quicknode;s.push(new P0(t,o))}catch{}if(H(s.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),s.length===1)return s[0];let i=Math.floor(s.length/2);return i>2&&(i=2),n&&Yie.indexOf(n.name)!==-1&&(i=1),e&&e.quorum&&(i=e.quorum),new r_(s,void 0,{quorum:i})}var ia,Gc;const X5=class X5 extends kd{constructor(r){super(r.provider);_(this,"signer");j(this,ia);j(this,Gc);fe(this,{signer:r}),T(this,ia,null),T(this,Gc,0)}async getAddress(){return this.signer.getAddress()}connect(r){return new X5(this.signer.connect(r))}async getNonce(r){if(r==="pending"){w(this,ia)==null&&T(this,ia,super.getNonce("pending"));const n=w(this,Gc);return await w(this,ia)+n}return super.getNonce(r)}increment(){Pl(this,Gc)._++}reset(){T(this,Gc,0),T(this,ia,null)}async sendTransaction(r){const n=this.getNonce("pending");return this.increment(),r=await this.signer.populateTransaction(r),r.nonce=await n,await this.signer.sendTransaction(r)}signTransaction(r){return this.signer.signTransaction(r)}signMessage(r){return this.signer.signMessage(r)}signTypedData(r,n,s){return this.signer.signTypedData(r,n,s)}};ia=new WeakMap,Gc=new WeakMap;let m2=X5;var Pf;class Zie extends q7{constructor(r,n,s){const i=Object.assign({},s??{},{batchMaxCount:1});I(r&&r.request,"invalid EIP-1193 provider","ethereum",r);super(n,i);j(this,Pf);T(this,Pf,async(o,a)=>{const c={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:c});try{const l=await r.request(c);return this.emit("debug",{action:"receiveEip1193Result",result:l}),l}catch(l){const u=new Error(l.message);throw u.code=l.code,u.data=l.data,u.payload=c,this.emit("debug",{action:"receiveEip1193Error",error:u}),u}})}async send(r,n){return await this._start(),await super.send(r,n)}async _send(r){I(!Array.isArray(r),"EIP-1193 does not support batch request","payload",r);try{const n=await w(this,Pf).call(this,r.method,r.params||[]);return[{id:r.id,result:n}]}catch(n){return[{id:r.id,error:{code:n.code,data:n.data,message:n.message}}]}}getRpcError(r,n){switch(n=JSON.parse(JSON.stringify(n)),n.error.code||-1){case 4001:n.error.message=`ethers-user-denied: ${n.error.message}`;break;case 4200:n.error.message=`ethers-unsupported: ${n.error.message}`;break}return super.getRpcError(r,n)}async hasSigner(r){r==null&&(r=0);const n=await this.send("eth_accounts",[]);return typeof r=="number"?n.length>r:(r=r.toLowerCase(),n.filter(s=>s.toLowerCase()===r).length!==0)}async getSigner(r){if(r==null&&(r=0),!await this.hasSigner(r))try{await w(this,Pf).call(this,"eth_requestAccounts",[])}catch(n){const s=n.payload;throw this.getRpcError(s,{id:s.id,error:n})}return await super.getSigner(r)}}Pf=new WeakMap;const kp="62e1ad51b37b8e00394bda3b";function eoe(t){switch(t){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}I(!1,"unsupported network","network",t)}class gg extends cr{constructor(r,n,s){r==null&&(r="mainnet");const i=lt.from(r);n==null&&(n=kp),s==null&&(s=null);const o={staticNetwork:i},a=gg.getRequest(i,n,s);super(a,i,o);_(this,"applicationId");_(this,"applicationSecret");fe(this,{applicationId:n,applicationSecret:s})}_getProvider(r){try{return new gg(r,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(r)}static getRequest(r,n,s){n==null&&(n=kp);const i=new Gt(`https://${eoe(r.name)}/v1/lb/${n}`);return i.allowGzip=!0,s&&i.setCredentials("",s),n===kp&&(i.retryFunc=async(o,a,c)=>(Ka("PocketProvider"),!0)),i}isCommunityResource(){return this.applicationId===kp}}const toe=void 0;var Of;const Z5=class Z5 extends kd{constructor(r,n){super(n);_(this,"address");j(this,Of);I(r&&typeof r.sign=="function","invalid private key","privateKey","[ REDACTED ]"),T(this,Of,r);const s=Ed(this.signingKey.publicKey);fe(this,{address:s})}get signingKey(){return w(this,Of)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(r){return new Z5(w(this,Of),r)}async signTransaction(r){r=Yf(r);const{to:n,from:s}=await It({to:r.to?sr(r.to,this.provider):void 0,from:r.from?sr(r.from,this.provider):void 0});n!=null&&(r.to=n),s!=null&&(r.from=s),r.from!=null&&(I(Ae(r.from)===this.address,"transaction from address mismatch","tx.from",r.from),delete r.from);const i=gl.from(r);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(r){return this.signMessageSync(r)}signMessageSync(r){return this.signingKey.sign(Vv(r)).serialized}async signTypedData(r,n,s){const i=await Bs.resolveNames(r,n,s,async o=>{H(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:o}});const a=await this.provider.resolveName(o);return H(a!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:o}),a});return this.signingKey.sign(Bs.hash(i.domain,n,i.value)).serialized}};Of=new WeakMap;let O0=Z5;const vg=" !#$%&'()*+,-./<=>?@[]^_`{|}~",roe=/^[a-z]*$/i;function p8(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(roe)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function noe(t,e){for(let s=vg.length-1;s>=0;s--)t=t.split(vg[s]).join(e.substring(2*s,2*s+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(s,i,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(i.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return p8(p8(r,";"),":")}function o_(t){return I(t[0]==="0","unsupported auwl data","data",t),noe(t.substring(1+2*vg.length),t.substring(1,1+2*vg.length))}class a_{constructor(e){_(this,"locale");fe(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var Rf,Y0,qc,X0,x2;class Zk extends a_{constructor(r,n,s){super(r);j(this,X0);j(this,Rf);j(this,Y0);j(this,qc);T(this,Rf,n),T(this,Y0,s),T(this,qc,null)}get _data(){return w(this,Rf)}_decodeWords(){return o_(w(this,Rf))}getWord(r){const n=Y(this,X0,x2).call(this);return I(r>=0&&r=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let s=0;for(let l=0;l=0,`invalid mnemonic word at index ${l}`,"mnemonic","[ REDACTED ]");for(let f=0;f<11;f++)u&1<<10-f&&(n[s>>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=c_(o),c=Q(Qr(n.slice(0,i/8)))[0]&a;return I(c===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),z(n.slice(0,i/8))}function Wx(t,e){I(t.length%4===0&&t.length>=16&&t.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),e==null&&(e=fo.wordlist());const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&ooe(8-n)),n+=3);const s=t.length/4,i=parseInt(Qr(t).substring(2,4),16)&c_(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}const Vx={};class xl{constructor(e,r,n,s,i){_(this,"phrase");_(this,"password");_(this,"wordlist");_(this,"entropy");s==null&&(s=""),i==null&&(i=fo.wordlist()),yo(e,Vx,"Mnemonic"),fe(this,{phrase:n,password:s,wordlist:i,entropy:r})}computeSeed(){const e=mt("mnemonic"+this.password,"NFKD");return wi(mt(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,r,n){const s=$x(e,n);return e=Wx(Q(s),n),new xl(Vx,s,e,r,n)}static fromEntropy(e,r,n){const s=Q(e,"entropy"),i=Wx(s,n);return new xl(Vx,z(s),i,r,n)}static entropyToPhrase(e,r){const n=Q(e,"entropy");return Wx(n,r)}static phraseToEntropy(e,r){return $x(e,r)}static isValidMnemonic(e,r){try{return $x(e,r),!0}catch{}return!1}}/*! MIT License. Copyright 2015-2022 Richard Moore . See LICENSE.txt. */var lr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},zx=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},cy,$n,zs;const aoe={16:10,24:12,32:14},coe=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Ln=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Sp=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],loe=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],uoe=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],foe=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],doe=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],hoe=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],poe=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],yoe=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],goe=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],voe=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],moe=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],xoe=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],boe=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Hx(t){const e=[];for(let r=0;r>2,lr(this,zs,"f")[o][u%4]=i[u],lr(this,$n,"f")[r-o][u%4]=i[u];let a=0,c=s,l;for(;c>16&255]<<24^Ln[l>>8&255]<<16^Ln[l&255]<<8^Ln[l>>24&255]^coe[a]<<24,a+=1,s!=8)for(let h=1;h>8&255]<<8^Ln[l>>16&255]<<16^Ln[l>>24&255]<<24;for(let h=s/2+1;h>2,d=c%4,lr(this,zs,"f")[f][d]=i[u],lr(this,$n,"f")[r-f][d]=i[u++],c++}for(let u=1;u>24&255]^moe[l>>16&255]^xoe[l>>8&255]^boe[l&255]}encrypt(e){if(e.length!=16)throw new TypeError("invalid plaintext size (must be 16 bytes)");const r=lr(this,zs,"f").length-1,n=[0,0,0,0];let s=Hx(e);for(let a=0;a<4;a++)s[a]^=lr(this,zs,"f")[0][a];for(let a=1;a>24&255]^uoe[s[(c+1)%4]>>16&255]^foe[s[(c+2)%4]>>8&255]^doe[s[(c+3)%4]&255]^lr(this,zs,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=lr(this,zs,"f")[r][a],i[4*a]=(Ln[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(Ln[s[(a+1)%4]>>16&255]^o>>16)&255,i[4*a+2]=(Ln[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(Ln[s[(a+3)%4]&255]^o)&255;return i}decrypt(e){if(e.length!=16)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const r=lr(this,$n,"f").length-1,n=[0,0,0,0];let s=Hx(e);for(let a=0;a<4;a++)s[a]^=lr(this,$n,"f")[0][a];for(let a=1;a>24&255]^poe[s[(c+3)%4]>>16&255]^yoe[s[(c+2)%4]>>8&255]^goe[s[(c+1)%4]&255]^lr(this,$n,"f")[a][c];s=n.slice()}const i=new Uint8Array(16);let o=0;for(let a=0;a<4;a++)o=lr(this,$n,"f")[r][a],i[4*a]=(Sp[s[a]>>24&255]^o>>24)&255,i[4*a+1]=(Sp[s[(a+3)%4]>>16&255]^o>>16)&255,i[4*a+2]=(Sp[s[(a+2)%4]>>8&255]^o>>8)&255,i[4*a+3]=(Sp[s[(a+1)%4]&255]^o)&255;return i}}cy=new WeakMap,$n=new WeakMap,zs=new WeakMap;class l_{constructor(e,r,n){if(n&&!(this instanceof n))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new e5(r)},name:{enumerable:!0,value:e}})}}var Ap=function(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r},Fl=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lh,ki;class t5 extends l_{constructor(e,r){if(super("ECC",e,t5),lh.set(this,void 0),ki.set(this,void 0),r){if(r.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");Ap(this,lh,new Uint8Array(r),"f")}else Ap(this,lh,new Uint8Array(16),"f");Ap(this,ki,this.iv,"f")}get iv(){return new Uint8Array(Fl(this,lh,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const r=new Uint8Array(e.length);for(let n=0;nNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let r=15;r>=0;--r)jn(this,Wn,"f")[r]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(e.length!==16)throw new TypeError("invalid counter initial Uint8Array value length");jn(this,Wn,"f").set(e)}increment(){for(let e=15;e>=0;e--)if(jn(this,Wn,"f")[e]===255)jn(this,Wn,"f")[e]=0;else{jn(this,Wn,"f")[e]++;break}}encrypt(e){var r,n;const s=new Uint8Array(e);for(let i=0;i16)throw new TypeError("PKCS#7 padding byte out of range");const r=t.length-e;for(let n=0;n0&&(n&n-1)===0,"invalid kdf.N","kdf.N",n),I(s>0&&i>0,"invalid kdf","kdf",e);const o=Rt(t,"crypto.kdfparams.dklen:int!");return I(o===32,"invalid kdf.dklen","kdf.dflen",o),{name:"scrypt",salt:r,N:n,r:s,p:i,dkLen:64}}else if(e.toLowerCase()==="pbkdf2"){const r=Rt(t,"crypto.kdfparams.salt:data!"),n=Rt(t,"crypto.kdfparams.prf:string!"),s=n.split("-").pop();I(s==="sha256"||s==="sha512","invalid kdf.pdf","kdf.pdf",n);const i=Rt(t,"crypto.kdfparams.c:int!"),o=Rt(t,"crypto.kdfparams.dklen:int!");return I(o===32,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:r,count:i,dkLen:o,algorithm:s}}}I(!1,"unsupported key-derivation function","kdf",e)}function h_(t,e){const r=JSON.parse(t),n=T1(e),s=d_(r);if(s.name==="pbkdf2"){const{salt:f,count:d,dkLen:h,algorithm:y}=s,p=wi(n,f,d,h,y);return mg(r,p)}H(s.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:i,N:o,r:a,p:c,dkLen:l}=s,u=Ha(n,i,o,a,c,l);return mg(r,u)}function y8(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}async function p_(t,e,r){const n=JSON.parse(t),s=T1(e),i=d_(n);if(i.name==="pbkdf2"){r&&(r(0),await y8(0));const{salt:d,count:h,dkLen:y,algorithm:p}=i,b=wi(s,d,h,y,p);return r&&(r(1),await y8(0)),mg(n,b)}H(i.name==="scrypt","cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:o,N:a,r:c,p:l,dkLen:u}=i,f=await za(s,o,a,c,l,u,r);return mg(n,f)}function y_(t){const e=t.salt!=null?Q(t.salt,"options.salt"):Nr(32);let r=1<<17,n=8,s=1;return t.scrypt&&(t.scrypt.N&&(r=t.scrypt.N),t.scrypt.r&&(n=t.scrypt.r),t.scrypt.p&&(s=t.scrypt.p)),I(typeof r=="number"&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),I(typeof n=="number"&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),I(typeof s=="number"&&s>0&&Number.isSafeInteger(s),"invalid scrypt p parameter","options.p",s),{name:"scrypt",dkLen:32,salt:e,N:r,r:n,p:s}}function g_(t,e,r,n){const s=Q(r.privateKey,"privateKey"),i=n.iv!=null?Q(n.iv,"options.iv"):Nr(16);I(i.length===16,"invalid options.iv length","options.iv",n.iv);const o=n.uuid!=null?Q(n.uuid,"options.uuid"):Nr(16);I(o.length===16,"invalid options.uuid length","options.uuid",n.iv);const a=t.slice(0,16),c=t.slice(16,32),l=new nd(a,i),u=Q(l.encrypt(s)),f=Me(Fe([c,u])),d={address:r.address.substring(2).toLowerCase(),id:_R(o),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:z(i).substring(2)},ciphertext:z(u).substring(2),kdf:"scrypt",kdfparams:{salt:z(e.salt).substring(2),n:e.N,dklen:32,p:e.p,r:e.r},mac:f.substring(2)}};if(r.mnemonic){const h=n.client!=null?n.client:`ethers/${yk}`,y=r.mnemonic.path||f_,p=r.mnemonic.locale||"en",b=t.slice(32,64),g=Q(r.mnemonic.entropy,"account.mnemonic.entropy"),v=Nr(16),m=new nd(b,v),k=Q(m.encrypt(g)),A=new Date,R="UTC--"+(A.getUTCFullYear()+"-"+zd(A.getUTCMonth()+1,2)+"-"+zd(A.getUTCDate(),2)+"T"+zd(A.getUTCHours(),2)+"-"+zd(A.getUTCMinutes(),2)+"-"+zd(A.getUTCSeconds(),2)+".0Z")+"--"+d.address;d["x-ethers"]={client:h,gethFilename:R,path:y,locale:p,mnemonicCounter:z(v).substring(2),mnemonicCiphertext:z(k).substring(2),version:"0.1"}}return JSON.stringify(d)}function r5(t,e,r){r==null&&(r={});const n=T1(e),s=y_(r),i=Ha(n,s.salt,s.N,s.r,s.p,64);return g_(Q(i),s,t,r)}async function n5(t,e,r){r==null&&(r={});const n=T1(e),s=y_(r),i=await za(n,s.salt,s.N,s.r,s.p,64,r.progressCallback);return g_(Q(i),s,t,r)}const ly="m/44'/60'/0'/0/0",Coe=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),pi=2147483648,koe=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Soe="0123456789abcdef";function xg(t,e){let r="";for(;t;)r=Soe[t%16]+r,t=Math.trunc(t/16);for(;r.length=0;o-=8)s[33+(o>>3)]=t>>24-o&255;const i=Q(Wa("sha512",e,s));return{IL:i.slice(0,32),IR:i.slice(32)}}function m_(t,e){const r=e.split("/");I(r.length>0,"invalid path","path",e),r[0]==="m"&&(I(t.depth===0,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${t.depth}`,"path",e),r.shift());let n=t;for(let s=0;s=16&&s.length<=64,"invalid seed","seed","[REDACTED]");const i=Q(Wa("sha512",Coe,s)),o=new Rs(z(i.slice(0,32)));return new hs(qs,o,"0x00000000",z(i.slice(32)),"m",0,0,n,null)},j(hs,Kc);let Mu=hs;class sd extends yg{constructor(r,n,s,i,o,a,c,l,u){super(n,u);_(this,"publicKey");_(this,"fingerprint");_(this,"parentFingerprint");_(this,"chainCode");_(this,"path");_(this,"index");_(this,"depth");yo(r,qs,"HDNodeVoidWallet"),fe(this,{publicKey:s});const f=at(Va(Qr(s)),0,4);fe(this,{publicKey:s,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:c,depth:l})}connect(r){return new sd(qs,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,r)}get extendedKey(){return H(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),w2(Fe(["0x0488B21E",xg(this.depth,1),this.parentFingerprint,xg(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return this.path!=null}deriveChild(r){const n=Pe(r,"index");I(n<=4294967295,"invalid index","index",n);let s=this.path;s&&(s+="/"+(n&~pi),n&pi&&(s+="'"));const{IR:i,IL:o}=v_(n,this.chainCode,this.publicKey,null),a=Rs.addPoints(o,this.publicKey,!0),c=Ed(a);return new sd(qs,c,a,this.fingerprint,z(i),s,n,this.depth+1,this.provider)}derivePath(r){return m_(this,r)}}function Aoe(t){const e=Pe(t,"index");return I(e>=0&&e=0&&e{setTimeout(()=>{e()},t)})}var e1,ui,S2;let x_=(ui=class extends O0{constructor(e,r){typeof e=="string"&&!e.startsWith("0x")&&(e="0x"+e);let n=typeof e=="string"?new Rs(e):e;super(n,r)}connect(e){return new ui(this.signingKey,e)}async encrypt(e,r){const n={address:this.address,privateKey:this.privateKey};return await n5(n,e,{progressCallback:r})}encryptSync(e){const r={address:this.address,privateKey:this.privateKey};return r5(r,e)}static async fromEncryptedJson(e,r,n){var i;let s=null;return b2(e)?s=await p_(e,r,n):C2(e)&&(n&&(n(0),await g8(0)),s=k2(e,r),n&&(n(1),await g8(0))),Y(i=ui,e1,S2).call(i,s)}static fromEncryptedJsonSync(e,r){var s;let n=null;return b2(e)?n=h_(e,r):C2(e)?n=k2(e,r):I(!1,"invalid JSON wallet","json","[ REDACTED ]"),Y(s=ui,e1,S2).call(s,n)}static createRandom(e){const r=Mu.createRandom();return e?r.connect(e):r}static fromPhrase(e,r){const n=Mu.fromPhrase(e);return r?n.connect(r):n}},e1=new WeakSet,S2=function(e){if(I(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&e.mnemonic.locale==="en"){const n=xl.fromEntropy(e.mnemonic.entropy),s=Mu.fromMnemonic(n,e.mnemonic.path);if(s.address===e.address&&s.privateKey===e.privateKey)return s;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const r=new ui(e.privateKey);return I(r.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),r},j(ui,e1),ui);const Ioe=")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_";function Poe(t,e){const r=(1<=t;){const c=s>>i-t;s&=(1<{const s=n.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);I(s!==null,"internal error parsing accents","accents",e);let i=0;const o=Poe(parseInt(s[3]),s[4]),a=parseInt(s[2]),c=new RegExp(`([${s[1]}])`,"g");r=r.replace(c,(l,u)=>(--o[i]===0&&(u=String.fromCharCode(u.charCodeAt(0),a),i++),u))}),r.split(",")}var t1;class Roe extends Zk{constructor(r,n,s,i){super(r,n,i);j(this,t1);T(this,t1,s)}get _accent(){return w(this,t1)}_decodeWords(){return Ooe(this._data,this._accent)}}t1=new WeakMap;const Noe={en:fo.wordlist()},_oe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:qt,AbstractProvider:td,AbstractSigner:kd,AlchemyProvider:T0,AnkrProvider:A0,BaseContract:Zf,BaseWallet:O0,Block:I7,BrowserProvider:Zie,ChainstackProvider:I0,CloudflareProvider:K7,ConstructorFragment:ci,Contract:dn,ContractEventPayload:N7,ContractFactory:qk,ContractTransactionReceipt:R7,ContractTransactionResponse:Gv,ContractUnknownEventPayload:zk,EnsPlugin:A1,EnsResolver:k0,ErrorDescription:A7,ErrorFragment:zr,EtherSymbol:rne,EtherscanPlugin:Yk,EtherscanProvider:J7,EventFragment:Ss,EventLog:Hv,EventPayload:xk,FallbackFragment:si,FallbackProvider:r_,FeeData:Zw,FeeDataNetworkPlugin:r2,FetchCancelSignal:IR,FetchRequest:Gt,FetchResponse:eo,FetchUrlFeeDataNetworkPlugin:V7,FixedNumber:v0,Fragment:_a,FunctionFragment:As,GasCostPlugin:S1,HDNodeVoidWallet:sd,HDNodeWallet:Mu,Indexed:Xw,InfuraProvider:rd,InfuraWebSocketProvider:t_,Interface:ut,IpcSocketProvider:toe,JsonRpcApiProvider:Jk,JsonRpcProvider:cr,JsonRpcSigner:oy,LangEn:fo,Log:Cd,LogDescription:k7,MaxInt256:tne,MaxUint256:BN,MessagePrefix:LN,MinInt256:ene,Mnemonic:xl,MulticoinProviderPlugin:F7,N:Xre,NamedFragment:C1,Network:lt,NetworkPlugin:qa,NonceManager:m2,ParamType:ar,PocketProvider:gg,QuickNodeProvider:P0,Result:pl,Signature:cs,SigningKey:Rs,SocketBlockSubscriber:Y7,SocketEventSubscriber:Z7,SocketPendingSubscriber:X7,SocketProvider:e_,SocketSubscriber:Qv,StructFragment:wa,Transaction:gl,TransactionDescription:S7,TransactionReceipt:Wk,TransactionResponse:Xf,Typed:mr,TypedDataEncoder:Bs,UndecodedEventLog:Vk,UnmanagedSubscriber:S0,Utf8ErrorFuncs:ER,VoidSigner:yg,Wallet:x_,WebSocketProvider:Xk,WeiPerEther:Zre,Wordlist:a_,WordlistOwl:Zk,WordlistOwlA:Roe,ZeroAddress:xi,ZeroHash:yl,accessListify:vo,assert:H,assertArgument:I,assertArgumentCount:gk,assertNormalize:vk,assertPrivate:yo,checkResultErrors:vte,computeAddress:Ed,computeHmac:Wa,concat:Fe,copyRequest:Yf,dataLength:ba,dataSlice:at,decodeBase58:mR,decodeBase64:xR,decodeBytes32String:qse,decodeRlp:x1,decryptCrowdsaleJson:k2,decryptKeystoreJson:p_,decryptKeystoreJsonSync:h_,defaultPath:ly,defineProperties:fe,dnsEncode:l7,encodeBase58:mk,encodeBase64:bR,encodeBytes32String:Gse,encodeRlp:Na,encryptKeystoreJson:n5,encryptKeystoreJsonSync:r5,ensNormalize:c7,formatEther:yte,formatUnits:NR,fromTwos:g0,getAccountPath:Aoe,getAddress:Ae,getBigInt:xe,getBytes:Q,getBytesCopy:tr,getCreate2Address:lne,getCreateAddress:_k,getDefaultProvider:Xie,getIcapAddress:cne,getIndexedAccountPath:Toe,getNumber:Pe,getUint:m1,hashMessage:Vv,hexlify:z,id:Dr,isAddress:ag,isAddressable:Mk,isBytesLike:mi,isCallException:_v,isCrowdsaleJson:C2,isError:Ft,isHexString:qe,isKeystoreJson:b2,isValidName:ise,keccak256:Me,lock:nne,makeError:ht,mask:ca,namehash:hg,parseEther:Dw,parseUnits:og,pbkdf2:wi,randomBytes:Nr,recoverAddress:Jf,resolveAddress:sr,resolveProperties:It,ripemd160:Va,scrypt:za,scryptSync:Ha,sha256:Qr,sha512:b1,showThrottleMessage:Ka,solidityPacked:Le,solidityPackedKeccak256:to,solidityPackedSha256:Cse,stripZerosLeft:Xee,toBeArray:rr,toBeHex:On,toBigInt:bd,toNumber:vR,toQuantity:yr,toTwos:Bv,toUtf8Bytes:mt,toUtf8CodePoints:ste,toUtf8String:Ds,uuidV4:_R,verifyMessage:u7,verifyTypedData:Ose,version:yk,wordlists:Noe,zeroPadBytes:Mv,zeroPadValue:ss},Symbol.toStringTag,{value:"Module"})),Moe=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var Doe=Object.freeze({__proto__:null,abi:Moe});const Boe=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],Loe={isValidSignatureBytes32:"0x1626ba7e"};var joe=Object.freeze({__proto__:null,abi:Boe,returns:Loe});const Foe=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var Uoe=Object.freeze({__proto__:null,abi:Foe});const $oe=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var Woe=Object.freeze({__proto__:null,abi:$oe});const Voe=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"},{type:"function",name:"setExtraImageHash",constant:!1,inputs:[{type:"bytes32",name:"imageHash"},{type:"uint256",name:"expiration"}],outputs:[],payable:!1,stateMutability:"nonpayable"}];var zoe=Object.freeze({__proto__:null,abi:Voe});const Hoe=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var Goe=Object.freeze({__proto__:null,abi:Hoe});const qoe=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var Koe=Object.freeze({__proto__:null,abi:qoe});const Qoe=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var Joe=Object.freeze({__proto__:null,abi:Qoe});const Ht={erc6492:Uoe,erc5719:Doe,erc1271:joe,factory:Woe,mainModule:zoe,mainModuleUpgradable:Goe,sequenceUtils:Koe,requireFreshSigner:Joe},Yoe=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Ht},Symbol.toStringTag,{value:"Module"}));function bg(){return bg=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ve({},n,s)).then(i=>me(i).then(o=>({status:o.status})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),ve({},n,s)).then(i=>me(i).then(o=>({version:o.version})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),ve({},n,s)).then(i=>me(i).then(o=>({status:o.status})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.clock=(n,s)=>this.fetch(this.url("Clock"),ve({},n,s)).then(i=>me(i).then(o=>({serverTime:o.serverTime})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getSequenceContext=(n,s)=>this.fetch(this.url("GetSequenceContext"),ve({},n,s)).then(i=>me(i).then(o=>({data:o.data})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getAuthToken=(n,s,i)=>this.fetch(this.url("GetAuthToken"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,jwtToken:a.jwtToken,address:a.address,user:a.user})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getAuthToken2=(n,s,i)=>this.fetch(this.url("GetAuthToken2"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,jwtToken:a.jwtToken,address:a.address,user:a.user})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sendPasswordlessLink=(n,s,i)=>this.fetch(this.url("SendPasswordlessLink"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.friendList=(n,s,i)=>this.fetch(this.url("FriendList"),ve(n,s,i)).then(o=>me(o).then(a=>({page:a.page,friends:a.friends})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getFriendByAddress=(n,s,i)=>this.fetch(this.url("GetFriendByAddress"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.searchFriends=(n,s,i)=>this.fetch(this.url("SearchFriends"),ve(n,s,i)).then(o=>me(o).then(a=>({friends:a.friends})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.addFriend=(n,s,i)=>this.fetch(this.url("AddFriend"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateFriendNickname=(n,s,i)=>this.fetch(this.url("UpdateFriendNickname"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status,friend:a.friend})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.removeFriend=(n,s,i)=>this.fetch(this.url("RemoveFriend"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.contractCall=(n,s,i)=>this.fetch(this.url("ContractCall"),ve(n,s,i)).then(o=>me(o).then(a=>({returns:a.returns})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.decodeContractCall=(n,s,i)=>this.fetch(this.url("DecodeContractCall"),ve(n,s,i)).then(o=>me(o).then(a=>({call:a.call})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.lookupContractCallSelectors=(n,s,i)=>this.fetch(this.url("LookupContractCallSelectors"),ve(n,s,i)).then(o=>me(o).then(a=>({signatures:a.signatures})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageFetch=(n,s,i)=>this.fetch(this.url("UserStorageFetch"),ve(n,s,i)).then(o=>me(o).then(a=>({object:a.object})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageSave=(n,s,i)=>this.fetch(this.url("UserStorageSave"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageDelete=(n,s,i)=>this.fetch(this.url("UserStorageDelete"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.userStorageFetchAll=(n,s,i)=>this.fetch(this.url("UserStorageFetchAll"),ve(n,s,i)).then(o=>me(o).then(a=>({objects:a.objects})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getMoonpayLink=(n,s,i)=>this.fetch(this.url("GetMoonpayLink"),ve(n,s,i)).then(o=>me(o).then(a=>({signedUrl:a.signedUrl})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.resolveENSAddress=(n,s,i)=>this.fetch(this.url("ResolveENSAddress"),ve(n,s,i)).then(o=>me(o).then(a=>({address:a.address,ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidSignature=(n,s,i)=>this.fetch(this.url("IsValidSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidMessageSignature=(n,s,i)=>this.fetch(this.url("IsValidMessageSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidTypedDataSignature=(n,s,i)=>this.fetch(this.url("IsValidTypedDataSignature"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.isValidETHAuthProof=(n,s,i)=>this.fetch(this.url("IsValidETHAuthProof"),ve(n,s,i)).then(o=>me(o).then(a=>({isValid:a.isValid})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetClientToken=(n,s)=>this.fetch(this.url("SardineGetClientToken"),ve({},n,s)).then(i=>me(i).then(o=>({token:o.token})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetNFTCheckoutToken=(n,s,i)=>this.fetch(this.url("SardineGetNFTCheckoutToken"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetNFTCheckoutOrderStatus=(n,s,i)=>this.fetch(this.url("SardineGetNFTCheckoutOrderStatus"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.sardineGetSupportedRegions=(n,s)=>this.fetch(this.url("SardineGetSupportedRegions"),ve({},n,s)).then(i=>me(i).then(o=>({regions:o.regions})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetSupportedFiatCurrencies=(n,s)=>this.fetch(this.url("SardineGetSupportedFiatCurrencies"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetSupportedTokens=(n,s)=>this.fetch(this.url("SardineGetSupportedTokens"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetEnabledTokens=(n,s)=>this.fetch(this.url("SardineGetEnabledTokens"),ve({},n,s)).then(i=>me(i).then(o=>({tokens:o.tokens})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.sardineGetQuote=(n,s,i)=>this.fetch(this.url("SardineGetQuote"),ve(n,s,i)).then(o=>me(o).then(a=>({quote:a.quote})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSardineClientToken=(n,s)=>this.fetch(this.url("GetSardineClientToken"),ve({},n,s)).then(i=>me(i).then(o=>({token:o.token})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.getSardineNFTCheckoutToken=(n,s,i)=>this.fetch(this.url("GetSardineNFTCheckoutToken"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSardineNFTCheckoutOrderStatus=(n,s,i)=>this.fetch(this.url("GetSardineNFTCheckoutOrderStatus"),ve(n,s,i)).then(o=>me(o).then(a=>({resp:a.resp})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getCoinPrices=(n,s,i)=>this.fetch(this.url("GetCoinPrices"),ve(n,s,i)).then(o=>me(o).then(a=>({tokenPrices:a.tokenPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getCollectiblePrices=(n,s,i)=>this.fetch(this.url("GetCollectiblePrices"),ve(n,s,i)).then(o=>me(o).then(a=>({tokenPrices:a.tokenPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getExchangeRate=(n,s,i)=>this.fetch(this.url("GetExchangeRate"),ve(n,s,i)).then(o=>me(o).then(a=>({exchangeRate:a.exchangeRate})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.memoryStore=(n,s,i)=>this.fetch(this.url("MemoryStore"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.memoryLoad=(n,s,i)=>this.fetch(this.url("MemoryLoad"),ve(n,s,i)).then(o=>me(o).then(a=>({value:a.value})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getInviteInfo=(n,s)=>this.fetch(this.url("GetInviteInfo"),ve({},n,s)).then(i=>me(i).then(o=>({inviteInfo:o.inviteInfo})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.isValidAccessCode=(n,s,i)=>this.fetch(this.url("IsValidAccessCode"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.internalClaimAccessCode=(n,s,i)=>this.fetch(this.url("InternalClaimAccessCode"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.blockNumberAtTime=(n,s,i)=>this.fetch(this.url("BlockNumberAtTime"),ve(n,s,i)).then(o=>me(o).then(a=>({blocks:a.blocks})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.paperSessionSecret=(n,s,i)=>this.fetch(this.url("PaperSessionSecret"),ve(n,s,i)).then(o=>me(o).then(a=>({secret:a.secret})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.paperSessionSecret2=(n,s,i)=>this.fetch(this.url("PaperSessionSecret2"),ve(n,s,i)).then(o=>me(o).then(a=>({secret:a.secret})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.linkWallet=(n,s,i)=>this.fetch(this.url("LinkWallet"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getLinkedWallets=(n,s,i)=>this.fetch(this.url("GetLinkedWallets"),ve(n,s,i)).then(o=>me(o).then(a=>({linkedWallets:a.linkedWallets})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.removeLinkedWallet=(n,s,i)=>this.fetch(this.url("RemoveLinkedWallet"),ve(n,s,i)).then(o=>me(o).then(a=>({status:a.status})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.generateWaaSVerificationURL=(n,s,i)=>this.fetch(this.url("GenerateWaaSVerificationURL"),ve(n,s,i)).then(o=>me(o).then(a=>({nonce:a.nonce,verificationURL:a.verificationURL})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.validateWaaSVerificationNonce=(n,s,i)=>this.fetch(this.url("ValidateWaaSVerificationNonce"),ve(n,s,i)).then(o=>me(o).then(a=>({walletAddress:a.walletAddress})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSwapPrices=(n,s,i)=>this.fetch(this.url("GetSwapPrices"),ve(n,s,i)).then(o=>me(o).then(a=>({swapPrices:a.swapPrices})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getSwapQuote=(n,s,i)=>this.fetch(this.url("GetSwapQuote"),ve(n,s,i)).then(o=>me(o).then(a=>({swapQuote:a.swapQuote})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listCurrencyGroups=(n,s)=>this.fetch(this.url("ListCurrencyGroups"),ve({},n,s)).then(i=>me(i).then(o=>({currencyGroups:o.currencyGroups})),i=>{throw ye.new({cause:`fetch(): ${i.message||""}`})}),this.addOffchainInventory=(n,s,i)=>this.fetch(this.url("AddOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({inventoryId:a.inventoryId})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.getOffchainInventory=(n,s,i)=>this.fetch(this.url("GetOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({inventory:a.inventory})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listOffchainInventories=(n,s,i)=>this.fetch(this.url("ListOffchainInventories"),ve(n,s,i)).then(o=>me(o).then(a=>({inventory:a.inventory})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.updateOffchainInventory=(n,s,i)=>this.fetch(this.url("UpdateOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.deleteOffchainInventory=(n,s,i)=>this.fetch(this.url("DeleteOffchainInventory"),ve(n,s,i)).then(o=>me(o).then(a=>({ok:a.ok})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.requestOffchainPayment=(n,s,i)=>this.fetch(this.url("RequestOffchainPayment"),ve(n,s,i)).then(o=>me(o).then(a=>({payment:a.payment})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.listOffchainPayments=(n,s,i)=>this.fetch(this.url("ListOffchainPayments"),ve(n,s,i)).then(o=>me(o).then(a=>({page:a.page,payments:a.payments})),o=>{throw ye.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const ve=(t={},e={},r=null)=>({method:"POST",headers:bg({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),me=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),s5.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(oae[n]||Ot).new(r)}return r});let Ot=class w_ extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,w_.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},E_=class C_ extends Ot{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,C_.prototype)}},ye=class k_ extends Ot{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,k_.prototype)}},S_=class A_ extends Ot{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,A_.prototype)}},T_=class I_ extends Ot{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,I_.prototype)}},P_=class O_ extends Ot{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,O_.prototype)}},s5=class R_ extends Ot{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,R_.prototype)}},N_=class __ extends Ot{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,__.prototype)}},M_=class D_ extends Ot{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,D_.prototype)}},B_=class L_ extends Ot{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,L_.prototype)}},j_=class F_ extends Ot{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,F_.prototype)}},U_=class $_ extends Ot{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$_.prototype)}},W_=class V_ extends Ot{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,V_.prototype)}},z_=class H_ extends Ot{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,H_.prototype)}},G_=class q_ extends Ot{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,q_.prototype)}},K_=class Q_ extends Ot{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Q_.prototype)}},J_=class Y_ extends Ot{constructor(e="Geoblocked",r=1006,n="Geoblocked region",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Y_.prototype)}},X_=class Z_ extends Ot{constructor(e="InvalidArgument",r=2e3,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Z_.prototype)}},eM=class tM extends Ot{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tM.prototype)}},rM=class nM extends Ot{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nM.prototype)}},sM=class iM extends Ot{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,iM.prototype)}},iae=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.Aborted="Aborted",t.Geoblocked="Geoblocked",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.NotFound="NotFound",t}({});const oae={0:E_,[-1]:ye,[-2]:S_,[-3]:T_,[-4]:P_,[-5]:s5,[-6]:N_,[-7]:M_,[-8]:B_,[-9]:j_,[-10]:U_,1e3:W_,1001:z_,1002:G_,1005:K_,1006:J_,2e3:X_,2002:eM,2003:rM,3e3:sM},v8=globalThis.fetch;class uy extends b_{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,v8),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=bg({},i.headers,o),v8(s,i)},this.fetch=this._fetch}}const aae=Object.freeze(Object.defineProperty({__proto__:null,API:b_,AbortedError:K_,GeoblockedError:J_,InvalidArgumentError:X_,NotFoundError:sM,PermissionDeniedError:z_,QueryFailedError:rM,SardinePaymentType:rae,SardineQuoteType:nae,SequenceAPIClient:uy,SessionExpiredError:G_,SortOrder:tae,TokenType:sae,UnauthorizedError:W_,UnavailableError:eM,WebRPCSchemaHash:eae,WebRPCSchemaVersion:Zoe,WebRPCVersion:Xoe,WebrpcBadMethodError:T_,WebrpcBadRequestError:P_,WebrpcBadResponseError:s5,WebrpcBadRouteError:S_,WebrpcClientDisconnectedError:B_,WebrpcEndpointError:E_,WebrpcError:Ot,WebrpcInternalErrorError:M_,WebrpcRequestFailedError:ye,WebrpcServerPanicError:N_,WebrpcStreamFinishedError:U_,WebrpcStreamLostError:j_,errors:iae},Symbol.toStringTag,{value:"Module"})),oM="3.7.7",cae=oM,Sd=typeof Buffer=="function",m8=typeof TextDecoder=="function"?new TextDecoder:void 0,x8=typeof TextEncoder=="function"?new TextEncoder:void 0,lae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",dh=Array.prototype.slice.call(lae),Tp=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(dh),uae=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,hr=String.fromCharCode.bind(String),b8=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),aM=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),cM=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),lM=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=dh[e>>18&63]+dh[e>>12&63]+dh[e>>6&63]+dh[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},i5=typeof btoa=="function"?t=>btoa(t):Sd?t=>Buffer.from(t,"binary").toString("base64"):lM,A2=Sd?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?aM(A2(t)):A2(t),fae=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?hr(192|e>>>6)+hr(128|e&63):hr(224|e>>>12&15)+hr(128|e>>>6&63)+hr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return hr(240|e>>>18&7)+hr(128|e>>>12&63)+hr(128|e>>>6&63)+hr(128|e&63)}},dae=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,uM=t=>t.replace(dae,fae),w8=Sd?t=>Buffer.from(t,"utf8").toString("base64"):x8?t=>A2(x8.encode(t)):t=>i5(uM(t)),Du=(t,e=!1)=>e?aM(w8(t)):w8(t),E8=t=>Du(t,!0),hae=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,pae=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return hr((r>>>10)+55296)+hr((r&1023)+56320);case 3:return hr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return hr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},fM=t=>t.replace(hae,pae),dM=t=>{if(t=t.replace(/\s+/g,""),!uae.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?hr(e>>16&255,e>>8&255):hr(e>>16&255,e>>8&255,e&255);return r},o5=typeof atob=="function"?t=>atob(cM(t)):Sd?t=>Buffer.from(t,"base64").toString("binary"):dM,hM=Sd?t=>b8(Buffer.from(t,"base64")):t=>b8(o5(t).split("").map(e=>e.charCodeAt(0))),pM=t=>hM(yM(t)),yae=Sd?t=>Buffer.from(t,"base64").toString("utf8"):m8?t=>m8.decode(hM(t)):t=>fM(o5(t)),yM=t=>cM(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),T2=t=>yae(yM(t)),gae=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},gM=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),vM=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,gM(r));t("fromBase64",function(){return T2(this)}),t("toBase64",function(e){return Du(this,e)}),t("toBase64URI",function(){return Du(this,!0)}),t("toBase64URL",function(){return Du(this,!0)}),t("toUint8Array",function(){return pM(this)})},mM=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,gM(r));t("toBase64",function(e){return fy(this,e)}),t("toBase64URI",function(){return fy(this,!0)}),t("toBase64URL",function(){return fy(this,!0)})},vae=()=>{vM(),mM()},bl={version:oM,VERSION:cae,atob:o5,atobPolyfill:dM,btoa:i5,btoaPolyfill:lM,fromBase64:T2,toBase64:Du,encode:Du,encodeURI:E8,encodeURL:E8,utob:uM,btou:fM,decode:T2,isValid:gae,fromUint8Array:fy,toUint8Array:pM,extendString:vM,extendUint8Array:mM,extendBuiltins:vae};var I2=function(){return I2=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),bae=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},wae=function(t,e,r){return cc(void 0,void 0,void 0,function(){var n,s;return lc(this,function(i){return n=r.messageDigest(),s=u7(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Eae=function(t,e,r){return cc(void 0,void 0,void 0,function(){var n,s,i,o,a;return lc(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=c.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new dn(r.address,i,t),[4,o.isValidSignature(n,Q(r.signature))];case 2:return a=c.sent(),a===Cae?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},Cae="0x1626ba7e",wg=function(){function t(){for(var e=[],r=0;r0&&(c+="."+s.extra),[2,c]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),cc(n,void 0,void 0,function(){var o,a,c,l,u,f,d,h,y,p;return lc(this,function(b){switch(b.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],a!==P2)throw new Error("ethauth: not an ethauth proof");return d=bl.decode(l),h=JSON.parse(d),y=new a5({address:c,claims:h,signature:u,extra:f}),[4,this.validateProof(y,i)];case 1:if(p=b.sent(),!p)throw new Error("ethauth: proof is invalid");return[2,y]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),cc(n,void 0,void 0,function(){var o,a;return lc(this,function(c){switch(c.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return cc(n,void 0,void 0,function(){var i,c,o,a,c;return lc(this,function(l){switch(l.label){case 0:i=[],c=0,l.label=1;case 1:if(!(c{const e=t.replace(/-/g,"+").replace(/_/g,"/"),r=atob(e),n=new Uint8Array(r.length);for(let o=0;ot!=null&&(typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||qe(t)||typeof t=="bigint"),Zc=t=>{const e=t.toString(16);return`${e.length%2===0?"0x":"0x0"}${e}`},EM=(t,e=18)=>{let[r,n="0"]=t.split(".");const s=r.startsWith("-");if(s&&(r=r.slice(1)),n=n.replace(/(0+)$/,""),e===0)r=`${Math.round(+`${r}.${n}`)}`,n="";else if(n.length>e){const[i,o,a]=[n.slice(0,e-1),n.slice(e-1,e),n.slice(e)],c=Math.round(+`${o}.${a}`);c>9?n=`${BigInt(i)+1n}0`.padStart(i.length+1,"0"):n=`${i}${c}`,n.length>e&&(n=n.slice(1),r=`${BigInt(r)+1n}`),n=n.slice(0,e)}else n=n.padEnd(e,"0");return BigInt(`${s?"-":""}${r}${n}`)},Sae=t=>EM(t,18),CM=(t,e=18)=>{let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");const s=r.slice(0,r.length-e);let i=r.slice(r.length-e);return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`},Aae=t=>CM(t,18),Ts=(t,e)=>typeof e=="bigint"?{$bigint:e.toString()}:e,Jv=(t,e)=>e!==null&&typeof e=="object"&&"$bigint"in e&&typeof e.$bigint=="string"?BigInt(e.$bigint):e!==null&&typeof e=="object"&&e.type==="BigNumber"&&qe(e.hex)?BigInt(e.hex):e,Tae=t=>bl.encode(t,!0),c5=t=>bl.encode(JSON.stringify(t,Ts),!0),Iae=t=>{if(t!=null)return bl.decode(t)},l5=t=>{if(t!=null)return JSON.parse(bl.decode(t),Jv)},u5=t=>Q(typeof t=="string"?Dr(t):Me(t)),kM=(t,e,r)=>Le(["string","uint256","address","bytes32"],["",e,t,r]),O2=(t,e,r)=>Me(kM(t,e,r)),SM=()=>typeof window>"u"&&typeof process=="object",Pae=()=>!SM(),AM=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(bl.decode(e[1]))};function Eg(){return Eg=Object.assign?Object.assign.bind():function(t){for(var e=1;eTe.configure(t);class Wt{static bufferIndexOf(e,r,n=!1){if(n)return Wt.binarySearch(e,r,Wt.compare);const s=(i,o)=>{if(i===o)return!0;if(i.length!==o.length)return!1;for(let a=0;a=0;c--)if(n(e[c],r)!==0)return c+1;return 0}else a<0?s=o+1:i=o-1}return-1}static compare(e,r){const n=Math.min(e.length,r.length);for(let s=0;sWt.bufferify(e(r))}}class Oae extends Wt{constructor(e,r={}){super(),this.hashFn=void 0,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sortLeaves=!!r.sortLeaves,this.sortPairs=!!r.sortPairs,this.hashFn=Wt.bufferifyFn(Me),this.processLeaves(e)}getOptions(){return{sortLeaves:this.sortLeaves,sortPairs:this.sortPairs}}processLeaves(e){this.leaves=e.map(Wt.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(Wt.compare)),this.createHashes(this.leaves)}createHashes(e){for(this.layers=[e];e.length>1;){const r=this.layers.length;this.layers.push([]);const n=e.length;for(let s=0;s=n){this.layers[r].push(...e.slice(n));break}else if(s+1===e.length&&e.length%2===1){this.layers[r].push(e[s]);continue}const i=e[s],o=s+1===e.length?i:e[s+1],a=[i,o];this.sortPairs&&a.sort(Wt.compare);const c=this.hashFn(Fe(a));this.layers[r].push(c)}e=this.layers[r]}}getRoot(){return this.layers.length===0?Uint8Array.from([]):this.layers[this.layers.length-1][0]||Uint8Array.from([])}getHexRoot(){return Wt.bufferToHex(this.getRoot())}getProof(e,r){if(typeof e>"u")throw new Error("leaf is required");e=Wt.bufferify(e);const n=[];if(!Number.isInteger(r)){r=-1;for(let s=0;sWt.bufferToHex(n.data))}verify(e,r,n){let s=Wt.bufferify(r);if(n=Wt.bufferify(n),!Array.isArray(e)||!r||!n)return!1;for(let i=0;ithis.toLeaf(r));return new Oae(e,{sortPairs:!0,sortLeaves:!0})}generateRoot(){return this.tree||(this.tree=this.generateTree()),this.tree.getHexRoot()}generateProof(e){if(!this.elements.includes(e))throw new Error("Element not found");return this.tree||(this.tree=this.generateTree()),this.tree.getHexProof(this.toLeaf(e))}verifyProof(e,r){if(!this.elements.includes(e))throw new Error("Element not found");return this.tree||(this.tree=this.generateTree()),this.tree.verify(r,this.toLeaf(e),this.generateRoot())}}const Nae=t=>to(["address","uint256"],[t.address.toLowerCase(),t.tokenId]),N0=(t,e,r)=>{const n=new Gt(t);return r&&n.setHeader("Authorization",`BEARER ${r}`),e&&n.setHeader("X-Access-Key",e),n};let _ae=class{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Dr(JSON.stringify(s,Mae))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Mae(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Dae(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function Bae(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function Lae(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const jae=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),PM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},OM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},RM=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},Fae=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),NM=t=>{const e=Eg({},t.types);return delete e.EIP712Domain,Bs.hash(t.domain,e,t.message)},Ad=t=>Q(NM(t)),{defineProperties:Uae,resolveProperties:$ae}=_oe,Wae=t=>t.replace(/([^:]\/)\/+/g,"$1"),Vae=Object.freeze(Object.defineProperty({__proto__:null,Logger:TM,MAX_UINT_256:bM,MerkleTreeGenerator:Rae,PromiseCache:_ae,base64Decode:Iae,base64DecodeObject:l5,base64Encode:Tae,base64EncodeObject:c5,bigintReplacer:Ts,bigintReviver:Jv,configureLogger:IM,defineProperties:Uae,encodeMessageDigest:u5,encodeTypedDataDigest:Ad,encodeTypedDataHash:NM,extractProjectIdFromAccessKey:kae,formatEther:Aae,formatUnits:CM,getFetchRequest:N0,getRandomInt:jae,getSaleItemsLeaf:Nae,isBigNumberish:wM,isBrowser:Pae,isNode:SM,jwtDecodeClaims:AM,logger:Te,packMessageData:kM,parseEther:Sae,parseUnits:EM,promisify:Dae,queryStringFromObject:Bae,queryStringToObject:Lae,resolveProperties:$ae,sanitizeAlphanumeric:OM,sanitizeHost:RM,sanitizeNumberString:PM,sleep:Fae,subDigestOf:O2,toHexString:Zc,urlClean:Wae},Symbol.toStringTag,{value:"Module"}));function id(){return id=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Number(t),Hae=t=>{if(t)return _M(t)},MM=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const s=n.map(l=>l.chainId).sort(),i=s.filter((l,u)=>s.indexOf(l)!==u);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(MM(t,!0,e),t),Gae=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},qae=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},BM=t=>DM(LM(t)),Ns=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Number(e);return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(typeof e=="bigint"){const r=Number(e);return t.find(n=>n.chainId===r)}else return}},Kae=(t,e)=>t?t.name===e||t.chainId===e:!1,Qae=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Yv=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",jM=t=>Yv("https://${network}-indexer.sequence.app",{network:t}),FM=t=>Yv("https://${network}-relayer.sequence.app",{network:t}),UM=t=>Yv("https://nodes.sequence.app/${network}",{network:t});function f5(t){return Ns(od,t)}function $M(t){return typeof t=="bigint"?t:wM(t)?BigInt(t):BigInt(t.chainId)}const De=(t,e)=>{const r=R0[t];if(!r)throw new Error(`Network with chainId ${t} not found`);const n=UM(r.name);return id({},r,{rpcUrl:n,indexerUrl:jM(r.name),relayer:{url:FM(r.name),provider:{url:n}}},e)},WM=[id({},R0[M.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),id({},R0[M.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})],od=BM([id({},De(M.POLYGON),{isDefaultChain:!0,isAuthChain:!0}),De(M.MAINNET),De(M.BSC),De(M.AVALANCHE),De(M.ARBITRUM),De(M.ARBITRUM_NOVA),De(M.OPTIMISM),De(M.OPTIMISM_SEPOLIA),De(M.POLYGON_ZKEVM),De(M.GNOSIS),De(M.RINKEBY,{disabled:!0}),De(M.GOERLI,{disabled:!0}),De(M.SEPOLIA),De(M.POLYGON_MUMBAI,{disabled:!0}),De(M.POLYGON_AMOY),De(M.BSC_TESTNET),De(M.ARBITRUM_SEPOLIA),De(M.BASE),De(M.BASE_SEPOLIA),De(M.HOMEVERSE),De(M.HOMEVERSE_TESTNET),De(M.XAI),De(M.XAI_SEPOLIA),De(M.AVALANCHE_TESTNET),De(M.XR_SEPOLIA),De(M.B3),De(M.B3_SEPOLIA),De(M.APECHAIN),De(M.APECHAIN_TESTNET),De(M.BLAST),De(M.BLAST_SEPOLIA),De(M.TELOS),De(M.BORNE_TESTNET),De(M.SKALE_NEBULA),De(M.SKALE_NEBULA_TESTNET),De(M.SONEIUM_MINATO),De(M.TOY_TESTNET),De(M.IMMUTABLE_ZKEVM),De(M.IMMUTABLE_ZKEVM_TESTNET),De(M.ROOT_NETWORK),De(M.ROOT_NETWORK_PORCINI),...WM]);class VM{constructor(e,r){this.sender=void 0,this.handler=void 0,this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=zM(e,this.sender)}request(e){return this.handler.request(e)}}const zM=(t,e)=>{if(t.length===0)return e;const r=s=>s.requestHandler?s.requestHandler:s;let n;n=r(t[t.length-1])(e.request);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return{request:n}};function HM(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function GM(t){return t!==void 0&&t.send!==void 0}class qM{constructor(e,r){this.provider=void 0,this.defaultChainId=void 0,this.request=n=>(n.chainId||(n.chainId=this.defaultChainId),this.provider(n)),GM(e)?this.provider=n=>e.send(n.method,n.params,n.chainId):HM(e)?this.provider=n=>e.send(n.method,n.params||[]):this.provider=e,this.defaultChainId=r}send(e,r,n){const s={method:e,params:r,chainId:n};return this.request(s)}}class Jae{constructor(e){this.requestHandler=void 0,this.isAllowedFunc=void 0,e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.requestHandler=R2(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.requestHandler=R2(this.isAllowedFunc)}}const R2=t=>e=>r=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");return e(r)};class d5{constructor(e){var r=this;this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cache=void 0,this.cacheByBlock=void 0,this.cacheByBlockResetLock=!1,this.onUpdateCallback=void 0,this.defaultChainId=void 0,this.requestHandler=n=>async function(s){if(r.cachableJsonRpcMethods.includes(s.method)||r.cachableJsonRpcMethodsByBlock.includes(s.method)){const o=r.cacheKey(s.method,s.params,s.chainId||r.defaultChainId),a=r.getCacheValue(o);if(a&&a!=="")return{id:s.id,result:a}}const i=await n(s);if((r.cachableJsonRpcMethods.includes(s.method)||r.cachableJsonRpcMethodsByBlock.includes(s.method))&&i&&r.shouldCacheResponse(s,i)){const o=r.cacheKey(s.method,s.params,s.chainId||r.defaultChainId);r.cachableJsonRpcMethods.includes(s.method)?r.setCacheValue(o,i):r.setCacheByBlockValue(o,i)}return i},this.cacheKey=(n,s,i)=>{let o="";return i?o=`${i}:${n}:`:o=`:${n}:`,!s||s.length===0?o+"[]":o+JSON.stringify(s)},this.getCache=()=>this.cache,this.setCache=n=>{this.cache=n,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=n=>{if(this.cache[n])return this.cache[n];if(this.cacheByBlock[n])return this.cacheByBlock[n]},this.setCacheValue=(n,s)=>{this.cache[n]=s,this.onUpdateCallback&&this.onUpdateCallback(n,s)},this.setCacheByBlockValue=(n,s)=>{this.cacheByBlock[n]=s,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(n,s)=>!(!s||n.method==="eth_getCode"&&s.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class KM{constructor(e){var r=this;this.options=void 0,this.requestHandler=n=>async function(s){switch(s.method){case"net_version":if(r.options.chainId)return`${r.options.chainId}`;break;case"eth_chainId":if(r.options.chainId)return yr(r.options.chainId);break;case"eth_accounts":if(r.options.accountAddress)return[Ae(r.options.accountAddress)];break;case"sequence_getWalletContext":if(r.options.walletContext)return r.options.walletContext;break}return n(s)},this.options=e}}const QM=t=>async e=>{try{return await t(e)}catch(r){throw typeof r=="string"?new Error(r):new Error(r.message)}},JM=t=>async e=>{const r=e.chainId?` chainId:${e.chainId}`:"";Te.info(`[provider request]${r} id:${e.id} method:${e.method} params:`,e.params);try{const n=await t(e);return Te.info(`[provider response]${r} id:${e.id} method:${e.method} params:`,e.params,"result:",n),n}catch(n){Te.warn(`[provider response]${r} id:${e.id} method:${e.method} params:`,e.params,"error:",n)}},Yae=t=>e=>async r=>{const n=t(r);switch(r.method){case"net_version":return`${n}`;case"eth_chainId":return yr(n)}return e(r)},YM=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class Xae{constructor(e){this.provider=void 0,this.requestHandler=r=>n=>YM.includes(n.method)?this.provider.request(n):r(n),this.provider=e}}class Zae{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...YM],this.provider=void 0,this.rpcUrl=void 0,this.requestHandler=r=>n=>this.provider&&!this.privateJsonRpcMethods.includes(n.method)?this.provider.send(n.method,n.params||[]):(Te.debug("[public-provider] sending request to signer window",n.method),r(n)),e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new cr(e))}}class XM{constructor(){var e=this;this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.inflight=void 0,this.requestHandler=r=>async function(n){if(!e.singleflightJsonRpcMethods.includes(n.method))return r(n);const s=e.requestKey(n.method,n.params||[],n.chainId);if(!e.inflight[s])e.inflight[s]=[];else return new Promise((i,o)=>{e.inflight[s].push({id:n.id,callback:(a,c)=>{a?o(a):i(c)}})});try{const i=await r(n);return e.inflight[s].forEach(({callback:o})=>o(void 0,i)),i}catch(i){throw e.inflight[s].forEach(({callback:o})=>o(i,void 0)),i}finally{delete e.inflight[s]}},this.requestKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+JSON.stringify(n)},this.inflight={}}}function $l(t,e){if(!{}.hasOwnProperty.call(t,e))throw new TypeError("attempted to use private field on non-instance");return t}var ece=0;function h5(t){return"__private_"+ece+++"_"+t}var Ya=h5("chainId"),Gx=h5("nextId"),Hd=h5("sender");class ZM extends cr{constructor(e,r,n){var s;super(e,r==null?void 0:r.chainId,n),s=this,this.url=e,Object.defineProperty(this,Ya,{writable:!0,value:void 0}),Object.defineProperty(this,Gx,{writable:!0,value:1}),Object.defineProperty(this,Hd,{writable:!0,value:void 0}),this.fetch=async function(l){if(s.url===void 0)throw new Error("missing provider URL");const{method:u,params:f}=l,d={method:u,params:f,id:$l(s,Gx)[Gx]++,jsonrpc:"2.0"},h=typeof s.url=="string"?new Gt(s.url):s.url;h.body=JSON.stringify(d);try{const y=await h.send();if(y.body)try{const p=JSON.parse(Ds(y.body));return tce(p)}catch{throw new Error("invalid JSON response")}return null}catch(y){throw y}};const i=r==null?void 0:r.chainId,o=r==null?void 0:r.middlewares,a=r==null?void 0:r.blockCache;$l(this,Ya)[Ya]=i;const c=new VM(o??[new KM({chainId:i}),new XM,new d5({defaultChainId:i,blockCache:a})],new qM(this.fetch,i));$l(this,Hd)[Hd]=c}async request(e){return $l(this,Hd)[Hd].request(e)}async send(e,r,n){return this.request({method:e,params:r,chainId:n})}async getNetwork(){const e=$l(this,Ya)[Ya];if(e){const r=R0[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return lt.from({name:n,chainId:e,ensAddress:s})}else{const r=await this.send("eth_chainId",[]);return $l(this,Ya)[Ya]=Number(r),this.getNetwork()}}}function tce(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const rce=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:Jae,CachedProvider:d5,ChainId:M,EagerProvider:KM,JsonRpcHandler:qM,JsonRpcProvider:ZM,JsonRpcRouter:VM,NetworkType:Ie,PublicProvider:Zae,SigningProvider:Xae,SingleflightMiddleware:XM,allNetworks:od,allowProviderMiddleware:R2,checkNetworkConfig:Kae,createJsonRpcMiddlewareStack:zM,ensureUniqueNetworks:Gae,ensureValidNetworks:DM,exceptionProviderMiddleware:QM,findNetworkConfig:Ns,findSupportedNetwork:f5,getChainId:_M,hardhatNetworks:WM,indexerURL:jM,isJsonRpcProvider:HM,isJsonRpcSender:GM,isNetworkConfig:zae,isValidNetworkConfig:MM,loggingProviderMiddleware:JM,maybeChainId:Hae,networkProviderMiddleware:Yae,networks:R0,networksIndex:Qae,nodesURL:UM,relayerURL:FM,sortNetworks:LM,stringTemplate:Yv,toChainIdNumber:$M,updateNetworkConfig:qae,validateAndSortNetworks:BM},Symbol.toStringTag,{value:"Module"}));function gr(){return gr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(y5(s))return Le(["uint8","uint8","address"],[el.Address,s.weight,s.address]);if(s.isDynamic){const i=Q(s.signature);return Le(["uint8","uint8","address","uint16","bytes"],[el.DynamicSignature,s.weight,s.address,i.length,i])}return Le(["uint8","uint8","bytes"],[el.EOASignature,s.weight,s.signature])});return Le(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function iD(t,e,r){const n=I1(e),s=await Promise.all(t.signers.map(async i=>{if(y5(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!p5(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:P1(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function Rh(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=0n;const i=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=Q(c.signature);return s+=BigInt(a.weight),c.isDynamic||l.length!==66?gr({},a,{isDynamic:!0,signature:c.signature,address:a.address}):gr({},a,{isDynamic:!1,signature:c.signature})});return{encoded:g5({version:1,threshold:t.threshold,signers:i}),weight:s}}const v5={decode:t=>sD(t),encode:t=>g5(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>iD(t,e,r),encodeSigners:(t,e,r,n)=>Rh(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=v5.encodeSigners(t,e,[],0);return r>=BigInt(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var uce=Object.freeze({__proto__:null,SignaturePartType:el,isAddressMember:y5,isUnrecoveredSignatureMember:rD,isUnrecoveredSignature:nD,decodeSignature:sD,encodeSignature:g5,recoverSignature:iD,encodeSigners:Rh,SignatureCoder:v5});const m5={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Me(qt.defaultAbiCoder().encode(["bytes32","uint8","address"],[e,r.weight,r.address])),Le(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>0n,signersOf:t=>t.signers.map(e=>({address:e.address,weight:Number(e.weight)})),fromSimple:t=>{if(BigInt(t.checkpoint)!==0n)throw new Error("v1 wallet config does not support checkpoint");if(t.subdigests&&t.subdigests.length>0)throw new Error("v1 wallet config does not support subdigests");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new ut([...Ht.mainModule.abi,...Ht.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[m5.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:BigInt(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:BigInt(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:BigInt(n.weight),address:n.address}));return{version:e.version,threshold:BigInt(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&BigInt(e.checkpoint)!==0n)throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=Rh(t,r,[]);if(a>=BigInt(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Number(i)-Number(o))){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=Rh(t,r,[]);if(a>=BigInt(t.threshold))return o}return Rh(t,r,[]).encoded}};var fce=Object.freeze({__proto__:null,ConfigCoder:m5}),dce=Object.freeze({__proto__:null});const oD=1,aD={version:oD,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Hi=Object.freeze({__proto__:null,config:fce,context:dce,signature:uce,version:oD,DeployedWalletContext:aD});const x5="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function cD(t){return Me(lD(t))}function lD(t){return Le(["bytes32","bytes32"],[x5,t])}function uD(t){const e=Q(t);if(e.length===64&&z(e.slice(0,32))===x5)return z(e.slice(32,64))}function hce(t){return uD(t)!==void 0}var pce=Object.freeze({__proto__:null,SetImageHashPrefix:x5,hashSetImageHash:cD,messageSetImageHash:lD,decodeMessageSetImageHash:uD,isMessageSetImageHash:hce});let Xt=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Pt=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const Cg=66;function wl(t){return t.left!==void 0&&t.right!==void 0}function Td(t){return t.tree!==void 0}function O1(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function kg(t){let e=Q(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case Pt.Signature:{const i=e[0],o=z(e.slice(1,Cg+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(Cg+1)}break;case Pt.Address:{const i=e[0],o=Ae(z(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case Pt.DynamicSignature:{const i=e[0],o=Ae(z(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=z(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Pt.Node:{const i=z(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case Pt.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=kg(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case Pt.Subdigest:{const i=z(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case Pt.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=kg(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${z(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class fD extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function tl(t,e,r){if(wl(t)){const[n,s]=await Promise.all([tl(t.left,e,r),tl(t.right,e,r)]);return{left:n,right:s}}if(Td(t))return{weight:t.weight,threshold:t.threshold,tree:await tl(t.tree,e,r)};if(O1(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await p5(t.address,e,t.signature,r))throw new fD(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:P1(e,t.signature),signature:t.signature,subdigest:e};return t}const Ar={concat:(t,e)=>Le(["bytes","bytes"],[t,e]),node:t=>Le(["uint8","bytes32"],[Pt.Node,t]),branch:t=>{const e=Q(t);return Le(["uint8","uint24","bytes"],[Pt.Branch,e.length,e])},nested:(t,e,r)=>{const n=Q(r);return Le(["uint8","uint8","uint16","uint24","bytes"],[Pt.Nested,t,e,n.length,n])},subdigest:t=>Le(["uint8","bytes32"],[Pt.Subdigest,t]),signature:(t,e)=>Le(["uint8","uint8","bytes"],[Pt.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=Q(r);return Le(["uint8","uint8","address","uint24","bytes"],[Pt.DynamicSignature,t,e,n.length,n])},address:(t,e)=>Le(["uint8","uint8","address"],[Pt.Address,t,e])};function Nh(t,e,r,n,s={}){const i=_h(t.tree,e,r,s);return BigInt(n)===0n?{encoded:Le(["uint8","uint16","uint32","bytes"],[Xt.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:BigInt(t.threshold)>255n?{encoded:Le(["uint8","uint16","uint32","bytes"],[Xt.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:Le(["uint8","uint8","uint32","bytes"],[Xt.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function _h(t,e,r,n={}){const s=!n.disableTrim;if(js(t)){const i=_h(t.left,e,r),o=_h(t.right,e,r),a=Kr(t.left),c=Kr(t.right);return s&&i.weight===0n&&o.weight===0n&&!a&&!c?{encoded:Ar.node(Zn(t)),weight:0n}:s&&o.weight===0n&&!c?{encoded:Ar.concat(i.encoded,Ar.node(Zn(t.right))),weight:i.weight}:s&&i.weight===0n&&!a?{encoded:Ar.concat(Ar.node(Zn(t.left)),Ar.branch(o.encoded)),weight:o.weight}:{encoded:Ar.concat(i.encoded,Ar.branch(o.encoded)),weight:i.weight+o.weight}}if(xo(t)){const i=_h(t.tree,e,r);return s&&i.weight===0n?{encoded:Ar.node(Zn(t)),weight:0n}:{encoded:Ar.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(bo(t))return{encoded:Ar.node(Zn(t)),weight:0n};if(mo(t)){const i=r.includes(t.subdigest);return{encoded:Ar.subdigest(t.subdigest),weight:i?bM:0n}}if(Kr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:Ar.dynamicSignature(t.weight,t.address,a),weight:BigInt(t.weight)}:{encoded:Ar.signature(t.weight,a),weight:BigInt(t.weight)}}else return{encoded:Ar.address(t.weight,t.address),weight:0n};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function b5(t){return E5(t)?b5(t.suffix[t.suffix.length-1]):t.config}function w5(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function R1(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(w5)}function dD(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function E5(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(dD)}function Xv(t){const e=Q(t),r=e[0];switch(r){case Xt.Legacy:return{version:2,type:Xt.Legacy,decoded:dy(e)};case Xt.Dynamic:return{version:2,type:Xt.Dynamic,decoded:dy(e.slice(1))};case Xt.NoChainIdDynamic:return{version:2,type:Xt.NoChainIdDynamic,decoded:dy(e.slice(1))};case Xt.Chained:return hD(e);default:throw new Error(`Invalid signature type: ${r}`)}}function dy(t){const e=Q(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=kg(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function hD(t){const e=Q(t),r=e[0];if(r!==Xt.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sQ(Ca(i))),s=Le(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return Le(["uint8","bytes"],[Xt.Chained,s])}function Ca(t){if(mi(t))return z(t);if(R1(t)||E5(t))return Zv(Ca(t),(t.suffix||[]).map(Ca));const e=w5(t)?t.decoded:t.config;switch(t.type){case Xt.Legacy:if(BigInt(e.threshold)>255n)throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return N2(e);case Xt.NoChainIdDynamic:case Xt.Dynamic:return Le(["uint8","bytes"],[t.type,N2(e)]);case Xt.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function N2(t){return Le(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,Mh(t.tree)])}function Mh(t){if(js(t)||wl(t)){const e=Q(Mh(t.right)),r=Q(Mh(t.left));return js(t.right)||wl(t.right)?Le(["bytes","uint8","uint24","bytes"],[r,Pt.Branch,e.length,e]):Le(["bytes","bytes"],[r,e])}if(xo(t)||Td(t)){const e=Q(Mh(t.tree));return Le(["uint8","uint8","uint16","uint24","bytes"],[Pt.Nested,t.weight,t.threshold,e.length,e])}if(O1(t)||Kr(t)&&t.signature!==void 0){const e=Q(t.signature);if(t.isDynamic||e.length!==Cg){if(!t.address)throw new Error("Dynamic signature leaf must have address");return Le(["uint8","uint8","address","uint24","bytes"],[Pt.DynamicSignature,t.weight,t.address,e.length,e])}else return Le(["uint8","uint8","bytes"],[Pt.Signature,t.weight,e])}if(Kr(t))return Le(["uint8","uint8","address"],[Pt.Address,t.weight,t.address]);if(bo(t))return Le(["uint8","bytes32"],[Pt.Node,t.nodeHash]);if(mo(t))return Le(["uint8","bytes32"],[Pt.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Dh(t){return js(t)?[...Dh(t.left),...Dh(t.right)]:xo(t)?Dh(t.tree):Kr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Bh(t){return wl(t)?[...Bh(t.left),...Bh(t.right)]:Td(t)?Bh(t.tree):O1(t)?[t.signature]:[]}function hy(t){return wl(t)?[...hy(t.left),...hy(t.right)]:Td(t)?hy(t.tree):mo(t)?[t.subdigest]:[]}async function Sg(t){const e=typeof t=="string"?Xv(t):t;if(R1(e)){const n=await Promise.all([Sg(gr({},e,{suffix:void 0})),...e.suffix.map(s=>Sg(s))]);return Zv(n[0],n.slice(1))}const{trimmed:r}=await Lh(e.decoded.tree);return Ca(gr({},e,{decoded:gr({},e.decoded,{tree:r})}))}async function Lh(t,e=!0){if(wl(t)){const[r,n]=await Promise.all([Lh(t.left),Lh(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await tl(t,yl,void 0);return{weight:0,trimmed:{nodeHash:Zn(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Td(t)){const r=await Lh(t.tree);if(r.weight===0)try{const n=await tl(t,yl,void 0);return{weight:0,trimmed:{nodeHash:Zn(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return bo(t)&&vD(t.nodeHash)?{weight:0,trimmed:gr({},gD(t.nodeHash))}:O1(t)||Kr(t)&&t.signature!==void 0?{weight:Number(t.weight),trimmed:t}:!e&&mo(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const em={decode:t=>Xv(t),encode:t=>Ca(t),trim:t=>Sg(t),supportsNoChainId:!0,recover:(t,e,r)=>C5(t,e,r),encodeSigners:(t,e,r,n)=>Nh(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=em.encodeSigners(t,e,[],0);return r>=BigInt(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=mi(t)?t:Ca(t),s=r.map(i=>mi(i)?i:Ca(i));return Zv(n,s)},hashSetImageHash:function(t){return cD(t)},signaturesOf(t){return Dh(t.tree)},signaturesOfDecoded:function(t){return Bh(t.decoded.tree)}};var yce=Object.freeze({__proto__:null,SignatureType:Xt,SignaturePartType:Pt,SignaturePartTypeLength:Cg,isUnrecoveredNode:wl,isUnrecoveredNestedLeaf:Td,isUnrecoveredSignatureLeaf:O1,decodeSignatureTree:kg,InvalidSignatureLeafError:fD,recoverTopology:tl,partEncoder:Ar,encodeSigners:Nh,encodeTree:_h,deepestConfigOfSignature:b5,isUnrecoveredSignature:w5,isUnrecoveredChainedSignature:R1,isSignature:dD,isChainedSignature:E5,decodeSignature:Xv,decodeSignatureBody:dy,decodeChainedSignature:hD,setImageHashStruct:pD,recoverSignature:C5,encodeChain:Zv,encodeSignature:Ca,encodeSignatureBody:N2,encodeSignatureTree:Mh,signaturesOf:Dh,signaturesOfDecoded:Bh,subdigestsOfDecoded:hy,trimSignature:Sg,trimUnrecoveredTree:Lh,SignatureCoder:em});function Kr(t){return t.address!==void 0&&t.weight!==void 0}function mo(t){return t.subdigest!==void 0&&t.address===void 0}function jh(t){return js(t)?JSON.stringify({left:jh(t.left),right:jh(t.right)}):xo(t)?JSON.stringify({weight:BigInt(t.weight).toString(),threshold:BigInt(t.threshold).toString(),tree:jh(t.tree)}):Kr(t)?JSON.stringify({address:t.address,weight:BigInt(t.weight).toString()}):JSON.stringify(t)}function Fh(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Fh(e.left),right:Fh(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:BigInt(e.weight),threshold:BigInt(e.threshold),tree:Fh(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:BigInt(e.weight)}:e}function xo(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function bo(t){return t.nodeHash!==void 0}function k5(t){return Kr(t)||mo(t)||xo(t)||bo(t)}function js(t){return t.left!==void 0&&t.right!==void 0}function gce(t){return js(t)||k5(t)}function yD(t){return Le(["uint96","address"],[t.weight,t.address])}function gD(t){const e=Q(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=BigInt(z(e.slice(0,12))),n=Ae(z(e.slice(12)));return{weight:r,address:n}}function vD(t){const e=Q(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function Zn(t){if(Kr(t))return yD(t);if(mo(t))return to(["string","bytes32"],[`Sequence static digest: -`,t.subdigest]);if(xo(t)){const e=Zn(t.tree);return to(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return bo(t)?t.nodeHash:to(["bytes32","bytes32"],[Zn(t.left),Zn(t.right)])}function vce(t){const e=[];let r=t;for(;!k5(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function mce(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function S5(t){return to(["bytes32","uint256"],[to(["bytes32","uint256"],[Zn(t.tree),t.threshold]),t.checkpoint])}function mD(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function Bu(t){return Kr(t)||mo(t)?[t]:xo(t)?[{threshold:t.threshold,weight:t.weight,members:Bu(t.tree)}]:bo(t)?[]:[...Bu(t.left),...Bu(t.right)]}function _2(t){return bo(t)?!0:js(t)?_2(t.left)||_2(t.right):!1}function xce(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:Bu(t.tree)}}const xD=(t,e)=>t.map(r=>mD(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function A5(t){if(t.length===0)throw new Error("Empty members array");return xD(t,A5).reduce((r,n)=>({left:r,right:n}))}function T5(t){if(t.length===0)throw new Error("Empty members array");const e=xD(t,T5);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function I5(t){return t.length>8?T5(t):A5(t)}function bD(t,e=I5){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Ag(t,e){return mo(t)?t.subdigest===e:js(t)?Ag(t.left,e)||Ag(t.right,e):!1}function M2(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();xo(n)?e.push(n.tree):js(n)?(e.push(n.left),e.push(n.right)):Kr(n)&&r.add({address:n.address,weight:Number(n.weight)})}return Array.from(r)}function Tg(t){return js(t)?Tg(t.left)&&Tg(t.right):!bo(t)}const tm={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>S5(t),hasSubdigest:(t,e)=>Ag(t.tree,e),checkpointOf:t=>BigInt(t.checkpoint),signersOf:t=>M2(t.tree),fromSimple:t=>{var e;return bD(gr({},t,{members:[...t.signers,...((e=t.subdigests)!=null?e:[]).map(r=>({subdigest:r}))]}))},isComplete:t=>Tg(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new ut(Ht.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[tm.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new ut(Ht.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=i.decodeFunctionData(i.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(BigInt((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0)!==0n)throw new Error("Invalid transaction bundle, expected value to be 0");if(BigInt((n=(s=t.transactions[0])==null?void 0:s.gasLimit)!=null?n:0)!==0n)throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:BigInt(t.threshold).toString(),checkpoint:BigInt(t.checkpoint).toString(),tree:jh(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:BigInt(e.threshold),checkpoint:BigInt(e.checkpoint),tree:Fh(e.tree)}},editConfig:function(t,e){var r,n;const s=Bu(t.tree);if(e.add)for(const i of e.add)s.find(o=>Kr(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Kr(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:I5(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=Nh(t,r,[],0);if(a>=BigInt(t.threshold))return o}const n=M2(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){r.set(s,{signature:"0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02",isDynamic:!1});const{encoded:o,weight:a}=Nh(t,r,[],0);if(a>=BigInt(t.threshold))return o}return Nh(t,r,[],0).encoded}};var bce=Object.freeze({__proto__:null,isSignerLeaf:Kr,isSubdigestLeaf:mo,topologyToJSON:jh,topologyFromJSON:Fh,isNestedLeaf:xo,isNodeLeaf:bo,isLeaf:k5,isNode:js,isTopology:gce,encodeSignerLeaf:yD,decodeSignerLeaf:gD,isEncodedSignerLeaf:vD,hashNode:Zn,leftFace:vce,isWalletConfig:mce,imageHash:S5,isSimpleNestedMember:mD,topologyToMembers:Bu,hasUnknownNodes:_2,toSimpleWalletConfig:xce,legacyTopologyBuilder:A5,merkleTopologyBuilder:T5,optimized2SignersTopologyBuilder:I5,toWalletConfig:bD,hasSubdigest:Ag,signersOf:M2,isComplete:Tg,ConfigCoder:tm}),wce=Object.freeze({__proto__:null});const Ece={config:tm,signature:em},wD=2,ED={version:wD,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ne=Object.freeze({__proto__:null,config:bce,signature:yce,context:wce,chained:pce,coders:Ece,version:wD,DeployedWalletContext:ED}),Cce=Object.freeze({__proto__:null});function D2(t,e){const r=Me(Le(["bytes","bytes32"],[t.walletCreationCode,ss(t.mainModule,32)])),n=Me(Le(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ae(at(n,12))}async function kce(t,e,r,n,s,i){return(await Promise.all(MD.map(async a=>{try{const c=a.signature.SignatureCoder.decode(z(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:z(e),chainId:n},s),u=a.config.ConfigCoder.imageHashOf(l.config);if(D2(i[a.version],u).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:z(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return D2(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Sce(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Ace(t){const e=Object.keys(t).length;return t[e]}const Tce={1:aD,2:ED};var Ice=Object.freeze({__proto__:null,addressOf:D2,isValidCounterfactual:kce,isValidVersionedContext:Sce,latestContext:Ace,defaultContexts:Tce});const rm=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`;function Pce(t,e,r,n){return gr({},t,{chainId:r,intent:{id:n,wallet:e}})}function Oce(t){return Me(qt.defaultAbiCoder().encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Rce(t){const e=qt.defaultAbiCoder().decode(["uint256",rm],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function CD(t,e){return qt.defaultAbiCoder().encode(["uint256",rm],[t,_0(e)])}function kD(t,e){return Me(CD(t,e))}function Nce(t,e,r,n){return I1({address:t,chainId:e,digest:kD(r,n)})}function _ce(t,e,r){return I1({address:t,chainId:e,digest:Me(qt.defaultAbiCoder().encode(["string",rm],["guest:",_0(r)]))})}function SD(t,e){return e.map(r=>P5(t,r))}function P5(t,e){if(e.to&&e.to!==xi)return{nonce:Uh(e.nonce)?void 0:BigInt(e.nonce),transaction:{delegateCall:!1,revertOnError:!1,gasLimit:Uh(e.gasLimit)?void 0:BigInt(e.gasLimit),to:e.to,value:BigInt(e.value||0),data:e.data||"0x"}};{const r=new ut(Ht.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:typeof e.nonce=="number"?BigInt(e.nonce):void 0,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:Uh(e.gasLimit)?void 0:BigInt(e.gasLimit),to:t,value:BigInt(e.value||0),data:n}}}}function nm(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function AD(t){return t.every(nm)}function _0(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:Uh(e.gasLimit)?0n:BigInt(e.gasLimit),target:(r=e.to)!=null?r:xi,value:Uh(e.value)?0n:e.value,data:e.data||"0x"}})}function Mce(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function Dce(t,e){const r=BigInt(t),n=BigInt(e),s=2n**96n;if(n/s!==0n)throw new Error("Space already encoded");return n+r*s}function Bce(t){const e=BigInt(t),r=2n**96n;return[e/r,e%r]}function Lce(t,e){return Array.isArray(e)?AD(e)?e:SD(t,e).map(n=>n.transaction):nm(e)?[e]:[P5(t,e).transaction]}function TD(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&nm(r),!0)}function ID(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&TD(t)}function jce(t){const e=new ut(Ht.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),ID(t)?[_0(t.transactions),t.nonce,t.signature]:[_0(t.transactions),0,new Uint8Array([])])}const PD="0x61c2926c",OD=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`,B2=(t,e)=>{const r=[],n=new ut(Ht.mainModule.abi);for(const s of e){const i=Q(s.data||"0x");if(s.to===t&&z(i.slice(0,4))===PD){const o=i.slice(4),a=qt.defaultAbiCoder().decode([OD],o)[0];r.push(...B2(s.to,a.map(c=>gr({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=B2(t,o.map(c=>gr({},c.toObject(),{to:c.target})));r.push(...a)}catch{r.push(s)}}return r},Uh=t=>t==null;var Fce=Object.freeze({__proto__:null,MetaTransactionsType:rm,intendTransactionBundle:Pce,intendedTransactionID:Oce,unpackMetaTransactionsData:Rce,packMetaTransactionsData:CD,digestOfTransactions:kD,subdigestOfTransactions:Nce,subdigestOfGuestModuleTransactions:_ce,toSequenceTransactions:SD,toSequenceTransaction:P5,isSequenceTransaction:nm,hasSequenceTransactions:AD,sequenceTxAbiEncode:_0,fromTxAbiEncode:Mce,encodeNonce:Dce,decodeNonce:Bce,fromTransactionish:Lce,isTransactionBundle:TD,isSignedTransactionBundle:ID,encodeBundleExecData:jce,selfExecuteSelector:PD,selfExecuteAbi:OD,unwind:B2});const RD="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",Uce="0x6492649264926492649264926492649264926492649264926492649264926492";async function ND(t,e,r,n){try{return await t.call({data:Fe([RD,qt.defaultAbiCoder().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}catch{return!1}}var $ce=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:RD,EIP_6492_SUFFIX:Uce,validateEIP6492Offchain:ND});class Wce{constructor(e){this.provider=e,this.isDeployedCache=new Set}module(e){return new dn(e,[...Ht.mainModuleUpgradable.abi,...Ht.mainModule.abi,...Ht.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>Q(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=qt.defaultAbiCoder().encode(["address"],[e]),n=await this.provider.getStorage(e,r).then(s=>Q(s));if(n.length===20)return Ae(z(n));if(n.length===32)return qt.defaultAbiCoder().decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return ND(this.provider,e,r,n)}}var Vce=Object.freeze({__proto__:null,OnChainReader:Wce});function zce(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var de=Object.freeze({__proto__:null,config:Cce,signature:nce,context:Ice,signer:lce,EIP1271:oce,transaction:Fce,reader:Vce,EIP6492:$ce,isWalletSignRequestMetadata:zce});const L2=[{config:m5,signature:v5},{config:tm,signature:em}];function _D(t){const e=t-1;if(e<0||e>=L2.length)throw new Error(`No coder for version: ${t}`);return L2[e]}function Hce(t){return _D(t)}var Zt=Object.freeze({__proto__:null,ALL_CODERS:L2,coderFor:_D,genericCoderFor:Hce});const Wr="2.1.4",MD=[Hi,Ne],Gce=Object.freeze(Object.defineProperty({__proto__:null,VERSION:Wr,allVersions:MD,commons:de,universal:Zt,v1:Hi,v2:Ne},Symbol.toStringTag,{value:"Module"}));function qce(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:s,chainId:i}=e;let o=n,a=s;const c=Object.values(this.contexts),l=[];for(let u=1;uQ(i).length===0))return C8;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Number(s),gasLimit:Number(s)}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const i=await new dn(e,Ht.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return de.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=de.transaction.intendedTransactionID(e));let o=!1;const a=async function(u,f){let d=0;for(;!o;){try{return await u()}catch(h){if(d++,s!==void 0&&d>=s)throw Te.error(`giving up after ${d} failed attempts${f?`: ${f}`:""}`,h),h;Te.warn(`attempt #${d} failed${f?`: ${f}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${f?`: ${f}`:""}`)},c=async function(){let u=i.fromBlockLog;if(u<0&&(u=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+u),typeof e!="string")throw new Error("impossible");const f=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,u-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,u-i.deltaBlocksLog)} to ${d}`);u=d;const p=(await Promise.all(h.map(b=>a(()=>i.provider.getTransactionReceipt(b.transactionHash),`unable to get receipt for transaction ${b.transactionHash}`)))).find(b=>b==null?void 0:b.logs.find(g=>g.topics.length===0&&g.data.replace("0x","")===f||g.topics.length===1&&g.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&g.data.length>=64&&g.data.replace("0x","").startsWith(f)));if(p){const b=await a(()=>i.provider.getTransaction(p.hash),`unable to get transaction ${p.hash}`);if(!b)throw new Error(`Transaction response not found for ${e}`);const g=b;return g.receipt=p,g}o||await new Promise(b=>setTimeout(b,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function ele(t){return t&&typeof t=="object"&&typeof t.getNetwork=="function"&&typeof t.getBlockNumber=="function"}function tle(t){return typeof t=="object"&&W2(t.signer)}class rle extends FD{constructor(e){if(super(W2(e)?{provider:e.provider}:no({},e,{provider:e.signer.provider})),this.signer=void 0,this.txnOptions=void 0,this.signer=W2(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&Te.warn("LocalRelayer doesn't accept fee quotes");const s=de.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(no({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}function W2(t){return t&&typeof t=="object"&&typeof t.provider=="object"&&typeof t.getAddress=="function"&&typeof t.connect=="function"}const nle="v1",sle="v0.4.1",ile="1e27d0fd295aa5897878939595ef0c6adc54b1a3";let la=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),ole=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),ale=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),cle=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class UD{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Relayer/",this.ping=(n,s)=>this.fetch(this.url("Ping"),Ye({},n,s)).then(i=>Xe(i).then(o=>({status:o.status})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),Ye({},n,s)).then(i=>Xe(i).then(o=>({version:o.version})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),Ye({},n,s)).then(i=>Xe(i).then(o=>({status:o.status})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.getSequenceContext=(n,s)=>this.fetch(this.url("GetSequenceContext"),Ye({},n,s)).then(i=>Xe(i).then(o=>({data:o.data})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),Ye({},n,s)).then(i=>Xe(i).then(o=>({chainID:o.chainID})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.sendMetaTxn=(n,s,i)=>this.fetch(this.url("SendMetaTxn"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,txnHash:a.txnHash})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnNonce=(n,s,i)=>this.fetch(this.url("GetMetaTxnNonce"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({nonce:a.nonce})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnReceipt=(n,s,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({receipt:a.receipt})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.simulate=(n,s,i)=>this.fetch(this.url("Simulate"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({results:a.results})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.updateMetaTxnGasLimits=(n,s,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({payload:a.payload})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.feeTokens=(n,s)=>this.fetch(this.url("FeeTokens"),Ye({},n,s)).then(i=>Xe(i).then(o=>({isFeeRequired:o.isFeeRequired,tokens:o.tokens})),i=>{throw Je.new({cause:`fetch(): ${i.message||""}`})}),this.feeOptions=(n,s,i)=>this.fetch(this.url("FeeOptions"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({options:a.options,sponsored:a.sponsored,quote:a.quote})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTxnNetworkFeeOptions=(n,s,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({options:a.options})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getMetaTransactions=(n,s,i)=>this.fetch(this.url("GetMetaTransactions"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.sentTransactions=(n,s,i)=>this.fetch(this.url("SentTransactions"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.pendingTransactions=(n,s,i)=>this.fetch(this.url("PendingTransactions"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getGasTank=(n,s,i)=>this.fetch(this.url("GetGasTank"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({gasTank:a.gasTank})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.addGasTank=(n,s,i)=>this.fetch(this.url("AddGasTank"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,gasTank:a.gasTank})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.updateGasTank=(n,s,i)=>this.fetch(this.url("UpdateGasTank"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,gasTank:a.gasTank})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getGasSponsor=(n,s,i)=>this.fetch(this.url("GetGasSponsor"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({gasSponsor:a.gasSponsor})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.addressGasSponsors=(n,s,i)=>this.fetch(this.url("AddressGasSponsors"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,gasSponsors:a.gasSponsors})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.listGasSponsors=(n,s,i)=>this.fetch(this.url("ListGasSponsors"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,gasSponsors:a.gasSponsors})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.addGasSponsor=(n,s,i)=>this.fetch(this.url("AddGasSponsor"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,gasSponsor:a.gasSponsor})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.updateGasSponsor=(n,s,i)=>this.fetch(this.url("UpdateGasSponsor"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,gasSponsor:a.gasSponsor})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.removeGasSponsor=(n,s,i)=>this.fetch(this.url("RemoveGasSponsor"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.reportGasSponsorUsage=(n,s,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({gasSponsorUsage:a.gasSponsorUsage})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.nextGasTankBalanceAdjustmentNonce=(n,s,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({nonce:a.nonce})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.adjustGasTankBalance=(n,s,i)=>this.fetch(this.url("AdjustGasTankBalance"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({status:a.status,adjustment:a.adjustment})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.getGasTankBalanceAdjustment=(n,s,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({adjustment:a.adjustment})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.listGasTankBalanceAdjustments=(n,s,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),Ye(n,s,i)).then(o=>Xe(o).then(a=>({page:a.page,adjustments:a.adjustments})),o=>{throw Je.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Ye=(t={},e={},r=null)=>({method:"POST",headers:no({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Xe=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),O5.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(ule[n]||Bt).new(r)}return r});let Bt=class $D extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,$D.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},WD=class VD extends Bt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VD.prototype)}},Je=class zD extends Bt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zD.prototype)}},HD=class GD extends Bt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,GD.prototype)}},qD=class KD extends Bt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,KD.prototype)}},QD=class JD extends Bt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JD.prototype)}},O5=class YD extends Bt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,YD.prototype)}},XD=class ZD extends Bt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZD.prototype)}},eB=class tB extends Bt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tB.prototype)}},rB=class nB extends Bt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nB.prototype)}},sB=class iB extends Bt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,iB.prototype)}},oB=class aB extends Bt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aB.prototype)}},cB=class lB extends Bt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lB.prototype)}},uB=class fB extends Bt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fB.prototype)}},dB=class hB extends Bt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hB.prototype)}},pB=class yB extends Bt{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yB.prototype)}},gB=class vB extends Bt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vB.prototype)}},mB=class xB extends Bt{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xB.prototype)}},bB=class wB extends Bt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wB.prototype)}},EB=class CB extends Bt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,CB.prototype)}},lle=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.MethodNotFound="MethodNotFound",t.Aborted="Aborted",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.NotFound="NotFound",t}({});const ule={0:WD,[-1]:Je,[-2]:HD,[-3]:qD,[-4]:QD,[-5]:O5,[-6]:XD,[-7]:eB,[-8]:rB,[-9]:sB,[-10]:oB,1e3:cB,1001:uB,1003:dB,1005:pB,2001:gB,2002:mB,2003:bB,3e3:EB};var ad=Object.freeze({__proto__:null,WebRPCVersion:nle,WebRPCSchemaVersion:sle,WebRPCSchemaHash:ile,ETHTxnStatus:la,TransferType:ole,FeeTokenType:ale,SortOrder:cle,Relayer:UD,WebrpcError:Bt,WebrpcEndpointError:WD,WebrpcRequestFailedError:Je,WebrpcBadRouteError:HD,WebrpcBadMethodError:qD,WebrpcBadRequestError:QD,WebrpcBadResponseError:O5,WebrpcServerPanicError:XD,WebrpcInternalErrorError:eB,WebrpcClientDisconnectedError:rB,WebrpcStreamLostError:sB,WebrpcStreamFinishedError:oB,UnauthorizedError:cB,PermissionDeniedError:uB,MethodNotFoundError:dB,AbortedError:pB,InvalidArgumentError:gB,UnavailableError:mB,QueryFailedError:bB,NotFoundError:EB,errors:lle});const fle=[la.DROPPED,la.SUCCEEDED,la.PARTIALLY_FAILED,la.FAILED],dle=[la.DROPPED,la.PARTIALLY_FAILED,la.FAILED];function hle(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&SB(t.provider)}const ple=globalThis.fetch;class kB{constructor(e){if(this.options=e,this.service=void 0,this.provider=void 0,this._fetch=(r,n)=>{const s={},{jwtAuth:i,projectAccessKey:o}=this.options;return i&&i.length>0&&(s.Authorization=`BEARER ${i}`),o&&o.length>0&&(s["X-Access-Key"]=o),n.headers=no({},s,n.headers),ple(r,n)},this.service=new UD(e.url,this._fetch),SB(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,s=N0(e.provider.url,n,r);this.provider=new cr(s,void 0,{staticNetwork:!0})}}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=de.transaction.intendedTransactionID(e)),Te.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&fle.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=qt.defaultAbiCoder().encode([de.transaction.MetaTransactionsType],[de.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(c=>c.symbol).join(", ");Te.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw Te.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:de.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return Te.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o,Ts)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return Te.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:s,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:z(r),simulate:n==null?void 0:n.simulate},no({},n!=null&&n.projectAccessKey?{"X-Access-Key":n.projectAccessKey}:void 0));return{options:s,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){Te.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?Zc(BigInt(r)):void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=BigInt(s.nonce),[o,a]=de.transaction.decodeNonce(i);return Te.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0,s){var i=this;Te.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e,Ts)} with quote ${JSON.stringify(r,Ts)}`);let o;if(r!==void 0&&(typeof r._quote=="string"?o=r._quote:Te.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw Te.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const a=de.transaction.encodeBundleExecData(e),c=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:a},quote:o},no({},s?{"X-Access-Key":s}:void 0));if(Te.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(c,Ts)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},u=async function(d){var h;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const y=await i.wait(e.intent.id),p=(h=y.receipt)==null?void 0:h.transactionHash;if(!p)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,y),i.provider.waitForTransaction(p,d)};return l.wait=u,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||dle.includes(a.status))throw new yle(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:Number(c.blockNumber),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return i.provider.waitForTransaction(c.transactionHash,l)}}}}class yle{constructor(e){this.receipt=e}}function SB(t){return t&&typeof t=="object"&&typeof t.getNetwork=="function"&&typeof t.getBlockNumber=="function"}function AB(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const gle=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:rle,ProviderRelayer:FD,ProviderRelayerDefaults:jD,RpcRelayer:kB,RpcRelayerProto:ad,isLocalRelayerOptions:tle,isProviderRelayerOptions:Zce,isRelayer:AB,isRpcRelayerOptions:hle,proto:ad},Symbol.toStringTag,{value:"Module"}));function TB(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.sign!==void 0&&t.notifyStatusChange!==void 0}class IB{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}sign(e){return this.signer.signMessage(e)}notifyStatusChange(e,r,n){}suffix(){return new Uint8Array([2])}}var V2=Object.freeze({__proto__:null,isSapientSigner:TB,SignerWrapper:IB});let ua=function(t){return t[t.INITIAL=0]="INITIAL",t[t.SIGNING=1]="SIGNING",t[t.SIGNED=2]="SIGNED",t[t.ERROR=3]="ERROR",t}({});function PB(t){return t===void 0||t.state===ua.INITIAL||t.state===ua.SIGNING}class sm{constructor(e,r=sm.randomTag()){this.tag=r,this.observers=[],this.signers=[],this.count=0,this.setSigners(e)}static randomTag(){return`default-${z(Nr(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>TB(r)?r:new IB(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const s=await n.buildDeployTransaction(e);r===void 0?r=s:s!=null&&s.transactions&&(r.transactions=s.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:c}=e,l={ended:!1,message:i,signers:{}};let u=o??{};const f=p=>{u=p,r.notifyObservers(n,l,u)},d=()=>{try{r.notifyObservers(n,l,u);const p=Object.entries(l.signers).filter(([b,g])=>PB(g));if(a&&a(l,f)||p.length===0){l.ended=!0,s(l),r.notifyObservers(n,l,u);return}}catch(p){console.error("Error while notifying observers",p)}};let h=r.signers;if(c){const p=await Promise.all(r.signers.map(async function(b){return b.getAddress()}));h=r.signers.filter((b,g)=>c.includes(p[g]))}const y=await Promise.allSettled(h.map(async function(p){const b=await p.getAddress();l.signers[b]={state:ua.SIGNING,request:p.sign(i,o??{}).then(g=>{const v=p.suffix();return l.signers[b]={state:ua.SIGNED,signature:g,suffix:v},d(),g}).catch(g=>{throw l.signers[b]={state:ua.ERROR,error:g},d(),g})}}));for(let p=0;pIt(e))):It(t)}const S8=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(n.state===ua.SIGNED){const s=Q(n.suffix),i=Le(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class Lu extends kd{constructor(e){var r;const n=BigInt(e.chainId);if(n===0n&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super((r=e.provider)!=null?r:null),this.context=void 0,this.config=void 0,this.address=void 0,this.chainId=void 0,this.relayer=void 0,this.coders=void 0,this.orchestrator=void 0,this._reader=void 0,this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=n,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=de.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Lu(Do({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new de.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:de.transaction.encodeBundleExecData(r),revertOnError:!0}],s=await this.buildDeployTransaction();return s&&n.unshift(...s.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(de.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);let n;switch(this.chainId){case BigInt(M.SKALE_NEBULA):n=10000000n;break}const s=Lu.buildDeployTransaction(this.context,r,n);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(s.transactions=i.transactions.concat(s.transactions))}return s}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Do({},r,{chainId:this.chainId,intent:{id:z(Nr(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r,n=100000n){const s=new ut(Ht.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:s.encodeFunctionData(s.getFunction("deploy"),[e.mainModule,r]),gasLimit:n,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return Number(r)}async signDigest(e,r){const n=O2(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const s=Do({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),i=Q(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:i,metadata:s,callback:(c,l)=>{const u=S8(c),f=Do({},s,{parts:u});return l(f),this.coders.signature.hasEnoughSigningPower(this.config,u)}}),a=S8(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Me(e),{message:e})}signTypedData(e,r,n){const s=Ad({domain:e,types:r,message:n});return this.signDigest(s)}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space!==void 0)r=BigInt(e.space);else{if(e===void 0)return this.randomNonce();if(e&&e.serial===!0)r=0;else return e}const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return de.transaction.encodeNonce(r,n)}randomNonce(){const e=BigInt(z(Nr(12)));return de.transaction.encodeNonce(e,0)}async signTransactions(e,r,n){const s=await k8(e),i=de.transaction.fromTransactionish(this.address,s);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=de.transaction.digestOfTransactions(o,i),c=Do({digest:a,transactions:i},n),l=await this.signDigest(a,c);return{intent:{id:O2(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:o,signature:l}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r){let n;(r==null?void 0:r.nonce)!==void 0?n=r.nonce:r!=null&&r.serial?n={serial:!0}:n=this.randomNonce();const s=await this.signTransactions(e,n),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,r==null?void 0:r.quote)}async fillGasLimits(e){const r=await k8(e),n=de.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const c=o.gasLimit?Number(o.gasLimit):i[a].gasLimit;return Do({},o,i[a],{gasLimit:c})})}connect(e,r){return new Lu({coders:this.coders,context:this.context,config:this.config,chainId:this.chainId,address:this.address,orchestrator:this.orchestrator,reader:this._reader,provider:e,relayer:r??this.relayer})}signTransaction(e){throw new Error("Method not implemented.")}}function Ks(){return Ks=Object.assign?Object.assign.bind():function(t){for(var e=1;e=BigInt(s.value))return s}else if(s.token.contractAddress&&s.token.type===ad.FeeTokenType.ERC20_TOKEN&&await new dn(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)>=BigInt(s.value))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,s,i,o,a;const c=await this.account.prepareTransactions({txs:e,chainId:this.chainId,stubSignatureOverrides:(n=(s=this.options)==null?void 0:s.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),u=await((i=(o=this.options)==null?void 0:o.selectFee)!=null?i:this.defaultSelectFee.bind(this))(e,c.feeOptions),f=[...c.transactions,...mle(u)];return this.account.sendTransaction(f,this.chainId,c.feeQuote,void 0,void 0,((a=this.options)==null?void 0:a.nonceSpace)!==void 0?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(Ks({},e,{blockTag:r}))}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(Number(this.chainId))}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}getNonce(e){throw new Error("Method not implemented.")}populateCall(e){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}async populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class ble{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return 0n}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Qi{constructor(e){this.address=void 0,this.networks=void 0,this.tracker=void 0,this.contexts=void 0,this.migrator=void 0,this.migrations=void 0,this.orchestrator=void 0,this.jwt=void 0,this.projectAccessKey=void 0,this.address=Ae(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.projectAccessKey=e.projectAccessKey,this.migrations=e.migrations||$2.DefaultMigrations,this.migrator=new U2.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new xle(this,e,r)}static async new(e){var r;const s=new U2.Migrator(e.tracker,(r=e.migrations)!=null?r:$2.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),c=e.contexts[s.version],l=de.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Qi({address:l,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations,projectAccessKey:e.projectAccessKey})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=BigInt(e),n=this.networks.find(s=>r===BigInt(s.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);const n=new lt(r.name,r.chainId);return r.provider||new cr(N0(r.rpcUrl,this.projectAccessKey,this.jwt),n,{staticNetwork:n})}reader(e){return BigInt(e)===0n?new ble:new de.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return AB(r.relayer)?r.relayer:new kB(Ks({},r.relayer,this.projectAccessKey?{projectAccessKey:this.projectAccessKey}:{jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=Zt.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=BigInt(e)===0n;return new Lu({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(A=>{if(!A)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return A}),o=i.then(A=>DD.counterfactualVersion(this.address,A.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const P=await n.reader(e).implementation(n.address);if(!P)throw new Error(`Implementation not found for wallet ${n.address}`);const R=Object.values(n.contexts);for(let N=0;N0?p[p.length-1].nextImageHash:d,g=await this.tracker.configOfImageHash({imageHash:b});if(!g)throw new Error(`Config not found for imageHash ${b}`);const v=await s,m=await i,k=Zt.coderFor(h).config.checkpointOf(g);return{original:Ks({},m,{version:await o}),onChain:{imageHash:f,config:await l,version:u,deployed:v},fullyMigrated:h===this.version,signedMigrations:y,version:h,presignedConfigurations:p,imageHash:b,config:g,checkpoint:k,canOnchainValidate:u===this.version&&v}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),s=await this.predecorateTransactions([],e,r);return de.transaction.fromTransactionish(this.address,s).length>0&&n.push(await this.signTransactions(s,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}async decorateTransactions(e,r,n){var s,i;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(s=n)!=null?s:e[0].chainId;const o=await this.buildBootstrapTransactions(r,n),a=o.transactions.length>0;if(!a&&e.length===1)return e[0];const{entrypoint:c}=a?o:e[0],l={entrypoint:c,chainId:n,intent:(i=e[0])==null?void 0:i.intent,transactions:[...o.transactions,...e.map(u=>({to:u.entrypoint,data:de.transaction.encodeBundleExecData(u),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};if(!r.onChain.deployed){const u=de.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,l.transactions);l.intent===void 0?l.intent={id:u,wallet:this.address}:l.intent.id=u}return l}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitnessFor(e,r=0){const n=Dr(`This is a Sequence account woo! ${Date.now()}`),s=await this.status(r),i=this.coders.config.fromSimple({threshold:e.length,checkpoint:0,signers:e.map(u=>({address:u,weight:1}))}),a=await this.walletFor(r,s.original.context,i,this.coders).signDigest(n),c=this.coders.signature.decode(a),l=this.coders.signature.signaturesOfDecoded(c);if(l.length===0)throw new Error("No signatures found");return this.tracker.saveWitnesses({wallet:this.address,digest:n,chainId:r,signatures:l})}async publishWitness(){const e=Dr(`This is a Sequence account woo! ${Date.now()}`),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore",i){const o=BigInt(r)===0n?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,a).signDigest(e,i),u=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(s){case"ignore":return u;case"eip6492":return this.buildEIP6492Signature(await u,a,r)}return u}buildOnChainSignature(e){const r=de.signature.subdigestOf({digest:z(e),chainId:0,address:this.address}),n=z(r),s=this.coders.config.fromSimple({threshold:32768,checkpoint:0,signers:[],subdigests:[n]}),i=new ut(Ht.mainModule.abi),o={entrypoint:this.address,transactions:[{to:this.address,data:i.encodeFunctionData("setExtraImageHash",[this.coders.config.imageHashOf(s),"57896044618658097711785492504343953926634992332820282019728792003956564819968"]),gasLimit:25e4}]};this.tracker.saveWalletConfig({config:s});const a=this.coders.signature.encodeSigners(s,new Map,[n],0).encoded;return{bundle:o,signature:a}}async buildEIP6492Signature(e,r,n){const s=await this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=qt.defaultAbiCoder().encode(["address","bytes","bytes"],[s.entrypoint,de.transaction.encodeBundleExecData(s),e]);return Le(["bytes","bytes32"],[i,de.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,Ks({},e,{checkpoint:this.coders.config.checkpointOf(r)+1n}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const s=await this.orchestrator.buildDeployTransaction({chainId:r}),i=(n=s==null?void 0:s.transactions)!=null?n:[];if(!e.onChain.deployed){let c;switch(BigInt(r)){case BigInt(M.SKALE_NEBULA):c=10000000n;break}const l=Lu.buildDeployTransaction(e.original.context,e.original.imageHash,c);i.push(...l.transactions)}i.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:de.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:de.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,i),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:i,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Ks({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Me(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=this.walletForStatus(r,i),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},c=s!=null&&s.serial?{serial:!0}:(s==null?void 0:s.nonceSpace)!==void 0?{space:s.nonceSpace}:void 0,l=await o.signTransactions(e,c,a);return Ks({},l,{signature:await this.decorateSignature(l.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=Zt.coderFor(i.version).config,c=a.imageHashOf(i),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i,o){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,s,i,o);const a=s||await this.status(r);this.mustBeFullyMigrated(a);const c=await this.decorateTransactions(e,a,r);return i==null||i(c),this.relayer(r).relay(c,n,void 0,o)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,s,i){const o=s||await this.status(r),a=this.walletForStatus(r,o),c=await this.predecorateTransactions(e,o,r),l=de.transaction.fromTransactionish(this.address,c),u=a.coders.config.buildStubSignature(a.config,n),f=z(Nr(32)),d={chainId:r,intent:{id:f,wallet:this.address},signature:u,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),y=de.transaction.encodeBundleExecData(h),p=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,y,i);return Ks({},p,{decorated:h})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions,projectAccessKey:e.projectAccessKey}),i=de.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),c=s?e:await this.predecorateTransactions(e,a,r),u=de.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,f=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];return u!==void 0&&u.transactions.length>0&&d.push(u),d.push(...f.filter(h=>h.transactions.length>0)),this.sendSignedTransactions(d,r,n,void 0,i,o==null?void 0:o.projectAccessKey)}async signTypedData(e,r,n,s,i="ignore"){const o=Ad({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getSigners(){var e=this;const r=n=>n.length?n[n.length-1]:void 0;return(await Promise.all(this.networks.map(async function({chainId:n,name:s}){try{var i;const o=await e.status(n);let a=(i=r(o.presignedConfigurations))==null?void 0:i.nextImageHash;if(!a&&o.onChain.version!==o.version){const f=r(o.signedMigrations);if(f){const{toVersion:d,toConfig:h}=f;a=Zt.genericCoderFor(d).config.imageHashOf(h)}}a||(a=o.onChain.imageHash);const c=await e.tracker.configOfImageHash({imageHash:a});if(!c)throw new Error(`unable to find config for image hash ${a}`);return Zt.genericCoderFor(c.version).config.signersOf(c).map(f=>Ks({},f,{network:n}))}catch(o){return console.warn(`unable to get signers on network ${n} ${s}`,o),[]}}))).flat()}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>Zt.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===o.length-1,u=await e.tracker.configOfImageHash({imageHash:a});if(!u){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Zt.genericCoderFor(u.version).config.signersOf(u).forEach(h=>{const y=r.find(p=>p.address===h.address&&p.network===s);if(y&&l&&y.flaggedForRemoval){y.flaggedForRemoval=!1;return}y||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!l})})}))})),r}}function wle(t){return t instanceof Qi}const Ele=Object.freeze(Object.defineProperty({__proto__:null,Account:Qi,isAccount:wle},Symbol.toStringTag,{value:"Module"}));function Ig(){return Ig=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ze({},n,s)).then(i=>it(i).then(o=>({status:o.status})),i=>{throw et.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),Ze({},n,s)).then(i=>it(i).then(o=>({version:o.version})),i=>{throw et.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),Ze({},n,s)).then(i=>it(i).then(o=>({status:o.status})),i=>{throw et.new({cause:`fetch(): ${i.message||""}`})}),this.getChainID=(n,s)=>this.fetch(this.url("GetChainID"),Ze({},n,s)).then(i=>it(i).then(o=>({chainID:o.chainID})),i=>{throw et.new({cause:`fetch(): ${i.message||""}`})}),this.getEtherBalance=(n,s,i)=>this.fetch(this.url("GetEtherBalance"),Ze(n,s,i)).then(o=>it(o).then(a=>({balance:a.balance})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getNativeTokenBalance=(n,s,i)=>this.fetch(this.url("GetNativeTokenBalance"),Ze(n,s,i)).then(o=>it(o).then(a=>({balance:a.balance})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesSummary=(n,s,i)=>this.fetch(this.url("GetTokenBalancesSummary"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesDetails=(n,s,i)=>this.fetch(this.url("GetTokenBalancesDetails"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalancesByContract=(n,s,i)=>this.fetch(this.url("GetTokenBalancesByContract"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenBalances=(n,s,i)=>this.fetch(this.url("GetTokenBalances"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSupplies=(n,s,i)=>this.fetch(this.url("GetTokenSupplies"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,contractType:a.contractType,tokenIDs:a.tokenIDs})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenSuppliesMap=(n,s,i)=>this.fetch(this.url("GetTokenSuppliesMap"),Ze(n,s,i)).then(o=>it(o).then(a=>({supplies:a.supplies})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getBalanceUpdates=(n,s,i)=>this.fetch(this.url("GetBalanceUpdates"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,balances:a.balances})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTransactionHistory=(n,s,i)=>this.fetch(this.url("GetTransactionHistory"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,transactions:a.transactions})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.syncBalance=(n,s,i)=>this.fetch(this.url("SyncBalance"),Ze(n,s,i)).then(o=>it(o).then(a=>({})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceipt=(n,s,i)=>this.fetch(this.url("FetchTransactionReceipt"),Ze(n,s,i)).then(o=>it(o).then(a=>({receipt:a.receipt})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getOrderbookOrders=(n,s,i)=>this.fetch(this.url("GetOrderbookOrders"),Ze(n,s,i)).then(o=>it(o).then(a=>({page:a.page,orders:a.orders})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getTopOrders=(n,s,i)=>this.fetch(this.url("GetTopOrders"),Ze(n,s,i)).then(o=>it(o).then(a=>({orders:a.orders})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.fetchTransactionReceiptWithFilter=(n,s,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),Ze(n,s,i)).then(o=>it(o).then(a=>({receipt:a.receipt})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getAllWebhookListeners=(n,s,i)=>this.fetch(this.url("GetAllWebhookListeners"),Ze(n,s,i)).then(o=>it(o).then(a=>({listeners:a.listeners})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.getWebhookListener=(n,s,i)=>this.fetch(this.url("GetWebhookListener"),Ze(n,s,i)).then(o=>it(o).then(a=>({listener:a.listener})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.addWebhookListener=(n,s,i)=>this.fetch(this.url("AddWebhookListener"),Ze(n,s,i)).then(o=>it(o).then(a=>({status:a.status,listener:a.listener})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.updateWebhookListener=(n,s,i)=>this.fetch(this.url("UpdateWebhookListener"),Ze(n,s,i)).then(o=>it(o).then(a=>({status:a.status})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.removeWebhookListener=(n,s,i)=>this.fetch(this.url("RemoveWebhookListener"),Ze(n,s,i)).then(o=>it(o).then(a=>({status:a.status})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.toggleWebhookListener=(n,s,i)=>this.fetch(this.url("ToggleWebhookListener"),Ze(n,s,i)).then(o=>it(o).then(a=>({webhookListener:a.webhookListener})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.pauseAllWebhookListeners=(n,s,i)=>this.fetch(this.url("PauseAllWebhookListeners"),Ze(n,s,i)).then(o=>it(o).then(a=>({status:a.status})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.resumeAllWebhookListeners=(n,s,i)=>this.fetch(this.url("ResumeAllWebhookListeners"),Ze(n,s,i)).then(o=>it(o).then(a=>({status:a.status})),o=>{throw et.new({cause:`fetch(): ${o.message||""}`})}),this.subscribeReceipts=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeReceipts"),Ze(n,s.headers,s.signal)).then(async function(o){await qx(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeEvents=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeEvents"),Ze(n,s.headers,s.signal)).then(async function(o){await qx(o,s,i)},o=>{s.onError(o,i)});return i()},this.subscribeBalanceUpdates=(n,s)=>{const i=()=>this.fetch(this.url("SubscribeBalanceUpdates"),Ze(n,s.headers,s.signal)).then(async function(o){await qx(o,s,i)},o=>{s.onError(o,i)});return i()},this.hostname=e.replace(/\/*$/,""),this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const qx=async(t,e,r)=>{const{onMessage:n,onOpen:s,onClose:i,onError:o}=e;if(!t.ok){try{await it(t)}catch(y){o(y,r)}return}if(!t.body){o(M0.new({status:t.status,cause:"Invalid response, missing body"}),r);return}s&&s();const a=t.body.getReader(),c=new TextDecoder;let l="",u=Date.now();const f=11*1e3;let d=!1;const h=setInterval(()=>{Date.now()-u>f&&(d=!0,clearInterval(h),a.releaseLock())},f);for(;;){let y,p;try{if({value:y,done:p}=await a.read(),d)throw new Error("Timeout, no data or heartbeat received");u=Date.now(),l+=c.decode(y,{stream:!0})}catch(g){let v="";g instanceof Error&&(v=g.message),g instanceof DOMException&&g.name==="AbortError"?o(et.new({message:"AbortError",cause:`AbortError: ${v}`}),()=>{throw new Error("Abort signal cannot be used to reconnect")}):o(R5.new({cause:`reader.read(): ${v}`}),r);return}let b=l.split(` -`);for(let g=0;g({method:"POST",headers:Ig({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),it=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),M0.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(wL[n]||ct).new(r)}return r});let ct=class RB extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,RB.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},NB=class _B extends ct{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,_B.prototype)}},et=class MB extends ct{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,MB.prototype)}},DB=class BB extends ct{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,BB.prototype)}},LB=class jB extends ct{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jB.prototype)}},FB=class UB extends ct{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,UB.prototype)}},M0=class $B extends ct{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$B.prototype)}},WB=class VB extends ct{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VB.prototype)}},zB=class HB extends ct{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HB.prototype)}},GB=class qB extends ct{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,qB.prototype)}},R5=class KB extends ct{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,KB.prototype)}},QB=class JB extends ct{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,JB.prototype)}},YB=class XB extends ct{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,XB.prototype)}},ZB=class eL extends ct{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,eL.prototype)}},tL=class rL extends ct{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,rL.prototype)}},nL=class sL extends ct{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,sL.prototype)}},iL=class oL extends ct{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,oL.prototype)}},aL=class cL extends ct{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cL.prototype)}},lL=class uL extends ct{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uL.prototype)}},fL=class dL extends ct{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dL.prototype)}},hL=class pL extends ct{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pL.prototype)}},yL=class gL extends ct{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gL.prototype)}};class im extends ct{constructor(e="ResourceExhausted",r=2004,n="Resource exhausted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,im.prototype)}}let vL=class mL extends ct{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mL.prototype)}},xL=class bL extends ct{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bL.prototype)}};class om extends ct{constructor(e="MetadataCallFailed",r=3003,n="Metadata service call failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,om.prototype)}}let Dle=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.MethodNotFound="MethodNotFound",t.RequestConflict="RequestConflict",t.Aborted="Aborted",t.Timeout="Timeout",t.InvalidArgument="InvalidArgument",t.Unavailable="Unavailable",t.QueryFailed="QueryFailed",t.ResourceExhausted="ResourceExhausted",t.NotFound="NotFound",t.ProjectNotFound="ProjectNotFound",t.MetadataCallFailed="MetadataCallFailed",t}({});const wL={0:NB,[-1]:et,[-2]:DB,[-3]:LB,[-4]:FB,[-5]:M0,[-6]:WB,[-7]:zB,[-8]:GB,[-9]:R5,[-10]:QB,1e3:YB,1001:ZB,1002:tL,1003:nL,1004:iL,1005:aL,2e3:lL,2001:fL,2002:hL,2003:yL,2004:im,3e3:vL,3002:xL,3003:om},A8=globalThis.fetch;class EL extends OB{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,A8),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=Ig({},i.headers,o),A8(s,i)},this.fetch=this._fetch}}const Ble=Object.freeze(Object.defineProperty({__proto__:null,AbortedError:aL,ContractType:Ale,ContractVerificationStatus:Mle,EventLogDataType:Ile,EventLogType:Tle,Indexer:OB,InvalidArgumentError:fL,MetadataCallFailedError:om,MethodNotFoundError:nL,NotFoundError:vL,OrderStatus:Ple,PermissionDeniedError:ZB,ProjectNotFoundError:xL,QueryFailedError:yL,RequestConflictError:iL,ResourceExhaustedError:im,SequenceIndexer:EL,SessionExpiredError:tL,SortOrder:_le,TimeoutError:lL,TransactionStatus:Rle,TransactionType:Nle,TxnTransferType:Ole,UnauthorizedError:YB,UnavailableError:hL,WebRPCSchemaHash:Sle,WebRPCSchemaVersion:kle,WebRPCVersion:Cle,WebrpcBadMethodError:LB,WebrpcBadRequestError:FB,WebrpcBadResponseError:M0,WebrpcBadRouteError:DB,WebrpcClientDisconnectedError:GB,WebrpcEndpointError:NB,WebrpcError:ct,WebrpcInternalErrorError:zB,WebrpcRequestFailedError:et,WebrpcServerPanicError:WB,WebrpcStreamFinishedError:QB,WebrpcStreamLostError:R5,errors:Dle},Symbol.toStringTag,{value:"Module"}));function D0(){return D0=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),we({},n,s)).then(i=>Ee(i).then(o=>({status:o.status})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),we({},n,s)).then(i=>Ee(i).then(o=>({version:o.version})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),we({},n,s)).then(i=>Ee(i).then(o=>({status:o.status})),i=>{throw be.new({cause:`fetch(): ${i.message||""}`})}),this.getTokenMetadata=(n,s,i)=>this.fetch(this.url("GetTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.refreshTokenMetadata=(n,s,i)=>this.fetch(this.url("RefreshTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskId:a.taskId})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.enqueueTokensForRefresh=(n,s,i)=>this.fetch(this.url("EnqueueTokensForRefresh"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskId:a.taskId})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenRefreshStatus=(n,s,i)=>this.fetch(this.url("GetTokenRefreshStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenRefreshResult=(n,s,i)=>this.fetch(this.url("GetTokenRefreshResult"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status,tokens:a.tokens,failureReasons:a.failureReasons})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.cancelRefreshJob=(n,s,i)=>this.fetch(this.url("CancelRefreshJob"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getTokenMetadataBatch=(n,s,i)=>this.fetch(this.url("GetTokenMetadataBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractTokenMetadata:a.contractTokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokenMetadata=(n,s,i)=>this.fetch(this.url("SearchTokenMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokenMetadata:a.tokenMetadata})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokenIDs=(n,s,i)=>this.fetch(this.url("SearchTokenIDs"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokenIds:a.tokenIds})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.tokenCollectionFilters=(n,s,i)=>this.fetch(this.url("TokenCollectionFilters"),we(n,s,i)).then(o=>Ee(o).then(a=>({filters:a.filters})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractInfo=(n,s,i)=>this.fetch(this.url("GetContractInfo"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfo:a.contractInfo})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractInfoBatch=(n,s,i)=>this.fetch(this.url("GetContractInfoBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoMap:a.contractInfoMap})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContractInfo=(n,s,i)=>this.fetch(this.url("SearchContractInfo"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoList:a.contractInfoList})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContractInfoBatch=(n,s,i)=>this.fetch(this.url("SearchContractInfoBatch"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfoByChain:a.contractInfoByChain})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchMetadata=(n,s,i)=>this.fetch(this.url("SearchMetadata"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata,contractInfo:a.contractInfo})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchTokens=(n,s,i)=>this.fetch(this.url("SearchTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({tokenMetadata:a.tokenMetadata,nextPage:a.nextPage})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.searchContracts=(n,s,i)=>this.fetch(this.url("SearchContracts"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractInfo:a.contractInfo,nextPage:a.nextPage})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapTokenQuantity=(n,s,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),we(n,s,i)).then(o=>Ee(o).then(a=>({quantity:a.quantity})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapUnitPrices=(n,s,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),we(n,s,i)).then(o=>Ee(o).then(a=>({prices:a.prices})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getNiftyswapUnitPricesWithQuantities=(n,s,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),we(n,s,i)).then(o=>Ee(o).then(a=>({prices:a.prices})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.addContractToMintMonitor=(n,s,i)=>this.fetch(this.url("AddContractToMintMonitor"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.removeContractFromMintMonitor=(n,s,i)=>this.fetch(this.url("RemoveContractFromMintMonitor"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.mintMonitorJobStatus=(n,s,i)=>this.fetch(this.url("MintMonitorJobStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({task:a.task})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.mintMonitorTriggerJob=(n,s,i)=>this.fetch(this.url("MintMonitorTriggerJob"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.syncContractTokens=(n,s,i)=>this.fetch(this.url("SyncContractTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({taskID:a.taskID})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.abortContractSync=(n,s,i)=>this.fetch(this.url("AbortContractSync"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.contractSyncJobStatus=(n,s,i)=>this.fetch(this.url("ContractSyncJobStatus"),we(n,s,i)).then(o=>Ee(o).then(a=>({refreshTask:a.refreshTask,syncTask:a.syncTask})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directoryGetNetworks=(n,s,i)=>this.fetch(this.url("DirectoryGetNetworks"),we(n,s,i)).then(o=>Ee(o).then(a=>({networks:a.networks})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directoryGetCollections=(n,s,i)=>this.fetch(this.url("DirectoryGetCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.directorySearchCollections=(n,s,i)=>this.fetch(this.url("DirectorySearchCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}class kL{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Collections/",this.createCollection=(n,s,i)=>this.fetch(this.url("CreateCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getCollection=(n,s,i)=>this.fetch(this.url("GetCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listCollections=(n,s,i)=>this.fetch(this.url("ListCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,collections:a.collections})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateCollection=(n,s,i)=>this.fetch(this.url("UpdateCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteCollection=(n,s,i)=>this.fetch(this.url("DeleteCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.publishCollection=(n,s,i)=>this.fetch(this.url("PublishCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.unpublishCollection=(n,s,i)=>this.fetch(this.url("UnpublishCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({collection:a.collection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createContractCollection=(n,s,i)=>this.fetch(this.url("CreateContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollection:a.contractCollection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getContractCollection=(n,s,i)=>this.fetch(this.url("GetContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollection:a.contractCollection})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listContractCollections=(n,s,i)=>this.fetch(this.url("ListContractCollections"),we(n,s,i)).then(o=>Ee(o).then(a=>({contractCollections:a.contractCollections,collections:a.collections,page:a.page})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateContractCollection=(n,s,i)=>this.fetch(this.url("UpdateContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteContractCollection=(n,s,i)=>this.fetch(this.url("DeleteContractCollection"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createToken=(n,s,i)=>this.fetch(this.url("CreateToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token,assets:a.assets})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getToken=(n,s,i)=>this.fetch(this.url("GetToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token,assets:a.assets})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listTokens=(n,s,i)=>this.fetch(this.url("ListTokens"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,tokens:a.tokens})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateToken=(n,s,i)=>this.fetch(this.url("UpdateToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({token:a.token})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteToken=(n,s,i)=>this.fetch(this.url("DeleteToken"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.createAsset=(n,s,i)=>this.fetch(this.url("CreateAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getAsset=(n,s,i)=>this.fetch(this.url("GetAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.updateAsset=(n,s,i)=>this.fetch(this.url("UpdateAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({asset:a.asset})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.deleteAsset=(n,s,i)=>this.fetch(this.url("DeleteAsset"),we(n,s,i)).then(o=>Ee(o).then(a=>({status:a.status})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}class zle{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Admin/",this.addContractsToTokenDirectory=(n,s,i)=>this.fetch(this.url("AddContractsToTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.removeContractsFromTokenDirectory=(n,s,i)=>this.fetch(this.url("RemoveContractsFromTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.modifyFeatureIndex=(n,s,i)=>this.fetch(this.url("ModifyFeatureIndex"),we(n,s,i)).then(o=>Ee(o).then(a=>({ok:a.ok})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.getFeatureIndex=(n,s,i)=>this.fetch(this.url("GetFeatureIndex"),we(n,s,i)).then(o=>Ee(o).then(a=>({featured:a.featured})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.listTokenDirectory=(n,s,i)=>this.fetch(this.url("ListTokenDirectory"),we(n,s,i)).then(o=>Ee(o).then(a=>({page:a.page,collections:a.collections})),o=>{throw be.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const we=(t={},e={},r=null)=>({method:"POST",headers:D0({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Ee=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),N5.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(Gle[n]||rt).new(r)}return r});let rt=class SL extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,SL.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},AL=class TL extends rt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,TL.prototype)}},be=class IL extends rt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,IL.prototype)}},PL=class OL extends rt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,OL.prototype)}},RL=class NL extends rt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,NL.prototype)}},_L=class ML extends rt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ML.prototype)}},N5=class DL extends rt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,DL.prototype)}},BL=class LL extends rt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,LL.prototype)}},jL=class FL extends rt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,FL.prototype)}},UL=class $L extends rt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$L.prototype)}},WL=class VL extends rt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,VL.prototype)}},zL=class HL extends rt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,HL.prototype)}},GL=class qL extends rt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,qL.prototype)}},KL=class QL extends rt{constructor(e="PermissionDenied",r=1001,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,QL.prototype)}},JL=class YL extends rt{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,YL.prototype)}};class am extends rt{constructor(e="MethodNotFound",r=1003,n="Method not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,am.prototype)}}class cm extends rt{constructor(e="RequestConflict",r=1004,n="Conflict with target resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cm.prototype)}}class lm extends rt{constructor(e="Fail",r=1005,n="Request Failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lm.prototype)}}class um extends rt{constructor(e="Geoblocked",r=1006,n="Geoblocked region",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,um.prototype)}}class fm extends rt{constructor(e="Timeout",r=2e3,n="Request timed out",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fm.prototype)}}let XL=class ZL extends rt{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ZL.prototype)}};class dm extends rt{constructor(e="RequiredArgument",r=2002,n="Required argument missing",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,dm.prototype)}}let ej=class tj extends rt{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,tj.prototype)}},rj=class nj extends rt{constructor(e="ValidationFailed",r=2004,n="Validation failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,nj.prototype)}};class hm extends rt{constructor(e="RateLimited",r=2005,n="Rate limited",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hm.prototype)}}let sj=class ij extends rt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ij.prototype)}};class pm extends rt{constructor(e="ProjectNotFound",r=3002,n="Project not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pm.prototype)}}class ym extends rt{constructor(e="ChainNotFound",r=3003,n="Chain not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,ym.prototype)}}class gm extends rt{constructor(e="TokenDirectoryDisabled",r=4001,n="Token Directory is disabled",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gm.prototype)}}let Hle=function(t){return t.WebrpcEndpoint="WebrpcEndpoint",t.WebrpcRequestFailed="WebrpcRequestFailed",t.WebrpcBadRoute="WebrpcBadRoute",t.WebrpcBadMethod="WebrpcBadMethod",t.WebrpcBadRequest="WebrpcBadRequest",t.WebrpcBadResponse="WebrpcBadResponse",t.WebrpcServerPanic="WebrpcServerPanic",t.WebrpcInternalError="WebrpcInternalError",t.WebrpcClientDisconnected="WebrpcClientDisconnected",t.WebrpcStreamLost="WebrpcStreamLost",t.WebrpcStreamFinished="WebrpcStreamFinished",t.Unauthorized="Unauthorized",t.PermissionDenied="PermissionDenied",t.SessionExpired="SessionExpired",t.MethodNotFound="MethodNotFound",t.RequestConflict="RequestConflict",t.Fail="Fail",t.Geoblocked="Geoblocked",t.Timeout="Timeout",t.InvalidArgument="InvalidArgument",t.RequiredArgument="RequiredArgument",t.QueryFailed="QueryFailed",t.ValidationFailed="ValidationFailed",t.RateLimited="RateLimited",t.NotFound="NotFound",t.ProjectNotFound="ProjectNotFound",t.ChainNotFound="ChainNotFound",t.TokenDirectoryDisabled="TokenDirectoryDisabled",t}({});const Gle={0:AL,[-1]:be,[-2]:PL,[-3]:RL,[-4]:_L,[-5]:N5,[-6]:BL,[-7]:jL,[-8]:UL,[-9]:WL,[-10]:zL,1e3:GL,1001:KL,1002:JL,1003:am,1004:cm,1005:lm,1006:um,2e3:fm,2001:XL,2002:dm,2003:ej,2004:rj,2005:hm,3e3:sj,3002:pm,3003:ym,4001:gm},Pg=globalThis.fetch;class oj extends CL{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,Pg),this.projectAccessKey=r,this.jwtAuth=n,this._fetch=(s,i)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),i.headers=D0({},i.headers,o),Pg(s,i)},this.fetch=this._fetch}}class qle extends kL{constructor(e="https://metadata.sequence.app",r){super(e.endsWith("/")?e.slice(0,-1):e,Pg),this.jwtAuth=r,this._fetch=(n,s)=>{const i={},o=this.jwtAuth;return o&&o.length>0&&(i.Authorization=`BEARER ${o}`),s.headers=D0({},s.headers,i),Pg(n,s)},this.fetch=this._fetch}}const Kle=Object.freeze(Object.defineProperty({__proto__:null,Admin:zle,ChainNotFoundError:ym,Collections:kL,ContractType:Ule,FailError:lm,GeoblockedError:um,InvalidArgumentError:XL,Metadata:CL,MethodNotFoundError:am,NotFoundError:sj,PermissionDeniedError:KL,ProjectNotFoundError:pm,PropertyType:$le,QueryFailedError:ej,RateLimitedError:hm,RequestConflictError:cm,RequiredArgumentError:dm,SequenceCollections:qle,SequenceMetadata:oj,SessionExpiredError:JL,SwapType:Wle,TaskStatus:Vle,TimeoutError:fm,TokenDirectoryDisabledError:gm,UnauthorizedError:GL,ValidationFailedError:rj,WebRPCSchemaHash:Fle,WebRPCSchemaVersion:jle,WebRPCVersion:Lle,WebrpcBadMethodError:RL,WebrpcBadRequestError:_L,WebrpcBadResponseError:N5,WebrpcBadRouteError:PL,WebrpcClientDisconnectedError:UL,WebrpcEndpointError:AL,WebrpcError:rt,WebrpcInternalErrorError:jL,WebrpcRequestFailedError:be,WebrpcServerPanicError:BL,WebrpcStreamFinishedError:zL,WebrpcStreamLostError:WL,errors:Hle},Symbol.toStringTag,{value:"Module"}));function Qle(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function Jle(t){return t.startsWith("ipfs://")}class aj{constructor(e,r,n=1e3){this.provider=e,this.solver=r,this.window=n,this.pending=new Map}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(de.signer.canRecover(n)){const c=de.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await de.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Xle(Yle(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=z(await(s||new Zle).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===z(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return cj(t,e,r,a,s,i+1)}class Zle{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.gateway=e,this.uri=n=>Jle(n)?Qle(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()}}}const eue=(t,e)=>e.some(r=>t instanceof r);let T8,I8;function tue(){return T8||(T8=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function rue(){return I8||(I8=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const lj=new WeakMap,z2=new WeakMap,uj=new WeakMap,Kx=new WeakMap,_5=new WeakMap;function nue(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(ka(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&lj.set(r,t)}).catch(()=>{}),_5.set(e,t),e}function sue(t){if(z2.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});z2.set(t,e)}let H2={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return z2.get(t);if(e==="objectStoreNames")return t.objectStoreNames||uj.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ka(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function iue(t){H2=t(H2)}function oue(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(Qx(this),e,...r);return uj.set(n,e.sort?e.sort():[e]),ka(n)}:rue().includes(t)?function(...e){return t.apply(Qx(this),e),ka(lj.get(this))}:function(...e){return ka(t.apply(Qx(this),e))}}function aue(t){return typeof t=="function"?oue(t):(t instanceof IDBTransaction&&sue(t),eue(t,tue())?new Proxy(t,H2):t)}function ka(t){if(t instanceof IDBRequest)return nue(t);if(Kx.has(t))return Kx.get(t);const e=aue(t);return e!==t&&(Kx.set(t,e),_5.set(e,t)),e}const Qx=t=>_5.get(t);function cue(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=ka(o);return n&&o.addEventListener("upgradeneeded",c=>{n(ka(o.result),c.oldVersion,c.newVersion,ka(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{i&&c.addEventListener("close",()=>i()),s&&c.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const lue=["get","getKey","getAll","getAllKeys","count"],uue=["put","add","delete","clear"],Jx=new Map;function P8(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(Jx.get(e))return Jx.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=uue.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||lue.includes(r)))return;const i=async function(o,...a){const c=this.transaction(o,s?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),s&&c.done]))[0]};return Jx.set(e,i),i}iue(t=>({...t,get:(e,r,n)=>P8(e,r)||t.get(e,r,n),has:(e,r)=>!!P8(e,r)||t.has(e,r)}));var fue=Object.freeze({__proto__:null});function bi(){return bi=Object.assign?Object.assign.bind():function(t){for(var e=1;e{try{const{Signer:d,Subdigest:h,Digest:y,"To-Config":p}=f;let b;switch(f["Signature-Type"]){case"eip-712":case"eth_sign":case"erc-1271":b=f["Signature-Type"];break;default:throw new Error(`unknown signature type ${f["Signature-Type"]}`)}let g;try{g=BigInt(f["To-Checkpoint"])}catch{throw new Error(`to checkpoint is not a number: ${f["To-Checkpoint"]}`)}if(g<=i)return[];if(!ag(d))throw new Error(`signer is not an address: ${d}`);if(!qe(h,32))throw new Error(`subdigest is not a hash: ${h}`);if(!qe(y,32))throw new Error(`digest is not a hash: ${y}`);let v;try{v=BigInt(f["Chain-ID"])}catch{throw new Error(`chain id is not a number: ${f["Chain-ID"]}`)}if(!qe(p,32))throw new Error(`to config is not a hash: ${p}`);return[{id:u,signatureType:b,signer:d,subdigest:h,digest:y,chainId:v,toImageHash:p,toCheckpoint:g}]}catch(d){return console.warn(`invalid wallet ${n} config update ${u}:`,d),[]}}),a=new Map;let c=[];for(const u of o){let f=a.get(u.toImageHash);f||(f=new Map,a.set(u.toImageHash,f),c.push(u)),f.set(u.signer,u)}e.longestPath?c.sort(({toCheckpoint:u},{toCheckpoint:f})=>u===f?0:uu===f?0:u[v,{signature:"0x",isDynamic:!1}])),[],0);if(g>=BigInt(u.threshold)){d=b;break}}if(!d){console.warn(`unreachable configs with checkpoint > ${u.checkpoint} from config ${f}`);break}const p=d.toImageHash;try{const b=await this.configOfImageHash({imageHash:p});if(!b)throw new Error(`unable to find config ${p}`);if(!Ne.config.isWalletConfig(b))throw new Error(`config ${p} is not v2`);const g=new Map((await Promise.all(y.map(async function(k){const{id:A,subdigest:P,signatureType:R}=h.get(k);try{let N=await(await Ip(A,r.options.rateLimitRetryDelayMs,r.options.arweaveUrl)).text();switch(R){case"eip-712":N+="01";break;case"eth_sign":N+="02";break;case"erc-1271":N+="03";break}if(r.eip5719)try{N=z(await r.eip5719.runByEIP5719(k,P,N))}catch{console.warn(`unable to run eip-5719 on config update ${A}`)}const V=de.signer.tryRecoverSigner(P,N);return[[k,{signature:N,isDynamic:V!==k}]]}catch(N){return console.warn(`unable to fetch signer ${k} config update ${A}:`,N),[]}}))).flat()),{encoded:v,weight:m}=Ne.signature.encodeSigners(u,g,[],0);if(mk>BigInt(u.checkpoint))}catch(b){console.warn(`unable to reconstruct wallet ${n} update from config ${f} to config ${p}:`,b),c=c.filter(({toImageHash:g})=>g!==p)}}return l}savePresignedConfiguration(e){throw new Error("arweave backend does not support saving config updates")}saveWitnesses(e){throw new Error("arweave backend does not support saving signatures")}async configOfImageHash(e){var r=this;if(!e.noCache){const s=this.configs.get(e.imageHash);if(s)try{return await s}catch{const o=this.configs.get(e.imageHash);if(o)return o}}const n=async function(s){const i=Object.entries(await Gd({Type:"config",Config:s},r.options)).flatMap(([o,a])=>{try{const c=Number(a.Version);if(!c)throw new Error(`invalid version: ${a.Version}`);return[{id:o,version:c}]}catch(c){return console.warn(`config ${s} at ${o} invalid:`,c),[]}});switch(i.length){case 0:r.configs.set(s,Promise.resolve(void 0));return;case 1:break;default:console.warn(`multiple configs ${s} at ${i.map(({id:o})=>o).join(", ")}`);break}for(const{id:o,version:a}of i)try{const c=bi({},await(await Ip(o,r.options.rateLimitRetryDelayMs,r.options.arweaveUrl)).json(),{version:a});c.tree&&(c.tree=Ql(c.tree));const l=Zt.coderFor(a).config.imageHashOf(c);if(l!==s)throw new Error(`image hash is ${l}, expected ${s}`);return r.configs.set(s,Promise.resolve(c)),c}catch(c){console.warn(`config at ${o} invalid:`,c)}r.configs.set(s,Promise.resolve(void 0))}(e.imageHash);return e.noCache||this.configs.set(e.imageHash,n),n}saveWalletConfig(e){throw new Error("arweave backend does not support saving configs")}async imageHashOfCounterfactualWallet(e){const r=Ae(e.wallet),n=Object.entries(await Gd({Type:"wallet",Wallet:r},this.options)).flatMap(([s,i])=>{try{const{"Deploy-Config":o}=i,a=Number(i["Deploy-Version"]);if(!a)throw new Error(`invalid version: ${i["Deploy-Version"]}`);if(!o)throw new Error("no deploy config");const c=de.context.defaultContexts[a];if(!c)throw new Error(`unknown version: ${a}`);if(de.context.addressOf(c,o)!==r)throw new Error(`incorrect v${a} deploy config: ${o}`);return[{id:s,imageHash:o,context:c}]}catch(o){return console.warn(`wallet ${r} at ${s} invalid:`,o),[]}});switch(n.length){case 0:return;case 1:break;default:console.warn(`multiple deploy configs for wallet ${r} at ${n.map(({id:s})=>s).join(", ")}, using first`);break}return n[0]}saveCounterfactualWallet(e){throw new Error("arweave backend does not support saving wallets")}async walletsOfSigner(e){var r=this;const n=Ae(e.signer),s=new Map;for(const[i,o]of Object.entries(await Gd({Type:["signature","config update"],Signer:n,Witness:e.allSignatures?void 0:"true"},this.options))){const{Wallet:a,Subdigest:c,Digest:l,"Chain-ID":u}=o;try{if(s.has(a))continue;let f;switch(o["Signature-Type"]){case"eip-712":f="01";break;case"eth_sign":f="02";break;case"erc-1271":f="03";break;default:throw new Error(`unknown signature type ${o["Signature-Type"]}`)}if(c!==de.signature.subdigestOf({digest:l,chainId:u,address:a}))throw new Error("incorrect subdigest");const d=Ip(i,this.options.rateLimitRetryDelayMs,this.options.arweaveUrl).then(async function(h){const y=await h.text()+f;if(r.eip5719)try{return z(await r.eip5719.runByEIP5719(n,c,y))}catch{console.warn(`unable to run eip-5719 on signature ${i}`)}return y});s.set(a,{digest:l,chainId:BigInt(u),signature:d})}catch(f){console.warn(`signer ${n} signature ${i} of wallet ${a} invalid:`,f)}}return Promise.all([...s.entries()].map(async function([i,{digest:o,chainId:a,signature:c}]){return{wallet:i,proof:{digest:o,chainId:a,signature:await c}}}))}async getMigration(e,r,n,s){const i=Ae(e),o=Object.entries(await Gd({Type:"migration",Migration:i,"Chain-ID":BigInt(s).toString(),"From-Version":`${n}`,"From-Config":r},this.options)).flatMap(([m,k])=>{try{const{"To-Config":A,Executor:P}=k,R=Number(k["To-Version"]);if(!R)throw new Error(`invalid version: ${k["To-Version"]}`);if(!qe(A,32))throw new Error(`to config is not a hash: ${A}`);if(!ag(P))throw new Error(`executor is not an address: ${P}`);return{id:m,toVersion:R,toImageHash:A,executor:P}}catch(A){return console.warn(`chain ${s} migration ${m} for v${n} wallet ${i} from config ${r} invalid:`,A),[]}});switch(o.length){case 0:return;case 1:break;default:console.warn(`multiple chain ${s} migrations for v${n} wallet ${i} from config ${r} at ${o.map(({id:m})=>m).join(", ")}, using first`);break}const{id:a,toVersion:c,toImageHash:l,executor:u}=o[0],[f,d]=await Promise.all([Ip(a,this.options.rateLimitRetryDelayMs,this.options.arweaveUrl).then(m=>m.text()),this.configOfImageHash({imageHash:l})]);if(!d)throw new Error(`unable to find to config ${l} for migration`);const h=new ut(due),[y,p,b]=h.decodeFunctionData("execute",f),g=de.transaction.fromTxAbiEncode(y),v=de.transaction.subdigestOfTransactions(i,s,p,g);return{tx:{entrypoint:u,transactions:g,nonce:p,chainId:s,intent:{id:v,wallet:i},signature:b},fromVersion:n,toVersion:Number(c),toConfig:d}}saveMigration(e,r,n){throw new Error("arweave backend does not support saving migrations")}}async function Gd(t,e){var r,n,s,i;const o=(r=e==null?void 0:e.namespace)!=null?r:rl.namespace,a=e==null?void 0:e.owners,c=(n=e==null?void 0:e.graphqlUrl)!=null?n:rl.graphqlUrl,l=(s=e==null?void 0:e.rateLimitRetryDelayMs)!=null?s:rl.rateLimitRetryDelayMs,u=(i=e==null?void 0:e.pageSize)!=null?i:100,f=e==null?void 0:e.maxResults,d=Object.entries(t).flatMap(([y,p])=>p===void 0?[]:[`{ name: "${o?`${o}-${y}`:y}", values: [${typeof p=="string"?`"${p}"`:p.map(b=>`"${b}"`).join(", ")}] }`]),h=[];for(let y=!0;y&&(f===void 0||h.length`"${v}"`).join(", ")}]`}) { - pageInfo { - hasNextPage - } - edges { - cursor - node { - id - tags { - name - value - } - } - } - } - } - `;let b;for(;b=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:p}),redirect:"follow"}),b.status===429;)console.warn(`rate limited by ${c}, trying again in ${l/1e3} seconds at ${new Date(Date.now()+l).toLocaleTimeString()}`),await new Promise(v=>setTimeout(v,l));const{data:{transactions:g}}=await b.json();h.push(...g.edges),y=g.pageInfo.hasNextPage}return Object.fromEntries(h.map(({node:{id:y,tags:p}})=>[y,Object.fromEntries(p.map(({name:b,value:g})=>[o&&b.startsWith(`${o}-`)?b.slice(o.length+1):b,g]))]))}async function Ip(t,e=rl.rateLimitRetryDelayMs,r=rl.arweaveUrl){for(;;){const n=await fetch(`${r}/${t}`,{redirect:"follow"});if(n.status!==429)return n;console.warn(`rate limited by ${r}, trying again in ${e/1e3} seconds at ${new Date(Date.now()+e).toLocaleTimeString()}`),await new Promise(s=>setTimeout(s,e))}}function Ql(t){return typeof t=="string"?{nodeHash:t}:typeof t=="object"&&(t==null?void 0:t.node)!==void 0?{nodeHash:t.node}:t instanceof Array&&t.length===2?{left:Ql(t[0]),right:Ql(t[1])}:Ne.config.isNode(t)?{left:Ql(t.left),right:Ql(t.right)}:Ne.config.isNestedLeaf(t)?bi({},t,{tree:Ql(t.tree)}):t}var pue=Object.freeze({__proto__:null,defaults:rl,ArweaveReader:hue});class yue{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Lr(e,"? "),Lr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Lr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Lr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Lr(e,"? "),Lr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Lr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Lr(e,"? "),Lr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Lr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Lr(e,"? "),Lr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),Lr({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),Lr(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Lr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Lr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,Ts,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var gue=Object.freeze({__proto__:null,DebugConfigTracker:yue});class fj{constructor(){this.configs={},this.v2Nodes={},this.counterfactualWallets={},this.payloads={},this.signatures={},this.migrations={},this.loadConfig=e=>Promise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var s;return Promise.resolve(((s=this.migrations[e])==null||(s=s[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:s,toImageHash:i}),Promise.resolve())}}function ju(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=BigInt(n._hex):Array.isArray(n)?e[r]=n.map(s=>ju(s)):typeof n=="object"&&n!==null?e[r]=ju(n):e[r]=n}return e}class vue{constructor(e){var r=this;this.dbName=e,this._lazyDb=void 0,this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>ju(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>ju(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>ju(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(c=>({subdigest:c.subdigest,toImageHash:c.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)}}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await cue(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function dj(t){return t.left!==void 0&&t.right!==void 0}function hj(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function G2(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var mue=Object.freeze({__proto__:null,isPlainNode:dj,isPlainNested:hj,isPlainV2Config:G2,MemoryTrackerStore:fj,recreateBigNumbers:ju,IndexedDBStore:vue});class M5{constructor(e,r=new fj,n=!1){var s=this;this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=void 0,this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(dj(o)){const[a,c]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:c}}return hj(o)?{weight:BigInt(o.weight),threshold:BigInt(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(Ne.config.isNodeLeaf(i))return;const o=Ne.config.hashNode(i);if(Ne.config.isNode(i)){const a=s.saveTopology(i.left),c=s.saveTopology(i.right),l=s.store.saveV2Node(o,{left:Ne.config.hashNode(i.left),right:Ne.config.hashNode(i.right)});await Promise.all([a,c,l]);return}if(Ne.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),c=s.store.saveV2Node(o,{weight:BigInt(i.weight).toString(),threshold:BigInt(i.threshold).toString(),tree:Ne.config.hashNode(i.tree)});await Promise.all([a,c]);return}if(Ne.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(Ne.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Hi.config.ConfigCoder.isWalletConfig(o)){const a=Hi.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(Ne.config.ConfigCoder.isWalletConfig(o)){const a=Ne.config.ConfigCoder.imageHashOf(o);if(Ne.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!G2(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(G2(a)){const c={version:2,threshold:BigInt(a.threshold),checkpoint:BigInt(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,c=Zt.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(l=>{const u=de.context.addressOf(l,c);return s.store.saveCounterfactualWallet(u,c,l)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=de.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=Ne.signature.SignatureCoder.decode(i.signature),a=Zt.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),c=Ne.chained.messageSetImageHash(a),l=Me(c),u={message:c,address:i.wallet,chainId:0,digest:l},f=s.savePayload({payload:u}),d=s.saveWalletConfig({config:i.nextConfig}),h=await Ne.signature.SignatureCoder.recover(o,u,s.provider),y=Ne.signature.signaturesOf(h.config.tree);await Promise.all([f,d,s.saveWalletConfig({config:h.config}),...y.map(p=>s.store.saveSignatureOfSubdigest(p.address,h.subdigest,p.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:c}=i,l=await s.configOfImageHash({imageHash:a});if(!l||!Ne.config.ConfigCoder.isWalletConfig(l))return[];const u=Ne.config.signersOf(l.tree).map(m=>m.address),f=await Promise.all(u.map(m=>s.store.loadSubdigestsOfSigner(m))),d=[...new Set(f.flat())],y=(await Promise.all([...new Set(d)].map(async function(m){return bi({},await s.payloadOfSubdigest({subdigest:m}),{subdigest:m})}))).filter(m=>(m==null?void 0:m.message)&&(m==null?void 0:m.address)&&m.address===o).map(m=>({payload:m,nextImageHash:Ne.chained.decodeMessageSetImageHash(m.message)})).filter(m=>m==null?void 0:m.nextImageHash);let p;const g=(await Promise.all(y.map(async function({nextImageHash:m,payload:k}){const A=await s.configOfImageHash({imageHash:m});if(!A||!Ne.config.isWalletConfig(A))return;const P=BigInt(A.checkpoint);return{nextConfig:A,nextCheckpoint:P,nextImageHash:m,payload:k}}))).filter(m=>m!==void 0).filter(m=>m.nextCheckpoint>BigInt(l.checkpoint)).sort((m,k)=>m.nextCheckpoint>k.nextCheckpoint?c?1:-1:c?-1:1);for(const m of g){const{nextConfig:k,nextCheckpoint:A,nextImageHash:P,payload:R}=m;if(p){const F=p.checkpoint;if(c){if(A>=F)continue}else if(A<=F)continue}const N=new Map((await Promise.all(u.map(async function(F){const X=await s.store.loadSignatureOfSubdigest(F,R.subdigest);if(!X)return[F,void 0];const re=z(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(F,R.subdigest,X):X),le=de.signer.tryRecoverSigner(R.subdigest,re)!==F;return[F,{isDynamic:le,signature:re}]}))).filter(F=>!!F[1]));if(N.size===0)continue;const V=Ne.signature.SignatureCoder.encodeSigners(l,N,[],0);V.weightde.signer.canRecover(c)).map(c=>{const l=de.signer.recoverSigner(a,c);return s.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(l=>s.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(u=>u!==void 0)),c=[];for(const l of a){const u=l.address;if(c.find(h=>h.wallet===u))continue;const f=de.signature.subdigestOf(l),d=await s.store.loadSignatureOfSubdigest(i.signer,f);d&&c.push({wallet:u,proof:{digest:l.digest,chainId:BigInt(l.chainId),signature:z(d)}})}return c},this.cachedEIP5719=new aj(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!Ne.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=LD.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ne.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=de.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=Me(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},u=de.signature.subdigestOf(l),f=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=Hi.signature.SignatureCoder.decode(r.tx.signature),y=await Hi.signature.SignatureCoder.recover(h,l,this.provider),p=Hi.signature.SignatureCoder.signaturesOf(y.config);await Promise.all([f,d,this.saveWalletConfig({config:y.config}),this.store.saveMigrationsSubdigest(e,s,s+1,u,i),...p.map(b=>this.store.saveSignatureOfSubdigest(b.address,y.subdigest,b.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),c=Zt.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(u){const{subdigest:f,toImageHash:d}=u,h=await i.payloadOfSubdigest({subdigest:f});if(!h||!h.message||BigInt(s)!==BigInt(h.chainId))return;const y=c.config.signersOf(o).map(m=>m.address),p=new Map((await Promise.all(y.map(async function(m){const k=await i.store.loadSignatureOfSubdigest(m,f);if(!k)return[m,void 0];const A=z(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(m,f,k):k),P=de.signer.tryRecoverSigner(f,A)!==m;return[m,{isDynamic:P,signature:A}]}))).filter(m=>!!m[1])),b=c.signature.encodeSigners(o,p,[],s);if(!b||b.weightu.filter(f=>f!==void 0)))[0]}updateProvider(e){this.provider=e}}var xue=Object.freeze({__proto__:null,LocalConfigTracker:M5});let Yx=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class bue{constructor(e,r){this.hostname=void 0,this.fetch=void 0,this.path="/rpc/Sessions/",this.ping=(n,s)=>this.fetch(this.url("Ping"),Fn({},n,s)).then(i=>Un(i).then(o=>({})),i=>{throw mn.new({cause:`fetch(): ${i.message||""}`})}),this.config=(n,s,i)=>this.fetch(this.url("Config"),Fn(n,s,i)).then(o=>Un(o).then(a=>({version:a.version,config:a.config})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.wallets=(n,s,i)=>this.fetch(this.url("Wallets"),Fn(n,s,i)).then(o=>Un(o).then(a=>({wallets:a.wallets,cursor:a.cursor})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.deployHash=(n,s,i)=>this.fetch(this.url("DeployHash"),Fn(n,s,i)).then(o=>Un(o).then(a=>({deployHash:a.deployHash,context:a.context})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.configUpdates=(n,s,i)=>this.fetch(this.url("ConfigUpdates"),Fn(n,s,i)).then(o=>Un(o).then(a=>({updates:a.updates})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.migrations=(n,s,i)=>this.fetch(this.url("Migrations"),Fn(n,s,i)).then(o=>Un(o).then(a=>({migrations:a.migrations})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveConfig=(n,s,i)=>this.fetch(this.url("SaveConfig"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveWallet=(n,s,i)=>this.fetch(this.url("SaveWallet"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignature=(n,s,i)=>this.fetch(this.url("SaveSignature"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignerSignatures=(n,s,i)=>this.fetch(this.url("SaveSignerSignatures"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveSignerSignatures2=(n,s,i)=>this.fetch(this.url("SaveSignerSignatures2"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.saveMigration=(n,s,i)=>this.fetch(this.url("SaveMigration"),Fn(n,s,i)).then(o=>Un(o).then(a=>({})),o=>{throw mn.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e.replace(/\/*$/,""),this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Fn=(t={},e={},r=null)=>({method:"POST",headers:bi({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Un=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),bj.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(Nue[n]||gn).new(r)}return r});let gn=class pj extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,pj.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},wue=class yj extends gn{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yj.prototype)}},mn=class gj extends gn{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gj.prototype)}},Eue=class vj extends gn{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vj.prototype)}},Cue=class mj extends gn{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mj.prototype)}},kue=class xj extends gn{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xj.prototype)}},bj=class wj extends gn{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wj.prototype)}},Sue=class Ej extends gn{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ej.prototype)}},Aue=class Cj extends gn{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Cj.prototype)}},Tue=class kj extends gn{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kj.prototype)}},Iue=class Sj extends gn{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Sj.prototype)}},Pue=class Aj extends gn{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Aj.prototype)}},Oue=class Tj extends gn{constructor(e="InvalidArgument",r=1,n="invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Tj.prototype)}},Rue=class Ij extends gn{constructor(e="NotFound",r=2,n="not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Ij.prototype)}};const Nue={0:wue,[-1]:mn,[-2]:Eue,[-3]:Cue,[-4]:kue,[-5]:bj,[-6]:Sue,[-7]:Aue,[-8]:Tue,[-9]:Iue,[-10]:Pue,1:Oue,2:Rue};class _ue{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=void 0,this.sessions=new bue(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(Xx(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Zt.genericCoderFor(r.version).config.imageHashOf(r),s=Ne.signature.setImageHashStruct(n),i=Me(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Pp(r),referenceChainID:e.referenceChainId})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>de.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:yu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return Mue(r,n)}catch(r){if(Xx(r))return;throw r}}async saveWalletConfig(e){const r=Pp(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(Xx(r))return;throw r}}async saveCounterfactualWallet(e){const r=Pp(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:s,chainID:i,type:o,signature:a}])=>{switch(o){case Yx.EIP712:a+=On(de.signer.SigType.EIP712).slice(2);break;case Yx.EthSign:a+=On(de.signer.SigType.ETH_SIGN).slice(2);break;case Yx.EIP1271:a+=On(de.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:BigInt(i)}}})}async getMigration(e,r,n,s){var i=this;const o=yu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(f){const d=a[f];if(d){const h=Object.keys(d).map(Number).sort((y,p)=>p-y);for(const y of h)for(const[p,b]of Object.entries(d[y]))try{const g=await i.configOfImageHash({imageHash:p});if(g)return{fromVersion:n,toVersion:y,toConfig:g,tx:{entrypoint:b.executor,transactions:b.transactions,nonce:b.nonce,signature:b.signature,chainId:f,intent:{id:de.transaction.subdigestOfTransactions(e,f,b.nonce,b.transactions),wallet:e}}}}catch(g){console.error(g)}}},l=await c(o);if(l)return l;for(const u in a)if(u!==o){const f=await c(u);if(f)return f}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Pp(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(Due),nonce:yu(r.tx.nonce),signature:r.tx.signature,chainID:yu(r.tx.chainId)})}}function Pp(t){switch(t.version){case 1:if(Hi.config.ConfigCoder.isWalletConfig(t))return{threshold:bc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:bc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ne.config.ConfigCoder.isWalletConfig(t))return{threshold:bc(t.threshold),checkpoint:bc(t.checkpoint),tree:py(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function py(t){return Ne.config.isNode(t)?{left:py(t.left),right:py(t.right)}:Ne.config.isSignerLeaf(t)?{weight:bc(t.weight),address:t.address}:Ne.config.isNestedLeaf(t)?{weight:bc(t.weight),threshold:bc(t.threshold),tree:py(t.tree)}:Ne.config.isNodeLeaf(t)?{node:t.nodeHash}:bi({},t)}function Mue(t,e){switch(t){case 1:return bi({},e,{version:t});case 2:return bi({},e,{version:t,tree:yy(e.tree)});default:throw new Error(`unknown version ${t}`)}}function yy(t){switch(typeof t){case"object":const e=bi({},t);return e.left!==void 0&&(e.left=yy(e.left)),e.right!==void 0&&(e.right=yy(e.right)),e.tree!==void 0&&(e.tree=yy(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function Due(t){return{to:t.to,value:t.value!==void 0?yu(t.value):void 0,data:t.data!==void 0?z(t.data):void 0,gasLimit:t.gasLimit!==void 0?yu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function bc(t){return Number(t)}function yu(t){return BigInt(t).toString()}function Xx(t){return typeof t=="object"&&t.status===404}var Bue=Object.freeze({__proto__:null,RemoteConfigTracker:_ue});function q2(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function hh(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class Lue{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await q2(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Zt.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const s=new M5(void 0),i=await hh(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await q2(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await hh(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:c,signature:l}})=>{const u=`${o}-${a}-${c}`;let f=i.get(u);f||(f={wallet:o,digest:a,chainId:c,signatures:[]},i.set(u,f)),f.signatures.push(l)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await hh(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),i=(await hh(n.map(async function(c){const l=c[c.length-1],u=await r.configOfImageHash({imageHash:l.nextImageHash});if(u)return{checkpoint:Zt.genericCoderFor(u.version).config.checkpointOf(u),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint>c.checkpoint)?l:c);if(!i)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return i.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class jue{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthf&&(!u||f.checkpoint>u.checkpoint)?f:u))==null?void 0:c.result)!=null?a:[]}return s||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class O8{constructor(){this.cache=void 0,this.cache=new Map}do(e,r,n,...s){e=`${e}:${Dr(JSON.stringify(s,Fue))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function Fue(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):typeof e=="bigint"?e.toString():e}function Uue(t){return t instanceof Pj}class Pj{constructor(e,r=50,n=!1){this.tracker=e,this.window=r,this.verbose=n,this.cache=new O8}invalidateCache(){this.cache=new O8}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof M5&&this.tracker.updateProvider(e)}}var D5=Object.freeze({__proto__:null,arweave:pue,debug:gue,local:xue,remote:Bue,stores:mue,raceUntil:q2,allSafe:hh,MultipleTracker:Lue,CachedTracker:jue,isDedupedTracker:Uue,DedupedTracker:Pj});const $ue=Object.freeze(Object.defineProperty({__proto__:null,tracker:fue,trackers:D5},Symbol.toStringTag,{value:"Module"})),Oj=60*60*24*7,Wue=60;class R8{constructor(e,r,n={},s){this.account=e,this.settings=r,this.status=n,this._initialAuthRequest=void 0,this.proofStrings=new Map,this.onAuthCallbacks=[],this.apiClient=void 0,this.metadataClient=void 0,this.indexerClients=new Map,this.projectAccessKey=void 0,this.projectAccessKey=s}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:Oj,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new uy(n,void 0,s)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const l=this.status.jwt,u=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"rejected",reason:l})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new wg,n=BigInt(this.settings.sequenceApiChainId),s=Ns(this.account.networks,n);if(!s)throw Error("No network found");r.chainId=Number(n);const i=new lt(s.name,n);return r.provider=new cr(N0(s.rpcUrl,this.projectAccessKey),i,{staticNetwork:i}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new uy(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new oj(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=Ns(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const s=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new EL(n.indexerUrl,void 0,s))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:a};return this.proofStrings.set(e,c),c}}const Rj=async(t,e,r)=>{const n=Ae(await t.getAddress());if(!n||n===""||n==="0x")throw Nj;const s=new a5;if(s.address=n,!r||!r.app||r.app==="")throw new B5("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.claims.n=r.nonce,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):Oj);const i=s.messageTypedData(),o=$M(e);s.signature=await(t instanceof Qi?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const c=await new wg().encodeProof(s,!0);return{typedData:i,proofString:c}};class B5 extends Error{constructor(e){super(e),this.name="AuthError"}}const Nj=new B5("auth error: account address is empty");function uc(){return uc=Object.assign?Object.assign.bind():function(t){for(var e=1;eF.wallet));let N;if(R){if(f==null||f(R),N=new Qi({address:R,tracker:m,networks:v,contexts:g,orchestrator:p,projectAccessKey:b}),l&&l.length>0){let F=await N.status(A);if(F.original.version!==F.version||N.version!==F.version){const{migratedAllChains:le,failedChains:ee}=await N.isMigratedAllChains();if(ee.some(B=>K2.includes(B)))throw Error(`Failed to fetch account status on ${ee.join(", ")}`);if(!le){if(y&&!await y(N))throw Error("Migration cancelled, cannot open session");const{failedChains:B}=await N.signAllMigrations(h||(Z=>Z));if(B.some(Z=>K2.includes(Z)))throw Error(`Failed to sign migrations on ${B.join(", ")}`);D5.isDedupedTracker(m)&&m.invalidateCache();let G;if([G,F]=await Promise.all([N.isMigratedAllChains().then(Z=>Z.migratedAllChains),N.status(A)]),!G)throw Error("Failed to migrate account")}}F.onChain.version!==F.version&&await N.doBootstrap(A,void 0,F);const X=F.config,re=N.coders.config.editConfig(X,{add:l,threshold:c});if(N.coders.config.imageHashOf(X)!==N.coders.config.imageHashOf(re)){const le=N.coders.config.editConfig(re,{checkpoint:N.coders.config.checkpointOf(X)+1n});await N.updateConfig(le)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(N=await Qi.new({config:{threshold:c,checkpoint:0,signers:l},tracker:m,contexts:g,orchestrator:p,networks:v,projectAccessKey:b}),f==null||f(N.address),await N.publishWitness(),!(await m.walletsOfSigner({signer:a,noCache:!0})).some(X=>X.wallet===N.address))throw Error("Account not found on tracker")}let V;return k&&(V=new R8(N,k),V.auth(),V.onAuth(F=>{F.status==="fulfilled"&&N.setJwt(F.value)})),new $h(v,g,N,V)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:c,tracker:l,services:u}=uc({},gy,n);let f;if(_j(r)){var d,h,y;const k=r.config.address||de.context.addressOf(a[1],Hi.config.ConfigCoder.imageHashOf(uc({},r.config,{version:1}))),A=((d=(h=r.jwt)==null?void 0:h.expiration)!=null?d:0)P.migratedAllChains)){if(i&&!await i(f))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await f.signAllMigrations(s),!await f.isMigratedAllChains().then(P=>P.migratedAllChains))throw Error("Failed to migrate account")}}else if(Mj(r)){var p,b,g;const k=((p=(b=r.jwt)==null?void 0:b.expiration)!=null?p:0)async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},zue=Object.freeze(Object.defineProperty({__proto__:null,AuthError:B5,CRITICAL_CHAINS:K2,ErrAccountIsRequired:Nj,Session:$h,SessionSettingsDefault:gy,ValidateSequenceWalletProof:Vue,isSessionDumpV1:_j,isSessionDumpV2:Mj,signAuthorization:Rj},Symbol.toStringTag,{value:"Module"}));function Og(){return Og=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),kr({},n,s)).then(i=>Sr(i).then(o=>({status:o.status})),i=>{throw ur.new({cause:`fetch(): ${i.message||""}`})}),this.version=(n,s)=>this.fetch(this.url("Version"),kr({},n,s)).then(i=>Sr(i).then(o=>({version:o.version})),i=>{throw ur.new({cause:`fetch(): ${i.message||""}`})}),this.runtimeStatus=(n,s)=>this.fetch(this.url("RuntimeStatus"),kr({},n,s)).then(i=>Sr(i).then(o=>({status:o.status})),i=>{throw ur.new({cause:`fetch(): ${i.message||""}`})}),this.getSignerConfig=(n,s,i)=>this.fetch(this.url("GetSignerConfig"),kr(n,s,i)).then(o=>Sr(o).then(a=>({signerConfig:a.signerConfig})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.sign=(n,s,i)=>this.fetch(this.url("Sign"),kr(n,s,i)).then(o=>Sr(o).then(a=>({sig:a.sig})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.signWith=(n,s,i)=>this.fetch(this.url("SignWith"),kr(n,s,i)).then(o=>Sr(o).then(a=>({sig:a.sig})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.patch=(n,s,i)=>this.fetch(this.url("Patch"),kr(n,s,i)).then(o=>Sr(o).then(a=>({txs:a.txs})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.authMethods=(n,s,i)=>this.fetch(this.url("AuthMethods"),kr(n,s,i)).then(o=>Sr(o).then(a=>({methods:a.methods,active:a.active})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.setPIN=(n,s,i)=>this.fetch(this.url("SetPIN"),kr(n,s,i)).then(o=>Sr(o).then(a=>({})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.resetPIN=(n,s,i)=>this.fetch(this.url("ResetPIN"),kr(n,s,i)).then(o=>Sr(o).then(a=>({})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.createTOTP=(n,s,i)=>this.fetch(this.url("CreateTOTP"),kr(n,s,i)).then(o=>Sr(o).then(a=>({uri:a.uri})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.commitTOTP=(n,s,i)=>this.fetch(this.url("CommitTOTP"),kr(n,s,i)).then(o=>Sr(o).then(a=>({codes:a.codes})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.resetTOTP=(n,s,i)=>this.fetch(this.url("ResetTOTP"),kr(n,s,i)).then(o=>Sr(o).then(a=>({})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.reset2FA=(n,s,i)=>this.fetch(this.url("Reset2FA"),kr(n,s,i)).then(o=>Sr(o).then(a=>({})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.recoveryCodes=(n,s,i)=>this.fetch(this.url("RecoveryCodes"),kr(n,s,i)).then(o=>Sr(o).then(a=>({codes:a.codes})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.resetRecoveryCodes=(n,s,i)=>this.fetch(this.url("ResetRecoveryCodes"),kr(n,s,i)).then(o=>Sr(o).then(a=>({codes:a.codes})),o=>{throw ur.new({cause:`fetch(): ${o.message||""}`})}),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const kr=(t={},e={},r=null)=>({method:"POST",headers:Og({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{}),signal:r}),Sr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),Wj.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(sfe[n]||Ut).new(r)}return r});let Ut=class Bj extends Error{constructor(e,r,n,s,i){super(n),this.name=void 0,this.code=void 0,this.message=void 0,this.status=void 0,this.cause=void 0,this.msg=void 0,this.name=e||"WebrpcError",this.code=typeof r=="number"?r:0,this.message=n||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof s=="number"?s:0,this.cause=i,Object.setPrototypeOf(this,Bj.prototype)}static new(e){return new this(e.error,e.code,e.message||e.msg,e.status,e.cause)}},Hue=class Lj extends Ut{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Lj.prototype)}},ur=class jj extends Ut{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,jj.prototype)}},Gue=class Fj extends Ut{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Fj.prototype)}},que=class Uj extends Ut{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Uj.prototype)}},Kue=class $j extends Ut{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,$j.prototype)}},Wj=class Vj extends Ut{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Vj.prototype)}},Que=class zj extends Ut{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,zj.prototype)}},Jue=class Hj extends Ut{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Hj.prototype)}},Yue=class Gj extends Ut{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Gj.prototype)}},Xue=class qj extends Ut{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,qj.prototype)}},Zue=class Kj extends Ut{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Kj.prototype)}},efe=class Qj extends Ut{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Qj.prototype)}},tfe=class Jj extends Ut{constructor(e="SessionExpired",r=1002,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Jj.prototype)}};class L5 extends Ut{constructor(e="Aborted",r=1005,n="Request aborted",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,L5.prototype)}}class j5 extends Ut{constructor(e="InvalidArgument",r=2001,n="Invalid argument",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,j5.prototype)}}class F5 extends Ut{constructor(e="Unavailable",r=2002,n="Unavailable resource",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,F5.prototype)}}let rfe=class Yj extends Ut{constructor(e="QueryFailed",r=2003,n="Query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Yj.prototype)}};class U5 extends Ut{constructor(e="ValidationFailed",r=2004,n="Validation Failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,U5.prototype)}}let nfe=class Xj extends Ut{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,Xj.prototype)}};const sfe={0:Hue,[-1]:ur,[-2]:Gue,[-3]:que,[-4]:Kue,[-5]:Wj,[-6]:Que,[-7]:Jue,[-8]:Yue,[-9]:Xue,[-10]:Zue,1e3:efe,1002:tfe,1005:L5,2001:j5,2002:F5,2003:rfe,2004:U5,3e3:nfe},ife=globalThis.fetch;class ofe{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=void 0,this.guard=new Dj(r,ife)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async sign(e,r){var n;if(!de.isWalletSignRequestMetadata(r))throw new Error("expected sequence signature request metadata");const s=r.guardTotpCode,i=Zt.genericCoderFor(r.config.version),{encoded:o}=i.signature.encodeSigners(r.config,(n=r.parts)!=null?n:new Map,[],r.chainId);return(await this.guard.signWith({signer:this.address,request:{msg:z(e),auxData:this.packMsgAndSig(r.address,r.digest,o,r.chainId),chainId:Number(r.chainId)},token:s?{id:Rg.TOTP,token:s}:void 0})).sig}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await Q2(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Og({},r,{methods:r.methods.map(afe)})}async setPin(e,r){const n=await qd(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await qd(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await qd(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await Q2(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await qd(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await qd(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,s){return qt.defaultAbiCoder().encode(["address","uint256","bytes","bytes"],[e,s,r,n])}suffix(){return new Uint8Array(this.appendSuffix?[3]:[])}}let Rg=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function afe(t){switch(t){case Rg.PIN:case Rg.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function Zj(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function Q2(t){if(Zj(t))return t;{const e=V2.isSapientSigner(t.signer)?t.signer:new V2.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,s=eF(t.walletAddress,n),i=Ad(s);return{walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:z(await e.sign(i,{}))}}}async function qd(t){if("wallet"in t){var e;const r=new Date,n=tF(r),s=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:s}}else return t}function eF(t,e){return{domain:rF,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:Ae(t),timestamp:nF(e)}}}function tF(t){return{domain:rF,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:nF(t)}}}const rF={name:"Sequence Guard",version:"1",chainId:1};function nF(t){return t.toUTCString().replace("GMT","UTC")}const cfe=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:Rg,Guard:Dj,GuardSigner:ofe,getAuthUpdateProofTypedData:tF,getOwnershipProofTypedData:eF,isSignedOwnershipProof:Zj,signOwnershipProof:Q2},Symbol.toStringTag,{value:"Module"}));var sF={exports:{}};/*! - * EventEmitter2 - * https://github.com/hij1nx/EventEmitter2 - * - * Copyright (c) 2013 hij1nx - * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,s=Array.isArray?Array.isArray:function(S){return Object.prototype.toString.call(S)==="[object Array]"},i=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",c=typeof Reflect=="object",l=typeof setImmediate=="function",u=l?setImmediate:setTimeout,f=a?c&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(E){var S=Object.getOwnPropertyNames(E);return S.push.apply(S,Object.getOwnPropertySymbols(E)),S}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(E){E&&(this._conf=E,E.delimiter&&(this.delimiter=E.delimiter),E.maxListeners!==r&&(this._maxListeners=E.maxListeners),E.wildcard&&(this.wildcard=E.wildcard),E.newListener&&(this._newListener=E.newListener),E.removeListener&&(this._removeListener=E.removeListener),E.verboseMemoryLeak&&(this.verboseMemoryLeak=E.verboseMemoryLeak),E.ignoreErrors&&(this.ignoreErrors=E.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function y(E,S){var O="(node) warning: possible EventEmitter memory leak detected. "+E+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(O+=" Event name: "+S+"."),typeof process<"u"&&process.emitWarning){var D=new Error(O);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=E,process.emitWarning(D)}else console.error(O),console.trace&&console.trace()}var p=function(E,S,O){var D=arguments.length;switch(D){case 0:return[];case 1:return[E];case 2:return[E,S];case 3:return[E,S,O];default:for(var L=new Array(D);D--;)L[D]=arguments[D];return L}};function b(E,S){for(var O={},D,L=E.length,W=0,q=0;q0;)E=W[J],q.call(te,E,O[E]);this._listeners={},this._listenersCount=0,$()}}});function v(E,S,O,D){var L=Object.assign({},S);if(!E)return L;if(typeof E!="object")throw TypeError("options must be an object");var W=Object.keys(E),q=W.length,te,J,$;function K(he){throw Error('Invalid "'+te+'" option value'+(he?". Reason: "+he:""))}for(var ue=0;ue0;)if(te===E[J])return W;q(S)}}var A=k(["function"]),P=k(["object","function"]);function R(E,S,O){var D,L,W=0,q,te=new E(function(J,$,K){O=v(O,{timeout:0,overload:!1},{timeout:function(ke,_e){return ke*=1,(typeof ke!="number"||ke<0||!Number.isFinite(ke))&&_e("timeout must be a positive number"),ke}}),D=!O.overload&&typeof E.prototype.cancel=="function"&&typeof K=="function";function ue(){L&&(L=null),W&&(clearTimeout(W),W=0)}var he=function(ke){ue(),J(ke)},oe=function(ke){ue(),$(ke)};D?S(he,oe,K):(L=[function(ke){oe(ke||Error("canceled"))}],S(he,oe,function(ke){if(q)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof ke!="function")throw TypeError("onCancel callback must be a function");L.push(ke)}),q=!0),O.timeout>0&&(W=setTimeout(function(){var ke=Error("timeout");ke.code="ETIMEDOUT",W=0,te.cancel(ke),$(ke)},O.timeout))});return D||(te.cancel=function(J){if(L){for(var $=L.length,K=1;K<$;K++)L[K](J);L[0](J),L=null}}),te}function N(E){var S=this._observers;if(!S)return-1;for(var O=S.length,D=0;D0;)oe=se[te],oe!=="_listeners"&&(ae=V(E,S,O[oe],D+1,L),ae&&(he?he.push.apply(he,ae):he=ae));return he}else if(wr==="**"){for(tn=D+1===L||D+2===L&&U==="*",tn&&O._listeners&&(he=V(E,S,O,L,L)),se=f(O),te=se.length;te-- >0;)oe=se[te],oe!=="_listeners"&&(oe==="*"||oe==="**"?(O[oe]._listeners&&!tn&&(ae=V(E,S,O[oe],L,L),ae&&(he?he.push.apply(he,ae):he=ae)),ae=V(E,S,O[oe],D,L)):oe===U?ae=V(E,S,O[oe],D+2,L):ae=V(E,S,O[oe],D,L),ae&&(he?he.push.apply(he,ae):he=ae));return he}else O[wr]&&(he=V(E,S,O[wr],D+1,L));if(ke=O["*"],ke&&V(E,S,ke,D+1,L),_e=O["**"],_e)if(D0;)oe=se[te],oe!=="_listeners"&&(oe===U?V(E,S,_e[oe],D+2,L):oe===wr?V(E,S,_e[oe],D+1,L):(xt={},xt[oe]=_e[oe],V(E,S,{"**":xt},D+1,L)));else _e._listeners?V(E,S,_e,L,L):_e["*"]&&_e["*"]._listeners&&V(E,S,_e["*"],L,L);return he}function F(E,S,O){var D=0,L=0,W,q=this.delimiter,te=q.length,J;if(typeof E=="string")if((W=E.indexOf(q))!==-1){J=new Array(5);do J[D++]=E.slice(L,W),L=W+te;while((W=E.indexOf(q,L))!==-1);J[D++]=E.slice(L)}else J=[E],D=1;else J=E,D=E.length;if(D>1){for(W=0;W+10&&$._listeners.length>this._maxListeners&&($._listeners.warned=!0,y.call(this,$._listeners.length,K))):$._listeners=S,!0;return!0}function X(E,S,O,D){for(var L=f(E),W=L.length,q,te,J,$=E._listeners,K;W-- >0;)te=L[W],q=E[te],te==="_listeners"?J=O:J=O?O.concat(te):[te],K=D||typeof te=="symbol",$&&S.push(K?J:J.join(this.delimiter)),typeof q=="object"&&X.call(this,q,S,J,K);return S}function re(E){for(var S=f(E),O=S.length,D,L,W;O-- >0;)L=S[O],D=E[L],D&&(W=!0,L!=="_listeners"&&!re(D)&&delete E[L]);return W}function le(E,S,O){this.emitter=E,this.event=S,this.listener=O}le.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function ee(E,S,O){if(O===!0)L=!0;else if(O===!1)D=!0;else{if(!O||typeof O!="object")throw TypeError("options should be an object or true");var D=O.async,L=O.promisify,W=O.nextTick,q=O.objectify}if(D||W||L){var te=S,J=S._origin||S;if(W&&!o)throw Error("process.nextTick is not supported");L===r&&(L=S.constructor.name==="AsyncFunction"),S=function(){var $=arguments,K=this,ue=this.event;return L?W?Promise.resolve():new Promise(function(he){u(he)}).then(function(){return K.event=ue,te.apply(K,$)}):(W?process.nextTick:u)(function(){K.event=ue,te.apply(K,$)})},S._async=!0,S._origin=J}return[S,q?new le(this,E,S):this]}function B(E){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,E)}B.EventEmitter2=B,B.prototype.listenTo=function(E,S,O){if(typeof E!="object")throw TypeError("target musts be an object");var D=this;O=v(O,{on:r,off:r,reducers:r},{on:A,off:A,reducers:P});function L(W){if(typeof W!="object")throw TypeError("events must be an object");var q=O.reducers,te=N.call(D,E),J;te===-1?J=new g(D,E,O):J=D._observers[te];for(var $=f(W),K=$.length,ue,he=typeof q=="function",oe=0;oe0;)L=O[D],(!E||L._target===E)&&(L.unsubscribe(S),W=!0);return W},B.prototype.delimiter=".",B.prototype.setMaxListeners=function(E){E!==r&&(this._maxListeners=E,this._conf||(this._conf={}),this._conf.maxListeners=E)},B.prototype.getMaxListeners=function(){return this._maxListeners},B.prototype.event="",B.prototype.once=function(E,S,O){return this._once(E,S,!1,O)},B.prototype.prependOnceListener=function(E,S,O){return this._once(E,S,!0,O)},B.prototype._once=function(E,S,O,D){return this._many(E,1,S,O,D)},B.prototype.many=function(E,S,O,D){return this._many(E,S,O,!1,D)},B.prototype.prependMany=function(E,S,O,D){return this._many(E,S,O,!0,D)},B.prototype._many=function(E,S,O,D,L){var W=this;if(typeof O!="function")throw new Error("many only accepts instances of Function");function q(){return--S===0&&W.off(E,q),O.apply(this,arguments)}return q._origin=O,this._on(E,q,D,L)},B.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var E=arguments[0],S,O=this.wildcard,D,L,W,q,te;if(E==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(O&&(S=E,E!=="newListener"&&E!=="removeListener"&&typeof E=="object")){if(L=E.length,a){for(W=0;W3)for(D=new Array(J-1),q=1;q3)for(L=new Array($-1),te=1;te<$;te++)L[te-1]=arguments[te];for(q=0,W=K.length;q0&&this._events[E].length>this._maxListeners&&(this._events[E].warned=!0,y.call(this,this._events[E].length,E))):this._events[E]=S,L)},B.prototype.off=function(E,S){if(typeof S!="function")throw new Error("removeListener only takes instances of Function");var O,D=[];if(this.wildcard){var L=typeof E=="string"?E.split(this.delimiter):E.slice();if(D=V.call(this,null,L,this.listenerTree,0),!D)return this}else{if(!this._events[E])return this;O=this._events[E],D.push({_listeners:O})}for(var W=0;W0){for(D=this._all,S=0,O=D.length;S0;)D=S[O[W]],typeof D=="function"?L.push(D):L.push.apply(L,D);return L}else{if(this.wildcard){if(q=this.listenerTree,!q)return[];var te=[],J=typeof E=="string"?E.split(this.delimiter):E.slice();return V.call(this,te,J,q,0),te}return S?(D=S[E],D?typeof D=="function"?[D]:D:[]):[]}},B.prototype.eventNames=function(E){var S=this._events;return this.wildcard?X.call(this,this.listenerTree,[],null,E):S?f(S):[]},B.prototype.listenerCount=function(E){return this.listeners(E).length},B.prototype.hasListeners=function(E){if(this.wildcard){var S=[],O=typeof E=="string"?E.split(this.delimiter):E.slice();return V.call(this,S,O,this.listenerTree,0),S.length>0}var D=this._events,L=this._all;return!!(L&&L.length||D&&(E===r?f(D).length:D[E]))},B.prototype.listenersAny=function(){return this._all?this._all:[]},B.prototype.waitFor=function(E,S){var O=this,D=typeof S;return D==="number"?S={timeout:S}:D==="function"&&(S={filter:S}),S=v(S,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:A,Promise:m}),R(S.Promise,function(L,W,q){function te(){var J=S.filter;if(!(J&&!J.apply(O,arguments)))if(O.off(E,te),S.handleError){var $=arguments[0];$?W($):L(p.apply(null,arguments).slice(1))}else L(p.apply(null,arguments))}q(function(){O.off(E,te)}),O._on(E,te,!1)},{timeout:S.timeout,overload:S.overload})};function G(E,S,O){O=v(O,{Promise,timeout:0,overload:!1},{Promise:m});var D=O.Promise;return R(D,function(L,W,q){var te;if(typeof E.addEventListener=="function"){te=function(){L(p.apply(null,arguments))},q(function(){E.removeEventListener(S,te)}),E.addEventListener(S,te,{once:!0});return}var J=function(){$&&E.removeListener("error",$),L(p.apply(null,arguments))},$;S!=="error"&&($=function(K){E.removeListener(S,J),W(K)},E.once("error",$)),q(function(){$&&E.removeListener("error",$),E.removeListener(S,J)}),E.once(S,J)},{timeout:O.timeout,overload:O.overload})}var Z=B.prototype;Object.defineProperties(B,{defaultMaxListeners:{get:function(){return Z._maxListeners},set:function(E){if(typeof E!="number"||E<0||Number.isNaN(E))throw TypeError("n must be a non-negative number");Z._maxListeners=E},enumerable:!0},once:{value:G,writable:!0,configurable:!0}}),Object.defineProperties(Z,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),t.exports=B})()})(sF);var vm=sF.exports;function lfe(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function $5(t,...e){if(!lfe(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 N8(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 ufe(t,e){$5(t);const r=e.outputLen;if(t.lengthnew DataView(t.buffer,t.byteOffset,t.byteLength),Vs=(t,e)=>t<<32-e|t>>>e,ffe=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function dfe(t){$5(t);let e="";for(let r=0;rt().update(iF(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function gfe(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(r>>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}const vfe=(t,e,r)=>t&e^~t&r,mfe=(t,e,r)=>t&e^t&r^e&r;class xfe extends pfe{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Zx(this.buffer)}update(e){N8(this);const{view:r,buffer:n,blockLen:s}=this;e=iF(e);const i=e.length;for(let o=0;os-o&&(this.process(n,0),o=0);for(let f=o;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f>>3,p=Vs(h,17)^Vs(h,19)^h>>>10;To[f]=p+To[f-7]+y+To[f-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Vs(a,6)^Vs(a,11)^Vs(a,25),h=u+d+vfe(a,c,l)+bfe[f]+To[f]|0,p=(Vs(n,2)^Vs(n,13)^Vs(n,22))+mfe(n,s,i)|0;u=l,l=c,c=a,a=o+h|0,o=i,i=s,s=n,n=h+p|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){To.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Efe=yfe(()=>new wfe);var Cfe=class{constructor(t,e){_(this,"hostname");_(this,"fetch");_(this,"path","/rpc/Databeat/");_(this,"ping",(t,e)=>this.fetch(this.url("Ping"),Kd({},t,e)).then(r=>Qd(r).then(n=>({status:n.status})),r=>{throw Jl.new({cause:`fetch(): ${r.message||""}`})}));_(this,"version",(t,e)=>this.fetch(this.url("Version"),Kd({},t,e)).then(r=>Qd(r).then(n=>({version:n.version})),r=>{throw Jl.new({cause:`fetch(): ${r.message||""}`})}));_(this,"runtimeStatus",(t,e)=>this.fetch(this.url("RuntimeStatus"),Kd({},t,e)).then(r=>Qd(r).then(n=>({status:n.status})),r=>{throw Jl.new({cause:`fetch(): ${r.message||""}`})}));_(this,"tick",(t,e,r)=>this.fetch(this.url("Tick"),Kd(t,e,r)).then(n=>Qd(n).then(s=>({ok:s.ok})),n=>{throw Jl.new({cause:`fetch(): ${n.message||""}`})}));_(this,"rawEvents",(t,e,r)=>this.fetch(this.url("RawEvents"),Kd(t,e,r)).then(n=>Qd(n).then(s=>({ok:s.ok})),n=>{throw Jl.new({cause:`fetch(): ${n.message||""}`})}));this.hostname=t,this.fetch=(r,n)=>e(r,n)}url(t){return this.hostname+this.path+t}},Kd=(t={},e={},r=null)=>({method:"POST",headers:{...e,"Content-Type":"application/json"},body:JSON.stringify(t||{}),signal:r}),Qd=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch(n){let s="";throw n instanceof Error&&(s=n.message),dF.new({status:t.status,cause:`JSON.parse(): ${s}: response text: ${e}`})}if(!t.ok){const n=typeof r.code=="number"?r.code:0;throw(Ufe[n]||Kt).new(r)}return r}),Kt=class oF extends Error{constructor(r,n,s,i,o){super(s);_(this,"name");_(this,"code");_(this,"message");_(this,"status");_(this,"cause");_(this,"msg");this.name=r||"WebrpcError",this.code=typeof n=="number"?n:0,this.message=s||`endpoint error ${this.code}`,this.msg=this.message,this.status=typeof i=="number"?i:0,this.cause=o,Object.setPrototypeOf(this,oF.prototype)}static new(r){return new this(r.error,r.code,r.message||r.msg,r.status,r.cause)}},kfe=class aF extends Kt{constructor(e="WebrpcEndpoint",r=0,n="endpoint error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,aF.prototype)}},Jl=class cF extends Kt{constructor(e="WebrpcRequestFailed",r=-1,n="request failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,cF.prototype)}},Sfe=class lF extends Kt{constructor(e="WebrpcBadRoute",r=-2,n="bad route",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,lF.prototype)}},Afe=class uF extends Kt{constructor(e="WebrpcBadMethod",r=-3,n="bad method",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,uF.prototype)}},Tfe=class fF extends Kt{constructor(e="WebrpcBadRequest",r=-4,n="bad request",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,fF.prototype)}},dF=class hF extends Kt{constructor(e="WebrpcBadResponse",r=-5,n="bad response",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,hF.prototype)}},Ife=class pF extends Kt{constructor(e="WebrpcServerPanic",r=-6,n="server panic",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,pF.prototype)}},Pfe=class yF extends Kt{constructor(e="WebrpcInternalError",r=-7,n="internal error",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,yF.prototype)}},Ofe=class gF extends Kt{constructor(e="WebrpcClientDisconnected",r=-8,n="client disconnected",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,gF.prototype)}},Rfe=class vF extends Kt{constructor(e="WebrpcStreamLost",r=-9,n="stream lost",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,vF.prototype)}},Nfe=class mF extends Kt{constructor(e="WebrpcStreamFinished",r=-10,n="stream finished",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,mF.prototype)}},_fe=class xF extends Kt{constructor(e="Unauthorized",r=1e3,n="Unauthorized access",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,xF.prototype)}},Mfe=class bF extends Kt{constructor(e="PermissionDenied",r=2e3,n="Permission denied",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,bF.prototype)}},Dfe=class wF extends Kt{constructor(e="SessionExpired",r=2001,n="Session expired",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,wF.prototype)}},Bfe=class EF extends Kt{constructor(e="NotFound",r=3e3,n="Resource not found",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,EF.prototype)}},Lfe=class CF extends Kt{constructor(e="InvalidAppKey",r=4e3,n="Invalid app key",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,CF.prototype)}},jfe=class kF extends Kt{constructor(e="QueryFailed",r=4001,n="DB query failed",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,kF.prototype)}},Ffe=class SF extends Kt{constructor(e="InvalidProjectId",r=4002,n="Invalid project id",s=0,i){super(e,r,n,s,i),Object.setPrototypeOf(this,SF.prototype)}},Ufe={0:kfe,[-1]:Jl,[-2]:Sfe,[-3]:Afe,[-4]:Tfe,[-5]:dF,[-6]:Ife,[-7]:Pfe,[-8]:Ofe,[-9]:Rfe,[-10]:Nfe,1e3:_fe,2e3:Mfe,2001:Dfe,3e3:Bfe,4e3:Lfe,4001:jfe,4002:Ffe},$fe=class extends Cfe{constructor(e,r){const n=globalThis.fetch.bind(globalThis);super(e.endsWith("/")?e.slice(0,-1):e,n);_(this,"_globalFetch");_(this,"_fetch",(e,r)=>{var n;if(this.auth){let s={};((n=this.auth.jwt)==null?void 0:n.length)>0&&(s.Authorization=`BEARER ${this.auth.jwt}`),this.auth.headers&&(s={...s,...this.auth.headers}),r.headers={...r.headers,...s}}return this._globalFetch(e,r)});this.auth=r,this._globalFetch=n,this.fetch=this._fetch}},_8=150,Xa={defaultEnabled:!0,noop:!1,privacy:{userIdHash:!0,userAgentSalt:!1},userIdentTracking:!1,strictMode:!1,flushInterval:500,initProps:()=>({})},Wfe=class{constructor(t,e,r){_(this,"rpc");_(this,"auth");_(this,"options");_(this,"enabled");_(this,"ident");_(this,"userId");_(this,"sessionId");_(this,"allowUserTracking");_(this,"projectId");_(this,"queue");_(this,"flushTimeout");_(this,"defaultProps");_(this,"dedupeIdentKey");_(this,"dedupeViewKey");_(this,"ts");_(this,"flush",async()=>{if(this.flushTimeout!==null&&(clearTimeout(this.flushTimeout),this.flushTimeout=null),!this.enabled||this.options.noop||this.options.strictMode&&!this.allowUserTracking||this.queue.length===0)return;const t=this.dedupedQueue();this.queue=[];try{await this.rpc.tick({events:t})}catch(e){console.warn(`databeat flush failed: ${e}`)}});_(this,"dedupedQueue",()=>{const t=new Map;for(let e=0;e_8&&(this.queue=this.queue.splice(this.queue.length-_8)),this.enabled&&(e&&e.flush?await this.flush():this.flushTimeout===null&&(this.flushTimeout=setTimeout(()=>{this.flush()},this.options.flushInterval)))}trackView(t={}){const e={...this.defaultProps,...t},r=D8(),n=`${r}:${JSON.stringify(e)}:${this.userId}:${this.sessionId}`;this.dedupeViewKey!==n&&(this.dedupeViewKey=n,this.track({event:"VIEW",source:r,props:e}))}isEnabled(){return this.enabled}isAnon(){return this.ident===0}getIdent(){return this.ident}getUserId(){return this.userId}getSessionId(){return this.sessionId}getStorageTS(){if(this.ts)return this.ts;const t=J2();if(!(t==null||t.id===null))return this.ts=t.ts,this.ts}enable(){if(!AF(this.auth)){this.enabled=!1;return}Ji()&&(this.enabled=!0,this.ts=Wl({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}),this.identify())}disable(){Ji()&&(this.enabled=!1,this.ts=Wl({on:this.enabled,id:this.userId,it:this.ident,ut:this.allowUserTracking}))}},Ji=()=>typeof window=="object"&&typeof window.localStorage=="object"&&typeof window.localStorage.getItem=="function"&&typeof window.localStorage.setItem=="function",M8=(t,e)=>{if(!AF(e))return!1;if(!Ji())return!0;const r=J2();return r===null?t??!0:r.on},AF=t=>{var e;return!!(((e=t==null?void 0:t.jwt)==null?void 0:e.length)>0||t!=null&&t.headers&&Object.keys(t.headers).length>0)},D8=()=>{try{return window.location.pathname}catch{return""}},Vfe=()=>{if(!Ji())return{};const t=new URL(window.location.href).searchParams,e={};return e.origin=window.location.origin,t.get("ref")&&t.get("ref")!==""&&(e.ref=t.get("ref")||""),t.get("source")&&t.get("source")!==""&&(e.source=t.get("source")||""),t.get("utm_source")&&t.get("utm_source")!==""&&(e.utmSource=t.get("utm_source")||""),t.get("utm_campaign")&&t.get("utm_campaign")!==""&&(e.utmCampaign=t.get("utm_campaign")||""),t.get("utm_medium")&&t.get("utm_medium")!==""&&(e.utmMedium=t.get("utm_medium")||""),t.get("utm_content")&&t.get("utm_content")!==""&&(e.utmContent=t.get("utm_content")||""),t.get("utm_term")&&t.get("utm_term")!==""&&(e.utmTerm=t.get("utm_term")||""),document.referrer&&document.referrer!==""&&(e.referrer=document.referrer),t.get("gclid")&&t.get("gclid")!==""&&(e.gclid=t.get("gclid")||""),t.get("wbraid")&&t.get("wbraid")!==""&&(e.wbraid=t.get("wbraid")||""),e},Ng="_dbeat",J2=()=>{try{return JSON.parse(window.localStorage.getItem(Ng))}catch{return null}},Wl=t=>{try{return t.ts||(t.ts=Math.floor(Date.now()/1e3)),window.localStorage.setItem(Ng,JSON.stringify(t)),t.ts}catch{return}},zfe=(t,e,r)=>{if(!t||t===null||t==="")return{userId:`${Math.floor(Math.random()*1e14)}`,ident:0};if(r.userIdentTracking&&e)return{userId:t,ident:2};if(r.privacy.userIdHash===!0||!r.userIdentTracking||!e)return Ji()&&r.privacy.userAgentSalt===!0&&(t=t+":"+navigator.userAgent),r.privacy.extraSalt&&r.privacy.extraSalt.length>0&&(t=t+":"+r.privacy.extraSalt),{userId:dfe(Efe(t)).substring(0,50),ident:1};throw new Error("invalid configuration")},Hfe=()=>{if(Ji()&&typeof window.sessionStorage=="object"&&typeof window.sessionStorage.getItem=="function"&&typeof window.sessionStorage.setItem=="function"){const e=window.sessionStorage.getItem(Ng);if(e&&e.length>0)return e;{const r=B8(16);return window.sessionStorage.setItem(Ng,r),r}}else return B8(16)},B8=t=>{let e="";for(let r=0;r[Dr(t).slice(0,10),t]));function Y2(t,e){const r=de.transaction.fromTransactionish(t,e);de.transaction.unwind(t,r).forEach(s=>qfe(t,s))}function qfe(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=Q(e.data);if(r.length>=4&&!Kfe(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden");if(e.data){const n=z(e.data).slice(0,10),s=Gfe.get(n);if(s){const i=s.slice(0,s.indexOf("("));throw new Error(`${i} calls are forbidden`)}}}function Kfe(t){const e=new ut(Ht.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}function er(){return er=Object.assign?Object.assign.bind():function(t){for(var e=1;e++Qfe;class _1{constructor(e){var r=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.state=void 0,this.confirmationOnly=!1,this.events=new vm.EventEmitter2,this.openPayload=void 0,this.connectPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this._sessionId=void 0,this._init=void 0,this._registered=void 0,this.projectAccessKey=void 0,this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&n.type!=="init"&&i(new Error("message idx not set"));const o=(c,l)=>{if(c)i(c);else if(l)s(l);else throw new Error("no valid response to return")},a=n.idx;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.isOpened()?r.sendMessage(n):(Te.debug("pushing to pending requests",n),r.pendingMessageRequests.push(n))})},this.waitUntilOpened=async function(n=W5){let s=!1;return Promise.race([new Promise((i,o)=>{const a=setTimeout(()=>{clearTimeout(a),s||(r.state=Jn.CLOSED,r.events.emit("close",{code:1005,message:"opening wallet timed out"})),o(new Error("opening wallet timed out"))},n)}),new Promise(i=>{if(r.isOpened()){var o;s=!0,i((o=r.openPayload)==null?void 0:o.session);return}r.events.once("open",a=>{r.openPayload=a,s=!0,i(a.session)})})])},this.waitUntilConnected=async function(){await r.waitUntilOpened();const n=new Promise(i=>{if(r.connectPayload){i(r.connectPayload);return}r.events.once("connect",o=>{r.connectPayload=o,i(o)})}),s=new Promise((i,o)=>{r.events.once("close",a=>{o(a?new Error(`wallet closed due to ${JSON.stringify(a)}`):new Error("user closed the wallet"))})});return Promise.race([n,s])},this.state=Jn.CLOSED,this._registered=!1,this._init=pt.NIL,this.projectAccessKey=e}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Jn.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}async request(e){return this.state===Jn.CLOSED&&(this.confirmationOnly=!0),this.openWallet(void 0,{type:"jsonRpcRequest",method:e.method},e.chainId),this.isOpened()||await this.waitUntilOpened(),(await this.sendMessageRequest({idx:OF(),type:$e.MESSAGE,data:e,chainId:e.chainId,clientVersion:Wr,projectAccessKey:this.projectAccessKey})).data}handleMessage(e){var r=this;if(e.type===$e.INIT){Te.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){Te.error("invalid init nonce");return}this._init=pt.OK,this.sendMessage({idx:-1,type:$e.INIT,data:{sessionId:this._sessionId,nonce:c},clientVersion:Wr})}if(this._init!==pt.OK)return;Te.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===$e.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){Te.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw Te.error(c),this.close(),c}this.state=Jn.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(l){r.sendMessage(l)});return}if(e.type===$e.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===$e.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ae(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===$e.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===$e.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===$e.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===$e.CLOSE&&this.state!==Jn.CLOSED&&this.close(e.data),e.type===$e.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===$e.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Jn.CLOSED&&(this.state=Jn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,Te.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(er({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function Jfe(t){return Yfe.some(e=>e.predicate(t))}const Yfe=[{name:"Decentraland Exception",predicate:Zfe},{name:"0x v3 Exception",predicate:ede}],Xfe=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function Zfe(t){try{const e=Ds(t);return Xfe.test(e)}catch{return!1}}function ede(t){const e=new ut(tde);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const tde=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],vy=mt(`Ethereum Signed Message: -`),V5=t=>mi(t)?Q(t):mt(t),mm=t=>{const e=V5(t);return Jfe(e)?e:Q(Fe([vy,mt(String(e.length)),e]))},rde=t=>{if(JSON.stringify(t.slice(0,vy.length))!==JSON.stringify(vy))return t;const e=t.slice(vy.length),r=String(e.length).length;let n,s;try{s=Number(Ds(e.slice(0,r)))}catch{s=Number(z(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},cd=async(t,e,r,n)=>new de.reader.OnChainReader(n).isValidSignature(t,e,r),RF=async(t,e,r,n)=>{const s=mm(e),i=u5(s);return cd(t,i,r,n)},NF=(t,e,r,n)=>cd(t,Ad(e),r,n),_g=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",_F=()=>!!navigator.userAgent.match(/UnitySequence/i),MF=t=>t.onChain.deployed&&t.fullyMigrated;class DF{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class B0{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!B0.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function Mg(){return B0.isAvailable()?new B0:new DF}async function BF(t){return Array.isArray(t)?Promise.all(t.map(e=>It(e))):It(t)}const L8="@sequence.transportSession";class M1{constructor(e){var r=this;this.walletRequestHandler=void 0,this._sessionId=void 0,this._registered=void 0,this._init=void 0,this._initNonce=void 0,this._initCallback=void 0,this.appOrigin=void 0,this.handleMessage=async function(n){const s=n;if(r._init!==pt.OK){if(s.type===$e.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case $e.OPEN:{if(r._init!==pt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case $e.CLOSE:return r._init!==pt.OK,void 0;case $e.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:Te.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=PM(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=f5(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!_g()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=RM(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=OM(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){Te.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{Mg().setItem(L8,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Mg().getItem(L8);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=pt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,s)=>{this.registered&&this.notifyDisconnect(n,s)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(yr(n.find(s=>s.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,s)=>{this.notifyChainChanged(n,s)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}request(e){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:s,error:i}=e;this.sendMessage({idx:-1,type:$e.OPEN,data:{chainId:r,sessionId:n,session:s,error:i},clientVersion:Wr})}notifyClose(e){this.sendMessage({idx:-1,type:$e.CLOSE,data:e?{error:e}:null,clientVersion:Wr})}notifyConnect(e){this.sendMessage({idx:-1,type:$e.CONNECT,data:e,clientVersion:Wr})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:$e.DISCONNECT,data:e?{error:e}:null,origin:r,clientVersion:Wr})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:$e.ACCOUNTS_CHANGED,data:e,origin:r,clientVersion:Wr})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:$e.CHAIN_CHANGED,data:e,origin:r,clientVersion:Wr})}notifyNetworks(e){this.sendMessage({idx:-1,type:$e.NETWORKS,data:e,clientVersion:Wr})}notifyWalletContext(e){this.sendMessage({idx:-1,type:$e.WALLET_CONTEXT,data:e,clientVersion:Wr})}isValidInitAck(e){if(this._init===pt.OK)return Te.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==$e.INIT)return Te.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(Te.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(Te.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===pt.OK){e();return}if(this._init!==pt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{Te.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},W5/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=pt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:$e.INIT,data:{nonce:this._initNonce},clientVersion:Wr}),this._init=pt.SENT_NONCE})}}class nde{constructor(){this.app=void 0,this.wallet=void 0;const e=new X2,r=new X2;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class X2{constructor(){this.conn=void 0,this.events=new vm.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class LF extends _1{constructor(e){if(super(),this.port=void 0,this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,s)=>{if(this.state===Jn.CLOSED){this.state=Jn.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:$e.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i},clientVersion:Wr})}},this.state=Jn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=pt.OK}closeWallet(){this.sendMessage({idx:-1,type:$e.CLOSE,data:null,clientVersion:Wr}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class sde extends M1{constructor(e,r){super(e),this.port=void 0,this.port=r,this._init=pt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function jF(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...s)=>{n.logfromjs(`${t}: ${eb(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${eb(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${eb(s)}`)},window.logsOverriddenForUnreal=!0}}function eb(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let Vl;class FF extends _1{constructor(e){super(),this.walletURL=void 0,this.register=()=>{var r;jF("dapp"),Vl&&(Vl.unregister(),Vl=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),Vl=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r;this._registered=!1,this.closeWallet(),Vl===this&&(Vl=void 0),((r=window.ue)==null||(r=r.sequencewallettransport)==null?void 0:r.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new N1;r&&(i.pathname=r.toLowerCase()),this._init=pt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",c5(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r;const n=typeof e!="string"?JSON.stringify(e,Ts):e;console.log("Sending message to wallet:",n),(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetowallet(n)}}class ide extends M1{constructor(e){super(e),this.onMessageFromUnreal=r=>{Te.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new N1(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:l5(n.get("intent"))}},this._init=pt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;jF("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){Te.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;Te.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;Te.error(c),this.notifyClose({message:c}),window.close()})}unregister(){var e;((e=window.ue)==null||(e=e.sequencewallettransport)==null?void 0:e.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r;if(e.type!==$e.INIT&&this._init!==pt.OK){Te.error("impossible state, should not be calling postMessage until inited");return}const n=JSON.stringify(e,Ts);(r=window.ue)==null||(r=r.sequencewallettransport)==null||r.sendmessagetosequencejs(n)}}const z5="sequence-extension-message-handler";class ode extends M1{constructor(e,r){super(e),this.runtime=r,this.port=void 0,this._init=pt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:z5})}sendMessage(e){Te.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class UF extends _1{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===z5&&(this._init=pt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class ade extends vm.EventEmitter2{constructor(e){var r;super(),r=this,this.stream=e,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;Te.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case $e.MESSAGE:if(i)this.emit($e.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case $e.DISCONNECT:case $e.ACCOUNTS_CHANGED:case $e.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(c,l)=>{if(c)i(c);else if(l)s(l);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let zl;class $F extends _1{constructor(e,r){super(r),this.walletURL=void 0,this.walletWindow=void 0,this.register=()=>{zl&&(zl.unregister(),zl=this),window.addEventListener("message",this.onWindowEvent),zl=this,this.on("open",()=>{const n=this.walletWindow,s=setInterval(()=>{n&&n.closed&&(clearInterval(s),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),zl===this&&(zl=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(n,s,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const o=new URL(this.walletURL.href),a=new N1;n&&n!==""&&(o.pathname=n.toLowerCase()),this._init=pt.NIL,this._sessionId=`${performance.now()}`,a.set("sid",this._sessionId),s&&(s.type==="connect"&&(s.options||(s.options={app:window.location.origin}),!_g()&&!_F()&&s.options&&(s.options.origin=window.location.origin)),a.set("intent",c5(s))),i&&a.set("net",`${i}`);let c,l;_g()?(c=[450,750],l=[Math.abs(window.screen.width/2-c[0]/2),Math.abs(window.screen.height/2-c[1]/2)]):(c=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-c[0]/2),Math.abs(window.screenY+window.innerHeight/2-c[1]/2)]);const u=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${c[0]},height=${c[1]},left=${l[0]},top=${l[1]}`;o.search=a.toString(),this.walletWindow=window.open(o.href,"sequence.app",u)},this.onWindowEvent=n=>{if(n.origin!==this.walletURL.origin)return;let s;try{s=JSON.parse(n.data,Jv)}catch{return}if(!s)throw new Error("ProviderMessage object is empty");this.handleMessage(s)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){Te.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e,Ts):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class cde extends M1{constructor(e){var r;super(e),r=this,this.parentWindow=void 0,this._isPopup=!1,this.onWindowEvent=async function(n){var s,i;if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let o;try{o=JSON.parse(n.data,Jv)}catch{return}if((i=(s=o).origin)!=null||(s.origin=n.origin),Te.debug("RECEIVED MESSAGE",o),r._init!==pt.OK&&r.isValidInitAck(o)&&(r.appOrigin=n.origin),r._init===pt.OK&&(!r.appOrigin||r.appOrigin.length<8)){Te.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(o)},this.getWindowTransportSession=n=>{const s=new N1(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:l5(s.get("intent"))}},this._init=pt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{search:n}=new URL(e||window.location.href);let s=this.getWindowTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){Te.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;Te.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;Te.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e,Ts);e.type===$e.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==pt.OK){Te.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):Te.error("unable to postMessage as parentOrigin is invalid")}}function WF(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class xm{constructor(e=[]){var r=this;this.messageProviders=void 0,this.provider=void 0,this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e,r){var n,s,i,o;const a=new xm;if((n=e.windowTransport)!=null&&n.enabled&&typeof window=="object"&&e.walletAppURL){const c=new $F(e.walletAppURL,r);a.add(c)}if((s=e.proxyTransport)!=null&&s.enabled){const c=new LF(e.proxyTransport.appPort);a.add(c)}if((i=e.extensionTransport)!=null&&i.enabled){const c=new UF(e.extensionTransport.runtime);a.add(c)}if((o=e.unrealTransport)!=null&&o.enabled&&e.windowTransport&&e.walletAppURL){const c=new FF(e.walletAppURL);a.add(c)}return a.register(),a}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;n({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:s}=r;if(n){const a=this._connectOptions;let c;if(this.prompter!==null){var i;c=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.account&&this.notifyDisconnect(),this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=fde){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:M.MAINNET,i=f5(s).chainId,o={connected:!0,chainId:yr(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await Rj(this.account,i,a)}catch(c){return Te.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(i),o}async sendMessageRequest(e){var r;const s=Number(((r=e.clientVersion)==null?void 0:r.split(".")[0])||"0")<2,i={id:e.data.id,jsonrpc:"2.0",result:null,error:void 0};try{const o=await this.request({method:e.data.method,params:e.data.params,chainId:e.chainId,origin:e.origin,projectAccessKey:e.projectAccessKey});return er({},e,{data:s?er({},i,{result:o}):o})}catch(o){return er({},e,{data:s?er({},i,{error:o}):{error:o}})}}async request(e){await this.getAccount();try{var r,n;if((!this.account||this.account===null)&&!hde.includes(e.method))throw PF;const l=this.account;if(!l)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(r=this.account)==null?void 0:r.providerFor((n=e.chainId)!=null?n:this.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${e.chainId}`);const f=pde(u)?u:void 0;switch(e.method){case"net_version":{if(!f)throw new Error("Account provider doesn't support send method");return await f.send("net_version",[])}case"eth_chainId":{if(!f)throw new Error("Account provider doesn't support send method");return await f.send("eth_chainId",[])}case"eth_accounts":return[l.address];case"eth_getBalance":{const[d,h]=e.params,y=await u.getBalance(d,h);return Zc(y)}case"sequence_sign":case"personal_sign":case"eth_sign":{let d;switch(e.method){case"sequence_sign":case"personal_sign":{const[b,g]=e.params;d=b;break}case"eth_sign":{const[b,g]=e.params;d=g;break}}let h="";const y=mm(d),p=e.method==="sequence_sign";if(this.prompter===null){var s;h=await l.signMessage(y,(s=e.chainId)!=null?s:this.defaultChainId(),p?"eip6492":"ignore")}else h=await this.prompter.promptSignMessage({chainId:e.chainId,message:Q(y),eip6492:p},e.origin,e.projectAccessKey);if(h&&h.length>0)return h;throw new Error("declined by user")}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[d,h]=e.params;let y;if(typeof h=="string")try{y=JSON.parse(h)}catch(g){console.warn("walletRequestHandler: error parsing typedData",g)}else y=h;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let p="";const b=e.method==="sequence_signTypedData_v4";if(this.prompter===null){var i;p=await l.signTypedData(y.domain,y.types,y.message,(i=e.chainId)!=null?i:this.defaultChainId(),b?"eip6492":"ignore")}else p=await this.prompter.promptSignMessage({chainId:e.chainId,typedData:y,eip6492:b},e.origin,e.projectAccessKey);if(p&&p.length>0)return p;throw new Error("declined by user")}case"eth_sendTransaction":{const d=ude(e.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));Y2(l.address,d);let h="";if(this.prompter===null){var o,a;const y=await l.sendTransaction(d,(o=e.chainId)!=null?o:this.defaultChainId());h=(a=y==null?void 0:y.hash)!=null?a:""}else h=await this.prompter.promptSendTransaction(d,e.chainId,e.origin,e.projectAccessKey);if(h)return h;throw new Error("declined by user")}case"eth_signTransaction":{const[d]=e.params;if(Ae(d.from)!==l.address)throw new Error("sender address does not match wallet");if(Y2(l.address,d),this.prompter===null){var c;return await l.signTransactions(d,(c=e.chainId)!=null?c:this.defaultChainId())}else return await this.prompter.promptSignTransaction(d,e.chainId,e.origin,e.projectAccessKey)}case"eth_sendRawTransaction":if(de.transaction.isSignedTransactionBundle(e.params[0])){const d=Number(e.params[0].chainId);return(await l.relayer(d).relay(e.params[0])).hash}else return(await u.broadcastTransaction(e.params[0])).hash;case"eth_getTransactionCount":{const d=Ae(e.params[0]),h=e.params[1],y=await u.getTransactionCount(d,h);return Zc(BigInt(y))}case"eth_blockNumber":return await u.getBlockNumber();case"eth_getBlockByNumber":return await u.getBlock(e.params[0]);case"eth_getBlockByHash":return await u.getBlock(e.params[0]);case"eth_getTransactionByHash":return await u.getTransaction(e.params[0]);case"eth_call":{const[d,h]=e.params;return await u.call(er({},d,{blockTag:h}))}case"eth_getCode":{const[d,h]=e.params;return await u.getCode(d,h)}case"eth_estimateGas":{const[d]=e.params;return await u.estimateGas(d)}case"eth_gasPrice":{const d=await u.getFeeData();return d.gasPrice===null?null:Zc(d.gasPrice)}case"wallet_switchEthereumChain":{const[d]=e.params;if(!d.chainId||d.chainId.length===0)throw new Error("invalid chainId");const h=BigInt(d.chainId);return this.setDefaultChainId(Number(h)),null}case"sequence_getWalletContext":return l.contexts;case"sequence_getWalletConfig":{const[d]=e.params;return d?[(await l.status(d)).onChain.config]:await Promise.all(l.networks.map(async function(h){return(await l.status(h.chainId)).onChain.config}))}case"sequence_getWalletState":{const[d]=e.params;return d?[j8(d,await l.status(d))]:await Promise.all(l.networks.map(async function(h){const y=await l.status(h.chainId);return j8(h.chainId,y)}))}case"sequence_getNetworks":return await this.getNetworks(!0);case"sequence_isSequence":return!0;case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[d]=e.params;if(!d)throw new Error("invalid request, method argument defaultChainId cannot be empty");return this.setDefaultChainId(d),await this.getNetworks(!0)}default:{if(!f)throw new Error("Account provider doesn't support send method");return await f.send(e.method,e.params)}}}catch(l){throw Te.error(l),{message:typeof l=="string"?l:(l==null?void 0:l.message)||"unkown error",code:4001}}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=er({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(Te.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(s=>er({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Ns(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",yr(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",yr(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){Te.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rl.canOnchainValidate||l.original.version===2&&n,a=await r.status(s);if(o(a))return!0;if(await e.promptConfirmWalletDeploy(s,i)){const l=await r.status(s);return o(l)?!0:(Te.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function j8(t,e){return{context:e.original.context,config:e.onChain.config,address:de.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const hde=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];function pde(t){return t&&typeof t=="object"&&typeof t.send=="function"&&typeof t.getNetwork=="function"}function yde(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.includes(n))continue;r[n]=t[n]}return r}class Id{get utils(){return this.provider.utils}constructor(e,r){this.client=e,this.provider=r,this.singleNetworkSigners={},this._isSequenceSigner=!0}async getAddress(){return this.client.getAddress()}connect(e){if(!Pd.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Id(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new H5(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await BF(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await new Promise(c=>{(async function u(){const f=await o.getTransaction(i);if(f!==null)return c(f);await o.once("block",u)})()})}catch(a){throw a.transactionHash=i,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r){return this.getProvider(r==null?void 0:r.chainId).call(e)}getChainId(){return Promise.resolve(this.client.getChainId())}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}getNonce(e){throw new Error("SequenceSigner does not support getNonce")}populateCall(e){throw new Error("SequenceSigner does not support populateCall")}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class H5 extends Id{constructor(e,r,n){super(e,r.getProvider(n)),this.chainId=n,this._isSingleNetworkSequenceSigner=!0}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class gde{constructor(e){if(this.signer=e,H5.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return cd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=mm(r),a=u5(o);return cd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,Ad(r),n,s)}}const vde=["method"],F8=["connect","disconnect","chainChanged","accountsChanged"];class Pd extends td{constructor(e,r,n=od,s){super(e.getChainId(),s),this.client=e,this.providerFor=r,this.networks=n,this.options=s,this.singleNetworkProviders={},this._isSequenceProvider=!0,this.utils=void 0,this.signer=void 0,this.eip1193EventListeners=new Map,e.onConnect(i=>{var o;(o=this.eip1193EventListeners.get("connect"))==null||o.forEach(a=>a(i))}),e.onDisconnect(i=>{var o;(o=this.eip1193EventListeners.get("disconnect"))==null||o.forEach(a=>a(i))}),e.onDefaultChainIdChanged(i=>{var o;(o=this.eip1193EventListeners.get("chainChanged"))==null||o.forEach(a=>a(i))}),e.onAccountsChanged(i=>{var o;(o=this.eip1193EventListeners.get("accountsChanged"))==null||o.forEach(a=>a(i))}),this.signer=new Id(this.client,this),this.utils=new gde(this.signer)}async on(e,r){if(F8.includes(e)){const n=this.eip1193EventListeners.get(e)||new Set;return n.add(r),this.eip1193EventListeners.set(e,n),this}return super.on(e,r)}async off(e,r){if(F8.includes(e)){const n=this.eip1193EventListeners.get(e);return n&&(r?n.delete(r):n.clear()),this}return super.off(e,r)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(er({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Ns(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new zF(this.client,this.providerFor,r,this.options)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async _perform(e){var r;const{method:n}=e,s=yde(e,vde),i=await this._getSubprovider(),o=(r=i.getRpcRequest(e))!=null?r:{method:n,args:Object.values(s)};if(!o)throw new Error(`Unsupported method ${e.method}`);return i.send(o.method,o.args)}async perform(e,r){if(e==="eth_chainId")return yr(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const n=r[0],s=VF(n);return this.setDefaultChainId(s)}return e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4"?this.client.request({method:e,params:r,chainId:this.getChainId()}):this._perform(er({method:e},r))}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async _detectNetwork(){const e=this.client.getChainId(),r=Ns(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return new lt(r.name,r.chainId)}async detectNetwork(){return this._detectNetwork()}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getFeeData(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getFeeData()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorage(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.chainId)).getStorage(e,r,n)}async call(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).call(e)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBlock(e,r)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return ag(e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}Pd.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function VF(t){return typeof t=="object"?VF(t.chainId):Number(t)}class zF extends Pd{constructor(e,r,n,s){super(e,r,void 0,s),this.chainId=n,this._isSingleNetworkSequenceProvider=!0}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=Ns(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return new lt(r.name,r.chainId)}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}let mde=function(t){return t[t.INIT=0]="INIT",t[t.VIEW=1]="VIEW",t[t.SIGN_MESSAGE_REQUEST=2]="SIGN_MESSAGE_REQUEST",t[t.SIGN_TYPED_DATA_REQUEST=3]="SIGN_TYPED_DATA_REQUEST",t[t.SEND_TRANSACTION_REQUEST=4]="SEND_TRANSACTION_REQUEST",t}({});class HF extends Wfe{}const GF=(t,e)=>{e||(e="https://nodes.sequence.app");const r=!t,n={};return t&&(n.headers={"X-Access-Key":t}),new HF(e,n,{noop:r,defaultEnabled:!0,privacy:{userIdHash:!0,userAgentSalt:!1},initProps:()=>Ji()?{origin:window.location.origin}:{}})};class nl{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(nl.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(nl.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(nl.SESSION_LOCALSTORE_KEY)}}nl.SESSION_LOCALSTORE_KEY="@sequence.session";class sl{constructor(e,r=1){this.store=e,this.startingChainId=r,this.callbacks=[],e.onItemChange(sl.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(sl.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(sl.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}sl.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class G5{constructor(e,r,n){var s,i;if(this.session=void 0,this.defaultChainId=void 0,this.callbacks={},this.transport=void 0,this.defaultEIP6492=void 0,this.projectAccessKey=void 0,this.analytics=void 0,WF(e))this.transport=xm.new(e,n==null?void 0:n.projectAccessKey);else if(TF(e))this.transport=e;else throw new Error("Invalid transport");const o=n==null?void 0:n.defaultChainId;if(this.defaultEIP6492=(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new nl(r),this.defaultChainId=new sl(r,o),this.transport.on("accountsChanged",l=>{var u;l.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(u=this.callbacks.accountsChanged)==null||u.forEach(f=>f(l))}),this.transport.on("connect",l=>{var u;const f=yr(this.getChainId());(u=this.callbacks.connect)==null||u.forEach(d=>d(er({},l,{chainId:f})))}),this.transport.on("disconnect",(l,u)=>{var f;(f=this.callbacks.disconnect)==null||f.forEach(d=>d(l,u))}),this.transport.on("networks",l=>{var u;(u=this.callbacks.networks)==null||u.forEach(f=>f(l))}),this.transport.on("walletContext",l=>{var u;(u=this.callbacks.walletContext)==null||u.forEach(f=>f(l))}),this.transport.on("open",l=>{var u;(u=this.callbacks.open)==null||u.forEach(f=>f(l))}),this.transport.on("close",()=>{var l;(l=this.callbacks.close)==null||l.forEach(u=>u())}),this.transport.on("chainChanged",(l,u)=>{var f;(f=this.callbacks.chainChanged)==null||f.forEach(d=>d(l,u))}),this.defaultChainId.onDefaultChainIdChanged(l=>{var u;const f=yr(l);(u=this.callbacks.chainChanged)==null||u.forEach(d=>d(f))}),n!=null&&n.projectAccessKey&&(this.projectAccessKey=n.projectAccessKey),this.projectAccessKey&&n!=null&&n.analytics&&(this.analytics=GF(this.projectAccessKey)),(i=this.session.getSession())!=null&&i.accountAddress){var a,c;(a=this.analytics)==null||a.identify((c=this.session.getSession())==null||(c=c.accountAddress)==null?void 0:c.toLowerCase())}}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:er({},e,{networkId:this.getChainId(),clientVersion:Wr})});const r=await this.transport.waitUntilConnected().catch(i=>i instanceof Error?{connected:!1,error:i.message}:{connected:!1,error:JSON.stringify(i)});if(r.chainId&&(r.chainId=BigInt(r.chainId).toString()),r.connected){var n;if(!r.session)throw new Error("impossible state, connect response is missing session");if(this.session.setSession(r.session),(n=r.session)!=null&&n.accountAddress){var s;(s=this.analytics)==null||s.identify(r.session.accountAddress.toLowerCase())}}return r}disconnect(){var e;return this.isOpened()&&this.closeWallet(),(e=this.analytics)==null||e.reset(),this.session.clearSession()}async request(e){e.method=this.mapSignMethod(e.method);const r=await this.transport.request(e);return xde(r)}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.request({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){var n;const s=this.signMethod(r);return(n=this.analytics)==null||n.track({event:"SIGN_MESSAGE_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),e=z(V5(e)),this.request({method:s,params:[e,this.getAddress()],chainId:r==null?void 0:r.chainId})}async signTypedData(e,r){var n;const s=this.signTypedDataMethod(r),i=Bs.getPayload(e.domain,e.types,e.message);return(n=this.analytics)==null||n.track({event:"SIGN_TYPED_DATA_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.request({method:s,params:[this.getAddress(),i],chainId:(r==null?void 0:r.chainId)||e.domain.chainId&&Number(e.domain.chainId)||this.getChainId()})}async sendTransaction(e,r){var n;const s=Array.isArray(e)?e:[e],i=lde(s);return(n=this.analytics)==null||n.track({event:"SEND_TRANSACTION_REQUEST",props:{chainId:`${(r==null?void 0:r.chainId)||this.getChainId()}`}}),this.request({method:"eth_sendTransaction",params:[i],chainId:r==null?void 0:r.chainId})}async getWalletContext(){return this.request({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.request({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()],chainId:e==null?void 0:e.chainId});return Array.isArray(r)?r[0]:r}}const xde=t=>t&&typeof t=="object"&&"jsonrpc"in t&&"result"in t?t.result:t,Z2={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1,analytics:!0};let li;const qF=(t,e)=>{var r,n,s;if(!t||typeof t!="string")throw new Error("Please pass a projectAccessKey in initWallet.");if(li)return li;const i=er({},Z2,e,{transports:er({},Z2.transports,e==null?void 0:e.transports)}),o={},a=(r=(n=i.networks)==null?void 0:n.filter(h=>{h.rpcUrl!==void 0&&h.chainId!==void 0&&od.find(y=>y.chainId===h.chainId)}))!=null?r:[],c=od.map(h=>{var y;const p=(y=i.networks)==null?void 0:y.find(b=>b.chainId===h.chainId);return p?er({},h,p):h}).concat(a).map(h=>(h.rpcUrl.includes(t)||(h.rpcUrl=h.rpcUrl+`/${t}`),h)),l=h=>{if(!o[h]){var y;const p=(y=c.find(b=>b.chainId===h))==null?void 0:y.rpcUrl;if(!p)throw new Error(`no rpcUrl found for chainId: ${h}`);o[h]=new ZM(p,{middlewares:[JM,QM,new d5]},{cacheTimeout:-1})}return o[h]},u=i.defaultNetwork?(s=Ns(c,i.defaultNetwork))==null?void 0:s.chainId:void 0;if(!u&&i.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${i.defaultNetwork}`);const f=i.localStorage||Mg(),d=new G5(i.transports,f,{defaultChainId:u,defaultEIP6492:i.defaultEIP6492,projectAccessKey:t,analytics:i.analytics});return li=new Pd(d,l),li},KF=()=>{li&&(li.client.closeWallet(),li.client.transport.unregister(),li=void 0)},QF=()=>{if(!li)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return li},bde=Object.freeze(Object.defineProperty({__proto__:null,Analytics:HF,AnalyticsEventType:mde,BaseInjectedTransport:ade,BaseProviderTransport:_1,BaseWalletTransport:M1,CHANNEL_ID:z5,DefaultChainIdTracker:sl,DefaultProviderConfig:Z2,ErrSignedInRequired:PF,EventType:$e,ExtensionMessageHandler:ode,ExtensionMessageProvider:UF,InitState:pt,LocalStorage:B0,MemoryItemStore:DF,MuxMessageProvider:xm,OpenState:Jn,PROVIDER_OPEN_TIMEOUT:W5,ProviderError:IF,ProxyMessageChannel:nde,ProxyMessageChannelPort:X2,ProxyMessageHandler:sde,ProxyMessageProvider:LF,SequenceClient:G5,SequenceClientSession:nl,SequenceProvider:Pd,SequenceSigner:Id,SingleNetworkSequenceProvider:zF,SingleNetworkSequenceSigner:H5,UnrealMessageHandler:ide,UnrealMessageProvider:FF,WalletRequestHandler:dde,WindowMessageHandler:cde,WindowMessageProvider:$F,WindowSessionParams:N1,getWallet:QF,initWallet:qF,isBrowserExtension:_g,isMuxTransportTemplate:WF,isProviderTransport:TF,isUnityPlugin:_F,isValidMessageSignature:RF,isValidSignature:cd,isValidTypedDataSignature:NF,isWalletUpToDate:MF,messageToBytes:V5,nextMessageIdx:OF,prefixEIP191Message:mm,resolveArrayProperties:BF,setupAnalytics:GF,trimEIP191Prefix:rde,unregisterWallet:KF,useBestStore:Mg,validateTransactionRequest:Y2},Symbol.toStringTag,{value:"Module"}));function en(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var wde=en({__proto__:null},[Yoe]),Ede=en({__proto__:null},[aae]),Cde=en({__proto__:null},[zue]),kde=en({__proto__:null},[cfe]),Sde=en({__proto__:null},[Ble]),Ade=en({__proto__:null},[Kle]),Tde=en({__proto__:null},[rce]),Ide=en({__proto__:null},[bde]),Pde=en({__proto__:null},[gle]);const Ode=de.transaction;var Rde=Object.freeze({__proto__:null,transactions:Ode}),Nde=en({__proto__:null,isValidSignature:cd,isValidMessageSignature:RF,isValidTypedDataSignature:NF,isWalletUpToDate:MF},[Vae]),_de=en({__proto__:null},[Gce]),Mde=en({__proto__:null},[vle]),Dde=en({__proto__:null},[$ue]),Bde=en({__proto__:null},[Xce]),Lde=en({__proto__:null},[Ele]),He=Object.freeze({__proto__:null,abi:wde,api:Ede,auth:Cde,guard:kde,indexer:Sde,metadata:Ade,network:Tde,provider:Ide,relayer:Pde,transactions:Rde,utils:Nde,core:_de,signhub:Mde,sessions:Dde,migration:Bde,account:Lde,initWallet:qF,getWallet:QF,unregisterWallet:KF,SequenceProvider:Pd,SequenceClient:G5,SequenceSigner:Id});const U8=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}];var jde="_1e9z9271";const Fde=({message:t,loading:e})=>{const r=()=>t?` -...`:"...";return ie.jsx(sK,{label:"Console",defaultOpen:!0,children:ie.jsxs(Ce,{as:"pre",color:"text80",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&r(),ie.jsx(Ce,{className:jde,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})})};var Ude="_1q07ov40";const Io=t=>{const{label:e,children:r,style:n,className:s}=t;return ie.jsxs(Ce,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:s,style:n,children:[e&&ie.jsx(Ce,{marginBottom:"2",children:ie.jsx($de,{children:e})}),ie.jsx(Ce,{className:Ude,children:Vr.Children.map(r,(i,o)=>ie.jsx(Ce,{children:i},o))})]})},$de=t=>ie.jsx(Tt,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),Wde=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)},$8=t=>"0x"+t.toString(16),Vde="/demo-dapp/assets/logo-EKCqYZBG.svg",W8="/demo-dapp/assets/skyweaver-banner-AT9gQtXT.png",zde="/demo-dapp/assets/skyweaver-banner-large-Dt2dVXke.png",V8="AQAAAAAAAAbvrgpWEC2Aefg5qYStQmwjBpA";IM({logLevel:"DEBUG"});const JF=[{name:"production",walletUrl:"https://sequence.app"},{name:"development",walletUrl:"https://dev.sequence.app"},{name:"local",walletUrl:"http://localhost:3333"}],Hde="https://api.sequence.app",z8=Wde()||M.MAINNET,wc=new URLSearchParams(window.location.search),YF=wc.get("env")??"production",Gde=JF.find(t=>t.name===YF),gu=wc.get("walletAppURL")??Gde.walletUrl,qde=wc.has("showProhibitedActions");gu&&gu.length>0?He.initWallet(V8,{defaultNetwork:z8,transports:{walletAppURL:gu}}):He.initWallet(V8,{defaultNetwork:z8,transports:{walletAppURL:gu}});const Kde=()=>{const[t,e]=x.useState(null),[r,n]=x.useState(null),[s,i]=x.useState(!1),[o,a]=x.useState(!1),c=He.getWallet().getProvider(),[l,u]=x.useState(c.getChainId()),[f,d]=x.useState(!1),[h,y]=x.useState(!1);x.useMemo(()=>{c.on("chainChanged",U=>{u(Number(BigInt(U)))})},[]),x.useEffect(()=>{a(c.isConnected())},[c]),x.useEffect(()=>{he()},[o]),x.useEffect(()=>{c.client.onOpen(()=>{console.log("wallet window opened")}),c.client.onClose(()=>{console.log("wallet window closed")})},[c]);const p={app:"Demo Dapp",askForEmail:!0},b=async(U={app:"Demo dapp"})=>{if(o){ue(),K("Wallet already connected!"),i(!1);return}U={...p,...U,settings:{...p.settings,...U.settings}};try{ue(),K("Connecting");const se=He.getWallet(),ae=await se.connect(U);if(U.authorize&&ae.connected){let Re=wc.get("apiUrl");(!Re||Re.length===0)&&(Re=Hde);const st=new He.api.SequenceAPIClient(Re),{isValid:$t}=await st.isValidETHAuthProof({chainId:ae.chainId,walletAddress:ae.session.accountAddress,ethAuthProofString:ae.proof.proofString});K(`isValid (API)?: ${$t}`)}if(U.authorize){const Re=new wg;if(ae.proof){const st=await Re.decodeProof(ae.proof.proofString,!0),$t=await se.utils.isValidTypedDataSignature(se.getAddress(),ae.proof.typedData,st.signature,Number(BigInt(ae.chainId)));K(`connected using chainId: ${BigInt(ae.chainId).toString()}`),K(`isValid (client)?: ${$t}`)}}i(!1),ae.connected?(K("Wallet connected!"),K(`shared email: ${ae.email}`),a(!0)):K("Failed to connect wallet - "+ae.error)}catch(se){console.error(se),oe()}},g=()=>{He.getWallet().disconnect(),he(),a(!1)},v=()=>{He.getWallet().openWallet()},m=()=>{const U=He.getWallet(),ae={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}};U.openWallet("wallet/add-funds",ae)},k=()=>{He.getWallet().closeWallet()},A=async()=>{ue();const U=He.getWallet();K(`isConnected?: ${U.isConnected()}`),i(!1)},P=async()=>{ue();const U=He.getWallet();K(`isOpened?: ${U.isOpened()}`),i(!1)},R=async()=>{try{ue();const U=c.getChainId();K(`top chainId: ${U}`);const ae=c.getProvider().getChainId();K(`provider.getChainId(): ${ae}`);const st=await c.getSigner().getChainId();K(`signer.getChainId(): ${st}`),i(!1)}catch(U){console.error(U),oe()}},N=async()=>{try{ue();const U=He.getWallet(),se=U.getAddress();K(`getAddress(): ${se}`);const Re=U.getProvider().listAccounts();K(`accounts: ${JSON.stringify(Re)}`),i(!1)}catch(U){console.error(U),oe()}},V=async()=>{try{ue();const U=He.getWallet(),se=U.getProvider(),ae=U.getAddress(),Re=await se.getBalance(ae);K(`balance check 1: ${Re.toString()}`);const $t=await U.getSigner().getBalance();K(`balance check 2: ${$t.toString()}`),i(!1)}catch(U){console.error(U),oe()}},F=async()=>{try{ue();const se=await He.getWallet().getNetworks();K(`networks: ${JSON.stringify(se,null,2)}`),i(!1)}catch(U){console.error(U),oe()}},X=async()=>{try{ue();const U=He.getWallet();K("signing message...");const se=U.getSigner(),ae=`1915 Robert Frost -The Road Not Taken - -Two roads diverged in a yellow wood, -And sorry I could not travel both -And be one traveler, long I stood -And looked down one as far as I could -To where it bent in the undergrowth - -Then took the other, as just as fair, -And having perhaps the better claim, -Because it was grassy and wanted wear -Though as for that the passing there -Had worn them really about the same, - -And both that morning equally lay -In leaves no step had trodden black. -Oh, I kept the first for another day! -Yet knowing how way leads on to way, -I doubted if I should ever come back. - -I shall be telling this with a sigh -Somewhere ages and ages hence: -Two roads diverged in a wood, and Iā€” -I took the one less traveled by, -And that has made all the difference. - -ā˜ ā˜€ ā˜‚`,Re=await se.signMessage(ae);K(`signature: ${Re}`);const st=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${st}`),!st)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},re=async()=>{try{ue();const U=He.getWallet();K("signing message...");const se=U.getSigner(),ae=z(mt("Hello, world!")),Re=await se.signMessage(ae);K(`signature: ${Re}`);const st=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${st}`),!st)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},le=async()=>{try{ue();const U=He.getWallet();K("signing message...");const se=U.getSigner(),ae=mt("Hello, world!"),Re=await se.signMessage(ae);K(`signature: ${Re}`);const st=await U.utils.isValidMessageSignature(U.getAddress(),ae,Re,await se.getChainId());if(K(`isValid?: ${st}`),!st)throw new Error("sig invalid");i(!1)}catch(U){console.error(U),oe()}},ee=async()=>{try{ue();const U=He.getWallet();K("signing typedData...");const se={types:{Person:[{name:"name",type:"string"},{name:"wallet",type:"address"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person"},{name:"cc",type:"Person[]"},{name:"contents",type:"string"},{name:"attachements",type:"string[]"}]},primaryType:"Mail",domain:{name:"Ether Mail",version:"1",chainId:1,verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},message:{from:{name:"Cow",wallet:"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},to:{name:"Bob",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},cc:[{name:"Dev Team",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},{name:"Accounting",wallet:"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"}],contents:"Hello, Bob!",attachements:["cat.png","dog.png"]}},ae=U.getSigner(),Re=await ae.signTypedData(se.domain,se.types,se.message);K(`signature: ${Re}`);const st=await U.utils.isValidTypedDataSignature(U.getAddress(),se,Re,await ae.getChainId());K(`isValid?: ${st}`),i(!1)}catch(U){console.error(U),oe()}},B=async()=>{try{ue();const U=He.getWallet(),se="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",ae=new ut(["function withdraw(uint256 amount)"]),Re={to:se,data:ae.encodeFunctionData("withdraw",["1000000000000000000"])},$t=await U.getProvider().estimateGas(Re);K(`estimated gas needed for wmatic withdrawal : ${$t.toString()}`),i(!1)}catch(U){console.error(U),oe()}},G=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner(),K(`Transfer txn on ${U.getChainId()} chainId`);const ae=await U.getAddress(),Re={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:ae,value:Dw("1.234"),data:"0x"},st={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:ae,value:Dw("0.4242"),data:"0x"},$t=U.provider,Ei=await $t.getBalance(ae);K(`balance of ${ae}, before: ${Ei}`);const bm=await U.sendTransaction([Re,st]);K(`txnResponse: ${JSON.stringify(bm)}`);const wm=await $t.getBalance(ae);K(`balance of ${ae}, after: ${wm}`),i(!1)}catch(se){console.error(se),oe()}},Z=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae=await U.getAddress(),Re=og("1",1),$t={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new ut(U8).encodeFunctionData("transfer",[ae,$8(Re)])},Ei=await U.sendTransaction([$t],{chainId:M.SEPOLIA});K(`txnResponse: ${JSON.stringify(Ei)}`),i(!1)}catch(se){console.error(se),oe()}},E=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae=await U.getAddress(),Re=og("0.05",18),$t={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new ut(U8).encodeFunctionData("transfer",[ae,$8(Re)])},Ei=await U.sendTransaction([$t]);K(`txnResponse: ${JSON.stringify(Ei)}`),i(!1)}catch(se){console.error(se),oe()}},S=async()=>{try{const U=He.getWallet(),se=U.getChainId()===M.ARBITRUM?M.OPTIMISM:M.ARBITRUM;G(U.getSigner(se))}catch(U){console.error(U),oe()}},O=async()=>{try{ue(),K("TODO"),i(!1)}catch(U){console.error(U),oe()}},D=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae=["function balanceOf(address owner) view returns (uint256)","function decimals() view returns (uint8)","function symbol() view returns (string)","function transfer(address to, uint amount) returns (bool)","event Transfer(address indexed from, address indexed to, uint amount)"],Re="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",st=new dn(Re,ae),$t=await st.symbol();K(`Token symbol: ${$t}`);const Ei=await st.balanceOf(await U.getAddress());K(`Token Balance: ${Ei.toString()}`),i(!1)}catch(se){console.error(se),oe()}},L=async()=>{try{ue();const U=He.getWallet(),ae=await U.getSigner().getAddress(),st=(await U.getNetworks()).find(wm=>wm.chainId===M.POLYGON);if(!st)throw new Error("Could not find Polygon network in networks list");const $t=new He.indexer.SequenceIndexer(st.indexerUrl),Ei=await $t.getTokenBalances({accountAddress:ae,includeMetadata:!0});K(`tokens in your account: ${JSON.stringify(Ei)}`);const bm=await $t.getTokenBalances({accountAddress:ae,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});K(`skyweaver collectibles in your account: ${JSON.stringify(bm)}`),i(!1)}catch(U){console.error(U),oe()}},W=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ut(Ht.mainModule.abi).encodeFunctionData("updateImplementation",[xi])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},q=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ut(Ht.mainModuleUpgradable.abi).encodeFunctionData("updateImageHash",[yl])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},te=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),delegateCall:!0},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},J=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ut(["function addHook(bytes4 _signature, address _implementation)"]).encodeFunctionData("addHook",["0x01234567",xi])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},$=async U=>{try{ue();const se=He.getWallet();U=U||se.getSigner();const ae={to:se.getAddress(),data:new ut(["function setExtraImageHash(bytes32 _imageHash, uint256 _expiration)"]).encodeFunctionData("setExtraImageHash",[yl,BN])},Re=await U.sendTransaction(ae);K(`response: ${JSON.stringify(Re)}`),i(!1)}catch(se){console.error(se),oe()}},K=(U,se=!1)=>(console.log(U),e(se?U:ae=>`${ae} - -${U}`)),ue=()=>{i(!0)},he=()=>{i(!1),e(o?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},oe=()=>{i(!1),e("An error occurred")},ke=[M.RINKEBY,M.HARDHAT,M.HARDHAT_2,M.KOVAN,M.ROPSTEN,M.HOMEVERSE_TESTNET,M.BASE_GOERLI],_e=Object.values(He.network.networks).filter(U=>U.type===Ie.MAINNET).sort((U,se)=>U.chainId-se.chainId),xt=Object.values(He.network.networks).filter(U=>U.type===Ie.TESTNET).sort((U,se)=>U.chainId-se.chainId),tn=[..._e,...xt].filter(U=>!U.deprecated&&!ke.includes(U.chainId));x.useEffect(()=>{r&&!f&&(console.log(r),b({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:r,theme:"dark",bannerUrl:`${window.location.origin}${W8}`}}),n(null))},[r,f]);const wr=U=>(U=U.trim(),!!/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/.test(U));return ie.jsxs(Ce,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[ie.jsx(Ce,{marginBottom:"10",children:ie.jsx("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:ie.jsx(XC,{height:"6",alt:"logo",src:Vde})})}),ie.jsx(Ce,{children:ie.jsx(Tt,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),ie.jsx(Ce,{marginTop:"1",marginBottom:"4",children:ie.jsx(Tt,{variant:"normal",color:"text80",children:"A dapp example on how to use the Sequence Wallet. This covers how to connect, sign messages and send transctions."})}),ie.jsxs(yq,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[ie.jsx(Wq,{}),ie.jsx(Tt,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),ie.jsx(gA,{background:"buttonGlass"}),ie.jsx(Ce,{marginBottom:"4",children:ie.jsx(qA,{name:"environment",label:"Environment",labelLocation:"top",onValueChange:U=>{wc.set("env",U),wc.delete("walletAppURL"),window.location.search=wc.toString()},value:YF,options:[...Object.values(JF).map(U=>({label:ie.jsx(Ce,{alignItems:"center",gap:"2",children:ie.jsx(Tt,{capitalize:!0,children:U.name})}),value:String(U.name)}))]})}),ie.jsxs(Ce,{marginBottom:"4",children:[ie.jsx(Tt,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),ie.jsxs(Ce,{as:"a",href:gu,target:"_blank",rel:"noopener",textDecoration:"none",gap:"1",marginTop:"1",alignItems:"center",color:"text80",children:[ie.jsx(Tt,{as:"div",variant:"normal",color:"text80",children:gu}),ie.jsx(jq,{})]})]}),ie.jsx(gA,{background:"buttonGlass"}),ie.jsx(Ce,{marginBottom:"4",children:ie.jsx(qA,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:U=>c.setDefaultChainId(Number(U)),value:String(l),options:[...Object.values(tn).map(U=>({label:ie.jsxs(Ce,{alignItems:"center",gap:"2",children:[ie.jsx(Pee,{src:U.logoURI,size:"sm"}),ie.jsx(Tt,{children:U.title})]}),value:String(U.chainId)}))]})}),ie.jsxs(Io,{label:"Connection",children:[ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>b(),label:"Connect"}),ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>b({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>b({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${zde}`,bannerSize:"medium",includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>{d(!0)},label:"Connect with Email"}),ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>{b({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${W8}`}})},label:"Connect with Google"}),ie.jsx(Ve,{width:"full",shape:"square",onClick:()=>g(),label:"Disconnect"})]}),ie.jsxs(Io,{label:"Basics",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>v(),label:"Open Wallet"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>m(),label:"Open Wallet with Settings"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>k(),label:"Close Wallet"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>A(),label:"Is Connected?"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>P(),label:"Is Opened?"})]}),ie.jsxs(Io,{label:"State",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>R(),label:"ChainID"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>F(),label:"Networks"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>N(),label:"Get Accounts"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>V(),label:"Get Balance"})]}),ie.jsxs(Io,{label:"Signing",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>X(),label:"Sign Message"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>re(),label:"Sign Message (Hex)"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>le(),label:"Sign Message (Bytes)"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>ee(),label:"Sign TypedData"})]}),ie.jsx(Io,{label:"Simulation",children:ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>B(),label:"Estimate Unwrap Gas"})}),ie.jsxs(Io,{label:"Transactions",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>G(),label:"Send funds"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>S(),label:"Send on L2"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>E(),label:"Send DAI"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o||!0,onClick:()=>O(),label:"Send ERC-1155 Tokens"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>Z(),label:"Send USDC on Sepolia"})]}),ie.jsxs(Io,{label:"Various",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>D(),label:"Read Symbol and Balance"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>L(),label:"Fetch Token Balances"})]}),qde&&ie.jsxs(Io,{label:"Prohibited Actions - FOR TESTING ONLY! DO NOT CONFIRM!",children:[ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>W(),label:"Update Implementation"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>q(),label:"Update Image Hash"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>te(),label:"Delegate Call"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>J(),label:"Add Hook"}),ie.jsx(Ve,{width:"full",shape:"square",disabled:!o,onClick:()=>$(),label:"Set Extra Image Hash"})]}),ie.jsx(xP,{children:f&&ie.jsx(AX,{onClose:()=>d(!1),size:"sm",children:ie.jsx(Ce,{flexDirection:"column",justifyContent:"space-between",height:"full",padding:"16",children:ie.jsxs(Ce,{flexDirection:"column",children:[ie.jsx(Ce,{marginTop:"6",children:ie.jsx(Tt,{marginTop:"5",variant:"normal",color:"text80",children:"Auto-email login, please specify the email address"})}),ie.jsx(Ce,{marginTop:"4",children:ie.jsx(sk,{onChange:U=>{n(U.target.value)}})}),h?ie.jsx(Ce,{marginTop:"6",children:ie.jsx(Tt,{marginTop:"5",variant:"normal",color:"warning",children:"please input an email with correct format"})}):null,ie.jsx(Ce,{gap:"2",marginY:"4",children:ie.jsx(Ve,{variant:"primary",label:"Login",onClick:()=>{wr(r)?(y(!1),d(!1)):y(!0)},"data-id":"login"})})]})})})}),ie.jsx(Fde,{message:t,loading:s})]})},Qde=Vr.memo(Kde),Jde=pR(document.getElementById("root"));Jde.render(ie.jsx(Vr.StrictMode,{children:ie.jsx(bX,{children:ie.jsx(Qde,{})})})); diff --git a/index.html b/index.html index 153996a..cbf8bc1 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence | Demo Dapp - +