diff --git a/assets/index-15da4695.js b/assets/index-15da4695.js deleted file mode 100644 index f8f2a52..0000000 --- a/assets/index-15da4695.js +++ /dev/null @@ -1,165 +0,0 @@ -function _4(t,e){for(var r=0;rn[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var TC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function PC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function T4(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(e,i);return new s}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var vd={},P4={get exports(){return vd},set exports(t){vd=t}},Nh={},x={},I4={get exports(){return x},set exports(t){x=t}},Te={};/** - * @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 _c=Symbol.for("react.element"),M4=Symbol.for("react.portal"),N4=Symbol.for("react.fragment"),R4=Symbol.for("react.strict_mode"),O4=Symbol.for("react.profiler"),D4=Symbol.for("react.provider"),B4=Symbol.for("react.context"),L4=Symbol.for("react.forward_ref"),$4=Symbol.for("react.suspense"),F4=Symbol.for("react.memo"),j4=Symbol.for("react.lazy"),aw=Symbol.iterator;function z4(t){return t===null||typeof t!="object"?null:(t=aw&&t[aw]||t["@@iterator"],typeof t=="function"?t:null)}var IC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MC=Object.assign,NC={};function Cl(t,e,r){this.props=t,this.context=e,this.refs=NC,this.updater=r||IC}Cl.prototype.isReactComponent={};Cl.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")};Cl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function RC(){}RC.prototype=Cl.prototype;function Cp(t,e,r){this.props=t,this.context=e,this.refs=NC,this.updater=r||IC}var Ap=Cp.prototype=new RC;Ap.constructor=Cp;MC(Ap,Cl.prototype);Ap.isPureReactComponent=!0;var lw=Array.isArray,OC=Object.prototype.hasOwnProperty,Ep={current:null},DC={key:!0,ref:!0,__self:!0,__source:!0};function BC(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)OC.call(e,n)&&!DC.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1>>1,h=p[b];if(0>>1;b<_;){var $=2*(b+1)-1,C=p[$],D=$+1,B=p[D];if(0>i(C,I))Di(B,C)?(p[b]=B,p[D]=I,b=D):(p[b]=C,p[$]=I,b=$);else if(Di(B,I))p[b]=B,p[D]=I,b=D;else break e}}return k}function i(p,k){var I=p.sortIndex-k.sortIndex;return I!==0?I:p.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],f=[],c=1,u=null,d=3,v=!1,g=!1,m=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(p){for(var k=r(f);k!==null;){if(k.callback===null)n(f);else if(k.startTime<=p)n(f),k.sortIndex=k.expirationTime,e(l,k);else break;k=r(f)}}function P(p){if(m=!1,S(p),!g)if(r(l)!==null)g=!0,T(R);else{var k=r(f);k!==null&&N(P,k.startTime-p)}}function R(p,k){g=!1,m&&(m=!1,A(z),z=-1),v=!0;var I=d;try{for(S(k),u=r(l);u!==null&&(!(u.expirationTime>k)||p&&!K());){var b=u.callback;if(typeof b=="function"){u.callback=null,d=u.priorityLevel;var h=b(u.expirationTime<=k);k=t.unstable_now(),typeof h=="function"?u.callback=h:u===r(l)&&n(l),S(k)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var $=r(f);$!==null&&N(P,$.startTime-k),_=!1}return _}finally{u=null,d=I,v=!1}}var L=!1,F=null,z=-1,H=5,q=-1;function K(){return!(t.unstable_now()-qp||125b?(p.sortIndex=I,e(f,p),r(l)===null&&p===r(f)&&(m?(A(z),z=-1):m=!0,N(P,I-b))):(p.sortIndex=h,e(l,p),g||v||(g=!0,T(R))),p},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(p){var k=d;return function(){var I=d;d=k;try{return p.apply(this,arguments)}finally{d=I}}}})($C);(function(t){t.exports=$C})(e_);/** - * @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 FC=x,un=h0;function re(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"),v0=Object.prototype.hasOwnProperty,t_=/^[: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]*$/,cw={},uw={};function r_(t){return v0.call(uw,t)?!0:v0.call(cw,t)?!1:t_.test(t)?uw[t]=!0:(cw[t]=!0,!1)}function n_(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 i_(t,e,r,n){if(e===null||typeof e>"u"||n_(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 Ur(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var gr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){gr[t]=new Ur(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];gr[e]=new Ur(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){gr[t]=new Ur(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){gr[t]=new Ur(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){gr[t]=new Ur(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){gr[t]=new Ur(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){gr[t]=new Ur(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){gr[t]=new Ur(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){gr[t]=new Ur(t,5,!1,t.toLowerCase(),null,!1,!1)});var kp=/[\-:]([a-z])/g;function _p(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(kp,_p);gr[e]=new Ur(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(kp,_p);gr[e]=new Ur(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(kp,_p);gr[e]=new Ur(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){gr[t]=new Ur(t,1,!1,t.toLowerCase(),null,!1,!1)});gr.xlinkHref=new Ur("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){gr[t]=new Ur(t,1,!1,t.toLowerCase(),null,!0,!0)});function Tp(t,e,r,n){var i=gr.hasOwnProperty(e)?gr[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{J1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?nf(t):""}function s_(t){switch(t.tag){case 5:return nf(t.type);case 16:return nf("Lazy");case 13:return nf("Suspense");case 19:return nf("SuspenseList");case 0:case 2:case 15:return t=Q1(t.type,!1),t;case 11:return t=Q1(t.type.render,!1),t;case 1:return t=Q1(t.type,!0),t;default:return""}}function m0(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 Sa:return"Fragment";case Ea:return"Portal";case y0:return"Profiler";case Pp:return"StrictMode";case p0:return"Suspense";case g0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case UC:return(t.displayName||"Context")+".Consumer";case zC:return(t._context.displayName||"Context")+".Provider";case Ip:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Mp:return e=t.displayName||null,e!==null?e:m0(t.type)||"Memo";case ys:e=t._payload,t=t._init;try{return m0(t(e))}catch{}}return null}function o_(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 m0(e);case 8:return e===Pp?"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 $s(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function WC(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function a_(t){var e=WC(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 i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.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 Zc(t){t._valueTracker||(t._valueTracker=a_(t))}function HC(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=WC(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function yd(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 w0(t,e){var r=e.checked;return Nt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function hw(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=$s(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 qC(t,e){e=e.checked,e!=null&&Tp(t,"checked",e,!1)}function b0(t,e){qC(t,e);var r=$s(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")?x0(t,e.type,r):e.hasOwnProperty("defaultValue")&&x0(t,e.type,$s(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function vw(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 x0(t,e,r){(e!=="number"||yd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var sf=Array.isArray;function Ua(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=eu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Wf(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var uf={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},l_=["Webkit","ms","Moz","O"];Object.keys(uf).forEach(function(t){l_.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),uf[e]=uf[t]})});function QC(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||uf.hasOwnProperty(t)&&uf[t]?(""+e).trim():e+"px"}function YC(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=QC(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var f_=Nt({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 E0(t,e){if(e){if(f_[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(re(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(re(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(re(61))}if(e.style!=null&&typeof e.style!="object")throw Error(re(62))}}function S0(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 k0=null;function Np(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _0=null,Va=null,Wa=null;function gw(t){if(t=Ic(t)){if(typeof _0!="function")throw Error(re(280));var e=t.stateNode;e&&(e=Lh(e),_0(t.stateNode,t.type,e))}}function XC(t){Va?Wa?Wa.push(t):Wa=[t]:Va=t}function ZC(){if(Va){var t=Va,e=Wa;if(Wa=Va=null,gw(t),e)for(t=0;t>>=0,t===0?32:31-(b_(t)/x_|0)|0}var tu=64,ru=4194304;function of(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 wd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=of(a):(s&=o,s!==0&&(n=of(s)))}else o=r&~i,o!==0?n=of(o):s!==0&&(n=of(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&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 Tc(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Kn(e),t[e]=r}function S_(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=hf),kw=String.fromCharCode(32),_w=!1;function wA(t,e){switch(t){case"keyup":return Z_.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bA(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ka=!1;function tT(t,e){switch(t){case"compositionend":return bA(e);case"keypress":return e.which!==32?null:(_w=!0,kw);case"textInput":return t=e.data,t===kw&&_w?null:t;default:return null}}function rT(t,e){if(ka)return t==="compositionend"||!jp&&wA(t,e)?(t=gA(),$u=Lp=bs=null,ka=!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=Mw(r)}}function EA(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?EA(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function SA(){for(var t=window,e=yd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=yd(t.document)}return e}function zp(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 uT(t){var e=SA(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&EA(r.ownerDocument.documentElement,r)){if(n!==null&&zp(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 i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Nw(r,s);var o=Nw(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>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,_a=null,R0=null,yf=null,O0=!1;function Rw(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;O0||_a==null||_a!==yd(n)||(n=_a,"selectionStart"in n&&zp(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}),yf&&Qf(yf,n)||(yf=n,n=Cd(R0,"onSelect"),0Ia||(t.current=j0[Ia],j0[Ia]=null,Ia--)}function ze(t,e){Ia++,j0[Ia]=t.current,t.current=e}var Fs={},Pr=qs(Fs),Qr=qs(!1),Bo=Fs;function nl(t,e){var r=t.type.contextTypes;if(!r)return Fs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Yr(t){return t=t.childContextTypes,t!=null}function Ed(){At(Qr),At(Pr)}function jw(t,e,r){if(Pr.current!==Fs)throw Error(re(168));ze(Pr,e),ze(Qr,r)}function OA(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(re(108,o_(t)||"Unknown",i));return Nt({},r,n)}function Sd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Fs,Bo=Pr.current,ze(Pr,t),ze(Qr,Qr.current),!0}function zw(t,e,r){var n=t.stateNode;if(!n)throw Error(re(169));r?(t=OA(t,e,Bo),n.__reactInternalMemoizedMergedChildContext=t,At(Qr),At(Pr),ze(Pr,t)):At(Qr),ze(Qr,r)}var Ni=null,$h=!1,cv=!1;function DA(t){Ni===null?Ni=[t]:Ni.push(t)}function AT(t){$h=!0,DA(t)}function Gs(){if(!cv&&Ni!==null){cv=!0;var t=0,e=Le;try{var r=Ni;for(Le=1;t>=o,i-=o,Bi=1<<32-Kn(e)+i|r<z?(H=F,F=null):H=F.sibling;var q=d(A,F,S[z],P);if(q===null){F===null&&(F=H);break}t&&F&&q.alternate===null&&e(A,F),E=s(q,E,z),L===null?R=q:L.sibling=q,L=q,F=H}if(z===S.length)return r(A,F),kt&&ho(A,z),R;if(F===null){for(;zz?(H=F,F=null):H=F.sibling;var K=d(A,F,q.value,P);if(K===null){F===null&&(F=H);break}t&&F&&K.alternate===null&&e(A,F),E=s(K,E,z),L===null?R=K:L.sibling=K,L=K,F=H}if(q.done)return r(A,F),kt&&ho(A,z),R;if(F===null){for(;!q.done;z++,q=S.next())q=u(A,q.value,P),q!==null&&(E=s(q,E,z),L===null?R=q:L.sibling=q,L=q);return kt&&ho(A,z),R}for(F=n(A,F);!q.done;z++,q=S.next())q=v(F,A,z,q.value,P),q!==null&&(t&&q.alternate!==null&&F.delete(q.key===null?z:q.key),E=s(q,E,z),L===null?R=q:L.sibling=q,L=q);return t&&F.forEach(function(ne){return e(A,ne)}),kt&&ho(A,z),R}function M(A,E,S,P){if(typeof S=="object"&&S!==null&&S.type===Sa&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Xc:e:{for(var R=S.key,L=E;L!==null;){if(L.key===R){if(R=S.type,R===Sa){if(L.tag===7){r(A,L.sibling),E=i(L,S.props.children),E.return=A,A=E;break e}}else if(L.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===ys&&Kw(R)===L.type){r(A,L.sibling),E=i(L,S.props),E.ref=ql(A,L,S),E.return=A,A=E;break e}r(A,L);break}else e(A,L);L=L.sibling}S.type===Sa?(E=Po(S.props.children,A.mode,P,S.key),E.return=A,A=E):(P=qu(S.type,S.key,S.props,null,A.mode,P),P.ref=ql(A,E,S),P.return=A,A=P)}return o(A);case Ea:e:{for(L=S.key;E!==null;){if(E.key===L)if(E.tag===4&&E.stateNode.containerInfo===S.containerInfo&&E.stateNode.implementation===S.implementation){r(A,E.sibling),E=i(E,S.children||[]),E.return=A,A=E;break e}else{r(A,E);break}else e(A,E);E=E.sibling}E=mv(S,A.mode,P),E.return=A,A=E}return o(A);case ys:return L=S._init,M(A,E,L(S._payload),P)}if(sf(S))return g(A,E,S,P);if(zl(S))return m(A,E,S,P);fu(A,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,E!==null&&E.tag===6?(r(A,E.sibling),E=i(E,S),E.return=A,A=E):(r(A,E),E=gv(S,A.mode,P),E.return=A,A=E),o(A)):r(A,E)}return M}var sl=VA(!0),WA=VA(!1),Mc={},hi=qs(Mc),ec=qs(Mc),tc=qs(Mc);function Eo(t){if(t===Mc)throw Error(re(174));return t}function Qp(t,e){switch(ze(tc,e),ze(ec,t),ze(hi,Mc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:A0(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=A0(e,t)}At(hi),ze(hi,e)}function ol(){At(hi),At(ec),At(tc)}function HA(t){Eo(tc.current);var e=Eo(hi.current),r=A0(e,t.type);e!==r&&(ze(ec,t),ze(hi,r))}function Yp(t){ec.current===t&&(At(hi),At(ec))}var It=qs(0);function Md(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var uv=[];function Xp(){for(var t=0;tr?r:4,t(!0);var n=dv.transition;dv.transition={};try{t(!1),e()}finally{Le=r,dv.transition=n}}function aE(){return _n().memoizedState}function _T(t,e,r){var n=Ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},lE(t))fE(e,r);else if(r=FA(t,e,r,n),r!==null){var i=$r();Jn(r,t,n,i),cE(r,e,n)}}function TT(t,e,r){var n=Ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(lE(t))fE(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,Yn(a,o)){var l=e.interleaved;l===null?(i.next=i,Kp(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=FA(t,e,i,n),r!==null&&(i=$r(),Jn(r,t,n,i),cE(r,e,n))}}function lE(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function fE(t,e){pf=Nd=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function cE(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Op(t,r)}}var Rd={readContext:kn,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useInsertionEffect:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useSyncExternalStore:wr,useId:wr,unstable_isNewReconciler:!1},PT={readContext:kn,useCallback:function(t,e){return ni().memoizedState=[t,e===void 0?null:e],t},useContext:kn,useEffect:Qw,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Uu(4194308,4,rE.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Uu(4194308,4,t,e)},useInsertionEffect:function(t,e){return Uu(4,2,t,e)},useMemo:function(t,e){var r=ni();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ni();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=_T.bind(null,Mt,t),[n.memoizedState,t]},useRef:function(t){var e=ni();return t={current:t},e.memoizedState=t},useState:Jw,useDebugValue:ng,useDeferredValue:function(t){return ni().memoizedState=t},useTransition:function(){var t=Jw(!1),e=t[0];return t=kT.bind(null,t[1]),ni().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Mt,i=ni();if(kt){if(r===void 0)throw Error(re(407));r=r()}else{if(r=e(),ar===null)throw Error(re(349));$o&30||KA(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Qw(QA.bind(null,n,s,t),[t]),n.flags|=2048,ic(9,JA.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ni(),e=ar.identifierPrefix;if(kt){var r=Li,n=Bi;r=(n&~(1<<32-Kn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=rc++,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[Zf]=n,wE(t,e,!1,!1),e.stateNode=t;e:{switch(o=S0(r,n),r){case"dialog":mt("cancel",t),mt("close",t),i=n;break;case"iframe":case"object":case"embed":mt("load",t),i=n;break;case"video":case"audio":for(i=0;ill&&(e.flags|=128,n=!0,Gl(s,!1),e.lanes=4194304)}else{if(!n)if(t=Md(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Gl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!kt)return br(e),null}else 2*Vt()-s.renderingStartTime>ll&&r!==1073741824&&(e.flags|=128,n=!0,Gl(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Vt(),e.sibling=null,r=It.current,ze(It,n?r&1|2:r&1),e):(br(e),null);case 22:case 23:return fg(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?sn&1073741824&&(br(e),e.subtreeFlags&6&&(e.flags|=8192)):br(e),null;case 24:return null;case 25:return null}throw Error(re(156,e.tag))}function LT(t,e){switch(Vp(e),e.tag){case 1:return Yr(e.type)&&Ed(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ol(),At(Qr),At(Pr),Xp(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Yp(e),null;case 13:if(At(It),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(re(340));il()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return At(It),null;case 4:return ol(),null;case 10:return Gp(e.type._context),null;case 22:case 23:return fg(),null;case 24:return null;default:return null}}var uu=!1,Cr=!1,$T=typeof WeakSet=="function"?WeakSet:Set,se=null;function Oa(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Bt(t,e,n)}else r.current=null}function X0(t,e,r){try{r()}catch(n){Bt(t,e,n)}}var sb=!1;function FT(t,e){if(D0=bd,t=SA(),zp(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 i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,f=0,c=0,u=t,d=null;t:for(;;){for(var v;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(v=u.firstChild)!==null;)d=u,u=v;for(;;){if(u===t)break t;if(d===r&&++f===i&&(a=o),d===s&&++c===n&&(l=o),(v=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(B0={focusedElem:t,selectionRange:r},bd=!1,se=e;se!==null;)if(e=se,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,se=t;else for(;se!==null;){e=se;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,M=g.memoizedState,A=e.stateNode,E=A.getSnapshotBeforeUpdate(e.elementType===e.type?m:jn(e.type,m),M);A.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(P){Bt(e,e.return,P)}if(t=e.sibling,t!==null){t.return=e.return,se=t;break}se=e.return}return g=sb,sb=!1,g}function gf(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&X0(e,r,s)}i=i.next}while(i!==n)}}function zh(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 Z0(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 CE(t){var e=t.alternate;e!==null&&(t.alternate=null,CE(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ai],delete e[Zf],delete e[F0],delete e[xT],delete e[CT])),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 AE(t){return t.tag===5||t.tag===3||t.tag===4}function ob(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||AE(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 ey(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=Ad));else if(n!==4&&(t=t.child,t!==null))for(ey(t,e,r),t=t.sibling;t!==null;)ey(t,e,r),t=t.sibling}function ty(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(ty(t,e,r),t=t.sibling;t!==null;)ty(t,e,r),t=t.sibling}var hr=null,Un=!1;function cs(t,e,r){for(r=r.child;r!==null;)EE(t,e,r),r=r.sibling}function EE(t,e,r){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(Rh,r)}catch{}switch(r.tag){case 5:Cr||Oa(r,e);case 6:var n=hr,i=Un;hr=null,cs(t,e,r),hr=n,Un=i,hr!==null&&(Un?(t=hr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):hr.removeChild(r.stateNode));break;case 18:hr!==null&&(Un?(t=hr,r=r.stateNode,t.nodeType===8?fv(t.parentNode,r):t.nodeType===1&&fv(t,r),Kf(t)):fv(hr,r.stateNode));break;case 4:n=hr,i=Un,hr=r.stateNode.containerInfo,Un=!0,cs(t,e,r),hr=n,Un=i;break;case 0:case 11:case 14:case 15:if(!Cr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&X0(r,e,o),i=i.next}while(i!==n)}cs(t,e,r);break;case 1:if(!Cr&&(Oa(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Bt(r,e,a)}cs(t,e,r);break;case 21:cs(t,e,r);break;case 22:r.mode&1?(Cr=(n=Cr)||r.memoizedState!==null,cs(t,e,r),Cr=n):cs(t,e,r);break;default:cs(t,e,r)}}function ab(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new $T),e.forEach(function(n){var i=KT.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Nn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*zT(n/1960))-n,10t?16:t,xs===null)var n=!1;else{if(t=xs,xs=null,Bd=0,Oe&6)throw Error(re(331));var i=Oe;for(Oe|=4,se=t.current;se!==null;){var s=se,o=s.child;if(se.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lVt()-ag?To(t,0):og|=r),Xr(t,e)}function NE(t,e){e===0&&(t.mode&1?(e=ru,ru<<=1,!(ru&130023424)&&(ru=4194304)):e=1);var r=$r();t=Hi(t,e),t!==null&&(Tc(t,e,r),Xr(t,r))}function GT(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),NE(t,r)}function KT(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(re(314))}n!==null&&n.delete(e),NE(t,r)}var RE;RE=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Qr.current)Kr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Kr=!1,DT(t,e,r);Kr=!!(t.flags&131072)}else Kr=!1,kt&&e.flags&1048576&&BA(e,_d,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Vu(t,e),t=e.pendingProps;var i=nl(e,Pr.current);qa(e,r),i=eg(null,e,n,t,i,r);var s=tg();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Yr(n)?(s=!0,Sd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Jp(e),i.updater=Fh,e.stateNode=i,i._reactInternals=e,H0(e,n,t,r),e=K0(null,e,n,!0,s,r)):(e.tag=0,kt&&s&&Up(e),Or(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Vu(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=QT(n),t=jn(n,t),i){case 0:e=G0(null,e,n,t,r);break e;case 1:e=rb(null,e,n,t,r);break e;case 11:e=eb(null,e,n,t,r);break e;case 14:e=tb(null,e,n,jn(n.type,t),r);break e}throw Error(re(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),G0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),rb(t,e,n,i,r);case 3:e:{if(pE(e),t===null)throw Error(re(387));n=e.pendingProps,s=e.memoizedState,i=s.element,jA(t,e),Id(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=al(Error(re(423)),e),e=nb(t,e,n,r,i);break e}else if(n!==i){i=al(Error(re(424)),e),e=nb(t,e,n,r,i);break e}else for(ln=Ps(e.stateNode.containerInfo.firstChild),cn=e,kt=!0,Vn=null,r=WA(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(il(),n===i){e=qi(t,e,r);break e}Or(t,e,n,r)}e=e.child}return e;case 5:return HA(e),t===null&&U0(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,L0(n,i)?o=null:s!==null&&L0(n,s)&&(e.flags|=32),yE(t,e),Or(t,e,o,r),e.child;case 6:return t===null&&U0(e),null;case 13:return gE(t,e,r);case 4:return Qp(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=sl(e,null,n,r):Or(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),eb(t,e,n,i,r);case 7:return Or(t,e,e.pendingProps,r),e.child;case 8:return Or(t,e,e.pendingProps.children,r),e.child;case 12:return Or(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,ze(Td,n._currentValue),n._currentValue=o,s!==null)if(Yn(s.value,o)){if(s.children===i.children&&!Qr.current){e=qi(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Fi(-1,r&-r),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?l.next=l:(l.next=c.next,c.next=l),f.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),V0(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(re(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),V0(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Or(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,qa(e,r),i=kn(i),n=n(i),e.flags|=1,Or(t,e,n,r),e.child;case 14:return n=e.type,i=jn(n,e.pendingProps),i=jn(n.type,i),tb(t,e,n,i,r);case 15:return hE(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),Vu(t,e),e.tag=1,Yr(n)?(t=!0,Sd(e)):t=!1,qa(e,r),UA(e,n,i),H0(e,n,i,r),K0(null,e,n,!0,t,r);case 19:return mE(t,e,r);case 22:return vE(t,e,r)}throw Error(re(156,e.tag))};function OE(t,e){return oA(t,e)}function JT(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 Cn(t,e,r,n){return new JT(t,e,r,n)}function ug(t){return t=t.prototype,!(!t||!t.isReactComponent)}function QT(t){if(typeof t=="function")return ug(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Ip)return 11;if(t===Mp)return 14}return 2}function Rs(t,e){var r=t.alternate;return r===null?(r=Cn(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 qu(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")ug(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Sa:return Po(r.children,i,s,e);case Pp:o=8,i|=8;break;case y0:return t=Cn(12,r,e,i|2),t.elementType=y0,t.lanes=s,t;case p0:return t=Cn(13,r,e,i),t.elementType=p0,t.lanes=s,t;case g0:return t=Cn(19,r,e,i),t.elementType=g0,t.lanes=s,t;case VC:return Vh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case zC:o=10;break e;case UC:o=9;break e;case Ip:o=11;break e;case Mp:o=14;break e;case ys:o=16,n=null;break e}throw Error(re(130,t==null?t:typeof t,""))}return e=Cn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Po(t,e,r,n){return t=Cn(7,t,n,e),t.lanes=r,t}function Vh(t,e,r,n){return t=Cn(22,t,n,e),t.elementType=VC,t.lanes=r,t.stateNode={isHidden:!1},t}function gv(t,e,r){return t=Cn(6,t,null,e),t.lanes=r,t}function mv(t,e,r){return e=Cn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function YT(t,e,r,n,i){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=X1(0),this.expirationTimes=X1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function dg(t,e,r,n,i,s,o,a,l){return t=new YT(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Cn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jp(s),t}function XT(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=vn})(Z4);const nP=PC(wi),pg=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Kh=x.createContext({});function iP(){return x.useContext(Kh).visualElement}const Nc=x.createContext(null),Jh=typeof document<"u",Fd=Jh?x.useLayoutEffect:x.useEffect,$E=x.createContext({strict:!1});function sP(t,e,r,n){const i=iP(),s=x.useContext($E),o=x.useContext(Nc),a=x.useContext(pg).reducedMotion,l=x.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return Fd(()=>{f&&f.render()}),(window.HandoffAppearAnimations?Fd:x.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function Ba(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function oP(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):Ba(r)&&(r.current=n))},[e])}function oc(t){return typeof t=="string"||Array.isArray(t)}function Qh(t){return typeof t=="object"&&typeof t.start=="function"}const aP=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Yh(t){return Qh(t.animate)||aP.some(e=>oc(t[e]))}function FE(t){return Boolean(Yh(t)||t.variants)}function lP(t,e){if(Yh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||oc(r)?r:void 0,animate:oc(n)?n:void 0}}return t.inherit!==!1?e:{}}function fP(t){const{initial:e,animate:r}=lP(t,x.useContext(Kh));return x.useMemo(()=>({initial:e,animate:r}),[yb(e),yb(r)])}function yb(t){return Array.isArray(t)?t.join(" "):t}const ki=t=>({isEnabled:e=>t.some(r=>!!e[r])}),ac={measureLayout:ki(["layout","layoutId","drag"]),animation:ki(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ki(["exit"]),drag:ki(["drag","dragControls"]),focus:ki(["whileFocus"]),hover:ki(["whileHover","onHoverStart","onHoverEnd"]),tap:ki(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ki(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ki(["whileInView","onViewportEnter","onViewportLeave"])};function cP(t){for(const e in t)e==="projectionNodeConstructor"?ac.projectionNodeConstructor=t[e]:ac[e].Component=t[e]}function Xh(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const bf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let uP=1;function dP(){return Xh(()=>{if(bf.hasEverUpdated)return uP++})}const gg=x.createContext({});class hP extends Wt.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const jE=x.createContext({}),vP=Symbol.for("motionComponentSymbol");function yP({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&cP(t);function o(l,f){const c={...x.useContext(pg),...l,layoutId:pP(l)},{isStatic:u}=c;let d=null;const v=fP(l),g=u?void 0:dP(),m=i(l,u);if(!u&&Jh){v.visualElement=sP(s,m,c,e);const M=x.useContext($E).strict,A=x.useContext(jE);v.visualElement&&(d=v.visualElement.loadFeatures(c,M,t,g,r||ac.projectionNodeConstructor,A))}return x.createElement(hP,{visualElement:v.visualElement,props:c},d,x.createElement(Kh.Provider,{value:v},n(s,l,g,oP(m,v.visualElement,f),m,u,v.visualElement)))}const a=x.forwardRef(o);return a[vP]=s,a}function pP({layoutId:t}){const e=x.useContext(gg).id;return e&&t!==void 0?e+"-"+t:t}function gP(t){function e(n,i={}){return yP(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const mP=["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 mg(t){return typeof t!="string"||t.includes("-")?!1:!!(mP.indexOf(t)>-1||/[A-Z]/.test(t))}const jd={};function wP(t){Object.assign(jd,t)}const zd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(zd);function zE(t,{layout:e,layoutId:r}){return Sl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!jd[t]||t==="opacity")}const Zr=t=>!!(t!=null&&t.getVelocity),bP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xP=(t,e)=>zd.indexOf(t)-zd.indexOf(e);function CP({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(xP);for(const a of e)o+=`${bP[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function UE(t){return t.startsWith("--")}const AP=(t,e)=>e&&typeof t=="number"?e.transform(t):t,fl=(t,e,r)=>Math.min(Math.max(r,t),e),ea={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xf={...ea,transform:t=>fl(0,1,t)},vu={...ea,default:1},Cf=t=>Math.round(t*1e5)/1e5,lc=/(-)?([\d]*\.?[\d])+/g,oy=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,EP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Rc(t){return typeof t=="string"}const Oc=t=>({test:e=>Rc(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),hs=Oc("deg"),vi=Oc("%"),ye=Oc("px"),SP=Oc("vh"),kP=Oc("vw"),pb={...vi,parse:t=>vi.parse(t)/100,transform:t=>vi.transform(t*100)},gb={...ea,transform:Math.round},VE={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:hs,rotateX:hs,rotateY:hs,rotateZ:hs,scale:vu,scaleX:vu,scaleY:vu,scaleZ:vu,skew:hs,skewX:hs,skewY:hs,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:xf,originX:pb,originY:pb,originZ:ye,zIndex:gb,fillOpacity:xf,strokeOpacity:xf,numOctaves:gb};function wg(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let f=!1,c=!1,u=!0;for(const d in e){const v=e[d];if(UE(d)){s[d]=v;continue}const g=VE[d],m=AP(v,g);if(Sl.has(d)){if(f=!0,o[d]=m,a.push(d),!u)continue;v!==(g.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,l[d]=m):i[d]=m}if(e.transform||(f||n?i.transform=CP(t,r,u,n):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:v="50%",originZ:g=0}=l;i.transformOrigin=`${d} ${v} ${g}`}}const bg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function WE(t,e,r){for(const n in e)!Zr(e[n])&&!zE(n,r)&&(t[n]=e[n])}function _P({transformTemplate:t},e,r){return x.useMemo(()=>{const n=bg();return wg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function TP(t,e,r){const n=t.style||{},i={};return WE(i,n,t),Object.assign(i,_P(t,e,r)),t.transformValues?t.transformValues(i):i}function PP(t,e,r){const n={},i=TP(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const IP=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","viewport"]);function Ud(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||IP.has(t)}let HE=t=>!Ud(t);function MP(t){t&&(HE=e=>e.startsWith("on")?!Ud(e):t(e))}try{MP(require("@emotion/is-prop-valid").default)}catch{}function NP(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(HE(i)||r===!0&&Ud(i)||!e&&!Ud(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function mb(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function RP(t,e,r){const n=mb(e,t.x,t.width),i=mb(r,t.y,t.height);return`${n} ${i}`}const OP={offset:"stroke-dashoffset",array:"stroke-dasharray"},DP={offset:"strokeDashoffset",array:"strokeDasharray"};function BP(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?OP:DP;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function xg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},f,c,u){if(wg(t,l,f,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:v,dimensions:g}=t;d.transform&&(g&&(v.transform=d.transform),delete d.transform),g&&(n!==void 0||i!==void 0||v.transform)&&(v.transformOrigin=RP(g,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),s!==void 0&&BP(d,s,o,a,!1)}const qE=()=>({...bg(),attrs:{}}),Cg=t=>typeof t=="string"&&t.toLowerCase()==="svg";function LP(t,e,r,n){const i=x.useMemo(()=>{const s=qE();return xg(s,e,{enableHardwareAcceleration:!1},Cg(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};WE(s,t.style,t),i.style={...s,...i.style}}return i}function $P(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const f=(mg(r)?LP:PP)(n,o,a,r),u={...NP(n,typeof r=="string",t),...f,ref:s},{children:d}=n,v=x.useMemo(()=>Zr(d)?d.get():d,[d]);return i&&(u["data-projection-id"]=i),x.createElement(r,{...u,children:v})}}const Ag=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function GE(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const KE=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 JE(t,e,r,n){GE(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(KE.has(i)?i:Ag(i),e.attrs[i])}function Eg(t,e){const{style:r}=t,n={};for(const i in r)(Zr(r[i])||e.style&&Zr(e.style[i])||zE(i,t))&&(n[i]=r[i]);return n}function QE(t,e){const r=Eg(t,e);for(const n in t)if(Zr(t[n])||Zr(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function Sg(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const Vd=t=>Array.isArray(t),FP=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),jP=t=>Vd(t)?t[t.length-1]||0:t;function Gu(t){const e=Zr(t)?t.get():t;return FP(e)?e.toValue():e}function zP({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:UP(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const YE=t=>(e,r)=>{const n=x.useContext(Kh),i=x.useContext(Nc),s=()=>zP(t,e,n,i);return r?s():Xh(s)};function UP(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Gu(s[d]);let{initial:o,animate:a}=t;const l=Yh(t),f=FE(t);e&&f&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=r?r.initial===!1:!1;c=c||o===!1;const u=c?a:o;return u&&typeof u!="boolean"&&!Qh(u)&&(Array.isArray(u)?u:[u]).forEach(v=>{const g=Sg(t,v);if(!g)return;const{transitionEnd:m,transition:M,...A}=g;for(const E in A){let S=A[E];if(Array.isArray(S)){const P=c?S.length-1:0;S=S[P]}S!==null&&(i[E]=S)}for(const E in m)i[E]=m[E]}),i}const VP={useVisualState:YE({scrapeMotionValuesFromProps:QE,createRenderState:qE,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}}xg(r,n,{enableHardwareAcceleration:!1},Cg(e.tagName),t.transformTemplate),JE(e,r)}})},WP={useVisualState:YE({scrapeMotionValuesFromProps:Eg,createRenderState:bg})};function HP(t,{forwardMotionProps:e=!1},r,n,i){return{...mg(t)?VP:WP,preloadedFeatures:r,useRender:$P(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var je;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(je||(je={}));function Io(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function Wd(t,e,r,n){x.useEffect(()=>{const i=t.current;if(r&&i)return Io(i,e,r,n)},[t,e,r,n])}function qP({whileFocus:t,visualElement:e}){const r=x.useRef(!1),{animationState:n}=e,i=x.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(je.Focus,!0),r.current=!0)},[n]),s=x.useCallback(()=>{!r.current||!n||(n.setActive(je.Focus,!1),r.current=!1)},[n]);Wd(e,"focus",t?i:void 0),Wd(e,"blur",t?s:void 0)}const XE=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Zh(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ZE=t=>e=>XE(e)&&t(e,Zh(e));function Ka(t,e,r,n){return Io(t,e,ZE(r),n)}function Hd(t,e,r,n){return Wd(t,e,r&&ZE(r),n)}function e6(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const wb=e6("dragHorizontal"),bb=e6("dragVertical");function t6(t){let e=!1;if(t==="y")e=bb();else if(t==="x")e=wb();else{const r=wb(),n=bb();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function r6(){const t=t6(!0);return t?(t(),!1):!0}function xb(t,e,r,n){return(i,s)=>{i.type==="touch"||r6()||(r&&t.animationState&&t.animationState.setActive(je.Hover,e),n&&n(i,s))}}function GP({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Hd(n,"pointerenter",x.useMemo(()=>t||r?xb(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Hd(n,"pointerleave",x.useMemo(()=>e||r?xb(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const n6=(t,e)=>e?t===e?!0:n6(t,e.parentElement):!1;function kg(t){return x.useEffect(()=>()=>t(),[])}const KP=(t,e)=>r=>e(t(r)),e1=(...t)=>t.reduce(KP);function wv(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,Zh(r))}function JP({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=x.useRef(!1),l=x.useRef(null),f={passive:!(e||t||r||s.onPointerDown)};function c(){l.current&&l.current(),l.current=null}function u(){return c(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(je.Tap,!1),!r6()}function d(E,S){var P,R,L,F;u()&&(n6(i.current,E.target)?(F=(L=i.getProps()).onTap)===null||F===void 0||F.call(L,E,S):(R=(P=i.getProps()).onTapCancel)===null||R===void 0||R.call(P,E,S))}function v(E,S){var P,R;u()&&((R=(P=i.getProps()).onTapCancel)===null||R===void 0||R.call(P,E,S))}function g(E,S){var P;const R=i.getProps();R.whileTap&&i.animationState&&i.animationState.setActive(je.Tap,!0),(P=R.onTapStart)===null||P===void 0||P.call(R,E,S)}const m=[Boolean(e),Boolean(t),Boolean(n),i],M=x.useCallback((E,S)=>{c(),!a.current&&(a.current=!0,l.current=e1(Ka(window,"pointerup",d,f),Ka(window,"pointercancel",v,f)),g(E,S))},m);Hd(i,"pointerdown",o?M:void 0,f);const A=x.useCallback(()=>{const E=Io(i.current,"keydown",P=>{P.key!=="Enter"||a.current||(a.current=!0,l.current=Io(i.current,"keyup",()=>{P.key!=="Enter"||!u()||wv("up",i.getProps().onTap)},f),wv("down",g))}),S=Io(i.current,"blur",()=>{E(),S(),a.current&&wv("cancel",v)})},m);Wd(i,"focus",o?A:void 0),kg(c)}const ay=new WeakMap,bv=new WeakMap,QP=t=>{const e=ay.get(t.target);e&&e(t)},YP=t=>{t.forEach(QP)};function XP({root:t,...e}){const r=t||document;bv.has(r)||bv.set(r,{});const n=bv.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(YP,{root:t,...e})),n[i]}function ZP(t,e,r){const n=XP(e);return ay.set(t,r),n.observe(t),()=>{ay.delete(t),n.unobserve(t)}}function eI({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=x.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?nI:rI)(o,s.current,t,i)}const tI={some:0,all:1};function rI(t,e,r,{root:n,margin:i,amount:s="some",once:o}){x.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:tI[s]},l=f=>{const{isIntersecting:c}=f;if(e.isInView===c||(e.isInView=c,o&&!c&&e.hasEnteredView))return;c&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(je.InView,c);const u=r.getProps(),d=c?u.onViewportEnter:u.onViewportLeave;d&&d(f)};return ZP(r.current,a,l)},[t,n,i,s])}function nI(t,e,r,{fallback:n=!0}){x.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(je.InView,!0)})},[t])}const Cs=t=>e=>(t(e),null),iI={inView:Cs(eI),tap:Cs(JP),focus:Cs(qP),hover:Cs(GP)};function i6(){const t=x.useContext(Nc);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=x.useId();return x.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function s6(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),oI=t=>/^0[^.\s]+$/.test(t),ji={delta:0,timestamp:0},o6=1/60*1e3,aI=typeof performance<"u"?()=>performance.now():()=>Date.now(),a6=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(aI()),o6);function lI(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,c=!1)=>{const u=c&&i,d=u?e:r;return f&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const f=r.indexOf(l);f!==-1&&r.splice(f,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let f=0;f(t[e]=lI(()=>fc=!0),t),{}),kr=Dc.reduce((t,e)=>{const r=t1[e];return t[e]=(n,i=!1,s=!1)=>(fc||uI(),r.schedule(n,i,s)),t},{}),js=Dc.reduce((t,e)=>(t[e]=t1[e].cancel,t),{}),xv=Dc.reduce((t,e)=>(t[e]=()=>t1[e].process(ji),t),{}),cI=t=>t1[t].process(ji),l6=t=>{fc=!1,ji.delta=ly?o6:Math.max(Math.min(t-ji.timestamp,fI),1),ji.timestamp=t,fy=!0,Dc.forEach(cI),fy=!1,fc&&(ly=!1,a6(l6))},uI=()=>{fc=!0,ly=!0,fy||a6(l6)};function _g(t,e){t.indexOf(e)===-1&&t.push(e)}function Tg(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Pg{constructor(){this.subscriptions=[]}add(e){return _g(this.subscriptions,e),()=>Tg(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class hI{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=ji;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,kr.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()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>kr.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=dI(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Pg);const n=this.events[e].add(r);return e==="change"?()=>{n(),kr.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?Ig(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 cl(t,e){return new hI(t,e)}const Mg=(t,e)=>r=>Boolean(Rc(r)&&EP.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),f6=(t,e,r)=>n=>{if(!Rc(n))return n;const[i,s,o,a]=n.match(lc);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},vI=t=>fl(0,255,t),Cv={...ea,transform:t=>Math.round(vI(t))},So={test:Mg("rgb","red"),parse:f6("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Cv.transform(t)+", "+Cv.transform(e)+", "+Cv.transform(r)+", "+Cf(xf.transform(n))+")"};function yI(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const cy={test:Mg("#"),parse:yI,transform:So.transform},La={test:Mg("hsl","hue"),parse:f6("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+vi.transform(Cf(e))+", "+vi.transform(Cf(r))+", "+Cf(xf.transform(n))+")"},Rr={test:t=>So.test(t)||cy.test(t)||La.test(t),parse:t=>So.test(t)?So.parse(t):La.test(t)?La.parse(t):cy.parse(t),transform:t=>Rc(t)?t:t.hasOwnProperty("red")?So.transform(t):La.transform(t)},c6="${c}",u6="${n}";function pI(t){var e,r;return isNaN(t)&&Rc(t)&&(((e=t.match(lc))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(oy))===null||r===void 0?void 0:r.length)||0)>0}function qd(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(oy);i&&(r=i.length,t=t.replace(oy,c6),e.push(...i.map(Rr.parse)));const s=t.match(lc);return s&&(n=s.length,t=t.replace(lc,u6),e.push(...s.map(ea.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function d6(t){return qd(t).values}function h6(t){const{values:e,numColors:r,tokenised:n}=qd(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function mI(t){const e=d6(t);return h6(t)(e.map(gI))}const zs={test:pI,parse:d6,createTransformer:h6,getAnimatableNone:mI},wI=new Set(["brightness","contrast","saturate","opacity"]);function bI(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(lc)||[];if(!n)return t;const i=r.replace(n,"");let s=wI.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const xI=/([a-z-]*)\(.*?\)/g,uy={...zs,getAnimatableNone:t=>{const e=t.match(xI);return e?e.map(bI).join(" "):t}},CI={...VE,color:Rr,backgroundColor:Rr,outlineColor:Rr,fill:Rr,stroke:Rr,borderColor:Rr,borderTopColor:Rr,borderRightColor:Rr,borderBottomColor:Rr,borderLeftColor:Rr,filter:uy,WebkitFilter:uy},Ng=t=>CI[t];function Rg(t,e){var r;let n=Ng(t);return n!==uy&&(n=zs),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const v6=t=>e=>e.test(t),AI={test:t=>t==="auto",parse:t=>t},y6=[ea,ye,vi,hs,kP,SP,AI],Jl=t=>y6.find(v6(t)),EI=[...y6,Rr,zs],SI=t=>EI.find(v6(t));function kI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function _I(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function r1(t,e,r){const n=t.getProps();return Sg(n,e,r!==void 0?r:n.custom,kI(t),_I(t))}function TI(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,cl(r))}function PI(t,e){const r=r1(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=jP(s[o]);TI(t,o,a)}}function II(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,BI={current:!1},Og=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Dg=t=>e=>1-t(1-e),Bg=t=>t*t,LI=Dg(Bg),Lg=Og(Bg),$t=(t,e,r)=>-r*t+r*e+t;function Av(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 $I({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=Av(l,a,t+1/3),s=Av(l,a,t),o=Av(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const Ev=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},FI=[cy,So,La],jI=t=>FI.find(e=>e.test(t));function Cb(t){const e=jI(t);let r=e.parse(t);return e===La&&(r=$I(r)),r}const p6=(t,e)=>{const r=Cb(t),n=Cb(e),i={...r};return s=>(i.red=Ev(r.red,n.red,s),i.green=Ev(r.green,n.green,s),i.blue=Ev(r.blue,n.blue,s),i.alpha=$t(r.alpha,n.alpha,s),So.transform(i))};function g6(t,e){return typeof t=="number"?r=>$t(t,e,r):Rr.test(t)?p6(t,e):w6(t,e)}const m6=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>g6(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=g6(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},w6=(t,e)=>{const r=zs.createTransformer(e),n=qd(t),i=qd(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?e1(m6(n.values,i.values),r):o=>`${o>0?e:t}`},Jd=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},Ab=(t,e)=>r=>$t(t,e,r);function UI(t){return typeof t=="number"?Ab:typeof t=="string"?Rr.test(t)?p6:w6:Array.isArray(t)?m6:typeof t=="object"?zI:Ab}function VI(t,e,r){const n=[],i=r||UI(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=VI(e,n,i),a=o.length,l=f=>{let c=0;if(a>1)for(;cl(fl(t[0],t[s-1],f)):l}const $g=t=>t,x6=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,WI=1e-7,HI=12;function qI(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=x6(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>WI&&++aqI(s,0,1,t,r);return s=>s===0||s===1?s:x6(i(s),e,n)}const A6=t=>1-Math.sin(Math.acos(t)),Fg=Dg(A6),GI=Og(Fg),E6=C6(.33,1.53,.69,.99),jg=Dg(E6),KI=Og(jg),JI=t=>(t*=2)<1?.5*jg(t):.5*(2-Math.pow(2,-10*(t-1))),QI={linear:$g,easeIn:Bg,easeInOut:Lg,easeOut:LI,circIn:A6,circInOut:GI,circOut:Fg,backIn:jg,backInOut:KI,backOut:E6,anticipate:JI},Eb=t=>{if(Array.isArray(t)){Kd(t.length===4);const[e,r,n,i]=t;return C6(e,r,n,i)}else if(typeof t=="string")return QI[t];return t},YI=t=>Array.isArray(t)&&typeof t[0]!="number";function XI(t,e){return t.map(()=>e||Lg).splice(0,t.length-1)}function ZI(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function eM(t,e){return t.map(r=>r*e)}function dy({keyframes:t,ease:e=Lg,times:r,duration:n=300}){t=[...t];const i=YI(e)?e.map(Eb):Eb(e),s={done:!1,value:t[0]},o=eM(r&&r.length===t.length?r:ZI(t),n);function a(){return b6(o,t,{ease:Array.isArray(i)?i:XI(t,i)})}let l=a();return{next:f=>(s.value=l(f),s.done=f>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const Sv=.001,tM=.01,Sb=10,rM=.05,nM=1;function iM({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;DI(t<=Sb*1e3);let o=1-e;o=fl(rM,nM,o),t=fl(tM,Sb,t/1e3),o<1?(i=f=>{const c=f*o,u=c*t,d=c-r,v=hy(f,o),g=Math.exp(-u);return Sv-d/v*g},s=f=>{const u=f*o*t,d=u*r+r,v=Math.pow(o,2)*Math.pow(f,2)*t,g=Math.exp(-u),m=hy(Math.pow(f,2),o);return(-i(f)+Sv>0?-1:1)*((d-v)*g)/m}):(i=f=>{const c=Math.exp(-f*t),u=(f-r)*t+1;return-Sv+c*u},s=f=>{const c=Math.exp(-f*t),u=(r-f)*(t*t);return c*u});const a=5/t,l=oM(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const f=Math.pow(l,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:t}}}const sM=12;function oM(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function fM(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!kb(t,lM)&&kb(t,aM)){const r=iM(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const cM=5;function S6({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:f,velocity:c,duration:u,isResolvedFromDuration:d}=fM(n);let v=uM,g=c?-(c/1e3):0;const m=l/(2*Math.sqrt(a*f));function M(){const A=s-i,E=Math.sqrt(a/f)/1e3,S=Math.abs(A)<5;if(r||(r=S?.01:2),e||(e=S?.005:.5),m<1){const P=hy(E,m);v=R=>{const L=Math.exp(-m*E*R);return s-L*((g+m*E*A)/P*Math.sin(P*R)+A*Math.cos(P*R))}}else if(m===1)v=P=>s-Math.exp(-E*P)*(A+(g+E*A)*P);else{const P=E*Math.sqrt(m*m-1);v=R=>{const L=Math.exp(-m*E*R),F=Math.min(P*R,300);return s-L*((g+m*E*A)*Math.sinh(F)+P*A*Math.cosh(F))/P}}}return M(),{next:A=>{const E=v(A);if(d)o.done=A>=u;else{let S=g;if(A!==0)if(m<1){const L=Math.max(0,A-cM);S=Ig(E-v(L),A-L)}else S=0;const P=Math.abs(S)<=r,R=Math.abs(s-E)<=e;o.done=P&&R}return o.value=o.done?s:E,o},flipTarget:()=>{g=-g,[i,s]=[s,i],M()}}}S6.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const uM=t=>0;function dM({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const f=o+l,c=s===void 0?f:s(f);return c!==f&&(l=c-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>i||d<-i),a.value=a.done?c:c+d,a},flipTarget:()=>{}}}const hM={decay:dM,keyframes:dy,tween:dy,spring:S6};function k6(t,e,r=0){return t-e-r}function vM(t,e=0,r=0,n=!0){return n?k6(e+-t,e,r):e-(t-e)+r}function yM(t,e,r,n){return n?t>=e+r:t<=-r}const pM=t=>{const e=({delta:r})=>t(r);return{start:()=>kr.update(e,!0),stop:()=>js.update(e)}};function Qd({duration:t,driver:e=pM,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:f,onComplete:c,onRepeat:u,onUpdate:d,type:v="keyframes",...g}){var m,M;const A=r;let E,S=0,P=t,R=!1,L=!0,F;const z=hM[o.length>2?"keyframes":v]||dy,H=o[0],q=o[o.length-1];let K={done:!1,value:H};!((M=(m=z).needsInterpolation)===null||M===void 0)&&M.call(m,H,q)&&(F=b6([0,100],[H,q],{clamp:!1}),o=[0,100]);const ne=z({...g,duration:t,keyframes:o});function O(){S++,i==="reverse"?(L=S%2===0,r=vM(r,P,s,L)):(r=k6(r,P,s),i==="mirror"&&ne.flipTarget()),R=!1,u&&u()}function y(){E&&E.stop(),c&&c()}function w(N){L||(N=-N),r+=N,R||(K=ne.next(Math.max(0,r)),F&&(K.value=F(K.value)),R=L?K.done:r<=0),d&&d(K.value),R&&(S===0&&(P=P!==void 0?P:r),S{f&&f(),E&&E.stop()},set currentTime(N){r=A,w(N)},sample:N=>{r=A;const p=t&&typeof t=="number"?Math.max(t*.5,50):50;let k=0;for(w(0);k<=N;){const I=N-k;w(Math.min(I,p)),k+=p}return K}}}function gM(t){return!t||Array.isArray(t)||typeof t=="string"&&_6[t]}const lf=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,_6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:lf([0,.65,.55,1]),circOut:lf([.55,0,1,.45]),backIn:lf([.31,.01,.66,-.59]),backOut:lf([.33,1.53,.69,.99])};function mM(t){if(t)return Array.isArray(t)?lf(t):_6[t]}function wM(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:mM(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const _b={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},kv={},T6={};for(const t in _b)T6[t]=()=>(kv[t]===void 0&&(kv[t]=_b[t]()),kv[t]);function bM(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const xM=new Set(["opacity"]),yu=10;function CM(t,e,{onUpdate:r,onComplete:n,...i}){if(!(T6.waapi()&&xM.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:f}=i;if(i.type==="spring"||!gM(i.ease)){if(i.repeat===1/0)return;const u=Qd({...i,elapsed:0});let d={done:!1,value:o[0]};const v=[];let g=0;for(;!d.done&&g<2e4;)d=u.sample(g),v.push(d.value),g+=yu;o=v,a=g-yu,f="linear"}const c=wM(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:f});return c.onfinish=()=>{t.set(bM(o,i)),kr.update(()=>c.cancel()),n&&n()},{get currentTime(){return c.currentTime||0},set currentTime(u){c.currentTime=u},stop:()=>{const{currentTime:u}=c;if(u){const d=Qd({...i,autoplay:!1});t.setWithVelocity(d.sample(u-yu).value,d.sample(u).value,yu)}kr.update(()=>c.cancel())}}}function P6(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(js.read(n),t(s-e))};return kr.read(n,!0),()=>js.read(n)}function AM({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:P6(i,-e)}:i()}function EM({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:f,driver:c,onUpdate:u,onComplete:d,onStop:v}){const g=t[0];let m;function M(P){return r!==void 0&&Pn}function A(P){return r===void 0?n:n===void 0||Math.abs(r-P){var L;u==null||u(R),(L=P.onUpdate)===null||L===void 0||L.call(P,R)},onComplete:d,onStop:v})}function S(P){E({type:"spring",stiffness:o,damping:a,restDelta:l,...P})}if(M(g))S({velocity:e,keyframes:[g,A(g)]});else{let P=i*e+g;typeof f<"u"&&(P=f(P));const R=A(P),L=R===r?-1:1;let F,z;const H=q=>{F=z,z=q,e=Ig(q-F,ji.delta),(L===1&&q>R||L===-1&&qm==null?void 0:m.stop()}}const fo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),pu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_v=()=>({type:"keyframes",ease:"linear",duration:.3}),SM={type:"keyframes",duration:.8},Tb={x:fo,y:fo,z:fo,rotate:fo,rotateX:fo,rotateY:fo,rotateZ:fo,scaleX:pu,scaleY:pu,scale:pu,opacity:_v,backgroundColor:_v,color:_v,default:pu},kM=(t,{keyframes:e})=>e.length>2?SM:(Tb[t]||Tb.default)(e[1]),vy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&zs.test(e)&&!e.startsWith("url("));function _M({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}function Pb(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Ib(t){return typeof t=="number"?0:Rg("",t)}function I6(t,e){return t[e]||t.default||t}function TM(t,e,r,n){const i=vy(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=Rg(e,r):Pb(s)&&typeof r=="string"?s=Ib(r):!Array.isArray(r)&&Pb(r)&&typeof s=="string"&&(r=Ib(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const zg=(t,e,r,n={})=>i=>{const s=I6(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Ku(o);const l=TM(e,t,r,s),f=l[0],c=l[l.length-1],u=vy(t,f),d=vy(t,c);let v={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:M=>{e.set(M),s.onUpdate&&s.onUpdate(M)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!d||BI.current||s.type===!1)return AM(v);if(s.type==="inertia")return EM(v);_M(s)||(v={...v,...kM(t,v)}),v.duration&&(v.duration=Ku(v.duration)),v.repeatDelay&&(v.repeatDelay=Ku(v.repeatDelay));const g=e.owner,m=g&&g.current;if(g&&m instanceof HTMLElement&&!(g!=null&&g.getProps().onUpdate)){const M=CM(e,t,v);if(M)return M}return Qd(v)};function PM(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>yy(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=yy(t,e,r);else{const i=typeof e=="function"?r1(t,e,r.custom):e;n=M6(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function yy(t,e,r={}){var n;const i=r1(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>M6(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return IM(t,e,c+f,u,d,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[f,c]=l==="beforeChildren"?[o,a]:[a,o];return f().then(c)}else return Promise.all([o(),a(r.delay)])}function M6(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const f=t.getValue("willChange");n&&(o=n);const c=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const d in l){const v=t.getValue(d),g=l[d];if(!v||g===void 0||u&&NM(u,d))continue;const m={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!v.hasAnimated){const A=t.getProps()[OI];A&&(m.elapsed=window.HandoffAppearAnimations(A,d,v,kr))}let M=v.start(zg(d,v,g,t.shouldReduceMotion&&Sl.has(d)?{type:!1}:m));Gd(f)&&(f.add(d),M=M.then(()=>f.remove(d))),c.push(M)}return Promise.all(c).then(()=>{a&&PI(t,a)})}function IM(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(f=0)=>f*n:(f=0)=>a-f*n;return Array.from(t.variantChildren).sort(MM).forEach((f,c)=>{f.notify("AnimationStart",e),o.push(yy(f,e,{...s,delay:r+l(c)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function MM(t,e){return t.sortNodePosition(e)}function NM({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const Ug=[je.Animate,je.InView,je.Focus,je.Hover,je.Tap,je.Drag,je.Exit],RM=[...Ug].reverse(),OM=Ug.length;function DM(t){return e=>Promise.all(e.map(({animation:r,options:n})=>PM(t,r,n)))}function BM(t){let e=DM(t);const r=$M();let n=!0;const i=(l,f)=>{const c=r1(t,f);if(c){const{transition:u,transitionEnd:d,...v}=c;l={...l,...v,...d}}return l};function s(l){e=l(t)}function o(l,f){const c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],v=new Set;let g={},m=1/0;for(let A=0;Am&&R;const q=Array.isArray(P)?P:[P];let K=q.reduce(i,{});L===!1&&(K={});const{prevResolvedValues:ne={}}=S,O={...ne,...K},y=w=>{H=!0,v.delete(w),S.needsAnimating[w]=!0};for(const w in O){const T=K[w],N=ne[w];g.hasOwnProperty(w)||(T!==N?Vd(T)&&Vd(N)?!s6(T,N)||z?y(w):S.protectedKeys[w]=!0:T!==void 0?y(w):v.add(w):T!==void 0&&v.has(w)?y(w):S.protectedKeys[w]=!0)}S.prevProp=P,S.prevResolvedValues=K,S.isActive&&(g={...g,...K}),n&&t.blockInitialAnimation&&(H=!1),H&&!F&&d.push(...q.map(w=>({animation:w,options:{type:E,...l}})))}if(v.size){const A={};v.forEach(E=>{const S=t.getBaseTarget(E);S!==void 0&&(A[E]=S)}),d.push({animation:A})}let M=Boolean(d.length);return n&&c.initial===!1&&!t.manuallyAnimateOnMount&&(M=!1),n=!1,M?e(d):Promise.resolve()}function a(l,f,c){var u;if(r[l].isActive===f)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(v=>{var g;return(g=v.animationState)===null||g===void 0?void 0:g.setActive(l,f)}),r[l].isActive=f;const d=o(c,l);for(const v in r)r[v].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function LM(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!s6(e,t):!1}function co(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $M(){return{[je.Animate]:co(!0),[je.InView]:co(),[je.Hover]:co(),[je.Tap]:co(),[je.Drag]:co(),[je.Focus]:co(),[je.Exit]:co()}}const FM={animation:Cs(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=BM(t)),Qh(e)&&x.useEffect(()=>e.subscribe(t),[e])}),exit:Cs(t=>{const{custom:e,visualElement:r}=t,[n,i]=i6(),s=x.useContext(Nc);x.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(je.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},Mb=(t,e)=>Math.abs(t-e);function jM(t,e){const r=Mb(t.x,e.x),n=Mb(t.y,e.y);return Math.sqrt(r**2+n**2)}class N6{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 f=Pv(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,u=jM(f.offset,{x:0,y:0})>=3;if(!c&&!u)return;const{point:d}=f,{timestamp:v}=ji;this.history.push({...d,timestamp:v});const{onStart:g,onMove:m}=this.handlers;c||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,c)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Tv(c,this.transformPagePoint),kr.update(this.updatePoint,!0)},this.handlePointerUp=(f,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,v=Pv(f.type==="pointercancel"?this.lastMoveEventInfo:Tv(c,this.transformPagePoint),this.history);this.startEvent&&u&&u(f,v),d&&d(f,v)},!XE(e))return;this.handlers=r,this.transformPagePoint=n;const i=Zh(e),s=Tv(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=ji;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,Pv(s,this.history)),this.removeListeners=e1(Ka(window,"pointermove",this.handlePointerMove),Ka(window,"pointerup",this.handlePointerUp),Ka(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),js.update(this.updatePoint)}}function Tv(t,e){return e?{point:e(t.point)}:t}function Nb(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pv({point:t},e){return{point:t,delta:Nb(t,R6(e)),offset:Nb(t,zM(e)),velocity:UM(e,.1)}}function zM(t){return t[0]}function R6(t){return t[t.length-1]}function UM(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=R6(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Ku(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function dn(t){return t.max-t.min}function py(t,e=0,r=.01){return Math.abs(t-e)<=r}function Rb(t,e,r,n=.5){t.origin=n,t.originPoint=$t(e.min,e.max,t.origin),t.scale=dn(r)/dn(e),(py(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=$t(r.min,r.max,t.origin)-t.originPoint,(py(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Af(t,e,r,n){Rb(t.x,e.x,r.x,n==null?void 0:n.originX),Rb(t.y,e.y,r.y,n==null?void 0:n.originY)}function Ob(t,e,r){t.min=r.min+e.min,t.max=t.min+dn(e)}function VM(t,e,r){Ob(t.x,e.x,r.x),Ob(t.y,e.y,r.y)}function Db(t,e,r){t.min=e.min-r.min,t.max=t.min+dn(e)}function Ef(t,e,r){Db(t.x,e.x,r.x),Db(t.y,e.y,r.y)}function WM(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?$t(r,t,n.max):Math.min(t,r)),t}function Bb(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 HM(t,{top:e,left:r,bottom:n,right:i}){return{x:Bb(t.x,r,i),y:Bb(t.y,e,n)}}function Lb(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Jd(e.min,e.max-n,t.min):n>i&&(r=Jd(t.min,t.max-i,e.min)),fl(0,1,r)}function KM(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 gy=.35;function JM(t=gy){return t===!1?t=0:t===!0&&(t=gy),{x:$b(t,"left","right"),y:$b(t,"top","bottom")}}function $b(t,e,r){return{min:Fb(t,e),max:Fb(t,r)}}function Fb(t,e){return typeof t=="number"?t:t[e]||0}const jb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sf=()=>({x:jb(),y:jb()}),zb=()=>({min:0,max:0}),Xt=()=>({x:zb(),y:zb()});function ii(t){return[t("x"),t("y")]}function O6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function QM({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function YM(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 Iv(t){return t===void 0||t===1}function my({scale:t,scaleX:e,scaleY:r}){return!Iv(t)||!Iv(e)||!Iv(r)}function yo(t){return my(t)||D6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function D6(t){return Ub(t.x)||Ub(t.y)}function Ub(t){return t&&t!=="0%"}function Yd(t,e,r){const n=t-r,i=e*n;return r+i}function Vb(t,e,r,n,i){return i!==void 0&&(t=Yd(t,i,n)),Yd(t,r,n)+e}function wy(t,e=0,r=1,n,i){t.min=Vb(t.min,e,r,n,i),t.max=Vb(t.max,e,r,n,i)}function B6(t,{x:e,y:r}){wy(t.x,e.translate,e.scale,e.originPoint),wy(t.y,r.translate,r.scale,r.originPoint)}function XM(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let f=0;f1.0000000000001||t<.999999999999?t:1}function gs(t,e){t.min=t.min+e,t.max=t.max+e}function Hb(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=$t(t.min,t.max,s);wy(t,e[r],e[n],o,e.scale)}const ZM=["x","scaleX","originX"],eN=["y","scaleY","originY"];function $a(t,e){Hb(t.x,e,ZM),Hb(t.y,e,eN)}function L6(t,e){return O6(YM(t.getBoundingClientRect(),e))}function tN(t,e,r){const n=L6(t,r),{scroll:i}=e;return i&&(gs(n.x,i.offset.x),gs(n.y,i.offset.y)),n}const rN=new WeakMap;class nN{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=Xt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(Zh(a,"page").point)},i=(a,l)=>{var f;const{drag:c,dragPropagation:u,onDragStart:d}=this.getProps();c&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=t6(c),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ii(v=>{var g,m;let M=this.getAxisMotionValue(v).get()||0;if(vi.test(M)){const A=(m=(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout)===null||m===void 0?void 0:m.layoutBox[v];A&&(M=dn(A)*(parseFloat(M)/100))}this.originPoint[v]=M}),d==null||d(a,l),(f=this.visualElement.animationState)===null||f===void 0||f.setActive(je.Drag,!0))},s=(a,l)=>{const{dragPropagation:f,dragDirectionLock:c,onDirectionLock:u,onDrag:d}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=l;if(c&&this.currentDirection===null){this.currentDirection=iN(v),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new N6(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(je.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!gu(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=WM(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&Ba(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=HM(n.layoutBox,e):this.constraints=!1,this.elastic=JM(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ii(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=KM(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Ba(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=tN(n,i.root,this.visualElement.getTransformPagePoint());let o=qM(i.layout.layoutBox,s);if(r){const a=r(QM(o));this.hasMutatedConstraints=!!a,a&&(o=O6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=ii(c=>{if(!gu(c,r,this.currentDirection))return;let u=(l==null?void 0:l[c])||{};o&&(u={min:0,max:0});const d=i?200:1e6,v=i?40:1e7,g={type:"inertia",velocity:n?e[c]:0,bounceStiffness:d,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(c,g)});return Promise.all(f).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(zg(e,n,0,r))}stopAnimation(){ii(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ii(r=>{const{drag:n}=this.getProps();if(!gu(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-$t(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Ba(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ii(a=>{const l=this.getAxisMotionValue(a);if(l){const f=l.get();s[a]=GM({min:f,max:f},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),ii(a=>{if(!gu(a,r,null))return;const l=this.getAxisMotionValue(a),{min:f,max:c}=this.constraints[a];l.set($t(f,c,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;rN.set(this.visualElement,this);const r=this.visualElement.current,n=Ka(r,"pointerdown",f=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();Ba(f)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=Io(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:f,hasLayoutChanged:c})=>{this.isDragging&&c&&(ii(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=f[u].translate,d.set(d.get()+f[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=gy,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function gu(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function iN(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function sN(t){const{dragControls:e,visualElement:r}=t,n=Xh(()=>new nN(r));x.useEffect(()=>e&&e.subscribe(n),[n,e]),x.useEffect(()=>n.addListeners(),[n])}function oN({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=x.useRef(null),{transformPagePoint:a}=x.useContext(pg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(c,u)=>{o.current=null,r&&r(c,u)}};x.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function f(c){o.current=new N6(c,l,{transformPagePoint:a})}Hd(i,"pointerdown",s&&f),kg(()=>o.current&&o.current.end())}const aN={pan:Cs(oN),drag:Cs(sN)};function by(t){return typeof t=="string"&&t.startsWith("var(--")}const $6=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function lN(t){const e=$6.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function xy(t,e,r=1){const[n,i]=lN(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():by(i)?xy(i,e,r+1):i}function fN(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!by(s))return;const o=xy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!by(s))continue;const o=xy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const cN=new Set(["width","height","top","left","right","bottom","x","y"]),F6=t=>cN.has(t),uN=t=>Object.keys(t).some(F6),qb=t=>t===ea||t===ye;var Gb;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Gb||(Gb={}));const Kb=(t,e)=>parseFloat(t.split(", ")[e]),Jb=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return Kb(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?Kb(s[1],t):0}},dN=new Set(["x","y","z"]),hN=zd.filter(t=>!dN.has(t));function vN(t){const e=[];return hN.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 Qb={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:Jb(4,13),y:Jb(5,14)},yN=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(f=>{a[f]=Qb[f](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(f=>{const c=e.getValue(f);c&&c.jump(a[f]),t[f]=Qb[f](l,s)}),t},pN=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(F6);let s=[],o=!1;const a=[];if(i.forEach(l=>{const f=t.getValue(l);if(!t.hasValue(l))return;let c=r[l],u=Jl(c);const d=e[l];let v;if(Vd(d)){const g=d.length,m=d[0]===null?1:0;c=d[m],u=Jl(c);for(let M=m;M=0?window.pageYOffset:null,f=yN(e,t,a);return s.length&&s.forEach(([c,u])=>{t.getValue(c).set(u)}),t.render(),Jh&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:n}}else return{target:e,transitionEnd:n}};function gN(t,e,r,n){return uN(e)?pN(t,e,r,n):{target:e,transitionEnd:n}}const mN=(t,e,r,n)=>{const i=fN(t,e,n);return e=i.target,n=i.transitionEnd,gN(t,e,r,n)},Cy={current:null},j6={current:!1};function wN(){if(j6.current=!0,!!Jh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Cy.current=t.matches;t.addListener(e),e()}else Cy.current=!1}function bN(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(Zr(s))t.addValue(i,s),Gd(n)&&n.add(i);else if(Zr(o))t.addValue(i,cl(s,{owner:t})),Gd(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,cl(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const z6=Object.keys(ac),xN=z6.length,Yb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class CN{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>kr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Yh(r),this.isVariantNode=FE(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(r,{});for(const c in f){const u=f[c];o[c]!==void 0&&Zr(u)&&(u.set(o[c],!1),Gd(l)&&l.add(c))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),j6.current||wN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Cy.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),js.update(this.notifyUpdate),js.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=Sl.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&kr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let f=0;fthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:v,layoutRoot:g})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.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){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||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=cl(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,i=typeof n=="string"||typeof n=="object"?(r=Sg(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Zr(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Pg),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const U6=["initial",...Ug],AN=U6.length;class V6 extends CN{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=NI(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){II(this,n,o);const a=mN(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function EN(t){return window.getComputedStyle(t)}class SN extends V6{readValueFromInstance(e,r){if(Sl.has(r)){const n=Ng(r);return n&&n.default||0}else{const n=EN(e),i=(UE(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return L6(e,r)}build(e,r,n,i){wg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return Eg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zr(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){GE(e,r,n,i)}}class kN extends V6{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Sl.has(r)?((n=Ng(r))===null||n===void 0?void 0:n.default)||0:(r=KE.has(r)?r:Ag(r),e.getAttribute(r))}measureInstanceViewportBox(){return Xt()}scrapeMotionValuesFromProps(e,r){return QE(e,r)}build(e,r,n,i){xg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){JE(e,r,n,i)}mount(e){this.isSVGTag=Cg(e.tagName),super.mount(e)}}const _N=(t,e)=>mg(t)?new kN(e,{enableHardwareAcceleration:!1}):new SN(e,{enableHardwareAcceleration:!0});function Xb(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ql={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=Xb(t,e.target.x),n=Xb(t,e.target.y);return`${r}% ${n}%`}},Zb="_$css",TN={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace($6,v=>(s.push(v),Zb)));const o=zs.parse(t);if(o.length>5)return n;const a=zs.createTransformer(t),l=typeof o[0]!="number"?1:0,f=r.x.scale*e.x,c=r.y.scale*e.y;o[0+l]/=f,o[1+l]/=c;const u=$t(f,c,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(i){let v=0;d=d.replace(Zb,()=>{const g=s[v];return v++,g})}return d}};class PN extends Wt.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;wP(MN),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||kr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&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:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function IN(t){const[e,r]=i6(),n=x.useContext(gg);return Wt.createElement(PN,{...t,layoutGroup:n,switchLayoutGroup:x.useContext(jE),isPresent:e,safeToRemove:r})}const MN={borderRadius:{...Ql,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ql,borderTopRightRadius:Ql,borderBottomLeftRadius:Ql,borderBottomRightRadius:Ql,boxShadow:TN},NN={measureLayout:IN};function RN(t,e,r={}){const n=Zr(t)?t:cl(t);return n.start(zg("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const W6=["TopLeft","TopRight","BottomLeft","BottomRight"],ON=W6.length,e2=t=>typeof t=="string"?parseFloat(t):t,t2=t=>typeof t=="number"||ye.test(t);function DN(t,e,r,n,i,s){i?(t.opacity=$t(0,r.opacity!==void 0?r.opacity:1,BN(n)),t.opacityExit=$t(e.opacity!==void 0?e.opacity:1,0,LN(n))):s&&(t.opacity=$t(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Jd(t,e,n))}function n2(t,e){t.min=e.min,t.max=e.max}function Rn(t,e){n2(t.x,e.x),n2(t.y,e.y)}function i2(t,e,r,n,i){return t-=e,t=Yd(t,1/r,n),i!==void 0&&(t=Yd(t,1/i,n)),t}function $N(t,e=0,r=1,n=.5,i,s=t,o=t){if(vi.test(e)&&(e=parseFloat(e),e=$t(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=$t(s.min,s.max,n);t===s&&(a-=e),t.min=i2(t.min,e,r,a,i),t.max=i2(t.max,e,r,a,i)}function s2(t,e,[r,n,i],s,o){$N(t,e[r],e[n],e[i],e.scale,s,o)}const FN=["x","scaleX","originX"],jN=["y","scaleY","originY"];function o2(t,e,r,n){s2(t.x,e,FN,r==null?void 0:r.x,n==null?void 0:n.x),s2(t.y,e,jN,r==null?void 0:r.y,n==null?void 0:n.y)}function a2(t){return t.translate===0&&t.scale===1}function q6(t){return a2(t.x)&&a2(t.y)}function G6(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 l2(t){return dn(t.x)/dn(t.y)}class zN{constructor(){this.members=[]}add(e){_g(this.members,e),e.scheduleRender()}remove(e){if(Tg(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(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function f2(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:f,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotateX(${f}deg) `),c&&(n+=`rotateY(${c}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 UN=(t,e)=>t.depth-e.depth;class VN{constructor(){this.children=[],this.isDirty=!1}add(e){_g(this.children,e),this.isDirty=!0}remove(e){Tg(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(UN),this.isDirty=!1,this.children.forEach(e)}}const c2=["","X","Y","Z"],u2=1e3;let WN=0;function K6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=WN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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=()=>{this.nodes.forEach(GN),this.nodes.forEach(QN),this.nodes.forEach(YN)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=P6(v,250),bf.hasAnimatedSinceResize&&(bf.hasAnimatedSinceResize=!1,this.nodes.forEach(h2))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&u&&(f||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:v,hasRelativeTargetChanged:g,layout:m})=>{var M,A,E,S,P;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(A=(M=this.options.transition)!==null&&M!==void 0?M:u.getDefaultTransition())!==null&&A!==void 0?A:rR,{onLayoutAnimationStart:L,onLayoutAnimationComplete:F}=u.getProps(),z=!this.targetLayout||!G6(this.targetLayout,m)||g,H=!v&&g;if(this.options.layoutRoot||!((E=this.resumeFrom)===null||E===void 0)&&E.instance||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,H);const q={...I6(R,"layout"),onPlay:L,onComplete:F};(u.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else!v&&this.animationProgress===0&&h2(this),this.isLead()&&((P=(S=this.options).onExitComplete)===null||P===void 0||P.call(S));this.targetLayout=m})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,js.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(XN),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,f;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var S;const P=E/1e3;v2(v.x,o.x,P),v2(v.y,o.y,P),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((S=this.relativeParent)===null||S===void 0)&&S.layout)&&(Ef(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),eR(this.relativeTarget,this.relativeTargetOrigin,g,P)),m&&(this.animationValues=d,DN(d,u,this.latestValues,P,A,M)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(js.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kr.update(()=>{bf.hasAnimatedSinceResize=!0,this.currentAnimation=RN(0,u2,{...o,onUpdate:f=>{var c;this.mixTargetDelta(f),(c=o.onUpdate)===null||c===void 0||c.call(o,f)},onComplete:()=>{var f;(f=o.onComplete)===null||f===void 0||f.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,u2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&J6(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Xt();const u=dn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=dn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Rn(a,l),$a(a,c),Af(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){var l,f,c;this.sharedNodes.has(o)||this.sharedNodes.set(o,new zN),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(c=(f=a.options.initialPromotionConfig)===null||f===void 0?void 0:f.shouldPreserveFollowOpacity)===null||c===void 0?void 0:c.call(f,a)})}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:l}={}){const f=this.getStack();f&&f.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(d2),this.root.sharedNodes.clear()}}}function HN(t){t.updateLayout()}function qN(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?ii(v=>{const g=l?i.measuredBox[v]:i.layoutBox[v],m=dn(g);g.min=s[v].min,g.max=g.min+m}):J6(a,i.layoutBox,s)&&ii(v=>{const g=l?i.measuredBox[v]:i.layoutBox[v],m=dn(s[v]);g.max=g.min+m});const f=Sf();Af(f,s,i.layoutBox);const c=Sf();l?Af(c,t.applyTransform(o,!0),i.measuredBox):Af(c,s,i.layoutBox);const u=!q6(f);let d=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:g,layout:m}=v;if(g&&m){const M=Xt();Ef(M,i.layoutBox,g.layoutBox);const A=Xt();Ef(A,s,m.layoutBox),G6(M,A)||(d=!0),v.options.layoutRoot&&(t.relativeTarget=A,t.relativeTargetOrigin=M,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:f,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function GN(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function KN(t){t.clearSnapshot()}function d2(t){t.clearMeasurements()}function JN(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function h2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function QN(t){t.resolveTargetDelta()}function YN(t){t.calcProjection()}function XN(t){t.resetRotation()}function ZN(t){t.removeLeadSnapshot()}function v2(t,e,r){t.translate=$t(e.translate,0,r),t.scale=$t(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function y2(t,e,r,n){t.min=$t(e.min,r.min,n),t.max=$t(e.max,r.max,n)}function eR(t,e,r,n){y2(t.x,e.x,r.x,n),y2(t.y,e.y,r.y,n)}function tR(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const rR={duration:.45,ease:[.4,0,.1,1]};function nR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(Boolean(t.path[s].instance)){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function p2(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function iR(t){p2(t.x),p2(t.y)}function J6(t,e,r){return t==="position"||t==="preserve-aspect"&&!py(l2(e),l2(r),.2)}const sR=K6({attachResizeListener:(t,e)=>Io(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Mv={current:void 0},oR=K6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Mv.current){const t=new sR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Mv.current=t}return Mv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),aR={...FM,...iI,...aN,...NN},Ju=gP((t,e)=>HP(t,e,aR,_N,oR));function Q6(){const t=x.useRef(!1);return Fd(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function lR(){const t=Q6(),[e,r]=x.useState(0),n=x.useCallback(()=>{t.current&&r(e+1)},[e]);return[x.useCallback(()=>kr.postRender(n),[n]),e]}class fR 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 cR({children:t,isPresent:e}){const r=x.useId(),n=x.useRef(null),i=x.useRef({width:0,height:0,top:0,left:0});return x.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` - [data-motion-pop-id="${r}"] { - position: absolute !important; - width: ${s}px !important; - height: ${o}px !important; - top: ${a}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(f)}},[e]),x.createElement(fR,{isPresent:e,childRef:n,sizeRef:i},x.cloneElement(t,{ref:n}))}const Nv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Xh(uR),l=x.useId(),f=x.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:c=>{a.set(c,!0);for(const u of a.values())if(!u)return;n&&n()},register:c=>(a.set(c,!1),()=>a.delete(c))}),s?void 0:[r]);return x.useMemo(()=>{a.forEach((c,u)=>a.set(u,!1))},[r]),x.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=x.createElement(cR,{isPresent:r},t)),x.createElement(Nc.Provider,{value:f},t)};function uR(){return new Map}const ba=t=>t.key||"";function dR(t,e){t.forEach(r=>{const n=ba(r);e.set(n,r)})}function hR(t){const e=[];return x.Children.forEach(t,r=>{x.isValidElement(r)&&e.push(r)}),e}const vR=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=lR();const l=x.useContext(gg).forceRender;l&&(a=l);const f=Q6(),c=hR(t);let u=c;const d=new Set,v=x.useRef(u),g=x.useRef(new Map).current,m=x.useRef(!0);if(Fd(()=>{m.current=!1,dR(c,g),v.current=u}),kg(()=>{m.current=!0,g.clear(),d.clear()}),m.current)return x.createElement(x.Fragment,null,u.map(S=>x.createElement(Nv,{key:ba(S),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},S)));u=[...u];const M=v.current.map(ba),A=c.map(ba),E=M.length;for(let S=0;S{if(A.indexOf(S)!==-1)return;const P=g.get(S);if(!P)return;const R=M.indexOf(S),L=()=>{g.delete(S),d.delete(S);const F=v.current.findIndex(z=>z.key===S);if(v.current.splice(F,1),!d.size){if(v.current=c,f.current===!1)return;a(),n&&n()}};u.splice(R,0,x.createElement(Nv,{key:ba(P),isPresent:!1,onExitComplete:L,custom:e,presenceAffectsLayout:s,mode:o},P))}),u=u.map(S=>{const P=S.key;return d.has(P)?S:x.createElement(Nv,{key:ba(S),isPresent:!0,presenceAffectsLayout:s,mode:o},S)}),x.createElement(x.Fragment,null,d.size?u:u.map(S=>x.cloneElement(S)))},yR={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"}};function pR(t,e){if(typeof t!="object"||t===null)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 gR(t){var e=pR(t,"string");return typeof e=="symbol"?e:String(e)}function mR(t,e,r){return e=gR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Rv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var f=[],c={},u=Rv({},l),d=!1;for(var v of o){var g=l[v];if(g!=null){var m=i[v];d=!0;for(var M of m.mappings)c[M]=g,u[M]==null&&delete u[M]}}var A=d?Rv(Rv({},c),u):l,E=function(){var L=A[S],F=i[S];try{if(F.mappings)return"continue";if(typeof L=="string"||typeof L=="number")f.push(F.values[L].defaultClass);else if(Array.isArray(L))for(var z=0;zt,xR=function(){return wR(bR)(...arguments)},Y6=xR({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"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{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"}}},paddingTop:{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"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{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:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},borderNormal:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderFocus:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},buttonGlass:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonEmphasis:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonInverse:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text50:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text80:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},textInverse100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},arbitrumDark:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumLight:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},avalanceDark:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceLight:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},bscDark:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscLight:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},ethereumDark:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumLight:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},gnosisDark:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisLight:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},polygonDark:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonLight:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"},white:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},inherit:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},transparent:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},positive:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},negative:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},info:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},warning:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},gradientBackdrop:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientPrimary:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientSecondary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},backgroundPrimary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundSecondary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundContrast:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundMuted:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundControl:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundInverse:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundBackdrop:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundOverlay:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},borderNormal:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},borderFocus:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},buttonGlass:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},buttonEmphasis:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonInverse:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text50:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text100:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},arbitrumDark:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},arbitrumLight:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},avalanceDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},avalanceLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},bscDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},bscLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},ethereumDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},ethereumLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},gnosisDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},gnosisLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},polygonDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},polygonLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},dashed:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"},dotted:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},white:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"},inherit:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},transparent:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},positive:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},negative:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},info:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},warning:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},gradientBackdrop:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},gradientPrimary:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientSecondary:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},backgroundPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},backgroundSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundContrast:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundMuted:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundControl:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundInverse:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundBackdrop:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundOverlay:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},borderNormal:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},borderFocus:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},buttonGlass:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},buttonEmphasis:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},buttonInverse:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},text50:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text80:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text100:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},textInverse100:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},arbitrumDark:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},arbitrumLight:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},avalanceDark:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},avalanceLight:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},bscDark:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},bscLight:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},ethereumDark:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},ethereumLight:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},gnosisDark:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},gnosisLight:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},polygonDark:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},polygonLight:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},dashed:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},dotted:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},white:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},inherit:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"},transparent:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},positive:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},negative:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},info:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},warning:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},gradientBackdrop:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},gradientPrimary:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},gradientSecondary:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},backgroundPrimary:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},backgroundSecondary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},backgroundContrast:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundMuted:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundControl:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundInverse:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundBackdrop:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundOverlay:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},borderNormal:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},borderFocus:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},buttonGlass:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},buttonEmphasis:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},buttonInverse:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},text50:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},text80:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},textInverse100:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},arbitrumDark:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},arbitrumLight:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},avalanceDark:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},avalanceLight:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},bscDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},bscLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},ethereumDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},ethereumLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},gnosisDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},gnosisLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},polygonDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},polygonLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},dashed:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},dotted:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"},white:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},inherit:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},transparent:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"},positive:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},negative:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},info:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},warning:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},gradientBackdrop:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},gradientPrimary:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},gradientSecondary:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},backgroundPrimary:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},backgroundSecondary:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},backgroundContrast:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},backgroundMuted:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundControl:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundInverse:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundBackdrop:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundOverlay:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},borderNormal:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},borderFocus:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},buttonGlass:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},buttonEmphasis:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},buttonInverse:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},text50:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},text80:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},text100:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},textInverse100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},arbitrumDark:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},arbitrumLight:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},avalanceDark:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},avalanceLight:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},bscDark:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},bscLight:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},ethereumDark:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},ethereumLight:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},gnosisDark:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},gnosisLight:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},polygonDark:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},polygonLight:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},dashed:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},dotted:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"}}},color:{values:{black:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},white:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"},inherit:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},transparent:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},positive:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"},negative:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},info:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},warning:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},gradientBackdrop:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},gradientPrimary:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},gradientSecondary:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},backgroundPrimary:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},backgroundSecondary:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},backgroundContrast:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},backgroundMuted:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},backgroundControl:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundInverse:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundBackdrop:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundOverlay:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},borderNormal:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},borderFocus:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},buttonGlass:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},buttonEmphasis:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},buttonInverse:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},text50:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},text80:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},text100:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},textInverse100:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},arbitrumDark:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},arbitrumLight:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},avalanceDark:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},avalanceLight:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},bscDark:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},bscLight:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},ethereumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},ethereumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},gnosisDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},gnosisLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},polygonDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},polygonLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"}}},cursor:{values:{default:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},pointer:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},text:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"}}},opacity:{values:{0:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},50:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},80:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"},100:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},auto:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},outline:{values:{none:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"}}}}});const CR=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Ay=t=>(t.display||(t.display=Object.keys(t).some(e=>CR.includes(e))?"flex":void 0),Y6(t));Ay.properties=Y6.properties;function X6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const f in s)Ay.properties.has(f)?o[f]=s[f]:a[f]=s[f];const l=Ay({...o,...n});return x.createElement(r,{className:Vr(l,i),...a,ref:e})});var Z6={exports:{}},Yl={};/** - * @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 m2;function AR(){if(m2)return Yl;m2=1;var t=Wt,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,f){var c,u={},d=null,v=null;f!==void 0&&(d=""+f),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(v=l.ref);for(c in l)n.call(l,c)&&!s.hasOwnProperty(c)&&(u[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)u[c]===void 0&&(u[c]=l[c]);return{$$typeof:e,type:a,key:d,ref:v,props:u,_owner:i.current}}return Yl.Fragment=r,Yl.jsx=o,Yl.jsxs=o,Yl}Z6.exports=AR();var W=Z6.exports,eS={},tS={exports:{}},Ov,w2;function ER(){if(w2)return Ov;w2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ov=t,Ov}var Dv,b2;function SR(){if(b2)return Dv;b2=1;var t=ER();function e(){}function r(){}return r.resetWarningCache=e,Dv=function(){function n(o,a,l,f,c,u){if(u!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},Dv}tS.exports=SR()();var kR=tS.exports;Object.defineProperty(eS,"__esModule",{value:!0});var x2=Object.assign||function(t){for(var e=1;e>19^S^S>>8,(i[3]>>>0)/(1<<31>>>0)}function a(){var S=Math.floor(o()*360),P=o()*60+40+"%",R=(o()+o()+o()+o())*25+"%",L="hsl("+S+","+P+","+R+")";return L}function l(S){for(var P=S,R=S,L=Math.ceil(P/2),F=P-L,z=[],H=0;H{const{className:e,address:r,size:n="md",...i}=t;return W.jsx(pe,{as:RR,className:Vr(DR,OR,e),display:"inline-block",seed:r.toUpperCase(),size:8,scale:BR[n],...i})});function LR(t,e){if(typeof t!="object"||t===null)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 $R(t){var e=LR(t,"string");return typeof e=="symbol"?e:String(e)}function FR(t,e,r){return e=$R(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function A2(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},Ot=t=>{var e=r=>{var n=t.defaultClassName,i=A2(A2({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var f=t.variantClassNames[s][l];f&&(n+=" "+f)}}for(var[c,u]of t.compoundVariants)jR(c,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e};Ot({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const E2=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return W.jsx(pe,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var zR=Ot({defaultClassName:"",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibi"},underline:{true:"_1qxj1ibj"},uppercase:{true:"_1qxj1ibk"},capitalize:{true:"_1qxj1ibl"},hidden:{true:"_1qxj1ibm"}},defaultVariants:{},compoundVariants:[]});const rr=x.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:f,uppercase:c,capitalize:u,...d}=t,v=yR[n];return W.jsx(pe,{as:r,className:Vr(i,zR({hidden:s,ellipsis:f,italic:o,underline:a,uppercase:c,capitalize:u})),ref:e,...v,...d,children:l})});var UR=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8ne",feature:"_140wn8nf fyvr11ph fyvr12nb",primary:"fyvr11pb fyvr12nb",glass:"fyvr11rb fyvr12rh",emphasis:"fyvr11rh fyvr12rh",text:"_140wn8nj fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12r5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12tt fyvr12uh",false:"fyvr12tz fyvr12ut fyvr12ur"},size:{xs:"_140wn8no fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8np fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nq fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nr fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8ns"},hasLeftIcon:{true:"_140wn8nt"},hasRightIcon:{true:"_140wn8nu"},activeOutline:{light:"_140wn8nv",bold:"_140wn8nw"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8nx"],[{iconOnly:!0,size:"sm"},"_140wn8ny"],[{iconOnly:!0,size:"md"},"_140wn8nz"],[{iconOnly:!0,size:"lg"},"_140wn8n10"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n11"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n12"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n13"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n14"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n15"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n16"]]});const wt=x.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:f,leftIcon:c,rightIcon:u,size:d="md",variant:v="glass",width:g="fit",shape:m="circle",type:M="button",...A}=t,E=c!==void 0&&f!==void 0,S=u!==void 0&&f!==void 0,P=c!==void 0&&f===void 0,R=d==="xs"?"xs":"sm";return W.jsx(pe,{as:r,className:Vr(i,UR({activeOutline:n,disabled:s||l,hasLeftIcon:E,hasRightIcon:S,iconOnly:P,size:v==="text"?void 0:d,shape:v==="text"?void 0:m,variant:v})),disabled:s||l,display:o,fontWeight:a,ref:e,type:M,width:g,...A,children:P?W.jsx(c,{size:R}):W.jsxs(pe,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[W.jsxs(pe,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[c&&W.jsx(c,{size:R}),W.jsx(rr,{children:f})]}),u&&W.jsx(u,{size:R})]})})});var VR=Ot({defaultClassName:"",variantClassNames:{clickable:{true:"fyvr12ur fyvr12tz"},disabled:{true:"rhmai64"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mn fyvr12fh fyvr1215 fyvr128b"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const WR=x.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...f}=t;return W.jsx(pe,{className:Vr(r,VR({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...f,children:n})});function le(){return le=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>HR(r,e))}function Rt(...t){return x.useCallback(iS(...t),t)}function Ir(t,e=[]){let r=[];function n(s,o){const a=x.createContext(o),l=r.length;r=[...r,o];function f(u){const{scope:d,children:v,...g}=u,m=(d==null?void 0:d[t][l])||a,M=x.useMemo(()=>g,Object.values(g));return x.createElement(m.Provider,{value:M},v)}function c(u,d){const v=(d==null?void 0:d[t][l])||a,g=x.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,c]}const i=()=>{const s=r.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,qR(i,...e)]}function qR(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:f})=>{const u=l(s)[`__scope${f}`];return{...a,...u}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function we(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Tn(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function ul({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=GR({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Tn(r),l=x.useCallback(f=>{if(s){const u=typeof f=="function"?f(t):f;u!==t&&a(u)}else i(f)},[s,t,i,a]);return[o,l]}function GR({defaultProp:t,onChange:e}){const r=x.useState(t),[n]=r,i=x.useRef(n),s=Tn(e);return x.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function Wg(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])}const hn=Boolean(globalThis==null?void 0:globalThis.document)?x.useLayoutEffect:()=>{};function Hg(t){const[e,r]=x.useState(void 0);return hn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;o=f.inlineSize,a=f.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 KR(t,e){return x.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Bc=t=>{const{present:e,children:r}=t,n=JR(e),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),s=Rt(n.ref,i.ref);return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:s}):null};Bc.displayName="Presence";function JR(t){const[e,r]=x.useState(),n=x.useRef({}),i=x.useRef(t),s=x.useRef("none"),o=t?"mounted":"unmounted",[a,l]=KR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=mu(n.current);s.current=a==="mounted"?f:"none"},[a]),hn(()=>{const f=n.current,c=i.current;if(c!==t){const d=s.current,v=mu(f);t?l("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(c&&d!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),hn(()=>{if(e){const f=u=>{const v=mu(n.current).includes(u.animationName);u.target===e&&v&&wi.flushSync(()=>l("ANIMATION_END"))},c=u=>{u.target===e&&(s.current=mu(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(f=>{f&&(n.current=getComputedStyle(f)),r(f)},[])}}function mu(t){return(t==null?void 0:t.animationName)||"none"}const cc=x.forwardRef((t,e)=>{const{children:r,...n}=t,i=x.Children.toArray(r),s=i.find(YR);if(s){const o=s.props.children,a=i.map(l=>l===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return x.createElement(Ey,le({},n,{ref:e}),x.isValidElement(o)?x.cloneElement(o,void 0,a):null)}return x.createElement(Ey,le({},n,{ref:e}),r)});cc.displayName="Slot";const Ey=x.forwardRef((t,e)=>{const{children:r,...n}=t;return x.isValidElement(r)?x.cloneElement(r,{...XR(n,r.props),ref:e?iS(e,r.ref):r.ref}):x.Children.count(r)>1?x.Children.only(null):null});Ey.displayName="SlotClone";const QR=({children:t})=>x.createElement(x.Fragment,null,t);function YR(t){return x.isValidElement(t)&&t.type===QR}function XR(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const ZR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Be=ZR.reduce((t,e)=>{const r=x.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?cc:e;return x.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),x.createElement(a,le({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function qg(t,e){t&&wi.flushSync(()=>t.dispatchEvent(e))}const sS="Checkbox",[e7,gG]=Ir(sS),[t7,r7]=e7(sS),n7=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:f,...c}=t,[u,d]=x.useState(null),v=Rt(e,S=>d(S)),g=x.useRef(!1),m=u?Boolean(u.closest("form")):!0,[M=!1,A]=ul({prop:i,defaultProp:s,onChange:f}),E=x.useRef(M);return x.useEffect(()=>{const S=u==null?void 0:u.form;if(S){const P=()=>A(E.current);return S.addEventListener("reset",P),()=>S.removeEventListener("reset",P)}},[u,A]),x.createElement(t7,{scope:r,state:M,disabled:a},x.createElement(Be.button,le({type:"button",role:"checkbox","aria-checked":Mo(M)?"mixed":M,"aria-required":o,"data-state":oS(M),"data-disabled":a?"":void 0,disabled:a,value:l},c,{ref:v,onKeyDown:we(t.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:we(t.onClick,S=>{A(P=>Mo(P)?!0:!P),m&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})),m&&x.createElement(o7,{control:u,bubbles:!g.current,name:n,value:l,checked:M,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),i7="CheckboxIndicator",s7=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=r7(i7,r);return x.createElement(Bc,{present:n||Mo(s.state)||s.state===!0},x.createElement(Be.span,le({"data-state":oS(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),o7=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=x.useRef(null),o=Wg(r),a=Hg(e);return x.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=Mo(r),u.call(l,Mo(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),x.createElement("input",le({type:"checkbox","aria-hidden":!0,defaultChecked:Mo(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Mo(t){return t==="indeterminate"}function oS(t){return Mo(t)?"indeterminate":t?"checked":"unchecked"}const a7=n7,l7=s7;var f7=Ot({defaultClassName:"",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r5 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const kl=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?W.jsxs(pe,{flexDirection:"column",gap:"0.5",children:[r&&W.jsx(rr,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&W.jsx(rr,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return W.jsxs(pe,{as:"label",className:f7({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var _l=Ot({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const c7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{d:"m4.304 10.232 4.263 4.79 7.13-11.238",stroke:"currentColor",strokeWidth:1.5})}),aS=({size:t="sm",...e})=>W.jsx(pe,{as:c7,className:_l({size:t}),...e}),u7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),lS=({size:t="sm",...e})=>W.jsx(pe,{as:u7,className:_l({size:t}),...e}),d7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),fS=({size:t="sm",...e})=>W.jsx(pe,{as:d7,className:_l({size:t}),...e}),h7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),v7=({size:t="sm",...e})=>W.jsx(pe,{as:h7,className:_l({size:t}),...e}),y7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),p7=({size:t="sm",...e})=>W.jsx(pe,{as:y7,className:_l({size:t}),...e}),g7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",fill:"currentColor"})}),m7=({size:t="sm",...e})=>W.jsx(pe,{as:g7,className:_l({size:t}),...e});var w7=Ot({defaultClassName:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11h0 fyvr11ko fyvr11jg fyvr12ut fyvr12ur fyvr12uj fyvr12tz fyvr12tv",variantClassNames:{size:{sm:"_1c9x66f1",lg:"_1c9x66f2"}},defaultVariants:{},compoundVariants:[]}),b7=Ot({defaultClassName:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rh fyvr11rt",variantClassNames:{size:{sm:"_1c9x66f4",lg:"_1c9x66f5"}},defaultVariants:{},compoundVariants:[]});const x7=({size:t="sm"})=>W.jsx(l7,{className:b7({size:t}),children:W.jsx(aS,{size:t})});x.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return W.jsx(kl,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:W.jsx(a7,{className:w7({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:W.jsx(x7,{})})})});Wt.createContext(null);const C7=q4["useId".toString()]||(()=>{});let A7=0;function Lc(t){const[e,r]=x.useState(C7());return hn(()=>{t||r(n=>n??String(A7++))},[t]),t||(e?`radix-${e}`:"")}const cS="Collapsible",[E7,mG]=Ir(cS),[S7,Gg]=E7(cS),k7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,f]=ul({prop:n,defaultProp:i,onChange:o});return x.createElement(S7,{scope:r,disabled:s,contentId:Lc(),open:l,onOpenToggle:x.useCallback(()=>f(c=>!c),[f])},x.createElement(Be.div,le({"data-state":Kg(l),"data-disabled":s?"":void 0},a,{ref:e})))}),_7="CollapsibleTrigger",T7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Gg(_7,r);return x.createElement(Be.button,le({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Kg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:we(t.onClick,i.onOpenToggle)}))}),uS="CollapsibleContent",P7=x.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Gg(uS,t.__scopeCollapsible);return x.createElement(Bc,{present:r||i.open},({present:s})=>x.createElement(I7,le({},n,{ref:e,present:s})))}),I7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Gg(uS,r),[a,l]=x.useState(n),f=x.useRef(null),c=Rt(e,f),u=x.useRef(0),d=u.current,v=x.useRef(0),g=v.current,m=o.open||a,M=x.useRef(m),A=x.useRef();return x.useEffect(()=>{const E=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(E)},[]),hn(()=>{const E=f.current;if(E){A.current=A.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const S=E.getBoundingClientRect();u.current=S.height,v.current=S.width,M.current||(E.style.transitionDuration=A.current.transitionDuration,E.style.animationName=A.current.animationName),l(n)}},[o.open,n]),x.createElement(Be.div,le({"data-state":Kg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m},s,{ref:c,style:{["--radix-collapsible-content-height"]:d?`${d}px`:void 0,["--radix-collapsible-content-width"]:g?`${g}px`:void 0,...t.style}}),m&&i)});function Kg(t){return t?"open":"closed"}const M7=k7,N7=T7,R7=P7;var S2="64px",O7="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",D7="_4j62fl5",B7="_4j62fl0",L7="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12tz fyvr11n2";const $7=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=x.useState(n),f=c=>{l(c),i==null||i(c)};return W.jsx(M7,{defaultOpen:n,onOpenChange:f,asChild:!0,children:W.jsxs(pe,{as:Ju.div,className:Vr(e,B7),initial:{height:n?"auto":S2},animate:{height:a?"auto":S2},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[W.jsxs(N7,{className:L7,children:[W.jsx(rr,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),W.jsx(pe,{as:Ju.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:W.jsx(lS,{className:D7,color:"text50"})})]}),W.jsx(vR,{children:a&&W.jsx(R7,{className:O7,asChild:!0,forceMount:!0,children:W.jsx(Ju.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function n1(t){const e=t+"CollectionProvider",[r,n]=Ir(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:g,children:m}=v,M=Wt.useRef(null),A=Wt.useRef(new Map).current;return Wt.createElement(i,{scope:g,itemMap:A,collectionRef:M},m)},a=t+"CollectionSlot",l=Wt.forwardRef((v,g)=>{const{scope:m,children:M}=v,A=s(a,m),E=Rt(g,A.collectionRef);return Wt.createElement(cc,{ref:E},M)}),f=t+"CollectionItemSlot",c="data-radix-collection-item",u=Wt.forwardRef((v,g)=>{const{scope:m,children:M,...A}=v,E=Wt.useRef(null),S=Rt(g,E),P=s(f,m);return Wt.useEffect(()=>(P.itemMap.set(E,{ref:E,...A}),()=>void P.itemMap.delete(E))),Wt.createElement(cc,{[c]:"",ref:S},M)});function d(v){const g=s(t+"CollectionConsumer",v);return Wt.useCallback(()=>{const M=g.collectionRef.current;if(!M)return[];const A=Array.from(M.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((P,R)=>A.indexOf(P.ref.current)-A.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const F7=x.createContext(void 0);function Jg(t){const e=x.useContext(F7);return t||e||"ltr"}function j7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Sy="dismissableLayer.update",z7="dismissableLayer.pointerDownOutside",U7="dismissableLayer.focusOutside";let k2;const V7=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dS=x.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...f}=t,c=x.useContext(V7),[u,d]=x.useState(null),v=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=x.useState({}),m=Rt(e,z=>d(z)),M=Array.from(c.layers),[A]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),E=M.indexOf(A),S=u?M.indexOf(u):-1,P=c.layersWithOutsidePointerEventsDisabled.size>0,R=S>=E,L=W7(z=>{const H=z.target,q=[...c.branches].some(K=>K.contains(H));!R||q||(s==null||s(z),a==null||a(z),z.defaultPrevented||l==null||l())},v),F=H7(z=>{const H=z.target;[...c.branches].some(K=>K.contains(H))||(o==null||o(z),a==null||a(z),z.defaultPrevented||l==null||l())},v);return j7(z=>{S===c.layers.size-1&&(i==null||i(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(k2=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),_2(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=k2)}},[u,v,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),_2())},[u,c]),x.useEffect(()=>{const z=()=>g({});return document.addEventListener(Sy,z),()=>document.removeEventListener(Sy,z)},[]),x.createElement(Be.div,le({},f,{ref:m,style:{pointerEvents:P?R?"auto":"none":void 0,...t.style},onFocusCapture:we(t.onFocusCapture,F.onFocusCapture),onBlurCapture:we(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:we(t.onPointerDownCapture,L.onPointerDownCapture)}))});function W7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){hS(z7,r,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function H7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t),n=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!n.current&&hS(U7,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function _2(){const t=new CustomEvent(Sy);document.dispatchEvent(t)}function hS(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?qg(i,s):i.dispatchEvent(s)}const q7=dS;let Bv=0;function G7(){x.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:T2()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:T2()),Bv++,()=>{Bv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Bv--}},[])}function T2(){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}const Lv="focusScope.autoFocusOnMount",$v="focusScope.autoFocusOnUnmount",P2={bubbles:!1,cancelable:!0},K7=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=x.useState(null),f=Tn(i),c=Tn(s),u=x.useRef(null),d=Rt(e,m=>l(m)),v=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let m=function(S){if(v.paused||!a)return;const P=S.target;a.contains(P)?u.current=P:vs(u.current,{select:!0})},M=function(S){if(v.paused||!a)return;const P=S.relatedTarget;P!==null&&(a.contains(P)||vs(u.current,{select:!0}))},A=function(S){const P=document.activeElement;for(const R of S)R.removedNodes.length>0&&(a!=null&&a.contains(P)||vs(a))};document.addEventListener("focusin",m),document.addEventListener("focusout",M);const E=new MutationObserver(A);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",M),E.disconnect()}}},[n,a,v.paused]),x.useEffect(()=>{if(a){M2.add(v);const m=document.activeElement;if(!a.contains(m)){const A=new CustomEvent(Lv,P2);a.addEventListener(Lv,f),a.dispatchEvent(A),A.defaultPrevented||(J7(e9(vS(a)),{select:!0}),document.activeElement===m&&vs(a))}return()=>{a.removeEventListener(Lv,f),setTimeout(()=>{const A=new CustomEvent($v,P2);a.addEventListener($v,c),a.dispatchEvent(A),A.defaultPrevented||vs(m??document.body,{select:!0}),a.removeEventListener($v,c),M2.remove(v)},0)}}},[a,f,c,v]);const g=x.useCallback(m=>{if(!r&&!n||v.paused)return;const M=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,A=document.activeElement;if(M&&A){const E=m.currentTarget,[S,P]=Q7(E);S&&P?!m.shiftKey&&A===P?(m.preventDefault(),r&&vs(S,{select:!0})):m.shiftKey&&A===S&&(m.preventDefault(),r&&vs(P,{select:!0})):A===E&&m.preventDefault()}},[r,n,v.paused]);return x.createElement(Be.div,le({tabIndex:-1},o,{ref:d,onKeyDown:g}))});function J7(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(vs(n,{select:e}),document.activeElement!==r)return}function Q7(t){const e=vS(t),r=I2(e,t),n=I2(e.reverse(),t);return[r,n]}function vS(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function I2(t,e){for(const r of t)if(!Y7(r,{upTo:e}))return r}function Y7(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 X7(t){return t instanceof HTMLInputElement&&"select"in t}function vs(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&X7(t)&&e&&t.select()}}const M2=Z7();function Z7(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=N2(t,e),t.unshift(e)},remove(e){var r;t=N2(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function N2(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function e9(t){return t.filter(e=>e.tagName!=="A")}function Tl(t){return t.split("-")[1]}function Qg(t){return t==="y"?"height":"width"}function zi(t){return t.split("-")[0]}function ta(t){return["top","bottom"].includes(zi(t))?"x":"y"}function R2(t,e,r){let{reference:n,floating:i}=t;const s=n.x+n.width/2-i.width/2,o=n.y+n.height/2-i.height/2,a=ta(e),l=Qg(a),f=n[l]/2-i[l]/2,c=a==="x";let u;switch(zi(e)){case"top":u={x:s,y:n.y-i.height};break;case"bottom":u={x:s,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-i.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Tl(e)){case"start":u[a]-=f*(r&&c?-1:1);break;case"end":u[a]+=f*(r&&c?-1:1)}return u}const t9=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=R2(f,n,l),d=n,v={},g=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:i,y:s,placement:o,rects:a,platform:l,elements:f}=e;if(r==null)return{};const c=yS(n),u={x:i,y:s},d=ta(o),v=Qg(d),g=await l.getDimensions(r),m=d==="y",M=m?"top":"left",A=m?"bottom":"right",E=m?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[d]-u[d]-a.floating[v],P=u[d]-a.reference[d],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let L=R?R[E]:0;L&&await(l.isElement==null?void 0:l.isElement(R))||(L=f.floating[E]||a.floating[v]);const F=S/2-P/2,z=c[M],H=L-g[v]-c[A],q=L/2-g[v]/2+F,K=_y(z,q,H),ne=Tl(o)!=null&&q!=K&&a.reference[v]/2-(qt.concat(e,e+"-start",e+"-end"),[]);const r9={left:"right",right:"left",bottom:"top",top:"bottom"};function Zd(t){return t.replace(/left|right|bottom|top/g,e=>r9[e])}function n9(t,e,r){r===void 0&&(r=!1);const n=Tl(t),i=ta(t),s=Qg(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Zd(o)),{main:o,cross:Zd(o)}}const i9={start:"end",end:"start"};function Fv(t){return t.replace(/start|end/g,e=>i9[e])}const s9=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:i,rects:s,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=t,M=zi(n),A=zi(o)===o,E=await(a.isRTL==null?void 0:a.isRTL(l.floating)),S=u||(A||!g?[Zd(o)]:function(K){const ne=Zd(K);return[Fv(K),ne,Fv(ne)]}(o));u||v==="none"||S.push(...function(K,ne,O,y){const w=Tl(K);let T=function(N,p,k){const I=["left","right"],b=["right","left"],h=["top","bottom"],_=["bottom","top"];switch(N){case"top":case"bottom":return k?p?b:I:p?I:b;case"left":case"right":return p?h:_;default:return[]}}(zi(K),O==="start",y);return w&&(T=T.map(N=>N+"-"+w),ne&&(T=T.concat(T.map(Fv)))),T}(o,g,v,E));const P=[o,...S],R=await uc(e,m),L=[];let F=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&L.push(R[M]),c){const{main:K,cross:ne}=n9(n,s,E);L.push(R[K],R[ne])}if(F=[...F,{placement:n,overflows:L}],!L.every(K=>K<=0)){var z,H;const K=(((z=i.flip)==null?void 0:z.index)||0)+1,ne=P[K];if(ne)return{data:{index:K,overflows:F},reset:{placement:ne}};let O=(H=F.filter(y=>y.overflows[0]<=0).sort((y,w)=>y.overflows[1]-w.overflows[1])[0])==null?void 0:H.placement;if(!O)switch(d){case"bestFit":{var q;const y=(q=F.map(w=>[w.placement,w.overflows.filter(T=>T>0).reduce((T,N)=>T+N,0)]).sort((w,T)=>w[1]-T[1])[0])==null?void 0:q[0];y&&(O=y);break}case"initialPlacement":O=o}if(n!==O)return{reset:{placement:O}}}return{}}}};function D2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B2(t){return pS.some(e=>t[e]>=0)}const o9=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:i}=e;switch(r){case"referenceHidden":{const s=D2(await uc(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:B2(s)}}}case"escaped":{const s=D2(await uc(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:s,escaped:B2(s)}}}default:return{}}}}},a9=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await async function(s,o){const{placement:a,platform:l,elements:f}=s,c=await(l.isRTL==null?void 0:l.isRTL(f.floating)),u=zi(a),d=Tl(a),v=ta(a)==="x",g=["left","top"].includes(u)?-1:1,m=c&&v?-1:1,M=typeof o=="function"?o(s):o;let{mainAxis:A,crossAxis:E,alignmentAxis:S}=typeof M=="number"?{mainAxis:M,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...M};return d&&typeof S=="number"&&(E=d==="end"?-1*S:S),v?{x:E*m,y:A*g}:{x:A*g,y:E*m}}(e,t);return{x:r+i.x,y:n+i.y,data:i}}}};function gS(t){return t==="x"?"y":"x"}const l9=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:M=>{let{x:A,y:E}=M;return{x:A,y:E}}},...l}=t,f={x:r,y:n},c=await uc(e,l),u=ta(zi(i)),d=gS(u);let v=f[u],g=f[d];if(s){const M=u==="y"?"bottom":"right";v=_y(v+c[u==="y"?"top":"left"],v,v-c[M])}if(o){const M=d==="y"?"bottom":"right";g=_y(g+c[d==="y"?"top":"left"],g,g-c[M])}const m=a.fn({...e,[u]:v,[d]:g});return{...m,data:{x:m.x-r,y:m.y-n}}}}},f9=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:f=!0}=t,c={x:r,y:n},u=ta(i),d=gS(u);let v=c[u],g=c[d];const m=typeof a=="function"?a(e):a,M=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const S=u==="y"?"height":"width",P=s.reference[u]-s.floating[S]+M.mainAxis,R=s.reference[u]+s.reference[S]-M.mainAxis;vR&&(v=R)}if(f){var A,E;const S=u==="y"?"width":"height",P=["top","left"].includes(zi(i)),R=s.reference[d]-s.floating[S]+(P&&((A=o.offset)==null?void 0:A[d])||0)+(P?0:M.crossAxis),L=s.reference[d]+s.reference[S]+(P?0:((E=o.offset)==null?void 0:E[d])||0)-(P?M.crossAxis:0);gL&&(g=L)}return{[u]:v,[d]:g}}}},c9=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=t,l=await uc(e,a),f=zi(r),c=Tl(r),u=ta(r)==="x",{width:d,height:v}=n.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=c==="end"?"top":"bottom");const M=v-l[g],A=d-l[m],E=!e.middlewareData.shift;let S=M,P=A;if(u){const L=d-l.left-l.right;P=c||E?ky(A,L):L}else{const L=v-l.top-l.bottom;S=c||E?ky(M,L):L}if(E&&!c){const L=po(l.left,0),F=po(l.right,0),z=po(l.top,0),H=po(l.bottom,0);u?P=d-2*(L!==0||F!==0?L+F:po(l.left,l.right)):S=v-2*(z!==0||H!==0?z+H:po(l.top,l.bottom))}await o({...e,availableWidth:P,availableHeight:S});const R=await i.getDimensions(s.floating);return d!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function En(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qn(t){return En(t).getComputedStyle(t)}function mS(t){return t instanceof En(t).Node}function Us(t){return mS(t)?(t.nodeName||"").toLowerCase():""}function Xn(t){return t instanceof En(t).HTMLElement}function fn(t){return t instanceof En(t).Element}function L2(t){return typeof ShadowRoot>"u"?!1:t instanceof En(t).ShadowRoot||t instanceof ShadowRoot}function dc(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Qn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function u9(t){return["table","td","th"].includes(Us(t))}function Ty(t){const e=Yg(),r=Qn(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Yg(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function i1(t){return["html","body","#document"].includes(Us(t))}const $2=Math.min,kf=Math.max,eh=Math.round;function wS(t){const e=Qn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Xn(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=eh(r)!==s||eh(n)!==o;return a&&(r=s,n=o),{width:r,height:n,fallback:a}}function bS(t){return fn(t)?t:t.contextElement}const xS={x:1,y:1};function Ja(t){const e=bS(t);if(!Xn(e))return xS;const r=e.getBoundingClientRect(),{width:n,height:i,fallback:s}=wS(e);let o=(s?eh(r.width):r.width)/n,a=(s?eh(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const F2={x:0,y:0};function CS(t,e,r){var n,i;if(e===void 0&&(e=!0),!Yg())return F2;const s=t?En(t):window;return!r||e&&r!==s?F2:{x:((n=s.visualViewport)==null?void 0:n.offsetLeft)||0,y:((i=s.visualViewport)==null?void 0:i.offsetTop)||0}}function zo(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=bS(t);let o=xS;e&&(n?fn(n)&&(o=Ja(n)):o=Ja(t));const a=CS(s,r,n);let l=(i.left+a.x)/o.x,f=(i.top+a.y)/o.y,c=i.width/o.x,u=i.height/o.y;if(s){const d=En(s),v=n&&fn(n)?En(n):n;let g=d.frameElement;for(;g&&n&&v!==d;){const m=Ja(g),M=g.getBoundingClientRect(),A=getComputedStyle(g);M.x+=(g.clientLeft+parseFloat(A.paddingLeft))*m.x,M.y+=(g.clientTop+parseFloat(A.paddingTop))*m.y,l*=m.x,f*=m.y,c*=m.x,u*=m.y,l+=M.x,f+=M.y,g=En(g).frameElement}}return Xd({width:c,height:u,x:l,y:f})}function Os(t){return((mS(t)?t.ownerDocument:t.document)||window.document).documentElement}function s1(t){return fn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function AS(t){return zo(Os(t)).left+s1(t).scrollLeft}function dl(t){if(Us(t)==="html")return t;const e=t.assignedSlot||t.parentNode||L2(t)&&t.host||Os(t);return L2(e)?e.host:e}function ES(t){const e=dl(t);return i1(e)?e.ownerDocument.body:Xn(e)&&dc(e)?e:ES(e)}function _f(t,e){var r;e===void 0&&(e=[]);const n=ES(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=En(n);return i?e.concat(s,s.visualViewport||[],dc(n)?n:[]):e.concat(n,_f(n))}function j2(t,e,r){let n;if(e==="viewport")n=function(i,s){const o=En(i),a=Os(i),l=o.visualViewport;let f=a.clientWidth,c=a.clientHeight,u=0,d=0;if(l){f=l.width,c=l.height;const v=Yg();(!v||v&&s==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:f,height:c,x:u,y:d}}(t,r);else if(e==="document")n=function(i){const s=Os(i),o=s1(i),a=i.ownerDocument.body,l=kf(s.scrollWidth,s.clientWidth,a.scrollWidth,a.clientWidth),f=kf(s.scrollHeight,s.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+AS(i);const u=-o.scrollTop;return Qn(a).direction==="rtl"&&(c+=kf(s.clientWidth,a.clientWidth)-l),{width:l,height:f,x:c,y:u}}(Os(t));else if(fn(e))n=function(i,s){const o=zo(i,!0,s==="fixed"),a=o.top+i.clientTop,l=o.left+i.clientLeft,f=Xn(i)?Ja(i):{x:1,y:1};return{width:i.clientWidth*f.x,height:i.clientHeight*f.y,x:l*f.x,y:a*f.y}}(e,r);else{const i=CS(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Xd(n)}function SS(t,e){const r=dl(t);return!(r===e||!fn(r)||i1(r))&&(Qn(r).position==="fixed"||SS(r,e))}function z2(t,e){return Xn(t)&&Qn(t).position!=="fixed"?e?e(t):t.offsetParent:null}function U2(t,e){const r=En(t);if(!Xn(t))return r;let n=z2(t,e);for(;n&&u9(n)&&Qn(n).position==="static";)n=z2(n,e);return n&&(Us(n)==="html"||Us(n)==="body"&&Qn(n).position==="static"&&!Ty(n))?r:n||function(i){let s=dl(i);for(;Xn(s)&&!i1(s);){if(Ty(s))return s;s=dl(s)}return null}(t)||r}function d9(t,e,r){const n=Xn(e),i=Os(e),s=r==="fixed",o=zo(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!s)if((Us(e)!=="body"||dc(i))&&(a=s1(e)),Xn(e)){const f=zo(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=AS(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const h9={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=r==="clippingAncestors"?function(f,c){const u=c.get(f);if(u)return u;let d=_f(f).filter(M=>fn(M)&&Us(M)!=="body"),v=null;const g=Qn(f).position==="fixed";let m=g?dl(f):f;for(;fn(m)&&!i1(m);){const M=Qn(m),A=Ty(m);A||M.position!=="fixed"||(v=null),(g?!A&&!v:!A&&M.position==="static"&&v&&["absolute","fixed"].includes(v.position)||dc(m)&&!A&&SS(f,m))?d=d.filter(E=>E!==m):v=M,m=dl(m)}return c.set(f,d),d}(e,this._c):[].concat(r),o=[...s,n],a=o[0],l=o.reduce((f,c)=>{const u=j2(e,c,i);return f.top=kf(u.top,f.top),f.right=$2(u.right,f.right),f.bottom=$2(u.bottom,f.bottom),f.left=kf(u.left,f.left),f},j2(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Xn(r),s=Os(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&n!=="fixed")&&((Us(r)!=="body"||dc(s))&&(o=s1(r)),Xn(r))){const f=zo(r);a=Ja(r),l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:fn,getDimensions:function(t){return wS(t)},getOffsetParent:U2,getDocumentElement:Os,getScale:Ja,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||U2,s=this.getDimensions;return{reference:d9(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Qn(t).direction==="rtl"};function v9(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=i||s?[...fn(t)?_f(t):t.contextElement?_f(t.contextElement):[],..._f(e)]:[];l.forEach(d=>{const v=!fn(d)&&d.toString().includes("V");!i||a&&!v||d.addEventListener("scroll",r,{passive:!0}),s&&d.addEventListener("resize",r)});let f,c=null;o&&(c=new ResizeObserver(()=>{r()}),fn(t)&&!a&&c.observe(t),fn(t)||!t.contextElement||a||c.observe(t.contextElement),c.observe(e));let u=a?zo(t):null;return a&&function d(){const v=zo(t);!u||v.x===u.x&&v.y===u.y&&v.width===u.width&&v.height===u.height||r(),u=v,f=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(v=>{i&&v.removeEventListener("scroll",r),s&&v.removeEventListener("resize",r)}),(d=c)==null||d.disconnect(),c=null,a&&cancelAnimationFrame(f)}}const y9=(t,e,r)=>{const n=new Map,i={platform:h9,...r},s={...i.platform,_c:n};return t9(t,e,{...i,platform:s})},p9=t=>{const{element:e,padding:r}=t;function n(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return e&&n(e)?e.current!=null?O2({element:e.current,padding:r}).fn(i):{}:e?O2({element:e,padding:r}).fn(i):{}}}};var Qu=typeof document<"u"?x.useLayoutEffect:x.useEffect;function th(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,i;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(!th(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!th(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function kS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function V2(t,e){const r=kS(t);return Math.round(e*r)/r}function W2(t){const e=x.useRef(t);return Qu(()=>{e.current=t}),e}function g9(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:f}=t,[c,u]=x.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,v]=x.useState(n);th(d,n)||v(n);const[g,m]=x.useState(null),[M,A]=x.useState(null),E=x.useCallback(T=>{T!=L.current&&(L.current=T,m(T))},[m]),S=x.useCallback(T=>{T!==F.current&&(F.current=T,A(T))},[A]),P=s||g,R=o||M,L=x.useRef(null),F=x.useRef(null),z=x.useRef(c),H=W2(l),q=W2(i),K=x.useCallback(()=>{if(!L.current||!F.current)return;const T={placement:e,strategy:r,middleware:d};q.current&&(T.platform=q.current),y9(L.current,F.current,T).then(N=>{const p={...N,isPositioned:!0};ne.current&&!th(z.current,p)&&(z.current=p,wi.flushSync(()=>{u(p)}))})},[d,e,r,q]);Qu(()=>{f===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[f]);const ne=x.useRef(!1);Qu(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Qu(()=>{if(P&&(L.current=P),R&&(F.current=R),P&&R){if(H.current)return H.current(P,R,K);K()}},[P,R,K,H]);const O=x.useMemo(()=>({reference:L,floating:F,setReference:E,setFloating:S}),[E,S]),y=x.useMemo(()=>({reference:P,floating:R}),[P,R]),w=x.useMemo(()=>{const T={position:r,left:0,top:0};if(!y.floating)return T;const N=V2(y.floating,c.x),p=V2(y.floating,c.y);return a?{...T,transform:"translate("+N+"px, "+p+"px)",...kS(y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:p}},[r,a,y.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:K,refs:O,elements:y,floatingStyles:w}),[c,K,O,y,w])}const _S="Popper",[TS,Pl]=Ir(_S),[m9,PS]=TS(_S),w9=t=>{const{__scopePopper:e,children:r}=t,[n,i]=x.useState(null);return x.createElement(m9,{scope:e,anchor:n,onAnchorChange:i},r)},b9="PopperAnchor",x9=x.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=PS(b9,r),o=x.useRef(null),a=Rt(e,o);return x.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:x.createElement(Be.div,le({},i,{ref:a}))}),IS="PopperContent",[C9,wG]=TS(IS),A9=x.forwardRef((t,e)=>{var r,n,i,s,o,a,l,f;const{__scopePopper:c,side:u="bottom",sideOffset:d=0,align:v="center",alignOffset:g=0,arrowPadding:m=0,collisionBoundary:M=[],collisionPadding:A=0,sticky:E="partial",hideWhenDetached:S=!1,avoidCollisions:P=!0,onPlaced:R,...L}=t,F=PS(IS,c),[z,H]=x.useState(null),q=Rt(e,ie=>H(ie)),[K,ne]=x.useState(null),O=Hg(K),y=(r=O==null?void 0:O.width)!==null&&r!==void 0?r:0,w=(n=O==null?void 0:O.height)!==null&&n!==void 0?n:0,T=u+(v!=="center"?"-"+v:""),N=typeof A=="number"?A:{top:0,right:0,bottom:0,left:0,...A},p=Array.isArray(M)?M:[M],k=p.length>0,I={padding:N,boundary:p.filter(E9),altBoundary:k},{refs:b,floatingStyles:h,placement:_,isPositioned:$,middlewareData:C}=g9({strategy:"fixed",placement:T,whileElementsMounted:v9,elements:{reference:F.anchor},middleware:[a9({mainAxis:d+w,alignmentAxis:g}),P&&l9({mainAxis:!0,crossAxis:!1,limiter:E==="partial"?f9():void 0,...I}),P&&s9({...I}),c9({...I,apply:({elements:ie,rects:ve,availableWidth:Kt,availableHeight:Ie})=>{const{width:Ae,height:St}=ve.reference,De=ie.floating.style;De.setProperty("--radix-popper-available-width",`${Kt}px`),De.setProperty("--radix-popper-available-height",`${Ie}px`),De.setProperty("--radix-popper-anchor-width",`${Ae}px`),De.setProperty("--radix-popper-anchor-height",`${St}px`)}}),K&&p9({element:K,padding:m}),S9({arrowWidth:y,arrowHeight:w}),S&&o9({strategy:"referenceHidden"})]}),[D,B]=MS(_),j=Tn(R);hn(()=>{$&&(j==null||j())},[$,j]);const Y=(i=C.arrow)===null||i===void 0?void 0:i.x,Z=(s=C.arrow)===null||s===void 0?void 0:s.y,G=((o=C.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[J,he]=x.useState();return hn(()=>{z&&he(window.getComputedStyle(z).zIndex)},[z]),x.createElement("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...h,transform:$?h.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,["--radix-popper-transform-origin"]:[(a=C.transformOrigin)===null||a===void 0?void 0:a.x,(l=C.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},x.createElement(C9,{scope:c,placedSide:D,onArrowChange:ne,arrowX:Y,arrowY:Z,shouldHideArrow:G},x.createElement(Be.div,le({"data-side":D,"data-align":B},L,{ref:q,style:{...L.style,animation:$?void 0:"none",opacity:(f=C.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))});function E9(t){return t!==null}const S9=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:f}=e,u=((r=f.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,v=u?0:t.arrowHeight,[g,m]=MS(a),M={start:"0%",center:"50%",end:"100%"}[m],A=((n=(i=f.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,E=((s=(o=f.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+v/2;let S="",P="";return g==="bottom"?(S=u?M:`${A}px`,P=`${-v}px`):g==="top"?(S=u?M:`${A}px`,P=`${l.floating.height+v}px`):g==="right"?(S=`${-v}px`,P=u?M:`${E}px`):g==="left"&&(S=`${l.floating.width+v}px`,P=u?M:`${E}px`),{data:{x:S,y:P}}}});function MS(t){const[e,r="center"]=t.split("-");return[e,r]}const k9=w9,_9=x9,T9=A9,P9=x.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?nP.createPortal(x.createElement(Be.div,le({},i,{ref:e})),n):null}),jv="rovingFocusGroup.onEntryFocus",I9={bubbles:!1,cancelable:!0},Xg="RovingFocusGroup",[Py,NS,M9]=n1(Xg),[N9,Il]=Ir(Xg,[M9]),[R9,O9]=N9(Xg),D9=x.forwardRef((t,e)=>x.createElement(Py.Provider,{scope:t.__scopeRovingFocusGroup},x.createElement(Py.Slot,{scope:t.__scopeRovingFocusGroup},x.createElement(B9,le({},t,{ref:e}))))),B9=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:f,...c}=t,u=x.useRef(null),d=Rt(e,u),v=Jg(s),[g=null,m]=ul({prop:o,defaultProp:a,onChange:l}),[M,A]=x.useState(!1),E=Tn(f),S=NS(r),P=x.useRef(!1),[R,L]=x.useState(0);return x.useEffect(()=>{const F=u.current;if(F)return F.addEventListener(jv,E),()=>F.removeEventListener(jv,E)},[E]),x.createElement(R9,{scope:r,orientation:n,dir:v,loop:i,currentTabStopId:g,onItemFocus:x.useCallback(F=>m(F),[m]),onItemShiftTab:x.useCallback(()=>A(!0),[]),onFocusableItemAdd:x.useCallback(()=>L(F=>F+1),[]),onFocusableItemRemove:x.useCallback(()=>L(F=>F-1),[])},x.createElement(Be.div,le({tabIndex:M||R===0?-1:0,"data-orientation":n},c,{ref:d,style:{outline:"none",...t.style},onMouseDown:we(t.onMouseDown,()=>{P.current=!0}),onFocus:we(t.onFocus,F=>{const z=!P.current;if(F.target===F.currentTarget&&z&&!M){const H=new CustomEvent(jv,I9);if(F.currentTarget.dispatchEvent(H),!H.defaultPrevented){const q=S().filter(w=>w.focusable),K=q.find(w=>w.active),ne=q.find(w=>w.id===g),y=[K,ne,...q].filter(Boolean).map(w=>w.ref.current);RS(y)}}P.current=!1}),onBlur:we(t.onBlur,()=>A(!1))})))}),L9="RovingFocusGroupItem",$9=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=Lc(),l=s||a,f=O9(L9,r),c=f.currentTabStopId===l,u=NS(r),{onFocusableItemAdd:d,onFocusableItemRemove:v}=f;return x.useEffect(()=>{if(n)return d(),()=>v()},[n,d,v]),x.createElement(Py.ItemSlot,{scope:r,id:l,focusable:n,active:i},x.createElement(Be.span,le({tabIndex:c?0:-1,"data-orientation":f.orientation},o,{ref:e,onMouseDown:we(t.onMouseDown,g=>{n?f.onItemFocus(l):g.preventDefault()}),onFocus:we(t.onFocus,()=>f.onItemFocus(l)),onKeyDown:we(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=z9(g,f.orientation,f.dir);if(m!==void 0){g.preventDefault();let A=u().filter(E=>E.focusable).map(E=>E.ref.current);if(m==="last")A.reverse();else if(m==="prev"||m==="next"){m==="prev"&&A.reverse();const E=A.indexOf(g.currentTarget);A=f.loop?U9(A,E+1):A.slice(E+1)}setTimeout(()=>RS(A))}})})))}),F9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function j9(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function z9(t,e,r){const n=j9(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return F9[n]}function RS(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function U9(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const V9=D9,OS=$9;var W9=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ua=new WeakMap,wu=new WeakMap,bu={},zv=0,DS=function(t){return t&&(t.host||DS(t.parentNode))},H9=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=DS(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},q9=function(t,e,r,n){var i=H9(e,Array.isArray(t)?t:[t]);bu[r]||(bu[r]=new WeakMap);var s=bu[r],o=[],a=new Set,l=new Set(i),f=function(u){!u||a.has(u)||(a.add(u),f(u.parentNode))};i.forEach(f);var c=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))c(d);else{var v=d.getAttribute(n),g=v!==null&&v!=="false",m=(ua.get(d)||0)+1,M=(s.get(d)||0)+1;ua.set(d,m),s.set(d,M),o.push(d),m===1&&g&&wu.set(d,!0),M===1&&d.setAttribute(r,"true"),g||d.setAttribute(n,"true")}})};return c(e),a.clear(),zv++,function(){o.forEach(function(u){var d=ua.get(u)-1,v=s.get(u)-1;ua.set(u,d),s.set(u,v),d||(wu.has(u)||u.removeAttribute(n),wu.delete(u)),v||u.removeAttribute(r)}),zv--,zv||(ua=new WeakMap,ua=new WeakMap,wu=new WeakMap,bu={})}},G9=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||W9(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),q9(n,i,r,"aria-hidden")):function(){return null}},li=function(){return li=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return cO;var e=uO(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])}},hO=FS(),vO=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(J9,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(a,"px ").concat(n,`; - } - body { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(s,`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(Yu,` { - right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Xu,` { - margin-right: `).concat(a,"px ").concat(n,`; - } - - .`).concat(Yu," .").concat(Yu,` { - right: 0 `).concat(n,`; - } - - .`).concat(Xu," .").concat(Xu,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(Q9,": ").concat(a,`px; - } -`)},yO=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=x.useMemo(function(){return dO(i)},[i]);return x.createElement(hO,{styles:vO(s,!e,i,r?"":"!important")})},Iy=!1;if(typeof window<"u")try{var xu=Object.defineProperty({},"passive",{get:function(){return Iy=!0,!0}});window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch{Iy=!1}var da=Iy?{passive:!1}:!1,pO=function(t){return t.tagName==="TEXTAREA"},jS=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!pO(t)&&r[e]==="visible")},gO=function(t){return jS(t,"overflowY")},mO=function(t){return jS(t,"overflowX")},H2=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=zS(t,r);if(n){var i=US(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},wO=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},bO=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},zS=function(t,e){return t==="v"?gO(e):mO(e)},US=function(t,e){return t==="v"?wO(e):bO(e)},xO=function(t,e){return t==="h"&&e==="rtl"?-1:1},CO=function(t,e,r,n,i){var s=xO(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),f=!1,c=o>0,u=0,d=0;do{var v=US(t,a),g=v[0],m=v[1],M=v[2],A=m-M-s*g;(g||A)&&zS(t,a)&&(u+=A,d+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&(i&&u===0||!i&&o>u)||!c&&(i&&d===0||!i&&-o>d))&&(f=!0),f},Cu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},q2=function(t){return[t.deltaX,t.deltaY]},G2=function(t){return t&&"current"in t?t.current:t},AO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},EO=function(t){return` - .block-interactivity-`.concat(t,` {pointer-events: none;} - .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},SO=0,ha=[];function kO(t){var e=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(SO++)[0],s=x.useState(function(){return FS()})[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(i));var m=K9([t.lockRef.current],(t.shards||[]).map(G2),!0).filter(Boolean);return m.forEach(function(M){return M.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=x.useCallback(function(m,M){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var A=Cu(m),E=r.current,S="deltaX"in m?m.deltaX:E[0]-A[0],P="deltaY"in m?m.deltaY:E[1]-A[1],R,L=m.target,F=Math.abs(S)>Math.abs(P)?"h":"v";if("touches"in m&&F==="h"&&L.type==="range")return!1;var z=H2(F,L);if(!z)return!0;if(z?R=F:(R=F==="v"?"h":"v",z=H2(F,L)),!z)return!1;if(!n.current&&"changedTouches"in m&&(S||P)&&(n.current=R),!R)return!0;var H=n.current||R;return CO(H,M,m,H==="h"?S:P,!0)},[]),l=x.useCallback(function(m){var M=m;if(!(!ha.length||ha[ha.length-1]!==s)){var A="deltaY"in M?q2(M):Cu(M),E=e.current.filter(function(R){return R.name===M.type&&R.target===M.target&&AO(R.delta,A)})[0];if(E&&E.should){M.cancelable&&M.preventDefault();return}if(!E){var S=(o.current.shards||[]).map(G2).filter(Boolean).filter(function(R){return R.contains(M.target)}),P=S.length>0?a(M,S[0]):!o.current.noIsolation;P&&M.cancelable&&M.preventDefault()}}},[]),f=x.useCallback(function(m,M,A,E){var S={name:m,delta:M,target:A,should:E};e.current.push(S),setTimeout(function(){e.current=e.current.filter(function(P){return P!==S})},1)},[]),c=x.useCallback(function(m){r.current=Cu(m),n.current=void 0},[]),u=x.useCallback(function(m){f(m.type,q2(m),m.target,a(m,t.lockRef.current))},[]),d=x.useCallback(function(m){f(m.type,Cu(m),m.target,a(m,t.lockRef.current))},[]);x.useEffect(function(){return ha.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,da),document.addEventListener("touchmove",l,da),document.addEventListener("touchstart",c,da),function(){ha=ha.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,da),document.removeEventListener("touchmove",l,da),document.removeEventListener("touchstart",c,da)}},[]);var v=t.removeScrollBar,g=t.inert;return x.createElement(x.Fragment,null,g?x.createElement(s,{styles:EO(i)}):null,v?x.createElement(yO,{gapMode:"margin"}):null)}const _O=nO($S,kO);var VS=x.forwardRef(function(t,e){return x.createElement(o1,li({},t,{ref:e,sideCar:_O}))});VS.classNames=o1.classNames;const TO=VS,PO=["Enter"," "],a1="Menu",[IO,bG,MO]=n1(a1),[ra,WS]=Ir(a1,[MO,Pl,Il]);Pl();const NO=Il();ra(a1);const[xG,RO]=ra(a1),OO="MenuPortal";ra(OO,{forceMount:void 0});const DO="MenuContent",[CG,HS]=ra(DO),My="MenuItem",K2="menu.itemSelect",qS=x.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=x.useRef(null),o=RO(My,t.__scopeMenu),a=HS(My,t.__scopeMenu),l=Rt(e,s),f=x.useRef(!1),c=()=>{const u=s.current;if(!r&&u){const d=new CustomEvent(K2,{bubbles:!0,cancelable:!0});u.addEventListener(K2,v=>n==null?void 0:n(v),{once:!0}),qg(u,d),d.defaultPrevented?f.current=!1:o.onClose()}};return x.createElement(BO,le({},i,{ref:l,disabled:r,onClick:we(t.onClick,c),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),f.current=!0},onPointerUp:we(t.onPointerUp,u=>{var d;f.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:we(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||PO.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),BO=x.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=HS(My,r),a=NO(r),l=x.useRef(null),f=Rt(e,l),[c,u]=x.useState(!1),[d,v]=x.useState("");return x.useEffect(()=>{const g=l.current;if(g){var m;v(((m=g.textContent)!==null&&m!==void 0?m:"").trim())}},[s.children]),x.createElement(IO.ItemSlot,{scope:r,disabled:n,textValue:i??d},x.createElement(OS,le({asChild:!0},a,{focusable:!n}),x.createElement(Be.div,le({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:f,onPointerMove:we(t.onPointerMove,J2(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:we(t.onPointerLeave,J2(g=>o.onItemLeave(g))),onFocus:we(t.onFocus,()=>u(!0)),onBlur:we(t.onBlur,()=>u(!1))}))))}),LO=x.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return x.createElement(KS,{scope:t.__scopeMenu,checked:r},x.createElement(qS,le({role:"menuitemcheckbox","aria-checked":rh(r)?"mixed":r},i,{ref:e,"data-state":Zg(r),onSelect:we(i.onSelect,()=>n==null?void 0:n(rh(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),$O="MenuRadioGroup",[AG,FO]=ra($O,{value:void 0,onValueChange:()=>{}}),jO="MenuRadioItem",zO=x.forwardRef((t,e)=>{const{value:r,...n}=t,i=FO(jO,t.__scopeMenu),s=r===i.value;return x.createElement(KS,{scope:t.__scopeMenu,checked:s},x.createElement(qS,le({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":Zg(s),onSelect:we(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),GS="MenuItemIndicator",[KS,UO]=ra(GS,{checked:!1}),VO=x.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=UO(GS,r);return x.createElement(Bc,{present:n||rh(s.checked)||s.checked===!0},x.createElement(Be.span,le({},i,{ref:e,"data-state":Zg(s.checked)})))}),WO="MenuSub";ra(WO);function rh(t){return t==="indeterminate"}function Zg(t){return rh(t)?"indeterminate":t?"checked":"unchecked"}function J2(t){return e=>e.pointerType==="mouse"?t(e):void 0}const HO=LO,qO=zO,GO=VO,JS="DropdownMenu",[KO,EG]=Ir(JS,[WS]),em=WS();KO(JS);const JO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=em(r);return x.createElement(HO,le({},i,n,{ref:e}))}),QO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=em(r);return x.createElement(qO,le({},i,n,{ref:e}))}),YO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=em(r);return x.createElement(GO,le({},i,n,{ref:e}))}),XO=JO,ZO=QO,QS=YO;var YS="_1k2mbvi5",XS="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12vk fyvr12ve fyvr11h0 fyvr11ko fyvr11jw fyvr12tz fyvr11n2 fyvr11hw fyvr12r5";const eD=({children:t})=>W.jsx(QS,{className:YS,children:t});x.forwardRef(({className:t,children:e,...r},n)=>W.jsxs(XO,{className:Vr(XS,t),...r,ref:n,children:[W.jsx(eD,{children:W.jsx(aS,{size:"xs"})}),W.jsx(rr,{variant:"small",children:e})]}));x.forwardRef(({className:t,children:e,...r},n)=>W.jsxs(ZO,{className:Vr(XS,t),...r,ref:n,children:[W.jsx(QS,{className:YS,children:W.jsx(rr,{children:"ā€¢"})}),W.jsx(rr,{variant:"small",children:e})]}));const ZS=x.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return W.jsx(wt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),tD=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var rD="fyvr12vh fyvr12vb fyvr11ho fyvr12ub fyvr1ko fyvr1oo fyvr1mo fyvr1qo",nD="_1hq71vk1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mt fyvr12fn fyvr121b fyvr128h fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",iD=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const sD={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};x.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:f,placeholder:c="Upload a file",validExtensions:u,...d}=t,v=x.useRef(null),g=tD(v,e),[m,M]=x.useState(null),A=S=>{const P=S.currentTarget.files;if(!P||!P[0])return;const R=P[0],L=R.name,F=R.size/1e3;M({name:L,size:F,extension:L.split(".").pop()??""}),f==null||f(R)},E=u.map(S=>sD[S]).join(",");return W.jsx(kl,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:W.jsx(pe,{width:"full",children:W.jsxs(pe,{justifyContent:m?"space-between":"flex-start",color:m?"text100":"text50",className:Vr(nD,iD({borderRadius:r})),children:[m?W.jsxs(pe,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[W.jsx(rr,{children:m.name}),W.jsxs(rr,{color:"text50",variant:"xsmall",children:[m.size.toFixed(2)," kb"]})]}):W.jsx(rr,{children:c}),W.jsx(pe,{accept:E,as:"input",className:rD,cursor:m?"text":"pointer",disabled:i||!!m,id:s??l,name:l,onChange:A,ref:g,type:"file",...d}),m&&W.jsx(ZS,{cursor:"pointer",icon:fS,size:"xs",onClick:S=>{var P;S.preventDefault(),S.stopPropagation(),(P=v.current)!=null&&P.value&&(v.current.value=""),f==null||f(null),M(null)},zIndex:"10"})]})})})});var oD=Ot({defaultClassName:"",variantClassNames:{size:{xs:"_1bhyzin0",sm:"_1bhyzin1",md:"_1bhyzin2",lg:"_1bhyzin3",xl:"_1bhyzin4"}},defaultVariants:{},compoundVariants:[]});const go=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>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)},aD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:go(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}};x.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=[];for(let l=0;l({...aD(l.a,l.b,l.c),x:l.x%1e3,y:l.y%1e3,r:100+l.r%(1500/(f+1))}));return W.jsxs(pe,{as:"svg",className:Vr(e,oD({size:n})),viewBox:"0 0 1000 1000",version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[W.jsxs("defs",{children:[W.jsx("clipPath",{id:"circle-clip",children:W.jsx("circle",{cx:"500",cy:"500",r:"500"})}),W.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),W.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:"100",result:"effect1_foregroundBlur"})]}),a.map(l=>W.jsxs(x.Fragment,{children:[W.jsxs("radialGradient",{id:`gradient-primary-${l.id}`,children:[W.jsx("stop",{offset:"0",stopColor:l.a}),W.jsx("stop",{offset:"1",stopColor:l.b})]}),W.jsxs("radialGradient",{id:`gradient-secondary-${l.id}`,children:[W.jsx("stop",{offset:"0",stopColor:l.c}),W.jsx("stop",{offset:"1",stopColor:l.b})]})]},l.id)),W.jsxs("linearGradient",{id:`gradient-background-${a[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[W.jsx("stop",{offset:"0",stopColor:a[0].c}),W.jsx("stop",{offset:"1",stopColor:a[0].a})]})]}),W.jsxs("g",{clipPath:"url(#circle-clip)",children:[W.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${a[0].id})`}),W.jsx("g",{filter:"url(#blur)",children:a.map(l=>W.jsxs(x.Fragment,{children:[W.jsx("circle",{fill:`url(#gradient-primary-${l.id})`,cx:l.x,cy:l.y,r:l.r}),W.jsx("circle",{fill:`url(#gradient-secondary-${l.id})`,cx:l.y,cy:l.x,r:l.r/2})]},l.id))})]})]})});const ek=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=x.useState(!1),o=a=>{s(!0),r==null||r(a)};return W.jsx(pe,{as:Ju.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},tk="Dialog",[rk,SG]=Ir(tk);rk(tk);const lD="DialogPortal";rk(lD,{forceMount:void 0});Ot({defaultClassName:"",variantClassNames:{shadows:{true:"_1vqx0w93",false:"_1vqx0w94"},direction:{vertical:"_1vqx0w95",horizontal:"_1vqx0w96"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w91",horizontal:"_1vqx0w92"}},defaultVariants:{},compoundVariants:[]});Ot({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12vk fyvr12ve fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var fD=Ot({defaultClassName:"fyvr1t4 fyvr1v0 fyvr12vh fyvr12vb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),cD="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rh fyvr1g0 fyvr118g",uD=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const nk=x.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",leftIcon:c,rightIcon:u,name:d,controls:v,type:g="text",numeric:m=!1,...M}=t;return W.jsx(kl,{description:s,disabled:o,display:"grid",id:a??d,label:l,labelLocation:f,children:W.jsx(pe,{width:"full",children:W.jsxs(pe,{className:Vr(cD,uD({borderRadius:i})),children:[c&&W.jsx(c,{size:"sm"}),W.jsx(pe,{as:r,autoComplete:n,spellCheck:"false",className:fD({numeric:m}),disabled:o,id:a??d,name:d,ref:e,type:g,...M}),u&&W.jsx(u,{size:"sm"}),v]})})})}),dD=RegExp("^\\d*(?:\\\\[.])?\\d*$");function hD(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}x.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=f=>{let{value:c}=f.target;c=c.replace(/,/g,"."),c.startsWith(".")&&(c="0"+c),c.startsWith("0")&&(c=c.replace(/^0+(?=\d)/,"")),(c===""||dD.test(hD(c)))&&(i==null||i({...f,target:{...f.target,value:c}}))},l=f=>{const{value:c}=f.target;let u=c;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(f),u!==c&&(i==null||i({...f,target:{...f.target,value:u}}))};return W.jsx(nk,{name:r,onChange:a,onBlur:l,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})});Ot({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const ik="Progress",l1=100,[vD,kG]=Ir(ik),[yD,_G]=vD(ik),pD=x.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=gD,...o}=t,a=Ny(i)?i:l1,l=sk(n,a)?n:null,f=nh(l)?s(l,a):void 0;return x.createElement(yD,{scope:r,value:l,max:a},x.createElement(Be.div,le({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":nh(l)?l:void 0,"aria-valuetext":f,role:"progressbar","data-state":mD(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});pD.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!Ny(n)?new Error(wD(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Ny(t.max)?t.max:l1;return n!=null&&!sk(n,s)?new Error(bD(i,r)):null}};function gD(t,e){return`${Math.round(t/e*100)}%`}function mD(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function nh(t){return typeof t=="number"}function Ny(t){return nh(t)&&!isNaN(t)&&t>0}function sk(t,e){return nh(t)&&!isNaN(t)&&t<=e&&t>=0}function wD(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${l1}\`.`}function bD(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 ${l1} if no \`max\` prop is set) - - \`null\` if the progress is indeterminate. - -Defaulting to \`null\`.`}const ok="Radio",[xD,ak]=Ir(ok),[CD,AD]=xD(ok),ED=x.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...f}=t,[c,u]=x.useState(null),d=Rt(e,m=>u(m)),v=x.useRef(!1),g=c?Boolean(c.closest("form")):!0;return x.createElement(CD,{scope:r,checked:i,disabled:o},x.createElement(Be.button,le({type:"button",role:"radio","aria-checked":i,"data-state":lk(i),"data-disabled":o?"":void 0,disabled:o,value:a},f,{ref:d,onClick:we(t.onClick,m=>{i||l==null||l(),g&&(v.current=m.isPropagationStopped(),v.current||m.stopPropagation())})})),g&&x.createElement(_D,{control:c,bubbles:!v.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),SD="RadioIndicator",kD=x.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=AD(SD,r);return x.createElement(Bc,{present:n||s.checked},x.createElement(Be.span,le({"data-state":lk(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),_D=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=x.useRef(null),o=Wg(r),a=Hg(e);return x.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),x.createElement("input",le({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function lk(t){return t?"checked":"unchecked"}const TD=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fk="RadioGroup",[PD,TG]=Ir(fk,[Il,ak]),ck=Il(),uk=ak(),[ID,MD]=PD(fk),ND=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:f,loop:c=!0,onValueChange:u,...d}=t,v=ck(r),g=Jg(f),[m,M]=ul({prop:s,defaultProp:i,onChange:u});return x.createElement(ID,{scope:r,name:n,required:o,disabled:a,value:m,onValueChange:M},x.createElement(V9,le({asChild:!0},v,{orientation:l,dir:g,loop:c}),x.createElement(Be.div,le({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g},d,{ref:e}))))}),RD="RadioGroupItem",OD=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=MD(RD,r),o=s.disabled||n,a=ck(r),l=uk(r),f=x.useRef(null),c=Rt(e,f),u=s.value===i.value,d=x.useRef(!1);return x.useEffect(()=>{const v=m=>{TD.includes(m.key)&&(d.current=!0)},g=()=>d.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",g)}},[]),x.createElement(OS,le({asChild:!0},a,{focusable:!o,active:u}),x.createElement(ED,le({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:c,onCheck:()=>s.onValueChange(i.value),onKeyDown:we(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:we(i.onFocus,()=>{var v;d.current&&((v=f.current)===null||v===void 0||v.click())})})))}),DD=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=uk(r);return x.createElement(kD,le({},i,n,{ref:e}))}),BD=ND,LD=OD,$D=DD;var FD=Ot({defaultClassName:"io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rh",variantClassNames:{size:{sm:"io59uy7",lg:"io59uy8"}},defaultVariants:{},compoundVariants:[]}),jD=Ot({defaultClassName:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11ob fyvr12tz fyvr12tv fyvr12uj",variantClassNames:{size:{sm:"io59uy3 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy4 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const zD=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return W.jsx(pe,{alignItems:"center",children:W.jsx(kl,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:W.jsx(LD,{className:jD({size:n}),value:i,id:e,disabled:s,children:W.jsx($D,{className:FD({size:n})})})})})};x.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return W.jsx(BD,{disabled:n,name:s,ref:e,...l,children:W.jsx(pe,{flexDirection:r,gap:i,children:o.map(({label:f,value:c,disabled:u})=>W.jsx(zD,{id:`${s}-${c}`,label:f,size:a,value:c,disabled:u},c))})})});function Q2(t,[e,r]){return Math.min(r,Math.max(e,t))}const dk=x.forwardRef((t,e)=>x.createElement(Be.span,le({},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}}))),UD=[" ","Enter","ArrowUp","ArrowDown"],VD=[" ","Enter"],f1="Select",[c1,tm,WD]=n1(f1),[Ml,PG]=Ir(f1,[WD,Pl]),rm=Pl(),[HD,na]=Ml(f1),[qD,GD]=Ml(f1),KD=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:f,name:c,autoComplete:u,disabled:d,required:v}=t,g=rm(e),[m,M]=x.useState(null),[A,E]=x.useState(null),[S,P]=x.useState(!1),R=Jg(f),[L=!1,F]=ul({prop:n,defaultProp:i,onChange:s}),[z,H]=ul({prop:o,defaultProp:a,onChange:l}),q=x.useRef(null),K=m?Boolean(m.closest("form")):!0,[ne,O]=x.useState(new Set),y=Array.from(ne).map(w=>w.props.value).join(";");return x.createElement(k9,g,x.createElement(HD,{required:v,scope:e,trigger:m,onTriggerChange:M,valueNode:A,onValueNodeChange:E,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:Lc(),value:z,onValueChange:H,open:L,onOpenChange:F,dir:R,triggerPointerDownPosRef:q,disabled:d},x.createElement(c1.Provider,{scope:e},x.createElement(qD,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(w=>{O(T=>new Set(T).add(w))},[]),onNativeOptionRemove:x.useCallback(w=>{O(T=>{const N=new Set(T);return N.delete(w),N})},[])},r)),K?x.createElement(vk,{key:y,"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:u,value:z,onChange:w=>H(w.target.value),disabled:d},z===void 0?x.createElement("option",{value:""}):null,Array.from(ne)):null))},JD="SelectTrigger",QD=x.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=rm(r),o=na(JD,r),a=o.disabled||n,l=Rt(e,o.onTriggerChange),f=tm(r),[c,u,d]=yk(g=>{const m=f().filter(E=>!E.disabled),M=m.find(E=>E.value===o.value),A=pk(m,g,M);A!==void 0&&o.onValueChange(A.value)}),v=()=>{a||(o.onOpenChange(!0),d())};return x.createElement(_9,le({asChild:!0},s),x.createElement(Be.button,le({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":o.value===void 0?"":void 0},i,{ref:l,onClick:we(i.onClick,g=>{g.currentTarget.focus()}),onPointerDown:we(i.onPointerDown,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:we(i.onKeyDown,g=>{const m=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&u(g.key),!(m&&g.key===" ")&&UD.includes(g.key)&&(v(),g.preventDefault())})})))}),YD="SelectValue",XD=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o,...a}=t,l=na(YD,r),{onValueNodeHasChildrenChange:f}=l,c=s!==void 0,u=Rt(e,l.onValueNodeChange);return hn(()=>{f(c)},[f,c]),x.createElement(Be.span,le({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:s)}),ZD=x.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return x.createElement(Be.span,le({"aria-hidden":!0},i,{ref:e}),n||"ā–¼")}),hl="SelectContent",eB=x.forwardRef((t,e)=>{const r=na(hl,t.__scopeSelect),[n,i]=x.useState();if(hn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?wi.createPortal(x.createElement(hk,{scope:t.__scopeSelect},x.createElement(c1.Slot,{scope:t.__scopeSelect},x.createElement("div",null,t.children))),s):null}return x.createElement(tB,le({},t,{ref:e}))}),Ti=10,[hk,u1]=Ml(hl),tB=x.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:d,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:M,...A}=t,E=na(hl,r),[S,P]=x.useState(null),[R,L]=x.useState(null),F=Rt(e,B=>P(B)),[z,H]=x.useState(null),[q,K]=x.useState(null),ne=tm(r),[O,y]=x.useState(!1),w=x.useRef(!1);x.useEffect(()=>{if(S)return G9(S)},[S]),G7();const T=x.useCallback(B=>{const[j,...Y]=ne().map(J=>J.ref.current),[Z]=Y.slice(-1),G=document.activeElement;for(const J of B)if(J===G||(J==null||J.scrollIntoView({block:"nearest"}),J===j&&R&&(R.scrollTop=0),J===Z&&R&&(R.scrollTop=R.scrollHeight),J==null||J.focus(),document.activeElement!==G))return},[ne,R]),N=x.useCallback(()=>T([z,S]),[T,z,S]);x.useEffect(()=>{O&&N()},[O,N]);const{onOpenChange:p,triggerPointerDownPosRef:k}=E;x.useEffect(()=>{if(S){let B={x:0,y:0};const j=Z=>{var G,J,he,ie;B={x:Math.abs(Math.round(Z.pageX)-((G=(J=k.current)===null||J===void 0?void 0:J.x)!==null&&G!==void 0?G:0)),y:Math.abs(Math.round(Z.pageY)-((he=(ie=k.current)===null||ie===void 0?void 0:ie.y)!==null&&he!==void 0?he:0))}},Y=Z=>{B.x<=10&&B.y<=10?Z.preventDefault():S.contains(Z.target)||p(!1),document.removeEventListener("pointermove",j),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",Y,{capture:!0})}}},[S,p,k]),x.useEffect(()=>{const B=()=>p(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[p]);const[I,b]=yk(B=>{const j=ne().filter(G=>!G.disabled),Y=j.find(G=>G.ref.current===document.activeElement),Z=pk(j,B,Y);Z&&setTimeout(()=>Z.ref.current.focus())}),h=x.useCallback((B,j,Y)=>{const Z=!w.current&&!Y;(E.value!==void 0&&E.value===j||Z)&&(H(B),Z&&(w.current=!0))},[E.value]),_=x.useCallback(()=>S==null?void 0:S.focus(),[S]),$=x.useCallback((B,j,Y)=>{const Z=!w.current&&!Y;(E.value!==void 0&&E.value===j||Z)&&K(B)},[E.value]),C=n==="popper"?Y2:rB,D=C===Y2?{side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:d,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:M}:{};return x.createElement(hk,{scope:r,content:S,viewport:R,onViewportChange:L,itemRefCallback:h,selectedItem:z,onItemLeave:_,itemTextRefCallback:$,focusSelectedItem:N,selectedItemText:q,position:n,isPositioned:O,searchRef:I},x.createElement(TO,{as:cc,allowPinchZoom:!0},x.createElement(K7,{asChild:!0,trapped:E.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:we(i,B=>{var j;(j=E.trigger)===null||j===void 0||j.focus({preventScroll:!0}),B.preventDefault()})},x.createElement(dS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>E.onOpenChange(!1)},x.createElement(C,le({role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:B=>B.preventDefault()},A,D,{onPlaced:()=>y(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...A.style},onKeyDown:we(A.onKeyDown,B=>{const j=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!j&&B.key.length===1&&b(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let Z=ne().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(B.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const G=B.target,J=Z.indexOf(G);Z=Z.slice(J+1)}setTimeout(()=>T(Z)),B.preventDefault()}})}))))))}),rB=x.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=na(hl,r),o=u1(hl,r),[a,l]=x.useState(null),[f,c]=x.useState(null),u=Rt(e,F=>c(F)),d=tm(r),v=x.useRef(!1),g=x.useRef(!0),{viewport:m,selectedItem:M,selectedItemText:A,focusSelectedItem:E}=o,S=x.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&f&&m&&M&&A){const F=s.trigger.getBoundingClientRect(),z=f.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),q=A.getBoundingClientRect();if(s.dir!=="rtl"){const G=q.left-z.left,J=H.left-G,he=F.left-J,ie=F.width+he,ve=Math.max(ie,z.width),Kt=window.innerWidth-Ti,Ie=Q2(J,[Ti,Kt-ve]);a.style.minWidth=ie+"px",a.style.left=Ie+"px"}else{const G=z.right-q.right,J=window.innerWidth-H.right-G,he=window.innerWidth-F.right-J,ie=F.width+he,ve=Math.max(ie,z.width),Kt=window.innerWidth-Ti,Ie=Q2(J,[Ti,Kt-ve]);a.style.minWidth=ie+"px",a.style.right=Ie+"px"}const K=d(),ne=window.innerHeight-Ti*2,O=m.scrollHeight,y=window.getComputedStyle(f),w=parseInt(y.borderTopWidth,10),T=parseInt(y.paddingTop,10),N=parseInt(y.borderBottomWidth,10),p=parseInt(y.paddingBottom,10),k=w+T+O+p+N,I=Math.min(M.offsetHeight*5,k),b=window.getComputedStyle(m),h=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),$=F.top+F.height/2-Ti,C=ne-$,D=M.offsetHeight/2,B=M.offsetTop+D,j=w+T+B,Y=k-j;if(j<=$){const G=M===K[K.length-1].ref.current;a.style.bottom="0px";const J=f.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(C,D+(G?_:0)+J+N),ie=j+he;a.style.height=ie+"px"}else{const G=M===K[0].ref.current;a.style.top="0px";const he=Math.max($,w+m.offsetTop+(G?h:0)+D)+Y;a.style.height=he+"px",m.scrollTop=j-$+m.offsetTop}a.style.margin=`${Ti}px 0`,a.style.minHeight=I+"px",a.style.maxHeight=ne+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[d,s.trigger,s.valueNode,a,f,m,M,A,s.dir,n]);hn(()=>S(),[S]);const[P,R]=x.useState();hn(()=>{f&&R(window.getComputedStyle(f).zIndex)},[f]);const L=x.useCallback(F=>{F&&g.current===!0&&(S(),E==null||E(),g.current=!1)},[S,E]);return x.createElement(nB,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:L},x.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P}},x.createElement(Be.div,le({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),Y2=x.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Ti,...s}=t,o=rm(r);return x.createElement(T9,le({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}}))}),[nB,iB]=Ml(hl,{}),X2="SelectViewport",sB=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=u1(X2,r),s=iB(X2,r),o=Rt(e,i.onViewportChange),a=x.useRef(0);return x.createElement(x.Fragment,null,x.createElement("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}"}}),x.createElement(c1.Slot,{scope:r},x.createElement(Be.div,le({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:we(n.onScroll,l=>{const f=l.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&c){const d=Math.abs(a.current-f.scrollTop);if(d>0){const v=window.innerHeight-Ti*2,g=parseFloat(c.style.minHeight),m=parseFloat(c.style.height),M=Math.max(g,m);if(M0?S:0,c.style.justifyContent="flex-end")}}}a.current=f.scrollTop})}))))}),oB="SelectGroup",[aB,IG]=Ml(oB),lB=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Lc();return x.createElement(aB,{scope:r,id:i},x.createElement(Be.div,le({role:"group","aria-labelledby":i},n,{ref:e})))}),Ry="SelectItem",[fB,cB]=Ml(Ry),uB=x.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=na(Ry,r),l=u1(Ry,r),f=a.value===n,[c,u]=x.useState(s??""),[d,v]=x.useState(!1),g=Rt(e,A=>{var E;return(E=l.itemRefCallback)===null||E===void 0?void 0:E.call(l,A,n,i)}),m=Lc(),M=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};return x.createElement(fB,{scope:r,value:n,disabled:i,textId:m,isSelected:f,onItemTextChange:x.useCallback(A=>{u(E=>{var S;return E||((S=A==null?void 0:A.textContent)!==null&&S!==void 0?S:"").trim()})},[])},x.createElement(c1.ItemSlot,{scope:r,value:n,disabled:i,textValue:c},x.createElement(Be.div,le({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":f&&d,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:g,onFocus:we(o.onFocus,()=>v(!0)),onBlur:we(o.onBlur,()=>v(!1)),onPointerUp:we(o.onPointerUp,M),onPointerMove:we(o.onPointerMove,A=>{if(i){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}else A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(o.onPointerLeave,A=>{if(A.currentTarget===document.activeElement){var E;(E=l.onItemLeave)===null||E===void 0||E.call(l)}}),onKeyDown:we(o.onKeyDown,A=>{var E;((E=l.searchRef)===null||E===void 0?void 0:E.current)!==""&&A.key===" "||(VD.includes(A.key)&&M(),A.key===" "&&A.preventDefault())})}))))}),Au="SelectItemText",dB=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=na(Au,r),a=u1(Au,r),l=cB(Au,r),f=GD(Au,r),[c,u]=x.useState(null),d=Rt(e,A=>u(A),l.onItemTextChange,A=>{var E;return(E=a.itemTextRefCallback)===null||E===void 0?void 0:E.call(a,A,l.value,l.disabled)}),v=c==null?void 0:c.textContent,g=x.useMemo(()=>x.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},v),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:M}=f;return hn(()=>(m(g),()=>M(g)),[m,M,g]),x.createElement(x.Fragment,null,x.createElement(Be.span,le({id:l.textId},s,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?wi.createPortal(s.children,o.valueNode):null)}),vk=x.forwardRef((t,e)=>{const{value:r,...n}=t,i=x.useRef(null),s=Rt(e,i),o=Wg(r);return x.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&c){const u=new Event("change",{bubbles:!0});c.call(a,r),a.dispatchEvent(u)}},[o,r]),x.createElement(dk,{asChild:!0},x.createElement("select",le({},n,{ref:s,defaultValue:r})))});vk.displayName="BubbleSelect";function yk(t){const e=Tn(t),r=x.useRef(""),n=x.useRef(0),i=x.useCallback(o=>{const a=r.current+o;e(a),function l(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function pk(t,e,r){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=hB(t,Math.max(s,0));i.length===1&&(o=o.filter(f=>f!==r));const l=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function hB(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const vB=KD,yB=QD,pB=XD,gB=ZD,mB=eB,wB=sB,bB=lB,xB=uB,CB=dB;var AB="gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rb fyvr12rh fyvr11nj",EB="gohwumd fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12vk fyvr12vl fyvr12ve fyvr12vf fyvr11h0 fyvr11jw fyvr11ko fyvr12tz fyvr12tv fyvr12rh fyvr12ut fyvr12uj",SB="gohwum1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rh fyvr118c fyvr11jw fyvr11n2 fyvr12tz",kB=Ot({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const _B=x.forwardRef(({children:t,className:e,...r},n)=>W.jsx(xB,{className:Vr(EB,e),...r,ref:n,children:W.jsx(CB,{children:t})})),TB=x.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:f,placeholder:c,...u}=t;return W.jsx(kl,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:W.jsxs(vB,{disabled:n,name:l,...u,children:[W.jsxs(yB,{id:i??l,className:Vr(SB,kB({borderRadius:r})),ref:e,children:[W.jsx(pB,{placeholder:c}),W.jsx(pe,{as:gB,display:"inline-flex",children:W.jsx(lS,{})})]}),W.jsx(mB,{className:AB,children:W.jsx(wB,{children:W.jsx(bB,{children:f.map(({value:d,label:v,...g})=>W.jsx(_B,{value:d,...g,children:v},d))})})})]})})});x.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?W.jsx(ZS,{icon:fS,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return W.jsx(nk,{ref:e,name:s,leftIcon:p7,controls:r||l,placeholder:i,value:o,onChange:f=>n==null?void 0:n(f),...a})});var PB=Ot({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});x.forwardRef((t,e)=>{const{size:r="md",...n}=t;return W.jsx(pe,{className:PB({size:r}),color:"text50",ref:e,...n,children:W.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[W.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),W.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});x.forwardRef(({children:t},e)=>W.jsx(pe,{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}));const gk="Switch",[IB,MG]=Ir(gk);IB(gk);Ot({defaultClassName:"",variantClassNames:{active:{true:"fyvr11rn fyvr12rn fyvr12ux",false:"fyvr11ob fyvr12rb"},disabled:{true:"fyvr12uh"}},defaultVariants:{},compoundVariants:[]});const mk="Tabs",[MB,NG]=Ir(mk,[Il]);Il();MB(mk);var NB="fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";x.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return W.jsxs(pe,{className:NB,ref:e,background:"buttonGlass",...i,children:[r&&W.jsx(r,{size:"xs"}),W.jsx(rr,{children:n})]})});const RB="ToastProvider",[OB,RG,DB]=n1("Toast"),[wk,OG]=Ir("Toast",[DB]),[DG,bk]=wk(RB),Z2="toast.viewportPause",ex="toast.viewportResume",d1="Toast",BB="toast.swipeStart",LB="toast.swipeMove",$B="toast.swipeCancel",FB="toast.swipeEnd",[jB,zB]=wk(d1,{onClose(){}}),UB=x.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:f,onSwipeStart:c,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:v,...g}=t,m=bk(d1,r),[M,A]=x.useState(null),E=Rt(e,y=>A(y)),S=x.useRef(null),P=x.useRef(null),R=i||m.duration,L=x.useRef(0),F=x.useRef(R),z=x.useRef(0),{onToastAdd:H,onToastRemove:q}=m,K=Tn(()=>{var y;(M==null?void 0:M.contains(document.activeElement))&&((y=m.viewport)===null||y===void 0||y.focus()),o()}),ne=x.useCallback(y=>{!y||y===1/0||(window.clearTimeout(z.current),L.current=new Date().getTime(),z.current=window.setTimeout(K,y))},[K]);x.useEffect(()=>{const y=m.viewport;if(y){const w=()=>{ne(F.current),f==null||f()},T=()=>{const N=new Date().getTime()-L.current;F.current=F.current-N,window.clearTimeout(z.current),l==null||l()};return y.addEventListener(Z2,T),y.addEventListener(ex,w),()=>{y.removeEventListener(Z2,T),y.removeEventListener(ex,w)}}},[m.viewport,R,l,f,ne]),x.useEffect(()=>{s&&!m.isClosePausedRef.current&&ne(R)},[s,R,m.isClosePausedRef,ne]),x.useEffect(()=>(H(),()=>q()),[H,q]);const O=x.useMemo(()=>M?Ck(M):null,[M]);return m.viewport?x.createElement(x.Fragment,null,O&&x.createElement(VB,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},O),x.createElement(jB,{scope:r,onClose:K},wi.createPortal(x.createElement(OB.ItemSlot,{scope:r},x.createElement(q7,{asChild:!0,onEscapeKeyDown:we(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||K(),m.isFocusedToastEscapeKeyDownRef.current=!1})},x.createElement(Be.li,le({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection},g,{ref:E,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:we(t.onKeyDown,y=>{y.key==="Escape"&&(a==null||a(y.nativeEvent),y.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,K()))}),onPointerDown:we(t.onPointerDown,y=>{y.button===0&&(S.current={x:y.clientX,y:y.clientY})}),onPointerMove:we(t.onPointerMove,y=>{if(!S.current)return;const w=y.clientX-S.current.x,T=y.clientY-S.current.y,N=Boolean(P.current),p=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,I=p?k(0,w):0,b=p?0:k(0,T),h=y.pointerType==="touch"?10:2,_={x:I,y:b},$={originalEvent:y,delta:_};N?(P.current=_,Eu(LB,u,$,{discrete:!1})):tx(_,m.swipeDirection,h)?(P.current=_,Eu(BB,c,$,{discrete:!1}),y.target.setPointerCapture(y.pointerId)):(Math.abs(w)>h||Math.abs(T)>h)&&(S.current=null)}),onPointerUp:we(t.onPointerUp,y=>{const w=P.current,T=y.target;if(T.hasPointerCapture(y.pointerId)&&T.releasePointerCapture(y.pointerId),P.current=null,S.current=null,w){const N=y.currentTarget,p={originalEvent:y,delta:w};tx(w,m.swipeDirection,m.swipeThreshold)?Eu(FB,v,p,{discrete:!0}):Eu($B,d,p,{discrete:!0}),N.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})))),m.viewport))):null});UB.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${d1}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const VB=t=>{const{__scopeToast:e,children:r,...n}=t,i=bk(d1,e),[s,o]=x.useState(!1),[a,l]=x.useState(!1);return KB(()=>o(!0)),x.useEffect(()=>{const f=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(f)},[]),a?null:x.createElement(P9,{asChild:!0},x.createElement(dk,n,s&&x.createElement(x.Fragment,null,i.label," ",r)))},WB="ToastAction",HB=x.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?x.createElement(xk,{altText:r,asChild:!0},x.createElement(GB,le({},n,{ref:e}))):null});HB.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${WB}\``)}};const qB="ToastClose",GB=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=zB(qB,r);return x.createElement(xk,{asChild:!0},x.createElement(Be.button,le({type:"button"},n,{ref:e,onClick:we(t.onClick,i.onClose)})))}),xk=x.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return x.createElement(Be.div,le({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function Ck(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),JB(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Ck(n))}}),e}function Eu(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?qg(i,s):i.dispatchEvent(s)}const tx=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function KB(t=()=>{}){const e=Tn(t);hn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function JB(t){return t.nodeType===t.ELEMENT_NODE}Ot({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});x.createContext(null);var QB="_15pztn2",YB="_15pztn1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rh fyvr128 fyvr11h0";x.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",name:c,rows:u,resize:d=!1,...v}=t;return W.jsx(kl,{description:s,disabled:o,display:"grid",id:a??c,label:l,labelLocation:f,children:W.jsx(pe,{as:r,autoComplete:n,spellCheck:"false",className:Vr(YB,d&&QB),disabled:o,id:a??c,name:c,ref:e,rows:u,borderRadius:i,...v})})});const Oy=["dark","light"],XB="dark",ZB="data-theme",Ak="@sequence.theme",eL=()=>{const t=localStorage.getItem(Ak);return Oy.includes(t)?t:XB},tL=x.createContext(null),rL=t=>{const[e,r]=x.useState(t.theme||eL());x.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),x.useEffect(()=>{t.theme&&Oy.includes(t.theme)&&r(t.theme)},[t.theme]),x.useEffect(()=>{const i=document.querySelector(":root");i&&i.setAttribute(ZB,e)},[e]);const n=x.useMemo(()=>({theme:e,setTheme:i=>{Oy.includes(i)&&(localStorage.setItem(Ak,i),r(i))}}),[e]);return W.jsx(tL.Provider,{value:n,children:t.children})};var nL="bnrrebf fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",iL="bnrrebd",sL=Ot({defaultClassName:"fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb5",sm:"bnrreb6",md:"bnrreb7",lg:"bnrreb8"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const oL=x.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return W.jsx(pe,{className:Vr(r,sL({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?W.jsx(ek,{className:iL,disableAnimation:n,src:s}):W.jsx(rr,{className:nL,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[h1,BG]=Ir("Tooltip",[Pl]);Pl();const aL="TooltipProvider";h1(aL);const Ek="Tooltip";h1(Ek);const lL="TooltipPortal";h1(lL,{forceMount:void 0});h1(Ek,{isInside:!1});var Sk,rx=wi;Sk=rx.createRoot,rx.hydrateRoot;var Dy={},fL={get exports(){return Dy},set exports(t){Dy=t}};const cL={},uL=Object.freeze(Object.defineProperty({__proto__:null,default:cL},Symbol.toStringTag,{value:"Module"})),dL=T4(uL);(function(t){(function(e,r){function n(O,y){if(!O)throw new Error(y||"Assertion failed")}function i(O,y){O.super_=y;var w=function(){};w.prototype=y.prototype,O.prototype=new w,O.prototype.constructor=O}function s(O,y,w){if(s.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((y==="le"||y==="be")&&(w=y,y=10),this._init(O||0,y||10,w||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=dL.Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,w){return y.cmp(w)>0?y:w},s.min=function(y,w){return y.cmp(w)<0?y:w},s.prototype._init=function(y,w,T){if(typeof y=="number")return this._initNumber(y,w,T);if(typeof y=="object")return this._initArray(y,w,T);w==="hex"&&(w=16),n(w===(w|0)&&w>=2&&w<=36),y=y.toString().replace(/\s+/g,"");var N=0;y[0]==="-"&&(N++,this.negative=1),N=0;N-=3)k=y[N]|y[N-1]<<8|y[N-2]<<16,this.words[p]|=k<>>26-I&67108863,I+=24,I>=26&&(I-=26,p++);else if(T==="le")for(N=0,p=0;N>>26-I&67108863,I+=24,I>=26&&(I-=26,p++);return this._strip()};function a(O,y){var w=O.charCodeAt(y);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;n(!1,"Invalid character in "+O)}function l(O,y,w){var T=a(O,w);return w-1>=y&&(T|=a(O,w-1)<<4),T}s.prototype._parseHex=function(y,w,T){this.length=Math.ceil((y.length-w)/6),this.words=new Array(this.length);for(var N=0;N=w;N-=2)I=l(y,w,N)<=18?(p-=18,k+=1,this.words[k]|=I>>>26):p+=8;else{var b=y.length-w;for(N=b%2===0?w+1:w;N=18?(p-=18,k+=1,this.words[k]|=I>>>26):p+=8}this._strip()};function f(O,y,w,T){for(var N=0,p=0,k=Math.min(O.length,w),I=y;I=49?p=b-49+10:b>=17?p=b-17+10:p=b,n(b>=0&&p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(y,w){y=y||10,w=w|0||1;var T;if(y===16||y==="hex"){T="";for(var N=0,p=0,k=0;k>>24-N&16777215,N+=2,N>=26&&(N-=26,k--),p!==0||k!==this.length-1?T=d[6-b.length]+b+T:T=b+T}for(p!==0&&(T=p.toString(16)+T);T.length%w!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}if(y===(y|0)&&y>=2&&y<=36){var h=v[y],_=g[y];T="";var $=this.clone();for($.negative=0;!$.isZero();){var C=$.modrn(_).toString(y);$=$.idivn(_),$.isZero()?T=C+T:T=d[h-C.length]+C+T}for(this.isZero()&&(T="0"+T);T.length%w!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(y,w){return this.toArrayLike(o,y,w)}),s.prototype.toArray=function(y,w){return this.toArrayLike(Array,y,w)};var m=function(y,w){return y.allocUnsafe?y.allocUnsafe(w):new y(w)};s.prototype.toArrayLike=function(y,w,T){this._strip();var N=this.byteLength(),p=T||Math.max(1,N);n(N<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0");var k=m(y,p),I=w==="le"?"LE":"BE";return this["_toArrayLike"+I](k,N),k},s.prototype._toArrayLikeLE=function(y,w){for(var T=0,N=0,p=0,k=0;p>8&255),T>16&255),k===6?(T>24&255),N=0,k=0):(N=I>>>24,k+=2)}if(T=0&&(y[T--]=I>>8&255),T>=0&&(y[T--]=I>>16&255),k===6?(T>=0&&(y[T--]=I>>24&255),N=0,k=0):(N=I>>>24,k+=2)}if(T>=0)for(y[T--]=N;T>=0;)y[T--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var w=y,T=0;return w>=4096&&(T+=13,w>>>=13),w>=64&&(T+=7,w>>>=7),w>=8&&(T+=4,w>>>=4),w>=2&&(T+=2,w>>>=2),T+w},s.prototype._zeroBits=function(y){if(y===0)return 26;var w=y,T=0;return w&8191||(T+=13,w>>>=13),w&127||(T+=7,w>>>=7),w&15||(T+=4,w>>>=4),w&3||(T+=2,w>>>=2),w&1||T++,T},s.prototype.bitLength=function(){var y=this.words[this.length-1],w=this._countBits(y);return(this.length-1)*26+w};function M(O){for(var y=new Array(O.bitLength()),w=0;w>>N&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,w=0;wy.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var w;this.length>y.length?w=y:w=this;for(var T=0;Ty.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var w,T;this.length>y.length?(w=this,T=y):(w=y,T=this);for(var N=0;Ny.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var w=Math.ceil(y/26)|0,T=y%26;this._expand(w),T>0&&w--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-T),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,w){n(typeof y=="number"&&y>=0);var T=y/26|0,N=y%26;return this._expand(T+1),w?this.words[T]=this.words[T]|1<y.length?(T=this,N=y):(T=y,N=this);for(var p=0,k=0;k>>26;for(;p!==0&&k>>26;if(this.length=T.length,p!==0)this.words[this.length]=p,this.length++;else if(T!==this)for(;ky.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var w=this.iadd(y);return y.negative=1,w._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var T=this.cmp(y);if(T===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,p;T>0?(N=this,p=y):(N=y,p=this);for(var k=0,I=0;I>26,this.words[I]=w&67108863;for(;k!==0&&I>26,this.words[I]=w&67108863;if(k===0&&I>>26,$=b&67108863,C=Math.min(h,y.length-1),D=Math.max(0,h-O.length+1);D<=C;D++){var B=h-D|0;N=O.words[B]|0,p=y.words[D]|0,k=N*p+$,_+=k/67108864|0,$=k&67108863}w.words[h]=$|0,b=_|0}return b!==0?w.words[h]=b|0:w.length--,w._strip()}var E=function(y,w,T){var N=y.words,p=w.words,k=T.words,I=0,b,h,_,$=N[0]|0,C=$&8191,D=$>>>13,B=N[1]|0,j=B&8191,Y=B>>>13,Z=N[2]|0,G=Z&8191,J=Z>>>13,he=N[3]|0,ie=he&8191,ve=he>>>13,Kt=N[4]|0,Ie=Kt&8191,Ae=Kt>>>13,St=N[5]|0,De=St&8191,Ve=St>>>13,Js=N[6]|0,We=Js&8191,He=Js>>>13,Qs=N[7]|0,qe=Qs&8191,Ge=Qs>>>13,Ys=N[8]|0,Ke=Ys&8191,Je=Ys>>>13,Xs=N[9]|0,Qe=Xs&8191,Ye=Xs>>>13,Zs=p[0]|0,Xe=Zs&8191,Ze=Zs>>>13,eo=p[1]|0,et=eo&8191,tt=eo>>>13,to=p[2]|0,rt=to&8191,nt=to>>>13,ro=p[3]|0,it=ro&8191,st=ro>>>13,no=p[4]|0,ot=no&8191,at=no>>>13,io=p[5]|0,lt=io&8191,ft=io>>>13,so=p[6]|0,ct=so&8191,ut=so>>>13,oo=p[7]|0,dt=oo&8191,ht=oo>>>13,ao=p[8]|0,vt=ao&8191,yt=ao>>>13,lo=p[9]|0,pt=lo&8191,gt=lo>>>13;T.negative=y.negative^w.negative,T.length=19,b=Math.imul(C,Xe),h=Math.imul(C,Ze),h=h+Math.imul(D,Xe)|0,_=Math.imul(D,Ze);var ss=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(ss>>>26)|0,ss&=67108863,b=Math.imul(j,Xe),h=Math.imul(j,Ze),h=h+Math.imul(Y,Xe)|0,_=Math.imul(Y,Ze),b=b+Math.imul(C,et)|0,h=h+Math.imul(C,tt)|0,h=h+Math.imul(D,et)|0,_=_+Math.imul(D,tt)|0;var os=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(os>>>26)|0,os&=67108863,b=Math.imul(G,Xe),h=Math.imul(G,Ze),h=h+Math.imul(J,Xe)|0,_=Math.imul(J,Ze),b=b+Math.imul(j,et)|0,h=h+Math.imul(j,tt)|0,h=h+Math.imul(Y,et)|0,_=_+Math.imul(Y,tt)|0,b=b+Math.imul(C,rt)|0,h=h+Math.imul(C,nt)|0,h=h+Math.imul(D,rt)|0,_=_+Math.imul(D,nt)|0;var as=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(as>>>26)|0,as&=67108863,b=Math.imul(ie,Xe),h=Math.imul(ie,Ze),h=h+Math.imul(ve,Xe)|0,_=Math.imul(ve,Ze),b=b+Math.imul(G,et)|0,h=h+Math.imul(G,tt)|0,h=h+Math.imul(J,et)|0,_=_+Math.imul(J,tt)|0,b=b+Math.imul(j,rt)|0,h=h+Math.imul(j,nt)|0,h=h+Math.imul(Y,rt)|0,_=_+Math.imul(Y,nt)|0,b=b+Math.imul(C,it)|0,h=h+Math.imul(C,st)|0,h=h+Math.imul(D,it)|0,_=_+Math.imul(D,st)|0;var ls=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(ls>>>26)|0,ls&=67108863,b=Math.imul(Ie,Xe),h=Math.imul(Ie,Ze),h=h+Math.imul(Ae,Xe)|0,_=Math.imul(Ae,Ze),b=b+Math.imul(ie,et)|0,h=h+Math.imul(ie,tt)|0,h=h+Math.imul(ve,et)|0,_=_+Math.imul(ve,tt)|0,b=b+Math.imul(G,rt)|0,h=h+Math.imul(G,nt)|0,h=h+Math.imul(J,rt)|0,_=_+Math.imul(J,nt)|0,b=b+Math.imul(j,it)|0,h=h+Math.imul(j,st)|0,h=h+Math.imul(Y,it)|0,_=_+Math.imul(Y,st)|0,b=b+Math.imul(C,ot)|0,h=h+Math.imul(C,at)|0,h=h+Math.imul(D,ot)|0,_=_+Math.imul(D,at)|0;var fs=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(fs>>>26)|0,fs&=67108863,b=Math.imul(De,Xe),h=Math.imul(De,Ze),h=h+Math.imul(Ve,Xe)|0,_=Math.imul(Ve,Ze),b=b+Math.imul(Ie,et)|0,h=h+Math.imul(Ie,tt)|0,h=h+Math.imul(Ae,et)|0,_=_+Math.imul(Ae,tt)|0,b=b+Math.imul(ie,rt)|0,h=h+Math.imul(ie,nt)|0,h=h+Math.imul(ve,rt)|0,_=_+Math.imul(ve,nt)|0,b=b+Math.imul(G,it)|0,h=h+Math.imul(G,st)|0,h=h+Math.imul(J,it)|0,_=_+Math.imul(J,st)|0,b=b+Math.imul(j,ot)|0,h=h+Math.imul(j,at)|0,h=h+Math.imul(Y,ot)|0,_=_+Math.imul(Y,at)|0,b=b+Math.imul(C,lt)|0,h=h+Math.imul(C,ft)|0,h=h+Math.imul(D,lt)|0,_=_+Math.imul(D,ft)|0;var R1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(R1>>>26)|0,R1&=67108863,b=Math.imul(We,Xe),h=Math.imul(We,Ze),h=h+Math.imul(He,Xe)|0,_=Math.imul(He,Ze),b=b+Math.imul(De,et)|0,h=h+Math.imul(De,tt)|0,h=h+Math.imul(Ve,et)|0,_=_+Math.imul(Ve,tt)|0,b=b+Math.imul(Ie,rt)|0,h=h+Math.imul(Ie,nt)|0,h=h+Math.imul(Ae,rt)|0,_=_+Math.imul(Ae,nt)|0,b=b+Math.imul(ie,it)|0,h=h+Math.imul(ie,st)|0,h=h+Math.imul(ve,it)|0,_=_+Math.imul(ve,st)|0,b=b+Math.imul(G,ot)|0,h=h+Math.imul(G,at)|0,h=h+Math.imul(J,ot)|0,_=_+Math.imul(J,at)|0,b=b+Math.imul(j,lt)|0,h=h+Math.imul(j,ft)|0,h=h+Math.imul(Y,lt)|0,_=_+Math.imul(Y,ft)|0,b=b+Math.imul(C,ct)|0,h=h+Math.imul(C,ut)|0,h=h+Math.imul(D,ct)|0,_=_+Math.imul(D,ut)|0;var O1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(O1>>>26)|0,O1&=67108863,b=Math.imul(qe,Xe),h=Math.imul(qe,Ze),h=h+Math.imul(Ge,Xe)|0,_=Math.imul(Ge,Ze),b=b+Math.imul(We,et)|0,h=h+Math.imul(We,tt)|0,h=h+Math.imul(He,et)|0,_=_+Math.imul(He,tt)|0,b=b+Math.imul(De,rt)|0,h=h+Math.imul(De,nt)|0,h=h+Math.imul(Ve,rt)|0,_=_+Math.imul(Ve,nt)|0,b=b+Math.imul(Ie,it)|0,h=h+Math.imul(Ie,st)|0,h=h+Math.imul(Ae,it)|0,_=_+Math.imul(Ae,st)|0,b=b+Math.imul(ie,ot)|0,h=h+Math.imul(ie,at)|0,h=h+Math.imul(ve,ot)|0,_=_+Math.imul(ve,at)|0,b=b+Math.imul(G,lt)|0,h=h+Math.imul(G,ft)|0,h=h+Math.imul(J,lt)|0,_=_+Math.imul(J,ft)|0,b=b+Math.imul(j,ct)|0,h=h+Math.imul(j,ut)|0,h=h+Math.imul(Y,ct)|0,_=_+Math.imul(Y,ut)|0,b=b+Math.imul(C,dt)|0,h=h+Math.imul(C,ht)|0,h=h+Math.imul(D,dt)|0,_=_+Math.imul(D,ht)|0;var D1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(D1>>>26)|0,D1&=67108863,b=Math.imul(Ke,Xe),h=Math.imul(Ke,Ze),h=h+Math.imul(Je,Xe)|0,_=Math.imul(Je,Ze),b=b+Math.imul(qe,et)|0,h=h+Math.imul(qe,tt)|0,h=h+Math.imul(Ge,et)|0,_=_+Math.imul(Ge,tt)|0,b=b+Math.imul(We,rt)|0,h=h+Math.imul(We,nt)|0,h=h+Math.imul(He,rt)|0,_=_+Math.imul(He,nt)|0,b=b+Math.imul(De,it)|0,h=h+Math.imul(De,st)|0,h=h+Math.imul(Ve,it)|0,_=_+Math.imul(Ve,st)|0,b=b+Math.imul(Ie,ot)|0,h=h+Math.imul(Ie,at)|0,h=h+Math.imul(Ae,ot)|0,_=_+Math.imul(Ae,at)|0,b=b+Math.imul(ie,lt)|0,h=h+Math.imul(ie,ft)|0,h=h+Math.imul(ve,lt)|0,_=_+Math.imul(ve,ft)|0,b=b+Math.imul(G,ct)|0,h=h+Math.imul(G,ut)|0,h=h+Math.imul(J,ct)|0,_=_+Math.imul(J,ut)|0,b=b+Math.imul(j,dt)|0,h=h+Math.imul(j,ht)|0,h=h+Math.imul(Y,dt)|0,_=_+Math.imul(Y,ht)|0,b=b+Math.imul(C,vt)|0,h=h+Math.imul(C,yt)|0,h=h+Math.imul(D,vt)|0,_=_+Math.imul(D,yt)|0;var B1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(B1>>>26)|0,B1&=67108863,b=Math.imul(Qe,Xe),h=Math.imul(Qe,Ze),h=h+Math.imul(Ye,Xe)|0,_=Math.imul(Ye,Ze),b=b+Math.imul(Ke,et)|0,h=h+Math.imul(Ke,tt)|0,h=h+Math.imul(Je,et)|0,_=_+Math.imul(Je,tt)|0,b=b+Math.imul(qe,rt)|0,h=h+Math.imul(qe,nt)|0,h=h+Math.imul(Ge,rt)|0,_=_+Math.imul(Ge,nt)|0,b=b+Math.imul(We,it)|0,h=h+Math.imul(We,st)|0,h=h+Math.imul(He,it)|0,_=_+Math.imul(He,st)|0,b=b+Math.imul(De,ot)|0,h=h+Math.imul(De,at)|0,h=h+Math.imul(Ve,ot)|0,_=_+Math.imul(Ve,at)|0,b=b+Math.imul(Ie,lt)|0,h=h+Math.imul(Ie,ft)|0,h=h+Math.imul(Ae,lt)|0,_=_+Math.imul(Ae,ft)|0,b=b+Math.imul(ie,ct)|0,h=h+Math.imul(ie,ut)|0,h=h+Math.imul(ve,ct)|0,_=_+Math.imul(ve,ut)|0,b=b+Math.imul(G,dt)|0,h=h+Math.imul(G,ht)|0,h=h+Math.imul(J,dt)|0,_=_+Math.imul(J,ht)|0,b=b+Math.imul(j,vt)|0,h=h+Math.imul(j,yt)|0,h=h+Math.imul(Y,vt)|0,_=_+Math.imul(Y,yt)|0,b=b+Math.imul(C,pt)|0,h=h+Math.imul(C,gt)|0,h=h+Math.imul(D,pt)|0,_=_+Math.imul(D,gt)|0;var L1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(L1>>>26)|0,L1&=67108863,b=Math.imul(Qe,et),h=Math.imul(Qe,tt),h=h+Math.imul(Ye,et)|0,_=Math.imul(Ye,tt),b=b+Math.imul(Ke,rt)|0,h=h+Math.imul(Ke,nt)|0,h=h+Math.imul(Je,rt)|0,_=_+Math.imul(Je,nt)|0,b=b+Math.imul(qe,it)|0,h=h+Math.imul(qe,st)|0,h=h+Math.imul(Ge,it)|0,_=_+Math.imul(Ge,st)|0,b=b+Math.imul(We,ot)|0,h=h+Math.imul(We,at)|0,h=h+Math.imul(He,ot)|0,_=_+Math.imul(He,at)|0,b=b+Math.imul(De,lt)|0,h=h+Math.imul(De,ft)|0,h=h+Math.imul(Ve,lt)|0,_=_+Math.imul(Ve,ft)|0,b=b+Math.imul(Ie,ct)|0,h=h+Math.imul(Ie,ut)|0,h=h+Math.imul(Ae,ct)|0,_=_+Math.imul(Ae,ut)|0,b=b+Math.imul(ie,dt)|0,h=h+Math.imul(ie,ht)|0,h=h+Math.imul(ve,dt)|0,_=_+Math.imul(ve,ht)|0,b=b+Math.imul(G,vt)|0,h=h+Math.imul(G,yt)|0,h=h+Math.imul(J,vt)|0,_=_+Math.imul(J,yt)|0,b=b+Math.imul(j,pt)|0,h=h+Math.imul(j,gt)|0,h=h+Math.imul(Y,pt)|0,_=_+Math.imul(Y,gt)|0;var $1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+($1>>>26)|0,$1&=67108863,b=Math.imul(Qe,rt),h=Math.imul(Qe,nt),h=h+Math.imul(Ye,rt)|0,_=Math.imul(Ye,nt),b=b+Math.imul(Ke,it)|0,h=h+Math.imul(Ke,st)|0,h=h+Math.imul(Je,it)|0,_=_+Math.imul(Je,st)|0,b=b+Math.imul(qe,ot)|0,h=h+Math.imul(qe,at)|0,h=h+Math.imul(Ge,ot)|0,_=_+Math.imul(Ge,at)|0,b=b+Math.imul(We,lt)|0,h=h+Math.imul(We,ft)|0,h=h+Math.imul(He,lt)|0,_=_+Math.imul(He,ft)|0,b=b+Math.imul(De,ct)|0,h=h+Math.imul(De,ut)|0,h=h+Math.imul(Ve,ct)|0,_=_+Math.imul(Ve,ut)|0,b=b+Math.imul(Ie,dt)|0,h=h+Math.imul(Ie,ht)|0,h=h+Math.imul(Ae,dt)|0,_=_+Math.imul(Ae,ht)|0,b=b+Math.imul(ie,vt)|0,h=h+Math.imul(ie,yt)|0,h=h+Math.imul(ve,vt)|0,_=_+Math.imul(ve,yt)|0,b=b+Math.imul(G,pt)|0,h=h+Math.imul(G,gt)|0,h=h+Math.imul(J,pt)|0,_=_+Math.imul(J,gt)|0;var F1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(F1>>>26)|0,F1&=67108863,b=Math.imul(Qe,it),h=Math.imul(Qe,st),h=h+Math.imul(Ye,it)|0,_=Math.imul(Ye,st),b=b+Math.imul(Ke,ot)|0,h=h+Math.imul(Ke,at)|0,h=h+Math.imul(Je,ot)|0,_=_+Math.imul(Je,at)|0,b=b+Math.imul(qe,lt)|0,h=h+Math.imul(qe,ft)|0,h=h+Math.imul(Ge,lt)|0,_=_+Math.imul(Ge,ft)|0,b=b+Math.imul(We,ct)|0,h=h+Math.imul(We,ut)|0,h=h+Math.imul(He,ct)|0,_=_+Math.imul(He,ut)|0,b=b+Math.imul(De,dt)|0,h=h+Math.imul(De,ht)|0,h=h+Math.imul(Ve,dt)|0,_=_+Math.imul(Ve,ht)|0,b=b+Math.imul(Ie,vt)|0,h=h+Math.imul(Ie,yt)|0,h=h+Math.imul(Ae,vt)|0,_=_+Math.imul(Ae,yt)|0,b=b+Math.imul(ie,pt)|0,h=h+Math.imul(ie,gt)|0,h=h+Math.imul(ve,pt)|0,_=_+Math.imul(ve,gt)|0;var j1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(j1>>>26)|0,j1&=67108863,b=Math.imul(Qe,ot),h=Math.imul(Qe,at),h=h+Math.imul(Ye,ot)|0,_=Math.imul(Ye,at),b=b+Math.imul(Ke,lt)|0,h=h+Math.imul(Ke,ft)|0,h=h+Math.imul(Je,lt)|0,_=_+Math.imul(Je,ft)|0,b=b+Math.imul(qe,ct)|0,h=h+Math.imul(qe,ut)|0,h=h+Math.imul(Ge,ct)|0,_=_+Math.imul(Ge,ut)|0,b=b+Math.imul(We,dt)|0,h=h+Math.imul(We,ht)|0,h=h+Math.imul(He,dt)|0,_=_+Math.imul(He,ht)|0,b=b+Math.imul(De,vt)|0,h=h+Math.imul(De,yt)|0,h=h+Math.imul(Ve,vt)|0,_=_+Math.imul(Ve,yt)|0,b=b+Math.imul(Ie,pt)|0,h=h+Math.imul(Ie,gt)|0,h=h+Math.imul(Ae,pt)|0,_=_+Math.imul(Ae,gt)|0;var z1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(z1>>>26)|0,z1&=67108863,b=Math.imul(Qe,lt),h=Math.imul(Qe,ft),h=h+Math.imul(Ye,lt)|0,_=Math.imul(Ye,ft),b=b+Math.imul(Ke,ct)|0,h=h+Math.imul(Ke,ut)|0,h=h+Math.imul(Je,ct)|0,_=_+Math.imul(Je,ut)|0,b=b+Math.imul(qe,dt)|0,h=h+Math.imul(qe,ht)|0,h=h+Math.imul(Ge,dt)|0,_=_+Math.imul(Ge,ht)|0,b=b+Math.imul(We,vt)|0,h=h+Math.imul(We,yt)|0,h=h+Math.imul(He,vt)|0,_=_+Math.imul(He,yt)|0,b=b+Math.imul(De,pt)|0,h=h+Math.imul(De,gt)|0,h=h+Math.imul(Ve,pt)|0,_=_+Math.imul(Ve,gt)|0;var U1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(U1>>>26)|0,U1&=67108863,b=Math.imul(Qe,ct),h=Math.imul(Qe,ut),h=h+Math.imul(Ye,ct)|0,_=Math.imul(Ye,ut),b=b+Math.imul(Ke,dt)|0,h=h+Math.imul(Ke,ht)|0,h=h+Math.imul(Je,dt)|0,_=_+Math.imul(Je,ht)|0,b=b+Math.imul(qe,vt)|0,h=h+Math.imul(qe,yt)|0,h=h+Math.imul(Ge,vt)|0,_=_+Math.imul(Ge,yt)|0,b=b+Math.imul(We,pt)|0,h=h+Math.imul(We,gt)|0,h=h+Math.imul(He,pt)|0,_=_+Math.imul(He,gt)|0;var V1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(V1>>>26)|0,V1&=67108863,b=Math.imul(Qe,dt),h=Math.imul(Qe,ht),h=h+Math.imul(Ye,dt)|0,_=Math.imul(Ye,ht),b=b+Math.imul(Ke,vt)|0,h=h+Math.imul(Ke,yt)|0,h=h+Math.imul(Je,vt)|0,_=_+Math.imul(Je,yt)|0,b=b+Math.imul(qe,pt)|0,h=h+Math.imul(qe,gt)|0,h=h+Math.imul(Ge,pt)|0,_=_+Math.imul(Ge,gt)|0;var W1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(W1>>>26)|0,W1&=67108863,b=Math.imul(Qe,vt),h=Math.imul(Qe,yt),h=h+Math.imul(Ye,vt)|0,_=Math.imul(Ye,yt),b=b+Math.imul(Ke,pt)|0,h=h+Math.imul(Ke,gt)|0,h=h+Math.imul(Je,pt)|0,_=_+Math.imul(Je,gt)|0;var H1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(H1>>>26)|0,H1&=67108863,b=Math.imul(Qe,pt),h=Math.imul(Qe,gt),h=h+Math.imul(Ye,pt)|0,_=Math.imul(Ye,gt);var q1=(I+b|0)+((h&8191)<<13)|0;return I=(_+(h>>>13)|0)+(q1>>>26)|0,q1&=67108863,k[0]=ss,k[1]=os,k[2]=as,k[3]=ls,k[4]=fs,k[5]=R1,k[6]=O1,k[7]=D1,k[8]=B1,k[9]=L1,k[10]=$1,k[11]=F1,k[12]=j1,k[13]=z1,k[14]=U1,k[15]=V1,k[16]=W1,k[17]=H1,k[18]=q1,I!==0&&(k[19]=I,T.length++),T};Math.imul||(E=A);function S(O,y,w){w.negative=y.negative^O.negative,w.length=O.length+y.length;for(var T=0,N=0,p=0;p>>26)|0,N+=k>>>26,k&=67108863}w.words[p]=I,T=k,k=N}return T!==0?w.words[p]=T:w.length--,w._strip()}function P(O,y,w){return S(O,y,w)}s.prototype.mulTo=function(y,w){var T,N=this.length+y.length;return this.length===10&&y.length===10?T=E(this,y,w):N<63?T=A(this,y,w):N<1024?T=S(this,y,w):T=P(this,y,w),T},s.prototype.mul=function(y){var w=new s(null);return w.words=new Array(this.length+y.length),this.mulTo(y,w)},s.prototype.mulf=function(y){var w=new s(null);return w.words=new Array(this.length+y.length),P(this,y,w)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var w=y<0;w&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var T=0,N=0;N>=26,T+=p/67108864|0,T+=k>>>26,this.words[N]=k&67108863}return T!==0&&(this.words[N]=T,this.length++),w?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var w=M(y);if(w.length===0)return new s(1);for(var T=this,N=0;N=0);var w=y%26,T=(y-w)/26,N=67108863>>>26-w<<26-w,p;if(w!==0){var k=0;for(p=0;p>>26-w}k&&(this.words[p]=k,this.length++)}if(T!==0){for(p=this.length-1;p>=0;p--)this.words[p+T]=this.words[p];for(p=0;p=0);var N;w?N=(w-w%26)/26:N=0;var p=y%26,k=Math.min((y-p)/26,this.length),I=67108863^67108863>>>p<k)for(this.length-=k,h=0;h=0&&(_!==0||h>=N);h--){var $=this.words[h]|0;this.words[h]=_<<26-p|$>>>p,_=$&I}return b&&_!==0&&(b.words[b.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,w,T){return n(this.negative===0),this.iushrn(y,w,T)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var w=y%26,T=(y-w)/26,N=1<=0);var w=y%26,T=(y-w)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=T)return this;if(w!==0&&T++,this.length=Math.min(T,this.length),w!==0){var N=67108863^67108863>>>w<=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},s.prototype.isubn=function(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w>26)-(b/67108864|0),this.words[p+T]=k&67108863}for(;p>26,this.words[p+T]=k&67108863;if(I===0)return this._strip();for(n(I===-1),I=0,p=0;p>26,this.words[p]=k&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,w){var T=this.length-y.length,N=this.clone(),p=y,k=p.words[p.length-1]|0,I=this._countBits(k);T=26-I,T!==0&&(p=p.ushln(T),N.iushln(T),k=p.words[p.length-1]|0);var b=N.length-p.length,h;if(w!=="mod"){h=new s(null),h.length=b+1,h.words=new Array(h.length);for(var _=0;_=0;C--){var D=(N.words[p.length+C]|0)*67108864+(N.words[p.length+C-1]|0);for(D=Math.min(D/k|0,67108863),N._ishlnsubmul(p,D,C);N.negative!==0;)D--,N.negative=0,N._ishlnsubmul(p,1,C),N.isZero()||(N.negative^=1);h&&(h.words[C]=D)}return h&&h._strip(),N._strip(),w!=="div"&&T!==0&&N.iushrn(T),{div:h||null,mod:N}},s.prototype.divmod=function(y,w,T){if(n(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,p,k;return this.negative!==0&&y.negative===0?(k=this.neg().divmod(y,w),w!=="mod"&&(N=k.div.neg()),w!=="div"&&(p=k.mod.neg(),T&&p.negative!==0&&p.iadd(y)),{div:N,mod:p}):this.negative===0&&y.negative!==0?(k=this.divmod(y.neg(),w),w!=="mod"&&(N=k.div.neg()),{div:N,mod:k.mod}):this.negative&y.negative?(k=this.neg().divmod(y.neg(),w),w!=="div"&&(p=k.mod.neg(),T&&p.negative!==0&&p.isub(y)),{div:k.div,mod:p}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?w==="div"?{div:this.divn(y.words[0]),mod:null}:w==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,w)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var w=this.divmod(y);if(w.mod.isZero())return w.div;var T=w.div.negative!==0?w.mod.isub(y):w.mod,N=y.ushrn(1),p=y.andln(1),k=T.cmp(N);return k<0||p===1&&k===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},s.prototype.modrn=function(y){var w=y<0;w&&(y=-y),n(y<=67108863);for(var T=(1<<26)%y,N=0,p=this.length-1;p>=0;p--)N=(T*N+(this.words[p]|0))%y;return w?-N:N},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var w=y<0;w&&(y=-y),n(y<=67108863);for(var T=0,N=this.length-1;N>=0;N--){var p=(this.words[N]|0)+T*67108864;this.words[N]=p/y|0,T=p%y}return this._strip(),w?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var w=this,T=y.clone();w.negative!==0?w=w.umod(y):w=w.clone();for(var N=new s(1),p=new s(0),k=new s(0),I=new s(1),b=0;w.isEven()&&T.isEven();)w.iushrn(1),T.iushrn(1),++b;for(var h=T.clone(),_=w.clone();!w.isZero();){for(var $=0,C=1;!(w.words[0]&C)&&$<26;++$,C<<=1);if($>0)for(w.iushrn($);$-- >0;)(N.isOdd()||p.isOdd())&&(N.iadd(h),p.isub(_)),N.iushrn(1),p.iushrn(1);for(var D=0,B=1;!(T.words[0]&B)&&D<26;++D,B<<=1);if(D>0)for(T.iushrn(D);D-- >0;)(k.isOdd()||I.isOdd())&&(k.iadd(h),I.isub(_)),k.iushrn(1),I.iushrn(1);w.cmp(T)>=0?(w.isub(T),N.isub(k),p.isub(I)):(T.isub(w),k.isub(N),I.isub(p))}return{a:k,b:I,gcd:T.iushln(b)}},s.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var w=this,T=y.clone();w.negative!==0?w=w.umod(y):w=w.clone();for(var N=new s(1),p=new s(0),k=T.clone();w.cmpn(1)>0&&T.cmpn(1)>0;){for(var I=0,b=1;!(w.words[0]&b)&&I<26;++I,b<<=1);if(I>0)for(w.iushrn(I);I-- >0;)N.isOdd()&&N.iadd(k),N.iushrn(1);for(var h=0,_=1;!(T.words[0]&_)&&h<26;++h,_<<=1);if(h>0)for(T.iushrn(h);h-- >0;)p.isOdd()&&p.iadd(k),p.iushrn(1);w.cmp(T)>=0?(w.isub(T),N.isub(p)):(T.isub(w),p.isub(N))}var $;return w.cmpn(1)===0?$=N:$=p,$.cmpn(0)<0&&$.iadd(y),$},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var w=this.clone(),T=y.clone();w.negative=0,T.negative=0;for(var N=0;w.isEven()&&T.isEven();N++)w.iushrn(1),T.iushrn(1);do{for(;w.isEven();)w.iushrn(1);for(;T.isEven();)T.iushrn(1);var p=w.cmp(T);if(p<0){var k=w;w=T,T=k}else if(p===0||T.cmpn(1)===0)break;w.isub(T)}while(!0);return T.iushln(N)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){n(typeof y=="number");var w=y%26,T=(y-w)/26,N=1<>>26,I&=67108863,this.words[k]=I}return p!==0&&(this.words[k]=p,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var w=y<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;this._strip();var T;if(this.length>1)T=1;else{w&&(y=-y),n(y<=67108863,"Number is too big");var N=this.words[0]|0;T=N===y?0:Ny.length)return 1;if(this.length=0;T--){var N=this.words[T]|0,p=y.words[T]|0;if(N!==p){Np&&(w=1);break}}return w},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new K(y)},s.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var R={k256:null,p224:null,p192:null,p25519:null};function L(O,y){this.name=O,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},L.prototype.ireduce=function(y){var w=y,T;do this.split(w,this.tmp),w=this.imulK(w),w=w.iadd(this.tmp),T=w.bitLength();while(T>this.n);var N=T0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},L.prototype.split=function(y,w){y.iushrn(this.n,0,w)},L.prototype.imulK=function(y){return y.imul(this.k)};function F(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(F,L),F.prototype.split=function(y,w){for(var T=4194303,N=Math.min(y.length,9),p=0;p>>22,k=I}k>>>=22,y.words[p-10]=k,k===0&&y.length>10?y.length-=10:y.length-=9},F.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var w=0,T=0;T>>=26,y.words[T]=p,w=N}return w!==0&&(y.words[y.length++]=w),y},s._prime=function(y){if(R[y])return R[y];var w;if(y==="k256")w=new F;else if(y==="p224")w=new z;else if(y==="p192")w=new H;else if(y==="p25519")w=new q;else throw new Error("Unknown prime "+y);return R[y]=w,w};function K(O){if(typeof O=="string"){var y=s._prime(O);this.m=y.p,this.prime=y}else n(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}K.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},K.prototype._verify2=function(y,w){n((y.negative|w.negative)===0,"red works only with positives"),n(y.red&&y.red===w.red,"red works only with red numbers")},K.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},K.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},K.prototype.add=function(y,w){this._verify2(y,w);var T=y.add(w);return T.cmp(this.m)>=0&&T.isub(this.m),T._forceRed(this)},K.prototype.iadd=function(y,w){this._verify2(y,w);var T=y.iadd(w);return T.cmp(this.m)>=0&&T.isub(this.m),T},K.prototype.sub=function(y,w){this._verify2(y,w);var T=y.sub(w);return T.cmpn(0)<0&&T.iadd(this.m),T._forceRed(this)},K.prototype.isub=function(y,w){this._verify2(y,w);var T=y.isub(w);return T.cmpn(0)<0&&T.iadd(this.m),T},K.prototype.shl=function(y,w){return this._verify1(y),this.imod(y.ushln(w))},K.prototype.imul=function(y,w){return this._verify2(y,w),this.imod(y.imul(w))},K.prototype.mul=function(y,w){return this._verify2(y,w),this.imod(y.mul(w))},K.prototype.isqr=function(y){return this.imul(y,y.clone())},K.prototype.sqr=function(y){return this.mul(y,y)},K.prototype.sqrt=function(y){if(y.isZero())return y.clone();var w=this.m.andln(3);if(n(w%2===1),w===3){var T=this.m.add(new s(1)).iushrn(2);return this.pow(y,T)}for(var N=this.m.subn(1),p=0;!N.isZero()&&N.andln(1)===0;)p++,N.iushrn(1);n(!N.isZero());var k=new s(1).toRed(this),I=k.redNeg(),b=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new s(2*h*h).toRed(this);this.pow(h,b).cmp(I)!==0;)h.redIAdd(I);for(var _=this.pow(h,N),$=this.pow(y,N.addn(1).iushrn(1)),C=this.pow(y,N),D=p;C.cmp(k)!==0;){for(var B=C,j=0;B.cmp(k)!==0;j++)B=B.redSqr();n(j=0;p--){for(var _=w.words[p],$=h-1;$>=0;$--){var C=_>>$&1;if(k!==N[0]&&(k=this.sqr(k)),C===0&&I===0){b=0;continue}I<<=1,I|=C,b++,!(b!==T&&(p!==0||$!==0))&&(k=this.mul(k,N[I]),b=0,I=0)}h=26}return k},K.prototype.convertTo=function(y){var w=y.umod(this.m);return w===y?w.clone():w},K.prototype.convertFrom=function(y){var w=y.clone();return w.red=null,w},s.mont=function(y){return new ne(y)};function ne(O){K.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ne,K),ne.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},ne.prototype.convertFrom=function(y){var w=this.imod(y.mul(this.rinv));return w.red=null,w},ne.prototype.imul=function(y,w){if(y.isZero()||w.isZero())return y.words[0]=0,y.length=1,y;var T=y.imul(w),N=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=T.isub(N).iushrn(this.shift),k=p;return p.cmp(this.m)>=0?k=p.isub(this.m):p.cmpn(0)<0&&(k=p.iadd(this.m)),k._forceRed(this)},ne.prototype.mul=function(y,w){if(y.isZero()||w.isZero())return new s(0)._forceRed(this);var T=y.mul(w),N=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=T.isub(N).iushrn(this.shift),k=p;return p.cmp(this.m)>=0?k=p.isub(this.m):p.cmpn(0)<0&&(k=p.iadd(this.m)),k._forceRed(this)},ne.prototype.invm=function(y){var w=this.imod(y._invmp(this.m).mul(this.r2));return w._forceRed(this)}})(t,TC)})(fL);const me=Dy,hL="logger/5.7.0";let nx=!1,ix=!1;const Zu={debug:1,default:2,info:2,warning:3,error:4,off:5};let sx=Zu.default,Wv=null;function vL(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const ox=vL();var By;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(By||(By={}));var zn;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(zn||(zn={}));const ax="0123456789abcdef";let V=class Yt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Zu[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(sx>Zu[n])&&console.log.apply(console,r)}debug(...e){this._log(Yt.levels.DEBUG,e)}info(...e){this._log(Yt.levels.INFO,e)}warn(...e){this._log(Yt.levels.WARNING,e)}makeError(e,r,n){if(ix)return this.makeError("censored error",r,{});r||(r=Yt.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const f=n[l];try{if(f instanceof Uint8Array){let c="";for(let u=0;u>4],c+=ax[f[u]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(f))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case zn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case zn.CALL_EXCEPTION:case zn.INSUFFICIENT_FUNDS:case zn.MISSING_NEW:case zn.NONCE_EXPIRED:case zn.REPLACEMENT_UNDERPRICED:case zn.TRANSACTION_REPLACED:case zn.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Yt.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){ox&&this.throwError("platform missing String.prototype.normalize",Yt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ox})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Yt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Yt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Yt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Yt.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Yt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Yt.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Wv||(Wv=new Yt(hL)),Wv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Yt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),nx){if(!e)return;this.globalLogger().throwError("error censorship permanent",Yt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ix=!!e,nx=!!r}static setLogLevel(e){const r=Zu[e.toLowerCase()];if(r==null){Yt.globalLogger().warn("invalid log level - "+e);return}sx=r}static from(e){return new Yt(e)}};V.errors=zn;V.levels=By;const yL="bytes/5.7.0",Dt=new V(yL);function kk(t){return!!t.toHexString}function Qa(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Qa(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Gi(t){return Me(t)&&!(t.length%2)||Zi(t)}function lx(t){return typeof t=="number"&&t==t&&t%1===0}function Zi(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!lx(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){Dt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Qa(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kk(t)&&(t=t.toHexString()),Me(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Dt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Qa(n)}function yi(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&Dt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Qa(r)}function Me(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Hv="0123456789abcdef";function Q(t,e){if(e||(e={}),typeof t=="number"){Dt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Hv[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kk(t))return t.toHexString();if(Me(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Dt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Zi(t)){let r="0x";for(let n=0;n>4]+Hv[i&15]}return r}return Dt.throwArgumentError("invalid hexlify value","value",t)}function bi(t){if(typeof t!="string")t=Q(t);else if(!Me(t)||t.length%2)return null;return(t.length-2)/2}function Ut(t,e,r){return typeof t!="string"?t=Q(t):(!Me(t)||t.length%2)&&Dt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Br(t){let e="0x";return t.forEach(r=>{e+=Q(r).substring(2)}),e}function v1(t){const e=_k(Q(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function _k(t){typeof t!="string"&&(t=Q(t)),Me(t)||Dt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Dt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function ia(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Gi(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64))):r.length===65?(e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64)),e.v=r[64]):Dt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Dt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Q(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=Tf(X(e._vs),32);e._vs=Q(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Dt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Q(i);e.s==null?e.s=o:e.s!==o&&Dt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Dt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Dt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Me(e.r)?Dt.throwArgumentError("signature missing or invalid r","signature",t):e.r=$e(e.r,32),e.s==null||!Me(e.s)?Dt.throwArgumentError("signature missing or invalid s","signature",t):e.s=$e(e.s,32);const r=X(e.s);r[0]>=128&&Dt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Q(r);e._vs&&(Me(e._vs)||Dt.throwArgumentError("signature invalid _vs","signature",t),e._vs=$e(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Dt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function pL(t){return t=ia(t),Q(Et([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const Tk="bignumber/5.7.0";var hc=me.BN;const Pi=new V(Tk),qv={},fx=9007199254740991;function gL(t){return t!=null&&(U.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Me(t)||typeof t=="bigint"||Zi(t))}let cx=!1;class U{constructor(e,r){e!==qv&&Pi.throwError("cannot call constructor directly; use BigNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wr(ke(this).fromTwos(e))}toTwos(e){return Wr(ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?U.from(this._hex.substring(1)):this}add(e){return Wr(ke(this).add(ke(e)))}sub(e){return Wr(ke(this).sub(ke(e)))}div(e){return U.from(e).isZero()&&gn("division-by-zero","div"),Wr(ke(this).div(ke(e)))}mul(e){return Wr(ke(this).mul(ke(e)))}mod(e){const r=ke(e);return r.isNeg()&&gn("division-by-zero","mod"),Wr(ke(this).umod(r))}pow(e){const r=ke(e);return r.isNeg()&&gn("negative-power","pow"),Wr(ke(this).pow(r))}and(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","and"),Wr(ke(this).and(r))}or(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","or"),Wr(ke(this).or(r))}xor(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","xor"),Wr(ke(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&gn("negative-width","mask"),Wr(ke(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&gn("negative-width","shl"),Wr(ke(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&gn("negative-width","shr"),Wr(ke(this).shrn(e))}eq(e){return ke(this).eq(ke(e))}lt(e){return ke(this).lt(ke(e))}lte(e){return ke(this).lte(ke(e))}gt(e){return ke(this).gt(ke(e))}gte(e){return ke(this).gte(ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ke(this).isZero()}toNumber(){try{return ke(this).toNumber()}catch{gn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Pi.throwError("this platform does not support BigInt",V.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?cx||(cx=!0,Pi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Pi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",V.errors.UNEXPECTED_ARGUMENT,{}):Pi.throwError("BigNumber.toString does not accept parameters",V.errors.UNEXPECTED_ARGUMENT,{})),ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof U)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new U(qv,vc(e)):e.match(/^-?[0-9]+$/)?new U(qv,vc(new hc(e))):Pi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&gn("underflow","BigNumber.from",e),(e>=fx||e<=-fx)&&gn("overflow","BigNumber.from",e),U.from(String(e));const r=e;if(typeof r=="bigint")return U.from(r.toString());if(Zi(r))return U.from(Q(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return U.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Me(n)||n[0]==="-"&&Me(n.substring(1))))return U.from(n)}return Pi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function vc(t){if(typeof t!="string")return vc(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Pi.throwArgumentError("invalid hex","value",t),t=vc(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Wr(t){return U.from(vc(t))}function ke(t){const e=U.from(t).toHexString();return e[0]==="-"?new hc("-"+e.substring(3),16):new hc(e.substring(2),16)}function gn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Pi.throwError(t,V.errors.NUMERIC_FAULT,n)}function mL(t){return new hc(t,36).toString(16)}function wL(t){return new hc(t,16).toString(36)}const Lr=new V(Tk),Pf={},Pk=U.from(0),Ik=U.from(-1);function Mk(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Lr.throwError(t,V.errors.NUMERIC_FAULT,i)}let If="0";for(;If.length<256;)If+=If;function nm(t){if(typeof t!="number")try{t=U.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+If.substring(0,t):Lr.throwArgumentError("invalid decimal size","decimals",t)}function ed(t,e){e==null&&(e=0);const r=nm(e);t=U.from(t);const n=t.lt(Pk);n&&(t=t.mul(Ik));let i=t.mod(r).toString();for(;i.length2&&Lr.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&Mk("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Lr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Lr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Lr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Ya(Pf,r,n,i)}}class dr{constructor(e,r,n,i){e!==Pf&&Lr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Lr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=dr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(ux.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=dr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(ux.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Lr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=dr.from("1"+If.substring(0,e),this.format),i=bL.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Lr.throwArgumentError("invalid byte width","width",e);const r=U.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return $e(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return dr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!gL(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),dr.fromString(ed(e,r),Ya.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Ya.from(r),i=ri(e,n.decimals);!n.signed&&i.lt(Pk)&&Mk("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=$e(s,n.width/8));const o=ed(i,n.decimals);return new dr(Pf,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Ya.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=U.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=ed(i,n.decimals);return new dr(Pf,s,o,n)}static from(e,r){if(typeof e=="string")return dr.fromString(e,r);if(Zi(e))return dr.fromBytes(e,r);try{return dr.fromValue(e,0,r)}catch(n){if(n.code!==V.errors.INVALID_ARGUMENT)throw n}return Lr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const ux=dr.from(1),bL=dr.from("0.5"),xL="properties/5.7.0";var CL=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const ih=new V(xL);function ee(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function qn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function xt(t){return CL(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function im(t,e){(!t||typeof t!="object")&&ih.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||ih.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const AL={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Nk(t){if(t==null||AL[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rxi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ee(e,r,xi(n))}return e}return ih.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function xi(t){return EL(t)}class $c{constructor(e){for(const r in e)this[r]=xi(e[r])}}const Fc="abi/5.7.0",Ne=new V(Fc),Uo={};let dx={calldata:!0,memory:!0,storage:!0},SL={calldata:!0,memory:!0};function Su(t,e){if(t==="bytes"||t==="string"){if(dx[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&SL[e])return!0;return(dx[e]||e==="payable")&&Ne.throwArgumentError("invalid modifier","name",e),!1}function kL(t,e){let r=t;function n(a){Ne.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Re.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Re.full?", ":",")+")"):r+=this.type,e!==Re.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Re.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?tr.fromString(e,r):tr.fromObject(e)}static fromObject(e){return tr.isParamType(e)?e:new tr(Uo,{name:e.name||null,type:xa(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(tr.fromObject):null})}static fromString(e,r){function n(i){return tr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(kL(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function yc(t,e){return PL(t).map(r=>tr.fromString(r,e))}class ci{constructor(e,r){e!==Uo&&Ne.throwError("use a static from method",V.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),td(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return ci.isFragment(e)?e:typeof e=="string"?ci.fromString(e):ci.fromObject(e)}static fromObject(e){if(ci.isFragment(e))return e;switch(e.type){case"function":return Hn.fromObject(e);case"event":return fi.fromObject(e);case"constructor":return Wn.fromObject(e);case"error":return Oi.fromObject(e);case"fallback":case"receive":return null}return Ne.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?fi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Hn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Wn.fromString(e.trim()):e.split(" ")[0]==="error"?Oi.fromString(e.substring(5).trim()):Ne.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class fi extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",e!==Re.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?fi.fromString(e):fi.fromObject(e)}static fromObject(e){if(fi.isEventFragment(e))return e;e.type!=="event"&&Ne.throwArgumentError("invalid event object","value",e);const r={name:pc(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(tr.fromObject):[],type:"event"};return new fi(Uo,r)}static fromString(e){let r=e.match(gc);r||Ne.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Ne.warn("unknown modifier: "+i)}}),fi.fromObject({name:r[1].trim(),anonymous:n,inputs:yc(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Rk(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ne.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ne.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=U.from(r[1]),r[0]):t}function Ok(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function Dk(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ne.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ne.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ne.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e}class Wn extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Re.sighash&&Ne.throwError("cannot format a constructor for sighash",V.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Wn.fromString(e):Wn.fromObject(e)}static fromObject(e){if(Wn.isConstructorFragment(e))return e;e.type!=="constructor"&&Ne.throwArgumentError("invalid constructor object","value",e);let r=Dk(e);r.constant&&Ne.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(tr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?U.from(e.gas):null};return new Wn(Uo,n)}static fromString(e){let r={type:"constructor"};e=Rk(e,r);let n=e.match(gc);return(!n||n[1].trim()!=="constructor")&&Ne.throwArgumentError("invalid constructor string","value",e),r.inputs=yc(n[2].trim(),!1),Ok(n[3].trim(),r),Wn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Hn extends Wn{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.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?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",e!==Re.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Hn.fromString(e):Hn.fromObject(e)}static fromObject(e){if(Hn.isFunctionFragment(e))return e;e.type!=="function"&&Ne.throwArgumentError("invalid function object","value",e);let r=Dk(e);const n={type:e.type,name:pc(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(tr.fromObject):[],outputs:e.outputs?e.outputs.map(tr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?U.from(e.gas):null};return new Hn(Uo,n)}static fromString(e){let r={type:"function"};e=Rk(e,r);let n=e.split(" returns ");n.length>2&&Ne.throwArgumentError("invalid function string","value",e);let i=n[0].match(gc);if(i||Ne.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&pc(r.name),r.inputs=yc(i[2],!1),Ok(i[3].trim(),r),n.length>1){let s=n[1].match(gc);(s[1].trim()!=""||s[3].trim()!="")&&Ne.throwArgumentError("unexpected tokens","value",e),r.outputs=yc(s[2],!1)}else r.outputs=[];return Hn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function hx(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ne.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Oi extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Oi.fromString(e):Oi.fromObject(e)}static fromObject(e){if(Oi.isErrorFragment(e))return e;e.type!=="error"&&Ne.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:pc(e.name),inputs:e.inputs?e.inputs.map(tr.fromObject):[]};return hx(new Oi(Uo,r))}static fromString(e){let r={type:"error"},n=e.match(gc);return n||Ne.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&pc(r.name),r.inputs=yc(n[2],!1),hx(Oi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function xa(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const TL=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function pc(t){return(!t||!t.match(TL))&&Ne.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const gc=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function PL(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&sm.throwError("value out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Et([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class sh{constructor(e,r,n,i){ee(this,"_data",X(e)),ee(this,"wordSize",r||32),ee(this,"_coerceFunc",n),ee(this,"allowLoose",i),this._offset=0}get data(){return Q(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):sh.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:sm.throwError("data out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new sh(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return U.from(this.readBytes(this.wordSize))}}var $y={},IL={get exports(){return $y},set exports(t){$y=t}};/** - * [js-sha3]{@link https://github.com/emn178/js-sha3} - * - * @version 0.8.0 - * @author Chen, Yi-Cyuan [emn178@gmail.com] - * @copyright Chen, Yi-Cyuan 2015-2018 - * @license MIT - */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=TC:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],v=[6,1536,393216,100663296],g=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],M=[224,256,384,512],A=[128,256],E=["hex","buffer","arrayBuffer","array","digest"],S={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var P=function(C,D,B){return function(j){return new h(C,D,C).update(j)[B]()}},R=function(C,D,B){return function(j,Y){return new h(C,D,Y).update(j)[B]()}},L=function(C,D,B){return function(j,Y,Z,G){return y["cshake"+C].update(j,Y,Z,G)[B]()}},F=function(C,D,B){return function(j,Y,Z,G){return y["kmac"+C].update(j,Y,Z,G)[B]()}},z=function(C,D,B,j){for(var Y=0;Y>5,this.byteCount=this.blockCount<<2,this.outputBlocks=B>>5,this.extraBytes=(B&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}h.prototype.update=function(C){if(this.finalized)throw new Error(r);var D,B=typeof C;if(B!=="string"){if(B==="object"){if(C===null)throw new Error(e);if(l&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!l||!ArrayBuffer.isView(C)))throw new Error(e)}else throw new Error(e);D=!0}for(var j=this.blocks,Y=this.byteCount,Z=C.length,G=this.blockCount,J=0,he=this.s,ie,ve;J>2]|=C[J]<>2]|=ve<>2]|=(192|ve>>6)<>2]|=(128|ve&63)<=57344?(j[ie>>2]|=(224|ve>>12)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<>2]|=(240|ve>>18)<>2]|=(128|ve>>12&63)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<=Y){for(this.start=ie-Y,this.block=j[G],ie=0;ie>8,B=C&255;B>0;)Y.unshift(B),C=C>>8,B=C&255,++j;return D?Y.push(j):Y.unshift(j),this.update(Y),Y.length},h.prototype.encodeString=function(C){var D,B=typeof C;if(B!=="string"){if(B==="object"){if(C===null)throw new Error(e);if(l&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!l||!ArrayBuffer.isView(C)))throw new Error(e)}else throw new Error(e);D=!0}var j=0,Y=C.length;if(D)j=Y;else for(var Z=0;Z=57344?j+=3:(G=65536+((G&1023)<<10|C.charCodeAt(++Z)&1023),j+=4)}return j+=this.encode(j*8),this.update(C),j},h.prototype.bytepad=function(C,D){for(var B=this.encode(D),j=0;j>2]|=this.padding[D&3],this.lastByteIndex===this.byteCount)for(C[0]=C[B],D=1;D>4&15]+f[J&15]+f[J>>12&15]+f[J>>8&15]+f[J>>20&15]+f[J>>16&15]+f[J>>28&15]+f[J>>24&15];Z%C===0&&($(D),Y=0)}return j&&(J=D[Y],G+=f[J>>4&15]+f[J&15],j>1&&(G+=f[J>>12&15]+f[J>>8&15]),j>2&&(G+=f[J>>20&15]+f[J>>16&15])),G},h.prototype.arrayBuffer=function(){this.finalize();var C=this.blockCount,D=this.s,B=this.outputBlocks,j=this.extraBytes,Y=0,Z=0,G=this.outputBits>>3,J;j?J=new ArrayBuffer(B+1<<2):J=new ArrayBuffer(G);for(var he=new Uint32Array(J);Z>8&255,G[J+2]=he>>16&255,G[J+3]=he>>24&255;Z%C===0&&$(D)}return j&&(J=Z<<2,he=D[Y],G[J]=he&255,j>1&&(G[J+1]=he>>8&255),j>2&&(G[J+2]=he>>16&255)),G};function _(C,D,B){h.call(this,C,D,B)}_.prototype=new h,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),h.prototype.finalize.call(this)};var $=function(C){var D,B,j,Y,Z,G,J,he,ie,ve,Kt,Ie,Ae,St,De,Ve,Js,We,He,Qs,qe,Ge,Ys,Ke,Je,Xs,Qe,Ye,Zs,Xe,Ze,eo,et,tt,to,rt,nt,ro,it,st,no,ot,at,io,lt,ft,so,ct,ut,oo,dt,ht,ao,vt,yt,lo,pt,gt,ss,os,as,ls,fs;for(j=0;j<48;j+=2)Y=C[0]^C[10]^C[20]^C[30]^C[40],Z=C[1]^C[11]^C[21]^C[31]^C[41],G=C[2]^C[12]^C[22]^C[32]^C[42],J=C[3]^C[13]^C[23]^C[33]^C[43],he=C[4]^C[14]^C[24]^C[34]^C[44],ie=C[5]^C[15]^C[25]^C[35]^C[45],ve=C[6]^C[16]^C[26]^C[36]^C[46],Kt=C[7]^C[17]^C[27]^C[37]^C[47],Ie=C[8]^C[18]^C[28]^C[38]^C[48],Ae=C[9]^C[19]^C[29]^C[39]^C[49],D=Ie^(G<<1|J>>>31),B=Ae^(J<<1|G>>>31),C[0]^=D,C[1]^=B,C[10]^=D,C[11]^=B,C[20]^=D,C[21]^=B,C[30]^=D,C[31]^=B,C[40]^=D,C[41]^=B,D=Y^(he<<1|ie>>>31),B=Z^(ie<<1|he>>>31),C[2]^=D,C[3]^=B,C[12]^=D,C[13]^=B,C[22]^=D,C[23]^=B,C[32]^=D,C[33]^=B,C[42]^=D,C[43]^=B,D=G^(ve<<1|Kt>>>31),B=J^(Kt<<1|ve>>>31),C[4]^=D,C[5]^=B,C[14]^=D,C[15]^=B,C[24]^=D,C[25]^=B,C[34]^=D,C[35]^=B,C[44]^=D,C[45]^=B,D=he^(Ie<<1|Ae>>>31),B=ie^(Ae<<1|Ie>>>31),C[6]^=D,C[7]^=B,C[16]^=D,C[17]^=B,C[26]^=D,C[27]^=B,C[36]^=D,C[37]^=B,C[46]^=D,C[47]^=B,D=ve^(Y<<1|Z>>>31),B=Kt^(Z<<1|Y>>>31),C[8]^=D,C[9]^=B,C[18]^=D,C[19]^=B,C[28]^=D,C[29]^=B,C[38]^=D,C[39]^=B,C[48]^=D,C[49]^=B,St=C[0],De=C[1],ft=C[11]<<4|C[10]>>>28,so=C[10]<<4|C[11]>>>28,Ye=C[20]<<3|C[21]>>>29,Zs=C[21]<<3|C[20]>>>29,os=C[31]<<9|C[30]>>>23,as=C[30]<<9|C[31]>>>23,ot=C[40]<<18|C[41]>>>14,at=C[41]<<18|C[40]>>>14,tt=C[2]<<1|C[3]>>>31,to=C[3]<<1|C[2]>>>31,Ve=C[13]<<12|C[12]>>>20,Js=C[12]<<12|C[13]>>>20,ct=C[22]<<10|C[23]>>>22,ut=C[23]<<10|C[22]>>>22,Xe=C[33]<<13|C[32]>>>19,Ze=C[32]<<13|C[33]>>>19,ls=C[42]<<2|C[43]>>>30,fs=C[43]<<2|C[42]>>>30,vt=C[5]<<30|C[4]>>>2,yt=C[4]<<30|C[5]>>>2,rt=C[14]<<6|C[15]>>>26,nt=C[15]<<6|C[14]>>>26,We=C[25]<<11|C[24]>>>21,He=C[24]<<11|C[25]>>>21,oo=C[34]<<15|C[35]>>>17,dt=C[35]<<15|C[34]>>>17,eo=C[45]<<29|C[44]>>>3,et=C[44]<<29|C[45]>>>3,Ke=C[6]<<28|C[7]>>>4,Je=C[7]<<28|C[6]>>>4,lo=C[17]<<23|C[16]>>>9,pt=C[16]<<23|C[17]>>>9,ro=C[26]<<25|C[27]>>>7,it=C[27]<<25|C[26]>>>7,Qs=C[36]<<21|C[37]>>>11,qe=C[37]<<21|C[36]>>>11,ht=C[47]<<24|C[46]>>>8,ao=C[46]<<24|C[47]>>>8,io=C[8]<<27|C[9]>>>5,lt=C[9]<<27|C[8]>>>5,Xs=C[18]<<20|C[19]>>>12,Qe=C[19]<<20|C[18]>>>12,gt=C[29]<<7|C[28]>>>25,ss=C[28]<<7|C[29]>>>25,st=C[38]<<8|C[39]>>>24,no=C[39]<<8|C[38]>>>24,Ge=C[48]<<14|C[49]>>>18,Ys=C[49]<<14|C[48]>>>18,C[0]=St^~Ve&We,C[1]=De^~Js&He,C[10]=Ke^~Xs&Ye,C[11]=Je^~Qe&Zs,C[20]=tt^~rt&ro,C[21]=to^~nt&it,C[30]=io^~ft&ct,C[31]=lt^~so&ut,C[40]=vt^~lo>,C[41]=yt^~pt&ss,C[2]=Ve^~We&Qs,C[3]=Js^~He&qe,C[12]=Xs^~Ye&Xe,C[13]=Qe^~Zs&Ze,C[22]=rt^~ro&st,C[23]=nt^~it&no,C[32]=ft^~ct&oo,C[33]=so^~ut&dt,C[42]=lo^~gt&os,C[43]=pt^~ss&as,C[4]=We^~Qs&Ge,C[5]=He^~qe&Ys,C[14]=Ye^~Xe&eo,C[15]=Zs^~Ze&et,C[24]=ro^~st&ot,C[25]=it^~no&at,C[34]=ct^~oo&ht,C[35]=ut^~dt&ao,C[44]=gt^~os&ls,C[45]=ss^~as&fs,C[6]=Qs^~Ge&St,C[7]=qe^~Ys&De,C[16]=Xe^~eo&Ke,C[17]=Ze^~et&Je,C[26]=st^~ot&tt,C[27]=no^~at&to,C[36]=oo^~ht&io,C[37]=dt^~ao<,C[46]=os^~ls&vt,C[47]=as^~fs&yt,C[8]=Ge^~St&Ve,C[9]=Ys^~De&Js,C[18]=eo^~Ke&Xs,C[19]=et^~Je&Qe,C[28]=ot^~tt&rt,C[29]=at^~to&nt,C[38]=ht^~io&ft,C[39]=ao^~lt&so,C[48]=ls^~vt&lo,C[49]=fs^~yt&pt,C[0]^=m[j],C[1]^=m[j+1]};if(a)t.exports=y;else for(T=0;T>=8;return e}function yx(t,e,r){let n=0;for(let i=0;ie+1+n&&si.throwError("child data too short",V.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function $k(t,e){if(t.length===0&&si.throwError("data too short",V.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&si.throwError("data short segment too short",V.errors.BUFFER_OVERRUN,{});const n=yx(t,e+1,r);return e+1+r+n>t.length&&si.throwError("data long segment too short",V.errors.BUFFER_OVERRUN,{}),px(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{}),px(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const n=yx(t,e+1,r);e+1+r+n>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const i=Q(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&si.throwError("data too short",V.errors.BUFFER_OVERRUN,{});const n=Q(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Q(t[e])}}function y1(t){const e=X(t),r=$k(e,0);return r.consumed!==e.length&&si.throwArgumentError("invalid rlp data","data",t),r.result}const RL=Object.freeze(Object.defineProperty({__proto__:null,decode:y1,encode:Vo},Symbol.toStringTag,{value:"Module"})),OL="address/5.7.0",As=new V(OL);function gx(t){Me(t,20)||As.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(be(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const DL=9007199254740991;function BL(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const om={};for(let t=0;t<10;t++)om[String(t)]=String(t);for(let t=0;t<26;t++)om[String.fromCharCode(65+t)]=String(10+t);const mx=Math.floor(BL(DL));function Fk(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>om[n]).join("");for(;e.length>=mx;){let n=e.substring(0,mx);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}function Se(t){let e=null;if(typeof t!="string"&&As.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=gx(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&As.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Fk(t)&&As.throwArgumentError("bad icap checksum","address",t),e=mL(t.substring(4));e.length<40;)e="0"+e;e=gx("0x"+e)}else As.throwArgumentError("invalid address","address",t);return e}function jk(t){try{return Se(t),!0}catch{}return!1}function LL(t){let e=wL(Se(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Fk("XE00"+e)+e}function am(t){let e=null;try{e=Se(t.from)}catch{As.throwArgumentError("missing from address","transaction",t)}const r=yi(X(U.from(t.nonce).toHexString()));return Se(Ut(be(Vo([e,r])),12))}function $L(t,e,r){return bi(e)!==32&&As.throwArgumentError("salt must be 32 bytes","salt",e),bi(r)!==32&&As.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Se(Ut(be(Et(["0xff",Se(t),e,r])),12))}class FL extends es{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Se(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Se($e(e.readValue().toHexString(),20))}}class jL extends es{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const Fa=new V(Fc);function zk(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(f=>{const c=f.localName;return c||Fa.throwError("cannot encode object for signature with missing names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]&&Fa.throwError("cannot encode object for signature with duplicate names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]=!0,r[c]})}else Fa.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Fa.throwArgumentError("types/value length mismatch","tuple",r);let i=new Ly(t.wordSize),s=new Ly(t.wordSize),o=[];e.forEach((l,f)=>{let c=n[f];if(l.dynamic){let u=s.length;l.encode(s,c);let d=i.writeUpdatableValue();o.push(v=>{d(v+u)})}else l.encode(i,c)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function Uk(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(f){if(f.code===V.errors.BUFFER_OVERRUN)throw f;o=f,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===V.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class zL extends es{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Fa.throwError("insufficient data length",V.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Hr.OVERRUN?r.length-e-1:0}function YL(t,e,r,n,i){return t===Hr.OVERLONG?(n.push(i),0):(n.push(65533),Kk(t,e,r))}const Jk=Object.freeze({error:QL,ignore:Kk,replace:YL});function lm(t,e){e==null&&(e=Jk.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Hr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Hr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Hr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Hr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Hr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Hr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function Ue(t,e=Ki.current){e!=Ki.current&&(Gk.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function Gv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function XL(t,e){return'"'+lm(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Gv(r):(r-=65536,Gv((r>>10&1023)+55296)+Gv((r&1023)+56320))}).join("")+'"'}function Fy(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ts(t,e){return Fy(lm(t,e))}function ah(t,e=Ki.current){return lm(Ue(t,e))}function ZL(t){const e=Ue(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Q(Et([e,oh]).slice(0,32))}function e$(t){const e=X(t);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 ts(e.slice(0,r))}function t$(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function Qk(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function cm(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const r$=Qk("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),n$="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),i$=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],s$=fm("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),o$=fm("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),a$=fm("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",t$),l$=Qk("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function f$(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function c$(t){return!!cm(t,r$)}function u$(t){let e=cm(t,i$);if(e)return[t+e.s];let r=s$[t];if(r)return r;let n=o$[t];if(n)return[t+n[0]];let i=a$[t];return i||null}function d$(t){return!!cm(t,l$)}function h$(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=ah(t);e=f$(e.map(n=>{if(n$.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=u$(n);return i||[n]})),e=ah(Fy(e),Ki.NFKC),e.forEach(n=>{if(d$(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(c$(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=Fy(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class v$ extends Vk{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,Ue(r))}decode(e){return ts(super.decode(e))}}class ku extends es{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return zk(e,this.coders,r)}decode(e){return e.coerce(this.name,Uk(e,this.coders))}}const _u=new V(Fc),y$=new RegExp(/^bytes([0-9]*)$/),p$=new RegExp(/^(u?int)([0-9]*)$/);class um{constructor(e){ee(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new FL(e.name);case"bool":return new UL(e.name);case"string":return new v$(e.name);case"bytes":return new VL(e.name);case"array":return new zL(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new ku((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new HL(e.name)}let r=e.type.match(p$);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&_u.throwArgumentError("invalid "+r[1]+" bit length","param",e),new KL(n/8,r[1]==="int",e.name)}if(r=e.type.match(y$),r){let n=parseInt(r[1]);return(n===0||n>32)&&_u.throwArgumentError("invalid bytes length","param",e),new WL(n,e.name)}return _u.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new sh(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new Ly(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(tr.from(i)));return new ku(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&_u.throwError("types/values length mismatch",V.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(tr.from(o))),i=new ku(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(tr.from(o)));return new ku(i,"_").decode(this._getReader(X(r),n))}}const jr=new um;function Es(t){return be(Ue(t))}const Yk="hash/5.7.0";function dm(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function m$(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),v=d>>>1,g=v>>1,m=d-1;let M=0;for(let R=0;R1;){let q=L+F>>>1;R>>1|c(),z=z<<1^v,H=(H^v)<<1|v|1;E=z,S=1+H-z}let P=n-4;return A.map(R=>{switch(R-P){case 3:return P+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return P+256+(t[a++]<<8|t[a++]);case 1:return P+t[a++];default:return R-1}})}function b$(t){let e=0;return()=>t[e++]}function x$(t){return b$(w$(t))}function C$(t){return t&1?~t>>1:t>>1}function A$(t,e){let r=Array(t);for(let n=0;ne[o]):r}function S$(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(_$(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(T$(r,t))}return m$(Xk(e))}function k$(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function Zk(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function _$(t,e){let r=1+e(),n=e(),i=k$(e),s=Zk(i.length,1+t,e);return Xk(s.map((o,a)=>{const l=o[0],f=o.slice(1);return Array(i[a]).fill(void 0).map((c,u)=>{let d=u*n;return[l+u*r,f.map(v=>v+d)]})}))}function T$(t,e){let r=1+e();return Zk(r,1+t,e).map(i=>[i[0],i.slice(1)])}function P$(t){let e=lh(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let f=lh(t,e);if(f.length==0)break;n.push({set:new Set(f),node:r()})}n.sort((f,c)=>c.set.size-f.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function I$(){return x$(dm("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"))}const p1=I$(),M$=new Set(lh(p1)),N$=new Set(lh(p1)),R$=S$(p1),O$=P$(p1),bx=45,xx=95;function e5(t){return ah(t)}function D$(t){return t.filter(e=>e!=65039)}function t5(t){for(let e of t.split(".")){let r=e5(e);try{for(let n=r.lastIndexOf(xx)-1;n>=0;n--)if(r[n]!==xx)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===bx&&r[3]===bx)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function B$(t){return t5(L$(t,D$))}function L$(t,e){let r=e5(t).reverse(),n=[];for(;r.length;){let i=F$(r);if(i){n.push(...e(i));continue}let s=r.pop();if(M$.has(s)){n.push(s);continue}if(N$.has(s))continue;let o=R$[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return t5($$(String.fromCodePoint(...n)))}function $$(t){return t.normalize("NFC")}function F$(t,e){var r;let n=O$,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(f=>f.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const j$=new V(Yk),r5=new Uint8Array(32);r5.fill(0);function Cx(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function vm(t){const e=Ue(B$(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(Cx(e.slice(n))),r}function z$(t){try{return vm(t).length!==0}catch{}return!1}function Mf(t){typeof t!="string"&&j$.throwArgumentError("invalid ENS name; not a string","name",t);let e=r5;const r=vm(t);for(;r.length;)e=be(Et([e,be(r.pop())]));return Q(e)}function n5(t){return Q(Et(vm(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const U$=`Ethereum Signed Message: -`;function ym(t){return typeof t=="string"&&(t=Ue(t)),be(Et([Ue(U$),Ue(String(t.length)),t]))}var V$=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Pt=new V(Yk),i5=new Uint8Array(32);i5.fill(0);const W$=U.from(-1),s5=U.from(0),o5=U.from(1),H$=U.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function q$(t){const e=X(t),r=e.length%32;return r?Br([e,i5.slice(r)]):Q(e)}const G$=$e(o5.toHexString(),32),K$=$e(s5.toHexString(),32),Ax={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Kv=["name","version","chainId","verifyingContract","salt"];function Ex(t){return function(e){return typeof e!="string"&&Pt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const J$={name:Ex("name"),version:Ex("version"),chainId:function(t){try{return U.from(t).toString()}catch{}return Pt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Se(t).toLowerCase()}catch{}return Pt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Q(e)}catch{}return Pt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Jv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Pt.throwArgumentError("invalid numeric width","type",t);const i=H$.mask(r?n-1:n),s=r?i.add(o5).mul(W$):s5;return function(o){const a=U.from(o);return(a.lt(s)||a.gt(i))&&Pt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),$e(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Pt.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&Pt.throwArgumentError(`invalid length for ${t}`,"value",n),q$(n)}}}switch(t){case"address":return function(e){return $e(Se(e),32)};case"bool":return function(e){return e?G$:K$};case"bytes":return function(e){return be(e)};case"string":return function(e){return Es(e)}}return null}function Sx(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class ir{constructor(e){ee(this,"types",Object.freeze(xi(e))),ee(this,"_encoderCache",{}),ee(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(f=>{l[f.name]&&Pt.throwArgumentError(`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(a)}`,"types",e),l[f.name]=!0;const c=f.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===a&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Jv(c)&&(n[c]||Pt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(a),r[a][c]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Pt.throwArgumentError("missing primary type","types",e):s.length>1&&Pt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ee(this,"primaryType",s[0]);function o(a,l){l[a]&&Pt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(f=>{n[f]&&(o(f,l),Object.keys(l).forEach(c=>{i[c][f]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=Sx(a,e[a])+l.map(f=>Sx(f,e[f])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Jv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&Pt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(be)),be(Br(l))}}const n=this.types[e];if(n){const i=Es(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const f=this.getEncoder(l)(s[a]);return this._types[l]?be(f):f});return o.unshift(i),Br(o)}}return Pt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Pt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return be(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(Jv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&Pt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):Pt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new ir(e)}static getPrimaryType(e){return ir.from(e).primaryType}static hashStruct(e,r,n){return ir.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=Ax[n];i||Pt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Kv.indexOf(n.name)-Kv.indexOf(i.name)),ir.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Br(["0x1901",ir.hashDomain(e),ir.from(r).hash(n)])}static hash(e,r,n){return be(ir.encode(e,r,n))}static resolveNames(e,r,n,i){return V$(this,void 0,void 0,function*(){e=Gt(e);const s={};e.verifyingContract&&!Me(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=ir.from(r);o.visit(n,(a,l)=>(a==="address"&&!Me(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){ir.hashDomain(e);const i={},s=[];Kv.forEach(l=>{const f=e[l];f!=null&&(i[l]=J$[l](f),s.push({name:l,type:Ax[l]}))});const o=ir.from(r),a=Gt(r);return a.EIP712Domain?Pt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,f)=>{if(l.match(/^bytes(\d*)/))return Q(X(f));if(l.match(/^u?int/))return U.from(f).toString();switch(l){case"address":return f.toLowerCase();case"bool":return!!f;case"string":return typeof f!="string"&&Pt.throwArgumentError("invalid string","value",f),f}return Pt.throwArgumentError("unsupported type","type",l)})}}}const Tt=new V(Fc);class a5 extends $c{}class l5 extends $c{}class Q$ extends $c{}class fh extends $c{static isIndexed(e){return!!(e&&e._isIndexed)}}const Y$={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function kx(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class pr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ee(this,"fragments",r.map(n=>ci.from(n)).filter(n=>n!=null)),ee(this,"_abiCoder",qn(new.target,"getAbiCoder")()),ee(this,"functions",{}),ee(this,"errors",{}),ee(this,"events",{}),ee(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Tt.warn("duplicate definition - constructor");return}ee(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Tt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ee(this,"deploy",Wn.from({payable:!1,type:"constructor"})),ee(this,"_isInterface",!0)}format(e){e||(e=Re.full),e===Re.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Re.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return jr}static getAddress(e){return Se(e)}static getSighash(e){return Ut(Es(e.format()),0,4)}static getEventTopic(e){return Es(e.format())}getFunction(e){if(Me(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Hn.fromString(e).format()];return r||Tt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Me(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Tt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[fi.fromString(e).format()];return r||Tt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Me(e)){const n=qn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Tt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Hn.fromString(e).format()];return r||Tt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return qn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),qn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Q(Et([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(Et([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const f=Q(n.slice(0,4)),c=Y$[f];if(c)o=this._abiCoder.decode(c.inputs,n.slice(4)),a=c.name,l=c.signature,c.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(f);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Tt.throwError("call revert exception"+s,V.errors.CALL_EXCEPTION,{method:e.format(),data:Q(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),V.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Es(o):s.type==="bytes"?be(Q(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=U.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),$e(Q(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Tt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Tt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Tt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(Es(l));else if(o.type==="bytes")n.push(be(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Me(n[0],32)||n[0].toLowerCase()!==d)&&Tt.throwError("fragment/topic mismatch",V.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,v)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(tr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Et(n)):null,l=this._abiCoder.decode(s,r,!0),f=[],c=0,u=0;e.inputs.forEach((d,v)=>{if(d.indexed)if(a==null)f[v]=new fh({_isIndexed:!0,hash:null});else if(o[v])f[v]=new fh({_isIndexed:!0,hash:a[u++]});else try{f[v]=a[u++]}catch(g){f[v]=g}else try{f[v]=l[c++]}catch(g){f[v]=g}if(d.name&&f[d.name]==null){const g=f[v];g instanceof Error?Object.defineProperty(f,d.name,{enumerable:!0,get:()=>{throw kx(`property ${JSON.stringify(d.name)}`,g)}}):f[d.name]=g}});for(let d=0;d{throw kx(`index ${d}`,v)}})}return Object.freeze(f)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new l5({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:U.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new a5({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Q(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new Q$({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const X$="abstract-provider/5.7.0";var Z$=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const eF=new V(X$);class tF extends $c{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class sa{constructor(){eF.checkAbstract(new.target,sa),ee(this,"_isProvider",!0)}getFeeData(){return Z$(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield xt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=U.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const rF="abstract-signer/5.7.0";var On=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const mn=new V(rF),nF=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],iF=[V.errors.INSUFFICIENT_FUNDS,V.errors.NONCE_EXPIRED,V.errors.REPLACEMENT_UNDERPRICED];let Wo=class f5{constructor(){mn.checkAbstract(new.target,f5),ee(this,"_isSigner",!0)}getBalance(e){return On(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return On(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return On(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield xt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return On(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield xt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return On(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return On(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return On(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return On(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return On(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)nF.indexOf(n)===-1&&mn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&mn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return On(this,void 0,void 0,function*(){const r=yield xt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>On(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&mn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?mn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&mn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&mn.throwError("network does not support EIP-1559",V.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):mn.throwError("failed to get consistent fee data",V.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(iF.indexOf(i.code)>=0)throw i;return mn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&mn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield xt(r)})}_checkProvider(e){this.provider||mn.throwError("missing provider",V.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class pm extends Wo{constructor(e,r){super(),ee(this,"address",e),ee(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{mn.throwError(e,V.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new pm(this.address,e)}}var Dr={},Pe={},jc=c5;function c5(t,e){if(!t)throw new Error(e||"Assertion failed")}c5.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var jy={},_x={get exports(){return jy},set exports(t){jy=t}};typeof Object.create=="function"?_x.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:_x.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var sF=jc,oF=jy;Pe.inherits=oF;function aF(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function lF(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):aF(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Pe.htonl=u5;function cF(t,e){for(var r="",n=0;n>>0}return s}Pe.join32=uF;function dF(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Pe.split32=dF;function hF(t,e){return t>>>e|t<<32-e}Pe.rotr32=hF;function vF(t,e){return t<>>32-e}Pe.rotl32=vF;function yF(t,e){return t+e>>>0}Pe.sum32=yF;function pF(t,e,r){return t+e+r>>>0}Pe.sum32_3=pF;function gF(t,e,r,n){return t+e+r+n>>>0}Pe.sum32_4=gF;function mF(t,e,r,n,i){return t+e+r+n+i>>>0}Pe.sum32_5=mF;function wF(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Pe.sum64=wF;function bF(t,e,r,n){var i=e+n>>>0,s=(i>>0}Pe.sum64_hi=bF;function xF(t,e,r,n){var i=e+n;return i>>>0}Pe.sum64_lo=xF;function CF(t,e,r,n,i,s,o,a){var l=0,f=e;f=f+n>>>0,l+=f>>0,l+=f>>0,l+=f>>0}Pe.sum64_4_hi=CF;function AF(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Pe.sum64_4_lo=AF;function EF(t,e,r,n,i,s,o,a,l,f){var c=0,u=e;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0,c+=u>>0}Pe.sum64_5_hi=EF;function SF(t,e,r,n,i,s,o,a,l,f){var c=e+n+s+a+f;return c>>>0}Pe.sum64_5_lo=SF;function kF(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Pe.rotr64_hi=kF;function _F(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Pe.rotr64_lo=_F;function TF(t,e,r){return t>>>r}Pe.shr64_hi=TF;function PF(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Pe.shr64_lo=PF;var Nl={},Tx=Pe,IF=jc;function g1(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Nl.BlockHash=g1;g1.prototype.update=function(e,r){if(e=Tx.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Tx.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Si.g0_256=DF;function BF(t){return pi(t,17)^pi(t,19)^t>>>10}Si.g1_256=BF;var vl=Pe,LF=Nl,$F=Si,Qv=vl.rotl32,Xl=vl.sum32,FF=vl.sum32_5,jF=$F.ft_1,g5=LF.BlockHash,zF=[1518500249,1859775393,2400959708,3395469782];function Ci(){if(!(this instanceof Ci))return new Ci;g5.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}vl.inherits(Ci,g5);var UF=Ci;Ci.blockSize=512;Ci.outSize=160;Ci.hmacStrength=80;Ci.padLength=64;Ci.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Pj(e.length<=this.blockSize);for(var r=e.length;r>8,d=c&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(d>>1)-1?m=(d>>1)-M:m=M,v.isubn(m)):m=0,u[g]=m,v.iushrn(1)}return u}r.getNAF=n;function i(l,f){var c=[[],[]];l=l.clone(),f=f.clone();for(var u=0,d=0,v;l.cmpn(-u)>0||f.cmpn(-d)>0;){var g=l.andln(3)+u&3,m=f.andln(3)+d&3;g===3&&(g=-1),m===3&&(m=-1);var M;g&1?(v=l.andln(7)+u&7,(v===3||v===5)&&m===2?M=-g:M=g):M=0,c[0].push(M);var A;m&1?(v=f.andln(7)+d&7,(v===3||v===5)&&g===2?A=-m:A=m):A=0,c[1].push(A),2*u===M+1&&(u=1-u),2*d===A+1&&(d=1-d),l.iushrn(1),f.iushrn(1)}return c}r.getJSF=i;function s(l,f,c){var u="_"+f;l.prototype[f]=function(){return this[u]!==void 0?this[u]:this[u]=c.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new me(l,"hex","le")}r.intFromLE=a}),ch=pn.getNAF,Nj=pn.getJSF,uh=pn.assert;function Ks(t,e){this.type=t,this.p=new me(e.p,16),this.red=e.prime?me.red(e.prime):me.mont(this.p),this.zero=new me(0).toRed(this.red),this.one=new me(1).toRed(this.red),this.two=new me(2).toRed(this.red),this.n=e.n&&new me(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var oa=Ks;Ks.prototype.point=function(){throw new Error("Not implemented")};Ks.prototype.validate=function(){throw new Error("Not implemented")};Ks.prototype._fixedNafMul=function(e,r){uh(e.precomputed);var n=e._getDoubles(),i=ch(r,1,this._bitLength),s=(1<=a;f--)l=(l<<1)+i[f];o.push(l)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;l--){for(var f=0;l>=0&&o[l]===0;l--)f++;if(l>=0&&f++,a=a.dblp(f),l<0)break;var c=o[l];uh(c!==0),e.type==="affine"?c>0?a=a.mixedAdd(s[c-1>>1]):a=a.mixedAdd(s[-c-1>>1].neg()):c>0?a=a.add(s[c-1>>1]):a=a.add(s[-c-1>>1].neg())}return e.type==="affine"?a.toP():a};Ks.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,f=0,c,u,d;for(c=0;c=1;c-=2){var g=c-1,m=c;if(o[g]!==1||o[m]!==1){l[g]=ch(n[g],o[g],this._bitLength),l[m]=ch(n[m],o[m],this._bitLength),f=Math.max(l[g].length,f),f=Math.max(l[m].length,f);continue}var M=[r[g],null,null,r[m]];r[g].y.cmp(r[m].y)===0?(M[1]=r[g].add(r[m]),M[2]=r[g].toJ().mixedAdd(r[m].neg())):r[g].y.cmp(r[m].y.redNeg())===0?(M[1]=r[g].toJ().mixedAdd(r[m]),M[2]=r[g].add(r[m].neg())):(M[1]=r[g].toJ().mixedAdd(r[m]),M[2]=r[g].toJ().mixedAdd(r[m].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],E=Nj(n[g],n[m]);for(f=Math.max(E[0].length,f),l[g]=new Array(f),l[m]=new Array(f),u=0;u=0;c--){for(var F=0;c>=0;){var z=!0;for(u=0;u=0&&F++,R=R.dblp(F),c<0)break;for(u=0;u0?d=a[u][H-1>>1]:H<0&&(d=a[u][-H-1>>1].neg()),d.type==="affine"?R=R.mixedAdd(d):R=R.add(d))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};In.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(v=f,g=c),u.negative&&(u=u.neg(),d=d.neg()),v.negative&&(v=v.neg(),g=g.neg()),[{a:u,b:d},{a:v,b:g}]};Mn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),f=s.mul(n.b),c=o.mul(i.b),u=e.sub(a).sub(l),d=f.add(c).neg();return{k1:u,k2:d}};Mn.prototype.pointFromX=function(e,r){e=new me(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Mn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Mn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};lr.prototype.isInfinity=function(){return this.inf};lr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};lr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};lr.prototype.getX=function(){return this.x.fromRed()};lr.prototype.getY=function(){return this.y.fromRed()};lr.prototype.mul=function(e){return e=new me(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};lr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};lr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};lr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};lr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};lr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function mr(t,e,r,n){oa.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new me(0)):(this.x=new me(e,16),this.y=new me(r,16),this.z=new me(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}mm(mr,oa.BasePoint);Mn.prototype.jpoint=function(e,r,n){return new mr(this,e,r,n)};mr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};mr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};mr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),f=o.redSub(a);if(l.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),u=c.redMul(l),d=i.redMul(c),v=f.redSqr().redIAdd(u).redISub(d).redISub(d),g=f.redMul(d.redISub(v)).redISub(o.redMul(u)),m=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(v,g,m)};mr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),u=n.redMul(f),d=l.redSqr().redIAdd(c).redISub(u).redISub(u),v=l.redMul(u.redISub(d)).redISub(s.redMul(c)),g=this.z.redMul(a);return this.curve.jpoint(d,v,g)};mr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};mr.prototype.inspect=function(){return this.isInfinity()?"":""};mr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var rd=Dl(function(t,e){var r=e;r.base=oa,r.short=Oj,r.mont=null,r.edwards=null}),nd=Dl(function(t,e){var r=e,n=pn.assert;function i(a){a.type==="short"?this.curve=new rd.short(a):a.type==="edwards"?this.curve=new rd.edwards(a):this.curve=new rd.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var f=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:f}),f}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Dr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Dr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Dr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Dr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Dr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Dr.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Dr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Dr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Vs(t){if(!(this instanceof Vs))return new Vs(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Gn.toArray(t.entropy,t.entropyEnc||"hex"),r=Gn.toArray(t.nonce,t.nonceEnc||"hex"),n=Gn.toArray(t.pers,t.persEnc||"hex");gm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var P5=Vs;Vs.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Vs.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Gn.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Dj=pn.assert;function m1(t,e){if(t instanceof m1)return t;this._importDER(t,e)||(Dj(t.r&&t.s,"Signature without r or s"),this.r=new me(t.r,16),this.s=new me(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var w1=m1;function Bj(){this.place=0}function Zv(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function Nx(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}m1.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Nx(r),n=Nx(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];e0(i,r.length),i=i.concat(r),i.push(2),e0(i,n.length);var s=i.concat(n),o=[48];return e0(o,s.length),o=o.concat(s),pn.encode(o,e)};var Lj=function(){throw new Error("unsupported")},I5=pn.assert;function Pn(t){if(!(this instanceof Pn))return new Pn(t);typeof t=="string"&&(I5(Object.prototype.hasOwnProperty.call(nd,t),"Unknown curve "+t),t=nd[t]),t instanceof nd.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var $j=Pn;Pn.prototype.keyPair=function(e){return new wm(this,e)};Pn.prototype.keyFromPrivate=function(e,r){return wm.fromPrivate(this,e,r)};Pn.prototype.keyFromPublic=function(e,r){return wm.fromPublic(this,e,r)};Pn.prototype.genKeyPair=function(e){e||(e={});for(var r=new P5({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Lj(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new me(2));;){var s=new me(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Pn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Pn.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new me(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new P5({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new me(1)),c=0;;c++){var u=i.k?i.k(c):new me(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(f)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var v=d.getX(),g=v.umod(this.n);if(g.cmpn(0)!==0){var m=u.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(m=m.umod(this.n),m.cmpn(0)!==0){var M=(d.getY().isOdd()?1:0)|(v.cmp(g)!==0?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),M^=1),new w1({r:g,s:m,recoveryParam:M})}}}}}};Pn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new me(e,16)),n=this.keyFromPublic(n,i),r=new w1(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),f=a.mul(s).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.eqXToP(s)):(c=this.g.mulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.getX().umod(this.n).cmp(s)===0)};Pn.prototype.recoverPubKey=function(t,e,r,n){I5((3&r)===r,"The recovery param is more than two bits"),e=new w1(e,n);var i=this.n,s=new me(t),o=e.r,a=e.s,l=r&1,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var c=e.r.invm(i),u=i.sub(s).mul(c).umod(i),d=a.mul(c).umod(i);return this.g.mulAdd(u,o,d)};Pn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new w1(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var Fj=Dl(function(t,e){var r=e;r.version="6.5.4",r.utils=pn,r.rand=function(){throw new Error("unsupported")},r.curve=rd,r.curves=nd,r.ec=$j,r.eddsa=null}),jj=Fj.ec;const zj="signing-key/5.7.0",Wy=new V(zj);let t0=null;function oi(){return t0||(t0=new jj("secp256k1")),t0}class dh{constructor(e){ee(this,"curve","secp256k1"),ee(this,"privateKey",Q(e)),bi(this.privateKey)!==32&&Wy.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=oi().keyFromPrivate(X(this.privateKey));ee(this,"publicKey","0x"+r.getPublic(!1,"hex")),ee(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ee(this,"_isSigningKey",!0)}_addPoint(e){const r=oi().keyFromPublic(X(this.publicKey)),n=oi().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=oi().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&Wy.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return ia({recoveryParam:i.recoveryParam,r:$e("0x"+i.r.toString(16),32),s:$e("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=oi().keyFromPrivate(X(this.privateKey)),n=oi().keyFromPublic(X(bm(e)));return $e("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function M5(t,e){const r=ia(e),n={r:X(r.r),s:X(r.s)};return"0x"+oi().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function bm(t,e){const r=X(t);if(r.length===32){const n=new dh(r);return e?"0x"+oi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Q(r):"0x"+oi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+oi().keyFromPublic(r).getPublic(!0,"hex"):Q(r)}return Wy.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Uj="transactions/5.7.0",Er=new V(Uj);var Hy;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Hy||(Hy={}));function xm(t){return t==="0x"?null:Se(t)}function Ar(t){return t==="0x"?_t:U.from(t)}const Vj=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Wj={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Cm(t){const e=bm(t);return Se(Ut(be(Ut(e,1)),12))}function qo(t,e){return Cm(M5(X(t),e))}function on(t,e){const r=yi(U.from(t).toHexString());return r.length>32&&Er.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function r0(t,e){return{address:Se(t),storageKeys:(e||[]).map((r,n)=>(bi(r)!==32&&Er.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function aa(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Er.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),r0(r[0],r[1])):r0(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return r0(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function N5(t){return aa(t).map(e=>[e.address,e.storageKeys])}function R5(t,e){if(t.gasPrice!=null){const n=U.from(t.gasPrice),i=U.from(t.maxFeePerGas||0);n.eq(i)||Er.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[on(t.chainId||0,"chainId"),on(t.nonce||0,"nonce"),on(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),on(t.maxFeePerGas||0,"maxFeePerGas"),on(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",on(t.value||0,"value"),t.data||"0x",N5(t.accessList||[])];if(e){const n=ia(e);r.push(on(n.recoveryParam,"recoveryParam")),r.push(yi(n.r)),r.push(yi(n.s))}return Br(["0x02",Vo(r)])}function O5(t,e){const r=[on(t.chainId||0,"chainId"),on(t.nonce||0,"nonce"),on(t.gasPrice||0,"gasPrice"),on(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",on(t.value||0,"value"),t.data||"0x",N5(t.accessList||[])];if(e){const n=ia(e);r.push(on(n.recoveryParam,"recoveryParam")),r.push(yi(n.r)),r.push(yi(n.s))}return Br(["0x01",Vo(r)])}function Hj(t,e){im(t,Wj);const r=[];Vj.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Q(a,l)),o.length&&a.length!==o.length&&a.length>0&&Er.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=yi(a),a.length>o.maxLength&&Er.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Q(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Er.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Gi(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Q(n)),r.push("0x"),r.push("0x")),!e)return Vo(r);const i=ia(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Er.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Er.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Q(s)),r.push(yi(X(i.r))),r.push(yi(X(i.s))),Vo(r)}function qj(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Er.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),Hj(t,e);switch(t.type){case 1:return O5(t,e);case 2:return R5(t,e)}return Er.throwError(`unsupported transaction type: ${t.type}`,V.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function D5(t,e,r){try{const n=Ar(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Er.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=$e(e[1],32),t.s=$e(e[2],32);try{const n=be(r(t));t.from=qo(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function Gj(t){const e=y1(t.slice(1));e.length!==9&&e.length!==12&&Er.throwArgumentError("invalid component count for transaction type: 2","payload",Q(t));const r=Ar(e[2]),n=Ar(e[3]),i={type:2,chainId:Ar(e[0]).toNumber(),nonce:Ar(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Ar(e[4]),to:xm(e[5]),value:Ar(e[6]),data:e[7],accessList:aa(e[8])};return e.length===9||(i.hash=be(t),D5(i,e.slice(9),R5)),i}function Kj(t){const e=y1(t.slice(1));e.length!==8&&e.length!==11&&Er.throwArgumentError("invalid component count for transaction type: 1","payload",Q(t));const r={type:1,chainId:Ar(e[0]).toNumber(),nonce:Ar(e[1]).toNumber(),gasPrice:Ar(e[2]),gasLimit:Ar(e[3]),to:xm(e[4]),value:Ar(e[5]),data:e[6],accessList:aa(e[7])};return e.length===8||(r.hash=be(t),D5(r,e.slice(8),O5)),r}function Jj(t){const e=y1(t);e.length!==9&&e.length!==6&&Er.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Ar(e[0]).toNumber(),gasPrice:Ar(e[1]),gasLimit:Ar(e[2]),to:xm(e[3]),value:Ar(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=U.from(e[6]).toNumber()}catch{return r}if(r.r=$e(e[7],32),r.s=$e(e[8],32),U.from(r.r).isZero()&&U.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Q(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=be(Vo(i));try{r.from=qo(s,{r:Q(r.r),s:Q(r.s),recoveryParam:n})}catch{}r.hash=be(t)}return r.type=null,r}function B5(t){const e=X(t);if(e[0]>127)return Jj(e);switch(e[0]){case 1:return Kj(e);case 2:return Gj(e)}return Er.throwError(`unsupported transaction type: ${e[0]}`,V.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const Qj="contracts/5.7.0";var Go=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const zt=new V(Qj);function hh(t,e){return Go(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&zt.throwArgumentError("invalid address or ENS name","name",r);try{return Se(r)}catch{}t||zt.throwError("a provider or signer is needed to resolve ENS names",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&zt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function id(t,e,r){return Go(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>id(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield hh(t,e):r.type==="tuple"?yield id(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>id(t,n,r.arrayChildren))):Promise.reject(zt.makeError("invalid value for array",V.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function b1(t,e,r){return Go(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),zt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=xt({override:hh(t.signer,n.from),signer:t.signer.getAddress()}).then(f=>Go(this,void 0,void 0,function*(){return Se(f.signer)!==f.override&&zt.throwError("Contract with a Signer cannot override from",V.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),f.override})):n.from=t.signer.getAddress():n.from&&(n.from=hh(t.provider,n.from));const i=yield xt({args:id(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:xt(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=U.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=U.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=U.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=U.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=U.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=aa(a.accessList)),o.gasLimit==null&&e.gas!=null){let f=21e3;const c=X(s);for(let u=0;un[f]!=null);return l.length&&zt.throwError(`cannot override ${l.map(f=>JSON.stringify(f)).join(",")}`,V.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function Yj(t,e){return function(...r){return b1(t,e,r)}}function Xj(t,e){const r=t.signer||t.provider;return function(...n){return Go(this,void 0,void 0,function*(){r||zt.throwError("estimate require a provider or signer",V.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield b1(t,e,n);return yield r.estimateGas(i)})}}function Zj(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=xi(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,f)=>t.interface.decodeEventLog(a.eventFragment,l,f),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function L5(t,e,r){const n=t.signer||t.provider;return function(...i){return Go(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Gt(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield b1(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===V.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function ez(t,e){return function(...r){return Go(this,void 0,void 0,function*(){t.signer||zt.throwError("sending a transaction requires a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield b1(t,e,r),i=yield t.signer.sendTransaction(n);return Zj(t,i),i})}}function Rx(t,e,r){return e.constant?L5(t,e,r):ez(t,e)}function $5(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class mc{constructor(e,r){ee(this,"tag",e),ee(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class tz extends mc{constructor(){super("error",null)}}class Ox extends mc{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&zt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super($5(s),s),ee(this,"address",e),ee(this,"interface",r),ee(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=Bk(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class Dx extends mc{constructor(e,r){super("*",{address:e}),ee(this,"address",e),ee(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class rz{constructor(e,r,n){ee(this,"interface",qn(new.target,"getInterface")(r)),n==null?(ee(this,"provider",null),ee(this,"signer",null)):Wo.isSigner(n)?(ee(this,"provider",n.provider||null),ee(this,"signer",n)):sa.isProvider(n)?(ee(this,"provider",n),ee(this,"signer",null)):zt.throwArgumentError("invalid signer or provider","signerOrProvider",n),ee(this,"callStatic",{}),ee(this,"estimateGas",{}),ee(this,"functions",{}),ee(this,"populateTransaction",{}),ee(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];ee(this.filters,a,(...f)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,f)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?ee(this.filters,a,this.filters[l[0]]):zt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(ee(this,"_runningEvents",{}),ee(this,"_wrappedEmits",{}),e==null&&zt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ee(this,"address",e),this.provider)ee(this,"resolvedAddress",hh(this.provider,e));else try{ee(this,"resolvedAddress",Promise.resolve(Se(e)))}catch{zt.throwError("provider is required to use ENS name as contract address",V.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){zt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&ee(this,o,Rx(this,a,!0)),this.functions[o]==null&&ee(this.functions,o,Rx(this,a,!1)),this.callStatic[o]==null&&ee(this.callStatic,o,L5(this,a,!0)),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,Yj(this,a)),this.estimateGas[o]==null&&ee(this.estimateGas,o,Xj(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&ee(this,o,this[l])}catch{}this.functions[o]==null&&ee(this.functions,o,this.functions[l]),this.callStatic[o]==null&&ee(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&ee(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&ee(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return am(e)}static getInterface(e){return pr.isInterface(e)?e:new pr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&zt.throwError("contract not deployed",V.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||zt.throwError("sending a transactions require a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&zt.throwError("cannot override "+n,V.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new pm(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ee(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return fh.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new tz);if(e==="event")return this._normalizeRunningEvent(new mc("event",null));if(e==="*")return this._normalizeRunningEvent(new Dx(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Ox(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Ox(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new mc($5(r),r))}return this._normalizeRunningEvent(new Dx(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=xi(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||zt.throwError("events require a provider or a signer with a provider",V.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Gt(i.filter);return typeof r=="string"&&Me(r,32)?(n!=null&&zt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Bl extends rz{}class F5{constructor(e){ee(this,"alphabet",e),ee(this,"base",e.length),ee(this,"_alphabetMap",{}),ee(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=X(wc(i,t,l));s||(s=d.length,c=new Uint8Array(s),o=Math.ceil(n/s),f=n-(o-1)*s),c.set(d);for(let m=1;m=256)throw new Error("Depth too large!");return $x(Et([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Q(this.depth),this.parentFingerprint,$e(Q(this.index),4),this.chainCode,this.privateKey!=null?Et(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ii(va,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ca));const n=new Uint8Array(37);if(e&Ca){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(wc(ml.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=Pu(U.from(s).add(this.privateKey).mod(dz)):l=new dh(Q(s))._addPoint(this.publicKey);let f=r;const c=this.mnemonic;return c&&(f=Object.freeze({phrase:c.phrase,path:r,locale:c.locale||"en"})),new Ii(va,a,l,this.fingerprint,Pu(o),e,this.depth+1,f)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ca)throw new Error("invalid path index - "+s);n=n._derive(Ca+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Ca)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(wc(ml.sha512,hz,n));return new Ii(va,Pu(i.slice(0,32)),null,"0x00000000",Pu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Am(n),e=W5(Em(e,n),n),Ii._fromSeed(V5(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ii._fromSeed(e,null)}static fromExtendedKey(e){const r=gl.decode(e);(r.length!==82||$x(r.slice(0,78))!==e)&&bc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Q(r.slice(5,9)),s=parseInt(Q(r.slice(9,13)).substring(2),16),o=Q(r.slice(13,45)),a=r.slice(45,78);switch(Q(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ii(va,null,Q(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Ii(va,Q(a.slice(1)),null,i,o,s,n,null)}return bc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function V5(t,e){e||(e="");const r=Ue("mnemonic"+e,Ki.NFKD);return oz(Ue(t,Ki.NFKD),r,2048,64,"sha512")}function Em(t,e){e=Am(e),bc.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let f=0;f>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=U5(o);if((X(Yi(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Q(n.slice(0,s/8))}function W5(t,e){if(e=Am(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");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]&vz(8-n)),n+=3);const i=t.length/4,s=X(Yi(t))[0]&U5(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function pz(t,e){try{return Em(t,e),!0}catch{}return!1}function gz(t){return(typeof t!="number"||t<0||t>=Ca||t%1)&&bc.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const mz="random/5.7.0",qy=new V(mz);function wz(){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 Fx=wz();let sd=Fx.crypto||Fx.msCrypto;(!sd||!sd.getRandomValues)&&(qy.warn("WARNING: Missing strong random number source"),sd={getRandomValues:function(t){return qy.throwError("no secure random source avaialble",V.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function x1(t){(t<=0||t>1024||t%1||t!=t)&&qy.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return sd.getRandomValues(e),X(e)}function bz(t){t=t.slice();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}return t}function xz(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function Cz(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function Az(t){if(xz(t))try{return Se(JSON.parse(t).ethaddr)}catch{return null}if(Cz(t))try{return Se(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function H5(t,e){return qo(ym(t),e)}function Ez(t,e,r,n){return qo(ir.hash(t,e,r),n)}const Sz="networks/5.7.1",jx=new V(Sz);function kz(t){return t&&typeof t.renetwork=="function"}function Ri(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return Ri(r)},e}function vh(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return vh(t,n)},r}const zx={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ri("homestead")},Ux={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ri("ropsten")},Vx={chainId:63,name:"classicMordor",_defaultProvider:vh("https://www.ethercluster.com/mordor","classicMordor")},Iu={unspecified:{chainId:0,name:"unspecified"},homestead:zx,mainnet:zx,morden:{chainId:2,name:"morden"},ropsten:Ux,testnet:Ux,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ri("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ri("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ri("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Ri("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:vh("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Vx,classicTestnet:Vx,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:vh("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ri("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Ri("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function _z(t){if(t==null)return null;if(typeof t=="number"){for(const n in Iu){const i=Iu[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Iu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Iu[t.name];if(!e)return typeof t.chainId!="number"&&jx.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&jx.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(kz(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const Tz="web/5.7.1";var Pz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};function Iz(t,e){return Pz(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var Mz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const $n=new V(Tz);function Wx(t){return new Promise(e=>{setTimeout(e,t)})}function ds(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Gi(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ts(t)}catch{}return Q(t)}return t}function Nz(t){return Ue(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function q5(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;$n.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;$n.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const f={method:"GET"};let c=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&$n.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const A in t.headers)a[A.toLowerCase()]={key:A,value:String(t.headers[A])},["if-none-match","if-modified-since"].indexOf(A.toLowerCase())>=0&&(c=!0);if(f.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&$n.throwError("basic authentication requires a secure https url",V.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const A=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+hm(Ue(A))}}t.skipFetchSetup!=null&&(f.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(f.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(d):null;if(v)try{const A={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?dm(v[3]):Nz(v[3])};let E=A.body;return r&&(E=r(A.body,A)),Promise.resolve(E)}catch(A){$n.throwError("processing response error",V.errors.SERVER_ERROR,{body:ds(v[1],v[2]),error:A,requestBody:null,requestMethod:"GET",url:l})}e&&(f.method="POST",f.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(A=>{const E=a[A];g[E.key]=E.value}),f.headers=g;const m=function(){let A=null;return{promise:new Promise(function(P,R){u&&(A=setTimeout(()=>{A!=null&&(A=null,R($n.makeError("timeout",V.errors.TIMEOUT,{requestBody:ds(f.body,g["content-type"]),requestMethod:f.method,timeout:u,url:l})))},u))}),cancel:function(){A!=null&&(clearTimeout(A),A=null)}}}(),M=function(){return Mz(this,void 0,void 0,function*(){for(let A=0;A=300)&&(m.cancel(),$n.throwError("bad response",V.errors.SERVER_ERROR,{status:E.statusCode,headers:E.headers,body:ds(S,E.headers?E.headers["content-type"]:null),requestBody:ds(f.body,g["content-type"]),requestMethod:f.method,url:l})),r)try{const P=yield r(S,E);return m.cancel(),P}catch(P){if(P.throttleRetry&&A{let a=null;if(s!=null)try{a=JSON.parse(ts(s))}catch(l){$n.throwError("invalid JSON",V.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=Ue(e);const s=typeof t=="string"?{url:t}:Gt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Gt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return q5(t,i,n)}function ko(t,e){return e||(e={}),e=Gt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function f(){return t().then(function(c){if(c!==void 0)o()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",f);else if(e.onceBlock)e.onceBlock.once("block",f);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(f,u)}return null},function(c){o()&&n(c)})}f()})}var yh="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Gy={};for(var Mu=0;Mu>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function G5(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Xa(e)^n>>5}for(e=Xa(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=G5(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=Xa(n)^o,i+=yh.charAt(o)}for(s=0;s<6;++s)n=Xa(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=yh.charAt(a)}return i}function K5(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=G5(s);if(typeof a=="string")return a;for(var l=[],f=0;f=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function Oz(){var t=K5.apply(null,arguments);if(typeof t=="object")return t}function Dz(t){var e=K5.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function C1(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:f,accessList:oe.allowNull(this.accessList.bind(this),null),blockHash:oe.allowNull(o,null),blockNumber:oe.allowNull(l,null),transactionIndex:oe.allowNull(l,null),confirmations:oe.allowNull(l,null),from:r,gasPrice:oe.allowNull(n),maxPriorityFeePerGas:oe.allowNull(n),maxFeePerGas:oe.allowNull(n),gasLimit:n,to:oe.allowNull(r,null),value:n,nonce:l,data:s,r:oe.allowNull(this.uint256),s:oe.allowNull(this.uint256),v:oe.allowNull(l),creates:oe.allowNull(r,null),raw:oe.allowNull(s)},e.transactionRequest={from:oe.allowNull(r),nonce:oe.allowNull(l),gasLimit:oe.allowNull(n),gasPrice:oe.allowNull(n),maxPriorityFeePerGas:oe.allowNull(n),maxFeePerGas:oe.allowNull(n),to:oe.allowNull(r),value:oe.allowNull(n),data:oe.allowNull(c),type:oe.allowNull(l),accessList:oe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:oe.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:oe.allowNull(this.address,null),from:oe.allowNull(this.address,null),contractAddress:oe.allowNull(r,null),transactionIndex:l,root:oe.allowNull(a),gasUsed:n,logsBloom:oe.allowNull(s),blockHash:o,transactionHash:o,logs:oe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:oe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:oe.allowNull(n),status:oe.allowNull(l),type:f},e.block={hash:oe.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:oe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:oe.allowNull(r),extraData:s,transactions:oe.allowNull(oe.arrayOf(o)),baseFeePerGas:oe.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=oe.allowNull(oe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:oe.allowNull(i,void 0),toBlock:oe.allowNull(i,void 0),blockHash:oe.allowNull(o,void 0),address:oe.allowNull(r,void 0),topics:oe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:oe.allowNull(l),blockHash:oe.allowNull(o),transactionIndex:l,removed:oe.allowNull(this.boolean.bind(this)),address:r,data:oe.allowFalsish(s,"0x"),topics:oe.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return aa(e||[])}number(e){return e==="0x"?0:U.from(e).toNumber()}type(e){return e==="0x"||e==null?0:U.from(e).toNumber()}bigNumber(e){return U.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Me(e))?e.toLowerCase():ef.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Se(e)}callAddress(e){if(!Me(e,32))return null;const r=Se(Ut(e,12));return r===Wk?null:r}contractAddress(e){return am(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Me(e))return v1(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return bi(n)!==32?ef.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=U.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Me(e))throw new Error("invalid uint256");return $e(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=oe.check(r,e);return i._difficulty=n==null?null:U.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return oe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&U.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=oe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Me(n)&&(n=U.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Me(n)&&(n=U.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return B5(e)}receiptLog(e){return oe.check(this.formats.receiptLog,e)}receipt(e){const r=oe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=U.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&ef.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):ef.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&ef.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return oe.check(this.formats.filter,e)}filterLog(e){return oe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var ge=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ce=new V(Vc),jz=10;function qx(t){return t==null?"null":(bi(t)!==32&&Ce.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Gx(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[qx(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return qx(e)}).join("&")}function zz(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function ya(t){if(typeof t=="string"){if(t=t.toLowerCase(),bi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+Gx(t);if(tF.isForkEvent(t))throw Ce.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+Gx(t.topics||[])}throw new Error("invalid event - "+t)}function tf(){return new Date().getTime()}function Kx(t){return new Promise(e=>{setTimeout(e,t)})}const Uz=["block","network","pending","poll"];let Vz=class{constructor(e,r,n){ee(this,"tag",e),ee(this,"listener",r),ee(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=zz(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Uz.indexOf(this.tag)>=0}};const Wz={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function i0(t){return $e(U.from(t).toHexString(),32)}function Jx(t){return gl.encode(Et([t,Ut(Yi(Yi(t)),0,4)]))}const J5=new RegExp("^(ipfs)://(.*)$","i"),Qx=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),J5,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function od(t,e){try{return ts(xc(t,e))}catch{}return null}function xc(t,e){if(t==="0x")return null;const r=U.from(Ut(t,e,e+32)).toNumber(),n=U.from(Ut(t,r,r+32)).toNumber();return Ut(t,r+32,r+32+n)}function s0(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ce.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function Yx(t){const e=X(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 Hz(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Q5(t){const e=[];let r=0;for(let n=0;nU.from(e).eq(1)).catch(e=>{if(e.code===V.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ge(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Br([e,Mf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Br(["0x9061b923",Q5([n5(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&Ce.throwError("resolver threw error",V.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=xc(s,0)),s}catch(s){if(s.code===V.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return ge(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?xc(n,0):null})}_getAddress(e,r){const n=Wz[String(e)];if(n==null&&Ce.throwError(`unsupported coin type: ${e}`,V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return Jx(Et([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return Jx(Et([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=Hx.toWords(i.slice(2));return a.unshift(o),Hx.encode(n.prefix,a)}}return null}getAddress(e){return ge(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===oh?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===V.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",i0(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ce.throwError("invalid or unsupported coin data",V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ge(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ce.throwError("invalid or unsupported content hash data",V.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ge(this,void 0,void 0,function*(){let r=Ue(e);r=Et([i0(64),i0(r.length),r]),r.length%32!==0&&(r=Et([r,$e("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Q(r));return n==null||n==="0x"?null:ts(n)})}}let o0=null,qz=1;class Sm extends sa{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ee(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=qn(new.target,"getNetwork")(e);r?(ee(this,"_network",r),this.emit("network",r,null)):Ce.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ge(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ce.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ee(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return ko(()=>this._ready().then(e=>e,e=>{if(!(e.code===V.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return o0==null&&(o0=new oe),o0}static getNetwork(e){return _z(e??"homestead")}ccipReadFetch(e,r,n){return ge(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield Uc({url:f,errorPassThrough:!0},c,(v,g)=>(v.status=g.statusCode,v));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ce.throwError(`response not found during CCIP fetch: ${d}`,V.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ce.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,V.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return ge(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(tf()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=tf(),n=xt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=tf();return i=U.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ge(this,void 0,void 0,function*(){const e=qz++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ce.makeError("network block skew detected",V.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(f=>{f.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=f.blockNumber),this._emitted["b:"+f.blockHash]=f.blockNumber,this._emitted["t:"+f.transactionHash]=f.blockNumber,this.emit(s,f)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ge(this,void 0,void 0,function*(){return Ce.throwError("provider does not support network detection",V.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ge(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield Kx(0),this._network;const n=Ce.makeError("underlying network changed",V.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=tf();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ge(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return ge(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let f=!1;const c=function(){return f?!0:(f=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,v=null;const g=m=>ge(this,void 0,void 0,function*(){f||(yield Kx(1e3),this.getTransactionCount(i.from).then(M=>ge(this,void 0,void 0,function*(){if(!f){if(M<=i.nonce)d=m;else{{const A=yield this.getTransaction(e);if(A&&A.blockNumber!=null)return}for(v==null&&(v=d-3,v{f||this.once("block",g)}))});if(f)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{c()||a(Ce.makeError("timeout exceeded",V.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return ge(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return U.from(e)}catch(r){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return U.from(i)}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return U.from(i).toNumber()}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Q(i)}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>v1(o))}),s=yield this.perform("getStorageAt",i);try{return Q(s)}catch(o){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&bi(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ce.throwError("Transaction hash mismatch from Provider.sendTransaction.",V.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>ge(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ce.throwError("transaction failed",V.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Q(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return ge(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?U.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Q(s):null))}),this.formatter.transactionRequest(yield xt(n))})}_getFilter(e){return ge(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield xt(r))})}_call(e,r,n){return ge(this,void 0,void 0,function*(){n>=jz&&Ce.throwError("CCIP read exceeded maximum redirections",V.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&bi(s)%32===4)try{const o=Ut(s,4),a=Ut(o,0,32);U.from(a).eq(i)||Ce.throwError("CCIP Read sender did not match",V.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],f=U.from(Ut(o,32,64)).toNumber(),c=U.from(Ut(o,f,f+32)).toNumber(),u=Ut(o,f+32);for(let A=0;Age(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ko(()=>ge(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return ko(()=>ge(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield xt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),oe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ge(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ge(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ce.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ge(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new Ky(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ge(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ce.throwError("network does not support ENS",V.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Mf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ge(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Me(e))throw n}typeof e!="string"&&Ce.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ge(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=od(yield this.call({to:n,data:"0x691f3431"+Mf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ge(this,void 0,void 0,function*(){let r=null;if(Me(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new Ky(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==V.errors.CALL_EXCEPTION)throw a}try{const a=od(yield this.call({to:o,data:"0x691f3431"+Mf(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==V.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ce.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new Vz(ya(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=ya(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=ya(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=ya(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=ya(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=ya(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Mi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ht=new V(Vc),Gz=["call","estimateGas"];function Rf(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Me(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Rf(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Rf(JSON.parse(t),e)}catch{}return null}function Y5(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Rf(e,!0);if(s)return s.data;Ht.throwError("missing revert data in call exception; Transaction reverted without a reason string",V.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Rf(e.body,!1);s==null&&(s=Rf(e,!1)),s&&Ht.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===V.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Ht.throwError("insufficient funds for intrinsic transaction cost",V.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Ht.throwError("nonce has already been used",V.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Ht.throwError("replacement fee too low",V.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Ht.throwError("legacy pre-eip-155 transactions not supported",V.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Gz.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Ht.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function Xx(t){return new Promise(function(e){setTimeout(e,t)})}function Kz(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}function rf(t){return t&&t.toLowerCase()}const Jy={};class X5 extends Wo{constructor(e,r,n){if(super(),e!==Jy)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ee(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ee(this,"_address",this.provider.formatter.address(n)),ee(this,"_index",null)):typeof n=="number"?(ee(this,"_index",n),ee(this,"_address",null)):Ht.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Ht.throwError("cannot alter JSON-RPC Signer connection",V.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Jz(Jy,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Ht.throwError("unknown account #"+this._index,V.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Mi(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Ht.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),xt({tx:xt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Ht.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Ht.throwError("user rejected transaction",V.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Y5("sendTransaction",o,s)))})}signTransaction(e){return Ht.throwError("signing transactions is unsupported",V.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Mi(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield ko(()=>Mi(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Mi(this,void 0,void 0,function*(){const r=typeof e=="string"?Ue(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Q(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Mi(this,void 0,void 0,function*(){const r=typeof e=="string"?Ue(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Q(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Mi(this,void 0,void 0,function*(){const i=yield ir.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(ir.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Mi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class Jz extends X5{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const Qz={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let la=class extends Sm{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=qn(this.constructor,"defaultUrl")()),typeof e=="string"?ee(this,"connection",Object.freeze({url:e})):ee(this,"connection",Object.freeze(Gt(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Mi(this,void 0,void 0,function*(){yield Xx(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=qn(this.constructor,"getNetwork");try{return r(U.from(e).toNumber())}catch(n){return Ht.throwError("could not detect network",V.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Ht.throwError("could not detect network",V.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new X5(Jy,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:xi(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=Uc(this.connection,JSON.stringify(n),Kz).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[rf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[rf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[rf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[rf(r.address),$e(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=rf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Mi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&U.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Ht.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return Y5(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return Xx(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(Qz);if(r)for(const s in r)r[s]&&(n[s]=!0);im(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=v1(U.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Q(e[s]))}),e.accessList&&(i.accessList=aa(e.accessList)),i}};var Yz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Xz=new V(Vc);class ph extends la{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Yz(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Xz.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(ee(this,"_network",r),this.emit("network",r,null))),r})}}const Zx=new V(Vc);let Zz=1;function eC(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:Zz++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:xi(s),provider:this}),e(s,(l,f)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:f,provider:this}),f.error){const c=new Error(f.error.message);return c.code=f.error.code,c.data=f.error.data,a(c)}o(f.result)})})}}function eU(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:xi(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class tU extends la{constructor(e,r){e==null&&Zx.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=eU(e)):e.sendAsync?i=eC(e,e.sendAsync.bind(e)):e.send?i=eC(e,e.send.bind(e)):Zx.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ee(this,"jsonRpcFetchFunc",i),ee(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const rU="solidity/5.7.0",nU=new RegExp("^bytes([0-9]+)$"),iU=new RegExp("^(u?int)([0-9]*)$"),sU=new RegExp("^(.*)\\[([0-9]*)\\]$"),oU="0000000000000000000000000000000000000000000000000000000000000000",Aa=new V(rU);function Z5(t,e,r){switch(t){case"address":return r?Tf(e,32):X(e);case"string":return Ue(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?Tf(e,32):X(e)}let n=t.match(iU);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Aa.throwArgumentError("invalid number type","type",t),r&&(i=256),e=U.from(e).toTwos(i),Tf(e,i/8)}if(n=t.match(nU),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Aa.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Aa.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+oU).substring(0,66)):e}if(n=t.match(sU),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Aa.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(Z5(i,a,!0))}),Et(o)}return Aa.throwArgumentError("invalid type","type",t)}function xe(t,e){t.length!=e.length&&Aa.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(Z5(n,e[i]))}),Q(Et(r))}function Ui(t,e){return be(xe(t,e))}function aU(t,e){return Yi(xe(t,e))}const lU="units/5.7.0",e3=new V(lU),t3=["wei","kwei","mwei","gwei","szabo","finney","ether"];function fU(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&e3.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function r3(t,e){if(typeof e=="string"){const r=t3.indexOf(e);r!==-1&&(e=3*r)}return ed(t,e??18)}function gh(t,e){if(typeof t!="string"&&e3.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=t3.indexOf(e);r!==-1&&(e=3*r)}return ri(t,e??18)}function cU(t){return r3(t,18)}function Qy(t){return gh(t,18)}const uU=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:um,ConstructorFragment:Wn,ErrorFragment:Oi,EventFragment:fi,FormatTypes:Re,Fragment:ci,FunctionFragment:Hn,HDNode:Ii,Indexed:fh,Interface:pr,LogDescription:a5,Logger:V,ParamType:tr,RLP:RL,SigningKey:dh,get SupportedAlgorithm(){return ml},TransactionDescription:l5,get TransactionTypes(){return Hy},get UnicodeNormalizationForm(){return Ki},Utf8ErrorFuncs:Jk,get Utf8ErrorReason(){return Hr},_TypedDataEncoder:ir,_fetchData:q5,_toEscapedUtf8String:XL,accessListify:aa,arrayify:X,base58:gl,base64:g$,checkProperties:im,checkResultErrors:Bk,commify:fU,computeAddress:Cm,computeHmac:wc,computePublicKey:bm,concat:Et,deepCopy:xi,defaultAbiCoder:jr,defaultPath:yz,defineReadOnly:ee,dnsEncode:n5,entropyToMnemonic:W5,fetchJson:Uc,formatBytes32String:ZL,formatEther:cU,formatUnits:r3,getAccountPath:gz,getAddress:Se,getContractAddress:am,getCreate2Address:$L,getIcapAddress:LL,getJsonWalletAddress:Az,getStatic:qn,hashMessage:ym,hexConcat:Br,hexDataLength:bi,hexDataSlice:Ut,hexStripZeros:_k,hexValue:v1,hexZeroPad:$e,hexlify:Q,id:Es,isAddress:jk,isBytes:Zi,isBytesLike:Gi,isHexString:Me,isValidMnemonic:pz,isValidName:z$,joinSignature:pL,keccak256:be,mnemonicToEntropy:Em,mnemonicToSeed:V5,namehash:Mf,nameprep:h$,parseBytes32String:e$,parseEther:Qy,parseTransaction:B5,parseUnits:gh,poll:ko,randomBytes:x1,recoverAddress:qo,recoverPublicKey:M5,resolveProperties:xt,ripemd160:j5,serializeTransaction:qj,sha256:Yi,sha512:sz,shallowCopy:Gt,shuffled:bz,solidityKeccak256:Ui,solidityPack:xe,soliditySha256:aU,splitSignature:ia,stripZeros:yi,toUtf8Bytes:Ue,toUtf8CodePoints:ah,toUtf8String:ts,verifyMessage:H5,verifyTypedData:Ez,zeroPad:Tf},Symbol.toStringTag,{value:"Module"})),dU=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var hU=Object.freeze({__proto__:null,abi:dU});const vU=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],yU={isValidSignatureBytes32:"0x1626ba7e"};var pU=Object.freeze({__proto__:null,abi:vU,returns:yU});const gU=[{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 mU=Object.freeze({__proto__:null,abi:gU});const wU=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var bU=Object.freeze({__proto__:null,abi:wU});const xU=[{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"}];var CU=Object.freeze({__proto__:null,abi:xU});const AU=[{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 EU=Object.freeze({__proto__:null,abi:AU});const SU=[{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 kU=Object.freeze({__proto__:null,abi:SU});const _U=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var TU=Object.freeze({__proto__:null,abi:_U});const Tr={erc6492:mU,erc5719:hU,erc1271:pU,factory:bU,mainModule:CU,mainModuleUpgradable:EU,sequenceUtils:kU,requireFreshSigner:TU},PU=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Tr},Symbol.toStringTag,{value:"Module"}));function mh(){return mh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ce({},n)).then(i=>ue(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ce({},n)).then(i=>ue(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ce({},n)).then(i=>ue(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),ce({},n)).then(i=>ue(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),ce(n,i)).then(s=>ue(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),ce(n,i)).then(s=>ue(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),ce(n,i)).then(s=>ue(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),ce(n,i)).then(s=>ue(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),ce(n,i)).then(s=>ue(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),ce(n,i)).then(s=>ue(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),ce(n,i)).then(s=>ue(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),ce(n,i)).then(s=>ue(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),ce({},n)).then(i=>ue(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),ce(n,i)).then(s=>ue(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),ce(n,i)).then(s=>ue(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),ce(n,i)).then(s=>ue(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),ce(n,i)).then(s=>ue(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),ce(n,i)).then(s=>ue(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),ce(n,i)).then(s=>ue(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),ce({},n)).then(i=>ue(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),ce(n,i)).then(s=>ue(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),ce(n,i)).then(s=>ue(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),ce(n,i)).then(s=>ue(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),ce(n,i)).then(s=>ue(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),ce(n,i)).then(s=>ue(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),ce(n,i)).then(s=>ue(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),ce(n,i)).then(s=>ue(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),ce(n,i)).then(s=>ue(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),ce(n,i)).then(s=>ue(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),ce({},n)).then(i=>ue(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),ce(n,i)).then(s=>ue(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),ce(n,i)).then(s=>ue(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),ce(n,i)).then(s=>ue(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),ce(n,i)).then(s=>ue(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ce=(t={},e={})=>({method:"POST",headers:mh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ue=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),tC=typeof global=="object"?global.fetch:window.fetch;class ad extends n3{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,tC),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=mh({},i.headers,s),tC(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const BU=Object.freeze(Object.defineProperty({__proto__:null,API:n3,SequenceAPIClient:ad,SmartRampOrderStatus:RU,SmartRampTxnStatus:OU,SortOrder:DU,WebRPCSchemaHash:NU,WebRPCSchemaVersion:MU,WebRPCVersion:IU},Symbol.toStringTag,{value:"Module"})),i3="3.7.5",LU=i3,$U=typeof atob=="function",FU=typeof btoa=="function",Ll=typeof Buffer=="function",rC=typeof TextDecoder=="function"?new TextDecoder:void 0,nC=typeof TextEncoder=="function"?new TextEncoder:void 0,jU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ff=Array.prototype.slice.call(jU),Nu=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(ff),zU=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,vr=String.fromCharCode.bind(String),iC=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),s3=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),o3=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),a3=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=ff[e>>18&63]+ff[e>>12&63]+ff[e>>6&63]+ff[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},km=FU?t=>btoa(t):Ll?t=>Buffer.from(t,"binary").toString("base64"):a3,Yy=Ll?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?s3(Yy(t)):Yy(t),UU=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?vr(192|e>>>6)+vr(128|e&63):vr(224|e>>>12&15)+vr(128|e>>>6&63)+vr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return vr(240|e>>>18&7)+vr(128|e>>>12&63)+vr(128|e>>>6&63)+vr(128|e&63)}},VU=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,l3=t=>t.replace(VU,UU),sC=Ll?t=>Buffer.from(t,"utf8").toString("base64"):nC?t=>Yy(nC.encode(t)):t=>km(l3(t)),Za=(t,e=!1)=>e?s3(sC(t)):sC(t),oC=t=>Za(t,!0),WU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,HU=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 vr((r>>>10)+55296)+vr((r&1023)+56320);case 3:return vr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return vr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},f3=t=>t.replace(WU,HU),c3=t=>{if(t=t.replace(/\s+/g,""),!zU.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?vr(e>>16&255,e>>8&255):vr(e>>16&255,e>>8&255,e&255);return r},_m=$U?t=>atob(o3(t)):Ll?t=>Buffer.from(t,"base64").toString("binary"):c3,u3=Ll?t=>iC(Buffer.from(t,"base64")):t=>iC(_m(t).split("").map(e=>e.charCodeAt(0))),d3=t=>u3(h3(t)),qU=Ll?t=>Buffer.from(t,"base64").toString("utf8"):rC?t=>rC.decode(u3(t)):t=>f3(_m(t)),h3=t=>o3(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Xy=t=>qU(h3(t)),GU=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)},v3=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),y3=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,v3(r));t("fromBase64",function(){return Xy(this)}),t("toBase64",function(e){return Za(this,e)}),t("toBase64URI",function(){return Za(this,!0)}),t("toBase64URL",function(){return Za(this,!0)}),t("toUint8Array",function(){return d3(this)})},p3=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,v3(r));t("toBase64",function(e){return ld(this,e)}),t("toBase64URI",function(){return ld(this,!0)}),t("toBase64URL",function(){return ld(this,!0)})},KU=()=>{y3(),p3()},Ko={version:i3,VERSION:LU,atob:_m,atobPolyfill:c3,btoa:km,btoaPolyfill:a3,fromBase64:Xy,toBase64:Za,encode:Za,encodeURI:oC,encodeURL:oC,utob:l3,btou:f3,decode:Xy,isValid:GU,fromUint8Array:ld,toUint8Array:d3,extendString:y3,extendUint8Array:p3,extendBuiltins:KU};var Zy=function(){return Zy=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),QU=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}},YU=function(t,e,r){return mo(void 0,void 0,void 0,function(){var n,i;return wo(this,function(s){return n=r.messageDigest(),i=H5(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},XU=function(t,e,r){return mo(void 0,void 0,void 0,function(){var n,i,s,o,a;return wo(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Bl(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===ZU?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},ZU="0x1626ba7e",g3="1",ep="eth",eV={name:"ETHAuth",version:g3},wh=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),mo(n,void 0,void 0,function(){var o,a,l,f,c,u,d,v,g,m;return wo(this,function(M){switch(M.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],f=o[2],c=o[3],u=o[4],a!==ep)throw new Error("ethauth: not an ethauth proof");return d=Ko.decode(f),v=JSON.parse(d),g=new Tm({address:l,claims:v,signature:c,extra:u}),[4,this.validateProof(g,s)];case 1:if(m=M.sent(),!m)throw new Error("ethauth: proof is invalid");return[2,g]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),mo(n,void 0,void 0,function(){var o,a;return wo(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return mo(n,void 0,void 0,function(){var s,l,o,a,l;return wo(this,function(f){switch(f.label){case 0:s=[],l=0,f.label=1;case 1:if(!(lKo.encode(t,!0),Pm=t=>Ko.encode(JSON.stringify(t),!0),rV=t=>{if(t!=null)return Ko.decode(t)},Im=t=>{if(t!=null)return JSON.parse(Ko.decode(t))};function m3(t){return t!=null&&(U.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Me(t)||typeof t=="bigint"||Zi(t))}const Mm=t=>X(be(typeof t=="string"?Ue(t):t)),w3=(t,e,r)=>xe(["string","uint256","address","bytes32"],["",e,t,r]),tp=(t,e,r)=>be(w3(t,e,r)),b3=()=>typeof window>"u"&&typeof process=="object",nV=()=>!b3(),x3=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Ko.decode(e[1]))};function bh(){return bh=Object.assign?Object.assign.bind():function(t){for(var e=1;ede.configure(t),Cc=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let iV=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${be(Ue(JSON.stringify(i,sV)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function sV(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Nm(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function oV(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function aV(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const Rm=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),E3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},S3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},k3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},lV=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),_3=t=>{const e=bh({},t.types);return delete e.EIP712Domain,ir.hash(t.domain,e,t.message)},A1=t=>X(_3(t)),{defineReadOnly:fV,getStatic:cV,resolveProperties:uV,checkProperties:dV,shallowCopy:hV,deepCopy:vV}=uU,yV=t=>t.replace(/([^:]\/)\/+/g,"$1"),pV=Object.freeze(Object.defineProperty({__proto__:null,Logger:C3,PromiseCache:iV,base64Decode:rV,base64DecodeObject:Im,base64Encode:tV,base64EncodeObject:Pm,checkProperties:dV,configureLogger:A3,deepCopy:vV,defineReadOnly:fV,encodeMessageDigest:Mm,encodeTypedDataDigest:A1,encodeTypedDataHash:_3,getDefaultConnectionInfo:Cc,getRandomInt:Rm,getStatic:cV,isBigNumberish:m3,isBrowser:nV,isNode:b3,jwtDecodeClaims:x3,logger:de,packMessageData:w3,promisify:Nm,queryStringFromObject:oV,queryStringToObject:aV,resolveProperties:uV,sanitizeAlphanumeric:S3,sanitizeHost:k3,sanitizeNumberString:E3,shallowCopy:hV,sleep:lV,subDigestOf:tp,urlClean:yV},Symbol.toStringTag,{value:"Module"}));function jt(){return jt=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:U.from(t).toNumber(),mV=t=>{if(t)return T3(t)},P3=(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 i=n.map(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(P3(t,!0,e),t),wV=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},bV=(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)}},M3=t=>I3(N3(t)),Jo=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=U.from(e).toNumber();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(U.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},xV=(t,e)=>t?t.name===e||t.chainId===e:!1,CV=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},E1=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",R3=t=>E1("https://${network}-indexer.sequence.app",{network:t}),O3=t=>E1("https://${network}-relayer.sequence.app",{network:t}),D3=t=>E1("https://nodes.sequence.app/${network}",{network:t});function B3(t){return Jo(Ac,t)}function L3(t){return U.isBigNumber(t)?t:m3(t)?U.from(t):U.from(t.chainId)}const fr=t=>{const e=D3(t);return{rpcUrl:e,relayer:{url:O3(t),provider:{url:e}},indexerUrl:R3(t)}},Ac=M3([jt({},Ft[te.POLYGON],fr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),jt({},Ft[te.MAINNET],fr("mainnet")),jt({},Ft[te.BSC],fr("bsc")),jt({},Ft[te.AVALANCHE],fr("avalanche")),jt({},Ft[te.ARBITRUM],fr("arbitrum")),jt({},Ft[te.ARBITRUM_NOVA],fr("arbitrum-nova")),jt({},Ft[te.OPTIMISM],fr("optimism")),jt({},Ft[te.POLYGON_ZKEVM],fr("polygon-zkevm")),jt({},Ft[te.GNOSIS],fr("gnosis")),jt({},Ft[te.RINKEBY],fr("rinkeby"),{disabled:!0}),jt({},Ft[te.GOERLI],fr("goerli")),jt({},Ft[te.POLYGON_MUMBAI],fr("mumbai")),jt({},Ft[te.BSC_TESTNET],fr("bsc-testnet")),jt({},Ft[te.ARBITRUM_GOERLI],fr("arbitrum-goerli")),jt({},Ft[te.BASE_GOERLI],fr("base-goerli")),jt({},Ft[te.HOMEVERSE_TESTNET],fr("homeverse-testnet")),jt({},Ft[te.AVALANCHE_TESTNET],fr("avalanche-testnet")),jt({},Ft[te.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),jt({},Ft[te.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),wl="2.0";class Om{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=$3(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const $3=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function F3(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 j3(t){return t!==void 0&&t.sendAsync!==void 0}let AV=0;class xh{constructor(e,r){this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,F3(e)?this.send=e.send.bind(e):j3(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:wl,id:++AV,method:n,params:i},(l,f)=>{l?a(l):o(f?f.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class EV{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync,this.provider=e}}class SV{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=rp(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=rp(this.isAllowedFunc)}}const rp=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class Dm{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const f=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(f,a.result):this.setCacheByBlockValue(f,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.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 z3{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Q(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[Se(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const U3=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},V3=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";de.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?de.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):de.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},kV=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Q(s)});return}e(r,n,i)},W3=["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 _V{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(W3.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class TV{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...W3],this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}de.debug("[public-provider] sending request to signer window",n.method),r(n,i)},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 la(e))}}class H3{constructor(){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.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let f=0;f{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class PV extends la{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const f={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return Uc(this.connection,JSON.stringify(f),IV).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new Om(i??[new z3({chainId:n}),new H3,new Dm({defaultChainId:n,blockCache:s})],new xh(this.fetch,n));this._sender=new xh(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Ft[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=U.from(r).toNumber(),this.getNetwork()}}}function IV(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 MV=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:SV,CachedProvider:Dm,ChainId:te,EagerProvider:z3,JsonRpcExternalProvider:EV,JsonRpcProvider:PV,JsonRpcRouter:Om,JsonRpcSender:xh,JsonRpcVersion:wl,NetworkType:bt,PublicProvider:TV,SigningProvider:_V,SingleflightMiddleware:H3,allNetworks:Ac,allowProviderMiddleware:rp,checkNetworkConfig:xV,createJsonRpcMiddlewareStack:$3,ensureUniqueNetworks:wV,ensureValidNetworks:I3,exceptionProviderMiddleware:U3,findNetworkConfig:Jo,findSupportedNetwork:B3,getChainId:T3,indexerURL:R3,isJsonRpcHandler:j3,isJsonRpcProvider:F3,isNetworkConfig:gV,isValidNetworkConfig:P3,loggingProviderMiddleware:V3,maybeChainId:mV,networkProviderMiddleware:kV,networks:Ft,networksIndex:CV,nodesURL:D3,relayerURL:O3,sortNetworks:N3,stringTemplate:E1,toChainIdNumber:L3,updateNetworkConfig:bV,validateAndSortNetworks:M3},Symbol.toStringTag,{value:"Module"}));function Sr(){return Sr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(Lm(i))return xe(["uint8","uint8","address"],[No.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return xe(["uint8","uint8","address","uint16","bytes"],[No.DynamicSignature,i.weight,i.address,s.length,s])}return xe(["uint8","uint8","bytes"],[No.EOASignature,i.weight,i.signature])});return xe(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function Y3(t,e,r){const n=Wc(e),i=await Promise.all(t.signers.map(async s=>{if(Lm(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!Bm(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:Hc(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function Of(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=U.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),f=X(l.signature);return i=i.add(a.weight),l.isDynamic||f.length!==66?Sr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Sr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:$m({version:1,threshold:t.threshold,signers:s}),weight:i}}const Fm={decode:t=>Q3(t),encode:t=>$m(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>Y3(t,e,r),encodeSigners:(t,e,r,n)=>Of(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Fm.encodeSigners(t,e,[],0);return r.gte(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 jV=Object.freeze({__proto__:null,SignaturePartType:No,isAddressMember:Lm,isUnrecoveredSignatureMember:K3,isUnrecoveredSignature:J3,decodeSignature:Q3,encodeSignature:$m,recoverSignature:Y3,encodeSigners:Of,SignatureCoder:Fm});const jm={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>be(jr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),xe(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>U.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:U.from(e.weight).toNumber()})),fromSimple:t=>{if(!_t.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new pr([...Tr.mainModule.abi,...Tr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[jm.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:U.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:U.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:U.from(n.weight),address:n.address}));return{version:e.version,threshold:U.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!_t.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,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[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Of(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>U.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Of(t,r,[]);if(a.gte(t.threshold))return o}return Of(t,r,[]).encoded}};var zV=Object.freeze({__proto__:null,ConfigCoder:jm});const X3=1,UV={version:X3,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Di=Object.freeze({__proto__:null,config:zV,signature:jV,version:X3,DeployedWalletContext:UV});const zm="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function Z3(t){return be(e8(t))}function e8(t){return xe(["bytes32","bytes32"],[zm,t])}function t8(t){const e=X(t);if(e.length===64&&Q(e.slice(0,32))===zm)return Q(e.slice(32,64))}function VV(t){return t8(t)!==void 0}var WV=Object.freeze({__proto__:null,SetImageHashPrefix:zm,hashSetImageHash:Z3,messageSetImageHash:e8,decodeMessageSetImageHash:t8,isMessageSetImageHash:VV});let or=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Lt=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 Ch=66;function Qo(t){return t.left!==void 0&&t.right!==void 0}function $l(t){return t.tree!==void 0}function qc(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function Ah(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Lt.Signature:{const s=e[0],o=Q(e.slice(1,Ch+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(Ch+1)}break;case Lt.Address:{const s=e[0],o=Se(Q(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Lt.DynamicSignature:{const s=e[0],o=Se(Q(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Q(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Lt.Node:{const s=Q(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Lt.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=Ah(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Lt.Subdigest:{const s=Q(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Lt.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=Ah(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Q(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class r8 extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Ro(t,e,r){if(Qo(t)){const[n,i]=await Promise.all([Ro(t.left,e,r),Ro(t.right,e,r)]);return{left:n,right:i}}if($l(t))return{weight:t.weight,threshold:t.threshold,tree:await Ro(t.tree,e,r)};if(qc(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await Bm(t.address,e,t.signature,r))throw new r8(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:Hc(e,t.signature),signature:t.signature,subdigest:e};return t}const xr={concat:(t,e)=>xe(["bytes","bytes"],[t,e]),node:t=>xe(["uint8","bytes32"],[Lt.Node,t]),branch:t=>{const e=X(t);return xe(["uint8","uint24","bytes"],[Lt.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return xe(["uint8","uint8","uint16","uint24","bytes"],[Lt.Nested,t,e,n.length,n])},subdigest:t=>xe(["uint8","bytes32"],[Lt.Subdigest,t]),signature:(t,e)=>xe(["uint8","uint8","bytes"],[Lt.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return xe(["uint8","uint8","address","uint24","bytes"],[Lt.DynamicSignature,t,e,n.length,n])},address:(t,e)=>xe(["uint8","uint8","address"],[Lt.Address,t,e])};function Df(t,e,r,n,i={}){const s=Bf(t.tree,e,r,i);return U.from(n).isZero()?{encoded:xe(["uint8","uint16","uint32","bytes"],[or.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:U.from(t.threshold).gt(255)?{encoded:xe(["uint8","uint16","uint32","bytes"],[or.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:xe(["uint8","uint8","uint32","bytes"],[or.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Bf(t,e,r,n={}){const i=!n.disableTrim;if(ei(t)){const s=Bf(t.left,e,r),o=Bf(t.right,e,r),a=Fr(t.left),l=Fr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:xr.node(an(t)),weight:_t}:i&&o.weight.eq(0)&&!l?{encoded:xr.concat(s.encoded,xr.node(an(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:xr.concat(xr.node(an(t.left)),xr.branch(o.encoded)),weight:o.weight}:{encoded:xr.concat(s.encoded,xr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ns(t)){const s=Bf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:xr.node(an(t)),weight:_t}:{encoded:xr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(is(t))return{encoded:xr.node(an(t)),weight:_t};if(rs(t)){const s=r.includes(t.subdigest);return{encoded:xr.node(an(t)),weight:s?qk:_t}}if(Fr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:xr.dynamicSignature(t.weight,t.address,a),weight:U.from(t.weight)}:{encoded:xr.signature(t.weight,a),weight:U.from(t.weight)}}else return{encoded:xr.address(t.weight,t.address),weight:_t};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function Um(t){return Wm(t)?Um(t.suffix[t.suffix.length-1]):t.config}function Vm(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function Gc(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(Vm)}function n8(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Wm(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(n8)}function S1(t){const e=X(t),r=e[0];switch(r){case or.Legacy:return{version:2,type:or.Legacy,decoded:fd(e)};case or.Dynamic:return{version:2,type:or.Dynamic,decoded:fd(e.slice(1))};case or.NoChainIdDynamic:return{version:2,type:or.NoChainIdDynamic,decoded:fd(e.slice(1))};case or.Chained:return i8(e);default:throw new Error(`Invalid signature type: ${r}`)}}function fd(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=Ah(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function i8(t){const e=X(t),r=e[0];if(r!==or.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(Bs(s))),i=xe(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return xe(["uint8","bytes"],[or.Chained,i])}function Bs(t){if(Gi(t))return Q(t);if(Gc(t)||Wm(t))return k1(Bs(t),(t.suffix||[]).map(Bs));const e=Vm(t)?t.decoded:t.config;switch(t.type){case or.Legacy:if(U.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return np(e);case or.NoChainIdDynamic:case or.Dynamic:return xe(["uint8","bytes"],[t.type,np(e)]);case or.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function np(t){return xe(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,Lf(t.tree)])}function Lf(t){if(ei(t)||Qo(t)){const e=X(Lf(t.right)),r=X(Lf(t.left));return ei(t.right)||Qo(t.right)?xe(["bytes","uint8","uint24","bytes"],[r,Lt.Branch,e.length,e]):xe(["bytes","bytes"],[r,e])}if(ns(t)||$l(t)){const e=X(Lf(t.tree));return xe(["uint8","uint8","uint16","uint24","bytes"],[Lt.Nested,t.weight,t.threshold,e.length,e])}if(qc(t)||Fr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==Ch){if(!t.address)throw new Error("Dynamic signature leaf must have address");return xe(["uint8","uint8","address","uint24","bytes"],[Lt.DynamicSignature,t.weight,t.address,e.length,e])}else return xe(["uint8","uint8","bytes"],[Lt.Signature,t.weight,e])}if(Fr(t))return xe(["uint8","uint8","address"],[Lt.Address,t.weight,t.address]);if(is(t))return xe(["uint8","bytes32"],[Lt.Node,t.nodeHash]);if(rs(t))return xe(["uint8","bytes32"],[Lt.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function $f(t){return ei(t)?[...$f(t.left),...$f(t.right)]:ns(t)?$f(t.tree):Fr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Ff(t){return Qo(t)?[...Ff(t.left),...Ff(t.right)]:$l(t)?Ff(t.tree):qc(t)?[t.signature]:[]}function cd(t){return Qo(t)?[...cd(t.left),...cd(t.right)]:$l(t)?cd(t.tree):rs(t)?[t.subdigest]:[]}async function Eh(t){const e=typeof t=="string"?S1(t):t;if(Gc(e)){const n=await Promise.all([Eh(Sr({},e,{suffix:void 0})),...e.suffix.map(i=>Eh(i))]);return k1(n[0],n.slice(1))}const{trimmed:r}=await jf(e.decoded.tree);return Bs(Sr({},e,{decoded:Sr({},e.decoded,{tree:r})}))}async function jf(t,e=!0){if(Qo(t)){const[r,n]=await Promise.all([jf(t.left),jf(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await Ro(t,oh,void 0);return{weight:0,trimmed:{nodeHash:an(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if($l(t)){const r=await jf(t.tree);if(r.weight===0)try{const n=await Ro(t,oh,void 0);return{weight:0,trimmed:{nodeHash:an(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return is(t)&&l8(t.nodeHash)?{weight:0,trimmed:Sr({},a8(t.nodeHash))}:qc(t)||Fr(t)&&t.signature!==void 0?{weight:U.from(t.weight).toNumber(),trimmed:t}:!e&&rs(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const _1={decode:t=>S1(t),encode:t=>Bs(t),trim:t=>Eh(t),supportsNoChainId:!0,recover:(t,e,r)=>Hm(t,e,r),encodeSigners:(t,e,r,n)=>Df(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=_1.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=Gi(t)?t:Bs(t),i=r.map(s=>Gi(s)?s:Bs(s));return k1(n,i)},hashSetImageHash:function(t){return Z3(t)},signaturesOf(t){return $f(t.tree)},signaturesOfDecoded:function(t){return Ff(t.decoded.tree)}};var HV=Object.freeze({__proto__:null,SignatureType:or,SignaturePartType:Lt,SignaturePartTypeLength:Ch,isUnrecoveredNode:Qo,isUnrecoveredNestedLeaf:$l,isUnrecoveredSignatureLeaf:qc,decodeSignatureTree:Ah,InvalidSignatureLeafError:r8,recoverTopology:Ro,partEncoder:xr,encodeSigners:Df,encodeTree:Bf,deepestConfigOfSignature:Um,isUnrecoveredSignature:Vm,isUnrecoveredChainedSignature:Gc,isSignature:n8,isChainedSignature:Wm,decodeSignature:S1,decodeSignatureBody:fd,decodeChainedSignature:i8,setImageHashStruct:s8,recoverSignature:Hm,encodeChain:k1,encodeSignature:Bs,encodeSignatureBody:np,encodeSignatureTree:Lf,signaturesOf:$f,signaturesOfDecoded:Ff,subdigestsOfDecoded:cd,trimSignature:Eh,trimUnrecoveredTree:jf,SignatureCoder:_1});function Fr(t){return t.address!==void 0&&t.weight!==void 0}function rs(t){return t.subdigest!==void 0&&t.address===void 0}function zf(t){return ei(t)?JSON.stringify({left:zf(t.left),right:zf(t.right)}):ns(t)?JSON.stringify({weight:U.from(t.weight).toString(),threshold:U.from(t.threshold).toString(),tree:zf(t.tree)}):Fr(t)?JSON.stringify({address:t.address,weight:U.from(t.weight).toString()}):JSON.stringify(t)}function Uf(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Uf(e.left),right:Uf(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:U.from(e.weight),threshold:U.from(e.threshold),tree:Uf(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:U.from(e.weight)}:e}function ns(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function is(t){return t.nodeHash!==void 0}function qm(t){return Fr(t)||rs(t)||ns(t)||is(t)}function ei(t){return t.left!==void 0&&t.right!==void 0}function qV(t){return ei(t)||qm(t)}function o8(t){return xe(["uint96","address"],[t.weight,t.address])}function a8(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=U.from(e.slice(0,12)),n=Se(Q(e.slice(12)));return{weight:r,address:n}}function l8(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function an(t){if(Fr(t))return o8(t);if(rs(t))return Ui(["string","bytes32"],[`Sequence static digest: -`,t.subdigest]);if(ns(t)){const e=an(t.tree);return Ui(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return is(t)?t.nodeHash:Ui(["bytes32","bytes32"],[an(t.left),an(t.right)])}function GV(t){const e=[];let r=t;for(;!qm(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function KV(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Gm(t){return Ui(["bytes32","uint256"],[Ui(["bytes32","uint256"],[an(t.tree),t.threshold]),t.checkpoint])}function f8(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function el(t){return Fr(t)||rs(t)?[t]:ns(t)?[{threshold:t.threshold,weight:t.weight,members:el(t.tree)}]:is(t)?[]:[...el(t.left),...el(t.right)]}function ip(t){return is(t)?!0:ei(t)?ip(t.left)||ip(t.right):!1}function JV(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:el(t.tree)}}const c8=(t,e)=>t.map(r=>f8(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Km(t){if(t.length===0)throw new Error("Empty members array");return c8(t,Km).reduce((r,n)=>({left:r,right:n}))}function Jm(t){if(t.length===0)throw new Error("Empty members array");const e=c8(t,Jm);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Qm(t){return t.length>8?Jm(t):Km(t)}function u8(t,e=Qm){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Sh(t,e){return rs(t)?t.subdigest===e:ei(t)?Sh(t.left,e)||Sh(t.right,e):!1}function sp(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ns(n)?e.push(n.tree):ei(n)?(e.push(n.left),e.push(n.right)):Fr(n)&&r.add({address:n.address,weight:U.from(n.weight).toNumber()})}return Array.from(r)}function kh(t){return ei(t)?kh(t.left)&&kh(t.right):!is(t)}const T1={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Gm(t),hasSubdigest:(t,e)=>Sh(t.tree,e),checkpointOf:t=>U.from(t.checkpoint),signersOf:t=>sp(t.tree),fromSimple:t=>u8({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>kh(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new pr(Tr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[T1.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new pr(Tr.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=s.decodeFunctionData(s.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(!_t.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!_t.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))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:U.from(t.threshold).toString(),checkpoint:U.from(t.checkpoint).toString(),tree:zf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:U.from(e.threshold),checkpoint:U.from(e.checkpoint),tree:Uf(e.tree)}},editConfig:function(t,e){var r,n;const i=el(t.tree);if(e.add)for(const s of e.add)i.find(o=>Fr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Fr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Qm(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Df(t,r,[],0);if(a.gte(t.threshold))return o}const n=sp(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Df(t,r,[],0);if(a.gte(t.threshold))return o}return Df(t,r,[],0).encoded}};var QV=Object.freeze({__proto__:null,isSignerLeaf:Fr,isSubdigestLeaf:rs,topologyToJSON:zf,topologyFromJSON:Uf,isNestedLeaf:ns,isNodeLeaf:is,isLeaf:qm,isNode:ei,isTopology:qV,encodeSignerLeaf:o8,decodeSignerLeaf:a8,isEncodedSignerLeaf:l8,hashNode:an,leftFace:GV,isWalletConfig:KV,imageHash:Gm,isSimpleNestedMember:f8,topologyToMembers:el,hasUnknownNodes:ip,toSimpleWalletConfig:JV,legacyTopologyBuilder:Km,merkleTopologyBuilder:Jm,optimized2SignersTopologyBuilder:Qm,toWalletConfig:u8,hasSubdigest:Sh,signersOf:sp,isComplete:kh,ConfigCoder:T1}),YV=Object.freeze({__proto__:null});const XV={config:T1,signature:_1},d8=2,ZV={version:d8,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ee=Object.freeze({__proto__:null,config:QV,signature:HV,context:YV,chained:WV,coders:XV,version:d8,DeployedWalletContext:ZV});function op(t,e){const r=be(xe(["bytes","bytes32"],[t.walletCreationCode,$e(t.mainModule,32)])),n=be(xe(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Se(Ut(n,12))}async function eW(t,e,r,n,i,s){return(await Promise.all(S8.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Q(r)),f=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),c=a.config.ConfigCoder.imageHashOf(f.config);if(op(s[a.version],c).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),v=a.config.ConfigCoder.imageHashOf(d.config);return op(s[a.version],v).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function tW(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 rW(t){const e=Object.keys(t).length;return t[e]}var nW=Object.freeze({__proto__:null,addressOf:op,isValidCounterfactual:eW,isValidVersionedContext:tW,latestContext:rW});const P1=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`;function iW(t,e,r,n){return Sr({},t,{chainId:r,intent:{id:n,wallet:e}})}function sW(t){return be(jr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function oW(t){const e=jr.decode(["uint256",P1],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function h8(t,e){return jr.encode(["uint256",P1],[t,Ec(e)])}function v8(t,e){return be(h8(t,e))}function aW(t,e,r,n){return Wc({address:t,chainId:e,digest:v8(r,n)})}function lW(t,e,r){return Wc({address:t,chainId:e,digest:be(jr.encode(["string",P1],["guest:",Ec(r)]))})}function y8(t,e){return e.map(r=>Ym(t,r))}function Ym(t,e){if(e.to)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new pr(Tr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function I1(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function p8(t){return t.every(I1)}function Ec(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:_t,target:(r=e.to)!=null?r:Wk,value:e.value!==void 0?e.value:_t,data:e.data!==void 0?e.data:[]}})}function fW(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function cW(t,e){const r=U.from(t),n=U.from(e),i=Hk.pow(U.from(96));if(!n.div(i).eq(_t))throw new Error("Space already encoded");return n.add(r.mul(i))}function uW(t){const e=U.from(t),r=Hk.pow(U.from(96));return[e.div(r),e.mod(r)]}function dW(t,e){return Array.isArray(e)?p8(e)?e:y8(t,e).map(n=>n.transaction):I1(e)?[e]:[Ym(t,e).transaction]}function g8(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&&I1(r),!0)}function m8(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&g8(t)}function hW(t){const e=new pr(Tr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),m8(t)?[Ec(t.transactions),t.nonce,t.signature]:[Ec(t.transactions),0,[]])}const w8="0x61c2926c",b8=`tuple( - bool delegateCall, - bool revertOnError, - uint256 gasLimit, - address target, - uint256 value, - bytes data -)[]`,x8=(t,e)=>{const r=[],n=new pr(Tr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Q(s.slice(0,4))===w8){const o=s.slice(4),a=jr.decode([b8],o)[0];r.push(...a.map(l=>Sr({},l,{to:l.target})))}else try{const o=n.decodeFunctionData("execute",s)[0],a=x8(t,o.map(l=>Sr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var vW=Object.freeze({__proto__:null,MetaTransactionsType:P1,intendTransactionBundle:iW,intendedTransactionID:sW,unpackMetaTransactionsData:oW,packMetaTransactionsData:h8,digestOfTransactions:v8,subdigestOfTransactions:aW,subdigestOfGuestModuleTransactions:lW,toSequenceTransactions:y8,toSequenceTransaction:Ym,isSequenceTransaction:I1,hasSequenceTransactions:p8,sequenceTxAbiEncode:Ec,fromTxAbiEncode:fW,encodeNonce:cW,decodeNonce:uW,fromTransactionish:dW,isTransactionBundle:g8,isSignedTransactionBundle:m8,encodeBundleExecData:hW,selfExecuteSelector:w8,selfExecuteAbi:b8,unwind:x8});const C8="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",yW="0x6492649264926492649264926492649264926492649264926492649264926492";async function A8(t,e,r,n){return await t.call({data:Et([C8,new um().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var pW=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:C8,EIP_6492_SUFFIX:yW,validateEIP6492Offchain:A8});class gW{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Bl(e,[...Tr.mainModuleUpgradable.abi,...Tr.mainModule.abi,...Tr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=jr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return Se(Q(n));if(n.length===32)return jr.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 A8(this.provider,e,r,n)}}var mW=Object.freeze({__proto__:null,OnChainReader:gW});function wW(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ae=Object.freeze({__proto__:null,config:NV,signature:RV,context:nW,signer:FV,EIP1271:BV,transaction:vW,reader:mW,EIP6492:pW,isWalletSignRequestMetadata:wW});const ap=[{config:jm,signature:Fm},{config:T1,signature:_1}];function E8(t){const e=t-1;if(e<0||e>=ap.length)throw new Error(`No coder for version: ${t}`);return ap[e]}function bW(t){return E8(t)}var Gr=Object.freeze({__proto__:null,ALL_CODERS:ap,coderFor:E8,genericCoderFor:bW});const S8=[Di,Ee],xW=Object.freeze(Object.defineProperty({__proto__:null,allVersions:S8,commons:ae,universal:Gr,v1:Di,v2:Ee},Symbol.toStringTag,{value:"Module"}));function CW(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:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),f=[];for(let c=1;cX(s).length===0))return aC;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:U.from(i).toNumber(),gasLimit:U.from(i).toNumber()}))}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 s=await new Bl(e,Tr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ae.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=ae.transaction.intendedTransactionID(e));let o=!1;const a=async function(c,u){let d=0;for(;!o;){try{return await c()}catch(v){if(d++,i!==void 0&&d>=i)throw de.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,v),v;de.warn(`attempt #${d} failed${u?`: ${u}`:""}`,v)}n>0&&await new Promise(v=>setTimeout(v,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let c=s.fromBlockLog;if(c<0&&(c=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+c),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),v=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,c-s.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,c-s.deltaBlocksLog)} to ${d}`);c=d;const m=(await Promise.all(v.map(M=>a(()=>s.provider.getTransactionReceipt(M.transactionHash),`unable to get receipt for transaction ${M.transactionHash}`)))).find(M=>M.logs.find(A=>A.topics.length===0&&A.data.replace("0x","")===u||A.topics.length===1&&A.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&A.data.length>=64&&A.data.replace("0x","").startsWith(u)));if(m)return Yo({receipt:m},await a(()=>s.provider.getTransaction(m.transactionHash),`unable to get transaction ${m.transactionHash}`));o||await new Promise(M=>setTimeout(M,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function PW(t){return t.signer!==void 0&&Wo.isSigner(t.signer)}class IW extends I8{constructor(e){if(super(Wo.isSigner(e)?{provider:e.provider}:Yo({},e,{provider:e.signer.provider})),this.signer=Wo.isSigner(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){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&&de.warn("LocalRelayer doesn't accept fee quotes");const i=ae.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(Yo({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const MW="v1",NW="v0.4.0",RW="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let Ss=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}({}),OW=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}({}),DW=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),BW=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class M8{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Jt({},n)).then(i=>Qt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Jt({},n)).then(i=>Qt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Jt({},n)).then(i=>Qt(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Jt({},n)).then(i=>Qt(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Jt({},n)).then(i=>Qt(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),Jt(n,i)).then(s=>Qt(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),Jt(n,i)).then(s=>Qt(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Jt(n,i)).then(s=>Qt(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),Jt(n,i)).then(s=>Qt(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Jt(n,i)).then(s=>Qt(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Jt({},n)).then(i=>Qt(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),Jt(n,i)).then(s=>Qt(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Jt(n,i)).then(s=>Qt(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),Jt(n,i)).then(s=>Qt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),Jt(n,i)).then(s=>Qt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),Jt(n,i)).then(s=>Qt(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),Jt(n,i)).then(s=>Qt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),Jt(n,i)).then(s=>Qt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Jt(n,i)).then(s=>Qt(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Jt=(t={},e={})=>({method:"POST",headers:Yo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Qt=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var lC=Object.freeze({__proto__:null,WebRPCVersion:MW,WebRPCSchemaVersion:NW,WebRPCSchemaHash:RW,ETHTxnStatus:Ss,TransferType:OW,FeeTokenType:DW,SortOrder:BW,Relayer:M8});const LW=[Ss.DROPPED,Ss.SUCCEEDED,Ss.PARTIALLY_FAILED,Ss.FAILED],$W=[Ss.DROPPED,Ss.PARTIALLY_FAILED,Ss.FAILED];function FW(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&sa.isProvider(t.provider)}const jW=typeof global=="object"?global.fetch:window.fetch;class N8{constructor(e){this.service=new M8(e.url,jW),this.provider=sa.isProvider(e.provider)?e.provider:new ph(Cc(e.provider.url))}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ae.transaction.intendedTransactionID(e)),de.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&LW.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=jr.encode([ae.transaction.MetaTransactionsType],[ae.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");de.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw de.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:ae.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return de.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return de.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:Q(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){de.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?U.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=U.from(i.nonce),[o,a]=ae.transaction.decodeNonce(s);return de.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;de.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:de.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw de.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ae.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(de.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:c=>Promise.reject(new Error("impossible"))},f=async function(u){var d;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const v=await i.wait(e.intent.id),g=(d=v.receipt)==null?void 0:d.transactionHash;if(!g)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,v),i.provider.waitForTransaction(g,u)};return l.wait=f,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||$W.includes(a.status))throw new zW(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:U.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(f){return s.provider.waitForTransaction(l.transactionHash,f)}}}}class zW{constructor(e){this.receipt=e}}function R8(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 UW=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:IW,ProviderRelayer:I8,ProviderRelayerDefaults:P8,RpcRelayer:N8,RpcRelayerProto:lC,isLocalRelayerOptions:PW,isProviderRelayerOptions:TW,isRelayer:R8,isRpcRelayerOptions:FW,proto:lC},Symbol.toStringTag,{value:"Module"}));function O8(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class D8{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var VW=Object.freeze({__proto__:null,isSapientSigner:O8,SignerWrapper:D8});function B8(t){return t.rejected}function Xm(t){return t.signature!==void 0}function L8(t){return!B8(t)&&!Xm(t)}const $8="Initial";class Zm{constructor(e,r=Zm.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${Q(x1(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>O8(r)?r:new D8(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(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,f={ended:!1,message:s,signers:{}};let c=o??{};const u=m=>{c=m,r.notifyObservers(n,f,c)},d=()=>{try{r.notifyObservers(n,f,c);const m=Object.entries(f.signers).filter(([M,A])=>L8(A));if(a&&a(f,u)||m.length===0){f.ended=!0,i(f),r.notifyObservers(n,f,c);return}}catch(m){console.error("Error while notifying observers",m)}};let v=r.signers;if(l){const m=await Promise.all(r.signers.map(async function(M){return M.getAddress()}));v=r.signers.filter((M,A)=>l.includes(m[A]))}const g=await Promise.allSettled(v.map(async function(m){const M=await m.getAddress();return f.signers[M]={situation:$8},m.requestSignature(n,s,o??{},{onSignature:A=>{const E=m.suffix();f.signers[M]={signature:A,suffix:E},d()},onRejection:A=>{f.signers[M]={rejected:!0,error:A},d()},onStatus:A=>{f.signers[M]={situation:A},d()}})}));for(let m=0;mxt(e))):xt(t)}const cC=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(Xm(n)){const i=X(n.suffix),s=xe(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class Sc extends Wo{constructor(e){if(_t.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ae.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Sc(bo({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ae.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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ae.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ae.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return Sc.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(bo({},e,{chainId:this.chainId,intent:{id:Q(x1(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new pr(Tr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,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 signDigest(e,r){const n=tp(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 i=bo({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,f)=>{const c=cC(l),u=bo({},i,{parts:c});return f(u),this.coders.signature.hasEnoughSigningPower(this.config,c)}}),a=cC(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(be(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async signTransactions(e,r){const n=await fC(e),i=ae.transaction.fromTransactionish(this.address,n);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});let s=r;if(s===void 0&&(s=await this.reader().nonce(this.address,0),s===void 0))throw new Error("Unable to determine nonce");const o=ae.transaction.digestOfTransactions(s,i),a=await this.signDigest(o,{transactions:i});return{intent:{id:tp(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:s,signature:a}}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,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await fC(e),n=ae.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?U.from(o.gasLimit).toNumber():s[a].gasLimit;return bo({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function xo(){return xo=Object.assign?Object.assign.bind():function(t){for(var e=1;er.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}provider(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new ph(Cc(r.rpcUrl),{name:"",chainId:U.from(e).toNumber()})}reader(e){return _t.eq(e)?new HW:new ae.reader.OnChainReader(this.provider(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return R8(r.relayer)?r.relayer:new N8(r.relayer)}setOrchestrator(e){this.orchestrator=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=Gr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=_t.eq(e);return new Sc({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(R=>{if(!R)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return R}),o=s.then(R=>k8.counterfactualVersion(this.address,R.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const L=await n.reader(e).implementation(n.address);if(!L)throw new Error(`Implementation not found for wallet ${n.address}`);const F=Object.values(n.contexts);for(let z=0;z0?m[m.length-1].nextImageHash:d,A=await this.tracker.configOfImageHash({imageHash:M});if(!A)throw new Error(`Config not found for imageHash ${M}`);const E=await i,S=await s,P=Gr.coderFor(v).config.checkpointOf(A);return{original:xo({},S,{version:await o}),onChain:{imageHash:u,config:await f,version:c,deployed:E},fullyMigrated:v===this.version,signedMigrations:g,version:v,presignedConfigurations:m,imageHash:M,config:A,checkpoint:P,canOnchainValidate:c===this.version&&E}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);return n.transactions.length===0?e:{entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ae.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=be(Ue(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore"){const s=_t.eq(r)?this.networks[0].chainId:r,o=await this.status(s);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),f=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,o,r)}return f}buildEIP6492Signature(e,r,n){const i=this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=jr.encode(["address","bytes","bytes"],[i.entrypoint,ae.transaction.encodeBundleExecData(i),e]);return xe(["bytes","bytes32"],[s,ae.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,xo({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));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),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=Sc.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ae.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const i=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ae.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:s}=this.contextFor(e.version);return{entrypoint:s,transactions:n,chainId:r,intent:{id:i,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 i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(xo({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(be(e),r,!0,n)}async signTransactions(e,r,n){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=await this.walletForStatus(r,i).signTransactions(e);return xo({},o,{signature:await this.decorateSignature(o.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=Gr.coderFor(s.version).config,l=a.imageHashOf(s),f=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!f||a.imageHashOf(f)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);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(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i){const s=i||await this.status(e.chainId);this.mustBeFullyMigrated(s);const o=this.decorateTransactions(e,s);return this.relayer(r).relay(o,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i){const s=i||await this.status(r),o=this.walletForStatus(r,s),a=await this.predecorateTransactions(e,s,r),l=ae.transaction.fromTransactionish(this.address,a),f=o.coders.config.buildStubSignature(o.config,n),c=Q(x1(32)),u={chainId:r,intent:{id:c,wallet:this.address},signature:f,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,s),v=ae.transaction.encodeBundleExecData(d),g=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,v);return xo({},g,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),s=ae.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s){const o=await this.status(r),a=i?e:await this.predecorateTransactions(e,o,r),l=await this.signTransactions(a,r);return s&&s(l),this.sendSignedTransactions(l,r,n)}async signTypedData(e,r,n,i,s="ignore"){const o=A1({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>Gr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const f=l===o.length-1,c=await e.tracker.configOfImageHash({imageHash:a});if(!c){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Gr.genericCoderFor(c.version).config.signersOf(c).forEach(v=>{const g=r.find(m=>m.address===v.address&&m.network===i);if(g&&f&&g.flaggedForRemoval){g.flaggedForRemoval=!1;return}g||r.push({address:v.address,weight:v.weight,network:i,flaggedForRemoval:!f})})}))})),r}}function qW(t){return t instanceof $i}const GW=Object.freeze(Object.defineProperty({__proto__:null,Account:$i,isAccount:qW},Symbol.toStringTag,{value:"Module"}));function KW(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function JW(t){return t.startsWith("ipfs://")}class QW{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(ae.signer.canRecover(n)){const l=ae.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ae.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await XW(YW(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Q(await(i||new ZW).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Q(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return F8(t,e,r,a,i,s+1)}class ZW{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>JW(n)?KW(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()},this.gateway=e}}const eH=(t,e)=>e.some(r=>t instanceof r);let uC,dC;function tH(){return uC||(uC=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function rH(){return dC||(dC=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const j8=new WeakMap,dp=new WeakMap,z8=new WeakMap,a0=new WeakMap,ew=new WeakMap;function nH(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Ls(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&j8.set(r,t)}).catch(()=>{}),ew.set(e,t),e}function iH(t){if(dp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});dp.set(t,e)}let hp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return dp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||z8.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ls(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 sH(t){hp=t(hp)}function oH(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(l0(this),e,...r);return z8.set(n,e.sort?e.sort():[e]),Ls(n)}:rH().includes(t)?function(...e){return t.apply(l0(this),e),Ls(j8.get(this))}:function(...e){return Ls(t.apply(l0(this),e))}}function aH(t){return typeof t=="function"?oH(t):(t instanceof IDBTransaction&&iH(t),eH(t,tH())?new Proxy(t,hp):t)}function Ls(t){if(t instanceof IDBRequest)return nH(t);if(a0.has(t))return a0.get(t);const e=aH(t);return e!==t&&(a0.set(t,e),ew.set(e,t)),e}const l0=t=>ew.get(t);function lH(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Ls(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ls(o.result),l.oldVersion,l.newVersion,Ls(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),a}const fH=["get","getKey","getAll","getAllKeys","count"],cH=["put","add","delete","clear"],f0=new Map;function hC(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(f0.get(e))return f0.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=cH.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||fH.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let f=l.store;return n&&(f=f.index(a.shift())),(await Promise.all([f[r](...a),i&&l.done]))[0]};return f0.set(e,s),s}sH(t=>({...t,get:(e,r,n)=>hC(e,r)||t.get(e,r,n),has:(e,r)=>!!hC(e,r)||t.has(e,r)}));class uH{}var dH=Object.freeze({__proto__:null,ConfigTracker:uH});class hH{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Nr(e,"? "),Nr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Nr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Nr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Nr(e,"? "),Nr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Nr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Nr(e,"? "),Nr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Nr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Nr(e,"? "),Nr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Nr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Nr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Nr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Nr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var vH=Object.freeze({__proto__:null,DebugConfigTracker:hH});function Ws(){return Ws=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.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 i,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(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:i,toImageHash:s}),Promise.resolve())}}function tl(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]=U.from(n):Array.isArray(n)?e[r]=n.map(i=>tl(i)):typeof n=="object"&&n!==null?e[r]=tl(n):e[r]=n}return e}class yH{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>tl(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>tl(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>tl(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,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,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await lH(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),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 V8(t){return t.left!==void 0&&t.right!==void 0}function W8(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function vp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var pH=Object.freeze({__proto__:null,isPlainNode:V8,isPlainNested:W8,isPlainV2Config:vp,MemoryTrackerStore:U8,recreateBigNumbers:tl,IndexedDBStore:yH});class H8{constructor(e,r=new U8,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(V8(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return W8(o)?{weight:U.from(o.weight),threshold:U.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ee.config.isNodeLeaf(s))return;const o=Ee.config.hashNode(s);if(Ee.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),f=i.store.saveV2Node(o,{left:Ee.config.hashNode(s.left),right:Ee.config.hashNode(s.right)});await Promise.all([a,l,f]);return}if(Ee.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:U.from(s.weight).toString(),threshold:U.from(s.threshold).toString(),tree:Ee.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Ee.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ee.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Di.config.ConfigCoder.isWalletConfig(o)){const a=Di.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ee.config.ConfigCoder.isWalletConfig(o)){const a=Ee.config.ConfigCoder.imageHashOf(o);if(Ee.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!vp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(vp(a)){const l={version:2,threshold:U.from(a.threshold),checkpoint:U.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=Gr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(f=>{const c=ae.context.addressOf(f,l);return i.store.saveCounterfactualWallet(c,l,f)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=ae.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ee.signature.SignatureCoder.decode(s.signature),a=Gr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Ee.chained.messageSetImageHash(a),f=be(l),c={message:l,address:s.wallet,chainId:0,digest:f},u=i.savePayload({payload:c}),d=i.saveWalletConfig({config:s.nextConfig}),v=await Ee.signature.SignatureCoder.recover(o,c,i.provider),g=Ee.signature.signaturesOf(v.config.tree);await Promise.all([u,d,i.saveWalletConfig({config:v.config}),...g.map(m=>i.store.saveSignatureOfSubdigest(m.address,v.subdigest,m.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,f=await i.configOfImageHash({imageHash:a});if(!f||!Ee.config.ConfigCoder.isWalletConfig(f))return[];const c=Ee.config.signersOf(f.tree).map(S=>S.address),u=await Promise.all(c.map(S=>i.store.loadSubdigestsOfSigner(S))),d=[...new Set(u.flat())],g=(await Promise.all([...new Set(d)].map(async function(S){return Ws({},await i.payloadOfSubdigest({subdigest:S}),{subdigest:S})}))).filter(S=>(S==null?void 0:S.message)&&(S==null?void 0:S.address)&&S.address===o).map(S=>({payload:S,nextImageHash:Ee.chained.decodeMessageSetImageHash(S.message)})).filter(S=>S==null?void 0:S.nextImageHash);let m;const A=(await Promise.all(g.map(async function({nextImageHash:S,payload:P}){const R=await i.configOfImageHash({imageHash:S});if(!R||!Ee.config.isWalletConfig(R))return;const L=U.from(R.checkpoint);return{nextConfig:R,nextCheckpoint:L,nextImageHash:S,payload:P}}))).filter(S=>S!==void 0).filter(S=>S.nextCheckpoint.gt(f.checkpoint)).sort((S,P)=>S.nextCheckpoint.gt(P.nextCheckpoint)?l?1:-1:l?-1:1);for(const S of A){const{nextConfig:P,nextCheckpoint:R,nextImageHash:L,payload:F}=S;if(m){const q=m.checkpoint;if(l){if(R.gte(q))continue}else if(R.lte(q))continue}const z=new Map((await Promise.all(c.map(async function(q){const K=await i.store.loadSignatureOfSubdigest(q,F.subdigest);if(!K)return[q,void 0];const ne=Q(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(q,F.subdigest,K):K),O=ae.signer.tryRecoverSigner(F.subdigest,ne)!==q;return[q,{isDynamic:O,signature:ne}]}))).filter(q=>Boolean(q[1])));if(z.size===0)continue;const H=Ee.signature.SignatureCoder.encodeSigners(f,z,[],0);H.weight.lt(f.threshold)||(m={nextImageHash:L,checkpoint:U.from(P.checkpoint),signature:H.encoded})}if(!m)return[];const E=await i.loadPresignedConfiguration({wallet:o,fromImageHash:m.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:m.nextImageHash,signature:m.signature},...E]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=ae.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>ae.signer.canRecover(l)).map(l=>{const f=ae.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(f,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(f=>i.payloadOfSubdigest({subdigest:f}))).then(f=>f.filter(c=>c!==void 0)),l=[];for(const f of a){const c=f.address;if(l.find(v=>v.wallet===c))continue;const u=ae.signature.subdigestOf(f),d=await i.store.loadSignatureOfSubdigest(s.signer,u);d&&l.push({wallet:c,proof:{digest:f.digest,chainId:U.from(f.chainId),signature:Q(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new QW(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ee.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=T8.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ee.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=ae.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=be(a),f={chainId:r.tx.chainId,message:a,address:e,digest:l},c=ae.signature.subdigestOf(f),u=this.savePayload({payload:f}),d=this.saveWalletConfig({config:r.toConfig}),v=Di.signature.SignatureCoder.decode(r.tx.signature),g=await Di.signature.SignatureCoder.recover(v,f,this.provider),m=Di.signature.SignatureCoder.signaturesOf(g.config);await Promise.all([u,d,this.saveWalletConfig({config:g.config}),this.store.saveMigrationsSubdigest(e,i,i+1,c,s),...m.map(M=>this.store.saveSignatureOfSubdigest(M.address,g.subdigest,M.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Gr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(c){const{subdigest:u,toImageHash:d}=c,v=await s.payloadOfSubdigest({subdigest:u});if(!v||!v.message||!U.from(i).eq(v.chainId))return;const g=l.config.signersOf(o).map(S=>S.address),m=new Map((await Promise.all(g.map(async function(S){const P=await s.store.loadSignatureOfSubdigest(S,u);if(!P)return[S,void 0];const R=Q(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(S,u,P):P),L=ae.signer.tryRecoverSigner(u,R)!==S;return[S,{isDynamic:L,signature:R}]}))).filter(S=>Boolean(S[1]))),M=l.signature.encodeSigners(o,m,[],i);if(!M||M.weightc.filter(u=>u!==void 0)))[0]}}var gH=Object.freeze({__proto__:null,LocalConfigTracker:H8});let c0=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class mH{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Bn({},n)).then(i=>Ln(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Bn(n,i)).then(s=>Ln(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Bn(n,i)).then(s=>Ln(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Bn(n,i)).then(s=>Ln(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Bn(n,i)).then(s=>Ln(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Bn(n,i)).then(s=>Ln(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Bn=(t={},e={})=>({method:"POST",headers:Ws({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ln=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class wH{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new mH(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:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(u0(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Gr.genericCoderFor(r.version).config.imageHashOf(r),i=Ee.signature.setImageHashStruct(n),s=be(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:Ru(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ae.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:ja(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return bH(r,n)}catch(r){if(u0(r))return;throw r}}async saveWalletConfig(e){const r=Ru(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(u0(r))return;throw r}}async saveCounterfactualWallet(e){const r=Ru(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:i,chainID:s,type:o,signature:a}])=>{switch(o){case c0.EIP712:a+=Q(ae.signer.SigType.EIP712).slice(2);break;case c0.EthSign:a+=Q(ae.signer.SigType.ETH_SIGN).slice(2);break;case c0.EIP1271:a+=Q(ae.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:U.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=ja(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const v=Object.keys(d).map(Number).sort((g,m)=>m-g);for(const g of v)for(const[m,M]of Object.entries(d[g]))try{const A=await s.configOfImageHash({imageHash:m});if(A)return{fromVersion:n,toVersion:g,toConfig:A,tx:{entrypoint:M.executor,transactions:M.transactions,nonce:M.nonce,signature:M.signature,chainId:u,intent:{id:ae.transaction.subdigestOfTransactions(e,u,M.nonce,M.transactions),wallet:e}}}}catch(A){console.error(A)}}},f=await l(o);if(f)return f;for(const c in a)if(c!==o){const u=await l(c);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Ru(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(xH),nonce:ja(r.tx.nonce),signature:r.tx.signature,chainID:ja(r.tx.chainId)})}}function Ru(t){switch(t.version){case 1:if(Di.config.ConfigCoder.isWalletConfig(t))return{threshold:_o(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:_o(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ee.config.ConfigCoder.isWalletConfig(t))return{threshold:_o(t.threshold),checkpoint:_o(t.checkpoint),tree:ud(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function ud(t){return Ee.config.isNode(t)?{left:ud(t.left),right:ud(t.right)}:Ee.config.isSignerLeaf(t)?{weight:_o(t.weight),address:t.address}:Ee.config.isNestedLeaf(t)?{weight:_o(t.weight),threshold:_o(t.threshold),tree:ud(t.tree)}:Ee.config.isNodeLeaf(t)?{node:t.nodeHash}:Ws({},t)}function bH(t,e){switch(t){case 1:return Ws({},e,{version:t});case 2:return Ws({},e,{version:t,tree:dd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function dd(t){switch(typeof t){case"object":const e=Ws({},t);return e.left!==void 0&&(e.left=dd(e.left)),e.right!==void 0&&(e.right=dd(e.right)),e.tree!==void 0&&(e.tree=dd(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 xH(t){return{to:t.to,value:t.value!==void 0?ja(t.value):void 0,data:t.data!==void 0?Q(t.data):void 0,gasLimit:t.gasLimit!==void 0?ja(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function _o(t){return U.from(t).toNumber()}function ja(t){return U.from(t).toString()}function u0(t){return typeof t=="object"&&t.status===404}var CH=Object.freeze({__proto__:null,RemoteConfigTracker:wH});function yp(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function cf(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class AH{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await yp(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Gr.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 i=new H8(void 0),s=await cf(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.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 yp(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(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 cf(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:f}})=>{const c=`${o}-${a}-${l}`;let u=s.get(c);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(c,u)),u.signatures.push(f)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await cf(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await cf(n.map(async function(l){const f=l[l.length-1],c=await r.configOfImageHash({imageHash:f.nextImageHash});if(c)return{checkpoint:Gr.genericCoderFor(c.version).config.checkpointOf(c),result:l}}),void 0)).reduce((l,f)=>f&&(!l||f.checkpoint.gt(l.checkpoint))?f:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const f=await a(l.nextImageHash);f&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:f,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class EH{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 i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!c||u.checkpoint.gt(c.checkpoint))?u:c))==null?void 0:l.result)!=null?a:[]}return i||[]}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 i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);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 vC{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${be(Ue(JSON.stringify(i,SH)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function SH(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function kH(t){return t instanceof q8}class q8{constructor(e,r=50,n=!1){this.cache=new vC,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new vC}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),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)}}var G8=Object.freeze({__proto__:null,debug:vH,local:gH,remote:CH,stores:pH,raceUntil:yp,allSafe:cf,MultipleTracker:AH,CachedTracker:EH,isDedupedTracker:kH,DedupedTracker:q8});const _H=Object.freeze(Object.defineProperty({__proto__:null,tracker:dH,trackers:G8},Symbol.toStringTag,{value:"Module"}));function pp(){return pp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),cr({},n)).then(i=>ur(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),cr({},n)).then(i=>ur(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),cr({},n)).then(i=>ur(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),cr(n,i)).then(s=>ur(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),cr(n,i)).then(s=>ur(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),cr(n,i)).then(s=>ur(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),cr(n,i)).then(s=>ur(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),cr(n,i)).then(s=>ur(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const cr=(t={},e={})=>({method:"POST",headers:pp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ur=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),DH=typeof global=="object"?global.fetch:window.fetch;class J8 extends K8{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,DH)}}const BH=Object.freeze(Object.defineProperty({__proto__:null,ContractType:MH,Metadata:K8,PropertyType:NH,SequenceMetadataClient:J8,SortOrder:OH,SwapType:RH,WebRPCSchemaHash:IH,WebRPCSchemaVersion:PH,WebRPCVersion:TH},Symbol.toStringTag,{value:"Module"}));function _h(){return _h=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),tn({},n)).then(i=>rn(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),tn({},n)).then(i=>rn(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),tn({},n)).then(i=>rn(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),tn({},n)).then(i=>rn(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),tn(n,i)).then(s=>rn(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),tn(n,i)).then(s=>rn(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),tn(n,i)).then(s=>rn(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),tn(n,i)).then(s=>rn(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),tn(n,i)).then(s=>rn(s).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const tn=(t={},e={})=>({method:"POST",headers:_h({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),rn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});let GH=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const yC=typeof global=="object"?global.fetch:window.fetch;class Y8 extends Q8{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,yC),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=_h({},i.headers,s),yC(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const KH=Object.freeze(Object.defineProperty({__proto__:null,ContractType:jH,EventLogDataType:UH,EventLogType:zH,Indexer:Q8,SequenceIndexerClient:Y8,SequenceIndexerServices:GH,SortOrder:qH,TransactionStatus:WH,TransactionType:HH,TxnTransferType:VH,WebRPCSchemaHash:FH,WebRPCSchemaVersion:$H,WebRPCVersion:LH},Symbol.toStringTag,{value:"Module"}));function gp(){return gp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{throw this._jwt=void 0,f}),expiration:o};return this._jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:void 0})}catch{}})}).catch(f=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"rejected",reason:f})}catch{}})}),{token:await a.token,expiration:o}}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()i.eq(l.chainId));if(!s)throw Error("No network found");n.chainId=i.toNumber(),n.provider=new ph(Cc(s.rpcUrl),{name:"",chainId:i.toNumber()});const o=this.now()+this.expiration-QH,a={proofString:Promise.resolve(this.account.signDigest(r.messageDigest(),this.sequenceApiChainId,!0,"eip6492")).then(l=>(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}getProofStringKey(){return`${this.account.address} - ${this.name}`}async isProofStringValid(e){try{const r=new wh,n=U.from(this.sequenceApiChainId),i=this.networks.find(s=>n.eq(s.chainId));if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new ph(Cc(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async dump(){let e;if(this._jwt)try{const r=this._jwt.expiration;e={token:await this._jwt.token,expiration:r}}catch{}return{version:2,address:this.account.address,metadata:this.metadata,jwt:e}}static async open(e){const{referenceSigner:r,threshold:n,metadata:i,addSigners:s,selectWallet:o,settings:a,editConfigOnMigration:l,onMigration:f}=e,{sequenceApiUrl:c,sequenceApiChainId:u,sequenceMetadataUrl:d,contexts:v,networks:g,tracker:m,orchestrator:M}=a,A=u;if(!A)throw Error("No reference chain found");const E=await m.walletsOfSigner({signer:r}),S=await o(E.map(L=>L.wallet));let P;if(S){if(P=new $i({address:S,tracker:m,networks:g,contexts:v,orchestrator:M}),s.length>0){let L=await P.status(A);if(L.original.version!==L.version||P.version!==L.version){const{migratedAllChains:H,failedChains:q}=await P.isMigratedAllChains();if(q.some(K=>mp.includes(K)))throw Error(`Failed to fetch account status on ${q.join(", ")}`);if(!H){if(f&&!await f(P))throw Error("Migration cancelled, cannot open session");const{failedChains:K}=await P.signAllMigrations(l);if(K.some(O=>mp.includes(O)))throw Error(`Failed to sign migrations on ${K.join(", ")}`);G8.isDedupedTracker(m)&&m.invalidateCache();let ne;if([ne,L]=await Promise.all([P.isMigratedAllChains().then(O=>O.migratedAllChains),P.status(A)]),!ne)throw Error("Failed to migrate account")}}L.onChain.version!==L.version&&await P.doBootstrap(A,void 0,L);const F=L.config,z=P.coders.config.editConfig(F,{add:s,checkpoint:P.coders.config.checkpointOf(F).add(1),threshold:n});await P.updateConfig(z)}}else if(P=await $i.new({config:{threshold:n,checkpoint:0,signers:s},tracker:m,contexts:v,orchestrator:M,networks:g}),await P.publishWitness(),!(await m.walletsOfSigner({signer:r,noCache:!0})).some(F=>F.wallet===P.address))throw Error("Account not found on tracker");const R=new Th(c,u,d,g,v,P,i);return c?R._initialAuthRequest=R.auth():R._initialAuthRequest=Promise.reject("no sequence api url"),R}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s}=e,{sequenceApiUrl:o,sequenceApiChainId:a,sequenceMetadataUrl:l,contexts:f,networks:c,tracker:u,orchestrator:d}=n;let v;if(X8(r)){const g=r.config.address||ae.context.addressOf(f[1],Di.config.ConfigCoder.imageHashOf(gp({},r.config,{version:1})));if(v=new $i({address:g,tracker:u,networks:c,contexts:f,orchestrator:d}),!await v.isMigratedAllChains().then(m=>m.migratedAllChains)){if(s&&!await s(v))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await v.signAllMigrations(i),!await v.isMigratedAllChains().then(m=>m.migratedAllChains))throw Error("Failed to migrate account")}}else if(Z8(r))v=new $i({address:r.address,tracker:u,networks:c,contexts:f,orchestrator:d});else throw Error("Invalid dump format");return new Th(o,a,l,c,f,v,r.metadata,r.jwt)}}function YH(t){return x3(t).exp}const e4=async(t,e,r)=>{const n=Se(await t.getAddress());if(!n||n===""||n==="0x")throw t4;const i=new Tm;if(i.address=n,!r||!r.app||r.app==="")throw new rw("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):tw);const s=i.messageTypedData(),o=L3(e);i.signature=await(t instanceof $i?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new wh().encodeProof(i,!0);return{typedData:s,proofString:l}};class rw extends Error{constructor(e){super(e),this.name="AuthError"}}const t4=new rw("auth error: account address is empty"),XH=(t,e,r)=>async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},ZH=Object.freeze(Object.defineProperty({__proto__:null,AuthError:rw,CRITICAL_CHAINS:mp,DEFAULT_SESSION_EXPIRATION:tw,ErrAccountIsRequired:t4,LONG_SESSION_EXPIRATION:JH,Session:Th,ValidateSequenceWalletProof:XH,isSessionDumpV1:X8,isSessionDumpV2:Z8,signAuthorization:e4},Symbol.toStringTag,{value:"Module"}));function wp(){return wp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),pa({},n)).then(i=>ga(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),pa({},n)).then(i=>ga(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),pa({},n)).then(i=>ga(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),pa(n,i)).then(s=>ga(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),pa(n,i)).then(s=>ga(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),pa(n,i)).then(s=>ga(s).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const pa=(t={},e={})=>({method:"POST",headers:wp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ga=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),nq=typeof global=="object"?global.fetch:window.fetch;class iq{constructor(e,r,n=!1){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.guard=new r4(r,nq)}async getAddress(){return this.address}async requestSignature(e,r,n,i){return ae.isWalletSignRequestMetadata(n)?this.requests.set(e,i):i.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ae.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,i){return jr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}keyOfRequest(e,r,n,i){return Ui(["address","uint256","bytes","bytes"],[e,i,r,n])}async evaluateRequest(e,r,n,i){var s;const o=Gr.genericCoderFor(i.config.version),{encoded:a}=o.signature.encodeSigners(i.config,(s=i.parts)!=null?s:new Map,[],i.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,i.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const u=await this.guard.signWith({signer:this.address,request:{msg:Q(r),auxData:this.packMsgAndSig(i.address,i.digest,a,i.chainId),chainId:U.from(i.chainId).toNumber()}});X(u.sig).length!==0&&(this.requests.get(e).onSignature(u.sig),this.requests.delete(e))}catch{}}suffix(){return this.appendSuffix?[3]:[]}}const sq=Object.freeze(Object.defineProperty({__proto__:null,Guard:r4,GuardSigner:iq,WebRPCSchemaHash:rq,WebRPCSchemaVersion:tq,WebRPCVersion:eq},Symbol.toStringTag,{value:"Module"}));function Ph(){return Ph=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)return;if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&r.scheduleExecution();const i=a[0].next;let s;var[a,l]=pC(a,v=>{try{if(v.next!==i)return!1;switch(v.request.method){case Zt.ethCall:if(v.request.params[0].from||v.request.params[0].gasPrice||v.request.params[0].value)return!1;case Zt.ethGetBalance:case Zt.ethGetCode:const g=aq(v.request.params[1]);if(s===void 0&&(s=g),!lq(g,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(v=>{try{switch(v.request.method){case Zt.ethCall:return{delegateCall:!1,revertOnError:!1,target:v.request.params[0].to,data:v.request.params[0].data,gasLimit:v.request.params[0].gas?v.request.params[0].gas:0,value:0};case Zt.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[v.request.params[0]])};case Zt.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[v.request.params[0]])};default:return null}}catch{return null}});var[a,l]=pC(a,(v,g)=>o[g]!==void 0);if(o=o.filter(v=>v),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let f;try{f=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const c=Rm(),u=await oq(Nm(i)({id:c,jsonrpc:wl,method:Zt.ethCall,params:[{to:r.options.contract,value:0,data:f},U.isBigNumber(s)?s.toNumber():s]}),v=>({jsonrpc:wl,id:c,result:void 0,error:v}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((v,g)=>{if(!d[0][g])r.forward(v);else switch(v.request.method){case Zt.ethCall:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:d[1][g]});break;case Zt.ethGetCode:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:jr.decode(["bytes"],d[1][g])[0]});break;case Zt.ethGetBalance:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:jr.decode(["uint256"],d[1][g])[0]});break}})},this.options=e?Ph({},Sn.DefaultOptions,e):Sn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Sn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Sn.DefaultOptions=Ph({},fq);const n4=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class cq extends Sm{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new Ky(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case Zt.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case Zt.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case Zt.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.provider=e,this.multicall=Sn.isMulticall(r)?r:new Sn(r),n4.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:wl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(Zt.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Zt.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Zt.ethGetBalance,e,r)}async rpcCall(e,...r){const n=Rm();return(await Nm(this.multicall.handle)(this.next,{jsonrpc:wl,id:n,method:e,params:r})).result}}class uq{constructor(e,r){if(this.provider=e,this.multicall=Sn.isMulticall(r)?r:new Sn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const dq=t=>e=>{const r=Sn.isMulticall(t)?t:new Sn(t);return(n,i)=>r.handle(e,n,i)};var hq=Object.freeze({__proto__:null,ProxyMethods:n4,MulticallProvider:cq,MulticallExternalProvider:uq,multicallMiddleware:dq});const vq=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Sn,providers:hq},Symbol.toStringTag,{value:"Module"}));var bl={},yq={get exports(){return bl},set exports(t){bl=t}};/*! - * EventEmitter2 - * https://github.com/hij1nx/EventEmitter2 - * - * Copyright (c) 2013 hij1nx - * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(k){return Object.prototype.toString.call(k)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",f=typeof setImmediate=="function",c=f?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(p){var k=Object.getOwnPropertyNames(p);return k.push.apply(k,Object.getOwnPropertySymbols(p)),k}:Object.keys;function d(){this._events={},this._conf&&v.call(this,this._conf)}function v(p){p&&(this._conf=p,p.delimiter&&(this.delimiter=p.delimiter),p.maxListeners!==r&&(this._maxListeners=p.maxListeners),p.wildcard&&(this.wildcard=p.wildcard),p.newListener&&(this._newListener=p.newListener),p.removeListener&&(this._removeListener=p.removeListener),p.verboseMemoryLeak&&(this.verboseMemoryLeak=p.verboseMemoryLeak),p.ignoreErrors&&(this.ignoreErrors=p.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function g(p,k){var I="(node) warning: possible EventEmitter memory leak detected. "+p+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(I+=" Event name: "+k+"."),typeof process<"u"&&process.emitWarning){var b=new Error(I);b.name="MaxListenersExceededWarning",b.emitter=this,b.count=p,process.emitWarning(b)}else console.error(I),console.trace&&console.trace()}var m=function(p,k,I){var b=arguments.length;switch(b){case 0:return[];case 1:return[p];case 2:return[p,k];case 3:return[p,k,I];default:for(var h=new Array(b);b--;)h[b]=arguments[b];return h}};function M(p,k){for(var I={},b,h=p.length,_=k?k.length:0,$=0;$0;)p=_[D],$.call(C,p,I[p]);this._listeners={},this._listenersCount=0,B()}}});function E(p,k,I,b){var h=Object.assign({},k);if(!p)return h;if(typeof p!="object")throw TypeError("options must be an object");var _=Object.keys(p),$=_.length,C,D,B;function j(Z){throw Error('Invalid "'+C+'" option value'+(Z?". Reason: "+Z:""))}for(var Y=0;Y<$;Y++){if(C=_[Y],!b&&!n.call(k,C))throw Error('Unknown "'+C+'" option');D=p[C],D!==r&&(B=I[C],h[C]=B?B(D,j):D)}return h}function S(p,k){return(typeof p!="function"||!p.hasOwnProperty("prototype"))&&k("value must be a constructor"),p}function P(p){var k="value must be type of "+p.join("|"),I=p.length,b=p[0],h=p[1];return I===1?function(_,$){if(typeof _===b)return _;$(k)}:I===2?function(_,$){var C=typeof _;if(C===b||C===h)return _;$(k)}:function(_,$){for(var C=typeof _,D=I;D-- >0;)if(C===p[D])return _;$(k)}}var R=P(["function"]),L=P(["object","function"]);function F(p,k,I){var b,h,_=0,$,C=new p(function(D,B,j){I=E(I,{timeout:0,overload:!1},{timeout:function(J,he){return J*=1,(typeof J!="number"||J<0||!Number.isFinite(J))&&he("timeout must be a positive number"),J}}),b=!I.overload&&typeof p.prototype.cancel=="function"&&typeof j=="function";function Y(){h&&(h=null),_&&(clearTimeout(_),_=0)}var Z=function(J){Y(),D(J)},G=function(J){Y(),B(J)};b?k(Z,G,j):(h=[function(J){G(J||Error("canceled"))}],k(Z,G,function(J){if($)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof J!="function")throw TypeError("onCancel callback must be a function");h.push(J)}),$=!0),I.timeout>0&&(_=setTimeout(function(){var J=Error("timeout");J.code="ETIMEDOUT",_=0,C.cancel(J),B(J)},I.timeout))});return b||(C.cancel=function(D){if(h){for(var B=h.length,j=1;j0;)G=Ae[C],G!=="_listeners"&&(St=H(p,k,I[G],b+1,h),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else if(Kt==="**"){for(ve=b+1===h||b+2===h&&Ie==="*",ve&&I._listeners&&(Z=H(p,k,I,h,h)),Ae=u(I),C=Ae.length;C-- >0;)G=Ae[C],G!=="_listeners"&&(G==="*"||G==="**"?(I[G]._listeners&&!ve&&(St=H(p,k,I[G],h,h),St&&(Z?Z.push.apply(Z,St):Z=St)),St=H(p,k,I[G],b,h)):G===Ie?St=H(p,k,I[G],b+2,h):St=H(p,k,I[G],b,h),St&&(Z?Z.push.apply(Z,St):Z=St));return Z}else I[Kt]&&(Z=H(p,k,I[Kt],b+1,h));if(J=I["*"],J&&H(p,k,J,b+1,h),he=I["**"],he)if(b0;)G=Ae[C],G!=="_listeners"&&(G===Ie?H(p,k,he[G],b+2,h):G===Kt?H(p,k,he[G],b+1,h):(ie={},ie[G]=he[G],H(p,k,{"**":ie},b+1,h)));else he._listeners?H(p,k,he,h,h):he["*"]&&he["*"]._listeners&&H(p,k,he["*"],h,h);return Z}function q(p,k,I){var b=0,h=0,_,$=this.delimiter,C=$.length,D;if(typeof p=="string")if((_=p.indexOf($))!==-1){D=new Array(5);do D[b++]=p.slice(h,_),h=_+C;while((_=p.indexOf($,h))!==-1);D[b++]=p.slice(h)}else D=[p],b=1;else D=p,b=p.length;if(b>1){for(_=0;_+10&&B._listeners.length>this._maxListeners&&(B._listeners.warned=!0,g.call(this,B._listeners.length,j))):B._listeners=k,!0;return!0}function K(p,k,I,b){for(var h=u(p),_=h.length,$,C,D,B=p._listeners,j;_-- >0;)C=h[_],$=p[C],C==="_listeners"?D=I:D=I?I.concat(C):[C],j=b||typeof C=="symbol",B&&k.push(j?D:D.join(this.delimiter)),typeof $=="object"&&K.call(this,$,k,D,j);return k}function ne(p){for(var k=u(p),I=k.length,b,h,_;I-- >0;)h=k[I],b=p[h],b&&(_=!0,h!=="_listeners"&&!ne(b)&&delete p[h]);return _}function O(p,k,I){this.emitter=p,this.event=k,this.listener=I}O.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function y(p,k,I){if(I===!0)h=!0;else if(I===!1)b=!0;else{if(!I||typeof I!="object")throw TypeError("options should be an object or true");var b=I.async,h=I.promisify,_=I.nextTick,$=I.objectify}if(b||_||h){var C=k,D=k._origin||k;if(_&&!o)throw Error("process.nextTick is not supported");h===r&&(h=k.constructor.name==="AsyncFunction"),k=function(){var B=arguments,j=this,Y=this.event;return h?_?Promise.resolve():new Promise(function(Z){c(Z)}).then(function(){return j.event=Y,C.apply(j,B)}):(_?process.nextTick:c)(function(){j.event=Y,C.apply(j,B)})},k._async=!0,k._origin=D}return[k,$?new O(this,p,k):this]}function w(p){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,v.call(this,p)}w.EventEmitter2=w,w.prototype.listenTo=function(p,k,I){if(typeof p!="object")throw TypeError("target musts be an object");var b=this;I=E(I,{on:r,off:r,reducers:r},{on:R,off:R,reducers:L});function h(_){if(typeof _!="object")throw TypeError("events must be an object");var $=I.reducers,C=z.call(b,p),D;C===-1?D=new A(b,p,I):D=b._observers[C];for(var B=u(_),j=B.length,Y,Z=typeof $=="function",G=0;G0;)h=I[b],(!p||h._target===p)&&(h.unsubscribe(k),_=!0);return _},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(p){p!==r&&(this._maxListeners=p,this._conf||(this._conf={}),this._conf.maxListeners=p)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(p,k,I){return this._once(p,k,!1,I)},w.prototype.prependOnceListener=function(p,k,I){return this._once(p,k,!0,I)},w.prototype._once=function(p,k,I,b){return this._many(p,1,k,I,b)},w.prototype.many=function(p,k,I,b){return this._many(p,k,I,!1,b)},w.prototype.prependMany=function(p,k,I,b){return this._many(p,k,I,!0,b)},w.prototype._many=function(p,k,I,b,h){var _=this;if(typeof I!="function")throw new Error("many only accepts instances of Function");function $(){return--k===0&&_.off(p,$),I.apply(this,arguments)}return $._origin=I,this._on(p,$,b,h)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var p=arguments[0],k,I=this.wildcard,b,h,_,$,C;if(p==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(I&&(k=p,p!=="newListener"&&p!=="removeListener"&&typeof p=="object")){if(h=p.length,a){for(_=0;_3)for(b=new Array(D-1),$=1;$3)for(h=new Array(B-1),C=1;C0&&this._events[p].length>this._maxListeners&&(this._events[p].warned=!0,g.call(this,this._events[p].length,p))):this._events[p]=k,h)},w.prototype.off=function(p,k){if(typeof k!="function")throw new Error("removeListener only takes instances of Function");var I,b=[];if(this.wildcard){var h=typeof p=="string"?p.split(this.delimiter):p.slice();if(b=H.call(this,null,h,this.listenerTree,0),!b)return this}else{if(!this._events[p])return this;I=this._events[p],b.push({_listeners:I})}for(var _=0;_0){for(b=this._all,k=0,I=b.length;k0;)b=k[I[_]],typeof b=="function"?h.push(b):h.push.apply(h,b);return h}else{if(this.wildcard){if($=this.listenerTree,!$)return[];var C=[],D=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,C,D,$,0),C}return k?(b=k[p],b?typeof b=="function"?[b]:b:[]):[]}},w.prototype.eventNames=function(p){var k=this._events;return this.wildcard?K.call(this,this.listenerTree,[],null,p):k?u(k):[]},w.prototype.listenerCount=function(p){return this.listeners(p).length},w.prototype.hasListeners=function(p){if(this.wildcard){var k=[],I=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,k,I,this.listenerTree,0),k.length>0}var b=this._events,h=this._all;return!!(h&&h.length||b&&(p===r?u(b).length:b[p]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(p,k){var I=this,b=typeof k;return b==="number"?k={timeout:k}:b==="function"&&(k={filter:k}),k=E(k,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:R,Promise:S}),F(k.Promise,function(h,_,$){function C(){var D=k.filter;if(!(D&&!D.apply(I,arguments)))if(I.off(p,C),k.handleError){var B=arguments[0];B?_(B):h(m.apply(null,arguments).slice(1))}else h(m.apply(null,arguments))}$(function(){I.off(p,C)}),I._on(p,C,!1)},{timeout:k.timeout,overload:k.overload})};function T(p,k,I){I=E(I,{Promise,timeout:0,overload:!1},{Promise:S});var b=I.Promise;return F(b,function(h,_,$){var C;if(typeof p.addEventListener=="function"){C=function(){h(m.apply(null,arguments))},$(function(){p.removeEventListener(k,C)}),p.addEventListener(k,C,{once:!0});return}var D=function(){B&&p.removeListener("error",B),h(m.apply(null,arguments))},B;k!=="error"&&(B=function(j){p.removeListener(k,D),_(j)},p.once("error",B)),$(function(){B&&p.removeListener("error",B),p.removeListener(k,D)}),p.once(k,D)},{timeout:I.timeout,overload:I.overload})}var N=w.prototype;Object.defineProperties(w,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(p){if(typeof p!="number"||p<0||Number.isNaN(p))throw TypeError("n must be a non-negative number");N._maxListeners=p},enumerable:!0},once:{value:T,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return w}):t.exports=w})()})(yq);function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e++pq;class Jc{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new bl.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===wn.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:a4(),type:_e.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(de.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=nw){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=wn.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=wn.CLOSED,this._registered=!1,this._init=Ct.NIL}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===wn.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}handleMessage(e){var r=this;if(e.type===_e.INIT){de.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){de.error("invalid init nonce");return}this._init=Ct.OK,this.sendMessage({idx:-1,type:_e.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==Ct.OK)return;de.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===_e.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){de.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw de.error(l),this.close(),l}this.state=wn.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(f){r.sendMessage(f)});return}if(e.type===_e.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===_e.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Se(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);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!==wn.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),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!==wn.CLOSED&&(this.state=wn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,de.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(Jr({},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 gq(t){return mq.some(e=>e.predicate(t))}const mq=[{name:"Decentraland Exception",predicate:bq},{name:"0x v3 Exception",predicate:xq}],wq=/^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 bq(t){try{const e=ts(t);return wq.test(e)}catch{return!1}}function xq(t){const e=new pr(Cq);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const Cq=[{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"}],hd=Ue(`Ethereum Signed Message: -`),l4=t=>Zi(t)||Me(t)?X(t):Ue(t),M1=t=>{const e=l4(t);return gq(e)?e:Et([hd,Ue(String(e.length)),e])},Aq=t=>{if(JSON.stringify(t.slice(0,hd.length))!==JSON.stringify(hd))return t;const e=t.slice(hd.length),r=String(e.length).length;let n,i;try{i=Number(ts(e.slice(0,r)))}catch{i=Number(Q(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},xl=async(t,e,r,n)=>new ae.reader.OnChainReader(n).isValidSignature(t,e,r),f4=async(t,e,r,n)=>{const i=M1(e),s=Mm(i);return xl(t,s,r,n)},c4=(t,e,r,n)=>xl(t,A1(e),r,n),Ih=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",u4=()=>!!navigator.userAgent.match(/UnitySequence/i),d4=t=>t.onChain.deployed&&t.fullyMigrated;class h4{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 kc{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!kc.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.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 Mh(){return kc.isAvailable()?new kc:new h4}async function v4(t){return Array.isArray(t)?Promise.all(t.map(e=>xt(e))):xt(t)}const gC="@sequence.transportSession";class Qc{constructor(e){var r=this;this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==Ct.OK){if(i.type===_e.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case _e.OPEN:{if(r._init!==Ct.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case _e.CLOSE:return r._init!==Ct.OK,void 0;case _e.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:de.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=E3(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=B3(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Ih()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=k3(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=S3(a.app)),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.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(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){de.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession()})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{Mh().setItem(gC,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Mh().getItem(gC);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=Ct.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(Q(n.find(i=>i.isDefaultChain).chainId)))}),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")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:_e.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:_e.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:_e.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:_e.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:_e.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:_e.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:_e.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:_e.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Ct.OK)return de.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==_e.INIT)return de.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(de.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(de.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===Ct.OK){e();return}if(this._init!==Ct.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{de.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},nw/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=Ct.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:_e.INIT,data:{nonce:this._initNonce}}),this._init=Ct.SENT_NONCE})}}class Eq{constructor(){const e=new bp,r=new bp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class bp{constructor(){this.events=new bl.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 y4 extends Jc{constructor(e){if(super(),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,i)=>{if(this.state===wn.CLOSED){this.state=wn.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:_e.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=wn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Ct.OK}closeWallet(){this.sendMessage({idx:-1,type:_e.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class Sq extends Qc{constructor(e,r){super(e),this.port=r,this._init=Ct.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 p4(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=(...i)=>{n.logfromjs(`${t}: ${d0(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${d0(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${d0(i)}`)},window.logsOverriddenForUnreal=!0}}function d0(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let ma;class g4 extends Jc{constructor(e){super(),this.register=()=>{var r;p4("dapp"),ma&&(ma.unregister(),ma=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),ma=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),ma===this&&(ma=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Kc;r&&(s.pathname=r.toLowerCase()),this._init=Ct.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",Pm(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.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,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class kq extends Qc{constructor(e){super(e),this.onMessageFromUnreal=r=>{de.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Kc(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:Im(n.get("intent"))}},this._init=Ct.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;p4("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){de.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;de.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;de.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==_e.INIT&&this._init!==Ct.OK){de.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}const iw="sequence-extension-message-handler";class _q extends Qc{constructor(e,r){super(e),this.runtime=r,this._init=Ct.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:iw})}sendMessage(e){de.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class m4 extends Jc{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===iw&&(this._init=Ct.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Tq extends bl.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;de.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case _e.MESSAGE:if(s)this.emit(_e.MESSAGE,n),s(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((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,f)=>{if(l)s(l);else if(f)i(f);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,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 wa;class w4 extends Jc{constructor(e){super(),this.register=()=>{wa&&(wa.unregister(),wa=this),window.addEventListener("message",this.onWindowEvent),wa=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),wa===this&&(wa=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Kc;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=Ct.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Ih()&&!u4()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",Pm(n))),i&&o.set("net",`${i}`);let a,l;Ih()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const f=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",f)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){de.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class Pq extends Qc{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(de.debug("RECEIVED MESSAGE",i),r._init!==Ct.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===Ct.OK&&(!r.appOrigin||r.appOrigin.length<8)){de.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Kc(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:Im(i.get("intent"))}},this._init=Ct.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){de.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;de.error(f),this.notifyClose({message:f}),window.close()}}).catch(a=>{var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;de.error(f),this.notifyClose({message:f}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);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!==Ct.OK){de.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):de.error("unable to postMessage as parentOrigin is invalid")}}function b4(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 N1{constructor(...e){var r=this;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(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},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){var r,n,i,s;const o=new N1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new w4(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new y4(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new m4(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new g4(e.walletAppURL);o.add(a)}return o.register(),o}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 i.walletSession()),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var f;if((!i.account||i.account===null)&&!Oq.includes(s.method))throw o4;const c=i.account;if(!c)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(f=i.account)==null?void 0:f.provider(a??i.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof la?u:void 0;switch(s.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send("net_version",[]);l.result=v;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send("eth_chainId",[]);l.result=v;break}case"eth_accounts":{const v=c.address;l.result=[v];break}case"eth_getBalance":{const[v,g]=s.params,m=await u.getBalance(v,g);l.result=m.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let v;switch(s.method){case"sequence_sign":case"personal_sign":{const[A,E]=s.params;v=A;break}case"eth_sign":{const[A,E]=s.params;v=E;break}}let g="";const m=M1(v),M=s.method==="sequence_sign";if(i.prompter===null?g=await c.signMessage(m,a??i.defaultChainId(),M?"eip6492":"ignore"):g=await i.prompter.promptSignMessage({chainId:a,message:m,eip6492:M},i.connectOptions),g&&g.length>0)l.result=g;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,g]=s.params;let m;if(typeof g=="string")try{m=JSON.parse(g)}catch(E){console.warn("walletRequestHandler: error parsing typedData",E)}else m=g;if(!m||!m.domain||!m.types||!m.message)throw new Error("invalid typedData object");let M="";const A=s.method==="sequence_signTypedData_v4";if(i.prompter===null?M=await c.signTypedData(m.domain,m.types,m.message,a??i.defaultChainId(),A?"eip6492":"ignore"):M=await i.prompter.promptSignMessage({chainId:a,typedData:m,eip6492:A},i.connectOptions),M&&M.length>0)l.result=M;else throw new Error("declined by user");break}case"eth_sendTransaction":{const v=Mq(s.params[0]).map(m=>("gas"in m&&m.gasLimit===void 0&&(m.gasLimit=m.gas,delete m.gas),m));let g="";if(i.prompter===null?g=(await c.sendTransaction(v,a??i.defaultChainId())).hash:g=await i.prompter.promptSendTransaction(v,a,i.connectOptions),g)l.result=g;else throw new Error("declined by user");break}case"eth_signTransaction":{const[v]=s.params;if(Se(v.from)!==c.address)throw new Error("sender address does not match wallet");i.prompter===null?l.result=await c.signTransactions(v,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(v,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(ae.transaction.isSignedTransactionBundle(s.params[0])){const v=U.from(s.params[0].chainId).toNumber(),g=await c.relayer(v).relay(s.params[0]);l.result=g.hash}else{const v=await u.sendTransaction(s.params[0]);l.result=v.hash}break}case"eth_getTransactionCount":{const v=Se(s.params[0]),g=s.params[1],m=await u.getTransactionCount(v,g);l.result=U.from(m).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(s.params[0]);break}case"eth_call":{const[v,g]=s.params;l.result=await u.call(v,g);break}case"eth_getCode":{const[v,g]=s.params;l.result=await u.getCode(v,g);break}case"eth_estimateGas":{const[v]=s.params;l.result=await u.estimateGas(v);break}case"eth_gasPrice":{const v=await u.getGasPrice();l.result=v.toHexString();break}case"wallet_switchEthereumChain":{const[v]=s.params;if(!v.chainId||v.chainId.length===0)throw new Error("invalid chainId");const g=U.from(v.chainId);i.setDefaultChainId(g.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=c.contexts;break}case"sequence_getWalletConfig":{const[v]=s.params;v?l.result=[(await c.status(v)).onChain.config]:l.result=await Promise.all(c.networks.map(async function(g){return(await c.status(g.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[v]=s.params;v?l.result=[mC(v,await c.status(v))]:l.result=await Promise.all(c.networks.map(async function(g){const m=await c.status(g.chainId);return mC(g.chainId,m)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}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[v]=s.params;if(!v)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(v),l.result=await i.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send(s.method,s.params);l.result=v}}}catch(c){de.error(c),l.result=null,l.error=Jr({},new Error(c),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.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:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=Nq){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 i=(r=(n=this.prompter)==null?void 0:n.getDefaultChainId())!=null?r:1,s={connected:!0,chainId:U.from(i).toHexString()};if(e&&e.authorize){const o={app:e.app,origin:e.origin,expiry:e.expiry};try{s.proof=await e4(this.account,i,o)}catch(a){return de.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${a.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${a.message}`}}}return s.session=await this.walletSession(),s}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=Jr({},e,{data:i});r(s)},e.chainId)})}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=Jr({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(de.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(){if(this.account)return{walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(e=>Jr({},e,{provider:void 0,relayer:void 0}))}}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",Q(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){de.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,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(de.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function mC(t,e){return{context:e.original.context,config:e.onChain.config,address:ae.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 Oq=["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"];class Fl{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!jl.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Fl(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new sw(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||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await v4(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await ko(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,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,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}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){}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 sw extends Fl{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_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 Dq{constructor(e){if(this.signer=e,sw.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,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return xl(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=M1(r),a=Mm(o);return xl(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,A1(r),n,i)}}class jl extends Sm{constructor(e,r,n=Ac){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new Fl(this.client,this),this.utils=new Dq(this.signer)}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(Jr({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Jo(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 C4(this.client,this.providerFor,r)),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,r){var n;if(e==="eth_chainId")return this.useChainId();if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=x4(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}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=Jo(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}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 getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}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 jk(await 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}}jl.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function x4(t){return typeof t=="object"?x4(t.chainId):U.from(t).toNumber()}class C4 extends jl{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_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=Jo(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}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}}class Oo{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(Oo.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Oo.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Oo.SESSION_LOCALSTORE_KEY)}}Oo.SESSION_LOCALSTORE_KEY="@sequence.session";class Do{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(Do.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(Do.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(Do.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}Do.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class ow{constructor(e,r,n){if(this.callbacks={},b4(e))this.transport=N1.new(e);else if(i4(e))this.transport=e;else throw new Error("Invalid transport");this.session=new Oo(r),this.defaultChainId=new Do(r,n),this.transport.on("accountsChanged",i=>{var s;i.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(s=this.callbacks.accountsChanged)==null||s.forEach(o=>o(i))}),this.transport.on("connect",i=>{var s;const o=U.from(this.getChainId()).toHexString();(s=this.callbacks.connect)==null||s.forEach(a=>a(Jr({},i,{chainId:o})))}),this.transport.on("disconnect",i=>{var s;(s=this.callbacks.disconnect)==null||s.forEach(o=>o(i))}),this.transport.on("networks",i=>{var s;(s=this.callbacks.networks)==null||s.forEach(o=>o(i))}),this.transport.on("walletContext",i=>{var s;(s=this.callbacks.walletContext)==null||s.forEach(o=>o(i))}),this.transport.on("open",i=>{var s;(s=this.callbacks.open)==null||s.forEach(o=>o(i))}),this.transport.on("close",()=>{var i;(i=this.callbacks.close)==null||i.forEach(s=>s())}),this.defaultChainId.onDefaultChainIdChanged(i=>{var s;const o=U.from(i).toHexString();(s=this.callbacks.chainChanged)==null||s.forEach(a=>a(o))})}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)}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&&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:Jr({},e,{networkId:this.getChainId()})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=U.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}async signMessage(e,r){const n=r!=null&&r.eip6492?"sequence_sign":"personal_sign";return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=r!=null&&r.eip6492?"sequence_signTypedData_v4":"eth_signTypedData_v4",i=ir.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&U.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=Iq(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const xp={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let ui;const A4=t=>{var e,r,n;if(ui)return ui;const i=Jr({},xp,t,{transports:Jr({},xp.transports,t==null?void 0:t.transports)}),s={},o=(e=(r=i.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Ac.find(v=>v.chainId===d.chainId)}))!=null?e:[],a=Ac.map(d=>{var v;const g=(v=i.networks)==null?void 0:v.find(m=>m.chainId===d.chainId);return g?Jr({},d,g):d}).concat(o),l=d=>{if(!s[d]){var v;const g=(v=a.find(A=>A.chainId===d))==null?void 0:v.rpcUrl;if(!g)throw new Error(`no rpcUrl found for chainId: ${d}`);const m=new la(g),M=new Om([V3,U3,new Dm],new xh(m));s[d]=new tU(M,d)}return s[d]},f=i.defaultNetwork?(n=Jo(a,i.defaultNetwork))==null?void 0:n.chainId:void 0;if(!f&&i.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${i.defaultNetwork}`);const c=i.localStorage||Mh(),u=new ow(i.transports,c,f);return ui=new jl(u,l),ui},E4=()=>{ui&&(ui.client.closeWallet(),ui.client.transport.unregister(),ui=void 0)},S4=()=>{if(!ui)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return ui},Bq=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Tq,BaseProviderTransport:Jc,BaseWalletTransport:Qc,CHANNEL_ID:iw,DefaultChainIdTracker:Do,DefaultProviderConfig:xp,ErrSignedInRequired:o4,EventType:_e,ExtensionMessageHandler:_q,ExtensionMessageProvider:m4,InitState:Ct,LocalStorage:kc,MemoryItemStore:h4,MuxMessageProvider:N1,OpenState:wn,PROVIDER_OPEN_TIMEOUT:nw,ProviderError:s4,ProxyMessageChannel:Eq,ProxyMessageChannelPort:bp,ProxyMessageHandler:Sq,ProxyMessageProvider:y4,SequenceClient:ow,SequenceClientSession:Oo,SequenceProvider:jl,SequenceSigner:Fl,SingleNetworkSequenceProvider:C4,SingleNetworkSequenceSigner:sw,UnrealMessageHandler:kq,UnrealMessageProvider:g4,WalletRequestHandler:Rq,WindowMessageHandler:Pq,WindowMessageProvider:w4,WindowSessionParams:Kc,getWallet:S4,initWallet:A4,isBrowserExtension:Ih,isMuxTransportTemplate:b4,isProviderTransport:i4,isUnityPlugin:u4,isValidMessageSignature:f4,isValidSignature:xl,isValidTypedDataSignature:c4,isWalletUpToDate:d4,messageToBytes:l4,nextMessageIdx:a4,prefixEIP191Message:M1,resolveArrayProperties:v4,trimEIP191Prefix:Aq,unregisterWallet:E4,useBestStore:Mh},Symbol.toStringTag,{value:"Module"}));function Mr(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 i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var Lq=Mr({__proto__:null},[PU]),$q=Mr({__proto__:null},[BU]),Fq=Mr({__proto__:null},[ZH]),jq=Mr({__proto__:null},[sq]),zq=Mr({__proto__:null},[KH]),Uq=Mr({__proto__:null},[BH]),Vq=Mr({__proto__:null},[vq]),Wq=Mr({__proto__:null},[MV]),Hq=Mr({__proto__:null},[Bq]),qq=Mr({__proto__:null},[UW]);const Gq=ae.transaction;var Kq=Object.freeze({__proto__:null,transactions:Gq}),Jq=Mr({__proto__:null,isValidSignature:xl,isValidMessageSignature:f4,isValidTypedDataSignature:c4,isWalletUpToDate:d4},[pV]),Qq=Mr({__proto__:null},[xW]),Yq=Mr({__proto__:null},[WW]),Xq=Mr({__proto__:null},[_H]),Zq=Mr({__proto__:null},[_W]),eG=Mr({__proto__:null},[GW]),Fe=Object.freeze({__proto__:null,abi:Lq,api:$q,auth:Fq,guard:jq,indexer:zq,metadata:Uq,multicall:Vq,network:Wq,provider:Hq,relayer:qq,transactions:Kq,utils:Jq,core:Qq,signhub:Yq,sessions:Xq,migration:Zq,account:eG,initWallet:A4,getWallet:S4,unregisterWallet:E4,SequenceProvider:jl,SequenceClient:ow,SequenceSigner:Fl});const wC=[{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"}],tG="/demo-dapp/assets/logo-b757309e.svg",bC="/demo-dapp/assets/skyweaver-banner-6d47c1d1.png";var rG="_1e9z9271";const nG=({message:t,loading:e})=>fe($7,{label:"Console",defaultOpen:!0,children:nn(pe,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&(()=>t?` -...`:"...")(),fe(pe,{className:rG,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})});var iG="_1q07ov40";const uo=t=>{const{label:e,children:r,style:n,className:i}=t;return nn(pe,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&fe(pe,{marginBottom:"2",children:fe(sG,{children:e})}),fe(pe,{className:iG,children:Wt.Children.map(r,(s,o)=>fe(pe,{children:s},o))})]})},sG=t=>fe(rr,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),Ou="data:image/png;base64,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",xC="data:image/png;base64,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",oG="/demo-dapp/assets/100-cf3a0cbf.png",aG="/demo-dapp/assets/1101-1d0b8ff9.png",CC="data:image/png;base64,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",AC="/demo-dapp/assets/250-2aa72264.png",EC="/demo-dapp/assets/42161-90b816d4.png",lG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAkxQTFRF////AAAA74Ig8Iwx8ZA4//7974Qj74Mh///+//////78////74Mi//v4//////z5/vfx74Um//37////////////////////////////////////////8ZE774Yn8Y42/fLn////////8Isw////86FW/evc/OXR////+dGt/vPp8Igq++HK+9u/976M8pZE/ezd8Icp+dOx/vbu9KZg/vr2/OjW9a9w9Kll+ti5/e/j/vnz8pxO//r3////8Y838pZD////////////////8Iwy////851Q////+MWX+cyk+tWz+97E8ZI9////8Y0z////////////8ptM/fDk9rZ9972J+93C86Nb8ZM+9riB/OXQ+c+p/OfU/OnY8ZRB////9Kdi9a5u////9axr////////////////////////////////////9Kpn////98KS86Rd/////////vfw/////OPN////859U98GQ////////9rmB+9/G9bJ298CO+Mqg/e3f9bR686JZ8plI9a1t+dKv9bJ18ZA6/vXs8Igs+Mui/e7h/OrZ+Mmf+c6n8phI8Iov86Ve////////+MaZ////8Ikt////+tm7+c2l////++LM98OT8pdG////////+Mid9ruF855S////////////////+Mib////9rN49rd++tq997yG+ta3////98OV////////++DI////////9rV7+tW19bBy/vPq9rqD9Ktp////8ppK////////////////////////Mj9/0QAAAMR0Uk5T/wD/////////Af/+///9/////5/W9TQF4uDZ6MT/////x1L/Av///5b////////////////////////////Q///vCh77/6X/uP//////p/8SDgb/////////////////J///UP8QSyRsVr4rDZr/Wf//bwz/9/9N///8L///////////////////////////////h7H/5P9d///c////j+n////zMuxm/6D//////5v/WFv/MCz///////9U/2M11GLeOHwhNZoAAAr/SURBVHicxVv3Y1RFEJ67JCSXkII5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",SC="data:image/png;base64,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",kC="/demo-dapp/assets/56-06b98271.png",fG={[te.MAINNET]:Ou,[te.ROPSTEN]:Ou,[te.GOERLI]:Ou,[te.KOVAN]:Ou,[te.OPTIMISM]:xC,[te.OPTIMISM_TESTNET]:xC,[te.POLYGON]:CC,[te.POLYGON_MUMBAI]:CC,[te.POLYGON_ZKEVM]:aG,[te.ARBITRUM]:EC,[te.ARBITRUM_NOVA]:lG,[te.ARBITRUM_GOERLI]:EC,[te.GNOSIS]:oG,[te.BSC]:kC,[te.BSC_TESTNET]:kC,[te.FANTOM]:AC,[te.FANTOM_TESTNET]:AC,[te.AVALANCHE]:SC,[te.AVALANCHE_TESTNET]:SC},cG=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)};A3({logLevel:"DEBUG"});const uG="https://sequence.app",dG="https://api.sequence.app",_C=cG()||te.MAINNET,k4=new URLSearchParams(window.location.search);let za=k4.get("walletAppURL")??uG;za&&za.length>0?Fe.initWallet({defaultNetwork:_C,transports:{walletAppURL:za}}):Fe.initWallet({defaultNetwork:_C,transports:{walletAppURL:za}});const hG=()=>{const[t,e]=x.useState(null),[r,n]=x.useState(!1),[i,s]=x.useState(!1),o=Fe.getWallet().getProvider(),[a,l]=x.useState(o.getChainId());x.useMemo(()=>{o.on("chainChanged",b=>{l(U.from(b).toNumber())})},[]),x.useEffect(()=>{s(o.isConnected())},[o]),x.useEffect(()=>{N()},[i]),x.useEffect(()=>{o.on("disconnect",()=>{console.log("wallet disconnected"),u()})},[o]);const f={app:"Demo Dapp",askForEmail:!0},c=async(b={app:"Demo dapp"})=>{if(i){T(),w("Wallet already connected!"),n(!1);return}b={...f,...b,settings:{...f.settings,...b.settings}};try{T(),w("Connecting");const h=Fe.getWallet(),_=await h.connect(b);if(b.authorize){let $=k4.get("apiUrl");(!$||$.length===0)&&($=dG);const C=new Fe.api.SequenceAPIClient($),{isValid:D}=await C.isValidETHAuthProof({chainId:_.chainId,walletAddress:_.session.accountAddress,ethAuthProofString:_.proof.proofString});w(`isValid (API)?: ${D}`)}if(b.authorize){const $=new wh;if(_.proof){const C=await $.decodeProof(_.proof.proofString,!0),D=await h.utils.isValidTypedDataSignature(h.getAddress(),_.proof.typedData,C.signature,U.from(_.chainId).toNumber());w(`connected using chainId: ${U.from(_.chainId).toString()}`),w(`isValid (client)?: ${D}`)}}n(!1),_.connected?(w("Wallet connected!"),w(`shared email: ${_.email}`),s(!0)):w("Failed to connect wallet - "+_.error)}catch(h){console.error(h),p()}},u=()=>{Fe.getWallet().disconnect(),N(),s(!1)},d=()=>{Fe.getWallet().openWallet()},v=()=>{const b=Fe.getWallet(),_={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp","wyre"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}},$="wallet/add-funds";b.openWallet($,_)},g=()=>{Fe.getWallet().closeWallet()},m=async()=>{T();const b=Fe.getWallet();w(`isConnected?: ${b.isConnected()}`),n(!1)},M=async()=>{T();const b=Fe.getWallet();w(`isOpened?: ${b.isOpened()}`),n(!1)},A=async()=>{try{T();const b=o.getChainId();w(`top chainId: ${b}`);const _=o.getProvider().getChainId();w(`provider.getChainId(): ${_}`);const C=await o.getSigner().getChainId();w(`signer.getChainId(): ${C}`),n(!1)}catch(b){console.error(b),p()}},E=async()=>{try{T();const b=Fe.getWallet(),h=b.getAddress();w(`getAddress(): ${h}`);const $=b.getProvider().listAccounts();w(`accounts: ${JSON.stringify($)}`),n(!1)}catch(b){console.error(b),p()}},S=async()=>{try{T();const b=Fe.getWallet(),h=b.getProvider(),_=b.getAddress(),$=await h.getBalance(_);w(`balance check 1: ${$.toString()}`);const D=await b.getSigner().getBalance();w(`balance check 2: ${D.toString()}`),n(!1)}catch(b){console.error(b),p()}},P=async()=>{try{T();const h=await Fe.getWallet().getNetworks();w(`networks: ${JSON.stringify(h,null,2)}`),n(!1)}catch(b){console.error(b),p()}},R=async()=>{try{T();const b=Fe.getWallet();w("signing message...");const h=b.getSigner(),_=`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. - -ā˜ ā˜€ ā˜‚`,$=await h.signMessage(_);w(`signature: ${$}`);const C=await b.utils.isValidMessageSignature(b.getAddress(),_,$,await h.getChainId());if(w(`isValid?: ${C}`),!C)throw new Error("sig invalid");n(!1)}catch(b){console.error(b),p()}},L=async()=>{try{T();const b=Fe.getWallet();w("signing typedData...");const h={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"]}},_=b.getSigner(),$=await _.signTypedData(h.domain,h.types,h.message);w(`signature: ${$}`);const C=await b.utils.isValidTypedDataSignature(b.getAddress(),h,$,await _.getChainId());w(`isValid?: ${C}`),n(!1)}catch(b){console.error(b),p()}},F=async()=>{try{T();const b=Fe.getWallet(),h="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",_=new pr(["function withdraw(uint256 amount)"]),$={to:h,data:_.encodeFunctionData("withdraw",["1000000000000000000"])},D=await b.getProvider().estimateGas($);w(`estimated gas needed for wmatic withdrawal : ${D.toString()}`),n(!1)}catch(b){console.error(b),p()}},z=async b=>{try{T();const h=Fe.getWallet();b=b||h.getSigner(),w(`Transfer txn on ${b.getChainId()} chainId`);const _=await b.getAddress(),$={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:_,value:Qy("1.234"),data:"0x"},C={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:_,value:Qy("0.4242"),data:"0x"},D=b.provider,B=await D.getBalance(_);w(`balance of ${_}, before: ${B}`);const j=await b.sendTransaction([$,C]);w(`txnResponse: ${JSON.stringify(j)}`);const Y=await D.getBalance(_);w(`balance of ${_}, after: ${Y}`),n(!1)}catch(h){console.error(h),p()}},H=async b=>{try{T();const h=Fe.getWallet();b=b||h.getSigner();const _=await b.getAddress(),$=gh("1",1),D={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new pr(wC).encodeFunctionData("transfer",[_,$.toHexString()])},B=await b.sendTransaction([D],{chainId:te.GOERLI});w(`txnResponse: ${JSON.stringify(B)}`),n(!1)}catch(h){console.error(h),p()}},q=async b=>{try{T();const h=Fe.getWallet();b=b||h.getSigner();const _=await b.getAddress(),$=gh("0.05",18),D={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new pr(wC).encodeFunctionData("transfer",[_,$.toHexString()])},B=await b.sendTransaction([D]);w(`txnResponse: ${JSON.stringify(B)}`),n(!1)}catch(h){console.error(h),p()}},K=async()=>{try{const b=Fe.getWallet(),h=b.getChainId()===te.ARBITRUM?te.OPTIMISM:te.ARBITRUM;z(b.getSigner(h))}catch(b){console.error(b),p()}},ne=async()=>{try{T(),w("TODO"),n(!1)}catch(b){console.error(b),p()}},O=async b=>{try{T();const h=Fe.getWallet();b=b||h.getSigner();const _=["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)"],$="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",C=new Bl($,_,b),D=await C.symbol();w(`Token symbol: ${D}`);const B=await C.balanceOf(await b.getAddress());w(`Token Balance: ${B.toString()}`),n(!1)}catch(h){console.error(h),p()}},y=async()=>{try{T();const _=await Fe.getWallet().getSigner().getAddress(),$=new Fe.indexer.SequenceIndexerClient(Fe.indexer.SequenceIndexerServices.POLYGON),C=await $.getTokenBalances({accountAddress:_,includeMetadata:!0});w(`tokens in your account: ${JSON.stringify(C)}`);const D=await $.getTokenBalances({accountAddress:_,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});w(`skyweaver collectibles in your account: ${JSON.stringify(D)}`),n(!1)}catch(b){console.error(b),p()}},w=(b,h=!1)=>(console.log(b),e(h?b:_=>`${_} - -${b}`)),T=()=>{n(!0)},N=()=>{n(!1),e(i?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},p=()=>{n(!1),e("An error occurred")},k=[te.RINKEBY,te.HARDHAT,te.HARDHAT_2,te.KOVAN,te.FANTOM,te.FANTOM_TESTNET,te.ROPSTEN,te.AURORA,te.AURORA_TESTNET,te.HOMEVERSE_TESTNET,te.BASE_GOERLI],I=Object.values(Fe.network.networks).filter(b=>k.indexOf(b.chainId)<0).sort((b,h)=>b.title>h.title?1:-1);return nn(pe,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[fe(pe,{marginBottom:"10",children:fe("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:fe(ek,{height:"6",alt:"logo",src:tG})})}),fe(pe,{children:fe(rr,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),fe(pe,{marginTop:"1",marginBottom:"4",children:fe(rr,{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."})}),nn(WR,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[fe(m7,{}),fe(rr,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),fe(E2,{background:"buttonGlass"}),nn(pe,{marginBottom:"4",children:[fe(rr,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),fe("a",{href:za,target:"_blank",rel:"noopener",children:nn(pe,{gap:"1",marginTop:"1",alignItems:"center",children:[fe(rr,{as:"div",variant:"normal",color:"text80",children:za}),fe(v7,{})]})})]}),fe(E2,{background:"buttonGlass"}),fe(pe,{marginBottom:"4",children:fe(TB,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:b=>o.setDefaultChainId(Number(b)),value:String(a),options:[...Object.values(I).map(b=>({label:nn(pe,{alignItems:"center",gap:"2",children:[fe(oL,{src:fG[b.chainId],size:"sm"}),fe(rr,{children:b.title})]}),value:String(b.chainId)}))]})}),nn(uo,{label:"Connection",children:[fe(wt,{width:"full",shape:"square",onClick:()=>c(),label:"Connect"}),fe(wt,{width:"full",shape:"square",onClick:()=>c({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),fe(wt,{width:"full",shape:"square",onClick:()=>c({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${bC}`,includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),fe(wt,{width:"full",shape:"square",onClick:()=>{const b=prompt("Auto-email login, please specify the email address:");c({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:b,theme:"dark",bannerUrl:`${window.location.origin}${bC}`}})},label:"Connect with Email"}),fe(wt,{width:"full",shape:"square",onClick:()=>u(),label:"Disconnect"})]}),nn(uo,{label:"Basics",children:[fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>d(),label:"Open Wallet"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>v(),label:"Open Wallet with Settings"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>g(),label:"Close Wallet"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>m(),label:"Is Connected?"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>M(),label:"Is Opened?"})]}),nn(uo,{label:"State",children:[fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>A(),label:"ChainID"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>P(),label:"Networks"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>E(),label:"Get Accounts"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>S(),label:"Get Balance"})]}),nn(uo,{label:"Signing",children:[fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>R(),label:"Sign Message"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>L(),label:"Sign TypedData"})]}),fe(uo,{label:"Simulation",children:fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>F(),label:"Estimate Unwrap Gas"})}),nn(uo,{label:"Transactions",children:[fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>z(),label:"Send funds"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>K(),label:"Send on L2"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>q(),label:"Send DAI"}),fe(wt,{width:"full",shape:"square",disabled:!i||!0,onClick:()=>ne(),label:"Send ERC-1155 Tokens"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>H(),label:"Send USDC on Goerli"})]}),nn(uo,{label:"Various",children:[fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>O(),label:"Read Symbol and Balance"}),fe(wt,{width:"full",shape:"square",disabled:!i,onClick:()=>y(),label:"Fetch Token Balances"})]}),fe(nG,{message:t,loading:r})]})},vG=Wt.memo(hG),yG=Sk(document.getElementById("root"));yG.render(fe(Wt.StrictMode,{children:fe(rL,{children:fe(vG,{})})})); diff --git a/assets/index-9490b5b0.js b/assets/index-9490b5b0.js new file mode 100644 index 0000000..c3d429a --- /dev/null +++ b/assets/index-9490b5b0.js @@ -0,0 +1,165 @@ +function T4(t,e){for(var r=0;rn[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerpolicy&&(s.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?s.credentials="include":i.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var MC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function NC(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function P4(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var s=Function.bind.apply(e,i);return new s}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var yd={},I4={get exports(){return yd},set exports(t){yd=t}},Rh={},x={},M4={get exports(){return x},set exports(t){x=t}},Te={};/** + * @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 Tc=Symbol.for("react.element"),N4=Symbol.for("react.portal"),R4=Symbol.for("react.fragment"),O4=Symbol.for("react.strict_mode"),D4=Symbol.for("react.profiler"),B4=Symbol.for("react.provider"),L4=Symbol.for("react.context"),$4=Symbol.for("react.forward_ref"),F4=Symbol.for("react.suspense"),j4=Symbol.for("react.memo"),z4=Symbol.for("react.lazy"),cw=Symbol.iterator;function U4(t){return t===null||typeof t!="object"?null:(t=cw&&t[cw]||t["@@iterator"],typeof t=="function"?t:null)}var RC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OC=Object.assign,DC={};function El(t,e,r){this.props=t,this.context=e,this.refs=DC,this.updater=r||RC}El.prototype.isReactComponent={};El.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")};El.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function BC(){}BC.prototype=El.prototype;function Ap(t,e,r){this.props=t,this.context=e,this.refs=DC,this.updater=r||RC}var Sp=Ap.prototype=new BC;Sp.constructor=Ap;OC(Sp,El.prototype);Sp.isPureReactComponent=!0;var uw=Array.isArray,LC=Object.prototype.hasOwnProperty,kp={current:null},$C={key:!0,ref:!0,__self:!0,__source:!0};function FC(t,e,r){var n,i={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)LC.call(e,n)&&!$C.hasOwnProperty(n)&&(i[n]=e[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1>>1,h=p[b];if(0>>1;b<_;){var $=2*(b+1)-1,C=p[$],D=$+1,B=p[D];if(0>i(C,I))Di(B,C)?(p[b]=B,p[D]=I,b=D):(p[b]=C,p[$]=I,b=$);else if(Di(B,I))p[b]=B,p[D]=I,b=D;else break e}}return k}function i(p,k){var I=p.sortIndex-k.sortIndex;return I!==0?I:p.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],f=[],c=1,u=null,d=3,v=!1,g=!1,m=!1,M=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(p){for(var k=r(f);k!==null;){if(k.callback===null)n(f);else if(k.startTime<=p)n(f),k.sortIndex=k.expirationTime,e(l,k);else break;k=r(f)}}function P(p){if(m=!1,S(p),!g)if(r(l)!==null)g=!0,T(R);else{var k=r(f);k!==null&&N(P,k.startTime-p)}}function R(p,k){g=!1,m&&(m=!1,E(z),z=-1),v=!0;var I=d;try{for(S(k),u=r(l);u!==null&&(!(u.expirationTime>k)||p&&!K());){var b=u.callback;if(typeof b=="function"){u.callback=null,d=u.priorityLevel;var h=b(u.expirationTime<=k);k=t.unstable_now(),typeof h=="function"?u.callback=h:u===r(l)&&n(l),S(k)}else n(l);u=r(l)}if(u!==null)var _=!0;else{var $=r(f);$!==null&&N(P,$.startTime-k),_=!1}return _}finally{u=null,d=I,v=!1}}var L=!1,F=null,z=-1,H=5,q=-1;function K(){return!(t.unstable_now()-qp||125b?(p.sortIndex=I,e(f,p),r(l)===null&&p===r(f)&&(m?(E(z),z=-1):m=!0,N(P,I-b))):(p.sortIndex=h,e(l,p),g||v||(g=!0,T(R))),p},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(p){var k=d;return function(){var I=d;d=k;try{return p.apply(this,arguments)}finally{d=I}}}})(zC);(function(t){t.exports=zC})(t_);/** + * @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 UC=x,un=v0;function re(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"),y0=Object.prototype.hasOwnProperty,r_=/^[: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]*$/,hw={},vw={};function n_(t){return y0.call(vw,t)?!0:y0.call(hw,t)?!1:r_.test(t)?vw[t]=!0:(hw[t]=!0,!1)}function i_(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 s_(t,e,r,n){if(e===null||typeof e>"u"||i_(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 Ur(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var gr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){gr[t]=new Ur(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];gr[e]=new Ur(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){gr[t]=new Ur(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){gr[t]=new Ur(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){gr[t]=new Ur(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){gr[t]=new Ur(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){gr[t]=new Ur(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){gr[t]=new Ur(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){gr[t]=new Ur(t,5,!1,t.toLowerCase(),null,!1,!1)});var Tp=/[\-:]([a-z])/g;function Pp(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(Tp,Pp);gr[e]=new Ur(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(Tp,Pp);gr[e]=new Ur(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(Tp,Pp);gr[e]=new Ur(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){gr[t]=new Ur(t,1,!1,t.toLowerCase(),null,!1,!1)});gr.xlinkHref=new Ur("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){gr[t]=new Ur(t,1,!1,t.toLowerCase(),null,!0,!0)});function Ip(t,e,r,n){var i=gr.hasOwnProperty(e)?gr[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{J1=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?sf(t):""}function o_(t){switch(t.tag){case 5:return sf(t.type);case 16:return sf("Lazy");case 13:return sf("Suspense");case 19:return sf("SuspenseList");case 0:case 2:case 15:return t=Q1(t.type,!1),t;case 11:return t=Q1(t.type.render,!1),t;case 1:return t=Q1(t.type,!0),t;default:return""}}function w0(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 ka:return"Fragment";case Sa:return"Portal";case p0:return"Profiler";case Mp:return"StrictMode";case g0:return"Suspense";case m0:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case HC:return(t.displayName||"Context")+".Consumer";case WC:return(t._context.displayName||"Context")+".Provider";case Np:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Rp:return e=t.displayName||null,e!==null?e:w0(t.type)||"Memo";case ys:e=t._payload,t=t._init;try{return w0(t(e))}catch{}}return null}function a_(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 w0(e);case 8:return e===Mp?"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 $s(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function GC(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function l_(t){var e=GC(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 i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.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 eu(t){t._valueTracker||(t._valueTracker=l_(t))}function KC(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=GC(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function pd(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 b0(t,e){var r=e.checked;return Ot({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function pw(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=$s(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 JC(t,e){e=e.checked,e!=null&&Ip(t,"checked",e,!1)}function x0(t,e){JC(t,e);var r=$s(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")?C0(t,e.type,r):e.hasOwnProperty("defaultValue")&&C0(t,e.type,$s(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function gw(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 C0(t,e,r){(e!=="number"||pd(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var of=Array.isArray;function Va(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=tu.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Hf(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var df={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},f_=["Webkit","ms","Moz","O"];Object.keys(df).forEach(function(t){f_.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),df[e]=df[t]})});function ZC(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||df.hasOwnProperty(t)&&df[t]?(""+e).trim():e+"px"}function eE(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=ZC(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var c_=Ot({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 S0(t,e){if(e){if(c_[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(re(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(re(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(re(61))}if(e.style!=null&&typeof e.style!="object")throw Error(re(62))}}function k0(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 _0=null;function Op(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var T0=null,Wa=null,Ha=null;function bw(t){if(t=Mc(t)){if(typeof T0!="function")throw Error(re(280));var e=t.stateNode;e&&(e=$h(e),T0(t.stateNode,t.type,e))}}function tE(t){Wa?Ha?Ha.push(t):Ha=[t]:Wa=t}function rE(){if(Wa){var t=Wa,e=Ha;if(Ha=Wa=null,bw(t),e)for(t=0;t>>=0,t===0?32:31-(x_(t)/C_|0)|0}var ru=64,nu=4194304;function af(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 bd(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=af(a):(s&=o,s!==0&&(n=af(s)))}else o=r&~i,o!==0?n=af(o):s!==0&&(n=af(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&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 Pc(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Kn(e),t[e]=r}function k_(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=vf),Pw=String.fromCharCode(32),Iw=!1;function CE(t,e){switch(t){case"keyup":return eT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function EE(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var _a=!1;function rT(t,e){switch(t){case"compositionend":return EE(e);case"keypress":return e.which!==32?null:(Iw=!0,Pw);case"textInput":return t=e.data,t===Pw&&Iw?null:t;default:return null}}function nT(t,e){if(_a)return t==="compositionend"||!Up&&CE(t,e)?(t=bE(),Fu=Fp=bs=null,_a=!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=Ow(r)}}function _E(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?_E(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function TE(){for(var t=window,e=pd();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=pd(t.document)}return e}function Vp(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 dT(t){var e=TE(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&_E(r.ownerDocument.documentElement,r)){if(n!==null&&Vp(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 i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=Dw(r,s);var o=Dw(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>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,Ta=null,O0=null,pf=null,D0=!1;function Bw(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;D0||Ta==null||Ta!==pd(n)||(n=Ta,"selectionStart"in n&&Vp(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}),pf&&Yf(pf,n)||(pf=n,n=Ed(O0,"onSelect"),0Ma||(t.current=z0[Ma],z0[Ma]=null,Ma--)}function Ve(t,e){Ma++,z0[Ma]=t.current,t.current=e}var Fs={},Pr=Ks(Fs),Qr=Ks(!1),$o=Fs;function il(t,e){var r=t.type.contextTypes;if(!r)return Fs;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Yr(t){return t=t.childContextTypes,t!=null}function Sd(){Et(Qr),Et(Pr)}function Vw(t,e,r){if(Pr.current!==Fs)throw Error(re(168));Ve(Pr,e),Ve(Qr,r)}function LE(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(re(108,a_(t)||"Unknown",i));return Ot({},r,n)}function kd(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Fs,$o=Pr.current,Ve(Pr,t),Ve(Qr,Qr.current),!0}function Ww(t,e,r){var n=t.stateNode;if(!n)throw Error(re(169));r?(t=LE(t,e,$o),n.__reactInternalMemoizedMergedChildContext=t,Et(Qr),Et(Pr),Ve(Pr,t)):Et(Qr),Ve(Qr,r)}var Ni=null,Fh=!1,cv=!1;function $E(t){Ni===null?Ni=[t]:Ni.push(t)}function AT(t){Fh=!0,$E(t)}function Js(){if(!cv&&Ni!==null){cv=!0;var t=0,e=Le;try{var r=Ni;for(Le=1;t>=o,i-=o,Bi=1<<32-Kn(e)+i|r<z?(H=F,F=null):H=F.sibling;var q=d(E,F,S[z],P);if(q===null){F===null&&(F=H);break}t&&F&&q.alternate===null&&e(E,F),A=s(q,A,z),L===null?R=q:L.sibling=q,L=q,F=H}if(z===S.length)return r(E,F),kt&&yo(E,z),R;if(F===null){for(;zz?(H=F,F=null):H=F.sibling;var K=d(E,F,q.value,P);if(K===null){F===null&&(F=H);break}t&&F&&K.alternate===null&&e(E,F),A=s(K,A,z),L===null?R=K:L.sibling=K,L=K,F=H}if(q.done)return r(E,F),kt&&yo(E,z),R;if(F===null){for(;!q.done;z++,q=S.next())q=u(E,q.value,P),q!==null&&(A=s(q,A,z),L===null?R=q:L.sibling=q,L=q);return kt&&yo(E,z),R}for(F=n(E,F);!q.done;z++,q=S.next())q=v(F,E,z,q.value,P),q!==null&&(t&&q.alternate!==null&&F.delete(q.key===null?z:q.key),A=s(q,A,z),L===null?R=q:L.sibling=q,L=q);return t&&F.forEach(function(ne){return e(E,ne)}),kt&&yo(E,z),R}function M(E,A,S,P){if(typeof S=="object"&&S!==null&&S.type===ka&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Zc:e:{for(var R=S.key,L=A;L!==null;){if(L.key===R){if(R=S.type,R===ka){if(L.tag===7){r(E,L.sibling),A=i(L,S.props.children),A.return=E,E=A;break e}}else if(L.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===ys&&Yw(R)===L.type){r(E,L.sibling),A=i(L,S.props),A.ref=Gl(E,L,S),A.return=E,E=A;break e}r(E,L);break}else e(E,L);L=L.sibling}S.type===ka?(A=Mo(S.props.children,E.mode,P,S.key),A.return=E,E=A):(P=Gu(S.type,S.key,S.props,null,E.mode,P),P.ref=Gl(E,A,S),P.return=E,E=P)}return o(E);case Sa:e:{for(L=S.key;A!==null;){if(A.key===L)if(A.tag===4&&A.stateNode.containerInfo===S.containerInfo&&A.stateNode.implementation===S.implementation){r(E,A.sibling),A=i(A,S.children||[]),A.return=E,E=A;break e}else{r(E,A);break}else e(E,A);A=A.sibling}A=mv(S,E.mode,P),A.return=E,E=A}return o(E);case ys:return L=S._init,M(E,A,L(S._payload),P)}if(of(S))return g(E,A,S,P);if(Ul(S))return m(E,A,S,P);cu(E,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,A!==null&&A.tag===6?(r(E,A.sibling),A=i(A,S),A.return=E,E=A):(r(E,A),A=gv(S,E.mode,P),A.return=E,E=A),o(E)):r(E,A)}return M}var ol=qE(!0),GE=qE(!1),Nc={},hi=Ks(Nc),tc=Ks(Nc),rc=Ks(Nc);function ko(t){if(t===Nc)throw Error(re(174));return t}function Xp(t,e){switch(Ve(rc,e),Ve(tc,t),Ve(hi,Nc),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:A0(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=A0(e,t)}Et(hi),Ve(hi,e)}function al(){Et(hi),Et(tc),Et(rc)}function KE(t){ko(rc.current);var e=ko(hi.current),r=A0(e,t.type);e!==r&&(Ve(tc,t),Ve(hi,r))}function Zp(t){tc.current===t&&(Et(hi),Et(tc))}var Nt=Ks(0);function Nd(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var uv=[];function eg(){for(var t=0;tr?r:4,t(!0);var n=dv.transition;dv.transition={};try{t(!1),e()}finally{Le=r,dv.transition=n}}function cA(){return _n().memoizedState}function TT(t,e,r){var n=Ns(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},uA(t))dA(e,r);else if(r=UE(t,e,r,n),r!==null){var i=$r();Jn(r,t,n,i),hA(r,e,n)}}function PT(t,e,r){var n=Ns(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(uA(t))dA(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,Yn(a,o)){var l=e.interleaved;l===null?(i.next=i,Qp(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=UE(t,e,i,n),r!==null&&(i=$r(),Jn(r,t,n,i),hA(r,e,n))}}function uA(t){var e=t.alternate;return t===Rt||e!==null&&e===Rt}function dA(t,e){gf=Rd=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function hA(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Bp(t,r)}}var Od={readContext:kn,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useInsertionEffect:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useSyncExternalStore:wr,useId:wr,unstable_isNewReconciler:!1},IT={readContext:kn,useCallback:function(t,e){return ni().memoizedState=[t,e===void 0?null:e],t},useContext:kn,useEffect:Zw,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Vu(4194308,4,sA.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Vu(4194308,4,t,e)},useInsertionEffect:function(t,e){return Vu(4,2,t,e)},useMemo:function(t,e){var r=ni();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ni();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=TT.bind(null,Rt,t),[n.memoizedState,t]},useRef:function(t){var e=ni();return t={current:t},e.memoizedState=t},useState:Xw,useDebugValue:sg,useDeferredValue:function(t){return ni().memoizedState=t},useTransition:function(){var t=Xw(!1),e=t[0];return t=_T.bind(null,t[1]),ni().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Rt,i=ni();if(kt){if(r===void 0)throw Error(re(407));r=r()}else{if(r=e(),lr===null)throw Error(re(349));jo&30||YE(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,Zw(ZE.bind(null,n,s,t),[t]),n.flags|=2048,sc(9,XE.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=ni(),e=lr.identifierPrefix;if(kt){var r=Li,n=Bi;r=(n&~(1<<32-Kn(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=nc++,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[ec]=n,CA(t,e,!1,!1),e.stateNode=t;e:{switch(o=k0(r,n),r){case"dialog":bt("cancel",t),bt("close",t),i=n;break;case"iframe":case"object":case"embed":bt("load",t),i=n;break;case"video":case"audio":for(i=0;ifl&&(e.flags|=128,n=!0,Kl(s,!1),e.lanes=4194304)}else{if(!n)if(t=Nd(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Kl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!kt)return br(e),null}else 2*Vt()-s.renderingStartTime>fl&&r!==1073741824&&(e.flags|=128,n=!0,Kl(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Vt(),e.sibling=null,r=Nt.current,Ve(Nt,n?r&1|2:r&1),e):(br(e),null);case 22:case 23:return ug(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?sn&1073741824&&(br(e),e.subtreeFlags&6&&(e.flags|=8192)):br(e),null;case 24:return null;case 25:return null}throw Error(re(156,e.tag))}function $T(t,e){switch(Hp(e),e.tag){case 1:return Yr(e.type)&&Sd(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return al(),Et(Qr),Et(Pr),eg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Zp(e),null;case 13:if(Et(Nt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(re(340));sl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Et(Nt),null;case 4:return al(),null;case 10:return Jp(e.type._context),null;case 22:case 23:return ug(),null;case 24:return null;default:return null}}var du=!1,Cr=!1,FT=typeof WeakSet=="function"?WeakSet:Set,se=null;function Da(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){$t(t,e,n)}else r.current=null}function Z0(t,e,r){try{r()}catch(n){$t(t,e,n)}}var lb=!1;function jT(t,e){if(B0=xd,t=TE(),Vp(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 i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,f=0,c=0,u=t,d=null;t:for(;;){for(var v;u!==r||i!==0&&u.nodeType!==3||(a=o+i),u!==s||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(v=u.firstChild)!==null;)d=u,u=v;for(;;){if(u===t)break t;if(d===r&&++f===i&&(a=o),d===s&&++c===n&&(l=o),(v=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=v}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(L0={focusedElem:t,selectionRange:r},xd=!1,se=e;se!==null;)if(e=se,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,se=t;else for(;se!==null;){e=se;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,M=g.memoizedState,E=e.stateNode,A=E.getSnapshotBeforeUpdate(e.elementType===e.type?m:jn(e.type,m),M);E.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(P){$t(e,e.return,P)}if(t=e.sibling,t!==null){t.return=e.return,se=t;break}se=e.return}return g=lb,lb=!1,g}function mf(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Z0(e,r,s)}i=i.next}while(i!==n)}}function Uh(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 ey(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 SA(t){var e=t.alternate;e!==null&&(t.alternate=null,SA(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ai],delete e[ec],delete e[j0],delete e[CT],delete e[ET])),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 kA(t){return t.tag===5||t.tag===3||t.tag===4}function fb(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||kA(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 ty(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=Ad));else if(n!==4&&(t=t.child,t!==null))for(ty(t,e,r),t=t.sibling;t!==null;)ty(t,e,r),t=t.sibling}function ry(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(ry(t,e,r),t=t.sibling;t!==null;)ry(t,e,r),t=t.sibling}var hr=null,Un=!1;function cs(t,e,r){for(r=r.child;r!==null;)_A(t,e,r),r=r.sibling}function _A(t,e,r){if(di&&typeof di.onCommitFiberUnmount=="function")try{di.onCommitFiberUnmount(Oh,r)}catch{}switch(r.tag){case 5:Cr||Da(r,e);case 6:var n=hr,i=Un;hr=null,cs(t,e,r),hr=n,Un=i,hr!==null&&(Un?(t=hr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):hr.removeChild(r.stateNode));break;case 18:hr!==null&&(Un?(t=hr,r=r.stateNode,t.nodeType===8?fv(t.parentNode,r):t.nodeType===1&&fv(t,r),Jf(t)):fv(hr,r.stateNode));break;case 4:n=hr,i=Un,hr=r.stateNode.containerInfo,Un=!0,cs(t,e,r),hr=n,Un=i;break;case 0:case 11:case 14:case 15:if(!Cr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Z0(r,e,o),i=i.next}while(i!==n)}cs(t,e,r);break;case 1:if(!Cr&&(Da(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){$t(r,e,a)}cs(t,e,r);break;case 21:cs(t,e,r);break;case 22:r.mode&1?(Cr=(n=Cr)||r.memoizedState!==null,cs(t,e,r),Cr=n):cs(t,e,r);break;default:cs(t,e,r)}}function cb(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new FT),e.forEach(function(n){var i=JT.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Nn(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=Vt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*UT(n/1960))-n,10t?16:t,xs===null)var n=!1;else{if(t=xs,xs=null,Ld=0,Oe&6)throw Error(re(331));var i=Oe;for(Oe|=4,se=t.current;se!==null;){var s=se,o=s.child;if(se.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lVt()-fg?Io(t,0):lg|=r),Xr(t,e)}function DA(t,e){e===0&&(t.mode&1?(e=nu,nu<<=1,!(nu&130023424)&&(nu=4194304)):e=1);var r=$r();t=Hi(t,e),t!==null&&(Pc(t,e,r),Xr(t,r))}function KT(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),DA(t,r)}function JT(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(re(314))}n!==null&&n.delete(e),DA(t,r)}var BA;BA=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Qr.current)Kr=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Kr=!1,BT(t,e,r);Kr=!!(t.flags&131072)}else Kr=!1,kt&&e.flags&1048576&&FE(e,Td,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Wu(t,e),t=e.pendingProps;var i=il(e,Pr.current);Ga(e,r),i=rg(null,e,n,t,i,r);var s=ng();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Yr(n)?(s=!0,kd(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Yp(e),i.updater=jh,e.stateNode=i,i._reactInternals=e,q0(e,n,t,r),e=J0(null,e,n,!0,s,r)):(e.tag=0,kt&&s&&Wp(e),Or(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Wu(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=YT(n),t=jn(n,t),i){case 0:e=K0(null,e,n,t,r);break e;case 1:e=sb(null,e,n,t,r);break e;case 11:e=nb(null,e,n,t,r);break e;case 14:e=ib(null,e,n,jn(n.type,t),r);break e}throw Error(re(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),K0(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),sb(t,e,n,i,r);case 3:e:{if(wA(e),t===null)throw Error(re(387));n=e.pendingProps,s=e.memoizedState,i=s.element,VE(t,e),Md(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=ll(Error(re(423)),e),e=ob(t,e,n,r,i);break e}else if(n!==i){i=ll(Error(re(424)),e),e=ob(t,e,n,r,i);break e}else for(ln=Ps(e.stateNode.containerInfo.firstChild),cn=e,kt=!0,Vn=null,r=GE(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sl(),n===i){e=qi(t,e,r);break e}Or(t,e,n,r)}e=e.child}return e;case 5:return KE(e),t===null&&V0(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,$0(n,i)?o=null:s!==null&&$0(n,s)&&(e.flags|=32),mA(t,e),Or(t,e,o,r),e.child;case 6:return t===null&&V0(e),null;case 13:return bA(t,e,r);case 4:return Xp(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ol(e,null,n,r):Or(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),nb(t,e,n,i,r);case 7:return Or(t,e,e.pendingProps,r),e.child;case 8:return Or(t,e,e.pendingProps.children,r),e.child;case 12:return Or(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,Ve(Pd,n._currentValue),n._currentValue=o,s!==null)if(Yn(s.value,o)){if(s.children===i.children&&!Qr.current){e=qi(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Fi(-1,r&-r),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var c=f.pending;c===null?l.next=l:(l.next=c.next,c.next=l),f.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),W0(s.return,r,e),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(re(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),W0(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Or(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Ga(e,r),i=kn(i),n=n(i),e.flags|=1,Or(t,e,n,r),e.child;case 14:return n=e.type,i=jn(n,e.pendingProps),i=jn(n.type,i),ib(t,e,n,i,r);case 15:return pA(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:jn(n,i),Wu(t,e),e.tag=1,Yr(n)?(t=!0,kd(e)):t=!1,Ga(e,r),HE(e,n,i),q0(e,n,i,r),J0(null,e,n,!0,t,r);case 19:return xA(t,e,r);case 22:return gA(t,e,r)}throw Error(re(156,e.tag))};function LA(t,e){return fE(t,e)}function QT(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 Cn(t,e,r,n){return new QT(t,e,r,n)}function hg(t){return t=t.prototype,!(!t||!t.isReactComponent)}function YT(t){if(typeof t=="function")return hg(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Np)return 11;if(t===Rp)return 14}return 2}function Rs(t,e){var r=t.alternate;return r===null?(r=Cn(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 Gu(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")hg(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ka:return Mo(r.children,i,s,e);case Mp:o=8,i|=8;break;case p0:return t=Cn(12,r,e,i|2),t.elementType=p0,t.lanes=s,t;case g0:return t=Cn(13,r,e,i),t.elementType=g0,t.lanes=s,t;case m0:return t=Cn(19,r,e,i),t.elementType=m0,t.lanes=s,t;case qC:return Wh(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case WC:o=10;break e;case HC:o=9;break e;case Np:o=11;break e;case Rp:o=14;break e;case ys:o=16,n=null;break e}throw Error(re(130,t==null?t:typeof t,""))}return e=Cn(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function Mo(t,e,r,n){return t=Cn(7,t,n,e),t.lanes=r,t}function Wh(t,e,r,n){return t=Cn(22,t,n,e),t.elementType=qC,t.lanes=r,t.stateNode={isHidden:!1},t}function gv(t,e,r){return t=Cn(6,t,null,e),t.lanes=r,t}function mv(t,e,r){return e=Cn(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function XT(t,e,r,n,i){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=X1(0),this.expirationTimes=X1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=X1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function vg(t,e,r,n,i,s,o,a,l){return t=new XT(t,e,r,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Cn(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yp(s),t}function ZT(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=vn})(e_);const iP=NC(wi),mg=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Jh=x.createContext({});function sP(){return x.useContext(Jh).visualElement}const Rc=x.createContext(null),Qh=typeof document<"u",jd=Qh?x.useLayoutEffect:x.useEffect,zA=x.createContext({strict:!1});function oP(t,e,r,n){const i=sP(),s=x.useContext(zA),o=x.useContext(Rc),a=x.useContext(mg).reducedMotion,l=x.useRef();n=n||s.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return jd(()=>{f&&f.render()}),(window.HandoffAppearAnimations?jd:x.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function La(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function aP(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):La(r)&&(r.current=n))},[e])}function ac(t){return typeof t=="string"||Array.isArray(t)}function Yh(t){return typeof t=="object"&&typeof t.start=="function"}const lP=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Xh(t){return Yh(t.animate)||lP.some(e=>ac(t[e]))}function UA(t){return Boolean(Xh(t)||t.variants)}function fP(t,e){if(Xh(t)){const{initial:r,animate:n}=t;return{initial:r===!1||ac(r)?r:void 0,animate:ac(n)?n:void 0}}return t.inherit!==!1?e:{}}function cP(t){const{initial:e,animate:r}=fP(t,x.useContext(Jh));return x.useMemo(()=>({initial:e,animate:r}),[mb(e),mb(r)])}function mb(t){return Array.isArray(t)?t.join(" "):t}const ki=t=>({isEnabled:e=>t.some(r=>!!e[r])}),lc={measureLayout:ki(["layout","layoutId","drag"]),animation:ki(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ki(["exit"]),drag:ki(["drag","dragControls"]),focus:ki(["whileFocus"]),hover:ki(["whileHover","onHoverStart","onHoverEnd"]),tap:ki(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ki(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ki(["whileInView","onViewportEnter","onViewportLeave"])};function uP(t){for(const e in t)e==="projectionNodeConstructor"?lc.projectionNodeConstructor=t[e]:lc[e].Component=t[e]}function Zh(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const xf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let dP=1;function hP(){return Zh(()=>{if(xf.hasEverUpdated)return dP++})}const wg=x.createContext({});class vP extends Wt.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const VA=x.createContext({}),yP=Symbol.for("motionComponentSymbol");function pP({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&uP(t);function o(l,f){const c={...x.useContext(mg),...l,layoutId:gP(l)},{isStatic:u}=c;let d=null;const v=cP(l),g=u?void 0:hP(),m=i(l,u);if(!u&&Qh){v.visualElement=oP(s,m,c,e);const M=x.useContext(zA).strict,E=x.useContext(VA);v.visualElement&&(d=v.visualElement.loadFeatures(c,M,t,g,r||lc.projectionNodeConstructor,E))}return x.createElement(vP,{visualElement:v.visualElement,props:c},d,x.createElement(Jh.Provider,{value:v},n(s,l,g,aP(m,v.visualElement,f),m,u,v.visualElement)))}const a=x.forwardRef(o);return a[yP]=s,a}function gP({layoutId:t}){const e=x.useContext(wg).id;return e&&t!==void 0?e+"-"+t:t}function mP(t){function e(n,i={}){return pP(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const wP=["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 bg(t){return typeof t!="string"||t.includes("-")?!1:!!(wP.indexOf(t)>-1||/[A-Z]/.test(t))}const zd={};function bP(t){Object.assign(zd,t)}const Ud=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kl=new Set(Ud);function WA(t,{layout:e,layoutId:r}){return kl.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!zd[t]||t==="opacity")}const Zr=t=>!!(t!=null&&t.getVelocity),xP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CP=(t,e)=>Ud.indexOf(t)-Ud.indexOf(e);function EP({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(CP);for(const a of e)o+=`${xP[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function HA(t){return t.startsWith("--")}const AP=(t,e)=>e&&typeof t=="number"?e.transform(t):t,cl=(t,e,r)=>Math.min(Math.max(r,t),e),ta={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Cf={...ta,transform:t=>cl(0,1,t)},yu={...ta,default:1},Ef=t=>Math.round(t*1e5)/1e5,fc=/(-)?([\d]*\.?[\d])+/g,ay=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,SP=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oc(t){return typeof t=="string"}const Dc=t=>({test:e=>Oc(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),hs=Dc("deg"),vi=Dc("%"),ye=Dc("px"),kP=Dc("vh"),_P=Dc("vw"),wb={...vi,parse:t=>vi.parse(t)/100,transform:t=>vi.transform(t*100)},bb={...ta,transform:Math.round},qA={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,size:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,rotate:hs,rotateX:hs,rotateY:hs,rotateZ:hs,scale:yu,scaleX:yu,scaleY:yu,scaleZ:yu,skew:hs,skewX:hs,skewY:hs,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Cf,originX:wb,originY:wb,originZ:ye,zIndex:bb,fillOpacity:Cf,strokeOpacity:Cf,numOctaves:bb};function xg(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let f=!1,c=!1,u=!0;for(const d in e){const v=e[d];if(HA(d)){s[d]=v;continue}const g=qA[d],m=AP(v,g);if(kl.has(d)){if(f=!0,o[d]=m,a.push(d),!u)continue;v!==(g.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,l[d]=m):i[d]=m}if(e.transform||(f||n?i.transform=EP(t,r,u,n):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:v="50%",originZ:g=0}=l;i.transformOrigin=`${d} ${v} ${g}`}}const Cg=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function GA(t,e,r){for(const n in e)!Zr(e[n])&&!WA(n,r)&&(t[n]=e[n])}function TP({transformTemplate:t},e,r){return x.useMemo(()=>{const n=Cg();return xg(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function PP(t,e,r){const n=t.style||{},i={};return GA(i,n,t),Object.assign(i,TP(t,e,r)),t.transformValues?t.transformValues(i):i}function IP(t,e,r){const n={},i=PP(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const MP=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","viewport"]);function Vd(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||MP.has(t)}let KA=t=>!Vd(t);function NP(t){t&&(KA=e=>e.startsWith("on")?!Vd(e):t(e))}try{NP(require("@emotion/is-prop-valid").default)}catch{}function RP(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(KA(i)||r===!0&&Vd(i)||!e&&!Vd(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function xb(t,e,r){return typeof t=="string"?t:ye.transform(e+r*t)}function OP(t,e,r){const n=xb(e,t.x,t.width),i=xb(r,t.y,t.height);return`${n} ${i}`}const DP={offset:"stroke-dashoffset",array:"stroke-dasharray"},BP={offset:"strokeDashoffset",array:"strokeDasharray"};function LP(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?DP:BP;t[s.offset]=ye.transform(-n);const o=ye.transform(e),a=ye.transform(r);t[s.array]=`${o} ${a}`}function Eg(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...l},f,c,u){if(xg(t,l,f,u),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:v,dimensions:g}=t;d.transform&&(g&&(v.transform=d.transform),delete d.transform),g&&(n!==void 0||i!==void 0||v.transform)&&(v.transformOrigin=OP(g,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),s!==void 0&&LP(d,s,o,a,!1)}const JA=()=>({...Cg(),attrs:{}}),Ag=t=>typeof t=="string"&&t.toLowerCase()==="svg";function $P(t,e,r,n){const i=x.useMemo(()=>{const s=JA();return Eg(s,e,{enableHardwareAcceleration:!1},Ag(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};GA(s,t.style,t),i.style={...s,...i.style}}return i}function FP(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const f=(bg(r)?$P:IP)(n,o,a,r),u={...RP(n,typeof r=="string",t),...f,ref:s},{children:d}=n,v=x.useMemo(()=>Zr(d)?d.get():d,[d]);return i&&(u["data-projection-id"]=i),x.createElement(r,{...u,children:v})}}const Sg=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function QA(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const YA=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 XA(t,e,r,n){QA(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(YA.has(i)?i:Sg(i),e.attrs[i])}function kg(t,e){const{style:r}=t,n={};for(const i in r)(Zr(r[i])||e.style&&Zr(e.style[i])||WA(i,t))&&(n[i]=r[i]);return n}function ZA(t,e){const r=kg(t,e);for(const n in t)if(Zr(t[n])||Zr(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function _g(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const Wd=t=>Array.isArray(t),jP=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),zP=t=>Wd(t)?t[t.length-1]||0:t;function Ku(t){const e=Zr(t)?t.get():t;return jP(e)?e.toValue():e}function UP({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:VP(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const e6=t=>(e,r)=>{const n=x.useContext(Jh),i=x.useContext(Rc),s=()=>UP(t,e,n,i);return r?s():Zh(s)};function VP(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Ku(s[d]);let{initial:o,animate:a}=t;const l=Xh(t),f=UA(t);e&&f&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=r?r.initial===!1:!1;c=c||o===!1;const u=c?a:o;return u&&typeof u!="boolean"&&!Yh(u)&&(Array.isArray(u)?u:[u]).forEach(v=>{const g=_g(t,v);if(!g)return;const{transitionEnd:m,transition:M,...E}=g;for(const A in E){let S=E[A];if(Array.isArray(S)){const P=c?S.length-1:0;S=S[P]}S!==null&&(i[A]=S)}for(const A in m)i[A]=m[A]}),i}const WP={useVisualState:e6({scrapeMotionValuesFromProps:ZA,createRenderState:JA,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}}Eg(r,n,{enableHardwareAcceleration:!1},Ag(e.tagName),t.transformTemplate),XA(e,r)}})},HP={useVisualState:e6({scrapeMotionValuesFromProps:kg,createRenderState:Cg})};function qP(t,{forwardMotionProps:e=!1},r,n,i){return{...bg(t)?WP:HP,preloadedFeatures:r,useRender:FP(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var Ue;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(Ue||(Ue={}));function No(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function Hd(t,e,r,n){x.useEffect(()=>{const i=t.current;if(r&&i)return No(i,e,r,n)},[t,e,r,n])}function GP({whileFocus:t,visualElement:e}){const r=x.useRef(!1),{animationState:n}=e,i=x.useCallback(()=>{let o=!1;try{o=e.current.matches(":focus-visible")}catch{o=!0}!o||!n||(n.setActive(Ue.Focus,!0),r.current=!0)},[n]),s=x.useCallback(()=>{!r.current||!n||(n.setActive(Ue.Focus,!1),r.current=!1)},[n]);Hd(e,"focus",t?i:void 0),Hd(e,"blur",t?s:void 0)}const t6=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function e1(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const r6=t=>e=>t6(e)&&t(e,e1(e));function Ja(t,e,r,n){return No(t,e,r6(r),n)}function qd(t,e,r,n){return Hd(t,e,r&&r6(r),n)}function n6(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const Cb=n6("dragHorizontal"),Eb=n6("dragVertical");function i6(t){let e=!1;if(t==="y")e=Eb();else if(t==="x")e=Cb();else{const r=Cb(),n=Eb();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function s6(){const t=i6(!0);return t?(t(),!1):!0}function Ab(t,e,r,n){return(i,s)=>{i.type==="touch"||s6()||(r&&t.animationState&&t.animationState.setActive(Ue.Hover,e),n&&n(i,s))}}function KP({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){qd(n,"pointerenter",x.useMemo(()=>t||r?Ab(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),qd(n,"pointerleave",x.useMemo(()=>e||r?Ab(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const o6=(t,e)=>e?t===e?!0:o6(t,e.parentElement):!1;function Tg(t){return x.useEffect(()=>()=>t(),[])}const JP=(t,e)=>r=>e(t(r)),t1=(...t)=>t.reduce(JP);function wv(t,e){if(!e)return;const r=new PointerEvent("pointer"+t);e(r,e1(r))}function QP({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=x.useRef(!1),l=x.useRef(null),f={passive:!(e||t||r||s.onPointerDown)};function c(){l.current&&l.current(),l.current=null}function u(){return c(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(Ue.Tap,!1),!s6()}function d(A,S){var P,R,L,F;u()&&(o6(i.current,A.target)?(F=(L=i.getProps()).onTap)===null||F===void 0||F.call(L,A,S):(R=(P=i.getProps()).onTapCancel)===null||R===void 0||R.call(P,A,S))}function v(A,S){var P,R;u()&&((R=(P=i.getProps()).onTapCancel)===null||R===void 0||R.call(P,A,S))}function g(A,S){var P;const R=i.getProps();R.whileTap&&i.animationState&&i.animationState.setActive(Ue.Tap,!0),(P=R.onTapStart)===null||P===void 0||P.call(R,A,S)}const m=[Boolean(e),Boolean(t),Boolean(n),i],M=x.useCallback((A,S)=>{c(),!a.current&&(a.current=!0,l.current=t1(Ja(window,"pointerup",d,f),Ja(window,"pointercancel",v,f)),g(A,S))},m);qd(i,"pointerdown",o?M:void 0,f);const E=x.useCallback(()=>{const A=No(i.current,"keydown",P=>{P.key!=="Enter"||a.current||(a.current=!0,l.current=No(i.current,"keyup",()=>{P.key!=="Enter"||!u()||wv("up",i.getProps().onTap)},f),wv("down",g))}),S=No(i.current,"blur",()=>{A(),S(),a.current&&wv("cancel",v)})},m);Hd(i,"focus",o?E:void 0),Tg(c)}const ly=new WeakMap,bv=new WeakMap,YP=t=>{const e=ly.get(t.target);e&&e(t)},XP=t=>{t.forEach(YP)};function ZP({root:t,...e}){const r=t||document;bv.has(r)||bv.set(r,{});const n=bv.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(XP,{root:t,...e})),n[i]}function eI(t,e,r){const n=ZP(e);return ly.set(t,r),n.observe(t),()=>{ly.delete(t),n.unobserve(t)}}function tI({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=x.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?iI:nI)(o,s.current,t,i)}const rI={some:0,all:1};function nI(t,e,r,{root:n,margin:i,amount:s="some",once:o}){x.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:rI[s]},l=f=>{const{isIntersecting:c}=f;if(e.isInView===c||(e.isInView=c,o&&!c&&e.hasEnteredView))return;c&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(Ue.InView,c);const u=r.getProps(),d=c?u.onViewportEnter:u.onViewportLeave;d&&d(f)};return eI(r.current,a,l)},[t,n,i,s])}function iI(t,e,r,{fallback:n=!0}){x.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(Ue.InView,!0)})},[t])}const Cs=t=>e=>(t(e),null),sI={inView:Cs(tI),tap:Cs(QP),focus:Cs(GP),hover:Cs(KP)};function a6(){const t=x.useContext(Rc);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=x.useId();return x.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function l6(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),aI=t=>/^0[^.\s]+$/.test(t),ji={delta:0,timestamp:0},f6=1/60*1e3,lI=typeof performance<"u"?()=>performance.now():()=>Date.now(),c6=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(lI()),f6);function fI(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,c=!1)=>{const u=c&&i,d=u?e:r;return f&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&i&&(n=e.length)),l},cancel:l=>{const f=r.indexOf(l);f!==-1&&r.splice(f,1),o.delete(l)},process:l=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let f=0;f(t[e]=fI(()=>cc=!0),t),{}),kr=Bc.reduce((t,e)=>{const r=r1[e];return t[e]=(n,i=!1,s=!1)=>(cc||dI(),r.schedule(n,i,s)),t},{}),js=Bc.reduce((t,e)=>(t[e]=r1[e].cancel,t),{}),xv=Bc.reduce((t,e)=>(t[e]=()=>r1[e].process(ji),t),{}),uI=t=>r1[t].process(ji),u6=t=>{cc=!1,ji.delta=fy?f6:Math.max(Math.min(t-ji.timestamp,cI),1),ji.timestamp=t,cy=!0,Bc.forEach(uI),cy=!1,cc&&(fy=!1,c6(u6))},dI=()=>{cc=!0,fy=!0,cy||c6(u6)};function Pg(t,e){t.indexOf(e)===-1&&t.push(e)}function Ig(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class Mg{constructor(){this.subscriptions=[]}add(e){return Pg(this.subscriptions,e),()=>Ig(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class vI{constructor(e,r={}){this.version="9.0.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=ji;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,kr.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()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>kr.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=hI(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new Mg);const n=this.events[e].add(r);return e==="change"?()=>{n(),kr.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?Ng(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 ul(t,e){return new vI(t,e)}const Rg=(t,e)=>r=>Boolean(Oc(r)&&SP.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),d6=(t,e,r)=>n=>{if(!Oc(n))return n;const[i,s,o,a]=n.match(fc);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},yI=t=>cl(0,255,t),Cv={...ta,transform:t=>Math.round(yI(t))},_o={test:Rg("rgb","red"),parse:d6("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+Cv.transform(t)+", "+Cv.transform(e)+", "+Cv.transform(r)+", "+Ef(Cf.transform(n))+")"};function pI(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const uy={test:Rg("#"),parse:pI,transform:_o.transform},$a={test:Rg("hsl","hue"),parse:d6("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+vi.transform(Ef(e))+", "+vi.transform(Ef(r))+", "+Ef(Cf.transform(n))+")"},Rr={test:t=>_o.test(t)||uy.test(t)||$a.test(t),parse:t=>_o.test(t)?_o.parse(t):$a.test(t)?$a.parse(t):uy.parse(t),transform:t=>Oc(t)?t:t.hasOwnProperty("red")?_o.transform(t):$a.transform(t)},h6="${c}",v6="${n}";function gI(t){var e,r;return isNaN(t)&&Oc(t)&&(((e=t.match(fc))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(ay))===null||r===void 0?void 0:r.length)||0)>0}function Gd(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(ay);i&&(r=i.length,t=t.replace(ay,h6),e.push(...i.map(Rr.parse)));const s=t.match(fc);return s&&(n=s.length,t=t.replace(fc,v6),e.push(...s.map(ta.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function y6(t){return Gd(t).values}function p6(t){const{values:e,numColors:r,tokenised:n}=Gd(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function wI(t){const e=y6(t);return p6(t)(e.map(mI))}const zs={test:gI,parse:y6,createTransformer:p6,getAnimatableNone:wI},bI=new Set(["brightness","contrast","saturate","opacity"]);function xI(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(fc)||[];if(!n)return t;const i=r.replace(n,"");let s=bI.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const CI=/([a-z-]*)\(.*?\)/g,dy={...zs,getAnimatableNone:t=>{const e=t.match(CI);return e?e.map(xI).join(" "):t}},EI={...qA,color:Rr,backgroundColor:Rr,outlineColor:Rr,fill:Rr,stroke:Rr,borderColor:Rr,borderTopColor:Rr,borderRightColor:Rr,borderBottomColor:Rr,borderLeftColor:Rr,filter:dy,WebkitFilter:dy},Og=t=>EI[t];function Dg(t,e){var r;let n=Og(t);return n!==dy&&(n=zs),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const g6=t=>e=>e.test(t),AI={test:t=>t==="auto",parse:t=>t},m6=[ta,ye,vi,hs,_P,kP,AI],Ql=t=>m6.find(g6(t)),SI=[...m6,Rr,zs],kI=t=>SI.find(g6(t));function _I(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function TI(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function n1(t,e,r){const n=t.getProps();return _g(n,e,r!==void 0?r:n.custom,_I(t),TI(t))}function PI(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,ul(r))}function II(t,e){const r=n1(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=zP(s[o]);PI(t,o,a)}}function MI(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,LI={current:!1},Bg=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Lg=t=>e=>1-t(1-e),$g=t=>t*t,$I=Lg($g),Fg=Bg($g),jt=(t,e,r)=>-r*t+r*e+t;function Ev(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 FI({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;i=Ev(l,a,t+1/3),s=Ev(l,a,t),o=Ev(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const Av=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},jI=[uy,_o,$a],zI=t=>jI.find(e=>e.test(t));function Sb(t){const e=zI(t);let r=e.parse(t);return e===$a&&(r=FI(r)),r}const w6=(t,e)=>{const r=Sb(t),n=Sb(e),i={...r};return s=>(i.red=Av(r.red,n.red,s),i.green=Av(r.green,n.green,s),i.blue=Av(r.blue,n.blue,s),i.alpha=jt(r.alpha,n.alpha,s),_o.transform(i))};function b6(t,e){return typeof t=="number"?r=>jt(t,e,r):Rr.test(t)?w6(t,e):C6(t,e)}const x6=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>b6(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=b6(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},C6=(t,e)=>{const r=zs.createTransformer(e),n=Gd(t),i=Gd(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?t1(x6(n.values,i.values),r):o=>`${o>0?e:t}`},Qd=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},kb=(t,e)=>r=>jt(t,e,r);function VI(t){return typeof t=="number"?kb:typeof t=="string"?Rr.test(t)?w6:C6:Array.isArray(t)?x6:typeof t=="object"?UI:kb}function WI(t,e,r){const n=[],i=r||VI(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=WI(e,n,i),a=o.length,l=f=>{let c=0;if(a>1)for(;cl(cl(t[0],t[s-1],f)):l}const jg=t=>t,A6=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,HI=1e-7,qI=12;function GI(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=A6(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>HI&&++aGI(s,0,1,t,r);return s=>s===0||s===1?s:A6(i(s),e,n)}const k6=t=>1-Math.sin(Math.acos(t)),zg=Lg(k6),KI=Bg(zg),_6=S6(.33,1.53,.69,.99),Ug=Lg(_6),JI=Bg(Ug),QI=t=>(t*=2)<1?.5*Ug(t):.5*(2-Math.pow(2,-10*(t-1))),YI={linear:jg,easeIn:$g,easeInOut:Fg,easeOut:$I,circIn:k6,circInOut:KI,circOut:zg,backIn:Ug,backInOut:JI,backOut:_6,anticipate:QI},_b=t=>{if(Array.isArray(t)){Jd(t.length===4);const[e,r,n,i]=t;return S6(e,r,n,i)}else if(typeof t=="string")return YI[t];return t},XI=t=>Array.isArray(t)&&typeof t[0]!="number";function ZI(t,e){return t.map(()=>e||Fg).splice(0,t.length-1)}function eM(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function tM(t,e){return t.map(r=>r*e)}function hy({keyframes:t,ease:e=Fg,times:r,duration:n=300}){t=[...t];const i=XI(e)?e.map(_b):_b(e),s={done:!1,value:t[0]},o=tM(r&&r.length===t.length?r:eM(t),n);function a(){return E6(o,t,{ease:Array.isArray(i)?i:ZI(t,i)})}let l=a();return{next:f=>(s.value=l(f),s.done=f>=n,s),flipTarget:()=>{t.reverse(),l=a()}}}const Sv=.001,rM=.01,Tb=10,nM=.05,iM=1;function sM({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;BI(t<=Tb*1e3);let o=1-e;o=cl(nM,iM,o),t=cl(rM,Tb,t/1e3),o<1?(i=f=>{const c=f*o,u=c*t,d=c-r,v=vy(f,o),g=Math.exp(-u);return Sv-d/v*g},s=f=>{const u=f*o*t,d=u*r+r,v=Math.pow(o,2)*Math.pow(f,2)*t,g=Math.exp(-u),m=vy(Math.pow(f,2),o);return(-i(f)+Sv>0?-1:1)*((d-v)*g)/m}):(i=f=>{const c=Math.exp(-f*t),u=(f-r)*t+1;return-Sv+c*u},s=f=>{const c=Math.exp(-f*t),u=(r-f)*(t*t);return c*u});const a=5/t,l=aM(i,s,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const f=Math.pow(l,2)*n;return{stiffness:f,damping:o*2*Math.sqrt(n*f),duration:t}}}const oM=12;function aM(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function cM(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Pb(t,fM)&&Pb(t,lM)){const r=sM(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const uM=5;function T6({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:l,mass:f,velocity:c,duration:u,isResolvedFromDuration:d}=cM(n);let v=dM,g=c?-(c/1e3):0;const m=l/(2*Math.sqrt(a*f));function M(){const E=s-i,A=Math.sqrt(a/f)/1e3,S=Math.abs(E)<5;if(r||(r=S?.01:2),e||(e=S?.005:.5),m<1){const P=vy(A,m);v=R=>{const L=Math.exp(-m*A*R);return s-L*((g+m*A*E)/P*Math.sin(P*R)+E*Math.cos(P*R))}}else if(m===1)v=P=>s-Math.exp(-A*P)*(E+(g+A*E)*P);else{const P=A*Math.sqrt(m*m-1);v=R=>{const L=Math.exp(-m*A*R),F=Math.min(P*R,300);return s-L*((g+m*A*E)*Math.sinh(F)+P*E*Math.cosh(F))/P}}}return M(),{next:E=>{const A=v(E);if(d)o.done=E>=u;else{let S=g;if(E!==0)if(m<1){const L=Math.max(0,E-uM);S=Ng(A-v(L),E-L)}else S=0;const P=Math.abs(S)<=r,R=Math.abs(s-A)<=e;o.done=P&&R}return o.value=o.done?s:A,o},flipTarget:()=>{g=-g,[i,s]=[s,i],M()}}}T6.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const dM=t=>0;function hM({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let l=r*e;const f=o+l,c=s===void 0?f:s(f);return c!==f&&(l=c-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>i||d<-i),a.value=a.done?c:c+d,a},flipTarget:()=>{}}}const vM={decay:hM,keyframes:hy,tween:hy,spring:T6};function P6(t,e,r=0){return t-e-r}function yM(t,e=0,r=0,n=!0){return n?P6(e+-t,e,r):e-(t-e)+r}function pM(t,e,r,n){return n?t>=e+r:t<=-r}const gM=t=>{const e=({delta:r})=>t(r);return{start:()=>kr.update(e,!0),stop:()=>js.update(e)}};function Yd({duration:t,driver:e=gM,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:f,onComplete:c,onRepeat:u,onUpdate:d,type:v="keyframes",...g}){var m,M;const E=r;let A,S=0,P=t,R=!1,L=!0,F;const z=vM[o.length>2?"keyframes":v]||hy,H=o[0],q=o[o.length-1];let K={done:!1,value:H};!((M=(m=z).needsInterpolation)===null||M===void 0)&&M.call(m,H,q)&&(F=E6([0,100],[H,q],{clamp:!1}),o=[0,100]);const ne=z({...g,duration:t,keyframes:o});function O(){S++,i==="reverse"?(L=S%2===0,r=yM(r,P,s,L)):(r=P6(r,P,s),i==="mirror"&&ne.flipTarget()),R=!1,u&&u()}function y(){A&&A.stop(),c&&c()}function w(N){L||(N=-N),r+=N,R||(K=ne.next(Math.max(0,r)),F&&(K.value=F(K.value)),R=L?K.done:r<=0),d&&d(K.value),R&&(S===0&&(P=P!==void 0?P:r),S{f&&f(),A&&A.stop()},set currentTime(N){r=E,w(N)},sample:N=>{r=E;const p=t&&typeof t=="number"?Math.max(t*.5,50):50;let k=0;for(w(0);k<=N;){const I=N-k;w(Math.min(I,p)),k+=p}return K}}}function mM(t){return!t||Array.isArray(t)||typeof t=="string"&&I6[t]}const ff=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,I6={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ff([0,.65,.55,1]),circOut:ff([.55,0,1,.45]),backIn:ff([.31,.01,.66,-.59]),backOut:ff([.33,1.53,.69,.99])};function wM(t){if(t)return Array.isArray(t)?ff(t):I6[t]}function bM(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:i,easing:wM(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Ib={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},kv={},M6={};for(const t in Ib)M6[t]=()=>(kv[t]===void 0&&(kv[t]=Ib[t]()),kv[t]);function xM(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const CM=new Set(["opacity"]),pu=10;function EM(t,e,{onUpdate:r,onComplete:n,...i}){if(!(M6.waapi()&&CM.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:f}=i;if(i.type==="spring"||!mM(i.ease)){if(i.repeat===1/0)return;const u=Yd({...i,elapsed:0});let d={done:!1,value:o[0]};const v=[];let g=0;for(;!d.done&&g<2e4;)d=u.sample(g),v.push(d.value),g+=pu;o=v,a=g-pu,f="linear"}const c=bM(t.owner.current,e,o,{...i,delay:-l,duration:a,ease:f});return c.onfinish=()=>{t.set(xM(o,i)),kr.update(()=>c.cancel()),n&&n()},{get currentTime(){return c.currentTime||0},set currentTime(u){c.currentTime=u},stop:()=>{const{currentTime:u}=c;if(u){const d=Yd({...i,autoplay:!1});t.setWithVelocity(d.sample(u-pu).value,d.sample(u).value,pu)}kr.update(()=>c.cancel())}}}function N6(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(js.read(n),t(s-e))};return kr.read(n,!0),()=>js.read(n)}function AM({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:N6(i,-e)}:i()}function SM({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:f,driver:c,onUpdate:u,onComplete:d,onStop:v}){const g=t[0];let m;function M(P){return r!==void 0&&Pn}function E(P){return r===void 0?n:n===void 0||Math.abs(r-P){var L;u==null||u(R),(L=P.onUpdate)===null||L===void 0||L.call(P,R)},onComplete:d,onStop:v})}function S(P){A({type:"spring",stiffness:o,damping:a,restDelta:l,...P})}if(M(g))S({velocity:e,keyframes:[g,E(g)]});else{let P=i*e+g;typeof f<"u"&&(P=f(P));const R=E(P),L=R===r?-1:1;let F,z;const H=q=>{F=z,z=q,e=Ng(q-F,ji.delta),(L===1&&q>R||L===-1&&qm==null?void 0:m.stop()}}const uo=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),gu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_v=()=>({type:"keyframes",ease:"linear",duration:.3}),kM={type:"keyframes",duration:.8},Mb={x:uo,y:uo,z:uo,rotate:uo,rotateX:uo,rotateY:uo,rotateZ:uo,scaleX:gu,scaleY:gu,scale:gu,opacity:_v,backgroundColor:_v,color:_v,default:gu},_M=(t,{keyframes:e})=>e.length>2?kM:(Mb[t]||Mb.default)(e[1]),yy=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&zs.test(e)&&!e.startsWith("url("));function TM({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}function Nb(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function Rb(t){return typeof t=="number"?0:Dg("",t)}function R6(t,e){return t[e]||t.default||t}function PM(t,e,r,n){const i=yy(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=Dg(e,r):Nb(s)&&typeof r=="string"?s=Rb(r):!Array.isArray(r)&&Nb(r)&&typeof s=="string"&&(r=Rb(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const Vg=(t,e,r,n={})=>i=>{const s=R6(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Ju(o);const l=PM(e,t,r,s),f=l[0],c=l[l.length-1],u=yy(t,f),d=yy(t,c);let v={keyframes:l,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:M=>{e.set(M),s.onUpdate&&s.onUpdate(M)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!u||!d||LI.current||s.type===!1)return AM(v);if(s.type==="inertia")return SM(v);TM(s)||(v={...v,..._M(t,v)}),v.duration&&(v.duration=Ju(v.duration)),v.repeatDelay&&(v.repeatDelay=Ju(v.repeatDelay));const g=e.owner,m=g&&g.current;if(g&&m instanceof HTMLElement&&!(g!=null&&g.getProps().onUpdate)){const M=EM(e,t,v);if(M)return M}return Yd(v)};function IM(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>py(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=py(t,e,r);else{const i=typeof e=="function"?n1(t,e,r.custom):e;n=O6(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function py(t,e,r={}){var n;const i=n1(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>O6(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=s;return MM(t,e,c+f,u,d,r)}:()=>Promise.resolve(),{when:l}=s;if(l){const[f,c]=l==="beforeChildren"?[o,a]:[a,o];return f().then(c)}else return Promise.all([o(),a(r.delay)])}function O6(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const f=t.getValue("willChange");n&&(o=n);const c=[],u=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const d in l){const v=t.getValue(d),g=l[d];if(!v||g===void 0||u&&RM(u,d))continue;const m={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!v.hasAnimated){const E=t.getProps()[DI];E&&(m.elapsed=window.HandoffAppearAnimations(E,d,v,kr))}let M=v.start(Vg(d,v,g,t.shouldReduceMotion&&kl.has(d)?{type:!1}:m));Kd(f)&&(f.add(d),M=M.then(()=>f.remove(d))),c.push(M)}return Promise.all(c).then(()=>{a&&II(t,a)})}function MM(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,l=i===1?(f=0)=>f*n:(f=0)=>a-f*n;return Array.from(t.variantChildren).sort(NM).forEach((f,c)=>{f.notify("AnimationStart",e),o.push(py(f,e,{...s,delay:r+l(c)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function NM(t,e){return t.sortNodePosition(e)}function RM({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const Wg=[Ue.Animate,Ue.InView,Ue.Focus,Ue.Hover,Ue.Tap,Ue.Drag,Ue.Exit],OM=[...Wg].reverse(),DM=Wg.length;function BM(t){return e=>Promise.all(e.map(({animation:r,options:n})=>IM(t,r,n)))}function LM(t){let e=BM(t);const r=FM();let n=!0;const i=(l,f)=>{const c=n1(t,f);if(c){const{transition:u,transitionEnd:d,...v}=c;l={...l,...v,...d}}return l};function s(l){e=l(t)}function o(l,f){const c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],v=new Set;let g={},m=1/0;for(let E=0;Em&&R;const q=Array.isArray(P)?P:[P];let K=q.reduce(i,{});L===!1&&(K={});const{prevResolvedValues:ne={}}=S,O={...ne,...K},y=w=>{H=!0,v.delete(w),S.needsAnimating[w]=!0};for(const w in O){const T=K[w],N=ne[w];g.hasOwnProperty(w)||(T!==N?Wd(T)&&Wd(N)?!l6(T,N)||z?y(w):S.protectedKeys[w]=!0:T!==void 0?y(w):v.add(w):T!==void 0&&v.has(w)?y(w):S.protectedKeys[w]=!0)}S.prevProp=P,S.prevResolvedValues=K,S.isActive&&(g={...g,...K}),n&&t.blockInitialAnimation&&(H=!1),H&&!F&&d.push(...q.map(w=>({animation:w,options:{type:A,...l}})))}if(v.size){const E={};v.forEach(A=>{const S=t.getBaseTarget(A);S!==void 0&&(E[A]=S)}),d.push({animation:E})}let M=Boolean(d.length);return n&&c.initial===!1&&!t.manuallyAnimateOnMount&&(M=!1),n=!1,M?e(d):Promise.resolve()}function a(l,f,c){var u;if(r[l].isActive===f)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(v=>{var g;return(g=v.animationState)===null||g===void 0?void 0:g.setActive(l,f)}),r[l].isActive=f;const d=o(c,l);for(const v in r)r[v].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function $M(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!l6(e,t):!1}function ho(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function FM(){return{[Ue.Animate]:ho(!0),[Ue.InView]:ho(),[Ue.Hover]:ho(),[Ue.Tap]:ho(),[Ue.Drag]:ho(),[Ue.Focus]:ho(),[Ue.Exit]:ho()}}const jM={animation:Cs(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=LM(t)),Yh(e)&&x.useEffect(()=>e.subscribe(t),[e])}),exit:Cs(t=>{const{custom:e,visualElement:r}=t,[n,i]=a6(),s=x.useContext(Rc);x.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(Ue.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},Ob=(t,e)=>Math.abs(t-e);function zM(t,e){const r=Ob(t.x,e.x),n=Ob(t.y,e.y);return Math.sqrt(r**2+n**2)}class D6{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 f=Pv(this.lastMoveEventInfo,this.history),c=this.startEvent!==null,u=zM(f.offset,{x:0,y:0})>=3;if(!c&&!u)return;const{point:d}=f,{timestamp:v}=ji;this.history.push({...d,timestamp:v});const{onStart:g,onMove:m}=this.handlers;c||(g&&g(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,c)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Tv(c,this.transformPagePoint),kr.update(this.updatePoint,!0)},this.handlePointerUp=(f,c)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,v=Pv(f.type==="pointercancel"?this.lastMoveEventInfo:Tv(c,this.transformPagePoint),this.history);this.startEvent&&u&&u(f,v),d&&d(f,v)},!t6(e))return;this.handlers=r,this.transformPagePoint=n;const i=e1(e),s=Tv(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=ji;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,Pv(s,this.history)),this.removeListeners=t1(Ja(window,"pointermove",this.handlePointerMove),Ja(window,"pointerup",this.handlePointerUp),Ja(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),js.update(this.updatePoint)}}function Tv(t,e){return e?{point:e(t.point)}:t}function Db(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pv({point:t},e){return{point:t,delta:Db(t,B6(e)),offset:Db(t,UM(e)),velocity:VM(e,.1)}}function UM(t){return t[0]}function B6(t){return t[t.length-1]}function VM(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=B6(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>Ju(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function dn(t){return t.max-t.min}function gy(t,e=0,r=.01){return Math.abs(t-e)<=r}function Bb(t,e,r,n=.5){t.origin=n,t.originPoint=jt(e.min,e.max,t.origin),t.scale=dn(r)/dn(e),(gy(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=jt(r.min,r.max,t.origin)-t.originPoint,(gy(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Af(t,e,r,n){Bb(t.x,e.x,r.x,n==null?void 0:n.originX),Bb(t.y,e.y,r.y,n==null?void 0:n.originY)}function Lb(t,e,r){t.min=r.min+e.min,t.max=t.min+dn(e)}function WM(t,e,r){Lb(t.x,e.x,r.x),Lb(t.y,e.y,r.y)}function $b(t,e,r){t.min=e.min-r.min,t.max=t.min+dn(e)}function Sf(t,e,r){$b(t.x,e.x,r.x),$b(t.y,e.y,r.y)}function HM(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?jt(r,t,n.max):Math.min(t,r)),t}function Fb(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 qM(t,{top:e,left:r,bottom:n,right:i}){return{x:Fb(t.x,r,i),y:Fb(t.y,e,n)}}function jb(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Qd(e.min,e.max-n,t.min):n>i&&(r=Qd(t.min,t.max-i,e.min)),cl(0,1,r)}function JM(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 my=.35;function QM(t=my){return t===!1?t=0:t===!0&&(t=my),{x:zb(t,"left","right"),y:zb(t,"top","bottom")}}function zb(t,e,r){return{min:Ub(t,e),max:Ub(t,r)}}function Ub(t,e){return typeof t=="number"?t:t[e]||0}const Vb=()=>({translate:0,scale:1,origin:0,originPoint:0}),kf=()=>({x:Vb(),y:Vb()}),Wb=()=>({min:0,max:0}),Zt=()=>({x:Wb(),y:Wb()});function ii(t){return[t("x"),t("y")]}function L6({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function YM({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function XM(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 Iv(t){return t===void 0||t===1}function wy({scale:t,scaleX:e,scaleY:r}){return!Iv(t)||!Iv(e)||!Iv(r)}function go(t){return wy(t)||$6(t)||t.z||t.rotate||t.rotateX||t.rotateY}function $6(t){return Hb(t.x)||Hb(t.y)}function Hb(t){return t&&t!=="0%"}function Xd(t,e,r){const n=t-r,i=e*n;return r+i}function qb(t,e,r,n,i){return i!==void 0&&(t=Xd(t,i,n)),Xd(t,r,n)+e}function by(t,e=0,r=1,n,i){t.min=qb(t.min,e,r,n,i),t.max=qb(t.max,e,r,n,i)}function F6(t,{x:e,y:r}){by(t.x,e.translate,e.scale,e.originPoint),by(t.y,r.translate,r.scale,r.originPoint)}function ZM(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let f=0;f1.0000000000001||t<.999999999999?t:1}function gs(t,e){t.min=t.min+e,t.max=t.max+e}function Kb(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=jt(t.min,t.max,s);by(t,e[r],e[n],o,e.scale)}const eN=["x","scaleX","originX"],tN=["y","scaleY","originY"];function Fa(t,e){Kb(t.x,e,eN),Kb(t.y,e,tN)}function j6(t,e){return L6(XM(t.getBoundingClientRect(),e))}function rN(t,e,r){const n=j6(t,r),{scroll:i}=e;return i&&(gs(n.x,i.offset.x),gs(n.y,i.offset.y)),n}const nN=new WeakMap;class iN{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=Zt(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(e1(a,"page").point)},i=(a,l)=>{var f;const{drag:c,dragPropagation:u,onDragStart:d}=this.getProps();c&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=i6(c),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ii(v=>{var g,m;let M=this.getAxisMotionValue(v).get()||0;if(vi.test(M)){const E=(m=(g=this.visualElement.projection)===null||g===void 0?void 0:g.layout)===null||m===void 0?void 0:m.layoutBox[v];E&&(M=dn(E)*(parseFloat(M)/100))}this.originPoint[v]=M}),d==null||d(a,l),(f=this.visualElement.animationState)===null||f===void 0||f.setActive(Ue.Drag,!0))},s=(a,l)=>{const{dragPropagation:f,dragDirectionLock:c,onDirectionLock:u,onDrag:d}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:v}=l;if(c&&this.currentDirection===null){this.currentDirection=sN(v),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new D6(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(Ue.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!mu(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=HM(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&La(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=qM(n.layoutBox,e):this.constraints=!1,this.elastic=QM(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ii(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=JM(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!La(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=rN(n,i.root,this.visualElement.getTransformPagePoint());let o=GM(i.layout.layoutBox,s);if(r){const a=r(YM(o));this.hasMutatedConstraints=!!a,a&&(o=L6(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=ii(c=>{if(!mu(c,r,this.currentDirection))return;let u=(l==null?void 0:l[c])||{};o&&(u={min:0,max:0});const d=i?200:1e6,v=i?40:1e7,g={type:"inertia",velocity:n?e[c]:0,bounceStiffness:d,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...u};return this.startAxisValueAnimation(c,g)});return Promise.all(f).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(Vg(e,n,0,r))}stopAnimation(){ii(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ii(r=>{const{drag:n}=this.getProps();if(!mu(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-jt(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!La(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ii(a=>{const l=this.getAxisMotionValue(a);if(l){const f=l.get();s[a]=KM({min:f,max:f},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),ii(a=>{if(!mu(a,r,null))return;const l=this.getAxisMotionValue(a),{min:f,max:c}=this.constraints[a];l.set(jt(f,c,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;nN.set(this.visualElement,this);const r=this.visualElement.current,n=Ja(r,"pointerdown",f=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(f)}),i=()=>{const{dragConstraints:f}=this.getProps();La(f)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=No(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:f,hasLayoutChanged:c})=>{this.isDragging&&c&&(ii(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=f[u].translate,d.set(d.get()+f[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=my,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function mu(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function sN(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function oN(t){const{dragControls:e,visualElement:r}=t,n=Zh(()=>new iN(r));x.useEffect(()=>e&&e.subscribe(n),[n,e]),x.useEffect(()=>n.addListeners(),[n])}function aN({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=x.useRef(null),{transformPagePoint:a}=x.useContext(mg),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(c,u)=>{o.current=null,r&&r(c,u)}};x.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function f(c){o.current=new D6(c,l,{transformPagePoint:a})}qd(i,"pointerdown",s&&f),Tg(()=>o.current&&o.current.end())}const lN={pan:Cs(aN),drag:Cs(oN)};function xy(t){return typeof t=="string"&&t.startsWith("var(--")}const z6=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function fN(t){const e=z6.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Cy(t,e,r=1){const[n,i]=fN(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():xy(i)?Cy(i,e,r+1):i}function cN(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!xy(s))return;const o=Cy(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!xy(s))continue;const o=Cy(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const uN=new Set(["width","height","top","left","right","bottom","x","y"]),U6=t=>uN.has(t),dN=t=>Object.keys(t).some(U6),Jb=t=>t===ta||t===ye;var Qb;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(Qb||(Qb={}));const Yb=(t,e)=>parseFloat(t.split(", ")[e]),Xb=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return Yb(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?Yb(s[1],t):0}},hN=new Set(["x","y","z"]),vN=Ud.filter(t=>!hN.has(t));function yN(t){const e=[];return vN.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 Zb={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:Xb(4,13),y:Xb(5,14)},pN=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(f=>{a[f]=Zb[f](n,s)}),e.render();const l=e.measureViewportBox();return r.forEach(f=>{const c=e.getValue(f);c&&c.jump(a[f]),t[f]=Zb[f](l,s)}),t},gN=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(U6);let s=[],o=!1;const a=[];if(i.forEach(l=>{const f=t.getValue(l);if(!t.hasValue(l))return;let c=r[l],u=Ql(c);const d=e[l];let v;if(Wd(d)){const g=d.length,m=d[0]===null?1:0;c=d[m],u=Ql(c);for(let M=m;M=0?window.pageYOffset:null,f=pN(e,t,a);return s.length&&s.forEach(([c,u])=>{t.getValue(c).set(u)}),t.render(),Qh&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:n}}else return{target:e,transitionEnd:n}};function mN(t,e,r,n){return dN(e)?gN(t,e,r,n):{target:e,transitionEnd:n}}const wN=(t,e,r,n)=>{const i=cN(t,e,n);return e=i.target,n=i.transitionEnd,mN(t,e,r,n)},Ey={current:null},V6={current:!1};function bN(){if(V6.current=!0,!!Qh)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ey.current=t.matches;t.addListener(e),e()}else Ey.current=!1}function xN(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(Zr(s))t.addValue(i,s),Kd(n)&&n.add(i);else if(Zr(o))t.addValue(i,ul(s,{owner:t})),Kd(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,ul(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const W6=Object.keys(lc),CN=W6.length,e2=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class EN{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>kr.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Xh(r),this.isVariantNode=UA(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(r,{});for(const c in f){const u=f[c];o[c]!==void 0&&Zr(u)&&(u.set(o[c],!1),Kd(l)&&l.add(c))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),V6.current||bN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ey.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),js.update(this.notifyUpdate),js.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=kl.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&kr.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const l=[];for(let f=0;fthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:v,layoutRoot:g})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Zt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.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){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||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=ul(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,i=typeof n=="string"||typeof n=="object"?(r=_g(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Zr(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new Mg),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const H6=["initial",...Wg],AN=H6.length;class q6 extends EN{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=RI(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){MI(this,n,o);const a=wN(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function SN(t){return window.getComputedStyle(t)}class kN extends q6{readValueFromInstance(e,r){if(kl.has(r)){const n=Og(r);return n&&n.default||0}else{const n=SN(e),i=(HA(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return j6(e,r)}build(e,r,n,i){xg(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return kg(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zr(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){QA(e,r,n,i)}}class _N extends q6{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return kl.has(r)?((n=Og(r))===null||n===void 0?void 0:n.default)||0:(r=YA.has(r)?r:Sg(r),e.getAttribute(r))}measureInstanceViewportBox(){return Zt()}scrapeMotionValuesFromProps(e,r){return ZA(e,r)}build(e,r,n,i){Eg(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){XA(e,r,n,i)}mount(e){this.isSVGTag=Ag(e.tagName),super.mount(e)}}const TN=(t,e)=>bg(t)?new _N(e,{enableHardwareAcceleration:!1}):new kN(e,{enableHardwareAcceleration:!0});function t2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Yl={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const r=t2(t,e.target.x),n=t2(t,e.target.y);return`${r}% ${n}%`}},r2="_$css",PN={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(z6,v=>(s.push(v),r2)));const o=zs.parse(t);if(o.length>5)return n;const a=zs.createTransformer(t),l=typeof o[0]!="number"?1:0,f=r.x.scale*e.x,c=r.y.scale*e.y;o[0+l]/=f,o[1+l]/=c;const u=jt(f,c,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(i){let v=0;d=d.replace(r2,()=>{const g=s[v];return v++,g})}return d}};class IN extends Wt.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;bP(NN),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),xf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||kr.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&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:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function MN(t){const[e,r]=a6(),n=x.useContext(wg);return Wt.createElement(IN,{...t,layoutGroup:n,switchLayoutGroup:x.useContext(VA),isPresent:e,safeToRemove:r})}const NN={borderRadius:{...Yl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yl,borderTopRightRadius:Yl,borderBottomLeftRadius:Yl,borderBottomRightRadius:Yl,boxShadow:PN},RN={measureLayout:MN};function ON(t,e,r={}){const n=Zr(t)?t:ul(t);return n.start(Vg("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const G6=["TopLeft","TopRight","BottomLeft","BottomRight"],DN=G6.length,n2=t=>typeof t=="string"?parseFloat(t):t,i2=t=>typeof t=="number"||ye.test(t);function BN(t,e,r,n,i,s){i?(t.opacity=jt(0,r.opacity!==void 0?r.opacity:1,LN(n)),t.opacityExit=jt(e.opacity!==void 0?e.opacity:1,0,$N(n))):s&&(t.opacity=jt(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Qd(t,e,n))}function o2(t,e){t.min=e.min,t.max=e.max}function Rn(t,e){o2(t.x,e.x),o2(t.y,e.y)}function a2(t,e,r,n,i){return t-=e,t=Xd(t,1/r,n),i!==void 0&&(t=Xd(t,1/i,n)),t}function FN(t,e=0,r=1,n=.5,i,s=t,o=t){if(vi.test(e)&&(e=parseFloat(e),e=jt(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=jt(s.min,s.max,n);t===s&&(a-=e),t.min=a2(t.min,e,r,a,i),t.max=a2(t.max,e,r,a,i)}function l2(t,e,[r,n,i],s,o){FN(t,e[r],e[n],e[i],e.scale,s,o)}const jN=["x","scaleX","originX"],zN=["y","scaleY","originY"];function f2(t,e,r,n){l2(t.x,e,jN,r==null?void 0:r.x,n==null?void 0:n.x),l2(t.y,e,zN,r==null?void 0:r.y,n==null?void 0:n.y)}function c2(t){return t.translate===0&&t.scale===1}function J6(t){return c2(t.x)&&c2(t.y)}function Q6(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 u2(t){return dn(t.x)/dn(t.y)}class UN{constructor(){this.members=[]}add(e){Pg(this.members,e),e.scheduleRender()}remove(e){if(Ig(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(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function d2(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:f,rotateY:c}=r;l&&(n+=`rotate(${l}deg) `),f&&(n+=`rotateX(${f}deg) `),c&&(n+=`rotateY(${c}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 VN=(t,e)=>t.depth-e.depth;class WN{constructor(){this.children=[],this.isDirty=!1}add(e){Pg(this.children,e),this.isDirty=!0}remove(e){Ig(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(VN),this.isDirty=!1,this.children.forEach(e)}}const h2=["","X","Y","Z"],v2=1e3;let HN=0;function Y6({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=HN++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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=()=>{this.nodes.forEach(KN),this.nodes.forEach(YN),this.nodes.forEach(XN)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=N6(v,250),xf.hasAnimatedSinceResize&&(xf.hasAnimatedSinceResize=!1,this.nodes.forEach(p2))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&u&&(f||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:v,hasRelativeTargetChanged:g,layout:m})=>{var M,E,A,S,P;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(E=(M=this.options.transition)!==null&&M!==void 0?M:u.getDefaultTransition())!==null&&E!==void 0?E:nR,{onLayoutAnimationStart:L,onLayoutAnimationComplete:F}=u.getProps(),z=!this.targetLayout||!Q6(this.targetLayout,m)||g,H=!v&&g;if(this.options.layoutRoot||!((A=this.resumeFrom)===null||A===void 0)&&A.instance||H||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,H);const q={...R6(R,"layout"),onPlay:L,onComplete:F};(u.shouldReduceMotion||this.options.layoutRoot)&&(q.delay=0,q.type=!1),this.startAnimation(q)}else!v&&this.animationProgress===0&&p2(this),this.isLead()&&((P=(S=this.options).onExitComplete)===null||P===void 0||P.call(S));this.targetLayout=m})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,js.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(ZN),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,f;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{var S;const P=A/1e3;g2(v.x,o.x,P),g2(v.y,o.y,P),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((S=this.relativeParent)===null||S===void 0)&&S.layout)&&(Sf(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tR(this.relativeTarget,this.relativeTargetOrigin,g,P)),m&&(this.animationValues=d,BN(d,u,this.latestValues,P,E,M)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(js.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kr.update(()=>{xf.hasAnimatedSinceResize=!0,this.currentAnimation=ON(0,v2,{...o,onUpdate:f=>{var c;this.mixTargetDelta(f),(c=o.onUpdate)===null||c===void 0||c.call(o,f)},onComplete:()=>{var f;(f=o.onComplete)===null||f===void 0||f.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,v2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&X6(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Zt();const u=dn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=dn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Rn(a,l),Fa(a,c),Af(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){var l,f,c;this.sharedNodes.has(o)||this.sharedNodes.set(o,new UN),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(c=(f=a.options.initialPromotionConfig)===null||f===void 0?void 0:f.shouldPreserveFollowOpacity)===null||c===void 0?void 0:c.call(f,a)})}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:l}={}){const f=this.getStack();f&&f.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(y2),this.root.sharedNodes.clear()}}}function qN(t){t.updateLayout()}function GN(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,l=i.source!==t.layout.source;a==="size"?ii(v=>{const g=l?i.measuredBox[v]:i.layoutBox[v],m=dn(g);g.min=s[v].min,g.max=g.min+m}):X6(a,i.layoutBox,s)&&ii(v=>{const g=l?i.measuredBox[v]:i.layoutBox[v],m=dn(s[v]);g.max=g.min+m});const f=kf();Af(f,s,i.layoutBox);const c=kf();l?Af(c,t.applyTransform(o,!0),i.measuredBox):Af(c,s,i.layoutBox);const u=!J6(f);let d=!1;if(!t.resumeFrom){const v=t.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:g,layout:m}=v;if(g&&m){const M=Zt();Sf(M,i.layoutBox,g.layoutBox);const E=Zt();Sf(E,s,m.layoutBox),Q6(M,E)||(d=!0),v.options.layoutRoot&&(t.relativeTarget=E,t.relativeTargetOrigin=M,t.relativeParent=v)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:f,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function KN(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function JN(t){t.clearSnapshot()}function y2(t){t.clearMeasurements()}function QN(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function p2(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function YN(t){t.resolveTargetDelta()}function XN(t){t.calcProjection()}function ZN(t){t.resetRotation()}function eR(t){t.removeLeadSnapshot()}function g2(t,e,r){t.translate=jt(e.translate,0,r),t.scale=jt(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function m2(t,e,r,n){t.min=jt(e.min,r.min,n),t.max=jt(e.max,r.max,n)}function tR(t,e,r,n){m2(t.x,e.x,r.x,n),m2(t.y,e.y,r.y,n)}function rR(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const nR={duration:.45,ease:[.4,0,.1,1]};function iR(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(Boolean(t.path[s].instance)){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function w2(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function sR(t){w2(t.x),w2(t.y)}function X6(t,e,r){return t==="position"||t==="preserve-aspect"&&!gy(u2(e),u2(r),.2)}const oR=Y6({attachResizeListener:(t,e)=>No(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Mv={current:void 0},aR=Y6({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Mv.current){const t=new oR(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),Mv.current=t}return Mv.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),lR={...jM,...sI,...lN,...RN},Qu=mP((t,e)=>qP(t,e,lR,TN,aR));function Z6(){const t=x.useRef(!1);return jd(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function fR(){const t=Z6(),[e,r]=x.useState(0),n=x.useCallback(()=>{t.current&&r(e+1)},[e]);return[x.useCallback(()=>kr.postRender(n),[n]),e]}class cR 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 uR({children:t,isPresent:e}){const r=x.useId(),n=x.useRef(null),i=x.useRef({width:0,height:0,top:0,left:0});return x.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${r}"] { + position: absolute !important; + width: ${s}px !important; + height: ${o}px !important; + top: ${a}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(f)}},[e]),x.createElement(cR,{isPresent:e,childRef:n,sizeRef:i},x.cloneElement(t,{ref:n}))}const Nv=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Zh(dR),l=x.useId(),f=x.useMemo(()=>({id:l,initial:e,isPresent:r,custom:i,onExitComplete:c=>{a.set(c,!0);for(const u of a.values())if(!u)return;n&&n()},register:c=>(a.set(c,!1),()=>a.delete(c))}),s?void 0:[r]);return x.useMemo(()=>{a.forEach((c,u)=>a.set(u,!1))},[r]),x.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=x.createElement(uR,{isPresent:r},t)),x.createElement(Rc.Provider,{value:f},t)};function dR(){return new Map}const xa=t=>t.key||"";function hR(t,e){t.forEach(r=>{const n=xa(r);e.set(n,r)})}function vR(t){const e=[];return x.Children.forEach(t,r=>{x.isValidElement(r)&&e.push(r)}),e}const yR=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=fR();const l=x.useContext(wg).forceRender;l&&(a=l);const f=Z6(),c=vR(t);let u=c;const d=new Set,v=x.useRef(u),g=x.useRef(new Map).current,m=x.useRef(!0);if(jd(()=>{m.current=!1,hR(c,g),v.current=u}),Tg(()=>{m.current=!0,g.clear(),d.clear()}),m.current)return x.createElement(x.Fragment,null,u.map(S=>x.createElement(Nv,{key:xa(S),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},S)));u=[...u];const M=v.current.map(xa),E=c.map(xa),A=M.length;for(let S=0;S{if(E.indexOf(S)!==-1)return;const P=g.get(S);if(!P)return;const R=M.indexOf(S),L=()=>{g.delete(S),d.delete(S);const F=v.current.findIndex(z=>z.key===S);if(v.current.splice(F,1),!d.size){if(v.current=c,f.current===!1)return;a(),n&&n()}};u.splice(R,0,x.createElement(Nv,{key:xa(P),isPresent:!1,onExitComplete:L,custom:e,presenceAffectsLayout:s,mode:o},P))}),u=u.map(S=>{const P=S.key;return d.has(P)?S:x.createElement(Nv,{key:xa(S),isPresent:!0,presenceAffectsLayout:s,mode:o},S)}),x.createElement(x.Fragment,null,d.size?u:u.map(S=>x.cloneElement(S)))},pR={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"}};function gR(t,e){if(typeof t!="object"||t===null)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 mR(t){var e=gR(t,"string");return typeof e=="symbol"?e:String(e)}function wR(t,e,r){return e=mR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Rv(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),s=Object.keys(i),o=s.filter(l=>"mappings"in i[l]),a=l=>{var f=[],c={},u=Rv({},l),d=!1;for(var v of o){var g=l[v];if(g!=null){var m=i[v];d=!0;for(var M of m.mappings)c[M]=g,u[M]==null&&delete u[M]}}var E=d?Rv(Rv({},c),u):l,A=function(){var L=E[S],F=i[S];try{if(F.mappings)return"continue";if(typeof L=="string"||typeof L=="number")f.push(F.values[L].defaultClass);else if(Array.isArray(L))for(var z=0;zt,CR=function(){return bR(xR)(...arguments)},eS=CR({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"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{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"}}},paddingTop:{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"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{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:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},borderNormal:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderFocus:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},buttonGlass:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonEmphasis:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonInverse:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text50:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text80:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},textInverse100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},arbitrumDark:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumLight:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},avalanceDark:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceLight:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},bscDark:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscLight:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},ethereumDark:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumLight:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},gnosisDark:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisLight:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},polygonDark:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonLight:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"},white:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},inherit:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},transparent:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},positive:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},negative:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},info:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},warning:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},gradientBackdrop:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientPrimary:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientSecondary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},backgroundPrimary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundSecondary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundContrast:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundMuted:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundControl:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundInverse:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundBackdrop:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundOverlay:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},borderNormal:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},borderFocus:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},buttonGlass:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},buttonEmphasis:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonInverse:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text50:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text100:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},arbitrumDark:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},arbitrumLight:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},avalanceDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},avalanceLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},bscDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},bscLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},ethereumDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},ethereumLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},gnosisDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},gnosisLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},polygonDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},polygonLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},dashed:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"},dotted:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},white:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"},inherit:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},transparent:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},positive:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},negative:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},info:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},warning:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},gradientBackdrop:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},gradientPrimary:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientSecondary:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},backgroundPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},backgroundSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundContrast:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundMuted:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundControl:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundInverse:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundBackdrop:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundOverlay:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},borderNormal:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},borderFocus:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},buttonGlass:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},buttonEmphasis:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},buttonInverse:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},text50:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text80:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text100:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},textInverse100:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},arbitrumDark:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},arbitrumLight:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},avalanceDark:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},avalanceLight:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},bscDark:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},bscLight:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},ethereumDark:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},ethereumLight:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},gnosisDark:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},gnosisLight:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},polygonDark:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},polygonLight:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},dashed:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},dotted:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},white:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},inherit:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"},transparent:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},positive:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},negative:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},info:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},warning:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},gradientBackdrop:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},gradientPrimary:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},gradientSecondary:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},backgroundPrimary:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},backgroundSecondary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},backgroundContrast:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundMuted:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundControl:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundInverse:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundBackdrop:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundOverlay:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},borderNormal:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},borderFocus:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},buttonGlass:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},buttonEmphasis:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},buttonInverse:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},text50:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},text80:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},textInverse100:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},arbitrumDark:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},arbitrumLight:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},avalanceDark:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},avalanceLight:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},bscDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},bscLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},ethereumDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},ethereumLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},gnosisDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},gnosisLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},polygonDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},polygonLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},dashed:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},dotted:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"},white:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},inherit:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},transparent:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"},positive:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},negative:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},info:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},warning:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},gradientBackdrop:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},gradientPrimary:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},gradientSecondary:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},backgroundPrimary:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},backgroundSecondary:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},backgroundContrast:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},backgroundMuted:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundControl:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundInverse:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundBackdrop:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundOverlay:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},borderNormal:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},borderFocus:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},buttonGlass:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},buttonEmphasis:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},buttonInverse:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},text50:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},text80:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},text100:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},textInverse100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},arbitrumDark:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},arbitrumLight:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},avalanceDark:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},avalanceLight:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},bscDark:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},bscLight:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},ethereumDark:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},ethereumLight:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},gnosisDark:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},gnosisLight:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},polygonDark:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},polygonLight:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},dashed:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},dotted:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"}}},color:{values:{black:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},white:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"},inherit:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},transparent:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},positive:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"},negative:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},info:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},warning:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},gradientBackdrop:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},gradientPrimary:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},gradientSecondary:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},backgroundPrimary:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},backgroundSecondary:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},backgroundContrast:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},backgroundMuted:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},backgroundControl:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundInverse:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundBackdrop:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundOverlay:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},borderNormal:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},borderFocus:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},buttonGlass:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},buttonEmphasis:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},buttonInverse:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},text50:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},text80:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},text100:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},textInverse100:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},arbitrumDark:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},arbitrumLight:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},avalanceDark:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},avalanceLight:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},bscDark:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},bscLight:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},ethereumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},ethereumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},gnosisDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},gnosisLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},polygonDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},polygonLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"}}},cursor:{values:{default:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},pointer:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},text:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"}}},opacity:{values:{0:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},50:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},80:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"},100:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},auto:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},outline:{values:{none:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"}}}}});const ER=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Ay=t=>(t.display||(t.display=Object.keys(t).some(e=>ER.includes(e))?"flex":void 0),eS(t));Ay.properties=eS.properties;function tS(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const f in s)Ay.properties.has(f)?o[f]=s[f]:a[f]=s[f];const l=Ay({...o,...n});return x.createElement(r,{className:Vr(l,i),...a,ref:e})});var rS={exports:{}},Xl={};/** + * @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 x2;function AR(){if(x2)return Xl;x2=1;var t=Wt,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,f){var c,u={},d=null,v=null;f!==void 0&&(d=""+f),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(v=l.ref);for(c in l)n.call(l,c)&&!s.hasOwnProperty(c)&&(u[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)u[c]===void 0&&(u[c]=l[c]);return{$$typeof:e,type:a,key:d,ref:v,props:u,_owner:i.current}}return Xl.Fragment=r,Xl.jsx=o,Xl.jsxs=o,Xl}rS.exports=AR();var W=rS.exports,nS={},iS={exports:{}},Ov,C2;function SR(){if(C2)return Ov;C2=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ov=t,Ov}var Dv,E2;function kR(){if(E2)return Dv;E2=1;var t=SR();function e(){}function r(){}return r.resetWarningCache=e,Dv=function(){function n(o,a,l,f,c,u){if(u!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:e};return s.PropTypes=s,s},Dv}iS.exports=kR()();var _R=iS.exports;Object.defineProperty(nS,"__esModule",{value:!0});var A2=Object.assign||function(t){for(var e=1;e>19^S^S>>8,(i[3]>>>0)/(1<<31>>>0)}function a(){var S=Math.floor(o()*360),P=o()*60+40+"%",R=(o()+o()+o()+o())*25+"%",L="hsl("+S+","+P+","+R+")";return L}function l(S){for(var P=S,R=S,L=Math.ceil(P/2),F=P-L,z=[],H=0;H{const{className:e,address:r,size:n="md",...i}=t;return W.jsx(pe,{as:OR,className:Vr(BR,DR,e),display:"inline-block",seed:r.toUpperCase(),size:8,scale:LR[n],...i})});function $R(t,e){if(typeof t!="object"||t===null)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 FR(t){var e=$R(t,"string");return typeof e=="symbol"?e:String(e)}function jR(t,e,r){return e=FR(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function S2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function k2(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},Bt=t=>{var e=r=>{var n=t.defaultClassName,i=k2(k2({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var f=t.variantClassNames[s][l];f&&(n+=" "+f)}}for(var[c,u]of t.compoundVariants)zR(c,i,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e};Bt({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const _2=t=>{const{color:e="borderNormal",marginY:r="4",...n}=t;return W.jsx(pe,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var UR=Bt({defaultClassName:"",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibi"},underline:{true:"_1qxj1ibj"},uppercase:{true:"_1qxj1ibk"},capitalize:{true:"_1qxj1ibl"},hidden:{true:"_1qxj1ibm"}},defaultVariants:{},compoundVariants:[]});const nr=x.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:l,ellipsis:f,uppercase:c,capitalize:u,...d}=t,v=pR[n];return W.jsx(pe,{as:r,className:Vr(i,UR({hidden:s,ellipsis:f,italic:o,underline:a,uppercase:c,capitalize:u})),ref:e,...v,...d,children:l})});var VR=Bt({defaultClassName:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8ne",feature:"_140wn8nf fyvr11ph fyvr12nb",primary:"fyvr11pb fyvr12nb",glass:"fyvr11rb fyvr12rh",emphasis:"fyvr11rh fyvr12rh",text:"_140wn8nj fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12r5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12tt fyvr12uh",false:"fyvr12tz fyvr12ut fyvr12ur"},size:{xs:"_140wn8no fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8np fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nq fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nr fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8ns"},hasLeftIcon:{true:"_140wn8nt"},hasRightIcon:{true:"_140wn8nu"},activeOutline:{light:"_140wn8nv",bold:"_140wn8nw"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8nx"],[{iconOnly:!0,size:"sm"},"_140wn8ny"],[{iconOnly:!0,size:"md"},"_140wn8nz"],[{iconOnly:!0,size:"lg"},"_140wn8n10"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n11"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n12"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n13"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n14"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n15"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n16"]]});const je=x.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:f,leftIcon:c,rightIcon:u,size:d="md",variant:v="glass",width:g="fit",shape:m="circle",type:M="button",...E}=t,A=c!==void 0&&f!==void 0,S=u!==void 0&&f!==void 0,P=c!==void 0&&f===void 0,R=d==="xs"?"xs":"sm";return W.jsx(pe,{as:r,className:Vr(i,VR({activeOutline:n,disabled:s||l,hasLeftIcon:A,hasRightIcon:S,iconOnly:P,size:v==="text"?void 0:d,shape:v==="text"?void 0:m,variant:v})),disabled:s||l,display:o,fontWeight:a,ref:e,type:M,width:g,...E,children:P?W.jsx(c,{size:R}):W.jsxs(pe,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[W.jsxs(pe,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[c&&W.jsx(c,{size:R}),W.jsx(nr,{children:f})]}),u&&W.jsx(u,{size:R})]})})});var WR=Bt({defaultClassName:"",variantClassNames:{clickable:{true:"fyvr12ur fyvr12tz"},disabled:{true:"rhmai64"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mn fyvr12fh fyvr1215 fyvr128b"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const HR=x.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:l="full",...f}=t;return W.jsx(pe,{className:Vr(r,WR({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...f,children:n})});function fe(){return fe=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>qR(r,e))}function Dt(...t){return x.useCallback(aS(...t),t)}function Ir(t,e=[]){let r=[];function n(s,o){const a=x.createContext(o),l=r.length;r=[...r,o];function f(u){const{scope:d,children:v,...g}=u,m=(d==null?void 0:d[t][l])||a,M=x.useMemo(()=>g,Object.values(g));return x.createElement(m.Provider,{value:M},v)}function c(u,d){const v=(d==null?void 0:d[t][l])||a,g=x.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${s}\``)}return f.displayName=s+"Provider",[f,c]}const i=()=>{const s=r.map(o=>x.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return x.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[n,GR(i,...e)]}function GR(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:l,scopeName:f})=>{const u=l(s)[`__scope${f}`];return{...a,...u}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function we(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Tn(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function dl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=KR({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=Tn(r),l=x.useCallback(f=>{if(s){const u=typeof f=="function"?f(t):f;u!==t&&a(u)}else i(f)},[s,t,i,a]);return[o,l]}function KR({defaultProp:t,onChange:e}){const r=x.useState(t),[n]=r,i=x.useRef(n),s=Tn(e);return x.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function qg(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])}const hn=Boolean(globalThis==null?void 0:globalThis.document)?x.useLayoutEffect:()=>{};function Gg(t){const[e,r]=x.useState(void 0);return hn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,f=Array.isArray(l)?l[0]:l;o=f.inlineSize,a=f.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 JR(t,e){return x.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Lc=t=>{const{present:e,children:r}=t,n=QR(e),i=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),s=Dt(n.ref,i.ref);return typeof r=="function"||n.isPresent?x.cloneElement(i,{ref:s}):null};Lc.displayName="Presence";function QR(t){const[e,r]=x.useState(),n=x.useRef({}),i=x.useRef(t),s=x.useRef("none"),o=t?"mounted":"unmounted",[a,l]=JR(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const f=wu(n.current);s.current=a==="mounted"?f:"none"},[a]),hn(()=>{const f=n.current,c=i.current;if(c!==t){const d=s.current,v=wu(f);t?l("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?l("UNMOUNT"):l(c&&d!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),hn(()=>{if(e){const f=u=>{const v=wu(n.current).includes(u.animationName);u.target===e&&v&&wi.flushSync(()=>l("ANIMATION_END"))},c=u=>{u.target===e&&(s.current=wu(n.current))};return e.addEventListener("animationstart",c),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{e.removeEventListener("animationstart",c),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(f=>{f&&(n.current=getComputedStyle(f)),r(f)},[])}}function wu(t){return(t==null?void 0:t.animationName)||"none"}const uc=x.forwardRef((t,e)=>{const{children:r,...n}=t,i=x.Children.toArray(r),s=i.find(XR);if(s){const o=s.props.children,a=i.map(l=>l===s?x.Children.count(o)>1?x.Children.only(null):x.isValidElement(o)?o.props.children:null:l);return x.createElement(Sy,fe({},n,{ref:e}),x.isValidElement(o)?x.cloneElement(o,void 0,a):null)}return x.createElement(Sy,fe({},n,{ref:e}),r)});uc.displayName="Slot";const Sy=x.forwardRef((t,e)=>{const{children:r,...n}=t;return x.isValidElement(r)?x.cloneElement(r,{...ZR(n,r.props),ref:e?aS(e,r.ref):r.ref}):x.Children.count(r)>1?x.Children.only(null):null});Sy.displayName="SlotClone";const YR=({children:t})=>x.createElement(x.Fragment,null,t);function XR(t){return x.isValidElement(t)&&t.type===YR}function ZR(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const e7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Be=e7.reduce((t,e)=>{const r=x.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?uc:e;return x.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),x.createElement(a,fe({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Kg(t,e){t&&wi.flushSync(()=>t.dispatchEvent(e))}const lS="Checkbox",[t7,wG]=Ir(lS),[r7,n7]=t7(lS),i7=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:l="on",onCheckedChange:f,...c}=t,[u,d]=x.useState(null),v=Dt(e,S=>d(S)),g=x.useRef(!1),m=u?Boolean(u.closest("form")):!0,[M=!1,E]=dl({prop:i,defaultProp:s,onChange:f}),A=x.useRef(M);return x.useEffect(()=>{const S=u==null?void 0:u.form;if(S){const P=()=>E(A.current);return S.addEventListener("reset",P),()=>S.removeEventListener("reset",P)}},[u,E]),x.createElement(r7,{scope:r,state:M,disabled:a},x.createElement(Be.button,fe({type:"button",role:"checkbox","aria-checked":Ro(M)?"mixed":M,"aria-required":o,"data-state":fS(M),"data-disabled":a?"":void 0,disabled:a,value:l},c,{ref:v,onKeyDown:we(t.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:we(t.onClick,S=>{E(P=>Ro(P)?!0:!P),m&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})})),m&&x.createElement(a7,{control:u,bubbles:!g.current,name:n,value:l,checked:M,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),s7="CheckboxIndicator",o7=x.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=n7(s7,r);return x.createElement(Lc,{present:n||Ro(s.state)||s.state===!0},x.createElement(Be.span,fe({"data-state":fS(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),a7=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=x.useRef(null),o=qg(r),a=Gg(e);return x.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=Ro(r),u.call(l,Ro(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),x.createElement("input",fe({type:"checkbox","aria-hidden":!0,defaultChecked:Ro(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Ro(t){return t==="indeterminate"}function fS(t){return Ro(t)?"indeterminate":t?"checked":"unchecked"}const l7=i7,f7=o7;var c7=Bt({defaultClassName:"",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r5 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const _l=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?W.jsxs(pe,{flexDirection:"column",gap:"0.5",children:[r&&W.jsx(nr,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&W.jsx(nr,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return W.jsxs(pe,{as:"label",className:c7({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var Tl=Bt({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const u7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{d:"m4.304 10.232 4.263 4.79 7.13-11.238",stroke:"currentColor",strokeWidth:1.5})}),cS=({size:t="sm",...e})=>W.jsx(pe,{as:u7,className:Tl({size:t}),...e}),d7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),uS=({size:t="sm",...e})=>W.jsx(pe,{as:d7,className:Tl({size:t}),...e}),h7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),dS=({size:t="sm",...e})=>W.jsx(pe,{as:h7,className:Tl({size:t}),...e}),v7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),y7=({size:t="sm",...e})=>W.jsx(pe,{as:v7,className:Tl({size:t}),...e}),p7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"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",fill:"currentColor"})}),g7=({size:t="sm",...e})=>W.jsx(pe,{as:p7,className:Tl({size:t}),...e}),m7=t=>W.jsx("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:W.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",fill:"currentColor"})}),w7=({size:t="sm",...e})=>W.jsx(pe,{as:m7,className:Tl({size:t}),...e});var b7=Bt({defaultClassName:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11h0 fyvr11ko fyvr11jg fyvr12ut fyvr12ur fyvr12uj fyvr12tz fyvr12tv",variantClassNames:{size:{sm:"_1c9x66f1",lg:"_1c9x66f2"}},defaultVariants:{},compoundVariants:[]}),x7=Bt({defaultClassName:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rh fyvr11rt",variantClassNames:{size:{sm:"_1c9x66f4",lg:"_1c9x66f5"}},defaultVariants:{},compoundVariants:[]});const C7=({size:t="sm"})=>W.jsx(f7,{className:x7({size:t}),children:W.jsx(cS,{size:t})});x.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...l}=t;return W.jsx(_l,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:W.jsx(l7,{className:b7({size:a}),disabled:r,id:n??i,name:i,ref:e,...l,children:W.jsx(C7,{})})})});Wt.createContext(null);const E7=G4["useId".toString()]||(()=>{});let A7=0;function $c(t){const[e,r]=x.useState(E7());return hn(()=>{t||r(n=>n??String(A7++))},[t]),t||(e?`radix-${e}`:"")}const hS="Collapsible",[S7,bG]=Ir(hS),[k7,Jg]=S7(hS),_7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:s,onOpenChange:o,...a}=t,[l=!1,f]=dl({prop:n,defaultProp:i,onChange:o});return x.createElement(k7,{scope:r,disabled:s,contentId:$c(),open:l,onOpenToggle:x.useCallback(()=>f(c=>!c),[f])},x.createElement(Be.div,fe({"data-state":Qg(l),"data-disabled":s?"":void 0},a,{ref:e})))}),T7="CollapsibleTrigger",P7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,i=Jg(T7,r);return x.createElement(Be.button,fe({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Qg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:e,onClick:we(t.onClick,i.onOpenToggle)}))}),vS="CollapsibleContent",I7=x.forwardRef((t,e)=>{const{forceMount:r,...n}=t,i=Jg(vS,t.__scopeCollapsible);return x.createElement(Lc,{present:r||i.open},({present:s})=>x.createElement(M7,fe({},n,{ref:e,present:s})))}),M7=x.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:i,...s}=t,o=Jg(vS,r),[a,l]=x.useState(n),f=x.useRef(null),c=Dt(e,f),u=x.useRef(0),d=u.current,v=x.useRef(0),g=v.current,m=o.open||a,M=x.useRef(m),E=x.useRef();return x.useEffect(()=>{const A=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(A)},[]),hn(()=>{const A=f.current;if(A){E.current=E.current||{transitionDuration:A.style.transitionDuration,animationName:A.style.animationName},A.style.transitionDuration="0s",A.style.animationName="none";const S=A.getBoundingClientRect();u.current=S.height,v.current=S.width,M.current||(A.style.transitionDuration=E.current.transitionDuration,A.style.animationName=E.current.animationName),l(n)}},[o.open,n]),x.createElement(Be.div,fe({"data-state":Qg(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m},s,{ref:c,style:{["--radix-collapsible-content-height"]:d?`${d}px`:void 0,["--radix-collapsible-content-width"]:g?`${g}px`:void 0,...t.style}}),m&&i)});function Qg(t){return t?"open":"closed"}const N7=_7,R7=P7,O7=I7;var T2="64px",D7="_4j62fl4 fyvr1ww fyvr1ys fyvr1so fyvr1v0 fyvr128",B7="_4j62fl5",L7="_4j62fl0",$7="_4j62fl2 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11h0 fyvr11ko fyvr11ob fyvr128 fyvr12tz fyvr11n2";const F7=t=>{const{className:e,children:r,defaultOpen:n,onOpenChange:i,label:s,...o}=t,[a,l]=x.useState(n),f=c=>{l(c),i==null||i(c)};return W.jsx(N7,{defaultOpen:n,onOpenChange:f,asChild:!0,children:W.jsxs(pe,{as:Qu.div,className:Vr(e,L7),initial:{height:n?"auto":T2},animate:{height:a?"auto":T2},transition:{ease:"easeOut",duration:.3},borderRadius:"md",background:"backgroundSecondary",position:"relative",overflow:"hidden",width:"full",...o,children:[W.jsxs(R7,{className:$7,children:[W.jsx(nr,{as:"div",variant:"normal",fontWeight:"bold",color:"text80",children:s}),W.jsx(pe,{as:Qu.div,position:"absolute",right:"0",marginRight:"4",initial:{rotate:n?180:0},animate:{rotate:a?180:0},transition:{ease:"linear",duration:.1},children:W.jsx(uS,{className:B7,color:"text50"})})]}),W.jsx(yR,{children:a&&W.jsx(O7,{className:D7,asChild:!0,forceMount:!0,children:W.jsx(Qu.div,{initial:{opacity:n?1:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"easeOut",duration:.3},children:r})})})]})})};function i1(t){const e=t+"CollectionProvider",[r,n]=Ir(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:g,children:m}=v,M=Wt.useRef(null),E=Wt.useRef(new Map).current;return Wt.createElement(i,{scope:g,itemMap:E,collectionRef:M},m)},a=t+"CollectionSlot",l=Wt.forwardRef((v,g)=>{const{scope:m,children:M}=v,E=s(a,m),A=Dt(g,E.collectionRef);return Wt.createElement(uc,{ref:A},M)}),f=t+"CollectionItemSlot",c="data-radix-collection-item",u=Wt.forwardRef((v,g)=>{const{scope:m,children:M,...E}=v,A=Wt.useRef(null),S=Dt(g,A),P=s(f,m);return Wt.useEffect(()=>(P.itemMap.set(A,{ref:A,...E}),()=>void P.itemMap.delete(A))),Wt.createElement(uc,{[c]:"",ref:S},M)});function d(v){const g=s(t+"CollectionConsumer",v);return Wt.useCallback(()=>{const M=g.collectionRef.current;if(!M)return[];const E=Array.from(M.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((P,R)=>E.indexOf(P.ref.current)-E.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const j7=x.createContext(void 0);function Yg(t){const e=x.useContext(j7);return t||e||"ltr"}function z7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t);x.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const ky="dismissableLayer.update",U7="dismissableLayer.pointerDownOutside",V7="dismissableLayer.focusOutside";let P2;const W7=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yS=x.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...f}=t,c=x.useContext(W7),[u,d]=x.useState(null),v=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=x.useState({}),m=Dt(e,z=>d(z)),M=Array.from(c.layers),[E]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),A=M.indexOf(E),S=u?M.indexOf(u):-1,P=c.layersWithOutsidePointerEventsDisabled.size>0,R=S>=A,L=H7(z=>{const H=z.target,q=[...c.branches].some(K=>K.contains(H));!R||q||(s==null||s(z),a==null||a(z),z.defaultPrevented||l==null||l())},v),F=q7(z=>{const H=z.target;[...c.branches].some(K=>K.contains(H))||(o==null||o(z),a==null||a(z),z.defaultPrevented||l==null||l())},v);return z7(z=>{S===c.layers.size-1&&(i==null||i(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),x.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(P2=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),I2(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=P2)}},[u,v,n,c]),x.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),I2())},[u,c]),x.useEffect(()=>{const z=()=>g({});return document.addEventListener(ky,z),()=>document.removeEventListener(ky,z)},[]),x.createElement(Be.div,fe({},f,{ref:m,style:{pointerEvents:P?R?"auto":"none":void 0,...t.style},onFocusCapture:we(t.onFocusCapture,F.onFocusCapture),onBlurCapture:we(t.onBlurCapture,F.onBlurCapture),onPointerDownCapture:we(t.onPointerDownCapture,L.onPointerDownCapture)}))});function H7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t),n=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){pS(U7,r,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function q7(t,e=globalThis==null?void 0:globalThis.document){const r=Tn(t),n=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!n.current&&pS(V7,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function I2(){const t=new CustomEvent(ky);document.dispatchEvent(t)}function pS(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Kg(i,s):i.dispatchEvent(s)}const G7=yS;let Bv=0;function K7(){x.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:M2()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:M2()),Bv++,()=>{Bv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Bv--}},[])}function M2(){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}const Lv="focusScope.autoFocusOnMount",$v="focusScope.autoFocusOnUnmount",N2={bubbles:!1,cancelable:!0},J7=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=x.useState(null),f=Tn(i),c=Tn(s),u=x.useRef(null),d=Dt(e,m=>l(m)),v=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let m=function(S){if(v.paused||!a)return;const P=S.target;a.contains(P)?u.current=P:vs(u.current,{select:!0})},M=function(S){if(v.paused||!a)return;const P=S.relatedTarget;P!==null&&(a.contains(P)||vs(u.current,{select:!0}))},E=function(S){const P=document.activeElement;for(const R of S)R.removedNodes.length>0&&(a!=null&&a.contains(P)||vs(a))};document.addEventListener("focusin",m),document.addEventListener("focusout",M);const A=new MutationObserver(E);return a&&A.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",M),A.disconnect()}}},[n,a,v.paused]),x.useEffect(()=>{if(a){O2.add(v);const m=document.activeElement;if(!a.contains(m)){const E=new CustomEvent(Lv,N2);a.addEventListener(Lv,f),a.dispatchEvent(E),E.defaultPrevented||(Q7(t9(gS(a)),{select:!0}),document.activeElement===m&&vs(a))}return()=>{a.removeEventListener(Lv,f),setTimeout(()=>{const E=new CustomEvent($v,N2);a.addEventListener($v,c),a.dispatchEvent(E),E.defaultPrevented||vs(m??document.body,{select:!0}),a.removeEventListener($v,c),O2.remove(v)},0)}}},[a,f,c,v]);const g=x.useCallback(m=>{if(!r&&!n||v.paused)return;const M=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,E=document.activeElement;if(M&&E){const A=m.currentTarget,[S,P]=Y7(A);S&&P?!m.shiftKey&&E===P?(m.preventDefault(),r&&vs(S,{select:!0})):m.shiftKey&&E===S&&(m.preventDefault(),r&&vs(P,{select:!0})):E===A&&m.preventDefault()}},[r,n,v.paused]);return x.createElement(Be.div,fe({tabIndex:-1},o,{ref:d,onKeyDown:g}))});function Q7(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(vs(n,{select:e}),document.activeElement!==r)return}function Y7(t){const e=gS(t),r=R2(e,t),n=R2(e.reverse(),t);return[r,n]}function gS(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function R2(t,e){for(const r of t)if(!X7(r,{upTo:e}))return r}function X7(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 Z7(t){return t instanceof HTMLInputElement&&"select"in t}function vs(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Z7(t)&&e&&t.select()}}const O2=e9();function e9(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=D2(t,e),t.unshift(e)},remove(e){var r;t=D2(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function D2(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function t9(t){return t.filter(e=>e.tagName!=="A")}function Pl(t){return t.split("-")[1]}function Xg(t){return t==="y"?"height":"width"}function zi(t){return t.split("-")[0]}function ra(t){return["top","bottom"].includes(zi(t))?"x":"y"}function B2(t,e,r){let{reference:n,floating:i}=t;const s=n.x+n.width/2-i.width/2,o=n.y+n.height/2-i.height/2,a=ra(e),l=Xg(a),f=n[l]/2-i[l]/2,c=a==="x";let u;switch(zi(e)){case"top":u={x:s,y:n.y-i.height};break;case"bottom":u={x:s,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-i.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Pl(e)){case"start":u[a]-=f*(r&&c?-1:1);break;case"end":u[a]+=f*(r&&c?-1:1)}return u}const r9=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=B2(f,n,l),d=n,v={},g=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:i,y:s,placement:o,rects:a,platform:l,elements:f}=e;if(r==null)return{};const c=mS(n),u={x:i,y:s},d=ra(o),v=Xg(d),g=await l.getDimensions(r),m=d==="y",M=m?"top":"left",E=m?"bottom":"right",A=m?"clientHeight":"clientWidth",S=a.reference[v]+a.reference[d]-u[d]-a.floating[v],P=u[d]-a.reference[d],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let L=R?R[A]:0;L&&await(l.isElement==null?void 0:l.isElement(R))||(L=f.floating[A]||a.floating[v]);const F=S/2-P/2,z=c[M],H=L-g[v]-c[E],q=L/2-g[v]/2+F,K=Ty(z,q,H),ne=Pl(o)!=null&&q!=K&&a.reference[v]/2-(qt.concat(e,e+"-start",e+"-end"),[]);const n9={left:"right",right:"left",bottom:"top",top:"bottom"};function eh(t){return t.replace(/left|right|bottom|top/g,e=>n9[e])}function i9(t,e,r){r===void 0&&(r=!1);const n=Pl(t),i=ra(t),s=Xg(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=eh(o)),{main:o,cross:eh(o)}}const s9={start:"end",end:"start"};function Fv(t){return t.replace(/start|end/g,e=>s9[e])}const o9=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:i,rects:s,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...m}=t,M=zi(n),E=zi(o)===o,A=await(a.isRTL==null?void 0:a.isRTL(l.floating)),S=u||(E||!g?[eh(o)]:function(K){const ne=eh(K);return[Fv(K),ne,Fv(ne)]}(o));u||v==="none"||S.push(...function(K,ne,O,y){const w=Pl(K);let T=function(N,p,k){const I=["left","right"],b=["right","left"],h=["top","bottom"],_=["bottom","top"];switch(N){case"top":case"bottom":return k?p?b:I:p?I:b;case"left":case"right":return p?h:_;default:return[]}}(zi(K),O==="start",y);return w&&(T=T.map(N=>N+"-"+w),ne&&(T=T.concat(T.map(Fv)))),T}(o,g,v,A));const P=[o,...S],R=await dc(e,m),L=[];let F=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&L.push(R[M]),c){const{main:K,cross:ne}=i9(n,s,A);L.push(R[K],R[ne])}if(F=[...F,{placement:n,overflows:L}],!L.every(K=>K<=0)){var z,H;const K=(((z=i.flip)==null?void 0:z.index)||0)+1,ne=P[K];if(ne)return{data:{index:K,overflows:F},reset:{placement:ne}};let O=(H=F.filter(y=>y.overflows[0]<=0).sort((y,w)=>y.overflows[1]-w.overflows[1])[0])==null?void 0:H.placement;if(!O)switch(d){case"bestFit":{var q;const y=(q=F.map(w=>[w.placement,w.overflows.filter(T=>T>0).reduce((T,N)=>T+N,0)]).sort((w,T)=>w[1]-T[1])[0])==null?void 0:q[0];y&&(O=y);break}case"initialPlacement":O=o}if(n!==O)return{reset:{placement:O}}}return{}}}};function $2(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F2(t){return wS.some(e=>t[e]>=0)}const a9=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:i}=e;switch(r){case"referenceHidden":{const s=$2(await dc(e,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:F2(s)}}}case"escaped":{const s=$2(await dc(e,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:s,escaped:F2(s)}}}default:return{}}}}},l9=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await async function(s,o){const{placement:a,platform:l,elements:f}=s,c=await(l.isRTL==null?void 0:l.isRTL(f.floating)),u=zi(a),d=Pl(a),v=ra(a)==="x",g=["left","top"].includes(u)?-1:1,m=c&&v?-1:1,M=typeof o=="function"?o(s):o;let{mainAxis:E,crossAxis:A,alignmentAxis:S}=typeof M=="number"?{mainAxis:M,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...M};return d&&typeof S=="number"&&(A=d==="end"?-1*S:S),v?{x:A*m,y:E*g}:{x:E*g,y:A*m}}(e,t);return{x:r+i.x,y:n+i.y,data:i}}}};function bS(t){return t==="x"?"y":"x"}const f9=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:M=>{let{x:E,y:A}=M;return{x:E,y:A}}},...l}=t,f={x:r,y:n},c=await dc(e,l),u=ra(zi(i)),d=bS(u);let v=f[u],g=f[d];if(s){const M=u==="y"?"bottom":"right";v=Ty(v+c[u==="y"?"top":"left"],v,v-c[M])}if(o){const M=d==="y"?"bottom":"right";g=Ty(g+c[d==="y"?"top":"left"],g,g-c[M])}const m=a.fn({...e,[u]:v,[d]:g});return{...m,data:{x:m.x-r,y:m.y-n}}}}},c9=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:f=!0}=t,c={x:r,y:n},u=ra(i),d=bS(u);let v=c[u],g=c[d];const m=typeof a=="function"?a(e):a,M=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const S=u==="y"?"height":"width",P=s.reference[u]-s.floating[S]+M.mainAxis,R=s.reference[u]+s.reference[S]-M.mainAxis;vR&&(v=R)}if(f){var E,A;const S=u==="y"?"width":"height",P=["top","left"].includes(zi(i)),R=s.reference[d]-s.floating[S]+(P&&((E=o.offset)==null?void 0:E[d])||0)+(P?0:M.crossAxis),L=s.reference[d]+s.reference[S]+(P?0:((A=o.offset)==null?void 0:A[d])||0)-(P?M.crossAxis:0);gL&&(g=L)}return{[u]:v,[d]:g}}}},u9=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=t,l=await dc(e,a),f=zi(r),c=Pl(r),u=ra(r)==="x",{width:d,height:v}=n.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=c===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=c==="end"?"top":"bottom");const M=v-l[g],E=d-l[m],A=!e.middlewareData.shift;let S=M,P=E;if(u){const L=d-l.left-l.right;P=c||A?_y(E,L):L}else{const L=v-l.top-l.bottom;S=c||A?_y(M,L):L}if(A&&!c){const L=mo(l.left,0),F=mo(l.right,0),z=mo(l.top,0),H=mo(l.bottom,0);u?P=d-2*(L!==0||F!==0?L+F:mo(l.left,l.right)):S=v-2*(z!==0||H!==0?z+H:mo(l.top,l.bottom))}await o({...e,availableWidth:P,availableHeight:S});const R=await i.getDimensions(s.floating);return d!==R.width||v!==R.height?{reset:{rects:!0}}:{}}}};function An(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Qn(t){return An(t).getComputedStyle(t)}function xS(t){return t instanceof An(t).Node}function Us(t){return xS(t)?(t.nodeName||"").toLowerCase():""}function Xn(t){return t instanceof An(t).HTMLElement}function fn(t){return t instanceof An(t).Element}function j2(t){return typeof ShadowRoot>"u"?!1:t instanceof An(t).ShadowRoot||t instanceof ShadowRoot}function hc(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Qn(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function d9(t){return["table","td","th"].includes(Us(t))}function Py(t){const e=Zg(),r=Qn(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Zg(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function s1(t){return["html","body","#document"].includes(Us(t))}const z2=Math.min,_f=Math.max,th=Math.round;function CS(t){const e=Qn(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=Xn(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=th(r)!==s||th(n)!==o;return a&&(r=s,n=o),{width:r,height:n,fallback:a}}function ES(t){return fn(t)?t:t.contextElement}const AS={x:1,y:1};function Qa(t){const e=ES(t);if(!Xn(e))return AS;const r=e.getBoundingClientRect(),{width:n,height:i,fallback:s}=CS(e);let o=(s?th(r.width):r.width)/n,a=(s?th(r.height):r.height)/i;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const U2={x:0,y:0};function SS(t,e,r){var n,i;if(e===void 0&&(e=!0),!Zg())return U2;const s=t?An(t):window;return!r||e&&r!==s?U2:{x:((n=s.visualViewport)==null?void 0:n.offsetLeft)||0,y:((i=s.visualViewport)==null?void 0:i.offsetTop)||0}}function Vo(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=ES(t);let o=AS;e&&(n?fn(n)&&(o=Qa(n)):o=Qa(t));const a=SS(s,r,n);let l=(i.left+a.x)/o.x,f=(i.top+a.y)/o.y,c=i.width/o.x,u=i.height/o.y;if(s){const d=An(s),v=n&&fn(n)?An(n):n;let g=d.frameElement;for(;g&&n&&v!==d;){const m=Qa(g),M=g.getBoundingClientRect(),E=getComputedStyle(g);M.x+=(g.clientLeft+parseFloat(E.paddingLeft))*m.x,M.y+=(g.clientTop+parseFloat(E.paddingTop))*m.y,l*=m.x,f*=m.y,c*=m.x,u*=m.y,l+=M.x,f+=M.y,g=An(g).frameElement}}return Zd({width:c,height:u,x:l,y:f})}function Os(t){return((xS(t)?t.ownerDocument:t.document)||window.document).documentElement}function o1(t){return fn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function kS(t){return Vo(Os(t)).left+o1(t).scrollLeft}function hl(t){if(Us(t)==="html")return t;const e=t.assignedSlot||t.parentNode||j2(t)&&t.host||Os(t);return j2(e)?e.host:e}function _S(t){const e=hl(t);return s1(e)?e.ownerDocument.body:Xn(e)&&hc(e)?e:_S(e)}function Tf(t,e){var r;e===void 0&&(e=[]);const n=_S(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),s=An(n);return i?e.concat(s,s.visualViewport||[],hc(n)?n:[]):e.concat(n,Tf(n))}function V2(t,e,r){let n;if(e==="viewport")n=function(i,s){const o=An(i),a=Os(i),l=o.visualViewport;let f=a.clientWidth,c=a.clientHeight,u=0,d=0;if(l){f=l.width,c=l.height;const v=Zg();(!v||v&&s==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:f,height:c,x:u,y:d}}(t,r);else if(e==="document")n=function(i){const s=Os(i),o=o1(i),a=i.ownerDocument.body,l=_f(s.scrollWidth,s.clientWidth,a.scrollWidth,a.clientWidth),f=_f(s.scrollHeight,s.clientHeight,a.scrollHeight,a.clientHeight);let c=-o.scrollLeft+kS(i);const u=-o.scrollTop;return Qn(a).direction==="rtl"&&(c+=_f(s.clientWidth,a.clientWidth)-l),{width:l,height:f,x:c,y:u}}(Os(t));else if(fn(e))n=function(i,s){const o=Vo(i,!0,s==="fixed"),a=o.top+i.clientTop,l=o.left+i.clientLeft,f=Xn(i)?Qa(i):{x:1,y:1};return{width:i.clientWidth*f.x,height:i.clientHeight*f.y,x:l*f.x,y:a*f.y}}(e,r);else{const i=SS(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Zd(n)}function TS(t,e){const r=hl(t);return!(r===e||!fn(r)||s1(r))&&(Qn(r).position==="fixed"||TS(r,e))}function W2(t,e){return Xn(t)&&Qn(t).position!=="fixed"?e?e(t):t.offsetParent:null}function H2(t,e){const r=An(t);if(!Xn(t))return r;let n=W2(t,e);for(;n&&d9(n)&&Qn(n).position==="static";)n=W2(n,e);return n&&(Us(n)==="html"||Us(n)==="body"&&Qn(n).position==="static"&&!Py(n))?r:n||function(i){let s=hl(i);for(;Xn(s)&&!s1(s);){if(Py(s))return s;s=hl(s)}return null}(t)||r}function h9(t,e,r){const n=Xn(e),i=Os(e),s=r==="fixed",o=Vo(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!s)if((Us(e)!=="body"||hc(i))&&(a=o1(e)),Xn(e)){const f=Vo(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=kS(i));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const v9={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const s=r==="clippingAncestors"?function(f,c){const u=c.get(f);if(u)return u;let d=Tf(f).filter(M=>fn(M)&&Us(M)!=="body"),v=null;const g=Qn(f).position==="fixed";let m=g?hl(f):f;for(;fn(m)&&!s1(m);){const M=Qn(m),E=Py(m);E||M.position!=="fixed"||(v=null),(g?!E&&!v:!E&&M.position==="static"&&v&&["absolute","fixed"].includes(v.position)||hc(m)&&!E&&TS(f,m))?d=d.filter(A=>A!==m):v=M,m=hl(m)}return c.set(f,d),d}(e,this._c):[].concat(r),o=[...s,n],a=o[0],l=o.reduce((f,c)=>{const u=V2(e,c,i);return f.top=_f(u.top,f.top),f.right=z2(u.right,f.right),f.bottom=z2(u.bottom,f.bottom),f.left=_f(u.left,f.left),f},V2(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=Xn(r),s=Os(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((i||!i&&n!=="fixed")&&((Us(r)!=="body"||hc(s))&&(o=o1(r)),Xn(r))){const f=Vo(r);a=Qa(r),l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:fn,getDimensions:function(t){return CS(t)},getOffsetParent:H2,getDocumentElement:Os,getScale:Qa,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||H2,s=this.getDimensions;return{reference:h9(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Qn(t).direction==="rtl"};function y9(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=i||s?[...fn(t)?Tf(t):t.contextElement?Tf(t.contextElement):[],...Tf(e)]:[];l.forEach(d=>{const v=!fn(d)&&d.toString().includes("V");!i||a&&!v||d.addEventListener("scroll",r,{passive:!0}),s&&d.addEventListener("resize",r)});let f,c=null;o&&(c=new ResizeObserver(()=>{r()}),fn(t)&&!a&&c.observe(t),fn(t)||!t.contextElement||a||c.observe(t.contextElement),c.observe(e));let u=a?Vo(t):null;return a&&function d(){const v=Vo(t);!u||v.x===u.x&&v.y===u.y&&v.width===u.width&&v.height===u.height||r(),u=v,f=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(v=>{i&&v.removeEventListener("scroll",r),s&&v.removeEventListener("resize",r)}),(d=c)==null||d.disconnect(),c=null,a&&cancelAnimationFrame(f)}}const p9=(t,e,r)=>{const n=new Map,i={platform:v9,...r},s={...i.platform,_c:n};return r9(t,e,{...i,platform:s})},g9=t=>{const{element:e,padding:r}=t;function n(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return e&&n(e)?e.current!=null?L2({element:e.current,padding:r}).fn(i):{}:e?L2({element:e,padding:r}).fn(i):{}}}};var Yu=typeof document<"u"?x.useLayoutEffect:x.useEffect;function rh(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,i;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(!rh(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!rh(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function PS(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function q2(t,e){const r=PS(t);return Math.round(e*r)/r}function G2(t){const e=x.useRef(t);return Yu(()=>{e.current=t}),e}function m9(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:f}=t,[c,u]=x.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,v]=x.useState(n);rh(d,n)||v(n);const[g,m]=x.useState(null),[M,E]=x.useState(null),A=x.useCallback(T=>{T!=L.current&&(L.current=T,m(T))},[m]),S=x.useCallback(T=>{T!==F.current&&(F.current=T,E(T))},[E]),P=s||g,R=o||M,L=x.useRef(null),F=x.useRef(null),z=x.useRef(c),H=G2(l),q=G2(i),K=x.useCallback(()=>{if(!L.current||!F.current)return;const T={placement:e,strategy:r,middleware:d};q.current&&(T.platform=q.current),p9(L.current,F.current,T).then(N=>{const p={...N,isPositioned:!0};ne.current&&!rh(z.current,p)&&(z.current=p,wi.flushSync(()=>{u(p)}))})},[d,e,r,q]);Yu(()=>{f===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[f]);const ne=x.useRef(!1);Yu(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Yu(()=>{if(P&&(L.current=P),R&&(F.current=R),P&&R){if(H.current)return H.current(P,R,K);K()}},[P,R,K,H]);const O=x.useMemo(()=>({reference:L,floating:F,setReference:A,setFloating:S}),[A,S]),y=x.useMemo(()=>({reference:P,floating:R}),[P,R]),w=x.useMemo(()=>{const T={position:r,left:0,top:0};if(!y.floating)return T;const N=q2(y.floating,c.x),p=q2(y.floating,c.y);return a?{...T,transform:"translate("+N+"px, "+p+"px)",...PS(y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:p}},[r,a,y.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:K,refs:O,elements:y,floatingStyles:w}),[c,K,O,y,w])}const IS="Popper",[MS,Il]=Ir(IS),[w9,NS]=MS(IS),b9=t=>{const{__scopePopper:e,children:r}=t,[n,i]=x.useState(null);return x.createElement(w9,{scope:e,anchor:n,onAnchorChange:i},r)},x9="PopperAnchor",C9=x.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=NS(x9,r),o=x.useRef(null),a=Dt(e,o);return x.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:x.createElement(Be.div,fe({},i,{ref:a}))}),RS="PopperContent",[E9,xG]=MS(RS),A9=x.forwardRef((t,e)=>{var r,n,i,s,o,a,l,f;const{__scopePopper:c,side:u="bottom",sideOffset:d=0,align:v="center",alignOffset:g=0,arrowPadding:m=0,collisionBoundary:M=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:S=!1,avoidCollisions:P=!0,onPlaced:R,...L}=t,F=NS(RS,c),[z,H]=x.useState(null),q=Dt(e,ie=>H(ie)),[K,ne]=x.useState(null),O=Gg(K),y=(r=O==null?void 0:O.width)!==null&&r!==void 0?r:0,w=(n=O==null?void 0:O.height)!==null&&n!==void 0?n:0,T=u+(v!=="center"?"-"+v:""),N=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},p=Array.isArray(M)?M:[M],k=p.length>0,I={padding:N,boundary:p.filter(S9),altBoundary:k},{refs:b,floatingStyles:h,placement:_,isPositioned:$,middlewareData:C}=m9({strategy:"fixed",placement:T,whileElementsMounted:y9,elements:{reference:F.anchor},middleware:[l9({mainAxis:d+w,alignmentAxis:g}),P&&f9({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?c9():void 0,...I}),P&&o9({...I}),u9({...I,apply:({elements:ie,rects:ve,availableWidth:Kt,availableHeight:Ie})=>{const{width:Ee,height:St}=ve.reference,De=ie.floating.style;De.setProperty("--radix-popper-available-width",`${Kt}px`),De.setProperty("--radix-popper-available-height",`${Ie}px`),De.setProperty("--radix-popper-anchor-width",`${Ee}px`),De.setProperty("--radix-popper-anchor-height",`${St}px`)}}),K&&g9({element:K,padding:m}),k9({arrowWidth:y,arrowHeight:w}),S&&a9({strategy:"referenceHidden"})]}),[D,B]=OS(_),j=Tn(R);hn(()=>{$&&(j==null||j())},[$,j]);const Y=(i=C.arrow)===null||i===void 0?void 0:i.x,ee=(s=C.arrow)===null||s===void 0?void 0:s.y,G=((o=C.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[J,he]=x.useState();return hn(()=>{z&&he(window.getComputedStyle(z).zIndex)},[z]),x.createElement("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...h,transform:$?h.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,["--radix-popper-transform-origin"]:[(a=C.transformOrigin)===null||a===void 0?void 0:a.x,(l=C.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},x.createElement(E9,{scope:c,placedSide:D,onArrowChange:ne,arrowX:Y,arrowY:ee,shouldHideArrow:G},x.createElement(Be.div,fe({"data-side":D,"data-align":B},L,{ref:q,style:{...L.style,animation:$?void 0:"none",opacity:(f=C.hide)!==null&&f!==void 0&&f.referenceHidden?0:void 0}}))))});function S9(t){return t!==null}const k9=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:l,middlewareData:f}=e,u=((r=f.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,v=u?0:t.arrowHeight,[g,m]=OS(a),M={start:"0%",center:"50%",end:"100%"}[m],E=((n=(i=f.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,A=((s=(o=f.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+v/2;let S="",P="";return g==="bottom"?(S=u?M:`${E}px`,P=`${-v}px`):g==="top"?(S=u?M:`${E}px`,P=`${l.floating.height+v}px`):g==="right"?(S=`${-v}px`,P=u?M:`${A}px`):g==="left"&&(S=`${l.floating.width+v}px`,P=u?M:`${A}px`),{data:{x:S,y:P}}}});function OS(t){const[e,r="center"]=t.split("-");return[e,r]}const _9=b9,T9=C9,P9=A9,I9=x.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?iP.createPortal(x.createElement(Be.div,fe({},i,{ref:e})),n):null}),jv="rovingFocusGroup.onEntryFocus",M9={bubbles:!1,cancelable:!0},em="RovingFocusGroup",[Iy,DS,N9]=i1(em),[R9,Ml]=Ir(em,[N9]),[O9,D9]=R9(em),B9=x.forwardRef((t,e)=>x.createElement(Iy.Provider,{scope:t.__scopeRovingFocusGroup},x.createElement(Iy.Slot,{scope:t.__scopeRovingFocusGroup},x.createElement(L9,fe({},t,{ref:e}))))),L9=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:f,...c}=t,u=x.useRef(null),d=Dt(e,u),v=Yg(s),[g=null,m]=dl({prop:o,defaultProp:a,onChange:l}),[M,E]=x.useState(!1),A=Tn(f),S=DS(r),P=x.useRef(!1),[R,L]=x.useState(0);return x.useEffect(()=>{const F=u.current;if(F)return F.addEventListener(jv,A),()=>F.removeEventListener(jv,A)},[A]),x.createElement(O9,{scope:r,orientation:n,dir:v,loop:i,currentTabStopId:g,onItemFocus:x.useCallback(F=>m(F),[m]),onItemShiftTab:x.useCallback(()=>E(!0),[]),onFocusableItemAdd:x.useCallback(()=>L(F=>F+1),[]),onFocusableItemRemove:x.useCallback(()=>L(F=>F-1),[])},x.createElement(Be.div,fe({tabIndex:M||R===0?-1:0,"data-orientation":n},c,{ref:d,style:{outline:"none",...t.style},onMouseDown:we(t.onMouseDown,()=>{P.current=!0}),onFocus:we(t.onFocus,F=>{const z=!P.current;if(F.target===F.currentTarget&&z&&!M){const H=new CustomEvent(jv,M9);if(F.currentTarget.dispatchEvent(H),!H.defaultPrevented){const q=S().filter(w=>w.focusable),K=q.find(w=>w.active),ne=q.find(w=>w.id===g),y=[K,ne,...q].filter(Boolean).map(w=>w.ref.current);BS(y)}}P.current=!1}),onBlur:we(t.onBlur,()=>E(!1))})))}),$9="RovingFocusGroupItem",F9=x.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=$c(),l=s||a,f=D9($9,r),c=f.currentTabStopId===l,u=DS(r),{onFocusableItemAdd:d,onFocusableItemRemove:v}=f;return x.useEffect(()=>{if(n)return d(),()=>v()},[n,d,v]),x.createElement(Iy.ItemSlot,{scope:r,id:l,focusable:n,active:i},x.createElement(Be.span,fe({tabIndex:c?0:-1,"data-orientation":f.orientation},o,{ref:e,onMouseDown:we(t.onMouseDown,g=>{n?f.onItemFocus(l):g.preventDefault()}),onFocus:we(t.onFocus,()=>f.onItemFocus(l)),onKeyDown:we(t.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=U9(g,f.orientation,f.dir);if(m!==void 0){g.preventDefault();let E=u().filter(A=>A.focusable).map(A=>A.ref.current);if(m==="last")E.reverse();else if(m==="prev"||m==="next"){m==="prev"&&E.reverse();const A=E.indexOf(g.currentTarget);E=f.loop?V9(E,A+1):E.slice(A+1)}setTimeout(()=>BS(E))}})})))}),j9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function z9(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function U9(t,e,r){const n=z9(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return j9[n]}function BS(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function V9(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const W9=B9,LS=F9;var H9=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},da=new WeakMap,bu=new WeakMap,xu={},zv=0,$S=function(t){return t&&(t.host||$S(t.parentNode))},q9=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=$S(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},G9=function(t,e,r,n){var i=q9(e,Array.isArray(t)?t:[t]);xu[r]||(xu[r]=new WeakMap);var s=xu[r],o=[],a=new Set,l=new Set(i),f=function(u){!u||a.has(u)||(a.add(u),f(u.parentNode))};i.forEach(f);var c=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))c(d);else{var v=d.getAttribute(n),g=v!==null&&v!=="false",m=(da.get(d)||0)+1,M=(s.get(d)||0)+1;da.set(d,m),s.set(d,M),o.push(d),m===1&&g&&bu.set(d,!0),M===1&&d.setAttribute(r,"true"),g||d.setAttribute(n,"true")}})};return c(e),a.clear(),zv++,function(){o.forEach(function(u){var d=da.get(u)-1,v=s.get(u)-1;da.set(u,d),s.set(u,v),d||(bu.has(u)||u.removeAttribute(n),bu.delete(u)),v||u.removeAttribute(r)}),zv--,zv||(da=new WeakMap,da=new WeakMap,bu=new WeakMap,xu={})}},K9=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||H9(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),G9(n,i,r,"aria-hidden")):function(){return null}},li=function(){return li=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return uO;var e=dO(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])}},vO=US(),yO=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(Q9,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(a,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(s,`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(Xu,` { + right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Zu,` { + margin-right: `).concat(a,"px ").concat(n,`; + } + + .`).concat(Xu," .").concat(Xu,` { + right: 0 `).concat(n,`; + } + + .`).concat(Zu," .").concat(Zu,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(Y9,": ").concat(a,`px; + } +`)},pO=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=x.useMemo(function(){return hO(i)},[i]);return x.createElement(vO,{styles:yO(s,!e,i,r?"":"!important")})},My=!1;if(typeof window<"u")try{var Cu=Object.defineProperty({},"passive",{get:function(){return My=!0,!0}});window.addEventListener("test",Cu,Cu),window.removeEventListener("test",Cu,Cu)}catch{My=!1}var ha=My?{passive:!1}:!1,gO=function(t){return t.tagName==="TEXTAREA"},VS=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!gO(t)&&r[e]==="visible")},mO=function(t){return VS(t,"overflowY")},wO=function(t){return VS(t,"overflowX")},K2=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=WS(t,r);if(n){var i=HS(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bO=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},xO=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},WS=function(t,e){return t==="v"?mO(e):wO(e)},HS=function(t,e){return t==="v"?bO(e):xO(e)},CO=function(t,e){return t==="h"&&e==="rtl"?-1:1},EO=function(t,e,r,n,i){var s=CO(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,l=e.contains(a),f=!1,c=o>0,u=0,d=0;do{var v=HS(t,a),g=v[0],m=v[1],M=v[2],E=m-M-s*g;(g||E)&&WS(t,a)&&(u+=E,d+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&(i&&u===0||!i&&o>u)||!c&&(i&&d===0||!i&&-o>d))&&(f=!0),f},Eu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},J2=function(t){return[t.deltaX,t.deltaY]},Q2=function(t){return t&&"current"in t?t.current:t},AO=function(t,e){return t[0]===e[0]&&t[1]===e[1]},SO=function(t){return` + .block-interactivity-`.concat(t,` {pointer-events: none;} + .allow-interactivity-`).concat(t,` {pointer-events: all;} +`)},kO=0,va=[];function _O(t){var e=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),i=x.useState(kO++)[0],s=x.useState(function(){return US()})[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(i));var m=J9([t.lockRef.current],(t.shards||[]).map(Q2),!0).filter(Boolean);return m.forEach(function(M){return M.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=x.useCallback(function(m,M){if("touches"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var E=Eu(m),A=r.current,S="deltaX"in m?m.deltaX:A[0]-E[0],P="deltaY"in m?m.deltaY:A[1]-E[1],R,L=m.target,F=Math.abs(S)>Math.abs(P)?"h":"v";if("touches"in m&&F==="h"&&L.type==="range")return!1;var z=K2(F,L);if(!z)return!0;if(z?R=F:(R=F==="v"?"h":"v",z=K2(F,L)),!z)return!1;if(!n.current&&"changedTouches"in m&&(S||P)&&(n.current=R),!R)return!0;var H=n.current||R;return EO(H,M,m,H==="h"?S:P,!0)},[]),l=x.useCallback(function(m){var M=m;if(!(!va.length||va[va.length-1]!==s)){var E="deltaY"in M?J2(M):Eu(M),A=e.current.filter(function(R){return R.name===M.type&&R.target===M.target&&AO(R.delta,E)})[0];if(A&&A.should){M.cancelable&&M.preventDefault();return}if(!A){var S=(o.current.shards||[]).map(Q2).filter(Boolean).filter(function(R){return R.contains(M.target)}),P=S.length>0?a(M,S[0]):!o.current.noIsolation;P&&M.cancelable&&M.preventDefault()}}},[]),f=x.useCallback(function(m,M,E,A){var S={name:m,delta:M,target:E,should:A};e.current.push(S),setTimeout(function(){e.current=e.current.filter(function(P){return P!==S})},1)},[]),c=x.useCallback(function(m){r.current=Eu(m),n.current=void 0},[]),u=x.useCallback(function(m){f(m.type,J2(m),m.target,a(m,t.lockRef.current))},[]),d=x.useCallback(function(m){f(m.type,Eu(m),m.target,a(m,t.lockRef.current))},[]);x.useEffect(function(){return va.push(s),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,ha),document.addEventListener("touchmove",l,ha),document.addEventListener("touchstart",c,ha),function(){va=va.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,ha),document.removeEventListener("touchmove",l,ha),document.removeEventListener("touchstart",c,ha)}},[]);var v=t.removeScrollBar,g=t.inert;return x.createElement(x.Fragment,null,g?x.createElement(s,{styles:SO(i)}):null,v?x.createElement(pO,{gapMode:"margin"}):null)}const TO=iO(zS,_O);var qS=x.forwardRef(function(t,e){return x.createElement(a1,li({},t,{ref:e,sideCar:TO}))});qS.classNames=a1.classNames;const PO=qS,IO=["Enter"," "],l1="Menu",[MO,CG,NO]=i1(l1),[na,GS]=Ir(l1,[NO,Il,Ml]);Il();const RO=Ml();na(l1);const[EG,OO]=na(l1),DO="MenuPortal";na(DO,{forceMount:void 0});const BO="MenuContent",[AG,KS]=na(BO),Ny="MenuItem",Y2="menu.itemSelect",JS=x.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=x.useRef(null),o=OO(Ny,t.__scopeMenu),a=KS(Ny,t.__scopeMenu),l=Dt(e,s),f=x.useRef(!1),c=()=>{const u=s.current;if(!r&&u){const d=new CustomEvent(Y2,{bubbles:!0,cancelable:!0});u.addEventListener(Y2,v=>n==null?void 0:n(v),{once:!0}),Kg(u,d),d.defaultPrevented?f.current=!1:o.onClose()}};return x.createElement(LO,fe({},i,{ref:l,disabled:r,onClick:we(t.onClick,c),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),f.current=!0},onPointerUp:we(t.onPointerUp,u=>{var d;f.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:we(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||IO.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),LO=x.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=KS(Ny,r),a=RO(r),l=x.useRef(null),f=Dt(e,l),[c,u]=x.useState(!1),[d,v]=x.useState("");return x.useEffect(()=>{const g=l.current;if(g){var m;v(((m=g.textContent)!==null&&m!==void 0?m:"").trim())}},[s.children]),x.createElement(MO.ItemSlot,{scope:r,disabled:n,textValue:i??d},x.createElement(LS,fe({asChild:!0},a,{focusable:!n}),x.createElement(Be.div,fe({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:f,onPointerMove:we(t.onPointerMove,X2(g=>{n?o.onItemLeave(g):(o.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:we(t.onPointerLeave,X2(g=>o.onItemLeave(g))),onFocus:we(t.onFocus,()=>u(!0)),onBlur:we(t.onBlur,()=>u(!1))}))))}),$O=x.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return x.createElement(YS,{scope:t.__scopeMenu,checked:r},x.createElement(JS,fe({role:"menuitemcheckbox","aria-checked":nh(r)?"mixed":r},i,{ref:e,"data-state":tm(r),onSelect:we(i.onSelect,()=>n==null?void 0:n(nh(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),FO="MenuRadioGroup",[SG,jO]=na(FO,{value:void 0,onValueChange:()=>{}}),zO="MenuRadioItem",UO=x.forwardRef((t,e)=>{const{value:r,...n}=t,i=jO(zO,t.__scopeMenu),s=r===i.value;return x.createElement(YS,{scope:t.__scopeMenu,checked:s},x.createElement(JS,fe({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":tm(s),onSelect:we(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),QS="MenuItemIndicator",[YS,VO]=na(QS,{checked:!1}),WO=x.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=VO(QS,r);return x.createElement(Lc,{present:n||nh(s.checked)||s.checked===!0},x.createElement(Be.span,fe({},i,{ref:e,"data-state":tm(s.checked)})))}),HO="MenuSub";na(HO);function nh(t){return t==="indeterminate"}function tm(t){return nh(t)?"indeterminate":t?"checked":"unchecked"}function X2(t){return e=>e.pointerType==="mouse"?t(e):void 0}const qO=$O,GO=UO,KO=WO,XS="DropdownMenu",[JO,kG]=Ir(XS,[GS]),rm=GS();JO(XS);const QO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=rm(r);return x.createElement(qO,fe({},i,n,{ref:e}))}),YO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=rm(r);return x.createElement(GO,fe({},i,n,{ref:e}))}),XO=x.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=rm(r);return x.createElement(KO,fe({},i,n,{ref:e}))}),ZO=QO,eD=YO,ZS=XO;var ek="_1k2mbvi5",tk="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12vk fyvr12ve fyvr11h0 fyvr11ko fyvr11jw fyvr12tz fyvr11n2 fyvr11hw fyvr12r5";const tD=({children:t})=>W.jsx(ZS,{className:ek,children:t});x.forwardRef(({className:t,children:e,...r},n)=>W.jsxs(ZO,{className:Vr(tk,t),...r,ref:n,children:[W.jsx(tD,{children:W.jsx(cS,{size:"xs"})}),W.jsx(nr,{variant:"small",children:e})]}));x.forwardRef(({className:t,children:e,...r},n)=>W.jsxs(eD,{className:Vr(tk,t),...r,ref:n,children:[W.jsx(ZS,{className:ek,children:W.jsx(nr,{children:"ā€¢"})}),W.jsx(nr,{variant:"small",children:e})]}));const rk=x.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return W.jsx(je,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),rD=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var nD="fyvr12vh fyvr12vb fyvr11ho fyvr12ub fyvr1ko fyvr1oo fyvr1mo fyvr1qo",iD="_1hq71vk1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12j5 fyvr12bz fyvr11xn fyvr124t fyvr12mt fyvr12fn fyvr121b fyvr128h fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",sD=Bt({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const oD={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};x.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:l,onValueChange:f,placeholder:c="Upload a file",validExtensions:u,...d}=t,v=x.useRef(null),g=rD(v,e),[m,M]=x.useState(null),E=S=>{const P=S.currentTarget.files;if(!P||!P[0])return;const R=P[0],L=R.name,F=R.size/1e3;M({name:L,size:F,extension:L.split(".").pop()??""}),f==null||f(R)},A=u.map(S=>oD[S]).join(",");return W.jsx(_l,{description:n,disabled:i,display:"grid",id:s??l,label:o,labelLocation:a,children:W.jsx(pe,{width:"full",children:W.jsxs(pe,{justifyContent:m?"space-between":"flex-start",color:m?"text100":"text50",className:Vr(iD,sD({borderRadius:r})),children:[m?W.jsxs(pe,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[W.jsx(nr,{children:m.name}),W.jsxs(nr,{color:"text50",variant:"xsmall",children:[m.size.toFixed(2)," kb"]})]}):W.jsx(nr,{children:c}),W.jsx(pe,{accept:A,as:"input",className:nD,cursor:m?"text":"pointer",disabled:i||!!m,id:s??l,name:l,onChange:E,ref:g,type:"file",...d}),m&&W.jsx(rk,{cursor:"pointer",icon:dS,size:"xs",onClick:S=>{var P;S.preventDefault(),S.stopPropagation(),(P=v.current)!=null&&P.value&&(v.current.value=""),f==null||f(null),M(null)},zIndex:"10"})]})})})});var aD=Bt({defaultClassName:"",variantClassNames:{size:{xs:"_1bhyzin0",sm:"_1bhyzin1",md:"_1bhyzin2",lg:"_1bhyzin3",xl:"_1bhyzin4"}},defaultVariants:{},compoundVariants:[]});const wo=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>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)},lD=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:wo(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}};x.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=[];for(let l=0;l({...lD(l.a,l.b,l.c),x:l.x%1e3,y:l.y%1e3,r:100+l.r%(1500/(f+1))}));return W.jsxs(pe,{as:"svg",className:Vr(e,aD({size:n})),viewBox:"0 0 1000 1000",version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[W.jsxs("defs",{children:[W.jsx("clipPath",{id:"circle-clip",children:W.jsx("circle",{cx:"500",cy:"500",r:"500"})}),W.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[W.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),W.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),W.jsx("feGaussianBlur",{stdDeviation:"100",result:"effect1_foregroundBlur"})]}),a.map(l=>W.jsxs(x.Fragment,{children:[W.jsxs("radialGradient",{id:`gradient-primary-${l.id}`,children:[W.jsx("stop",{offset:"0",stopColor:l.a}),W.jsx("stop",{offset:"1",stopColor:l.b})]}),W.jsxs("radialGradient",{id:`gradient-secondary-${l.id}`,children:[W.jsx("stop",{offset:"0",stopColor:l.c}),W.jsx("stop",{offset:"1",stopColor:l.b})]})]},l.id)),W.jsxs("linearGradient",{id:`gradient-background-${a[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[W.jsx("stop",{offset:"0",stopColor:a[0].c}),W.jsx("stop",{offset:"1",stopColor:a[0].a})]})]}),W.jsxs("g",{clipPath:"url(#circle-clip)",children:[W.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${a[0].id})`}),W.jsx("g",{filter:"url(#blur)",children:a.map(l=>W.jsxs(x.Fragment,{children:[W.jsx("circle",{fill:`url(#gradient-primary-${l.id})`,cx:l.x,cy:l.y,r:l.r}),W.jsx("circle",{fill:`url(#gradient-secondary-${l.id})`,cx:l.y,cy:l.x,r:l.r/2})]},l.id))})]})]})});const nk=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=x.useState(!1),o=a=>{s(!0),r==null||r(a)};return W.jsx(pe,{as:Qu.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},ik="Dialog",[sk,_G]=Ir(ik);sk(ik);const fD="DialogPortal";sk(fD,{forceMount:void 0});Bt({defaultClassName:"",variantClassNames:{shadows:{true:"_1vqx0w93",false:"_1vqx0w94"},direction:{vertical:"_1vqx0w95",horizontal:"_1vqx0w96"}},defaultVariants:{},compoundVariants:[]});Bt({defaultClassName:"fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w91",horizontal:"_1vqx0w92"}},defaultVariants:{},compoundVariants:[]});Bt({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12vk fyvr12ve fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]});var cD=Bt({defaultClassName:"fyvr1t4 fyvr1v0 fyvr12vh fyvr12vb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),uD="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rh fyvr1g0 fyvr118g",dD=Bt({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ok=x.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",leftIcon:c,rightIcon:u,name:d,controls:v,type:g="text",numeric:m=!1,...M}=t;return W.jsx(_l,{description:s,disabled:o,display:"grid",id:a??d,label:l,labelLocation:f,children:W.jsx(pe,{width:"full",children:W.jsxs(pe,{className:Vr(uD,dD({borderRadius:i})),children:[c&&W.jsx(c,{size:"sm"}),W.jsx(pe,{as:r,autoComplete:n,spellCheck:"false",className:cD({numeric:m}),disabled:o,id:a??d,name:d,ref:e,type:g,...M}),u&&W.jsx(u,{size:"sm"}),v]})})})}),hD=RegExp("^\\d*(?:\\\\[.])?\\d*$");function vD(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}x.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=f=>{let{value:c}=f.target;c=c.replace(/,/g,"."),c.startsWith(".")&&(c="0"+c),c.startsWith("0")&&(c=c.replace(/^0+(?=\d)/,"")),(c===""||hD.test(vD(c)))&&(i==null||i({...f,target:{...f.target,value:c}}))},l=f=>{const{value:c}=f.target;let u=c;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),s==null||s(f),u!==c&&(i==null||i({...f,target:{...f.target,value:u}}))};return W.jsx(ok,{name:r,onChange:a,onBlur:l,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})});Bt({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const ak="Progress",f1=100,[yD,TG]=Ir(ak),[pD,PG]=yD(ak),gD=x.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=mD,...o}=t,a=Ry(i)?i:f1,l=lk(n,a)?n:null,f=ih(l)?s(l,a):void 0;return x.createElement(pD,{scope:r,value:l,max:a},x.createElement(Be.div,fe({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ih(l)?l:void 0,"aria-valuetext":f,role:"progressbar","data-state":wD(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});gD.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!Ry(n)?new Error(bD(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=Ry(t.max)?t.max:f1;return n!=null&&!lk(n,s)?new Error(xD(i,r)):null}};function mD(t,e){return`${Math.round(t/e*100)}%`}function wD(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ih(t){return typeof t=="number"}function Ry(t){return ih(t)&&!isNaN(t)&&t>0}function lk(t,e){return ih(t)&&!isNaN(t)&&t<=e&&t>=0}function bD(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${f1}\`.`}function xD(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 ${f1} if no \`max\` prop is set) + - \`null\` if the progress is indeterminate. + +Defaulting to \`null\`.`}const fk="Radio",[CD,ck]=Ir(fk),[ED,AD]=CD(fk),SD=x.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:l,...f}=t,[c,u]=x.useState(null),d=Dt(e,m=>u(m)),v=x.useRef(!1),g=c?Boolean(c.closest("form")):!0;return x.createElement(ED,{scope:r,checked:i,disabled:o},x.createElement(Be.button,fe({type:"button",role:"radio","aria-checked":i,"data-state":uk(i),"data-disabled":o?"":void 0,disabled:o,value:a},f,{ref:d,onClick:we(t.onClick,m=>{i||l==null||l(),g&&(v.current=m.isPropagationStopped(),v.current||m.stopPropagation())})})),g&&x.createElement(TD,{control:c,bubbles:!v.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),kD="RadioIndicator",_D=x.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=AD(kD,r);return x.createElement(Lc,{present:n||s.checked},x.createElement(Be.span,fe({"data-state":uk(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),TD=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=x.useRef(null),o=qg(r),a=Gg(e);return x.useEffect(()=>{const l=s.current,f=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(f,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),x.createElement("input",fe({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uk(t){return t?"checked":"unchecked"}const PD=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],dk="RadioGroup",[ID,IG]=Ir(dk,[Ml,ck]),hk=Ml(),vk=ck(),[MD,ND]=ID(dk),RD=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:l,dir:f,loop:c=!0,onValueChange:u,...d}=t,v=hk(r),g=Yg(f),[m,M]=dl({prop:s,defaultProp:i,onChange:u});return x.createElement(MD,{scope:r,name:n,required:o,disabled:a,value:m,onValueChange:M},x.createElement(W9,fe({asChild:!0},v,{orientation:l,dir:g,loop:c}),x.createElement(Be.div,fe({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:g},d,{ref:e}))))}),OD="RadioGroupItem",DD=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=ND(OD,r),o=s.disabled||n,a=hk(r),l=vk(r),f=x.useRef(null),c=Dt(e,f),u=s.value===i.value,d=x.useRef(!1);return x.useEffect(()=>{const v=m=>{PD.includes(m.key)&&(d.current=!0)},g=()=>d.current=!1;return document.addEventListener("keydown",v),document.addEventListener("keyup",g),()=>{document.removeEventListener("keydown",v),document.removeEventListener("keyup",g)}},[]),x.createElement(LS,fe({asChild:!0},a,{focusable:!o,active:u}),x.createElement(SD,fe({disabled:o,required:s.required,checked:u},l,i,{name:s.name,ref:c,onCheck:()=>s.onValueChange(i.value),onKeyDown:we(v=>{v.key==="Enter"&&v.preventDefault()}),onFocus:we(i.onFocus,()=>{var v;d.current&&((v=f.current)===null||v===void 0||v.click())})})))}),BD=x.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=vk(r);return x.createElement(_D,fe({},i,n,{ref:e}))}),LD=RD,$D=DD,FD=BD;var jD=Bt({defaultClassName:"io59uy6 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rh",variantClassNames:{size:{sm:"io59uy7",lg:"io59uy8"}},defaultVariants:{},compoundVariants:[]}),zD=Bt({defaultClassName:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12jb fyvr12c5 fyvr11xt fyvr124z fyvr12mn fyvr12fh fyvr1215 fyvr128b fyvr11ob fyvr12tz fyvr12tv fyvr12uj",variantClassNames:{size:{sm:"io59uy3 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy4 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const UD=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return W.jsx(pe,{alignItems:"center",children:W.jsx(_l,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:W.jsx($D,{className:zD({size:n}),value:i,id:e,disabled:s,children:W.jsx(FD,{className:jD({size:n})})})})})};x.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...l}=t;return W.jsx(LD,{disabled:n,name:s,ref:e,...l,children:W.jsx(pe,{flexDirection:r,gap:i,children:o.map(({label:f,value:c,disabled:u})=>W.jsx(UD,{id:`${s}-${c}`,label:f,size:a,value:c,disabled:u},c))})})});function Z2(t,[e,r]){return Math.min(r,Math.max(e,t))}const yk=x.forwardRef((t,e)=>x.createElement(Be.span,fe({},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}}))),VD=[" ","Enter","ArrowUp","ArrowDown"],WD=[" ","Enter"],c1="Select",[u1,nm,HD]=i1(c1),[Nl,MG]=Ir(c1,[HD,Il]),im=Il(),[qD,ia]=Nl(c1),[GD,KD]=Nl(c1),JD=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:l,dir:f,name:c,autoComplete:u,disabled:d,required:v}=t,g=im(e),[m,M]=x.useState(null),[E,A]=x.useState(null),[S,P]=x.useState(!1),R=Yg(f),[L=!1,F]=dl({prop:n,defaultProp:i,onChange:s}),[z,H]=dl({prop:o,defaultProp:a,onChange:l}),q=x.useRef(null),K=m?Boolean(m.closest("form")):!0,[ne,O]=x.useState(new Set),y=Array.from(ne).map(w=>w.props.value).join(";");return x.createElement(_9,g,x.createElement(qD,{required:v,scope:e,trigger:m,onTriggerChange:M,valueNode:E,onValueNodeChange:A,valueNodeHasChildren:S,onValueNodeHasChildrenChange:P,contentId:$c(),value:z,onValueChange:H,open:L,onOpenChange:F,dir:R,triggerPointerDownPosRef:q,disabled:d},x.createElement(u1.Provider,{scope:e},x.createElement(GD,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(w=>{O(T=>new Set(T).add(w))},[]),onNativeOptionRemove:x.useCallback(w=>{O(T=>{const N=new Set(T);return N.delete(w),N})},[])},r)),K?x.createElement(gk,{key:y,"aria-hidden":!0,required:v,tabIndex:-1,name:c,autoComplete:u,value:z,onChange:w=>H(w.target.value),disabled:d},z===void 0?x.createElement("option",{value:""}):null,Array.from(ne)):null))},QD="SelectTrigger",YD=x.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=im(r),o=ia(QD,r),a=o.disabled||n,l=Dt(e,o.onTriggerChange),f=nm(r),[c,u,d]=mk(g=>{const m=f().filter(A=>!A.disabled),M=m.find(A=>A.value===o.value),E=wk(m,g,M);E!==void 0&&o.onValueChange(E.value)}),v=()=>{a||(o.onOpenChange(!0),d())};return x.createElement(T9,fe({asChild:!0},s),x.createElement(Be.button,fe({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":o.value===void 0?"":void 0},i,{ref:l,onClick:we(i.onClick,g=>{g.currentTarget.focus()}),onPointerDown:we(i.onPointerDown,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(v(),o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:we(i.onKeyDown,g=>{const m=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&u(g.key),!(m&&g.key===" ")&&VD.includes(g.key)&&(v(),g.preventDefault())})})))}),XD="SelectValue",ZD=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o,...a}=t,l=ia(XD,r),{onValueNodeHasChildrenChange:f}=l,c=s!==void 0,u=Dt(e,l.onValueNodeChange);return hn(()=>{f(c)},[f,c]),x.createElement(Be.span,fe({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:s)}),eB=x.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return x.createElement(Be.span,fe({"aria-hidden":!0},i,{ref:e}),n||"ā–¼")}),vl="SelectContent",tB=x.forwardRef((t,e)=>{const r=ia(vl,t.__scopeSelect),[n,i]=x.useState();if(hn(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?wi.createPortal(x.createElement(pk,{scope:t.__scopeSelect},x.createElement(u1.Slot,{scope:t.__scopeSelect},x.createElement("div",null,t.children))),s):null}return x.createElement(rB,fe({},t,{ref:e}))}),Ti=10,[pk,d1]=Nl(vl),rB=x.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:d,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:M,...E}=t,A=ia(vl,r),[S,P]=x.useState(null),[R,L]=x.useState(null),F=Dt(e,B=>P(B)),[z,H]=x.useState(null),[q,K]=x.useState(null),ne=nm(r),[O,y]=x.useState(!1),w=x.useRef(!1);x.useEffect(()=>{if(S)return K9(S)},[S]),K7();const T=x.useCallback(B=>{const[j,...Y]=ne().map(J=>J.ref.current),[ee]=Y.slice(-1),G=document.activeElement;for(const J of B)if(J===G||(J==null||J.scrollIntoView({block:"nearest"}),J===j&&R&&(R.scrollTop=0),J===ee&&R&&(R.scrollTop=R.scrollHeight),J==null||J.focus(),document.activeElement!==G))return},[ne,R]),N=x.useCallback(()=>T([z,S]),[T,z,S]);x.useEffect(()=>{O&&N()},[O,N]);const{onOpenChange:p,triggerPointerDownPosRef:k}=A;x.useEffect(()=>{if(S){let B={x:0,y:0};const j=ee=>{var G,J,he,ie;B={x:Math.abs(Math.round(ee.pageX)-((G=(J=k.current)===null||J===void 0?void 0:J.x)!==null&&G!==void 0?G:0)),y:Math.abs(Math.round(ee.pageY)-((he=(ie=k.current)===null||ie===void 0?void 0:ie.y)!==null&&he!==void 0?he:0))}},Y=ee=>{B.x<=10&&B.y<=10?ee.preventDefault():S.contains(ee.target)||p(!1),document.removeEventListener("pointermove",j),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",Y,{capture:!0})}}},[S,p,k]),x.useEffect(()=>{const B=()=>p(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[p]);const[I,b]=mk(B=>{const j=ne().filter(G=>!G.disabled),Y=j.find(G=>G.ref.current===document.activeElement),ee=wk(j,B,Y);ee&&setTimeout(()=>ee.ref.current.focus())}),h=x.useCallback((B,j,Y)=>{const ee=!w.current&&!Y;(A.value!==void 0&&A.value===j||ee)&&(H(B),ee&&(w.current=!0))},[A.value]),_=x.useCallback(()=>S==null?void 0:S.focus(),[S]),$=x.useCallback((B,j,Y)=>{const ee=!w.current&&!Y;(A.value!==void 0&&A.value===j||ee)&&K(B)},[A.value]),C=n==="popper"?ex:nB,D=C===ex?{side:a,sideOffset:l,align:f,alignOffset:c,arrowPadding:u,collisionBoundary:d,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:M}:{};return x.createElement(pk,{scope:r,content:S,viewport:R,onViewportChange:L,itemRefCallback:h,selectedItem:z,onItemLeave:_,itemTextRefCallback:$,focusSelectedItem:N,selectedItemText:q,position:n,isPositioned:O,searchRef:I},x.createElement(PO,{as:uc,allowPinchZoom:!0},x.createElement(J7,{asChild:!0,trapped:A.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:we(i,B=>{var j;(j=A.trigger)===null||j===void 0||j.focus({preventScroll:!0}),B.preventDefault()})},x.createElement(yS,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>A.onOpenChange(!1)},x.createElement(C,fe({role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:B=>B.preventDefault()},E,D,{onPlaced:()=>y(!0),ref:F,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:we(E.onKeyDown,B=>{const j=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!j&&B.key.length===1&&b(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let ee=ne().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(B.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const G=B.target,J=ee.indexOf(G);ee=ee.slice(J+1)}setTimeout(()=>T(ee)),B.preventDefault()}})}))))))}),nB=x.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=ia(vl,r),o=d1(vl,r),[a,l]=x.useState(null),[f,c]=x.useState(null),u=Dt(e,F=>c(F)),d=nm(r),v=x.useRef(!1),g=x.useRef(!0),{viewport:m,selectedItem:M,selectedItemText:E,focusSelectedItem:A}=o,S=x.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&f&&m&&M&&E){const F=s.trigger.getBoundingClientRect(),z=f.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),q=E.getBoundingClientRect();if(s.dir!=="rtl"){const G=q.left-z.left,J=H.left-G,he=F.left-J,ie=F.width+he,ve=Math.max(ie,z.width),Kt=window.innerWidth-Ti,Ie=Z2(J,[Ti,Kt-ve]);a.style.minWidth=ie+"px",a.style.left=Ie+"px"}else{const G=z.right-q.right,J=window.innerWidth-H.right-G,he=window.innerWidth-F.right-J,ie=F.width+he,ve=Math.max(ie,z.width),Kt=window.innerWidth-Ti,Ie=Z2(J,[Ti,Kt-ve]);a.style.minWidth=ie+"px",a.style.right=Ie+"px"}const K=d(),ne=window.innerHeight-Ti*2,O=m.scrollHeight,y=window.getComputedStyle(f),w=parseInt(y.borderTopWidth,10),T=parseInt(y.paddingTop,10),N=parseInt(y.borderBottomWidth,10),p=parseInt(y.paddingBottom,10),k=w+T+O+p+N,I=Math.min(M.offsetHeight*5,k),b=window.getComputedStyle(m),h=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),$=F.top+F.height/2-Ti,C=ne-$,D=M.offsetHeight/2,B=M.offsetTop+D,j=w+T+B,Y=k-j;if(j<=$){const G=M===K[K.length-1].ref.current;a.style.bottom="0px";const J=f.clientHeight-m.offsetTop-m.offsetHeight,he=Math.max(C,D+(G?_:0)+J+N),ie=j+he;a.style.height=ie+"px"}else{const G=M===K[0].ref.current;a.style.top="0px";const he=Math.max($,w+m.offsetTop+(G?h:0)+D)+Y;a.style.height=he+"px",m.scrollTop=j-$+m.offsetTop}a.style.margin=`${Ti}px 0`,a.style.minHeight=I+"px",a.style.maxHeight=ne+"px",n==null||n(),requestAnimationFrame(()=>v.current=!0)}},[d,s.trigger,s.valueNode,a,f,m,M,E,s.dir,n]);hn(()=>S(),[S]);const[P,R]=x.useState();hn(()=>{f&&R(window.getComputedStyle(f).zIndex)},[f]);const L=x.useCallback(F=>{F&&g.current===!0&&(S(),A==null||A(),g.current=!1)},[S,A]);return x.createElement(iB,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:L},x.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P}},x.createElement(Be.div,fe({},i,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),ex=x.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=Ti,...s}=t,o=im(r);return x.createElement(P9,fe({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}}))}),[iB,sB]=Nl(vl,{}),tx="SelectViewport",oB=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=d1(tx,r),s=sB(tx,r),o=Dt(e,i.onViewportChange),a=x.useRef(0);return x.createElement(x.Fragment,null,x.createElement("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}"}}),x.createElement(u1.Slot,{scope:r},x.createElement(Be.div,fe({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:we(n.onScroll,l=>{const f=l.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:u}=s;if(u!=null&&u.current&&c){const d=Math.abs(a.current-f.scrollTop);if(d>0){const v=window.innerHeight-Ti*2,g=parseFloat(c.style.minHeight),m=parseFloat(c.style.height),M=Math.max(g,m);if(M0?S:0,c.style.justifyContent="flex-end")}}}a.current=f.scrollTop})}))))}),aB="SelectGroup",[lB,NG]=Nl(aB),fB=x.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=$c();return x.createElement(lB,{scope:r,id:i},x.createElement(Be.div,fe({role:"group","aria-labelledby":i},n,{ref:e})))}),Oy="SelectItem",[cB,uB]=Nl(Oy),dB=x.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=ia(Oy,r),l=d1(Oy,r),f=a.value===n,[c,u]=x.useState(s??""),[d,v]=x.useState(!1),g=Dt(e,E=>{var A;return(A=l.itemRefCallback)===null||A===void 0?void 0:A.call(l,E,n,i)}),m=$c(),M=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};return x.createElement(cB,{scope:r,value:n,disabled:i,textId:m,isSelected:f,onItemTextChange:x.useCallback(E=>{u(A=>{var S;return A||((S=E==null?void 0:E.textContent)!==null&&S!==void 0?S:"").trim()})},[])},x.createElement(u1.ItemSlot,{scope:r,value:n,disabled:i,textValue:c},x.createElement(Be.div,fe({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":f&&d,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:g,onFocus:we(o.onFocus,()=>v(!0)),onBlur:we(o.onBlur,()=>v(!1)),onPointerUp:we(o.onPointerUp,M),onPointerMove:we(o.onPointerMove,E=>{if(i){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}else E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(o.onPointerLeave,E=>{if(E.currentTarget===document.activeElement){var A;(A=l.onItemLeave)===null||A===void 0||A.call(l)}}),onKeyDown:we(o.onKeyDown,E=>{var A;((A=l.searchRef)===null||A===void 0?void 0:A.current)!==""&&E.key===" "||(WD.includes(E.key)&&M(),E.key===" "&&E.preventDefault())})}))))}),Au="SelectItemText",hB=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=ia(Au,r),a=d1(Au,r),l=uB(Au,r),f=KD(Au,r),[c,u]=x.useState(null),d=Dt(e,E=>u(E),l.onItemTextChange,E=>{var A;return(A=a.itemTextRefCallback)===null||A===void 0?void 0:A.call(a,E,l.value,l.disabled)}),v=c==null?void 0:c.textContent,g=x.useMemo(()=>x.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},v),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:M}=f;return hn(()=>(m(g),()=>M(g)),[m,M,g]),x.createElement(x.Fragment,null,x.createElement(Be.span,fe({id:l.textId},s,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?wi.createPortal(s.children,o.valueNode):null)}),gk=x.forwardRef((t,e)=>{const{value:r,...n}=t,i=x.useRef(null),s=Dt(e,i),o=qg(r);return x.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&c){const u=new Event("change",{bubbles:!0});c.call(a,r),a.dispatchEvent(u)}},[o,r]),x.createElement(yk,{asChild:!0},x.createElement("select",fe({},n,{ref:s,defaultValue:r})))});gk.displayName="BubbleSelect";function mk(t){const e=Tn(t),r=x.useRef(""),n=x.useRef(0),i=x.useCallback(o=>{const a=r.current+o;e(a),function l(f){r.current=f,window.clearTimeout(n.current),f!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),s=x.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function wk(t,e,r){const i=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=vB(t,Math.max(s,0));i.length===1&&(o=o.filter(f=>f!==r));const l=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function vB(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const yB=JD,pB=YD,gB=ZD,mB=eB,wB=tB,bB=oB,xB=fB,CB=dB,EB=hB;var AB="gohwum9 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rb fyvr12rh fyvr11nj",SB="gohwumd fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12vk fyvr12vl fyvr12ve fyvr12vf fyvr11h0 fyvr11jw fyvr11ko fyvr12tz fyvr12tv fyvr12rh fyvr12ut fyvr12uj",kB="gohwum1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rh fyvr118c fyvr11jw fyvr11n2 fyvr12tz",_B=Bt({defaultClassName:"",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const TB=x.forwardRef(({children:t,className:e,...r},n)=>W.jsx(CB,{className:Vr(SB,e),...r,ref:n,children:W.jsx(EB,{children:t})})),PB=x.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:l,options:f,placeholder:c,...u}=t;return W.jsx(_l,{disabled:n,display:"grid",id:i??l,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:W.jsxs(yB,{disabled:n,name:l,...u,children:[W.jsxs(pB,{id:i??l,className:Vr(kB,_B({borderRadius:r})),ref:e,children:[W.jsx(gB,{placeholder:c}),W.jsx(pe,{as:mB,display:"inline-flex",children:W.jsx(uS,{})})]}),W.jsx(wB,{className:AB,children:W.jsx(bB,{children:W.jsx(xB,{children:f.map(({value:d,label:v,...g})=>W.jsx(TB,{value:d,...g,children:v},d))})})})]})})});x.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,l=o?W.jsx(rk,{icon:dS,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return W.jsx(ok,{ref:e,name:s,leftIcon:g7,controls:r||l,placeholder:i,value:o,onChange:f=>n==null?void 0:n(f),...a})});var IB=Bt({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});x.forwardRef((t,e)=>{const{size:r="md",...n}=t;return W.jsx(pe,{className:IB({size:r}),color:"text50",ref:e,...n,children:W.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[W.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),W.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});x.forwardRef(({children:t},e)=>W.jsx(pe,{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}));const bk="Switch",[MB,RG]=Ir(bk);MB(bk);Bt({defaultClassName:"",variantClassNames:{active:{true:"fyvr11rn fyvr12rn fyvr12ux",false:"fyvr11ob fyvr12rb"},disabled:{true:"fyvr12uh"}},defaultVariants:{},compoundVariants:[]});const xk="Tabs",[NB,OG]=Ir(xk,[Ml]);Ml();NB(xk);var RB="fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";x.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return W.jsxs(pe,{className:RB,ref:e,background:"buttonGlass",...i,children:[r&&W.jsx(r,{size:"xs"}),W.jsx(nr,{children:n})]})});const OB="ToastProvider",[DB,DG,BB]=i1("Toast"),[Ck,BG]=Ir("Toast",[BB]),[LG,Ek]=Ck(OB),rx="toast.viewportPause",nx="toast.viewportResume",h1="Toast",LB="toast.swipeStart",$B="toast.swipeMove",FB="toast.swipeCancel",jB="toast.swipeEnd",[zB,UB]=Ck(h1,{onClose(){}}),VB=x.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:f,onSwipeStart:c,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:v,...g}=t,m=Ek(h1,r),[M,E]=x.useState(null),A=Dt(e,y=>E(y)),S=x.useRef(null),P=x.useRef(null),R=i||m.duration,L=x.useRef(0),F=x.useRef(R),z=x.useRef(0),{onToastAdd:H,onToastRemove:q}=m,K=Tn(()=>{var y;(M==null?void 0:M.contains(document.activeElement))&&((y=m.viewport)===null||y===void 0||y.focus()),o()}),ne=x.useCallback(y=>{!y||y===1/0||(window.clearTimeout(z.current),L.current=new Date().getTime(),z.current=window.setTimeout(K,y))},[K]);x.useEffect(()=>{const y=m.viewport;if(y){const w=()=>{ne(F.current),f==null||f()},T=()=>{const N=new Date().getTime()-L.current;F.current=F.current-N,window.clearTimeout(z.current),l==null||l()};return y.addEventListener(rx,T),y.addEventListener(nx,w),()=>{y.removeEventListener(rx,T),y.removeEventListener(nx,w)}}},[m.viewport,R,l,f,ne]),x.useEffect(()=>{s&&!m.isClosePausedRef.current&&ne(R)},[s,R,m.isClosePausedRef,ne]),x.useEffect(()=>(H(),()=>q()),[H,q]);const O=x.useMemo(()=>M?Sk(M):null,[M]);return m.viewport?x.createElement(x.Fragment,null,O&&x.createElement(WB,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},O),x.createElement(zB,{scope:r,onClose:K},wi.createPortal(x.createElement(DB.ItemSlot,{scope:r},x.createElement(G7,{asChild:!0,onEscapeKeyDown:we(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||K(),m.isFocusedToastEscapeKeyDownRef.current=!1})},x.createElement(Be.li,fe({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection},g,{ref:A,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:we(t.onKeyDown,y=>{y.key==="Escape"&&(a==null||a(y.nativeEvent),y.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,K()))}),onPointerDown:we(t.onPointerDown,y=>{y.button===0&&(S.current={x:y.clientX,y:y.clientY})}),onPointerMove:we(t.onPointerMove,y=>{if(!S.current)return;const w=y.clientX-S.current.x,T=y.clientY-S.current.y,N=Boolean(P.current),p=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,I=p?k(0,w):0,b=p?0:k(0,T),h=y.pointerType==="touch"?10:2,_={x:I,y:b},$={originalEvent:y,delta:_};N?(P.current=_,Su($B,u,$,{discrete:!1})):ix(_,m.swipeDirection,h)?(P.current=_,Su(LB,c,$,{discrete:!1}),y.target.setPointerCapture(y.pointerId)):(Math.abs(w)>h||Math.abs(T)>h)&&(S.current=null)}),onPointerUp:we(t.onPointerUp,y=>{const w=P.current,T=y.target;if(T.hasPointerCapture(y.pointerId)&&T.releasePointerCapture(y.pointerId),P.current=null,S.current=null,w){const N=y.currentTarget,p={originalEvent:y,delta:w};ix(w,m.swipeDirection,m.swipeThreshold)?Su(jB,v,p,{discrete:!0}):Su(FB,d,p,{discrete:!0}),N.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})))),m.viewport))):null});VB.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${h1}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const WB=t=>{const{__scopeToast:e,children:r,...n}=t,i=Ek(h1,e),[s,o]=x.useState(!1),[a,l]=x.useState(!1);return JB(()=>o(!0)),x.useEffect(()=>{const f=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(f)},[]),a?null:x.createElement(I9,{asChild:!0},x.createElement(yk,n,s&&x.createElement(x.Fragment,null,i.label," ",r)))},HB="ToastAction",qB=x.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?x.createElement(Ak,{altText:r,asChild:!0},x.createElement(KB,fe({},n,{ref:e}))):null});qB.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${HB}\``)}};const GB="ToastClose",KB=x.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=UB(GB,r);return x.createElement(Ak,{asChild:!0},x.createElement(Be.button,fe({type:"button"},n,{ref:e,onClick:we(t.onClick,i.onClose)})))}),Ak=x.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return x.createElement(Be.div,fe({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function Sk(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),QB(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...Sk(n))}}),e}function Su(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?Kg(i,s):i.dispatchEvent(s)}const ix=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function JB(t=()=>{}){const e=Tn(t);hn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function QB(t){return t.nodeType===t.ELEMENT_NODE}Bt({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});x.createContext(null);var YB="_15pztn2",XB="_15pztn1 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rh fyvr128 fyvr11h0";x.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:l="",labelLocation:f="hidden",name:c,rows:u,resize:d=!1,...v}=t;return W.jsx(_l,{description:s,disabled:o,display:"grid",id:a??c,label:l,labelLocation:f,children:W.jsx(pe,{as:r,autoComplete:n,spellCheck:"false",className:Vr(XB,d&&YB),disabled:o,id:a??c,name:c,ref:e,rows:u,borderRadius:i,...v})})});const Dy=["dark","light"],ZB="dark",eL="data-theme",kk="@sequence.theme",tL=()=>{const t=localStorage.getItem(kk);return Dy.includes(t)?t:ZB},rL=x.createContext(null),nL=t=>{const[e,r]=x.useState(t.theme||tL());x.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),x.useEffect(()=>{t.theme&&Dy.includes(t.theme)&&r(t.theme)},[t.theme]),x.useEffect(()=>{const i=document.querySelector(":root");i&&i.setAttribute(eL,e)},[e]);const n=x.useMemo(()=>({theme:e,setTheme:i=>{Dy.includes(i)&&(localStorage.setItem(kk,i),r(i))}}),[e]);return W.jsx(rL.Provider,{value:n,children:t.children})};var iL="bnrrebf fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",sL="bnrrebd",oL=Bt({defaultClassName:"fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb5",sm:"bnrreb6",md:"bnrreb7",lg:"bnrreb8"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});const aL=x.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...l}=t;return W.jsx(pe,{className:Vr(r,oL({borderRadius:e,size:a})),style:i,flexShrink:"0",...l,children:s?W.jsx(nk,{className:sL,disableAnimation:n,src:s}):W.jsx(nr,{className:iL,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})}),[v1,$G]=Ir("Tooltip",[Il]);Il();const lL="TooltipProvider";v1(lL);const _k="Tooltip";v1(_k);const fL="TooltipPortal";v1(fL,{forceMount:void 0});v1(_k,{isInside:!1});var Tk,sx=wi;Tk=sx.createRoot,sx.hydrateRoot;var By={},cL={get exports(){return By},set exports(t){By=t}};const uL={},dL=Object.freeze(Object.defineProperty({__proto__:null,default:uL},Symbol.toStringTag,{value:"Module"})),hL=P4(dL);(function(t){(function(e,r){function n(O,y){if(!O)throw new Error(y||"Assertion failed")}function i(O,y){O.super_=y;var w=function(){};w.prototype=y.prototype,O.prototype=new w,O.prototype.constructor=O}function s(O,y,w){if(s.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((y==="le"||y==="be")&&(w=y,y=10),this._init(O||0,y||10,w||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=hL.Buffer}catch{}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,w){return y.cmp(w)>0?y:w},s.min=function(y,w){return y.cmp(w)<0?y:w},s.prototype._init=function(y,w,T){if(typeof y=="number")return this._initNumber(y,w,T);if(typeof y=="object")return this._initArray(y,w,T);w==="hex"&&(w=16),n(w===(w|0)&&w>=2&&w<=36),y=y.toString().replace(/\s+/g,"");var N=0;y[0]==="-"&&(N++,this.negative=1),N=0;N-=3)k=y[N]|y[N-1]<<8|y[N-2]<<16,this.words[p]|=k<>>26-I&67108863,I+=24,I>=26&&(I-=26,p++);else if(T==="le")for(N=0,p=0;N>>26-I&67108863,I+=24,I>=26&&(I-=26,p++);return this._strip()};function a(O,y){var w=O.charCodeAt(y);if(w>=48&&w<=57)return w-48;if(w>=65&&w<=70)return w-55;if(w>=97&&w<=102)return w-87;n(!1,"Invalid character in "+O)}function l(O,y,w){var T=a(O,w);return w-1>=y&&(T|=a(O,w-1)<<4),T}s.prototype._parseHex=function(y,w,T){this.length=Math.ceil((y.length-w)/6),this.words=new Array(this.length);for(var N=0;N=w;N-=2)I=l(y,w,N)<=18?(p-=18,k+=1,this.words[k]|=I>>>26):p+=8;else{var b=y.length-w;for(N=b%2===0?w+1:w;N=18?(p-=18,k+=1,this.words[k]|=I>>>26):p+=8}this._strip()};function f(O,y,w,T){for(var N=0,p=0,k=Math.min(O.length,w),I=y;I=49?p=b-49+10:b>=17?p=b-17+10:p=b,n(b>=0&&p1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{s.prototype.inspect=u}else s.prototype.inspect=u;function u(){return(this.red?""}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(y,w){y=y||10,w=w|0||1;var T;if(y===16||y==="hex"){T="";for(var N=0,p=0,k=0;k>>24-N&16777215,N+=2,N>=26&&(N-=26,k--),p!==0||k!==this.length-1?T=d[6-b.length]+b+T:T=b+T}for(p!==0&&(T=p.toString(16)+T);T.length%w!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}if(y===(y|0)&&y>=2&&y<=36){var h=v[y],_=g[y];T="";var $=this.clone();for($.negative=0;!$.isZero();){var C=$.modrn(_).toString(y);$=$.idivn(_),$.isZero()?T=C+T:T=d[h-C.length]+C+T}for(this.isZero()&&(T="0"+T);T.length%w!==0;)T="0"+T;return this.negative!==0&&(T="-"+T),T}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(y,w){return this.toArrayLike(o,y,w)}),s.prototype.toArray=function(y,w){return this.toArrayLike(Array,y,w)};var m=function(y,w){return y.allocUnsafe?y.allocUnsafe(w):new y(w)};s.prototype.toArrayLike=function(y,w,T){this._strip();var N=this.byteLength(),p=T||Math.max(1,N);n(N<=p,"byte array longer than desired length"),n(p>0,"Requested array length <= 0");var k=m(y,p),I=w==="le"?"LE":"BE";return this["_toArrayLike"+I](k,N),k},s.prototype._toArrayLikeLE=function(y,w){for(var T=0,N=0,p=0,k=0;p>8&255),T>16&255),k===6?(T>24&255),N=0,k=0):(N=I>>>24,k+=2)}if(T=0&&(y[T--]=I>>8&255),T>=0&&(y[T--]=I>>16&255),k===6?(T>=0&&(y[T--]=I>>24&255),N=0,k=0):(N=I>>>24,k+=2)}if(T>=0)for(y[T--]=N;T>=0;)y[T--]=0},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var w=y,T=0;return w>=4096&&(T+=13,w>>>=13),w>=64&&(T+=7,w>>>=7),w>=8&&(T+=4,w>>>=4),w>=2&&(T+=2,w>>>=2),T+w},s.prototype._zeroBits=function(y){if(y===0)return 26;var w=y,T=0;return w&8191||(T+=13,w>>>=13),w&127||(T+=7,w>>>=7),w&15||(T+=4,w>>>=4),w&3||(T+=2,w>>>=2),w&1||T++,T},s.prototype.bitLength=function(){var y=this.words[this.length-1],w=this._countBits(y);return(this.length-1)*26+w};function M(O){for(var y=new Array(O.bitLength()),w=0;w>>N&1}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,w=0;wy.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var w;this.length>y.length?w=y:w=this;for(var T=0;Ty.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var w,T;this.length>y.length?(w=this,T=y):(w=y,T=this);for(var N=0;Ny.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){n(typeof y=="number"&&y>=0);var w=Math.ceil(y/26)|0,T=y%26;this._expand(w),T>0&&w--;for(var N=0;N0&&(this.words[N]=~this.words[N]&67108863>>26-T),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,w){n(typeof y=="number"&&y>=0);var T=y/26|0,N=y%26;return this._expand(T+1),w?this.words[T]=this.words[T]|1<y.length?(T=this,N=y):(T=y,N=this);for(var p=0,k=0;k>>26;for(;p!==0&&k>>26;if(this.length=T.length,p!==0)this.words[this.length]=p,this.length++;else if(T!==this)for(;ky.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var w=this.iadd(y);return y.negative=1,w._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var T=this.cmp(y);if(T===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,p;T>0?(N=this,p=y):(N=y,p=this);for(var k=0,I=0;I>26,this.words[I]=w&67108863;for(;k!==0&&I>26,this.words[I]=w&67108863;if(k===0&&I>>26,$=b&67108863,C=Math.min(h,y.length-1),D=Math.max(0,h-O.length+1);D<=C;D++){var B=h-D|0;N=O.words[B]|0,p=y.words[D]|0,k=N*p+$,_+=k/67108864|0,$=k&67108863}w.words[h]=$|0,b=_|0}return b!==0?w.words[h]=b|0:w.length--,w._strip()}var A=function(y,w,T){var N=y.words,p=w.words,k=T.words,I=0,b,h,_,$=N[0]|0,C=$&8191,D=$>>>13,B=N[1]|0,j=B&8191,Y=B>>>13,ee=N[2]|0,G=ee&8191,J=ee>>>13,he=N[3]|0,ie=he&8191,ve=he>>>13,Kt=N[4]|0,Ie=Kt&8191,Ee=Kt>>>13,St=N[5]|0,De=St&8191,He=St>>>13,Ys=N[6]|0,qe=Ys&8191,Ge=Ys>>>13,Xs=N[7]|0,Ke=Xs&8191,Je=Xs>>>13,Zs=N[8]|0,Qe=Zs&8191,Ye=Zs>>>13,eo=N[9]|0,Xe=eo&8191,Ze=eo>>>13,to=p[0]|0,et=to&8191,tt=to>>>13,ro=p[1]|0,rt=ro&8191,nt=ro>>>13,no=p[2]|0,it=no&8191,st=no>>>13,io=p[3]|0,ot=io&8191,at=io>>>13,so=p[4]|0,lt=so&8191,ft=so>>>13,oo=p[5]|0,ct=oo&8191,ut=oo>>>13,ao=p[6]|0,dt=ao&8191,ht=ao>>>13,lo=p[7]|0,vt=lo&8191,yt=lo>>>13,fo=p[8]|0,pt=fo&8191,gt=fo>>>13,co=p[9]|0,mt=co&8191,wt=co>>>13;T.negative=y.negative^w.negative,T.length=19,b=Math.imul(C,et),h=Math.imul(C,tt),h=h+Math.imul(D,et)|0,_=Math.imul(D,tt);var ss=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(ss>>>26)|0,ss&=67108863,b=Math.imul(j,et),h=Math.imul(j,tt),h=h+Math.imul(Y,et)|0,_=Math.imul(Y,tt),b=b+Math.imul(C,rt)|0,h=h+Math.imul(C,nt)|0,h=h+Math.imul(D,rt)|0,_=_+Math.imul(D,nt)|0;var os=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(os>>>26)|0,os&=67108863,b=Math.imul(G,et),h=Math.imul(G,tt),h=h+Math.imul(J,et)|0,_=Math.imul(J,tt),b=b+Math.imul(j,rt)|0,h=h+Math.imul(j,nt)|0,h=h+Math.imul(Y,rt)|0,_=_+Math.imul(Y,nt)|0,b=b+Math.imul(C,it)|0,h=h+Math.imul(C,st)|0,h=h+Math.imul(D,it)|0,_=_+Math.imul(D,st)|0;var as=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(as>>>26)|0,as&=67108863,b=Math.imul(ie,et),h=Math.imul(ie,tt),h=h+Math.imul(ve,et)|0,_=Math.imul(ve,tt),b=b+Math.imul(G,rt)|0,h=h+Math.imul(G,nt)|0,h=h+Math.imul(J,rt)|0,_=_+Math.imul(J,nt)|0,b=b+Math.imul(j,it)|0,h=h+Math.imul(j,st)|0,h=h+Math.imul(Y,it)|0,_=_+Math.imul(Y,st)|0,b=b+Math.imul(C,ot)|0,h=h+Math.imul(C,at)|0,h=h+Math.imul(D,ot)|0,_=_+Math.imul(D,at)|0;var ls=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(ls>>>26)|0,ls&=67108863,b=Math.imul(Ie,et),h=Math.imul(Ie,tt),h=h+Math.imul(Ee,et)|0,_=Math.imul(Ee,tt),b=b+Math.imul(ie,rt)|0,h=h+Math.imul(ie,nt)|0,h=h+Math.imul(ve,rt)|0,_=_+Math.imul(ve,nt)|0,b=b+Math.imul(G,it)|0,h=h+Math.imul(G,st)|0,h=h+Math.imul(J,it)|0,_=_+Math.imul(J,st)|0,b=b+Math.imul(j,ot)|0,h=h+Math.imul(j,at)|0,h=h+Math.imul(Y,ot)|0,_=_+Math.imul(Y,at)|0,b=b+Math.imul(C,lt)|0,h=h+Math.imul(C,ft)|0,h=h+Math.imul(D,lt)|0,_=_+Math.imul(D,ft)|0;var fs=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(fs>>>26)|0,fs&=67108863,b=Math.imul(De,et),h=Math.imul(De,tt),h=h+Math.imul(He,et)|0,_=Math.imul(He,tt),b=b+Math.imul(Ie,rt)|0,h=h+Math.imul(Ie,nt)|0,h=h+Math.imul(Ee,rt)|0,_=_+Math.imul(Ee,nt)|0,b=b+Math.imul(ie,it)|0,h=h+Math.imul(ie,st)|0,h=h+Math.imul(ve,it)|0,_=_+Math.imul(ve,st)|0,b=b+Math.imul(G,ot)|0,h=h+Math.imul(G,at)|0,h=h+Math.imul(J,ot)|0,_=_+Math.imul(J,at)|0,b=b+Math.imul(j,lt)|0,h=h+Math.imul(j,ft)|0,h=h+Math.imul(Y,lt)|0,_=_+Math.imul(Y,ft)|0,b=b+Math.imul(C,ct)|0,h=h+Math.imul(C,ut)|0,h=h+Math.imul(D,ct)|0,_=_+Math.imul(D,ut)|0;var R1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(R1>>>26)|0,R1&=67108863,b=Math.imul(qe,et),h=Math.imul(qe,tt),h=h+Math.imul(Ge,et)|0,_=Math.imul(Ge,tt),b=b+Math.imul(De,rt)|0,h=h+Math.imul(De,nt)|0,h=h+Math.imul(He,rt)|0,_=_+Math.imul(He,nt)|0,b=b+Math.imul(Ie,it)|0,h=h+Math.imul(Ie,st)|0,h=h+Math.imul(Ee,it)|0,_=_+Math.imul(Ee,st)|0,b=b+Math.imul(ie,ot)|0,h=h+Math.imul(ie,at)|0,h=h+Math.imul(ve,ot)|0,_=_+Math.imul(ve,at)|0,b=b+Math.imul(G,lt)|0,h=h+Math.imul(G,ft)|0,h=h+Math.imul(J,lt)|0,_=_+Math.imul(J,ft)|0,b=b+Math.imul(j,ct)|0,h=h+Math.imul(j,ut)|0,h=h+Math.imul(Y,ct)|0,_=_+Math.imul(Y,ut)|0,b=b+Math.imul(C,dt)|0,h=h+Math.imul(C,ht)|0,h=h+Math.imul(D,dt)|0,_=_+Math.imul(D,ht)|0;var O1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(O1>>>26)|0,O1&=67108863,b=Math.imul(Ke,et),h=Math.imul(Ke,tt),h=h+Math.imul(Je,et)|0,_=Math.imul(Je,tt),b=b+Math.imul(qe,rt)|0,h=h+Math.imul(qe,nt)|0,h=h+Math.imul(Ge,rt)|0,_=_+Math.imul(Ge,nt)|0,b=b+Math.imul(De,it)|0,h=h+Math.imul(De,st)|0,h=h+Math.imul(He,it)|0,_=_+Math.imul(He,st)|0,b=b+Math.imul(Ie,ot)|0,h=h+Math.imul(Ie,at)|0,h=h+Math.imul(Ee,ot)|0,_=_+Math.imul(Ee,at)|0,b=b+Math.imul(ie,lt)|0,h=h+Math.imul(ie,ft)|0,h=h+Math.imul(ve,lt)|0,_=_+Math.imul(ve,ft)|0,b=b+Math.imul(G,ct)|0,h=h+Math.imul(G,ut)|0,h=h+Math.imul(J,ct)|0,_=_+Math.imul(J,ut)|0,b=b+Math.imul(j,dt)|0,h=h+Math.imul(j,ht)|0,h=h+Math.imul(Y,dt)|0,_=_+Math.imul(Y,ht)|0,b=b+Math.imul(C,vt)|0,h=h+Math.imul(C,yt)|0,h=h+Math.imul(D,vt)|0,_=_+Math.imul(D,yt)|0;var D1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(D1>>>26)|0,D1&=67108863,b=Math.imul(Qe,et),h=Math.imul(Qe,tt),h=h+Math.imul(Ye,et)|0,_=Math.imul(Ye,tt),b=b+Math.imul(Ke,rt)|0,h=h+Math.imul(Ke,nt)|0,h=h+Math.imul(Je,rt)|0,_=_+Math.imul(Je,nt)|0,b=b+Math.imul(qe,it)|0,h=h+Math.imul(qe,st)|0,h=h+Math.imul(Ge,it)|0,_=_+Math.imul(Ge,st)|0,b=b+Math.imul(De,ot)|0,h=h+Math.imul(De,at)|0,h=h+Math.imul(He,ot)|0,_=_+Math.imul(He,at)|0,b=b+Math.imul(Ie,lt)|0,h=h+Math.imul(Ie,ft)|0,h=h+Math.imul(Ee,lt)|0,_=_+Math.imul(Ee,ft)|0,b=b+Math.imul(ie,ct)|0,h=h+Math.imul(ie,ut)|0,h=h+Math.imul(ve,ct)|0,_=_+Math.imul(ve,ut)|0,b=b+Math.imul(G,dt)|0,h=h+Math.imul(G,ht)|0,h=h+Math.imul(J,dt)|0,_=_+Math.imul(J,ht)|0,b=b+Math.imul(j,vt)|0,h=h+Math.imul(j,yt)|0,h=h+Math.imul(Y,vt)|0,_=_+Math.imul(Y,yt)|0,b=b+Math.imul(C,pt)|0,h=h+Math.imul(C,gt)|0,h=h+Math.imul(D,pt)|0,_=_+Math.imul(D,gt)|0;var B1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(B1>>>26)|0,B1&=67108863,b=Math.imul(Xe,et),h=Math.imul(Xe,tt),h=h+Math.imul(Ze,et)|0,_=Math.imul(Ze,tt),b=b+Math.imul(Qe,rt)|0,h=h+Math.imul(Qe,nt)|0,h=h+Math.imul(Ye,rt)|0,_=_+Math.imul(Ye,nt)|0,b=b+Math.imul(Ke,it)|0,h=h+Math.imul(Ke,st)|0,h=h+Math.imul(Je,it)|0,_=_+Math.imul(Je,st)|0,b=b+Math.imul(qe,ot)|0,h=h+Math.imul(qe,at)|0,h=h+Math.imul(Ge,ot)|0,_=_+Math.imul(Ge,at)|0,b=b+Math.imul(De,lt)|0,h=h+Math.imul(De,ft)|0,h=h+Math.imul(He,lt)|0,_=_+Math.imul(He,ft)|0,b=b+Math.imul(Ie,ct)|0,h=h+Math.imul(Ie,ut)|0,h=h+Math.imul(Ee,ct)|0,_=_+Math.imul(Ee,ut)|0,b=b+Math.imul(ie,dt)|0,h=h+Math.imul(ie,ht)|0,h=h+Math.imul(ve,dt)|0,_=_+Math.imul(ve,ht)|0,b=b+Math.imul(G,vt)|0,h=h+Math.imul(G,yt)|0,h=h+Math.imul(J,vt)|0,_=_+Math.imul(J,yt)|0,b=b+Math.imul(j,pt)|0,h=h+Math.imul(j,gt)|0,h=h+Math.imul(Y,pt)|0,_=_+Math.imul(Y,gt)|0,b=b+Math.imul(C,mt)|0,h=h+Math.imul(C,wt)|0,h=h+Math.imul(D,mt)|0,_=_+Math.imul(D,wt)|0;var L1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(L1>>>26)|0,L1&=67108863,b=Math.imul(Xe,rt),h=Math.imul(Xe,nt),h=h+Math.imul(Ze,rt)|0,_=Math.imul(Ze,nt),b=b+Math.imul(Qe,it)|0,h=h+Math.imul(Qe,st)|0,h=h+Math.imul(Ye,it)|0,_=_+Math.imul(Ye,st)|0,b=b+Math.imul(Ke,ot)|0,h=h+Math.imul(Ke,at)|0,h=h+Math.imul(Je,ot)|0,_=_+Math.imul(Je,at)|0,b=b+Math.imul(qe,lt)|0,h=h+Math.imul(qe,ft)|0,h=h+Math.imul(Ge,lt)|0,_=_+Math.imul(Ge,ft)|0,b=b+Math.imul(De,ct)|0,h=h+Math.imul(De,ut)|0,h=h+Math.imul(He,ct)|0,_=_+Math.imul(He,ut)|0,b=b+Math.imul(Ie,dt)|0,h=h+Math.imul(Ie,ht)|0,h=h+Math.imul(Ee,dt)|0,_=_+Math.imul(Ee,ht)|0,b=b+Math.imul(ie,vt)|0,h=h+Math.imul(ie,yt)|0,h=h+Math.imul(ve,vt)|0,_=_+Math.imul(ve,yt)|0,b=b+Math.imul(G,pt)|0,h=h+Math.imul(G,gt)|0,h=h+Math.imul(J,pt)|0,_=_+Math.imul(J,gt)|0,b=b+Math.imul(j,mt)|0,h=h+Math.imul(j,wt)|0,h=h+Math.imul(Y,mt)|0,_=_+Math.imul(Y,wt)|0;var $1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+($1>>>26)|0,$1&=67108863,b=Math.imul(Xe,it),h=Math.imul(Xe,st),h=h+Math.imul(Ze,it)|0,_=Math.imul(Ze,st),b=b+Math.imul(Qe,ot)|0,h=h+Math.imul(Qe,at)|0,h=h+Math.imul(Ye,ot)|0,_=_+Math.imul(Ye,at)|0,b=b+Math.imul(Ke,lt)|0,h=h+Math.imul(Ke,ft)|0,h=h+Math.imul(Je,lt)|0,_=_+Math.imul(Je,ft)|0,b=b+Math.imul(qe,ct)|0,h=h+Math.imul(qe,ut)|0,h=h+Math.imul(Ge,ct)|0,_=_+Math.imul(Ge,ut)|0,b=b+Math.imul(De,dt)|0,h=h+Math.imul(De,ht)|0,h=h+Math.imul(He,dt)|0,_=_+Math.imul(He,ht)|0,b=b+Math.imul(Ie,vt)|0,h=h+Math.imul(Ie,yt)|0,h=h+Math.imul(Ee,vt)|0,_=_+Math.imul(Ee,yt)|0,b=b+Math.imul(ie,pt)|0,h=h+Math.imul(ie,gt)|0,h=h+Math.imul(ve,pt)|0,_=_+Math.imul(ve,gt)|0,b=b+Math.imul(G,mt)|0,h=h+Math.imul(G,wt)|0,h=h+Math.imul(J,mt)|0,_=_+Math.imul(J,wt)|0;var F1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(F1>>>26)|0,F1&=67108863,b=Math.imul(Xe,ot),h=Math.imul(Xe,at),h=h+Math.imul(Ze,ot)|0,_=Math.imul(Ze,at),b=b+Math.imul(Qe,lt)|0,h=h+Math.imul(Qe,ft)|0,h=h+Math.imul(Ye,lt)|0,_=_+Math.imul(Ye,ft)|0,b=b+Math.imul(Ke,ct)|0,h=h+Math.imul(Ke,ut)|0,h=h+Math.imul(Je,ct)|0,_=_+Math.imul(Je,ut)|0,b=b+Math.imul(qe,dt)|0,h=h+Math.imul(qe,ht)|0,h=h+Math.imul(Ge,dt)|0,_=_+Math.imul(Ge,ht)|0,b=b+Math.imul(De,vt)|0,h=h+Math.imul(De,yt)|0,h=h+Math.imul(He,vt)|0,_=_+Math.imul(He,yt)|0,b=b+Math.imul(Ie,pt)|0,h=h+Math.imul(Ie,gt)|0,h=h+Math.imul(Ee,pt)|0,_=_+Math.imul(Ee,gt)|0,b=b+Math.imul(ie,mt)|0,h=h+Math.imul(ie,wt)|0,h=h+Math.imul(ve,mt)|0,_=_+Math.imul(ve,wt)|0;var j1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(j1>>>26)|0,j1&=67108863,b=Math.imul(Xe,lt),h=Math.imul(Xe,ft),h=h+Math.imul(Ze,lt)|0,_=Math.imul(Ze,ft),b=b+Math.imul(Qe,ct)|0,h=h+Math.imul(Qe,ut)|0,h=h+Math.imul(Ye,ct)|0,_=_+Math.imul(Ye,ut)|0,b=b+Math.imul(Ke,dt)|0,h=h+Math.imul(Ke,ht)|0,h=h+Math.imul(Je,dt)|0,_=_+Math.imul(Je,ht)|0,b=b+Math.imul(qe,vt)|0,h=h+Math.imul(qe,yt)|0,h=h+Math.imul(Ge,vt)|0,_=_+Math.imul(Ge,yt)|0,b=b+Math.imul(De,pt)|0,h=h+Math.imul(De,gt)|0,h=h+Math.imul(He,pt)|0,_=_+Math.imul(He,gt)|0,b=b+Math.imul(Ie,mt)|0,h=h+Math.imul(Ie,wt)|0,h=h+Math.imul(Ee,mt)|0,_=_+Math.imul(Ee,wt)|0;var z1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(z1>>>26)|0,z1&=67108863,b=Math.imul(Xe,ct),h=Math.imul(Xe,ut),h=h+Math.imul(Ze,ct)|0,_=Math.imul(Ze,ut),b=b+Math.imul(Qe,dt)|0,h=h+Math.imul(Qe,ht)|0,h=h+Math.imul(Ye,dt)|0,_=_+Math.imul(Ye,ht)|0,b=b+Math.imul(Ke,vt)|0,h=h+Math.imul(Ke,yt)|0,h=h+Math.imul(Je,vt)|0,_=_+Math.imul(Je,yt)|0,b=b+Math.imul(qe,pt)|0,h=h+Math.imul(qe,gt)|0,h=h+Math.imul(Ge,pt)|0,_=_+Math.imul(Ge,gt)|0,b=b+Math.imul(De,mt)|0,h=h+Math.imul(De,wt)|0,h=h+Math.imul(He,mt)|0,_=_+Math.imul(He,wt)|0;var U1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(U1>>>26)|0,U1&=67108863,b=Math.imul(Xe,dt),h=Math.imul(Xe,ht),h=h+Math.imul(Ze,dt)|0,_=Math.imul(Ze,ht),b=b+Math.imul(Qe,vt)|0,h=h+Math.imul(Qe,yt)|0,h=h+Math.imul(Ye,vt)|0,_=_+Math.imul(Ye,yt)|0,b=b+Math.imul(Ke,pt)|0,h=h+Math.imul(Ke,gt)|0,h=h+Math.imul(Je,pt)|0,_=_+Math.imul(Je,gt)|0,b=b+Math.imul(qe,mt)|0,h=h+Math.imul(qe,wt)|0,h=h+Math.imul(Ge,mt)|0,_=_+Math.imul(Ge,wt)|0;var V1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(V1>>>26)|0,V1&=67108863,b=Math.imul(Xe,vt),h=Math.imul(Xe,yt),h=h+Math.imul(Ze,vt)|0,_=Math.imul(Ze,yt),b=b+Math.imul(Qe,pt)|0,h=h+Math.imul(Qe,gt)|0,h=h+Math.imul(Ye,pt)|0,_=_+Math.imul(Ye,gt)|0,b=b+Math.imul(Ke,mt)|0,h=h+Math.imul(Ke,wt)|0,h=h+Math.imul(Je,mt)|0,_=_+Math.imul(Je,wt)|0;var W1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(W1>>>26)|0,W1&=67108863,b=Math.imul(Xe,pt),h=Math.imul(Xe,gt),h=h+Math.imul(Ze,pt)|0,_=Math.imul(Ze,gt),b=b+Math.imul(Qe,mt)|0,h=h+Math.imul(Qe,wt)|0,h=h+Math.imul(Ye,mt)|0,_=_+Math.imul(Ye,wt)|0;var H1=(I+b|0)+((h&8191)<<13)|0;I=(_+(h>>>13)|0)+(H1>>>26)|0,H1&=67108863,b=Math.imul(Xe,mt),h=Math.imul(Xe,wt),h=h+Math.imul(Ze,mt)|0,_=Math.imul(Ze,wt);var q1=(I+b|0)+((h&8191)<<13)|0;return I=(_+(h>>>13)|0)+(q1>>>26)|0,q1&=67108863,k[0]=ss,k[1]=os,k[2]=as,k[3]=ls,k[4]=fs,k[5]=R1,k[6]=O1,k[7]=D1,k[8]=B1,k[9]=L1,k[10]=$1,k[11]=F1,k[12]=j1,k[13]=z1,k[14]=U1,k[15]=V1,k[16]=W1,k[17]=H1,k[18]=q1,I!==0&&(k[19]=I,T.length++),T};Math.imul||(A=E);function S(O,y,w){w.negative=y.negative^O.negative,w.length=O.length+y.length;for(var T=0,N=0,p=0;p>>26)|0,N+=k>>>26,k&=67108863}w.words[p]=I,T=k,k=N}return T!==0?w.words[p]=T:w.length--,w._strip()}function P(O,y,w){return S(O,y,w)}s.prototype.mulTo=function(y,w){var T,N=this.length+y.length;return this.length===10&&y.length===10?T=A(this,y,w):N<63?T=E(this,y,w):N<1024?T=S(this,y,w):T=P(this,y,w),T},s.prototype.mul=function(y){var w=new s(null);return w.words=new Array(this.length+y.length),this.mulTo(y,w)},s.prototype.mulf=function(y){var w=new s(null);return w.words=new Array(this.length+y.length),P(this,y,w)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var w=y<0;w&&(y=-y),n(typeof y=="number"),n(y<67108864);for(var T=0,N=0;N>=26,T+=p/67108864|0,T+=k>>>26,this.words[N]=k&67108863}return T!==0&&(this.words[N]=T,this.length++),w?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var w=M(y);if(w.length===0)return new s(1);for(var T=this,N=0;N=0);var w=y%26,T=(y-w)/26,N=67108863>>>26-w<<26-w,p;if(w!==0){var k=0;for(p=0;p>>26-w}k&&(this.words[p]=k,this.length++)}if(T!==0){for(p=this.length-1;p>=0;p--)this.words[p+T]=this.words[p];for(p=0;p=0);var N;w?N=(w-w%26)/26:N=0;var p=y%26,k=Math.min((y-p)/26,this.length),I=67108863^67108863>>>p<k)for(this.length-=k,h=0;h=0&&(_!==0||h>=N);h--){var $=this.words[h]|0;this.words[h]=_<<26-p|$>>>p,_=$&I}return b&&_!==0&&(b.words[b.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,w,T){return n(this.negative===0),this.iushrn(y,w,T)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){n(typeof y=="number"&&y>=0);var w=y%26,T=(y-w)/26,N=1<=0);var w=y%26,T=(y-w)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=T)return this;if(w!==0&&T++,this.length=Math.min(T,this.length),w!==0){var N=67108863^67108863>>>w<=67108864;w++)this.words[w]-=67108864,w===this.length-1?this.words[w+1]=1:this.words[w+1]++;return this.length=Math.max(this.length,w+1),this},s.prototype.isubn=function(y){if(n(typeof y=="number"),n(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var w=0;w>26)-(b/67108864|0),this.words[p+T]=k&67108863}for(;p>26,this.words[p+T]=k&67108863;if(I===0)return this._strip();for(n(I===-1),I=0,p=0;p>26,this.words[p]=k&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,w){var T=this.length-y.length,N=this.clone(),p=y,k=p.words[p.length-1]|0,I=this._countBits(k);T=26-I,T!==0&&(p=p.ushln(T),N.iushln(T),k=p.words[p.length-1]|0);var b=N.length-p.length,h;if(w!=="mod"){h=new s(null),h.length=b+1,h.words=new Array(h.length);for(var _=0;_=0;C--){var D=(N.words[p.length+C]|0)*67108864+(N.words[p.length+C-1]|0);for(D=Math.min(D/k|0,67108863),N._ishlnsubmul(p,D,C);N.negative!==0;)D--,N.negative=0,N._ishlnsubmul(p,1,C),N.isZero()||(N.negative^=1);h&&(h.words[C]=D)}return h&&h._strip(),N._strip(),w!=="div"&&T!==0&&N.iushrn(T),{div:h||null,mod:N}},s.prototype.divmod=function(y,w,T){if(n(!y.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,p,k;return this.negative!==0&&y.negative===0?(k=this.neg().divmod(y,w),w!=="mod"&&(N=k.div.neg()),w!=="div"&&(p=k.mod.neg(),T&&p.negative!==0&&p.iadd(y)),{div:N,mod:p}):this.negative===0&&y.negative!==0?(k=this.divmod(y.neg(),w),w!=="mod"&&(N=k.div.neg()),{div:N,mod:k.mod}):this.negative&y.negative?(k=this.neg().divmod(y.neg(),w),w!=="div"&&(p=k.mod.neg(),T&&p.negative!==0&&p.isub(y)),{div:k.div,mod:p}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?w==="div"?{div:this.divn(y.words[0]),mod:null}:w==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,w)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var w=this.divmod(y);if(w.mod.isZero())return w.div;var T=w.div.negative!==0?w.mod.isub(y):w.mod,N=y.ushrn(1),p=y.andln(1),k=T.cmp(N);return k<0||p===1&&k===0?w.div:w.div.negative!==0?w.div.isubn(1):w.div.iaddn(1)},s.prototype.modrn=function(y){var w=y<0;w&&(y=-y),n(y<=67108863);for(var T=(1<<26)%y,N=0,p=this.length-1;p>=0;p--)N=(T*N+(this.words[p]|0))%y;return w?-N:N},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var w=y<0;w&&(y=-y),n(y<=67108863);for(var T=0,N=this.length-1;N>=0;N--){var p=(this.words[N]|0)+T*67108864;this.words[N]=p/y|0,T=p%y}return this._strip(),w?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){n(y.negative===0),n(!y.isZero());var w=this,T=y.clone();w.negative!==0?w=w.umod(y):w=w.clone();for(var N=new s(1),p=new s(0),k=new s(0),I=new s(1),b=0;w.isEven()&&T.isEven();)w.iushrn(1),T.iushrn(1),++b;for(var h=T.clone(),_=w.clone();!w.isZero();){for(var $=0,C=1;!(w.words[0]&C)&&$<26;++$,C<<=1);if($>0)for(w.iushrn($);$-- >0;)(N.isOdd()||p.isOdd())&&(N.iadd(h),p.isub(_)),N.iushrn(1),p.iushrn(1);for(var D=0,B=1;!(T.words[0]&B)&&D<26;++D,B<<=1);if(D>0)for(T.iushrn(D);D-- >0;)(k.isOdd()||I.isOdd())&&(k.iadd(h),I.isub(_)),k.iushrn(1),I.iushrn(1);w.cmp(T)>=0?(w.isub(T),N.isub(k),p.isub(I)):(T.isub(w),k.isub(N),I.isub(p))}return{a:k,b:I,gcd:T.iushln(b)}},s.prototype._invmp=function(y){n(y.negative===0),n(!y.isZero());var w=this,T=y.clone();w.negative!==0?w=w.umod(y):w=w.clone();for(var N=new s(1),p=new s(0),k=T.clone();w.cmpn(1)>0&&T.cmpn(1)>0;){for(var I=0,b=1;!(w.words[0]&b)&&I<26;++I,b<<=1);if(I>0)for(w.iushrn(I);I-- >0;)N.isOdd()&&N.iadd(k),N.iushrn(1);for(var h=0,_=1;!(T.words[0]&_)&&h<26;++h,_<<=1);if(h>0)for(T.iushrn(h);h-- >0;)p.isOdd()&&p.iadd(k),p.iushrn(1);w.cmp(T)>=0?(w.isub(T),N.isub(p)):(T.isub(w),p.isub(N))}var $;return w.cmpn(1)===0?$=N:$=p,$.cmpn(0)<0&&$.iadd(y),$},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var w=this.clone(),T=y.clone();w.negative=0,T.negative=0;for(var N=0;w.isEven()&&T.isEven();N++)w.iushrn(1),T.iushrn(1);do{for(;w.isEven();)w.iushrn(1);for(;T.isEven();)T.iushrn(1);var p=w.cmp(T);if(p<0){var k=w;w=T,T=k}else if(p===0||T.cmpn(1)===0)break;w.isub(T)}while(!0);return T.iushln(N)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){n(typeof y=="number");var w=y%26,T=(y-w)/26,N=1<>>26,I&=67108863,this.words[k]=I}return p!==0&&(this.words[k]=p,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var w=y<0;if(this.negative!==0&&!w)return-1;if(this.negative===0&&w)return 1;this._strip();var T;if(this.length>1)T=1;else{w&&(y=-y),n(y<=67108863,"Number is too big");var N=this.words[0]|0;T=N===y?0:Ny.length)return 1;if(this.length=0;T--){var N=this.words[T]|0,p=y.words[T]|0;if(N!==p){Np&&(w=1);break}}return w},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new K(y)},s.prototype.toRed=function(y){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return n(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return n(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var R={k256:null,p224:null,p192:null,p25519:null};function L(O,y){this.name=O,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},L.prototype.ireduce=function(y){var w=y,T;do this.split(w,this.tmp),w=this.imulK(w),w=w.iadd(this.tmp),T=w.bitLength();while(T>this.n);var N=T0?w.isub(this.p):w.strip!==void 0?w.strip():w._strip(),w},L.prototype.split=function(y,w){y.iushrn(this.n,0,w)},L.prototype.imulK=function(y){return y.imul(this.k)};function F(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(F,L),F.prototype.split=function(y,w){for(var T=4194303,N=Math.min(y.length,9),p=0;p>>22,k=I}k>>>=22,y.words[p-10]=k,k===0&&y.length>10?y.length-=10:y.length-=9},F.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var w=0,T=0;T>>=26,y.words[T]=p,w=N}return w!==0&&(y.words[y.length++]=w),y},s._prime=function(y){if(R[y])return R[y];var w;if(y==="k256")w=new F;else if(y==="p224")w=new z;else if(y==="p192")w=new H;else if(y==="p25519")w=new q;else throw new Error("Unknown prime "+y);return R[y]=w,w};function K(O){if(typeof O=="string"){var y=s._prime(O);this.m=y.p,this.prime=y}else n(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}K.prototype._verify1=function(y){n(y.negative===0,"red works only with positives"),n(y.red,"red works only with red numbers")},K.prototype._verify2=function(y,w){n((y.negative|w.negative)===0,"red works only with positives"),n(y.red&&y.red===w.red,"red works only with red numbers")},K.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(c(y,y.umod(this.m)._forceRed(this)),y)},K.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},K.prototype.add=function(y,w){this._verify2(y,w);var T=y.add(w);return T.cmp(this.m)>=0&&T.isub(this.m),T._forceRed(this)},K.prototype.iadd=function(y,w){this._verify2(y,w);var T=y.iadd(w);return T.cmp(this.m)>=0&&T.isub(this.m),T},K.prototype.sub=function(y,w){this._verify2(y,w);var T=y.sub(w);return T.cmpn(0)<0&&T.iadd(this.m),T._forceRed(this)},K.prototype.isub=function(y,w){this._verify2(y,w);var T=y.isub(w);return T.cmpn(0)<0&&T.iadd(this.m),T},K.prototype.shl=function(y,w){return this._verify1(y),this.imod(y.ushln(w))},K.prototype.imul=function(y,w){return this._verify2(y,w),this.imod(y.imul(w))},K.prototype.mul=function(y,w){return this._verify2(y,w),this.imod(y.mul(w))},K.prototype.isqr=function(y){return this.imul(y,y.clone())},K.prototype.sqr=function(y){return this.mul(y,y)},K.prototype.sqrt=function(y){if(y.isZero())return y.clone();var w=this.m.andln(3);if(n(w%2===1),w===3){var T=this.m.add(new s(1)).iushrn(2);return this.pow(y,T)}for(var N=this.m.subn(1),p=0;!N.isZero()&&N.andln(1)===0;)p++,N.iushrn(1);n(!N.isZero());var k=new s(1).toRed(this),I=k.redNeg(),b=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new s(2*h*h).toRed(this);this.pow(h,b).cmp(I)!==0;)h.redIAdd(I);for(var _=this.pow(h,N),$=this.pow(y,N.addn(1).iushrn(1)),C=this.pow(y,N),D=p;C.cmp(k)!==0;){for(var B=C,j=0;B.cmp(k)!==0;j++)B=B.redSqr();n(j=0;p--){for(var _=w.words[p],$=h-1;$>=0;$--){var C=_>>$&1;if(k!==N[0]&&(k=this.sqr(k)),C===0&&I===0){b=0;continue}I<<=1,I|=C,b++,!(b!==T&&(p!==0||$!==0))&&(k=this.mul(k,N[I]),b=0,I=0)}h=26}return k},K.prototype.convertTo=function(y){var w=y.umod(this.m);return w===y?w.clone():w},K.prototype.convertFrom=function(y){var w=y.clone();return w.red=null,w},s.mont=function(y){return new ne(y)};function ne(O){K.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(ne,K),ne.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},ne.prototype.convertFrom=function(y){var w=this.imod(y.mul(this.rinv));return w.red=null,w},ne.prototype.imul=function(y,w){if(y.isZero()||w.isZero())return y.words[0]=0,y.length=1,y;var T=y.imul(w),N=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=T.isub(N).iushrn(this.shift),k=p;return p.cmp(this.m)>=0?k=p.isub(this.m):p.cmpn(0)<0&&(k=p.iadd(this.m)),k._forceRed(this)},ne.prototype.mul=function(y,w){if(y.isZero()||w.isZero())return new s(0)._forceRed(this);var T=y.mul(w),N=T.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=T.isub(N).iushrn(this.shift),k=p;return p.cmp(this.m)>=0?k=p.isub(this.m):p.cmpn(0)<0&&(k=p.iadd(this.m)),k._forceRed(this)},ne.prototype.invm=function(y){var w=this.imod(y._invmp(this.m).mul(this.r2));return w._forceRed(this)}})(t,MC)})(cL);const me=By,vL="logger/5.7.0";let ox=!1,ax=!1;const ed={debug:1,default:2,info:2,warning:3,error:4,off:5};let lx=ed.default,Wv=null;function yL(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const fx=yL();var Ly;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Ly||(Ly={}));var zn;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(zn||(zn={}));const cx="0123456789abcdef";let V=class Xt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();ed[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(lx>ed[n])&&console.log.apply(console,r)}debug(...e){this._log(Xt.levels.DEBUG,e)}info(...e){this._log(Xt.levels.INFO,e)}warn(...e){this._log(Xt.levels.WARNING,e)}makeError(e,r,n){if(ax)return this.makeError("censored error",r,{});r||(r=Xt.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(l=>{const f=n[l];try{if(f instanceof Uint8Array){let c="";for(let u=0;u>4],c+=cx[f[u]&15];i.push(l+"=Uint8Array(0x"+c+")")}else i.push(l+"="+JSON.stringify(f))}catch{i.push(l+"="+JSON.stringify(n[l].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case zn.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case zn.CALL_EXCEPTION:case zn.INSUFFICIENT_FUNDS:case zn.MISSING_NEW:case zn.NONCE_EXPIRED:case zn.REPLACEMENT_UNDERPRICED:case zn.TRANSACTION_REPLACED:case zn.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Xt.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){fx&&this.throwError("platform missing String.prototype.normalize",Xt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:fx})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Xt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Xt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Xt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Xt.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Xt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Xt.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return Wv||(Wv=new Xt(vL)),Wv}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Xt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),ox){if(!e)return;this.globalLogger().throwError("error censorship permanent",Xt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ax=!!e,ox=!!r}static setLogLevel(e){const r=ed[e.toLowerCase()];if(r==null){Xt.globalLogger().warn("invalid log level - "+e);return}lx=r}static from(e){return new Xt(e)}};V.errors=zn;V.levels=Ly;const pL="bytes/5.7.0",Lt=new V(pL);function Pk(t){return!!t.toHexString}function Ya(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Ya(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Gi(t){return Me(t)&&!(t.length%2)||Zi(t)}function ux(t){return typeof t=="number"&&t==t&&t%1===0}function Zi(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!ux(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function X(t,e){if(e||(e={}),typeof t=="number"){Lt.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),Ya(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Pk(t)&&(t=t.toHexString()),Me(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":Lt.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;iX(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),Ya(n)}function yi(t){let e=X(t);if(e.length===0)return e;let r=0;for(;re&&Lt.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Ya(r)}function Me(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Hv="0123456789abcdef";function Q(t,e){if(e||(e={}),typeof t=="number"){Lt.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Hv[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Pk(t))return t.toHexString();if(Me(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":Lt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Zi(t)){let r="0x";for(let n=0;n>4]+Hv[i&15]}return r}return Lt.throwArgumentError("invalid hexlify value","value",t)}function bi(t){if(typeof t!="string")t=Q(t);else if(!Me(t)||t.length%2)return null;return(t.length-2)/2}function Ut(t,e,r){return typeof t!="string"?t=Q(t):(!Me(t)||t.length%2)&&Lt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Br(t){let e="0x";return t.forEach(r=>{e+=Q(r).substring(2)}),e}function Vs(t){const e=Ik(Q(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function Ik(t){typeof t!="string"&&(t=Q(t)),Me(t)||Lt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Lt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function sa(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Gi(t)){let r=X(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64))):r.length===65?(e.r=Q(r.slice(0,32)),e.s=Q(r.slice(32,64)),e.v=r[64]):Lt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:Lt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=Q(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=Pf(X(e._vs),32);e._vs=Q(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&Lt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=Q(i);e.s==null?e.s=o:e.s!==o&&Lt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?Lt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&Lt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Me(e.r)?Lt.throwArgumentError("signature missing or invalid r","signature",t):e.r=$e(e.r,32),e.s==null||!Me(e.s)?Lt.throwArgumentError("signature missing or invalid s","signature",t):e.s=$e(e.s,32);const r=X(e.s);r[0]>=128&&Lt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=Q(r);e._vs&&(Me(e._vs)||Lt.throwArgumentError("signature invalid _vs","signature",t),e._vs=$e(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&Lt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function gL(t){return t=sa(t),Q(At([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const Mk="bignumber/5.7.0";var vc=me.BN;const Pi=new V(Mk),qv={},dx=9007199254740991;function mL(t){return t!=null&&(U.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Me(t)||typeof t=="bigint"||Zi(t))}let hx=!1;class U{constructor(e,r){e!==qv&&Pi.throwError("cannot call constructor directly; use BigNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Wr(ke(this).fromTwos(e))}toTwos(e){return Wr(ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?U.from(this._hex.substring(1)):this}add(e){return Wr(ke(this).add(ke(e)))}sub(e){return Wr(ke(this).sub(ke(e)))}div(e){return U.from(e).isZero()&&gn("division-by-zero","div"),Wr(ke(this).div(ke(e)))}mul(e){return Wr(ke(this).mul(ke(e)))}mod(e){const r=ke(e);return r.isNeg()&&gn("division-by-zero","mod"),Wr(ke(this).umod(r))}pow(e){const r=ke(e);return r.isNeg()&&gn("negative-power","pow"),Wr(ke(this).pow(r))}and(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","and"),Wr(ke(this).and(r))}or(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","or"),Wr(ke(this).or(r))}xor(e){const r=ke(e);return(this.isNegative()||r.isNeg())&&gn("unbound-bitwise-result","xor"),Wr(ke(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&gn("negative-width","mask"),Wr(ke(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&gn("negative-width","shl"),Wr(ke(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&gn("negative-width","shr"),Wr(ke(this).shrn(e))}eq(e){return ke(this).eq(ke(e))}lt(e){return ke(this).lt(ke(e))}lte(e){return ke(this).lte(ke(e))}gt(e){return ke(this).gt(ke(e))}gte(e){return ke(this).gte(ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return ke(this).isZero()}toNumber(){try{return ke(this).toNumber()}catch{gn("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Pi.throwError("this platform does not support BigInt",V.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?hx||(hx=!0,Pi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Pi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",V.errors.UNEXPECTED_ARGUMENT,{}):Pi.throwError("BigNumber.toString does not accept parameters",V.errors.UNEXPECTED_ARGUMENT,{})),ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof U)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new U(qv,yc(e)):e.match(/^-?[0-9]+$/)?new U(qv,yc(new vc(e))):Pi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&gn("underflow","BigNumber.from",e),(e>=dx||e<=-dx)&&gn("overflow","BigNumber.from",e),U.from(String(e));const r=e;if(typeof r=="bigint")return U.from(r.toString());if(Zi(r))return U.from(Q(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return U.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Me(n)||n[0]==="-"&&Me(n.substring(1))))return U.from(n)}return Pi.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function yc(t){if(typeof t!="string")return yc(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Pi.throwArgumentError("invalid hex","value",t),t=yc(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Wr(t){return U.from(yc(t))}function ke(t){const e=U.from(t).toHexString();return e[0]==="-"?new vc("-"+e.substring(3),16):new vc(e.substring(2),16)}function gn(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Pi.throwError(t,V.errors.NUMERIC_FAULT,n)}function wL(t){return new vc(t,36).toString(16)}function bL(t){return new vc(t,16).toString(36)}const Lr=new V(Mk),If={},Nk=U.from(0),Rk=U.from(-1);function Ok(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Lr.throwError(t,V.errors.NUMERIC_FAULT,i)}let Mf="0";for(;Mf.length<256;)Mf+=Mf;function sm(t){if(typeof t!="number")try{t=U.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Mf.substring(0,t):Lr.throwArgumentError("invalid decimal size","decimals",t)}function td(t,e){e==null&&(e=0);const r=sm(e);t=U.from(t);const n=t.lt(Nk);n&&(t=t.mul(Rk));let i=t.mod(r).toString();for(;i.length2&&Lr.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&Ok("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Lr.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Lr.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Lr.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new Xa(If,r,n,i)}}class dr{constructor(e,r,n,i){e!==If&&Lr.throwError("cannot use FixedNumber constructor; use FixedNumber.from",V.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Lr.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=ri(this._value,this.format.decimals),n=ri(e._value,e.format.decimals);return dr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=dr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(vx.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=dr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(vx.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Lr.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=dr.from("1"+Mf.substring(0,e),this.format),i=xL.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Lr.throwArgumentError("invalid byte width","width",e);const r=U.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return $e(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return dr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!mL(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),dr.fromString(td(e,r),Xa.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=Xa.from(r),i=ri(e,n.decimals);!n.signed&&i.lt(Nk)&&Ok("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=$e(s,n.width/8));const o=td(i,n.decimals);return new dr(If,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=Xa.from(r);if(X(e).length>n.width/8)throw new Error("overflow");let i=U.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=td(i,n.decimals);return new dr(If,s,o,n)}static from(e,r){if(typeof e=="string")return dr.fromString(e,r);if(Zi(e))return dr.fromBytes(e,r);try{return dr.fromValue(e,0,r)}catch(n){if(n.code!==V.errors.INVALID_ARGUMENT)throw n}return Lr.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const vx=dr.from(1),xL=dr.from("0.5"),CL="properties/5.7.0";var EL=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const sh=new V(CL);function te(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function qn(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function xt(t){return EL(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function om(t,e){(!t||typeof t!="object")&&sh.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||sh.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const AL={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Dk(t){if(t==null||AL[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rxi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&te(e,r,xi(n))}return e}return sh.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function xi(t){return SL(t)}class Fc{constructor(e){for(const r in e)this[r]=xi(e[r])}}const jc="abi/5.7.0",Ne=new V(jc),Wo={};let yx={calldata:!0,memory:!0,storage:!0},kL={calldata:!0,memory:!0};function ku(t,e){if(t==="bytes"||t==="string"){if(yx[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&kL[e])return!0;return(yx[e]||e==="payable")&&Ne.throwArgumentError("invalid modifier","name",e),!1}function _L(t,e){let r=t;function n(a){Ne.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Re.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===Re.full?", ":",")+")"):r+=this.type,e!==Re.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Re.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?rr.fromString(e,r):rr.fromObject(e)}static fromObject(e){return rr.isParamType(e)?e:new rr(Wo,{name:e.name||null,type:Ca(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(rr.fromObject):null})}static fromString(e,r){function n(i){return rr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(_L(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function pc(t,e){return IL(t).map(r=>rr.fromString(r,e))}class ci{constructor(e,r){e!==Wo&&Ne.throwError("use a static from method",V.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),rd(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return ci.isFragment(e)?e:typeof e=="string"?ci.fromString(e):ci.fromObject(e)}static fromObject(e){if(ci.isFragment(e))return e;switch(e.type){case"function":return Hn.fromObject(e);case"event":return fi.fromObject(e);case"constructor":return Wn.fromObject(e);case"error":return Oi.fromObject(e);case"fallback":case"receive":return null}return Ne.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?fi.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Hn.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Wn.fromString(e.trim()):e.split(" ")[0]==="error"?Oi.fromString(e.substring(5).trim()):Ne.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class fi extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",e!==Re.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?fi.fromString(e):fi.fromObject(e)}static fromObject(e){if(fi.isEventFragment(e))return e;e.type!=="event"&&Ne.throwArgumentError("invalid event object","value",e);const r={name:gc(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(rr.fromObject):[],type:"event"};return new fi(Wo,r)}static fromString(e){let r=e.match(mc);r||Ne.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Ne.warn("unknown modifier: "+i)}}),fi.fromObject({name:r[1].trim(),anonymous:n,inputs:pc(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Bk(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ne.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ne.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=U.from(r[1]),r[0]):t}function Lk(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function $k(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ne.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ne.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ne.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ne.throwArgumentError("unable to determine stateMutability","value",t),e}class Wn extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===Re.sighash&&Ne.throwError("cannot format a constructor for sighash",V.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Wn.fromString(e):Wn.fromObject(e)}static fromObject(e){if(Wn.isConstructorFragment(e))return e;e.type!=="constructor"&&Ne.throwArgumentError("invalid constructor object","value",e);let r=$k(e);r.constant&&Ne.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(rr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?U.from(e.gas):null};return new Wn(Wo,n)}static fromString(e){let r={type:"constructor"};e=Bk(e,r);let n=e.match(mc);return(!n||n[1].trim()!=="constructor")&&Ne.throwArgumentError("invalid constructor string","value",e),r.inputs=pc(n[2].trim(),!1),Lk(n[3].trim(),r),Wn.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Hn extends Wn{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.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?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",e!==Re.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?Hn.fromString(e):Hn.fromObject(e)}static fromObject(e){if(Hn.isFunctionFragment(e))return e;e.type!=="function"&&Ne.throwArgumentError("invalid function object","value",e);let r=$k(e);const n={type:e.type,name:gc(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(rr.fromObject):[],outputs:e.outputs?e.outputs.map(rr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?U.from(e.gas):null};return new Hn(Wo,n)}static fromString(e){let r={type:"function"};e=Bk(e,r);let n=e.split(" returns ");n.length>2&&Ne.throwArgumentError("invalid function string","value",e);let i=n[0].match(mc);if(i||Ne.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&gc(r.name),r.inputs=pc(i[2],!1),Lk(i[3].trim(),r),n.length>1){let s=n[1].match(mc);(s[1].trim()!=""||s[3].trim()!="")&&Ne.throwArgumentError("unexpected tokens","value",e),r.outputs=pc(s[2],!1)}else r.outputs=[];return Hn.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function px(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Ne.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Oi extends ci{format(e){if(e||(e=Re.sighash),Re[e]||Ne.throwArgumentError("invalid format type","format",e),e===Re.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==Re.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===Re.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Oi.fromString(e):Oi.fromObject(e)}static fromObject(e){if(Oi.isErrorFragment(e))return e;e.type!=="error"&&Ne.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:gc(e.name),inputs:e.inputs?e.inputs.map(rr.fromObject):[]};return px(new Oi(Wo,r))}static fromString(e){let r={type:"error"},n=e.match(mc);return n||Ne.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&gc(r.name),r.inputs=pc(n[2],!1),px(Oi.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Ca(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const PL=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function gc(t){return(!t||!t.match(PL))&&Ne.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const mc=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function IL(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&am.throwError("value out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=At([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class oh{constructor(e,r,n,i){te(this,"_data",X(e)),te(this,"wordSize",r||32),te(this,"_coerceFunc",n),te(this,"allowLoose",i),this._offset=0}get data(){return Q(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):oh.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:am.throwError("data out-of-bounds",V.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new oh(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return U.from(this.readBytes(this.wordSize))}}var Fy={},ML={get exports(){return Fy},set exports(t){Fy=t}};/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */(function(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=MC:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",f="0123456789abcdef".split(""),c=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],v=[6,1536,393216,100663296],g=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],M=[224,256,384,512],E=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],S={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(C){return Object.prototype.toString.call(C)==="[object Array]"}),l&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(C){return typeof C=="object"&&C.buffer&&C.buffer.constructor===ArrayBuffer});for(var P=function(C,D,B){return function(j){return new h(C,D,C).update(j)[B]()}},R=function(C,D,B){return function(j,Y){return new h(C,D,Y).update(j)[B]()}},L=function(C,D,B){return function(j,Y,ee,G){return y["cshake"+C].update(j,Y,ee,G)[B]()}},F=function(C,D,B){return function(j,Y,ee,G){return y["kmac"+C].update(j,Y,ee,G)[B]()}},z=function(C,D,B,j){for(var Y=0;Y>5,this.byteCount=this.blockCount<<2,this.outputBlocks=B>>5,this.extraBytes=(B&31)>>3;for(var j=0;j<50;++j)this.s[j]=0}h.prototype.update=function(C){if(this.finalized)throw new Error(r);var D,B=typeof C;if(B!=="string"){if(B==="object"){if(C===null)throw new Error(e);if(l&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!l||!ArrayBuffer.isView(C)))throw new Error(e)}else throw new Error(e);D=!0}for(var j=this.blocks,Y=this.byteCount,ee=C.length,G=this.blockCount,J=0,he=this.s,ie,ve;J>2]|=C[J]<>2]|=ve<>2]|=(192|ve>>6)<>2]|=(128|ve&63)<=57344?(j[ie>>2]|=(224|ve>>12)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<>2]|=(240|ve>>18)<>2]|=(128|ve>>12&63)<>2]|=(128|ve>>6&63)<>2]|=(128|ve&63)<=Y){for(this.start=ie-Y,this.block=j[G],ie=0;ie>8,B=C&255;B>0;)Y.unshift(B),C=C>>8,B=C&255,++j;return D?Y.push(j):Y.unshift(j),this.update(Y),Y.length},h.prototype.encodeString=function(C){var D,B=typeof C;if(B!=="string"){if(B==="object"){if(C===null)throw new Error(e);if(l&&C.constructor===ArrayBuffer)C=new Uint8Array(C);else if(!Array.isArray(C)&&(!l||!ArrayBuffer.isView(C)))throw new Error(e)}else throw new Error(e);D=!0}var j=0,Y=C.length;if(D)j=Y;else for(var ee=0;ee=57344?j+=3:(G=65536+((G&1023)<<10|C.charCodeAt(++ee)&1023),j+=4)}return j+=this.encode(j*8),this.update(C),j},h.prototype.bytepad=function(C,D){for(var B=this.encode(D),j=0;j>2]|=this.padding[D&3],this.lastByteIndex===this.byteCount)for(C[0]=C[B],D=1;D>4&15]+f[J&15]+f[J>>12&15]+f[J>>8&15]+f[J>>20&15]+f[J>>16&15]+f[J>>28&15]+f[J>>24&15];ee%C===0&&($(D),Y=0)}return j&&(J=D[Y],G+=f[J>>4&15]+f[J&15],j>1&&(G+=f[J>>12&15]+f[J>>8&15]),j>2&&(G+=f[J>>20&15]+f[J>>16&15])),G},h.prototype.arrayBuffer=function(){this.finalize();var C=this.blockCount,D=this.s,B=this.outputBlocks,j=this.extraBytes,Y=0,ee=0,G=this.outputBits>>3,J;j?J=new ArrayBuffer(B+1<<2):J=new ArrayBuffer(G);for(var he=new Uint32Array(J);ee>8&255,G[J+2]=he>>16&255,G[J+3]=he>>24&255;ee%C===0&&$(D)}return j&&(J=ee<<2,he=D[Y],G[J]=he&255,j>1&&(G[J+1]=he>>8&255),j>2&&(G[J+2]=he>>16&255)),G};function _(C,D,B){h.call(this,C,D,B)}_.prototype=new h,_.prototype.finalize=function(){return this.encode(this.outputBits,!0),h.prototype.finalize.call(this)};var $=function(C){var D,B,j,Y,ee,G,J,he,ie,ve,Kt,Ie,Ee,St,De,He,Ys,qe,Ge,Xs,Ke,Je,Zs,Qe,Ye,eo,Xe,Ze,to,et,tt,ro,rt,nt,no,it,st,io,ot,at,so,lt,ft,oo,ct,ut,ao,dt,ht,lo,vt,yt,fo,pt,gt,co,mt,wt,ss,os,as,ls,fs;for(j=0;j<48;j+=2)Y=C[0]^C[10]^C[20]^C[30]^C[40],ee=C[1]^C[11]^C[21]^C[31]^C[41],G=C[2]^C[12]^C[22]^C[32]^C[42],J=C[3]^C[13]^C[23]^C[33]^C[43],he=C[4]^C[14]^C[24]^C[34]^C[44],ie=C[5]^C[15]^C[25]^C[35]^C[45],ve=C[6]^C[16]^C[26]^C[36]^C[46],Kt=C[7]^C[17]^C[27]^C[37]^C[47],Ie=C[8]^C[18]^C[28]^C[38]^C[48],Ee=C[9]^C[19]^C[29]^C[39]^C[49],D=Ie^(G<<1|J>>>31),B=Ee^(J<<1|G>>>31),C[0]^=D,C[1]^=B,C[10]^=D,C[11]^=B,C[20]^=D,C[21]^=B,C[30]^=D,C[31]^=B,C[40]^=D,C[41]^=B,D=Y^(he<<1|ie>>>31),B=ee^(ie<<1|he>>>31),C[2]^=D,C[3]^=B,C[12]^=D,C[13]^=B,C[22]^=D,C[23]^=B,C[32]^=D,C[33]^=B,C[42]^=D,C[43]^=B,D=G^(ve<<1|Kt>>>31),B=J^(Kt<<1|ve>>>31),C[4]^=D,C[5]^=B,C[14]^=D,C[15]^=B,C[24]^=D,C[25]^=B,C[34]^=D,C[35]^=B,C[44]^=D,C[45]^=B,D=he^(Ie<<1|Ee>>>31),B=ie^(Ee<<1|Ie>>>31),C[6]^=D,C[7]^=B,C[16]^=D,C[17]^=B,C[26]^=D,C[27]^=B,C[36]^=D,C[37]^=B,C[46]^=D,C[47]^=B,D=ve^(Y<<1|ee>>>31),B=Kt^(ee<<1|Y>>>31),C[8]^=D,C[9]^=B,C[18]^=D,C[19]^=B,C[28]^=D,C[29]^=B,C[38]^=D,C[39]^=B,C[48]^=D,C[49]^=B,St=C[0],De=C[1],ut=C[11]<<4|C[10]>>>28,ao=C[10]<<4|C[11]>>>28,Ze=C[20]<<3|C[21]>>>29,to=C[21]<<3|C[20]>>>29,os=C[31]<<9|C[30]>>>23,as=C[30]<<9|C[31]>>>23,lt=C[40]<<18|C[41]>>>14,ft=C[41]<<18|C[40]>>>14,nt=C[2]<<1|C[3]>>>31,no=C[3]<<1|C[2]>>>31,He=C[13]<<12|C[12]>>>20,Ys=C[12]<<12|C[13]>>>20,dt=C[22]<<10|C[23]>>>22,ht=C[23]<<10|C[22]>>>22,et=C[33]<<13|C[32]>>>19,tt=C[32]<<13|C[33]>>>19,ls=C[42]<<2|C[43]>>>30,fs=C[43]<<2|C[42]>>>30,pt=C[5]<<30|C[4]>>>2,gt=C[4]<<30|C[5]>>>2,it=C[14]<<6|C[15]>>>26,st=C[15]<<6|C[14]>>>26,qe=C[25]<<11|C[24]>>>21,Ge=C[24]<<11|C[25]>>>21,lo=C[34]<<15|C[35]>>>17,vt=C[35]<<15|C[34]>>>17,ro=C[45]<<29|C[44]>>>3,rt=C[44]<<29|C[45]>>>3,Qe=C[6]<<28|C[7]>>>4,Ye=C[7]<<28|C[6]>>>4,co=C[17]<<23|C[16]>>>9,mt=C[16]<<23|C[17]>>>9,io=C[26]<<25|C[27]>>>7,ot=C[27]<<25|C[26]>>>7,Xs=C[36]<<21|C[37]>>>11,Ke=C[37]<<21|C[36]>>>11,yt=C[47]<<24|C[46]>>>8,fo=C[46]<<24|C[47]>>>8,oo=C[8]<<27|C[9]>>>5,ct=C[9]<<27|C[8]>>>5,eo=C[18]<<20|C[19]>>>12,Xe=C[19]<<20|C[18]>>>12,wt=C[29]<<7|C[28]>>>25,ss=C[28]<<7|C[29]>>>25,at=C[38]<<8|C[39]>>>24,so=C[39]<<8|C[38]>>>24,Je=C[48]<<14|C[49]>>>18,Zs=C[49]<<14|C[48]>>>18,C[0]=St^~He&qe,C[1]=De^~Ys&Ge,C[10]=Qe^~eo&Ze,C[11]=Ye^~Xe&to,C[20]=nt^~it&io,C[21]=no^~st&ot,C[30]=oo^~ut&dt,C[31]=ct^~ao&ht,C[40]=pt^~co&wt,C[41]=gt^~mt&ss,C[2]=He^~qe&Xs,C[3]=Ys^~Ge&Ke,C[12]=eo^~Ze&et,C[13]=Xe^~to&tt,C[22]=it^~io&at,C[23]=st^~ot&so,C[32]=ut^~dt&lo,C[33]=ao^~ht&vt,C[42]=co^~wt&os,C[43]=mt^~ss&as,C[4]=qe^~Xs&Je,C[5]=Ge^~Ke&Zs,C[14]=Ze^~et&ro,C[15]=to^~tt&rt,C[24]=io^~at<,C[25]=ot^~so&ft,C[34]=dt^~lo&yt,C[35]=ht^~vt&fo,C[44]=wt^~os&ls,C[45]=ss^~as&fs,C[6]=Xs^~Je&St,C[7]=Ke^~Zs&De,C[16]=et^~ro&Qe,C[17]=tt^~rt&Ye,C[26]=at^~lt&nt,C[27]=so^~ft&no,C[36]=lo^~yt&oo,C[37]=vt^~fo&ct,C[46]=os^~ls&pt,C[47]=as^~fs>,C[8]=Je^~St&He,C[9]=Zs^~De&Ys,C[18]=ro^~Qe&eo,C[19]=rt^~Ye&Xe,C[28]=lt^~nt&it,C[29]=ft^~no&st,C[38]=yt^~oo&ut,C[39]=fo^~ct&ao,C[48]=ls^~pt&co,C[49]=fs^~gt&mt,C[0]^=m[j],C[1]^=m[j+1]};if(a)t.exports=y;else for(T=0;T>=8;return e}function mx(t,e,r){let n=0;for(let i=0;ie+1+n&&si.throwError("child data too short",V.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function zk(t,e){if(t.length===0&&si.throwError("data too short",V.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&si.throwError("data short segment too short",V.errors.BUFFER_OVERRUN,{});const n=mx(t,e+1,r);return e+1+r+n>t.length&&si.throwError("data long segment too short",V.errors.BUFFER_OVERRUN,{}),wx(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{}),wx(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const n=mx(t,e+1,r);e+1+r+n>t.length&&si.throwError("data array too short",V.errors.BUFFER_OVERRUN,{});const i=Q(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&si.throwError("data too short",V.errors.BUFFER_OVERRUN,{});const n=Q(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:Q(t[e])}}function y1(t){const e=X(t),r=zk(e,0);return r.consumed!==e.length&&si.throwArgumentError("invalid rlp data","data",t),r.result}const OL=Object.freeze(Object.defineProperty({__proto__:null,decode:y1,encode:Ho},Symbol.toStringTag,{value:"Module"})),DL="address/5.7.0",Es=new V(DL);function bx(t){Me(t,20)||Es.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=X(be(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const BL=9007199254740991;function LL(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const lm={};for(let t=0;t<10;t++)lm[String(t)]=String(t);for(let t=0;t<26;t++)lm[String.fromCharCode(65+t)]=String(10+t);const xx=Math.floor(LL(BL));function Uk(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>lm[n]).join("");for(;e.length>=xx;){let n=e.substring(0,xx);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}function Se(t){let e=null;if(typeof t!="string"&&Es.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=bx(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Es.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Uk(t)&&Es.throwArgumentError("bad icap checksum","address",t),e=wL(t.substring(4));e.length<40;)e="0"+e;e=bx("0x"+e)}else Es.throwArgumentError("invalid address","address",t);return e}function Vk(t){try{return Se(t),!0}catch{}return!1}function $L(t){let e=bL(Se(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Uk("XE00"+e)+e}function fm(t){let e=null;try{e=Se(t.from)}catch{Es.throwArgumentError("missing from address","transaction",t)}const r=yi(X(U.from(t.nonce).toHexString()));return Se(Ut(be(Ho([e,r])),12))}function FL(t,e,r){return bi(e)!==32&&Es.throwArgumentError("salt must be 32 bytes","salt",e),bi(r)!==32&&Es.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Se(Ut(be(At(["0xff",Se(t),e,r])),12))}class jL extends es{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Se(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Se($e(e.readValue().toHexString(),20))}}class zL extends es{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const ja=new V(jc);function Wk(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(f=>{const c=f.localName;return c||ja.throwError("cannot encode object for signature with missing names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]&&ja.throwError("cannot encode object for signature with duplicate names",V.errors.INVALID_ARGUMENT,{argument:"values",coder:f,value:r}),l[c]=!0,r[c]})}else ja.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&ja.throwArgumentError("types/value length mismatch","tuple",r);let i=new $y(t.wordSize),s=new $y(t.wordSize),o=[];e.forEach((l,f)=>{let c=n[f];if(l.dynamic){let u=s.length;l.encode(s,c);let d=i.writeUpdatableValue();o.push(v=>{d(v+u)})}else l.encode(i,c)}),o.forEach(l=>{l(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function Hk(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=s.decode(l)}catch(f){if(f.code===V.errors.BUFFER_OVERRUN)throw f;o=f,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===V.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let s=0;s{throw o}})}return Object.freeze(r)}class UL extends es{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&ja.throwError("insufficient data length",V.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Hr.OVERRUN?r.length-e-1:0}function XL(t,e,r,n,i){return t===Hr.OVERLONG?(n.push(i),0):(n.push(65533),Yk(t,e,r))}const Xk=Object.freeze({error:YL,ignore:Yk,replace:XL});function cm(t,e){e==null&&(e=Xk.error),t=X(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Hr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Hr.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Hr.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let l=0;l1114111){n+=e(Hr.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Hr.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Hr.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function We(t,e=Ki.current){e!=Ki.current&&(Qk.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return X(r)}function Gv(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function ZL(t,e){return'"'+cm(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Gv(r):(r-=65536,Gv((r>>10&1023)+55296)+Gv((r&1023)+56320))}).join("")+'"'}function jy(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ts(t,e){return jy(cm(t,e))}function lh(t,e=Ki.current){return cm(We(t,e))}function e$(t){const e=We(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Q(At([e,ah]).slice(0,32))}function t$(t){const e=X(t);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 ts(e.slice(0,r))}function r$(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function Zk(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function dm(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const n$=Zk("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),i$="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),s$=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],o$=um("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),a$=um("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),l$=um("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",r$),f$=Zk("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function c$(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function u$(t){return!!dm(t,n$)}function d$(t){let e=dm(t,s$);if(e)return[t+e.s];let r=o$[t];if(r)return r;let n=a$[t];if(n)return[t+n[0]];let i=l$[t];return i||null}function h$(t){return!!dm(t,f$)}function v$(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=lh(t);e=c$(e.map(n=>{if(i$.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=d$(n);return i||[n]})),e=lh(jy(e),Ki.NFKC),e.forEach(n=>{if(h$(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(u$(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=jy(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class y$ extends qk{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,We(r))}decode(e){return ts(super.decode(e))}}class _u extends es{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return Wk(e,this.coders,r)}decode(e){return e.coerce(this.name,Hk(e,this.coders))}}const Tu=new V(jc),p$=new RegExp(/^bytes([0-9]*)$/),g$=new RegExp(/^(u?int)([0-9]*)$/);class hm{constructor(e){te(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new jL(e.name);case"bool":return new VL(e.name);case"string":return new y$(e.name);case"bytes":return new WL(e.name);case"array":return new UL(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _u((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new qL(e.name)}let r=e.type.match(g$);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Tu.throwArgumentError("invalid "+r[1]+" bit length","param",e),new JL(n/8,r[1]==="int",e.name)}if(r=e.type.match(p$),r){let n=parseInt(r[1]);return(n===0||n>32)&&Tu.throwArgumentError("invalid bytes length","param",e),new HL(n,e.name)}return Tu.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new oh(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new $y(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(rr.from(i)));return new _u(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Tu.throwError("types/values length mismatch",V.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(rr.from(o))),i=new _u(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(rr.from(o)));return new _u(i,"_").decode(this._getReader(X(r),n))}}const jr=new hm;function As(t){return be(We(t))}const e5="hash/5.7.0";function vm(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function w$(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),v=d>>>1,g=v>>1,m=d-1;let M=0;for(let R=0;R1;){let q=L+F>>>1;R>>1|c(),z=z<<1^v,H=(H^v)<<1|v|1;A=z,S=1+H-z}let P=n-4;return E.map(R=>{switch(R-P){case 3:return P+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return P+256+(t[a++]<<8|t[a++]);case 1:return P+t[a++];default:return R-1}})}function x$(t){let e=0;return()=>t[e++]}function C$(t){return x$(b$(t))}function E$(t){return t&1?~t>>1:t>>1}function A$(t,e){let r=Array(t);for(let n=0;ne[o]):r}function k$(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(T$(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(P$(r,t))}return w$(t5(e))}function _$(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function r5(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function T$(t,e){let r=1+e(),n=e(),i=_$(e),s=r5(i.length,1+t,e);return t5(s.map((o,a)=>{const l=o[0],f=o.slice(1);return Array(i[a]).fill(void 0).map((c,u)=>{let d=u*n;return[l+u*r,f.map(v=>v+d)]})}))}function P$(t,e){let r=1+e();return r5(r,1+t,e).map(i=>[i[0],i.slice(1)])}function I$(t){let e=fh(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let f=fh(t,e);if(f.length==0)break;n.push({set:new Set(f),node:r()})}n.sort((f,c)=>c.set.size-f.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,l=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:l}}}function M$(){return C$(vm("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"))}const p1=M$(),N$=new Set(fh(p1)),R$=new Set(fh(p1)),O$=k$(p1),D$=I$(p1),Ex=45,Ax=95;function n5(t){return lh(t)}function B$(t){return t.filter(e=>e!=65039)}function i5(t){for(let e of t.split(".")){let r=n5(e);try{for(let n=r.lastIndexOf(Ax)-1;n>=0;n--)if(r[n]!==Ax)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===Ex&&r[3]===Ex)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function L$(t){return i5($$(t,B$))}function $$(t,e){let r=n5(t).reverse(),n=[];for(;r.length;){let i=j$(r);if(i){n.push(...e(i));continue}let s=r.pop();if(N$.has(s)){n.push(s);continue}if(R$.has(s))continue;let o=O$[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return i5(F$(String.fromCodePoint(...n)))}function F$(t){return t.normalize("NFC")}function j$(t,e){var r;let n=D$,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(f=>f.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=l;else if(n.check&&l===s)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const z$=new V(e5),s5=new Uint8Array(32);s5.fill(0);function Sx(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function pm(t){const e=We(L$(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(Sx(e.slice(n))),r}function U$(t){try{return pm(t).length!==0}catch{}return!1}function Nf(t){typeof t!="string"&&z$.throwArgumentError("invalid ENS name; not a string","name",t);let e=s5;const r=pm(t);for(;r.length;)e=be(At([e,be(r.pop())]));return Q(e)}function o5(t){return Q(At(pm(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const V$=`Ethereum Signed Message: +`;function gm(t){return typeof t=="string"&&(t=We(t)),be(At([We(V$),We(String(t.length)),t]))}var W$=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Mt=new V(e5),a5=new Uint8Array(32);a5.fill(0);const H$=U.from(-1),l5=U.from(0),f5=U.from(1),q$=U.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function G$(t){const e=X(t),r=e.length%32;return r?Br([e,a5.slice(r)]):Q(e)}const K$=$e(f5.toHexString(),32),J$=$e(l5.toHexString(),32),kx={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Kv=["name","version","chainId","verifyingContract","salt"];function _x(t){return function(e){return typeof e!="string"&&Mt.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const Q$={name:_x("name"),version:_x("version"),chainId:function(t){try{return U.from(t).toString()}catch{}return Mt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Se(t).toLowerCase()}catch{}return Mt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=X(t);if(e.length!==32)throw new Error("bad length");return Q(e)}catch{}return Mt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Jv(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&Mt.throwArgumentError("invalid numeric width","type",t);const i=q$.mask(r?n-1:n),s=r?i.add(f5).mul(H$):l5;return function(o){const a=U.from(o);return(a.lt(s)||a.gt(i))&&Mt.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),$e(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&Mt.throwArgumentError("invalid bytes width","type",t),function(n){return X(n).length!==r&&Mt.throwArgumentError(`invalid length for ${t}`,"value",n),G$(n)}}}switch(t){case"address":return function(e){return $e(Se(e),32)};case"bool":return function(e){return e?K$:J$};case"bytes":return function(e){return be(e)};case"string":return function(e){return As(e)}}return null}function Tx(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class sr{constructor(e){te(this,"types",Object.freeze(xi(e))),te(this,"_encoderCache",{}),te(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const l={};e[a].forEach(f=>{l[f.name]&&Mt.throwArgumentError(`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(a)}`,"types",e),l[f.name]=!0;const c=f.type.match(/^([^\x5b]*)(\x5b|$)/)[1];c===a&&Mt.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),!Jv(c)&&(n[c]||Mt.throwArgumentError(`unknown type ${JSON.stringify(c)}`,"types",e),n[c].push(a),r[a][c]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?Mt.throwArgumentError("missing primary type","types",e):s.length>1&&Mt.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),te(this,"primaryType",s[0]);function o(a,l){l[a]&&Mt.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(f=>{n[f]&&(o(f,l),Object.keys(l).forEach(c=>{i[c][f]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in i){const l=Object.keys(i[a]);l.sort(),this._types[a]=Tx(a,e[a])+l.map(f=>Tx(f,e[f])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Jv(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&Mt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(s);return this._types[i]&&(l=l.map(be)),be(Br(l))}}const n=this.types[e];if(n){const i=As(this._types[e]);return s=>{const o=n.map(({name:a,type:l})=>{const f=this.getEncoder(l)(s[a]);return this._types[l]?be(f):f});return o.unshift(i),Br(o)}}return Mt.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||Mt.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return be(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(Jv(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&Mt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):Mt.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new sr(e)}static getPrimaryType(e){return sr.from(e).primaryType}static hashStruct(e,r,n){return sr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=kx[n];i||Mt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Kv.indexOf(n.name)-Kv.indexOf(i.name)),sr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Br(["0x1901",sr.hashDomain(e),sr.from(r).hash(n)])}static hash(e,r,n){return be(sr.encode(e,r,n))}static resolveNames(e,r,n,i){return W$(this,void 0,void 0,function*(){e=Gt(e);const s={};e.verifyingContract&&!Me(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=sr.from(r);o.visit(n,(a,l)=>(a==="address"&&!Me(l,20)&&(s[l]="0x"),l));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&s[l]?s[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){sr.hashDomain(e);const i={},s=[];Kv.forEach(l=>{const f=e[l];f!=null&&(i[l]=Q$[l](f),s.push({name:l,type:kx[l]}))});const o=sr.from(r),a=Gt(r);return a.EIP712Domain?Mt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(l,f)=>{if(l.match(/^bytes(\d*)/))return Q(X(f));if(l.match(/^u?int/))return U.from(f).toString();switch(l){case"address":return f.toLowerCase();case"bool":return!!f;case"string":return typeof f!="string"&&Mt.throwArgumentError("invalid string","value",f),f}return Mt.throwArgumentError("unsupported type","type",l)})}}}const Tt=new V(jc);class c5 extends Fc{}class u5 extends Fc{}class Y$ extends Fc{}class ch extends Fc{static isIndexed(e){return!!(e&&e._isIndexed)}}const X$={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Px(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class pr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,te(this,"fragments",r.map(n=>ci.from(n)).filter(n=>n!=null)),te(this,"_abiCoder",qn(new.target,"getAbiCoder")()),te(this,"functions",{}),te(this,"errors",{}),te(this,"events",{}),te(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){Tt.warn("duplicate definition - constructor");return}te(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){Tt.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||te(this,"deploy",Wn.from({payable:!1,type:"constructor"})),te(this,"_isInterface",!0)}format(e){e||(e=Re.full),e===Re.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===Re.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return jr}static getAddress(e){return Se(e)}static getSighash(e){return Ut(As(e.format()),0,4)}static getEventTopic(e){return As(e.format())}getFunction(e){if(Me(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];Tt.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching function","name",n):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[Hn.fromString(e).format()];return r||Tt.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Me(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];Tt.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching event","name",n):i.length>1&&Tt.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[fi.fromString(e).format()];return r||Tt.throwArgumentError("no matching event","signature",e),r}getError(e){if(Me(e)){const n=qn(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}Tt.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?Tt.throwArgumentError("no matching error","name",n):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[Hn.fromString(e).format()];return r||Tt.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return qn(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),qn(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),Q(At([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=X(r);return Q(n.slice(0,4))!==this.getSighash(e)&&Tt.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Q(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(At([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=X(r),i=null,s="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const f=Q(n.slice(0,4)),c=X$[f];if(c)o=this._abiCoder.decode(c.inputs,n.slice(4)),a=c.name,l=c.signature,c.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(f);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return Tt.throwError("call revert exception"+s,V.errors.CALL_EXCEPTION,{method:e.format(),data:Q(r),errorArgs:o,errorName:a,errorSignature:l,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),Q(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Tt.throwError("too many arguments for "+e.format(),V.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?As(o):s.type==="bytes"?be(Q(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=U.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),$e(Q(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&Tt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?Tt.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(l=>i(a,l))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Tt.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(As(l));else if(o.type==="bytes")n.push(be(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else i.push(o),s.push(l)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Me(n[0],32)||n[0].toLowerCase()!==d)&&Tt.throwError("fragment/topic mismatch",V.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,v)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(rr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,At(n)):null,l=this._abiCoder.decode(s,r,!0),f=[],c=0,u=0;e.inputs.forEach((d,v)=>{if(d.indexed)if(a==null)f[v]=new ch({_isIndexed:!0,hash:null});else if(o[v])f[v]=new ch({_isIndexed:!0,hash:a[u++]});else try{f[v]=a[u++]}catch(g){f[v]=g}else try{f[v]=l[c++]}catch(g){f[v]=g}if(d.name&&f[d.name]==null){const g=f[v];g instanceof Error?Object.defineProperty(f,d.name,{enumerable:!0,get:()=>{throw Px(`property ${JSON.stringify(d.name)}`,g)}}):f[d.name]=g}});for(let d=0;d{throw Px(`index ${d}`,v)}})}return Object.freeze(f)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new u5({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:U.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new c5({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=Q(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new Y$({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const Z$="abstract-provider/5.7.0";var eF=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const tF=new V(Z$);class rF extends Fc{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class oa{constructor(){tF.checkAbstract(new.target,oa),te(this,"_isProvider",!0)}getFeeData(){return eF(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield xt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=U.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const nF="abstract-signer/5.7.0";var On=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const mn=new V(nF),iF=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],sF=[V.errors.INSUFFICIENT_FUNDS,V.errors.NONCE_EXPIRED,V.errors.REPLACEMENT_UNDERPRICED];let qo=class d5{constructor(){mn.checkAbstract(new.target,d5),te(this,"_isSigner",!0)}getBalance(e){return On(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return On(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return On(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield xt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return On(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield xt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return On(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return On(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return On(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return On(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return On(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)iF.indexOf(n)===-1&&mn.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&mn.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return On(this,void 0,void 0,function*(){const r=yield xt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>On(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&mn.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?mn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&mn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&mn.throwError("network does not support EIP-1559",V.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):mn.throwError("failed to get consistent fee data",V.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(sF.indexOf(i.code)>=0)throw i;return mn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&mn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield xt(r)})}_checkProvider(e){this.provider||mn.throwError("missing provider",V.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class mm extends qo{constructor(e,r){super(),te(this,"address",e),te(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{mn.throwError(e,V.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new mm(this.address,e)}}var Dr={},Pe={},zc=h5;function h5(t,e){if(!t)throw new Error(e||"Assertion failed")}h5.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var zy={},Ix={get exports(){return zy},set exports(t){zy=t}};typeof Object.create=="function"?Ix.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ix.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var oF=zc,aF=zy;Pe.inherits=aF;function lF(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function fF(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):lF(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Pe.htonl=v5;function uF(t,e){for(var r="",n=0;n>>0}return s}Pe.join32=dF;function hF(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Pe.split32=hF;function vF(t,e){return t>>>e|t<<32-e}Pe.rotr32=vF;function yF(t,e){return t<>>32-e}Pe.rotl32=yF;function pF(t,e){return t+e>>>0}Pe.sum32=pF;function gF(t,e,r){return t+e+r>>>0}Pe.sum32_3=gF;function mF(t,e,r,n){return t+e+r+n>>>0}Pe.sum32_4=mF;function wF(t,e,r,n,i){return t+e+r+n+i>>>0}Pe.sum32_5=wF;function bF(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Pe.sum64=bF;function xF(t,e,r,n){var i=e+n>>>0,s=(i>>0}Pe.sum64_hi=xF;function CF(t,e,r,n){var i=e+n;return i>>>0}Pe.sum64_lo=CF;function EF(t,e,r,n,i,s,o,a){var l=0,f=e;f=f+n>>>0,l+=f>>0,l+=f>>0,l+=f>>0}Pe.sum64_4_hi=EF;function AF(t,e,r,n,i,s,o,a){var l=e+n+s+a;return l>>>0}Pe.sum64_4_lo=AF;function SF(t,e,r,n,i,s,o,a,l,f){var c=0,u=e;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0,c+=u>>0}Pe.sum64_5_hi=SF;function kF(t,e,r,n,i,s,o,a,l,f){var c=e+n+s+a+f;return c>>>0}Pe.sum64_5_lo=kF;function _F(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Pe.rotr64_hi=_F;function TF(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Pe.rotr64_lo=TF;function PF(t,e,r){return t>>>r}Pe.shr64_hi=PF;function IF(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Pe.shr64_lo=IF;var Rl={},Mx=Pe,MF=zc;function g1(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Rl.BlockHash=g1;g1.prototype.update=function(e,r){if(e=Mx.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Mx.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}Si.g0_256=BF;function LF(t){return pi(t,17)^pi(t,19)^t>>>10}Si.g1_256=LF;var yl=Pe,$F=Rl,FF=Si,Qv=yl.rotl32,Zl=yl.sum32,jF=yl.sum32_5,zF=FF.ft_1,b5=$F.BlockHash,UF=[1518500249,1859775393,2400959708,3395469782];function Ci(){if(!(this instanceof Ci))return new Ci;b5.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}yl.inherits(Ci,b5);var VF=Ci;Ci.blockSize=512;Ci.outSize=160;Ci.hmacStrength=80;Ci.padLength=64;Ci.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),Ij(e.length<=this.blockSize);for(var r=e.length;r>8,d=c&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",l=0;l(d>>1)-1?m=(d>>1)-M:m=M,v.isubn(m)):m=0,u[g]=m,v.iushrn(1)}return u}r.getNAF=n;function i(l,f){var c=[[],[]];l=l.clone(),f=f.clone();for(var u=0,d=0,v;l.cmpn(-u)>0||f.cmpn(-d)>0;){var g=l.andln(3)+u&3,m=f.andln(3)+d&3;g===3&&(g=-1),m===3&&(m=-1);var M;g&1?(v=l.andln(7)+u&7,(v===3||v===5)&&m===2?M=-g:M=g):M=0,c[0].push(M);var E;m&1?(v=f.andln(7)+d&7,(v===3||v===5)&&g===2?E=-m:E=m):E=0,c[1].push(E),2*u===M+1&&(u=1-u),2*d===E+1&&(d=1-d),l.iushrn(1),f.iushrn(1)}return c}r.getJSF=i;function s(l,f,c){var u="_"+f;l.prototype[f]=function(){return this[u]!==void 0?this[u]:this[u]=c.call(this)}}r.cachedProperty=s;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new me(l,"hex","le")}r.intFromLE=a}),uh=pn.getNAF,Rj=pn.getJSF,dh=pn.assert;function Qs(t,e){this.type=t,this.p=new me(e.p,16),this.red=e.prime?me.red(e.prime):me.mont(this.p),this.zero=new me(0).toRed(this.red),this.one=new me(1).toRed(this.red),this.two=new me(2).toRed(this.red),this.n=e.n&&new me(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var aa=Qs;Qs.prototype.point=function(){throw new Error("Not implemented")};Qs.prototype.validate=function(){throw new Error("Not implemented")};Qs.prototype._fixedNafMul=function(e,r){dh(e.precomputed);var n=e._getDoubles(),i=uh(r,1,this._bitLength),s=(1<=a;f--)l=(l<<1)+i[f];o.push(l)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;l--){for(var f=0;l>=0&&o[l]===0;l--)f++;if(l>=0&&f++,a=a.dblp(f),l<0)break;var c=o[l];dh(c!==0),e.type==="affine"?c>0?a=a.mixedAdd(s[c-1>>1]):a=a.mixedAdd(s[-c-1>>1].neg()):c>0?a=a.add(s[c-1>>1]):a=a.add(s[-c-1>>1].neg())}return e.type==="affine"?a.toP():a};Qs.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,f=0,c,u,d;for(c=0;c=1;c-=2){var g=c-1,m=c;if(o[g]!==1||o[m]!==1){l[g]=uh(n[g],o[g],this._bitLength),l[m]=uh(n[m],o[m],this._bitLength),f=Math.max(l[g].length,f),f=Math.max(l[m].length,f);continue}var M=[r[g],null,null,r[m]];r[g].y.cmp(r[m].y)===0?(M[1]=r[g].add(r[m]),M[2]=r[g].toJ().mixedAdd(r[m].neg())):r[g].y.cmp(r[m].y.redNeg())===0?(M[1]=r[g].toJ().mixedAdd(r[m]),M[2]=r[g].add(r[m].neg())):(M[1]=r[g].toJ().mixedAdd(r[m]),M[2]=r[g].toJ().mixedAdd(r[m].neg()));var E=[-3,-1,-5,-7,0,7,5,1,3],A=Rj(n[g],n[m]);for(f=Math.max(A[0].length,f),l[g]=new Array(f),l[m]=new Array(f),u=0;u=0;c--){for(var F=0;c>=0;){var z=!0;for(u=0;u=0&&F++,R=R.dblp(F),c<0)break;for(u=0;u0?d=a[u][H-1>>1]:H<0&&(d=a[u][-H-1>>1].neg()),d.type==="affine"?R=R.mixedAdd(d):R=R.add(d))}}for(c=0;c=Math.ceil((e.bitLength()+1)/r.step):!1};In.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(v=f,g=c),u.negative&&(u=u.neg(),d=d.neg()),v.negative&&(v=v.neg(),g=g.neg()),[{a:u,b:d},{a:v,b:g}]};Mn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),l=o.mul(i.a),f=s.mul(n.b),c=o.mul(i.b),u=e.sub(a).sub(l),d=f.add(c).neg();return{k1:u,k2:d}};Mn.prototype.pointFromX=function(e,r){e=new me(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Mn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Mn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};fr.prototype.isInfinity=function(){return this.inf};fr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};fr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};fr.prototype.getX=function(){return this.x.fromRed()};fr.prototype.getY=function(){return this.y.fromRed()};fr.prototype.mul=function(e){return e=new me(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};fr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};fr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};fr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};fr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};fr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function mr(t,e,r,n){aa.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new me(0)):(this.x=new me(e,16),this.y=new me(r,16),this.z=new me(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}bm(mr,aa.BasePoint);Mn.prototype.jpoint=function(e,r,n){return new mr(this,e,r,n)};mr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};mr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};mr.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=i.redSub(s),f=o.redSub(a);if(l.cmpn(0)===0)return f.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=l.redSqr(),u=c.redMul(l),d=i.redMul(c),v=f.redSqr().redIAdd(u).redISub(d).redISub(d),g=f.redMul(d.redISub(v)).redISub(o.redMul(u)),m=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(v,g,m)};mr.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),l=s.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),u=n.redMul(f),d=l.redSqr().redIAdd(c).redISub(u).redISub(u),v=l.redMul(u.redISub(d)).redISub(s.redMul(c)),g=this.z.redMul(a);return this.curve.jpoint(d,v,g)};mr.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};mr.prototype.inspect=function(){return this.isInfinity()?"":""};mr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var nd=Bl(function(t,e){var r=e;r.base=aa,r.short=Dj,r.mont=null,r.edwards=null}),id=Bl(function(t,e){var r=e,n=pn.assert;function i(a){a.type==="short"?this.curve=new nd.short(a):a.type==="edwards"?this.curve=new nd.edwards(a):this.curve=new nd.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var f=new i(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:f}),f}})}s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Dr.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Dr.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Dr.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Dr.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Dr.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Dr.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Dr.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Dr.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Ws(t){if(!(this instanceof Ws))return new Ws(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Gn.toArray(t.entropy,t.entropyEnc||"hex"),r=Gn.toArray(t.nonce,t.nonceEnc||"hex"),n=Gn.toArray(t.pers,t.persEnc||"hex");wm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var N5=Ws;Ws.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ws.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Gn.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var Bj=pn.assert;function m1(t,e){if(t instanceof m1)return t;this._importDER(t,e)||(Bj(t.r&&t.s,"Signature without r or s"),this.r=new me(t.r,16),this.s=new me(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var w1=m1;function Lj(){this.place=0}function Zv(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function Dx(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}m1.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=Dx(r),n=Dx(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];e0(i,r.length),i=i.concat(r),i.push(2),e0(i,n.length);var s=i.concat(n),o=[48];return e0(o,s.length),o=o.concat(s),pn.encode(o,e)};var $j=function(){throw new Error("unsupported")},R5=pn.assert;function Pn(t){if(!(this instanceof Pn))return new Pn(t);typeof t=="string"&&(R5(Object.prototype.hasOwnProperty.call(id,t),"Unknown curve "+t),t=id[t]),t instanceof id.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var Fj=Pn;Pn.prototype.keyPair=function(e){return new xm(this,e)};Pn.prototype.keyFromPrivate=function(e,r){return xm.fromPrivate(this,e,r)};Pn.prototype.keyFromPublic=function(e,r){return xm.fromPublic(this,e,r)};Pn.prototype.genKeyPair=function(e){e||(e={});for(var r=new N5({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||$j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new me(2));;){var s=new me(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Pn.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Pn.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new me(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),l=new N5({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),f=this.n.sub(new me(1)),c=0;;c++){var u=i.k?i.k(c):new me(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(f)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var v=d.getX(),g=v.umod(this.n);if(g.cmpn(0)!==0){var m=u.invm(this.n).mul(g.mul(r.getPrivate()).iadd(e));if(m=m.umod(this.n),m.cmpn(0)!==0){var M=(d.getY().isOdd()?1:0)|(v.cmp(g)!==0?2:0);return i.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),M^=1),new w1({r:g,s:m,recoveryParam:M})}}}}}};Pn.prototype.verify=function(e,r,n,i){e=this._truncateToN(new me(e,16)),n=this.keyFromPublic(n,i),r=new w1(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),f=a.mul(s).umod(this.n),c;return this.curve._maxwellTrick?(c=this.g.jmulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.eqXToP(s)):(c=this.g.mulAdd(l,n.getPublic(),f),c.isInfinity()?!1:c.getX().umod(this.n).cmp(s)===0)};Pn.prototype.recoverPubKey=function(t,e,r,n){R5((3&r)===r,"The recovery param is more than two bits"),e=new w1(e,n);var i=this.n,s=new me(t),o=e.r,a=e.s,l=r&1,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");f?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var c=e.r.invm(i),u=i.sub(s).mul(c).umod(i),d=a.mul(c).umod(i);return this.g.mulAdd(u,o,d)};Pn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new w1(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var jj=Bl(function(t,e){var r=e;r.version="6.5.4",r.utils=pn,r.rand=function(){throw new Error("unsupported")},r.curve=nd,r.curves=id,r.ec=Fj,r.eddsa=null}),zj=jj.ec;const Uj="signing-key/5.7.0",Hy=new V(Uj);let t0=null;function oi(){return t0||(t0=new zj("secp256k1")),t0}class hh{constructor(e){te(this,"curve","secp256k1"),te(this,"privateKey",Q(e)),bi(this.privateKey)!==32&&Hy.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=oi().keyFromPrivate(X(this.privateKey));te(this,"publicKey","0x"+r.getPublic(!1,"hex")),te(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),te(this,"_isSigningKey",!0)}_addPoint(e){const r=oi().keyFromPublic(X(this.publicKey)),n=oi().keyFromPublic(X(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=oi().keyFromPrivate(X(this.privateKey)),n=X(e);n.length!==32&&Hy.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return sa({recoveryParam:i.recoveryParam,r:$e("0x"+i.r.toString(16),32),s:$e("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=oi().keyFromPrivate(X(this.privateKey)),n=oi().keyFromPublic(X(Cm(e)));return $e("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function O5(t,e){const r=sa(e),n={r:X(r.r),s:X(r.s)};return"0x"+oi().recoverPubKey(X(t),n,r.recoveryParam).encode("hex",!1)}function Cm(t,e){const r=X(t);if(r.length===32){const n=new hh(r);return e?"0x"+oi().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?Q(r):"0x"+oi().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+oi().keyFromPublic(r).getPublic(!0,"hex"):Q(r)}return Hy.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Vj="transactions/5.7.0",Ar=new V(Vj);var qy;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(qy||(qy={}));function Em(t){return t==="0x"?null:Se(t)}function Er(t){return t==="0x"?_t:U.from(t)}const Wj=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],Hj={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Am(t){const e=Cm(t);return Se(Ut(be(Ut(e,1)),12))}function Ko(t,e){return Am(O5(X(t),e))}function on(t,e){const r=yi(U.from(t).toHexString());return r.length>32&&Ar.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function r0(t,e){return{address:Se(t),storageKeys:(e||[]).map((r,n)=>(bi(r)!==32&&Ar.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function la(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Ar.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),r0(r[0],r[1])):r0(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return r0(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function D5(t){return la(t).map(e=>[e.address,e.storageKeys])}function B5(t,e){if(t.gasPrice!=null){const n=U.from(t.gasPrice),i=U.from(t.maxFeePerGas||0);n.eq(i)||Ar.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[on(t.chainId||0,"chainId"),on(t.nonce||0,"nonce"),on(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),on(t.maxFeePerGas||0,"maxFeePerGas"),on(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",on(t.value||0,"value"),t.data||"0x",D5(t.accessList||[])];if(e){const n=sa(e);r.push(on(n.recoveryParam,"recoveryParam")),r.push(yi(n.r)),r.push(yi(n.s))}return Br(["0x02",Ho(r)])}function L5(t,e){const r=[on(t.chainId||0,"chainId"),on(t.nonce||0,"nonce"),on(t.gasPrice||0,"gasPrice"),on(t.gasLimit||0,"gasLimit"),t.to!=null?Se(t.to):"0x",on(t.value||0,"value"),t.data||"0x",D5(t.accessList||[])];if(e){const n=sa(e);r.push(on(n.recoveryParam,"recoveryParam")),r.push(yi(n.r)),r.push(yi(n.s))}return Br(["0x01",Ho(r)])}function qj(t,e){om(t,Hj);const r=[];Wj.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=X(Q(a,l)),o.length&&a.length!==o.length&&a.length>0&&Ar.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=yi(a),a.length>o.maxLength&&Ar.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(Q(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&Ar.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!Gi(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(Q(n)),r.push("0x"),r.push("0x")),!e)return Ho(r);const i=sa(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&Ar.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&Ar.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(Q(s)),r.push(yi(X(i.r))),r.push(yi(X(i.s))),Ho(r)}function Gj(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Ar.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),qj(t,e);switch(t.type){case 1:return L5(t,e);case 2:return B5(t,e)}return Ar.throwError(`unsupported transaction type: ${t.type}`,V.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function $5(t,e,r){try{const n=Er(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Ar.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=$e(e[1],32),t.s=$e(e[2],32);try{const n=be(r(t));t.from=Ko(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function Kj(t){const e=y1(t.slice(1));e.length!==9&&e.length!==12&&Ar.throwArgumentError("invalid component count for transaction type: 2","payload",Q(t));const r=Er(e[2]),n=Er(e[3]),i={type:2,chainId:Er(e[0]).toNumber(),nonce:Er(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:Er(e[4]),to:Em(e[5]),value:Er(e[6]),data:e[7],accessList:la(e[8])};return e.length===9||(i.hash=be(t),$5(i,e.slice(9),B5)),i}function Jj(t){const e=y1(t.slice(1));e.length!==8&&e.length!==11&&Ar.throwArgumentError("invalid component count for transaction type: 1","payload",Q(t));const r={type:1,chainId:Er(e[0]).toNumber(),nonce:Er(e[1]).toNumber(),gasPrice:Er(e[2]),gasLimit:Er(e[3]),to:Em(e[4]),value:Er(e[5]),data:e[6],accessList:la(e[7])};return e.length===8||(r.hash=be(t),$5(r,e.slice(8),L5)),r}function Qj(t){const e=y1(t);e.length!==9&&e.length!==6&&Ar.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:Er(e[0]).toNumber(),gasPrice:Er(e[1]),gasLimit:Er(e[2]),to:Em(e[3]),value:Er(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=U.from(e[6]).toNumber()}catch{return r}if(r.r=$e(e[7],32),r.s=$e(e[8],32),U.from(r.r).isZero()&&U.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(Q(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=be(Ho(i));try{r.from=Ko(s,{r:Q(r.r),s:Q(r.s),recoveryParam:n})}catch{}r.hash=be(t)}return r.type=null,r}function F5(t){const e=X(t);if(e[0]>127)return Qj(e);switch(e[0]){case 1:return Jj(e);case 2:return Kj(e)}return Ar.throwError(`unsupported transaction type: ${e[0]}`,V.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const Yj="contracts/5.7.0";var Jo=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const zt=new V(Yj);function vh(t,e){return Jo(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&zt.throwArgumentError("invalid address or ENS name","name",r);try{return Se(r)}catch{}t||zt.throwError("a provider or signer is needed to resolve ENS names",V.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&zt.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function sd(t,e,r){return Jo(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>sd(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield vh(t,e):r.type==="tuple"?yield sd(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>sd(t,n,r.arrayChildren))):Promise.reject(zt.makeError("invalid value for array",V.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function b1(t,e,r){return Jo(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),zt.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=xt({override:vh(t.signer,n.from),signer:t.signer.getAddress()}).then(f=>Jo(this,void 0,void 0,function*(){return Se(f.signer)!==f.override&&zt.throwError("Contract with a Signer cannot override from",V.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),f.override})):n.from=t.signer.getAddress():n.from&&(n.from=vh(t.provider,n.from));const i=yield xt({args:sd(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:xt(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=U.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=U.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=U.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=U.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=U.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=la(a.accessList)),o.gasLimit==null&&e.gas!=null){let f=21e3;const c=X(s);for(let u=0;un[f]!=null);return l.length&&zt.throwError(`cannot override ${l.map(f=>JSON.stringify(f)).join(",")}`,V.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function Xj(t,e){return function(...r){return b1(t,e,r)}}function Zj(t,e){const r=t.signer||t.provider;return function(...n){return Jo(this,void 0,void 0,function*(){r||zt.throwError("estimate require a provider or signer",V.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield b1(t,e,n);return yield r.estimateGas(i)})}}function ez(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=xi(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(l,f)=>t.interface.decodeEventLog(a.eventFragment,l,f),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function j5(t,e,r){const n=t.signer||t.provider;return function(...i){return Jo(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const l=Gt(i.pop());l.blockTag!=null&&(s=yield l.blockTag),delete l.blockTag,i.push(l)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield b1(t,e,i),a=yield n.call(o,s);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===V.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=i,l.transaction=o),l}})}}function tz(t,e){return function(...r){return Jo(this,void 0,void 0,function*(){t.signer||zt.throwError("sending a transaction requires a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield b1(t,e,r),i=yield t.signer.sendTransaction(n);return ez(t,i),i})}}function Bx(t,e,r){return e.constant?j5(t,e,r):tz(t,e)}function z5(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class wc{constructor(e,r){te(this,"tag",e),te(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class rz extends wc{constructor(){super("error",null)}}class Lx extends wc{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&zt.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(z5(s),s),te(this,"address",e),te(this,"interface",r),te(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=Fk(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class $x extends wc{constructor(e,r){super("*",{address:e}),te(this,"address",e),te(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class nz{constructor(e,r,n){te(this,"interface",qn(new.target,"getInterface")(r)),n==null?(te(this,"provider",null),te(this,"signer",null)):qo.isSigner(n)?(te(this,"provider",n.provider||null),te(this,"signer",n)):oa.isProvider(n)?(te(this,"provider",n),te(this,"signer",null)):zt.throwArgumentError("invalid signer or provider","signerOrProvider",n),te(this,"callStatic",{}),te(this,"estimateGas",{}),te(this,"functions",{}),te(this,"populateTransaction",{}),te(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];te(this.filters,a,(...f)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,f)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?te(this.filters,a,this.filters[l[0]]):zt.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(te(this,"_runningEvents",{}),te(this,"_wrappedEmits",{}),e==null&&zt.throwArgumentError("invalid contract address or ENS name","addressOrName",e),te(this,"address",e),this.provider)te(this,"resolvedAddress",vh(this.provider,e));else try{te(this,"resolvedAddress",Promise.resolve(Se(e)))}catch{zt.throwError("provider is required to use ENS name as contract address",V.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){zt.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const l=a.name;i[`%${l}`]||(i[`%${l}`]=[]),i[`%${l}`].push(o)}this[o]==null&&te(this,o,Bx(this,a,!0)),this.functions[o]==null&&te(this.functions,o,Bx(this,a,!1)),this.callStatic[o]==null&&te(this.callStatic,o,j5(this,a,!0)),this.populateTransaction[o]==null&&te(this.populateTransaction,o,Xj(this,a)),this.estimateGas[o]==null&&te(this.estimateGas,o,Zj(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&te(this,o,this[l])}catch{}this.functions[o]==null&&te(this.functions,o,this.functions[l]),this.callStatic[o]==null&&te(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&te(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&te(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return fm(e)}static getInterface(e){return pr.isInterface(e)?e:new pr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&zt.throwError("contract not deployed",V.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||zt.throwError("sending a transactions require a signer",V.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&zt.throwError("cannot override "+n,V.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new mm(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&te(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return ch.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new rz);if(e==="event")return this._normalizeRunningEvent(new wc("event",null));if(e==="*")return this._normalizeRunningEvent(new $x(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new Lx(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new Lx(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new wc(z5(r),r))}return this._normalizeRunningEvent(new $x(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=xi(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||zt.throwError("events require a provider or a signer with a provider",V.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Gt(i.filter);return typeof r=="string"&&Me(r,32)?(n!=null&&zt.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class Ll extends nz{}class U5{constructor(e){te(this,"alphabet",e),te(this,"base",e.length),te(this,"_alphabetMap",{}),te(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=X(bc(i,t,l));s||(s=d.length,c=new Uint8Array(s),o=Math.ceil(n/s),f=n-(o-1)*s),c.set(d);for(let m=1;m=256)throw new Error("Depth too large!");return zx(At([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",Q(this.depth),this.parentFingerprint,$e(Q(this.index),4),this.chainCode,this.privateKey!=null?At(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ii(ya,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~Ea));const n=new Uint8Array(37);if(e&Ea){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(X(this.privateKey),1),r&&(r+="'")}else n.set(X(this.publicKey));for(let u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const i=X(bc(wl.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,l=null;this.privateKey?a=Iu(U.from(s).add(this.privateKey).mod(hz)):l=new hh(Q(s))._addPoint(this.publicKey);let f=r;const c=this.mnemonic;return c&&(f=Object.freeze({phrase:c.phrase,path:r,locale:c.locale||"en"})),new Ii(ya,a,l,this.fingerprint,Iu(o),e,this.depth+1,f)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=Ea)throw new Error("invalid path index - "+s);n=n._derive(Ea+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=Ea)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=X(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=X(bc(wl.sha512,vz,n));return new Ii(ya,Iu(i.slice(0,32)),null,"0x00000000",Iu(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=Sm(n),e=G5(km(e,n),n),Ii._fromSeed(q5(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ii._fromSeed(e,null)}static fromExtendedKey(e){const r=ml.decode(e);(r.length!==82||zx(r.slice(0,78))!==e)&&xc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=Q(r.slice(5,9)),s=parseInt(Q(r.slice(9,13)).substring(2),16),o=Q(r.slice(13,45)),a=r.slice(45,78);switch(Q(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Ii(ya,null,Q(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Ii(ya,Q(a.slice(1)),null,i,o,s,n,null)}return xc.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function q5(t,e){e||(e="");const r=We("mnemonic"+e,Ki.NFKD);return az(We(t,Ki.NFKD),r,2048,64,"sha512")}function km(t,e){e=Sm(e),xc.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=X(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let f=0;f>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=H5(o);if((X(Yi(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return Q(n.slice(0,s/8))}function G5(t,e){if(e=Sm(e),t=X(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");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]&yz(8-n)),n+=3);const i=t.length/4,s=X(Yi(t))[0]&H5(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function gz(t,e){try{return km(t,e),!0}catch{}return!1}function mz(t){return(typeof t!="number"||t<0||t>=Ea||t%1)&&xc.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const wz="random/5.7.0",Gy=new V(wz);function bz(){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 Ux=bz();let od=Ux.crypto||Ux.msCrypto;(!od||!od.getRandomValues)&&(Gy.warn("WARNING: Missing strong random number source"),od={getRandomValues:function(t){return Gy.throwError("no secure random source avaialble",V.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function x1(t){(t<=0||t>1024||t%1||t!=t)&&Gy.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return od.getRandomValues(e),X(e)}function xz(t){t=t.slice();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}return t}function Cz(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function Ez(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function Az(t){if(Cz(t))try{return Se(JSON.parse(t).ethaddr)}catch{return null}if(Ez(t))try{return Se(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function K5(t,e){return Ko(gm(t),e)}function Sz(t,e,r,n){return Ko(sr.hash(t,e,r),n)}const kz="networks/5.7.1",Vx=new V(kz);function _z(t){return t&&typeof t.renetwork=="function"}function Ri(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return Ri(r)},e}function yh(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return yh(t,n)},r}const Wx={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Ri("homestead")},Hx={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Ri("ropsten")},qx={chainId:63,name:"classicMordor",_defaultProvider:yh("https://www.ethercluster.com/mordor","classicMordor")},Mu={unspecified:{chainId:0,name:"unspecified"},homestead:Wx,mainnet:Wx,morden:{chainId:2,name:"morden"},ropsten:Hx,testnet:Hx,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Ri("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Ri("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Ri("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Ri("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:yh("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qx,classicTestnet:qx,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:yh("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Ri("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Ri("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Tz(t){if(t==null)return null;if(typeof t=="number"){for(const n in Mu){const i=Mu[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Mu[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Mu[t.name];if(!e)return typeof t.chainId!="number"&&Vx.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&Vx.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(_z(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const Pz="web/5.7.1";var Iz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};function Mz(t,e){return Iz(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:X(new Uint8Array(i))}})}var Nz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const $n=new V(Pz);function Gx(t){return new Promise(e=>{setTimeout(e,t)})}function ds(t,e){if(t==null)return null;if(typeof t=="string")return t;if(Gi(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ts(t)}catch{}return Q(t)}return t}function Rz(t){return We(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function J5(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;$n.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;$n.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const f={method:"GET"};let c=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&$n.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const E in t.headers)a[E.toLowerCase()]={key:E,value:String(t.headers[E])},["if-none-match","if-modified-since"].indexOf(E.toLowerCase())>=0&&(c=!0);if(f.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&$n.throwError("basic authentication requires a secure https url",V.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const E=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+ym(We(E))}}t.skipFetchSetup!=null&&(f.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(f.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),v=l?l.match(d):null;if(v)try{const E={statusCode:200,statusMessage:"OK",headers:{"content-type":v[1]||"text/plain"},body:v[2]?vm(v[3]):Rz(v[3])};let A=E.body;return r&&(A=r(E.body,E)),Promise.resolve(A)}catch(E){$n.throwError("processing response error",V.errors.SERVER_ERROR,{body:ds(v[1],v[2]),error:E,requestBody:null,requestMethod:"GET",url:l})}e&&(f.method="POST",f.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const g={};Object.keys(a).forEach(E=>{const A=a[E];g[A.key]=A.value}),f.headers=g;const m=function(){let E=null;return{promise:new Promise(function(P,R){u&&(E=setTimeout(()=>{E!=null&&(E=null,R($n.makeError("timeout",V.errors.TIMEOUT,{requestBody:ds(f.body,g["content-type"]),requestMethod:f.method,timeout:u,url:l})))},u))}),cancel:function(){E!=null&&(clearTimeout(E),E=null)}}}(),M=function(){return Nz(this,void 0,void 0,function*(){for(let E=0;E=300)&&(m.cancel(),$n.throwError("bad response",V.errors.SERVER_ERROR,{status:A.statusCode,headers:A.headers,body:ds(S,A.headers?A.headers["content-type"]:null),requestBody:ds(f.body,g["content-type"]),requestMethod:f.method,url:l})),r)try{const P=yield r(S,A);return m.cancel(),P}catch(P){if(P.throttleRetry&&E{let a=null;if(s!=null)try{a=JSON.parse(ts(s))}catch(l){$n.throwError("invalid JSON",V.errors.SERVER_ERROR,{body:s,error:l})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=We(e);const s=typeof t=="string"?{url:t}:Gt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Gt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return J5(t,i,n)}function To(t,e){return e||(e={}),e=Gt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function f(){return t().then(function(c){if(c!==void 0)o()&&r(c);else if(e.oncePoll)e.oncePoll.once("poll",f);else if(e.onceBlock)e.onceBlock.once("block",f);else if(!s){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(f,u)}return null},function(c){o()&&n(c)})}f()})}var ph="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ky={};for(var Nu=0;Nu>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function Q5(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=Za(e)^n>>5}for(e=Za(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Q5(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=Za(n)^o,i+=ph.charAt(o)}for(s=0;s<6;++s)n=Za(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=ph.charAt(a)}return i}function Y5(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=Q5(s);if(typeof a=="string")return a;for(var l=[],f=0;f=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:l}}function Dz(){var t=Y5.apply(null,arguments);if(typeof t=="object")return t}function Bz(t){var e=Y5.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function C1(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(u,!0);return e.transaction={hash:o,type:f,accessList:oe.allowNull(this.accessList.bind(this),null),blockHash:oe.allowNull(o,null),blockNumber:oe.allowNull(l,null),transactionIndex:oe.allowNull(l,null),confirmations:oe.allowNull(l,null),from:r,gasPrice:oe.allowNull(n),maxPriorityFeePerGas:oe.allowNull(n),maxFeePerGas:oe.allowNull(n),gasLimit:n,to:oe.allowNull(r,null),value:n,nonce:l,data:s,r:oe.allowNull(this.uint256),s:oe.allowNull(this.uint256),v:oe.allowNull(l),creates:oe.allowNull(r,null),raw:oe.allowNull(s)},e.transactionRequest={from:oe.allowNull(r),nonce:oe.allowNull(l),gasLimit:oe.allowNull(n),gasPrice:oe.allowNull(n),maxPriorityFeePerGas:oe.allowNull(n),maxFeePerGas:oe.allowNull(n),to:oe.allowNull(r),value:oe.allowNull(n),data:oe.allowNull(c),type:oe.allowNull(l),accessList:oe.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:oe.arrayOf(o),data:s,logIndex:l,blockHash:o},e.receipt={to:oe.allowNull(this.address,null),from:oe.allowNull(this.address,null),contractAddress:oe.allowNull(r,null),transactionIndex:l,root:oe.allowNull(a),gasUsed:n,logsBloom:oe.allowNull(s),blockHash:o,transactionHash:o,logs:oe.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:oe.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:oe.allowNull(n),status:oe.allowNull(l),type:f},e.block={hash:oe.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:oe.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:oe.allowNull(r),extraData:s,transactions:oe.allowNull(oe.arrayOf(o)),baseFeePerGas:oe.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=oe.allowNull(oe.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:oe.allowNull(i,void 0),toBlock:oe.allowNull(i,void 0),blockHash:oe.allowNull(o,void 0),address:oe.allowNull(r,void 0),topics:oe.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:oe.allowNull(l),blockHash:oe.allowNull(o),transactionIndex:l,removed:oe.allowNull(this.boolean.bind(this)),address:r,data:oe.allowFalsish(s,"0x"),topics:oe.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return la(e||[])}number(e){return e==="0x"?0:U.from(e).toNumber()}type(e){return e==="0x"||e==null?0:U.from(e).toNumber()}bigNumber(e){return U.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Me(e))?e.toLowerCase():tf.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return Se(e)}callAddress(e){if(!Me(e,32))return null;const r=Se(Ut(e,12));return r===Gk?null:r}contractAddress(e){return fm(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Me(e))return Vs(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return bi(n)!==32?tf.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=U.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Me(e))throw new Error("invalid uint256");return $e(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=oe.check(r,e);return i._difficulty=n==null?null:U.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return oe.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&U.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=oe.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Me(n)&&(n=U.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Me(n)&&(n=U.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return F5(e)}receiptLog(e){return oe.check(this.formats.receiptLog,e)}receipt(e){const r=oe.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=U.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&tf.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):tf.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&tf.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return oe.check(this.formats.filter,e)}filterLog(e){return oe.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}var ge=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ce=new V(Wc),zz=10;function Jx(t){return t==null?"null":(bi(t)!==32&&Ce.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function Qx(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[Jx(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return Jx(e)}).join("&")}function Uz(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function pa(t){if(typeof t=="string"){if(t=t.toLowerCase(),bi(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+Qx(t);if(rF.isForkEvent(t))throw Ce.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+Qx(t.topics||[])}throw new Error("invalid event - "+t)}function rf(){return new Date().getTime()}function Yx(t){return new Promise(e=>{setTimeout(e,t)})}const Vz=["block","network","pending","poll"];let Wz=class{constructor(e,r,n){te(this,"tag",e),te(this,"listener",r),te(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=Uz(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||Vz.indexOf(this.tag)>=0}};const Hz={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function i0(t){return $e(U.from(t).toHexString(),32)}function Xx(t){return ml.encode(At([t,Ut(Yi(Yi(t)),0,4)]))}const X5=new RegExp("^(ipfs)://(.*)$","i"),Zx=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),X5,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function ad(t,e){try{return ts(Cc(t,e))}catch{}return null}function Cc(t,e){if(t==="0x")return null;const r=U.from(Ut(t,e,e+32)).toNumber(),n=U.from(Ut(t,r,r+32)).toNumber();return Ut(t,r+32,r+32+n)}function s0(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ce.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function eC(t){const e=X(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 qz(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Z5(t){const e=[];let r=0;for(let n=0;nU.from(e).eq(1)).catch(e=>{if(e.code===V.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ge(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Br([e,Nf(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=Br(["0x9061b923",Z5([o5(this.name),n.data])]));try{let s=yield this.provider.call(n);return X(s).length%32===4&&Ce.throwError("resolver threw error",V.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=Cc(s,0)),s}catch(s){if(s.code===V.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return ge(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Cc(n,0):null})}_getAddress(e,r){const n=Hz[String(e)];if(n==null&&Ce.throwError(`unsupported coin type: ${e}`,V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=X(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return Xx(At([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return Xx(At([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=Kx.toWords(i.slice(2));return a.unshift(o),Kx.encode(n.prefix,a)}}return null}getAddress(e){return ge(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===ah?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===V.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",i0(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ce.throwError("invalid or unsupported coin data",V.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ge(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[l])}return Ce.throwError("invalid or unsupported content hash data",V.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ge(this,void 0,void 0,function*(){let r=We(e);r=At([i0(64),i0(r.length),r]),r.length%32!==0&&(r=At([r,$e("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",Q(r));return n==null||n==="0x"?null:ts(n)})}}let o0=null,Gz=1;class _m extends oa{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),te(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=qn(new.target,"getNetwork")(e);r?(te(this,"_network",r),this.emit("network",r,null)):Ce.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ge(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||Ce.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:te(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return To(()=>this._ready().then(e=>e,e=>{if(!(e.code===V.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return o0==null&&(o0=new oe),o0}static getNetwork(e){return Tz(e??"homestead")}ccipReadFetch(e,r,n){return ge(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),u=yield Vc({url:f,errorPassThrough:!0},c,(v,g)=>(v.status=g.statusCode,v));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ce.throwError(`response not found during CCIP fetch: ${d}`,V.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ce.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,V.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return ge(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(rf()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=rf(),n=xt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=rf();return i=U.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ge(this,void 0,void 0,function*(){const e=Gz++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ce.makeError("network block skew detected",V.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(l=>{i._inflight=!1,l.length!==0&&l.forEach(f=>{f.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=f.blockNumber),this._emitted["b:"+f.blockHash]=f.blockNumber,this._emitted["t:"+f.transactionHash]=f.blockNumber,this.emit(s,f)})}).catch(l=>{this.emit("error",l),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ge(this,void 0,void 0,function*(){return Ce.throwError("provider does not support network detection",V.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ge(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield Yx(0),this._network;const n=Ce.makeError("underlying network changed",V.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=rf();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ge(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return ge(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const l=[];let f=!1;const c=function(){return f?!0:(f=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),i){let d=i.startBlock,v=null;const g=m=>ge(this,void 0,void 0,function*(){f||(yield Yx(1e3),this.getTransactionCount(i.from).then(M=>ge(this,void 0,void 0,function*(){if(!f){if(M<=i.nonce)d=m;else{{const E=yield this.getTransaction(e);if(E&&E.blockNumber!=null)return}for(v==null&&(v=d-3,v{f||this.once("block",g)}))});if(f)return;this.once("block",g),l.push(()=>{this.removeListener("block",g)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{c()||a(Ce.makeError("timeout exceeded",V.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return ge(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return U.from(e)}catch(r){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return U.from(i)}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return U.from(i).toNumber()}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return Q(i)}catch(s){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield xt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Vs(o))}),s=yield this.perform("getStorageAt",i);try{return Q(s)}catch(o){return Ce.throwError("bad result from backend",V.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&bi(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&Ce.throwError("Transaction hash mismatch from Provider.sendTransaction.",V.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>ge(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,s,o,a);return l==null&&s===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ce.throwError("transaction failed",V.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>Q(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return ge(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?U.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?Q(s):null))}),this.formatter.transactionRequest(yield xt(n))})}_getFilter(e){return ge(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield xt(r))})}_call(e,r,n){return ge(this,void 0,void 0,function*(){n>=zz&&Ce.throwError("CCIP read exceeded maximum redirections",V.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&bi(s)%32===4)try{const o=Ut(s,4),a=Ut(o,0,32);U.from(a).eq(i)||Ce.throwError("CCIP Read sender did not match",V.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const l=[],f=U.from(Ut(o,32,64)).toNumber(),c=U.from(Ut(o,f,f+32)).toNumber(),u=Ut(o,f+32);for(let E=0;Ege(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return To(()=>ge(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return To(()=>ge(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return ge(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield xt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),oe.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ge(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ge(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ce.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ge(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new Jy(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ge(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ce.throwError("network does not support ENS",V.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Nf(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ge(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Me(e))throw n}typeof e!="string"&&Ce.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ge(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=ad(yield this.call({to:n,data:"0x691f3431"+Nf(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ge(this,void 0,void 0,function*(){let r=null;if(Me(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new Jy(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==V.errors.CALL_EXCEPTION)throw a}try{const a=ad(yield this.call({to:o,data:"0x691f3431"+Nf(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==V.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return Ce.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new Wz(pa(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=pa(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=pa(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=pa(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=pa(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=pa(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Mi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Ht=new V(Wc),Kz=["call","estimateGas"];function Of(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Me(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Of(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Of(JSON.parse(t),e)}catch{}return null}function e3(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Of(e,!0);if(s)return s.data;Ht.throwError("missing revert data in call exception; Transaction reverted without a reason string",V.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Of(e.body,!1);s==null&&(s=Of(e,!1)),s&&Ht.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===V.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Ht.throwError("insufficient funds for intrinsic transaction cost",V.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Ht.throwError("nonce has already been used",V.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Ht.throwError("replacement fee too low",V.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Ht.throwError("legacy pre-eip-155 transactions not supported",V.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),Kz.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Ht.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",V.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function tC(t){return new Promise(function(e){setTimeout(e,t)})}function Jz(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}function nf(t){return t&&t.toLowerCase()}const Qy={};class t3 extends qo{constructor(e,r,n){if(super(),e!==Qy)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");te(this,"provider",r),n==null&&(n=0),typeof n=="string"?(te(this,"_address",this.provider.formatter.address(n)),te(this,"_index",null)):typeof n=="number"?(te(this,"_index",n),te(this,"_address",null)):Ht.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Ht.throwError("cannot alter JSON-RPC Signer connection",V.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Qz(Qy,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Ht.throwError("unknown account #"+this._index,V.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Mi(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Ht.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),xt({tx:xt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Ht.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Ht.throwError("user rejected transaction",V.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),e3("sendTransaction",o,s)))})}signTransaction(e){return Ht.throwError("signing transactions is unsupported",V.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Mi(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield To(()=>Mi(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return Mi(this,void 0,void 0,function*(){const r=typeof e=="string"?We(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[Q(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return Mi(this,void 0,void 0,function*(){const r=typeof e=="string"?We(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),Q(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return Mi(this,void 0,void 0,function*(){const i=yield sr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(sr.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Ht.throwError("user rejected signing",V.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return Mi(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class Qz extends t3{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const Yz={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let fa=class extends _m{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=qn(this.constructor,"defaultUrl")()),typeof e=="string"?te(this,"connection",Object.freeze({url:e})):te(this,"connection",Object.freeze(Gt(e))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Mi(this,void 0,void 0,function*(){yield tC(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=qn(this.constructor,"getNetwork");try{return r(U.from(e).toNumber())}catch(n){return Ht.throwError("could not detect network",V.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Ht.throwError("could not detect network",V.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new t3(Qy,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:xi(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=Vc(this.connection,JSON.stringify(n),Jz).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[nf(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[nf(r.address),r.blockTag]];case"getCode":return["eth_getCode",[nf(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[nf(r.address),$e(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[qn(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=nf(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Mi(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&U.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Ht.throwError(e+" not implemented",V.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return e3(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return tC(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(Yz);if(r)for(const s in r)r[s]&&(n[s]=!0);om(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=Vs(U.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=Q(e[s]))}),e.accessList&&(i.accessList=la(e.accessList)),i}};var Xz=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(c){try{f(n.next(c))}catch(u){o(u)}}function l(c){try{f(n.throw(c))}catch(u){o(u)}}function f(c){c.done?s(c.value):i(c.value).then(a,l)}f((n=n.apply(t,e||[])).next())})};const Zz=new V(Wc);class gh extends fa{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Xz(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||Zz.throwError("no network detected",V.errors.UNKNOWN_ERROR,{}),this._network==null&&(te(this,"_network",r),this.emit("network",r,null))),r})}}const rC=new V(Wc);let eU=1;function nC(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:eU++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:xi(s),provider:this}),e(s,(l,f)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:s,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:f,provider:this}),f.error){const c=new Error(f.error.message);return c.code=f.error.code,c.data=f.error.data,a(c)}o(f.result)})})}}function tU(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:xi(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class rU extends fa{constructor(e,r){e==null&&rC.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=tU(e)):e.sendAsync?i=nC(e,e.sendAsync.bind(e)):e.send?i=nC(e,e.send.bind(e)):rC.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),te(this,"jsonRpcFetchFunc",i),te(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const nU="solidity/5.7.0",iU=new RegExp("^bytes([0-9]+)$"),sU=new RegExp("^(u?int)([0-9]*)$"),oU=new RegExp("^(.*)\\[([0-9]*)\\]$"),aU="0000000000000000000000000000000000000000000000000000000000000000",Aa=new V(nU);function r3(t,e,r){switch(t){case"address":return r?Pf(e,32):X(e);case"string":return We(e);case"bytes":return X(e);case"bool":return e=e?"0x01":"0x00",r?Pf(e,32):X(e)}let n=t.match(sU);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Aa.throwArgumentError("invalid number type","type",t),r&&(i=256),e=U.from(e).toTwos(i),Pf(e,i/8)}if(n=t.match(iU),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Aa.throwArgumentError("invalid bytes type","type",t),X(e).byteLength!==i&&Aa.throwArgumentError(`invalid value for ${t}`,"value",e),r?X((e+aU).substring(0,66)):e}if(n=t.match(oU),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Aa.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(r3(i,a,!0))}),At(o)}return Aa.throwArgumentError("invalid type","type",t)}function xe(t,e){t.length!=e.length&&Aa.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(r3(n,e[i]))}),Q(At(r))}function Ui(t,e){return be(xe(t,e))}function lU(t,e){return Yi(xe(t,e))}const fU="units/5.7.0",n3=new V(fU),i3=["wei","kwei","mwei","gwei","szabo","finney","ether"];function cU(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&n3.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function s3(t,e){if(typeof e=="string"){const r=i3.indexOf(e);r!==-1&&(e=3*r)}return td(t,e??18)}function mh(t,e){if(typeof t!="string"&&n3.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=i3.indexOf(e);r!==-1&&(e=3*r)}return ri(t,e??18)}function uU(t){return s3(t,18)}function Yy(t){return mh(t,18)}const dU=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:hm,ConstructorFragment:Wn,ErrorFragment:Oi,EventFragment:fi,FormatTypes:Re,Fragment:ci,FunctionFragment:Hn,HDNode:Ii,Indexed:ch,Interface:pr,LogDescription:c5,Logger:V,ParamType:rr,RLP:OL,SigningKey:hh,get SupportedAlgorithm(){return wl},TransactionDescription:u5,get TransactionTypes(){return qy},get UnicodeNormalizationForm(){return Ki},Utf8ErrorFuncs:Xk,get Utf8ErrorReason(){return Hr},_TypedDataEncoder:sr,_fetchData:J5,_toEscapedUtf8String:ZL,accessListify:la,arrayify:X,base58:ml,base64:m$,checkProperties:om,checkResultErrors:Fk,commify:cU,computeAddress:Am,computeHmac:bc,computePublicKey:Cm,concat:At,deepCopy:xi,defaultAbiCoder:jr,defaultPath:pz,defineReadOnly:te,dnsEncode:o5,entropyToMnemonic:G5,fetchJson:Vc,formatBytes32String:e$,formatEther:uU,formatUnits:s3,getAccountPath:mz,getAddress:Se,getContractAddress:fm,getCreate2Address:FL,getIcapAddress:$L,getJsonWalletAddress:Az,getStatic:qn,hashMessage:gm,hexConcat:Br,hexDataLength:bi,hexDataSlice:Ut,hexStripZeros:Ik,hexValue:Vs,hexZeroPad:$e,hexlify:Q,id:As,isAddress:Vk,isBytes:Zi,isBytesLike:Gi,isHexString:Me,isValidMnemonic:gz,isValidName:U$,joinSignature:gL,keccak256:be,mnemonicToEntropy:km,mnemonicToSeed:q5,namehash:Nf,nameprep:v$,parseBytes32String:t$,parseEther:Yy,parseTransaction:F5,parseUnits:mh,poll:To,randomBytes:x1,recoverAddress:Ko,recoverPublicKey:O5,resolveProperties:xt,ripemd160:V5,serializeTransaction:Gj,sha256:Yi,sha512:oz,shallowCopy:Gt,shuffled:xz,solidityKeccak256:Ui,solidityPack:xe,soliditySha256:lU,splitSignature:sa,stripZeros:yi,toUtf8Bytes:We,toUtf8CodePoints:lh,toUtf8String:ts,verifyMessage:K5,verifyTypedData:Sz,zeroPad:Pf},Symbol.toStringTag,{value:"Module"})),hU=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var vU=Object.freeze({__proto__:null,abi:hU});const yU=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],pU={isValidSignatureBytes32:"0x1626ba7e"};var gU=Object.freeze({__proto__:null,abi:yU,returns:pU});const mU=[{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 wU=Object.freeze({__proto__:null,abi:mU});const bU=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var xU=Object.freeze({__proto__:null,abi:bU});const CU=[{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"}];var EU=Object.freeze({__proto__:null,abi:CU});const AU=[{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 SU=Object.freeze({__proto__:null,abi:AU});const kU=[{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 _U=Object.freeze({__proto__:null,abi:kU});const TU=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var PU=Object.freeze({__proto__:null,abi:TU});const Tr={erc6492:wU,erc5719:vU,erc1271:gU,factory:xU,mainModule:EU,mainModuleUpgradable:SU,sequenceUtils:_U,requireFreshSigner:PU},IU=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:Tr},Symbol.toStringTag,{value:"Module"}));function wh(){return wh=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ce({},n)).then(i=>ue(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ce({},n)).then(i=>ue(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ce({},n)).then(i=>ue(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),ce({},n)).then(i=>ue(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),ce(n,i)).then(s=>ue(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),ce(n,i)).then(s=>ue(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),ce(n,i)).then(s=>ue(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),ce(n,i)).then(s=>ue(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),ce(n,i)).then(s=>ue(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),ce(n,i)).then(s=>ue(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),ce(n,i)).then(s=>ue(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),ce(n,i)).then(s=>ue(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),ce({},n)).then(i=>ue(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),ce(n,i)).then(s=>ue(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),ce(n,i)).then(s=>ue(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),ce(n,i)).then(s=>ue(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),ce(n,i)).then(s=>ue(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),ce(n,i)).then(s=>ue(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),ce(n,i)).then(s=>ue(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),ce(n,i)).then(s=>ue(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),ce({},n)).then(i=>ue(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),ce(n,i)).then(s=>ue(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),ce(n,i)).then(s=>ue(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),ce(n,i)).then(s=>ue(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),ce(n,i)).then(s=>ue(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),ce(n,i)).then(s=>ue(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),ce(n,i)).then(s=>ue(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),ce(n,i)).then(s=>ue(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),ce(n,i)).then(s=>ue(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),ce(n,i)).then(s=>ue(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),ce(n,i)).then(s=>ue(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),ce({},n)).then(i=>ue(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),ce(n,i)).then(s=>ue(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),ce(n,i)).then(s=>ue(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),ce(n,i)).then(s=>ue(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),ce(n,i)).then(s=>ue(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),ce(n,i)).then(s=>ue(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ce=(t={},e={})=>({method:"POST",headers:wh({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ue=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),iC=typeof global=="object"?global.fetch:window.fetch;class ld extends o3{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,iC),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=wh({},i.headers,s),iC(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const LU=Object.freeze(Object.defineProperty({__proto__:null,API:o3,SequenceAPIClient:ld,SmartRampOrderStatus:OU,SmartRampTxnStatus:DU,SortOrder:BU,WebRPCSchemaHash:RU,WebRPCSchemaVersion:NU,WebRPCVersion:MU},Symbol.toStringTag,{value:"Module"})),a3="3.7.5",$U=a3,FU=typeof atob=="function",jU=typeof btoa=="function",$l=typeof Buffer=="function",sC=typeof TextDecoder=="function"?new TextDecoder:void 0,oC=typeof TextEncoder=="function"?new TextEncoder:void 0,zU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",cf=Array.prototype.slice.call(zU),Ru=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(cf),UU=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,vr=String.fromCharCode.bind(String),aC=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),l3=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),f3=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),c3=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=cf[e>>18&63]+cf[e>>12&63]+cf[e>>6&63]+cf[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},Tm=jU?t=>btoa(t):$l?t=>Buffer.from(t,"binary").toString("base64"):c3,Xy=$l?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?l3(Xy(t)):Xy(t),VU=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?vr(192|e>>>6)+vr(128|e&63):vr(224|e>>>12&15)+vr(128|e>>>6&63)+vr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return vr(240|e>>>18&7)+vr(128|e>>>12&63)+vr(128|e>>>6&63)+vr(128|e&63)}},WU=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u3=t=>t.replace(WU,VU),lC=$l?t=>Buffer.from(t,"utf8").toString("base64"):oC?t=>Xy(oC.encode(t)):t=>Tm(u3(t)),el=(t,e=!1)=>e?l3(lC(t)):lC(t),fC=t=>el(t,!0),HU=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,qU=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 vr((r>>>10)+55296)+vr((r&1023)+56320);case 3:return vr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return vr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},d3=t=>t.replace(HU,qU),h3=t=>{if(t=t.replace(/\s+/g,""),!UU.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?vr(e>>16&255,e>>8&255):vr(e>>16&255,e>>8&255,e&255);return r},Pm=FU?t=>atob(f3(t)):$l?t=>Buffer.from(t,"base64").toString("binary"):h3,v3=$l?t=>aC(Buffer.from(t,"base64")):t=>aC(Pm(t).split("").map(e=>e.charCodeAt(0))),y3=t=>v3(p3(t)),GU=$l?t=>Buffer.from(t,"base64").toString("utf8"):sC?t=>sC.decode(v3(t)):t=>d3(Pm(t)),p3=t=>f3(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Zy=t=>GU(p3(t)),KU=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)},g3=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),m3=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,g3(r));t("fromBase64",function(){return Zy(this)}),t("toBase64",function(e){return el(this,e)}),t("toBase64URI",function(){return el(this,!0)}),t("toBase64URL",function(){return el(this,!0)}),t("toUint8Array",function(){return y3(this)})},w3=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,g3(r));t("toBase64",function(e){return fd(this,e)}),t("toBase64URI",function(){return fd(this,!0)}),t("toBase64URL",function(){return fd(this,!0)})},JU=()=>{m3(),w3()},Qo={version:a3,VERSION:$U,atob:Pm,atobPolyfill:h3,btoa:Tm,btoaPolyfill:c3,fromBase64:Zy,toBase64:el,encode:el,encodeURI:fC,encodeURL:fC,utob:u3,btou:d3,decode:Zy,isValid:KU,fromUint8Array:fd,toUint8Array:y3,extendString:m3,extendUint8Array:w3,extendBuiltins:JU};var ep=function(){return ep=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),YU=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}},XU=function(t,e,r){return bo(void 0,void 0,void 0,function(){var n,i;return xo(this,function(s){return n=r.messageDigest(),i=K5(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},ZU=function(t,e,r){return bo(void 0,void 0,void 0,function(){var n,i,s,o,a;return xo(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=l.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Ll(r.address,s,t),[4,o.isValidSignature(n,X(r.signature))];case 2:return a=l.sent(),a===eV?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},eV="0x1626ba7e",b3="1",tp="eth",tV={name:"ETHAuth",version:b3},bh=function(){function t(){for(var e=[],r=0;r0&&(l+="."+i.extra),[2,l]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),bo(n,void 0,void 0,function(){var o,a,l,f,c,u,d,v,g,m;return xo(this,function(M){switch(M.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],f=o[2],c=o[3],u=o[4],a!==tp)throw new Error("ethauth: not an ethauth proof");return d=Qo.decode(f),v=JSON.parse(d),g=new Im({address:l,claims:v,signature:c,extra:u}),[4,this.validateProof(g,s)];case 1:if(m=M.sent(),!m)throw new Error("ethauth: proof is invalid");return[2,g]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),bo(n,void 0,void 0,function(){var o,a;return xo(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return bo(n,void 0,void 0,function(){var s,l,o,a,l;return xo(this,function(f){switch(f.label){case 0:s=[],l=0,f.label=1;case 1:if(!(lQo.encode(t,!0),Mm=t=>Qo.encode(JSON.stringify(t),!0),nV=t=>{if(t!=null)return Qo.decode(t)},Nm=t=>{if(t!=null)return JSON.parse(Qo.decode(t))};function x3(t){return t!=null&&(U.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Me(t)||typeof t=="bigint"||Zi(t))}const Rm=t=>X(be(typeof t=="string"?We(t):t)),C3=(t,e,r)=>xe(["string","uint256","address","bytes32"],["",e,t,r]),rp=(t,e,r)=>be(C3(t,e,r)),E3=()=>typeof window>"u"&&typeof process=="object",iV=()=>!E3(),A3=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Qo.decode(e[1]))};function xh(){return xh=Object.assign?Object.assign.bind():function(t){for(var e=1;ede.configure(t),Ec=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let sV=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${be(We(JSON.stringify(i,oV)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function oV(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function Om(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function aV(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function lV(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const Dm=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),_3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},T3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},P3=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},fV=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),I3=t=>{const e=xh({},t.types);return delete e.EIP712Domain,sr.hash(t.domain,e,t.message)},E1=t=>X(I3(t)),{defineReadOnly:cV,getStatic:uV,resolveProperties:dV,checkProperties:hV,shallowCopy:vV,deepCopy:yV}=dU,pV=t=>t.replace(/([^:]\/)\/+/g,"$1"),gV=Object.freeze(Object.defineProperty({__proto__:null,Logger:S3,PromiseCache:sV,base64Decode:nV,base64DecodeObject:Nm,base64Encode:rV,base64EncodeObject:Mm,checkProperties:hV,configureLogger:k3,deepCopy:yV,defineReadOnly:cV,encodeMessageDigest:Rm,encodeTypedDataDigest:E1,encodeTypedDataHash:I3,getDefaultConnectionInfo:Ec,getRandomInt:Dm,getStatic:uV,isBigNumberish:x3,isBrowser:iV,isNode:E3,jwtDecodeClaims:A3,logger:de,packMessageData:C3,promisify:Om,queryStringFromObject:aV,queryStringToObject:lV,resolveProperties:dV,sanitizeAlphanumeric:T3,sanitizeHost:P3,sanitizeNumberString:_3,shallowCopy:vV,sleep:fV,subDigestOf:rp,urlClean:pV},Symbol.toStringTag,{value:"Module"}));function It(){return It=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:U.from(t).toNumber(),wV=t=>{if(t)return M3(t)},N3=(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 i=n.map(f=>f.chainId).sort(),s=i.filter((f,c)=>i.indexOf(f)!==c);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(f=>f.name=f.name.toLowerCase());const o=n.map(f=>f.name).sort(),a=o.filter((f,c)=>o.indexOf(f)!==c);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let f=0;f(N3(t,!0,e),t),bV=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},xV=(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)}},O3=t=>R3(D3(t)),Hs=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=U.from(e).toNumber();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(U.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},CV=(t,e)=>t?t.name===e||t.chainId===e:!1,EV=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},A1=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",B3=t=>A1("https://${network}-indexer.sequence.app",{network:t}),L3=t=>A1("https://${network}-relayer.sequence.app",{network:t}),$3=t=>A1("https://nodes.sequence.app/${network}",{network:t});function Bm(t){return Hs(Ac,t)}function F3(t){return U.isBigNumber(t)?t:x3(t)?U.from(t):U.from(t.chainId)}const Jt=t=>{const e=$3(t);return{rpcUrl:e,relayer:{url:L3(t),provider:{url:e}},indexerUrl:B3(t)}},Ac=O3([It({},Pt[Z.POLYGON],Jt("polygon"),{isDefaultChain:!0,isAuthChain:!0}),It({},Pt[Z.MAINNET],Jt("mainnet")),It({},Pt[Z.BSC],Jt("bsc")),It({},Pt[Z.AVALANCHE],Jt("avalanche")),It({},Pt[Z.ARBITRUM],Jt("arbitrum")),It({},Pt[Z.ARBITRUM_NOVA],Jt("arbitrum-nova")),It({},Pt[Z.OPTIMISM],Jt("optimism")),It({},Pt[Z.POLYGON_ZKEVM],Jt("polygon-zkevm")),It({},Pt[Z.GNOSIS],Jt("gnosis")),It({},Pt[Z.RINKEBY],Jt("rinkeby"),{disabled:!0}),It({},Pt[Z.GOERLI],Jt("goerli")),It({},Pt[Z.SEPOLIA],Jt("sepolia")),It({},Pt[Z.POLYGON_MUMBAI],Jt("mumbai")),It({},Pt[Z.BSC_TESTNET],Jt("bsc-testnet")),It({},Pt[Z.ARBITRUM_GOERLI],Jt("arbitrum-goerli")),It({},Pt[Z.BASE],Jt("base")),It({},Pt[Z.BASE_GOERLI],Jt("base-goerli")),It({},Pt[Z.HOMEVERSE_TESTNET],Jt("homeverse-testnet")),It({},Pt[Z.AVALANCHE_TESTNET],Jt("avalanche-testnet")),It({},Pt[Z.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),It({},Pt[Z.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),bl="2.0";class Lm{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=j3(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const j3=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function z3(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 U3(t){return t!==void 0&&t.sendAsync!==void 0}let AV=0;class Ch{constructor(e,r){this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,z3(e)?this.send=e.send.bind(e):U3(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:bl,id:++AV,method:n,params:i},(l,f)=>{l?a(l):o(f?f.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class SV{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync,this.provider=e}}class kV{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=np(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=np(this.isAllowedFunc)}}const np=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class $m{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const f=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(f,a.result):this.setCacheByBlockValue(f,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.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 V3{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:Q(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[Se(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const W3=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},H3=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";de.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?de.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):de.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},_V=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:Q(s)});return}e(r,n,i)},q3=["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 TV{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(q3.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class PV{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...q3],this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}de.debug("[public-provider] sending request to signer window",n.method),r(n,i)},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 fa(e))}}class G3{constructor(){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.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let f=0;f{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class IV extends fa{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const f={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return Vc(this.connection,JSON.stringify(f),MV).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new Lm(i??[new V3({chainId:n}),new G3,new $m({defaultChainId:n,blockCache:s})],new Ch(this.fetch,n));this._sender=new Ch(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Pt[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=U.from(r).toNumber(),this.getNetwork()}}}function MV(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 NV=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:kV,CachedProvider:$m,ChainId:Z,EagerProvider:V3,JsonRpcExternalProvider:SV,JsonRpcProvider:IV,JsonRpcRouter:Lm,JsonRpcSender:Ch,JsonRpcVersion:bl,NetworkType:Fe,PublicProvider:PV,SigningProvider:TV,SingleflightMiddleware:G3,allNetworks:Ac,allowProviderMiddleware:np,checkNetworkConfig:CV,createJsonRpcMiddlewareStack:j3,ensureUniqueNetworks:bV,ensureValidNetworks:R3,exceptionProviderMiddleware:W3,findNetworkConfig:Hs,findSupportedNetwork:Bm,getChainId:M3,indexerURL:B3,isJsonRpcHandler:U3,isJsonRpcProvider:z3,isNetworkConfig:mV,isValidNetworkConfig:N3,loggingProviderMiddleware:H3,maybeChainId:wV,networkProviderMiddleware:_V,networks:Pt,networksIndex:EV,nodesURL:$3,relayerURL:L3,sortNetworks:D3,stringTemplate:A1,toChainIdNumber:F3,updateNetworkConfig:xV,validateAndSortNetworks:O3},Symbol.toStringTag,{value:"Module"}));function Sr(){return Sr=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(jm(i))return xe(["uint8","uint8","address"],[Oo.Address,i.weight,i.address]);if(i.isDynamic){const s=X(i.signature);return xe(["uint8","uint8","address","uint16","bytes"],[Oo.DynamicSignature,i.weight,i.address,s.length,s])}return xe(["uint8","uint8","bytes"],[Oo.EOASignature,i.weight,i.signature])});return xe(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function Z3(t,e,r){const n=Hc(e),i=await Promise.all(t.signers.map(async s=>{if(jm(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!Fm(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:qc(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function Df(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=U.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),f=X(l.signature);return i=i.add(a.weight),l.isDynamic||f.length!==66?Sr({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Sr({},a,{isDynamic:!1,signature:l.signature})});return{encoded:zm({version:1,threshold:t.threshold,signers:s}),weight:i}}const Um={decode:t=>X3(t),encode:t=>zm(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>Z3(t,e,r),encodeSigners:(t,e,r,n)=>Df(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Um.encodeSigners(t,e,[],0);return r.gte(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 zV=Object.freeze({__proto__:null,SignaturePartType:Oo,isAddressMember:jm,isUnrecoveredSignatureMember:Q3,isUnrecoveredSignature:Y3,decodeSignature:X3,encodeSignature:zm,recoverSignature:Z3,encodeSigners:Df,SignatureCoder:Um});const Vm={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>be(jr.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),xe(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>U.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:U.from(e.weight).toNumber()})),fromSimple:t=>{if(!_t.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new pr([...Tr.mainModule.abi,...Tr.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Vm.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:U.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:U.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:U.from(n.weight),address:n.address}));return{version:e.version,threshold:U.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!_t.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,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[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Df(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>U.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Df(t,r,[]);if(a.gte(t.threshold))return o}return Df(t,r,[]).encoded}};var UV=Object.freeze({__proto__:null,ConfigCoder:Vm});const e8=1,VV={version:e8,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Di=Object.freeze({__proto__:null,config:UV,signature:zV,version:e8,DeployedWalletContext:VV});const Wm="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function t8(t){return be(r8(t))}function r8(t){return xe(["bytes32","bytes32"],[Wm,t])}function n8(t){const e=X(t);if(e.length===64&&Q(e.slice(0,32))===Wm)return Q(e.slice(32,64))}function WV(t){return n8(t)!==void 0}var HV=Object.freeze({__proto__:null,SetImageHashPrefix:Wm,hashSetImageHash:t8,messageSetImageHash:r8,decodeMessageSetImageHash:n8,isMessageSetImageHash:WV});let ar=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),Ft=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 Eh=66;function Yo(t){return t.left!==void 0&&t.right!==void 0}function Fl(t){return t.tree!==void 0}function Gc(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function Ah(t){let e=X(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case Ft.Signature:{const s=e[0],o=Q(e.slice(1,Eh+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(Eh+1)}break;case Ft.Address:{const s=e[0],o=Se(Q(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case Ft.DynamicSignature:{const s=e[0],o=Se(Q(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=Q(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case Ft.Node:{const s=Q(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case Ft.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=Ah(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case Ft.Subdigest:{const s=Q(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case Ft.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=Ah(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${Q(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class i8 extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function Do(t,e,r){if(Yo(t)){const[n,i]=await Promise.all([Do(t.left,e,r),Do(t.right,e,r)]);return{left:n,right:i}}if(Fl(t))return{weight:t.weight,threshold:t.threshold,tree:await Do(t.tree,e,r)};if(Gc(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await Fm(t.address,e,t.signature,r))throw new i8(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:qc(e,t.signature),signature:t.signature,subdigest:e};return t}const xr={concat:(t,e)=>xe(["bytes","bytes"],[t,e]),node:t=>xe(["uint8","bytes32"],[Ft.Node,t]),branch:t=>{const e=X(t);return xe(["uint8","uint24","bytes"],[Ft.Branch,e.length,e])},nested:(t,e,r)=>{const n=X(r);return xe(["uint8","uint8","uint16","uint24","bytes"],[Ft.Nested,t,e,n.length,n])},subdigest:t=>xe(["uint8","bytes32"],[Ft.Subdigest,t]),signature:(t,e)=>xe(["uint8","uint8","bytes"],[Ft.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=X(r);return xe(["uint8","uint8","address","uint24","bytes"],[Ft.DynamicSignature,t,e,n.length,n])},address:(t,e)=>xe(["uint8","uint8","address"],[Ft.Address,t,e])};function Bf(t,e,r,n,i={}){const s=Lf(t.tree,e,r,i);return U.from(n).isZero()?{encoded:xe(["uint8","uint16","uint32","bytes"],[ar.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:U.from(t.threshold).gt(255)?{encoded:xe(["uint8","uint16","uint32","bytes"],[ar.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:xe(["uint8","uint8","uint32","bytes"],[ar.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Lf(t,e,r,n={}){const i=!n.disableTrim;if(ei(t)){const s=Lf(t.left,e,r),o=Lf(t.right,e,r),a=Fr(t.left),l=Fr(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:xr.node(an(t)),weight:_t}:i&&o.weight.eq(0)&&!l?{encoded:xr.concat(s.encoded,xr.node(an(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:xr.concat(xr.node(an(t.left)),xr.branch(o.encoded)),weight:o.weight}:{encoded:xr.concat(s.encoded,xr.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(ns(t)){const s=Lf(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:xr.node(an(t)),weight:_t}:{encoded:xr.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(is(t))return{encoded:xr.node(an(t)),weight:_t};if(rs(t)){const s=r.includes(t.subdigest);return{encoded:xr.node(an(t)),weight:s?Jk:_t}}if(Fr(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:xr.dynamicSignature(t.weight,t.address,a),weight:U.from(t.weight)}:{encoded:xr.signature(t.weight,a),weight:U.from(t.weight)}}else return{encoded:xr.address(t.weight,t.address),weight:_t};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function Hm(t){return Gm(t)?Hm(t.suffix[t.suffix.length-1]):t.config}function qm(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function Kc(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(qm)}function s8(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function Gm(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(s8)}function S1(t){const e=X(t),r=e[0];switch(r){case ar.Legacy:return{version:2,type:ar.Legacy,decoded:cd(e)};case ar.Dynamic:return{version:2,type:ar.Dynamic,decoded:cd(e.slice(1))};case ar.NoChainIdDynamic:return{version:2,type:ar.NoChainIdDynamic,decoded:cd(e.slice(1))};case ar.Chained:return o8(e);default:throw new Error(`Invalid signature type: ${r}`)}}function cd(t){const e=X(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=Ah(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function o8(t){const e=X(t),r=e[0];if(r!==ar.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;iX(Bs(s))),i=xe(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return xe(["uint8","bytes"],[ar.Chained,i])}function Bs(t){if(Gi(t))return Q(t);if(Kc(t)||Gm(t))return k1(Bs(t),(t.suffix||[]).map(Bs));const e=qm(t)?t.decoded:t.config;switch(t.type){case ar.Legacy:if(U.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return ip(e);case ar.NoChainIdDynamic:case ar.Dynamic:return xe(["uint8","bytes"],[t.type,ip(e)]);case ar.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function ip(t){return xe(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,$f(t.tree)])}function $f(t){if(ei(t)||Yo(t)){const e=X($f(t.right)),r=X($f(t.left));return ei(t.right)||Yo(t.right)?xe(["bytes","uint8","uint24","bytes"],[r,Ft.Branch,e.length,e]):xe(["bytes","bytes"],[r,e])}if(ns(t)||Fl(t)){const e=X($f(t.tree));return xe(["uint8","uint8","uint16","uint24","bytes"],[Ft.Nested,t.weight,t.threshold,e.length,e])}if(Gc(t)||Fr(t)&&t.signature!==void 0){const e=X(t.signature);if(t.isDynamic||e.length!==Eh){if(!t.address)throw new Error("Dynamic signature leaf must have address");return xe(["uint8","uint8","address","uint24","bytes"],[Ft.DynamicSignature,t.weight,t.address,e.length,e])}else return xe(["uint8","uint8","bytes"],[Ft.Signature,t.weight,e])}if(Fr(t))return xe(["uint8","uint8","address"],[Ft.Address,t.weight,t.address]);if(is(t))return xe(["uint8","bytes32"],[Ft.Node,t.nodeHash]);if(rs(t))return xe(["uint8","bytes32"],[Ft.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Ff(t){return ei(t)?[...Ff(t.left),...Ff(t.right)]:ns(t)?Ff(t.tree):Fr(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function jf(t){return Yo(t)?[...jf(t.left),...jf(t.right)]:Fl(t)?jf(t.tree):Gc(t)?[t.signature]:[]}function ud(t){return Yo(t)?[...ud(t.left),...ud(t.right)]:Fl(t)?ud(t.tree):rs(t)?[t.subdigest]:[]}async function Sh(t){const e=typeof t=="string"?S1(t):t;if(Kc(e)){const n=await Promise.all([Sh(Sr({},e,{suffix:void 0})),...e.suffix.map(i=>Sh(i))]);return k1(n[0],n.slice(1))}const{trimmed:r}=await zf(e.decoded.tree);return Bs(Sr({},e,{decoded:Sr({},e.decoded,{tree:r})}))}async function zf(t,e=!0){if(Yo(t)){const[r,n]=await Promise.all([zf(t.left),zf(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await Do(t,ah,void 0);return{weight:0,trimmed:{nodeHash:an(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Fl(t)){const r=await zf(t.tree);if(r.weight===0)try{const n=await Do(t,ah,void 0);return{weight:0,trimmed:{nodeHash:an(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return is(t)&&c8(t.nodeHash)?{weight:0,trimmed:Sr({},f8(t.nodeHash))}:Gc(t)||Fr(t)&&t.signature!==void 0?{weight:U.from(t.weight).toNumber(),trimmed:t}:!e&&rs(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const _1={decode:t=>S1(t),encode:t=>Bs(t),trim:t=>Sh(t),supportsNoChainId:!0,recover:(t,e,r)=>Km(t,e,r),encodeSigners:(t,e,r,n)=>Bf(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=_1.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=Gi(t)?t:Bs(t),i=r.map(s=>Gi(s)?s:Bs(s));return k1(n,i)},hashSetImageHash:function(t){return t8(t)},signaturesOf(t){return Ff(t.tree)},signaturesOfDecoded:function(t){return jf(t.decoded.tree)}};var qV=Object.freeze({__proto__:null,SignatureType:ar,SignaturePartType:Ft,SignaturePartTypeLength:Eh,isUnrecoveredNode:Yo,isUnrecoveredNestedLeaf:Fl,isUnrecoveredSignatureLeaf:Gc,decodeSignatureTree:Ah,InvalidSignatureLeafError:i8,recoverTopology:Do,partEncoder:xr,encodeSigners:Bf,encodeTree:Lf,deepestConfigOfSignature:Hm,isUnrecoveredSignature:qm,isUnrecoveredChainedSignature:Kc,isSignature:s8,isChainedSignature:Gm,decodeSignature:S1,decodeSignatureBody:cd,decodeChainedSignature:o8,setImageHashStruct:a8,recoverSignature:Km,encodeChain:k1,encodeSignature:Bs,encodeSignatureBody:ip,encodeSignatureTree:$f,signaturesOf:Ff,signaturesOfDecoded:jf,subdigestsOfDecoded:ud,trimSignature:Sh,trimUnrecoveredTree:zf,SignatureCoder:_1});function Fr(t){return t.address!==void 0&&t.weight!==void 0}function rs(t){return t.subdigest!==void 0&&t.address===void 0}function Uf(t){return ei(t)?JSON.stringify({left:Uf(t.left),right:Uf(t.right)}):ns(t)?JSON.stringify({weight:U.from(t.weight).toString(),threshold:U.from(t.threshold).toString(),tree:Uf(t.tree)}):Fr(t)?JSON.stringify({address:t.address,weight:U.from(t.weight).toString()}):JSON.stringify(t)}function Vf(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Vf(e.left),right:Vf(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:U.from(e.weight),threshold:U.from(e.threshold),tree:Vf(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:U.from(e.weight)}:e}function ns(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function is(t){return t.nodeHash!==void 0}function Jm(t){return Fr(t)||rs(t)||ns(t)||is(t)}function ei(t){return t.left!==void 0&&t.right!==void 0}function GV(t){return ei(t)||Jm(t)}function l8(t){return xe(["uint96","address"],[t.weight,t.address])}function f8(t){const e=X(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=U.from(e.slice(0,12)),n=Se(Q(e.slice(12)));return{weight:r,address:n}}function c8(t){const e=X(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function an(t){if(Fr(t))return l8(t);if(rs(t))return Ui(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(ns(t)){const e=an(t.tree);return Ui(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return is(t)?t.nodeHash:Ui(["bytes32","bytes32"],[an(t.left),an(t.right)])}function KV(t){const e=[];let r=t;for(;!Jm(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function JV(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function Qm(t){return Ui(["bytes32","uint256"],[Ui(["bytes32","uint256"],[an(t.tree),t.threshold]),t.checkpoint])}function u8(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function tl(t){return Fr(t)||rs(t)?[t]:ns(t)?[{threshold:t.threshold,weight:t.weight,members:tl(t.tree)}]:is(t)?[]:[...tl(t.left),...tl(t.right)]}function sp(t){return is(t)?!0:ei(t)?sp(t.left)||sp(t.right):!1}function QV(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:tl(t.tree)}}const d8=(t,e)=>t.map(r=>u8(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function Ym(t){if(t.length===0)throw new Error("Empty members array");return d8(t,Ym).reduce((r,n)=>({left:r,right:n}))}function Xm(t){if(t.length===0)throw new Error("Empty members array");const e=d8(t,Xm);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function Zm(t){return t.length>8?Xm(t):Ym(t)}function h8(t,e=Zm){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function kh(t,e){return rs(t)?t.subdigest===e:ei(t)?kh(t.left,e)||kh(t.right,e):!1}function op(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();ns(n)?e.push(n.tree):ei(n)?(e.push(n.left),e.push(n.right)):Fr(n)&&r.add({address:n.address,weight:U.from(n.weight).toNumber()})}return Array.from(r)}function _h(t){return ei(t)?_h(t.left)&&_h(t.right):!is(t)}const T1={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>Qm(t),hasSubdigest:(t,e)=>kh(t.tree,e),checkpointOf:t=>U.from(t.checkpoint),signersOf:t=>op(t.tree),fromSimple:t=>h8({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>_h(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new pr(Tr.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[T1.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new pr(Tr.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=s.decodeFunctionData(s.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(!_t.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!_t.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))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:U.from(t.threshold).toString(),checkpoint:U.from(t.checkpoint).toString(),tree:Uf(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:U.from(e.threshold),checkpoint:U.from(e.checkpoint),tree:Vf(e.tree)}},editConfig:function(t,e){var r,n;const i=tl(t.tree);if(e.add)for(const s of e.add)i.find(o=>Fr(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Fr(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:Zm(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Bf(t,r,[],0);if(a.gte(t.threshold))return o}const n=op(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Bf(t,r,[],0);if(a.gte(t.threshold))return o}return Bf(t,r,[],0).encoded}};var YV=Object.freeze({__proto__:null,isSignerLeaf:Fr,isSubdigestLeaf:rs,topologyToJSON:Uf,topologyFromJSON:Vf,isNestedLeaf:ns,isNodeLeaf:is,isLeaf:Jm,isNode:ei,isTopology:GV,encodeSignerLeaf:l8,decodeSignerLeaf:f8,isEncodedSignerLeaf:c8,hashNode:an,leftFace:KV,isWalletConfig:JV,imageHash:Qm,isSimpleNestedMember:u8,topologyToMembers:tl,hasUnknownNodes:sp,toSimpleWalletConfig:QV,legacyTopologyBuilder:Ym,merkleTopologyBuilder:Xm,optimized2SignersTopologyBuilder:Zm,toWalletConfig:h8,hasSubdigest:kh,signersOf:op,isComplete:_h,ConfigCoder:T1}),XV=Object.freeze({__proto__:null});const ZV={config:T1,signature:_1},v8=2,eW={version:v8,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ae=Object.freeze({__proto__:null,config:YV,signature:qV,context:XV,chained:HV,coders:ZV,version:v8,DeployedWalletContext:eW});function ap(t,e){const r=be(xe(["bytes","bytes32"],[t.walletCreationCode,$e(t.mainModule,32)])),n=be(xe(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Se(Ut(n,12))}async function tW(t,e,r,n,i,s){return(await Promise.all(k8.map(async a=>{try{const l=a.signature.SignatureCoder.decode(Q(r)),f=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),c=a.config.ConfigCoder.imageHashOf(f.config);if(ap(s[a.version],c).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:Q(e),chainId:n},i),v=a.config.ConfigCoder.imageHashOf(d.config);return ap(s[a.version],v).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function rW(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 nW(t){const e=Object.keys(t).length;return t[e]}var iW=Object.freeze({__proto__:null,addressOf:ap,isValidCounterfactual:tW,isValidVersionedContext:rW,latestContext:nW});const P1=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`;function sW(t,e,r,n){return Sr({},t,{chainId:r,intent:{id:n,wallet:e}})}function oW(t){return be(jr.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function aW(t){const e=jr.decode(["uint256",P1],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function y8(t,e){return jr.encode(["uint256",P1],[t,Sc(e)])}function p8(t,e){return be(y8(t,e))}function lW(t,e,r,n){return Hc({address:t,chainId:e,digest:p8(r,n)})}function fW(t,e,r){return Hc({address:t,chainId:e,digest:be(jr.encode(["string",P1],["guest:",Sc(r)]))})}function g8(t,e){return e.map(r=>ew(t,r))}function ew(t,e){if(e.to)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new pr(Tr.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function I1(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function m8(t){return t.every(I1)}function Sc(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:_t,target:(r=e.to)!=null?r:Gk,value:e.value!==void 0?e.value:_t,data:e.data!==void 0?e.data:[]}})}function cW(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function uW(t,e){const r=U.from(t),n=U.from(e),i=Kk.pow(U.from(96));if(!n.div(i).eq(_t))throw new Error("Space already encoded");return n.add(r.mul(i))}function dW(t){const e=U.from(t),r=Kk.pow(U.from(96));return[e.div(r),e.mod(r)]}function hW(t,e){return Array.isArray(e)?m8(e)?e:g8(t,e).map(n=>n.transaction):I1(e)?[e]:[ew(t,e).transaction]}function w8(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&&I1(r),!0)}function b8(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&w8(t)}function vW(t){const e=new pr(Tr.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),b8(t)?[Sc(t.transactions),t.nonce,t.signature]:[Sc(t.transactions),0,[]])}const x8="0x61c2926c",C8=`tuple( + bool delegateCall, + bool revertOnError, + uint256 gasLimit, + address target, + uint256 value, + bytes data +)[]`,lp=(t,e)=>{const r=[],n=new pr(Tr.mainModule.abi);for(const i of e){const s=X(i.data||"0x");if(i.to===t&&Q(s.slice(0,4))===x8){const o=s.slice(4),a=jr.decode([C8],o)[0];r.push(...lp(i.to,a.map(l=>Sr({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=lp(t,o.map(l=>Sr({},l,{to:l.target})));r.push(...a)}catch{r.push(i)}}return r};var yW=Object.freeze({__proto__:null,MetaTransactionsType:P1,intendTransactionBundle:sW,intendedTransactionID:oW,unpackMetaTransactionsData:aW,packMetaTransactionsData:y8,digestOfTransactions:p8,subdigestOfTransactions:lW,subdigestOfGuestModuleTransactions:fW,toSequenceTransactions:g8,toSequenceTransaction:ew,isSequenceTransaction:I1,hasSequenceTransactions:m8,sequenceTxAbiEncode:Sc,fromTxAbiEncode:cW,encodeNonce:uW,decodeNonce:dW,fromTransactionish:hW,isTransactionBundle:w8,isSignedTransactionBundle:b8,encodeBundleExecData:vW,selfExecuteSelector:x8,selfExecuteAbi:C8,unwind:lp});const E8="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",pW="0x6492649264926492649264926492649264926492649264926492649264926492";async function A8(t,e,r,n){return await t.call({data:At([E8,new hm().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var gW=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:E8,EIP_6492_SUFFIX:pW,validateEIP6492Offchain:A8});class mW{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Ll(e,[...Tr.mainModuleUpgradable.abi,...Tr.mainModule.abi,...Tr.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>X(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=jr.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>X(i));if(n.length===20)return Se(Q(n));if(n.length===32)return jr.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 A8(this.provider,e,r,n)}}var wW=Object.freeze({__proto__:null,OnChainReader:mW});function bW(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ae=Object.freeze({__proto__:null,config:RV,signature:OV,context:iW,signer:jV,EIP1271:LV,transaction:yW,reader:wW,EIP6492:gW,isWalletSignRequestMetadata:bW});const fp=[{config:Vm,signature:Um},{config:T1,signature:_1}];function S8(t){const e=t-1;if(e<0||e>=fp.length)throw new Error(`No coder for version: ${t}`);return fp[e]}function xW(t){return S8(t)}var Gr=Object.freeze({__proto__:null,ALL_CODERS:fp,coderFor:S8,genericCoderFor:xW});const k8=[Di,Ae],CW=Object.freeze(Object.defineProperty({__proto__:null,allVersions:k8,commons:ae,universal:Gr,v1:Di,v2:Ae},Symbol.toStringTag,{value:"Module"}));function EW(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:i,chainId:s}=e;let o=n,a=i;const l=Object.values(this.contexts),f=[];for(let c=1;cX(s).length===0))return cC;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:U.from(i).toNumber(),gasLimit:U.from(i).toNumber()}))}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 s=await new Ll(e,Tr.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ae.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=ae.transaction.intendedTransactionID(e));let o=!1;const a=async function(c,u){let d=0;for(;!o;){try{return await c()}catch(v){if(d++,i!==void 0&&d>=i)throw de.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,v),v;de.warn(`attempt #${d} failed${u?`: ${u}`:""}`,v)}n>0&&await new Promise(v=>setTimeout(v,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let c=s.fromBlockLog;if(c<0&&(c=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+c),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),v=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,c-s.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,c-s.deltaBlocksLog)} to ${d}`);c=d;const m=(await Promise.all(v.map(M=>a(()=>s.provider.getTransactionReceipt(M.transactionHash),`unable to get receipt for transaction ${M.transactionHash}`)))).find(M=>M.logs.find(E=>E.topics.length===0&&E.data.replace("0x","")===u||E.topics.length===1&&E.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&E.data.length>=64&&E.data.replace("0x","").startsWith(u)));if(m)return Xo({receipt:m},await a(()=>s.provider.getTransaction(m.transactionHash),`unable to get transaction ${m.transactionHash}`));o||await new Promise(M=>setTimeout(M,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function IW(t){return t.signer!==void 0&&qo.isSigner(t.signer)}class MW extends M8{constructor(e){if(super(qo.isSigner(e)?{provider:e.provider}:Xo({},e,{provider:e.signer.provider})),this.signer=qo.isSigner(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){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&&de.warn("LocalRelayer doesn't accept fee quotes");const i=ae.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(Xo({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const NW="v1",RW="v0.4.0",OW="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let Ss=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}({}),DW=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}({}),BW=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),LW=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class N8{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Qt({},n)).then(i=>Yt(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Qt({},n)).then(i=>Yt(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Qt({},n)).then(i=>Yt(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Qt({},n)).then(i=>Yt(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Qt({},n)).then(i=>Yt(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),Qt(n,i)).then(s=>Yt(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),Qt(n,i)).then(s=>Yt(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),Qt(n,i)).then(s=>Yt(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),Qt(n,i)).then(s=>Yt(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Qt(n,i)).then(s=>Yt(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Qt({},n)).then(i=>Yt(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),Qt(n,i)).then(s=>Yt(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Qt(n,i)).then(s=>Yt(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),Qt(n,i)).then(s=>Yt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),Qt(n,i)).then(s=>Yt(s).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),Qt(n,i)).then(s=>Yt(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),Qt(n,i)).then(s=>Yt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),Qt(n,i)).then(s=>Yt(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),Qt(n,i)).then(s=>Yt(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Qt=(t={},e={})=>({method:"POST",headers:Xo({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Yt=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var uC=Object.freeze({__proto__:null,WebRPCVersion:NW,WebRPCSchemaVersion:RW,WebRPCSchemaHash:OW,ETHTxnStatus:Ss,TransferType:DW,FeeTokenType:BW,SortOrder:LW,Relayer:N8});const $W=[Ss.DROPPED,Ss.SUCCEEDED,Ss.PARTIALLY_FAILED,Ss.FAILED],FW=[Ss.DROPPED,Ss.PARTIALLY_FAILED,Ss.FAILED];function jW(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&oa.isProvider(t.provider)}const zW=typeof global=="object"?global.fetch:window.fetch;class R8{constructor(e){this.service=new N8(e.url,zW),this.provider=oa.isProvider(e.provider)?e.provider:new gh(Ec(e.provider.url))}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=ae.transaction.intendedTransactionID(e)),de.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&$W.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=jr.encode([ae.transaction.MetaTransactionsType],[ae.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(l=>l.symbol).join(", ");de.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw de.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:ae.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return de.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return de.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:i}=await this.service.feeOptions({wallet:e,to:e,data:Q(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:i}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){de.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?U.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=U.from(i.nonce),[o,a]=ae.transaction.decodeNonce(s);return de.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;de.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:de.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw de.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ae.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(de.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:c=>Promise.reject(new Error("impossible"))},f=async function(u){var d;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const v=await i.wait(e.intent.id),g=(d=v.receipt)==null?void 0:d.transactionHash;if(!g)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,v),i.provider.waitForTransaction(g,u)};return l.wait=f,l}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((f,c)=>setTimeout(()=>{o=!0,c(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||FW.includes(a.status))throw new UW(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:U.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(f){return s.provider.waitForTransaction(l.transactionHash,f)}}}}class UW{constructor(e){this.receipt=e}}function O8(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 VW=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:MW,ProviderRelayer:M8,ProviderRelayerDefaults:I8,RpcRelayer:R8,RpcRelayerProto:uC,isLocalRelayerOptions:IW,isProviderRelayerOptions:PW,isRelayer:O8,isRpcRelayerOptions:jW,proto:uC},Symbol.toStringTag,{value:"Module"}));function D8(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class B8{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var WW=Object.freeze({__proto__:null,isSapientSigner:D8,SignerWrapper:B8});function L8(t){return t.rejected}function tw(t){return t.signature!==void 0}function $8(t){return!L8(t)&&!tw(t)}const F8="Initial";class rw{constructor(e,r=rw.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${Q(x1(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>D8(r)?r:new B8(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(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:l}=e,f={ended:!1,message:s,signers:{}};let c=o??{};const u=m=>{c=m,r.notifyObservers(n,f,c)},d=()=>{try{r.notifyObservers(n,f,c);const m=Object.entries(f.signers).filter(([M,E])=>$8(E));if(a&&a(f,u)||m.length===0){f.ended=!0,i(f),r.notifyObservers(n,f,c);return}}catch(m){console.error("Error while notifying observers",m)}};let v=r.signers;if(l){const m=await Promise.all(r.signers.map(async function(M){return M.getAddress()}));v=r.signers.filter((M,E)=>l.includes(m[E]))}const g=await Promise.allSettled(v.map(async function(m){const M=await m.getAddress();return f.signers[M]={situation:F8},m.requestSignature(n,s,o??{},{onSignature:E=>{const A=m.suffix();f.signers[M]={signature:E,suffix:A},d()},onRejection:E=>{f.signers[M]={rejected:!0,error:E},d()},onStatus:E=>{f.signers[M]={situation:E},d()}})}));for(let m=0;mxt(e))):xt(t)}const hC=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(tw(n)){const i=X(n.suffix),s=xe(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class kc extends qo{constructor(e){if(_t.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=ae.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new kc(Co({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ae.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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ae.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ae.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return kc.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Co({},e,{chainId:this.chainId,intent:{id:Q(x1(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new pr(Tr.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,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 signDigest(e,r){const n=rp(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 i=Co({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),s=X(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:s,metadata:i,callback:(l,f)=>{const c=hC(l),u=Co({},i,{parts:c});return f(u),this.coders.signature.hasEnoughSigningPower(this.config,c)}}),a=hC(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(be(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async signTransactions(e,r){const n=await dC(e),i=ae.transaction.fromTransactionish(this.address,n);i.length===0&&i.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});let s=r;if(s===void 0&&(s=await this.reader().nonce(this.address,0),s===void 0))throw new Error("Unable to determine nonce");const o=ae.transaction.digestOfTransactions(s,i),a=await this.signDigest(o,{transactions:i});return{intent:{id:rp(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:i,entrypoint:this.address,nonce:s,signature:a}}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,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await dC(e),n=ae.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?U.from(o.gasLimit).toNumber():s[a].gasLimit;return Co({},o,s[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Eo(){return Eo=Object.assign?Object.assign.bind():function(t){for(var e=1;er.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}provider(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new gh(Ec(r.rpcUrl),{name:"",chainId:U.from(e).toNumber()})}reader(e){return _t.eq(e)?new qW:new ae.reader.OnChainReader(this.provider(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return O8(r.relayer)?r.relayer:new R8(r.relayer)}setOrchestrator(e){this.orchestrator=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=Gr.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=_t.eq(e);return new kc({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(R=>{if(!R)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return R}),o=s.then(R=>_8.counterfactualVersion(this.address,R.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const L=await n.reader(e).implementation(n.address);if(!L)throw new Error(`Implementation not found for wallet ${n.address}`);const F=Object.values(n.contexts);for(let z=0;z0?m[m.length-1].nextImageHash:d,E=await this.tracker.configOfImageHash({imageHash:M});if(!E)throw new Error(`Config not found for imageHash ${M}`);const A=await i,S=await s,P=Gr.coderFor(v).config.checkpointOf(E);return{original:Eo({},S,{version:await o}),onChain:{imageHash:u,config:await f,version:c,deployed:A},fullyMigrated:v===this.version,signedMigrations:g,version:v,presignedConfigurations:m,imageHash:M,config:E,checkpoint:P,canOnchainValidate:c===this.version&&A}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);if(n.transactions.length===0)return e;const i={entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ae.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]};return r.onChain.deployed||(i.intent.id=ae.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,i.chainId,i.transactions)),i}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=be(We(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore"){const s=_t.eq(r)?this.networks[0].chainId:r,o=await this.status(s);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),f=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(i){case"ignore":return f;case"eip6492":return this.buildEIP6492Signature(await f,o,r)}return f}buildEIP6492Signature(e,r,n){const i=this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=jr.encode(["address","bytes","bytes"],[i.entrypoint,ae.transaction.encodeBundleExecData(i),e]);return xe(["bytes","bytes32"],[s,ae.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Eo({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));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),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=kc.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ae.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const i=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ae.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:s}=this.contextFor(e.version);return{entrypoint:s,transactions:n,chainId:r,intent:{id:i,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 i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Eo({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(be(e),r,!0,n)}async signTransactions(e,r,n){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const o=await this.walletForStatus(r,i).signTransactions(e);return Eo({},o,{signature:await this.decorateSignature(o.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=Gr.coderFor(s.version).config,l=a.imageHashOf(s),f=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!f||a.imageHashOf(f)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);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(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){const o=i||await this.status(e.chainId);this.mustBeFullyMigrated(o);const a=this.decorateTransactions(e,o);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i){const s=i||await this.status(r),o=this.walletForStatus(r,s),a=await this.predecorateTransactions(e,s,r),l=ae.transaction.fromTransactionish(this.address,a),f=o.coders.config.buildStubSignature(o.config,n),c=Q(x1(32)),u={chainId:r,intent:{id:c,wallet:this.address},signature:f,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,s),v=ae.transaction.encodeBundleExecData(d),g=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,v);return Eo({},g,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),s=ae.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s){const o=await this.status(r),a=i?e:await this.predecorateTransactions(e,o,r),l=await this.signTransactions(a,r);return this.sendSignedTransactions(l,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=E1({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>Gr.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const f=l===o.length-1,c=await e.tracker.configOfImageHash({imageHash:a});if(!c){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Gr.genericCoderFor(c.version).config.signersOf(c).forEach(v=>{const g=r.find(m=>m.address===v.address&&m.network===i);if(g&&f&&g.flaggedForRemoval){g.flaggedForRemoval=!1;return}g||r.push({address:v.address,weight:v.weight,network:i,flaggedForRemoval:!f})})}))})),r}}function GW(t){return t instanceof $i}const KW=Object.freeze(Object.defineProperty({__proto__:null,Account:$i,isAccount:GW},Symbol.toStringTag,{value:"Module"}));function JW(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function QW(t){return t.startsWith("ipfs://")}class YW{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(ae.signer.canRecover(n)){const l=ae.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ae.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await ZW(XW(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=Q(await(i||new eH).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===Q(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return j8(t,e,r,a,i,s+1)}class eH{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>QW(n)?JW(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()},this.gateway=e}}const tH=(t,e)=>e.some(r=>t instanceof r);let vC,yC;function rH(){return vC||(vC=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function nH(){return yC||(yC=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const z8=new WeakMap,vp=new WeakMap,U8=new WeakMap,a0=new WeakMap,nw=new WeakMap;function iH(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(Ls(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&z8.set(r,t)}).catch(()=>{}),nw.set(e,t),e}function sH(t){if(vp.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});vp.set(t,e)}let yp={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return vp.get(t);if(e==="objectStoreNames")return t.objectStoreNames||U8.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ls(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 oH(t){yp=t(yp)}function aH(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(l0(this),e,...r);return U8.set(n,e.sort?e.sort():[e]),Ls(n)}:nH().includes(t)?function(...e){return t.apply(l0(this),e),Ls(z8.get(this))}:function(...e){return Ls(t.apply(l0(this),e))}}function lH(t){return typeof t=="function"?aH(t):(t instanceof IDBTransaction&&sH(t),tH(t,rH())?new Proxy(t,yp):t)}function Ls(t){if(t instanceof IDBRequest)return iH(t);if(a0.has(t))return a0.get(t);const e=lH(t);return e!==t&&(a0.set(t,e),nw.set(e,t)),e}const l0=t=>nw.get(t);function fH(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=Ls(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ls(o.result),l.oldVersion,l.newVersion,Ls(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),a}const cH=["get","getKey","getAll","getAllKeys","count"],uH=["put","add","delete","clear"],f0=new Map;function pC(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(f0.get(e))return f0.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=uH.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||cH.includes(r)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let f=l.store;return n&&(f=f.index(a.shift())),(await Promise.all([f[r](...a),i&&l.done]))[0]};return f0.set(e,s),s}oH(t=>({...t,get:(e,r,n)=>pC(e,r)||t.get(e,r,n),has:(e,r)=>!!pC(e,r)||t.has(e,r)}));class dH{}var hH=Object.freeze({__proto__:null,ConfigTracker:dH});class vH{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),Nr(e,"? "),Nr(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),Nr(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),Nr(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),Nr(e,"? "),Nr(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),Nr(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),Nr(e,"? "),Nr(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),Nr(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),Nr(e,"? "),Nr(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),Nr({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),Nr(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),Nr({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function Nr(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var yH=Object.freeze({__proto__:null,DebugConfigTracker:vH});function qs(){return qs=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.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 i,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(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:i,toImageHash:s}),Promise.resolve())}}function rl(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]=U.from(n):Array.isArray(n)?e[r]=n.map(i=>rl(i)):typeof n=="object"&&n!==null?e[r]=rl(n):e[r]=n}return e}class pH{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>rl(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>rl(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>rl(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,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,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await fH(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),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 W8(t){return t.left!==void 0&&t.right!==void 0}function H8(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function pp(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var gH=Object.freeze({__proto__:null,isPlainNode:W8,isPlainNested:H8,isPlainV2Config:pp,MemoryTrackerStore:V8,recreateBigNumbers:rl,IndexedDBStore:pH});class q8{constructor(e,r=new V8,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(W8(o)){const[a,l]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:l}}return H8(o)?{weight:U.from(o.weight),threshold:U.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ae.config.isNodeLeaf(s))return;const o=Ae.config.hashNode(s);if(Ae.config.isNode(s)){const a=i.saveTopology(s.left),l=i.saveTopology(s.right),f=i.store.saveV2Node(o,{left:Ae.config.hashNode(s.left),right:Ae.config.hashNode(s.right)});await Promise.all([a,l,f]);return}if(Ae.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),l=i.store.saveV2Node(o,{weight:U.from(s.weight).toString(),threshold:U.from(s.threshold).toString(),tree:Ae.config.hashNode(s.tree)});await Promise.all([a,l]);return}if(Ae.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ae.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Di.config.ConfigCoder.isWalletConfig(o)){const a=Di.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ae.config.ConfigCoder.isWalletConfig(o)){const a=Ae.config.ConfigCoder.imageHashOf(o);if(Ae.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!pp(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(pp(a)){const l={version:2,threshold:U.from(a.threshold),checkpoint:U.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,l=Gr.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(f=>{const c=ae.context.addressOf(f,l);return i.store.saveCounterfactualWallet(c,l,f)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=ae.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ae.signature.SignatureCoder.decode(s.signature),a=Gr.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),l=Ae.chained.messageSetImageHash(a),f=be(l),c={message:l,address:s.wallet,chainId:0,digest:f},u=i.savePayload({payload:c}),d=i.saveWalletConfig({config:s.nextConfig}),v=await Ae.signature.SignatureCoder.recover(o,c,i.provider),g=Ae.signature.signaturesOf(v.config.tree);await Promise.all([u,d,i.saveWalletConfig({config:v.config}),...g.map(m=>i.store.saveSignatureOfSubdigest(m.address,v.subdigest,m.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:l}=s,f=await i.configOfImageHash({imageHash:a});if(!f||!Ae.config.ConfigCoder.isWalletConfig(f))return[];const c=Ae.config.signersOf(f.tree).map(S=>S.address),u=await Promise.all(c.map(S=>i.store.loadSubdigestsOfSigner(S))),d=[...new Set(u.flat())],g=(await Promise.all([...new Set(d)].map(async function(S){return qs({},await i.payloadOfSubdigest({subdigest:S}),{subdigest:S})}))).filter(S=>(S==null?void 0:S.message)&&(S==null?void 0:S.address)&&S.address===o).map(S=>({payload:S,nextImageHash:Ae.chained.decodeMessageSetImageHash(S.message)})).filter(S=>S==null?void 0:S.nextImageHash);let m;const E=(await Promise.all(g.map(async function({nextImageHash:S,payload:P}){const R=await i.configOfImageHash({imageHash:S});if(!R||!Ae.config.isWalletConfig(R))return;const L=U.from(R.checkpoint);return{nextConfig:R,nextCheckpoint:L,nextImageHash:S,payload:P}}))).filter(S=>S!==void 0).filter(S=>S.nextCheckpoint.gt(f.checkpoint)).sort((S,P)=>S.nextCheckpoint.gt(P.nextCheckpoint)?l?1:-1:l?-1:1);for(const S of E){const{nextConfig:P,nextCheckpoint:R,nextImageHash:L,payload:F}=S;if(m){const q=m.checkpoint;if(l){if(R.gte(q))continue}else if(R.lte(q))continue}const z=new Map((await Promise.all(c.map(async function(q){const K=await i.store.loadSignatureOfSubdigest(q,F.subdigest);if(!K)return[q,void 0];const ne=Q(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(q,F.subdigest,K):K),O=ae.signer.tryRecoverSigner(F.subdigest,ne)!==q;return[q,{isDynamic:O,signature:ne}]}))).filter(q=>Boolean(q[1])));if(z.size===0)continue;const H=Ae.signature.SignatureCoder.encodeSigners(f,z,[],0);H.weight.lt(f.threshold)||(m={nextImageHash:L,checkpoint:U.from(P.checkpoint),signature:H.encoded})}if(!m)return[];const A=await i.loadPresignedConfiguration({wallet:o,fromImageHash:m.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:m.nextImageHash,signature:m.signature},...A]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=ae.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(l=>ae.signer.canRecover(l)).map(l=>{const f=ae.signer.recoverSigner(a,l);return i.store.saveSignatureOfSubdigest(f,a,l)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(f=>i.payloadOfSubdigest({subdigest:f}))).then(f=>f.filter(c=>c!==void 0)),l=[];for(const f of a){const c=f.address;if(l.find(v=>v.wallet===c))continue;const u=ae.signature.subdigestOf(f),d=await i.store.loadSignatureOfSubdigest(s.signer,u);d&&l.push({wallet:c,proof:{digest:f.digest,chainId:U.from(f.chainId),signature:Q(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new YW(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ae.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=P8.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ae.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=ae.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=be(a),f={chainId:r.tx.chainId,message:a,address:e,digest:l},c=ae.signature.subdigestOf(f),u=this.savePayload({payload:f}),d=this.saveWalletConfig({config:r.toConfig}),v=Di.signature.SignatureCoder.decode(r.tx.signature),g=await Di.signature.SignatureCoder.recover(v,f,this.provider),m=Di.signature.SignatureCoder.signaturesOf(g.config);await Promise.all([u,d,this.saveWalletConfig({config:g.config}),this.store.saveMigrationsSubdigest(e,i,i+1,c,s),...m.map(M=>this.store.saveSignatureOfSubdigest(M.address,g.subdigest,M.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Gr.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(c){const{subdigest:u,toImageHash:d}=c,v=await s.payloadOfSubdigest({subdigest:u});if(!v||!v.message||!U.from(i).eq(v.chainId))return;const g=l.config.signersOf(o).map(S=>S.address),m=new Map((await Promise.all(g.map(async function(S){const P=await s.store.loadSignatureOfSubdigest(S,u);if(!P)return[S,void 0];const R=Q(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(S,u,P):P),L=ae.signer.tryRecoverSigner(u,R)!==S;return[S,{isDynamic:L,signature:R}]}))).filter(S=>Boolean(S[1]))),M=l.signature.encodeSigners(o,m,[],i);if(!M||M.weightc.filter(u=>u!==void 0)))[0]}}var mH=Object.freeze({__proto__:null,LocalConfigTracker:q8});let c0=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class wH{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),Bn({},n)).then(i=>Ln(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),Bn(n,i)).then(s=>Ln(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),Bn(n,i)).then(s=>Ln(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),Bn(n,i)).then(s=>Ln(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),Bn(n,i)).then(s=>Ln(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),Bn(n,i)).then(s=>Ln(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),Bn(n,i)).then(s=>Ln(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Bn=(t={},e={})=>({method:"POST",headers:qs({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Ln=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class bH{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new wH(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:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(u0(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Gr.genericCoderFor(r.version).config.imageHashOf(r),i=Ae.signature.setImageHashStruct(n),s=be(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:Ou(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ae.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:za(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return xH(r,n)}catch(r){if(u0(r))return;throw r}}async saveWalletConfig(e){const r=Ou(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(u0(r))return;throw r}}async saveCounterfactualWallet(e){const r=Ou(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:i,chainID:s,type:o,signature:a}])=>{switch(o){case c0.EIP712:a+=Q(ae.signer.SigType.EIP712).slice(2);break;case c0.EthSign:a+=Q(ae.signer.SigType.ETH_SIGN).slice(2);break;case c0.EIP1271:a+=Q(ae.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:U.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=za(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const v=Object.keys(d).map(Number).sort((g,m)=>m-g);for(const g of v)for(const[m,M]of Object.entries(d[g]))try{const E=await s.configOfImageHash({imageHash:m});if(E)return{fromVersion:n,toVersion:g,toConfig:E,tx:{entrypoint:M.executor,transactions:M.transactions,nonce:M.nonce,signature:M.signature,chainId:u,intent:{id:ae.transaction.subdigestOfTransactions(e,u,M.nonce,M.transactions),wallet:e}}}}catch(E){console.error(E)}}},f=await l(o);if(f)return f;for(const c in a)if(c!==o){const u=await l(c);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Ou(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(CH),nonce:za(r.tx.nonce),signature:r.tx.signature,chainID:za(r.tx.chainId)})}}function Ou(t){switch(t.version){case 1:if(Di.config.ConfigCoder.isWalletConfig(t))return{threshold:Po(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Po(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ae.config.ConfigCoder.isWalletConfig(t))return{threshold:Po(t.threshold),checkpoint:Po(t.checkpoint),tree:dd(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function dd(t){return Ae.config.isNode(t)?{left:dd(t.left),right:dd(t.right)}:Ae.config.isSignerLeaf(t)?{weight:Po(t.weight),address:t.address}:Ae.config.isNestedLeaf(t)?{weight:Po(t.weight),threshold:Po(t.threshold),tree:dd(t.tree)}:Ae.config.isNodeLeaf(t)?{node:t.nodeHash}:qs({},t)}function xH(t,e){switch(t){case 1:return qs({},e,{version:t});case 2:return qs({},e,{version:t,tree:hd(e.tree)});default:throw new Error(`unknown version ${t}`)}}function hd(t){switch(typeof t){case"object":const e=qs({},t);return e.left!==void 0&&(e.left=hd(e.left)),e.right!==void 0&&(e.right=hd(e.right)),e.tree!==void 0&&(e.tree=hd(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 CH(t){return{to:t.to,value:t.value!==void 0?za(t.value):void 0,data:t.data!==void 0?Q(t.data):void 0,gasLimit:t.gasLimit!==void 0?za(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Po(t){return U.from(t).toNumber()}function za(t){return U.from(t).toString()}function u0(t){return typeof t=="object"&&t.status===404}var EH=Object.freeze({__proto__:null,RemoteConfigTracker:bH});function gp(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function uf(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class AH{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await gp(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Gr.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 i=new q8(void 0),s=await uf(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.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 gp(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(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 uf(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:f}})=>{const c=`${o}-${a}-${l}`;let u=s.get(c);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},s.set(c,u)),u.signatures.push(f)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await uf(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),s=(await uf(n.map(async function(l){const f=l[l.length-1],c=await r.configOfImageHash({imageHash:f.nextImageHash});if(c)return{checkpoint:Gr.genericCoderFor(c.version).config.checkpointOf(c),result:l}}),void 0)).reduce((l,f)=>f&&(!l||f.checkpoint.gt(l.checkpoint))?f:l);if(!s)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return s.result.forEach(async function(l){const f=await a(l.nextImageHash);f&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:f,signature:l.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class SH{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 i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthu&&(!c||u.checkpoint.gt(c.checkpoint))?u:c))==null?void 0:l.result)!=null?a:[]}return i||[]}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 i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);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 gC{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${be(We(JSON.stringify(i,kH)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function kH(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function _H(t){return t instanceof G8}class G8{constructor(e,r=50,n=!1){this.cache=new gC,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new gC}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),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)}}var K8=Object.freeze({__proto__:null,debug:yH,local:mH,remote:EH,stores:gH,raceUntil:gp,allSafe:uf,MultipleTracker:AH,CachedTracker:SH,isDedupedTracker:_H,DedupedTracker:G8});const TH=Object.freeze(Object.defineProperty({__proto__:null,tracker:hH,trackers:K8},Symbol.toStringTag,{value:"Module"}));function mp(){return mp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),cr({},n)).then(i=>ur(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),cr({},n)).then(i=>ur(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),cr({},n)).then(i=>ur(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),cr(n,i)).then(s=>ur(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),cr(n,i)).then(s=>ur(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),cr(n,i)).then(s=>ur(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),cr(n,i)).then(s=>ur(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),cr(n,i)).then(s=>ur(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),cr(n,i)).then(s=>ur(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),cr(n,i)).then(s=>ur(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const cr=(t={},e={})=>({method:"POST",headers:mp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ur=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),BH=typeof global=="object"?global.fetch:window.fetch;class Q8 extends J8{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,BH)}}const LH=Object.freeze(Object.defineProperty({__proto__:null,ContractType:NH,Metadata:J8,PropertyType:RH,SequenceMetadataClient:Q8,SortOrder:DH,SwapType:OH,WebRPCSchemaHash:MH,WebRPCSchemaVersion:IH,WebRPCVersion:PH},Symbol.toStringTag,{value:"Module"}));function Th(){return Th=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),tn({},n)).then(i=>rn(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),tn({},n)).then(i=>rn(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),tn({},n)).then(i=>rn(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),tn({},n)).then(i=>rn(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),tn(n,i)).then(s=>rn(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),tn(n,i)).then(s=>rn(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),tn(n,i)).then(s=>rn(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),tn(n,i)).then(s=>rn(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),tn(n,i)).then(s=>rn(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),tn(n,i)).then(s=>rn(s).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const tn=(t={},e={})=>({method:"POST",headers:Th({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),rn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});let KH=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const mC=typeof global=="object"?global.fetch:window.fetch;class X8 extends Y8{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,mC),this._fetch=(n,i)=>{const s={};return this.jwtAuth&&this.jwtAuth.length>0&&(s.Authorization=`BEARER ${this.jwtAuth}`),i.headers=Th({},i.headers,s),mC(n,i)},this.jwtAuth=r,this.fetch=this._fetch}}const JH=Object.freeze(Object.defineProperty({__proto__:null,ContractType:zH,EventLogDataType:VH,EventLogType:UH,Indexer:Y8,SequenceIndexerClient:X8,SequenceIndexerServices:KH,SortOrder:GH,TransactionStatus:HH,TransactionType:qH,TxnTransferType:WH,WebRPCSchemaHash:jH,WebRPCSchemaVersion:FH,WebRPCVersion:$H},Symbol.toStringTag,{value:"Module"}));function wp(){return wp=Object.assign?Object.assign.bind():function(t){for(var e=1;e{throw this._jwt=void 0,f}),expiration:o};return this._jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"fulfilled",value:void 0})}catch{}})}).catch(f=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"rejected",reason:f})}catch{}})}),{token:await a.token,expiration:o}}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()i.eq(l.chainId));if(!s)throw Error("No network found");n.chainId=i.toNumber(),n.provider=new gh(Ec(s.rpcUrl),{name:"",chainId:i.toNumber()});const o=this.now()+this.expiration-YH,a={proofString:Promise.resolve(this.account.signDigest(r.messageDigest(),this.sequenceApiChainId,!0,"eip6492")).then(l=>(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}getProofStringKey(){return`${this.account.address} - ${this.name}`}async isProofStringValid(e){try{const r=new bh,n=U.from(this.sequenceApiChainId),i=this.networks.find(s=>n.eq(s.chainId));if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new gh(Ec(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async dump(){let e;if(this._jwt)try{const r=this._jwt.expiration;e={token:await this._jwt.token,expiration:r}}catch{}return{version:2,address:this.account.address,metadata:this.metadata,jwt:e}}static async open(e){const{referenceSigner:r,threshold:n,metadata:i,addSigners:s,selectWallet:o,settings:a,editConfigOnMigration:l,onMigration:f}=e,{sequenceApiUrl:c,sequenceApiChainId:u,sequenceMetadataUrl:d,contexts:v,networks:g,tracker:m,orchestrator:M}=a,E=u;if(!E)throw Error("No reference chain found");const A=await m.walletsOfSigner({signer:r}),S=await o(A.map(L=>L.wallet));let P;if(S){if(P=new $i({address:S,tracker:m,networks:g,contexts:v,orchestrator:M}),s.length>0){let L=await P.status(E);if(L.original.version!==L.version||P.version!==L.version){const{migratedAllChains:H,failedChains:q}=await P.isMigratedAllChains();if(q.some(K=>bp.includes(K)))throw Error(`Failed to fetch account status on ${q.join(", ")}`);if(!H){if(f&&!await f(P))throw Error("Migration cancelled, cannot open session");const{failedChains:K}=await P.signAllMigrations(l);if(K.some(O=>bp.includes(O)))throw Error(`Failed to sign migrations on ${K.join(", ")}`);K8.isDedupedTracker(m)&&m.invalidateCache();let ne;if([ne,L]=await Promise.all([P.isMigratedAllChains().then(O=>O.migratedAllChains),P.status(E)]),!ne)throw Error("Failed to migrate account")}}L.onChain.version!==L.version&&await P.doBootstrap(E,void 0,L);const F=L.config,z=P.coders.config.editConfig(F,{add:s,checkpoint:P.coders.config.checkpointOf(F).add(1),threshold:n});await P.updateConfig(z)}}else if(P=await $i.new({config:{threshold:n,checkpoint:0,signers:s},tracker:m,contexts:v,orchestrator:M,networks:g}),await P.publishWitness(),!(await m.walletsOfSigner({signer:r,noCache:!0})).some(F=>F.wallet===P.address))throw Error("Account not found on tracker");const R=new Ph(c,u,d,g,v,P,i);return c?R._initialAuthRequest=R.auth():R._initialAuthRequest=Promise.reject("no sequence api url"),R}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s}=e,{sequenceApiUrl:o,sequenceApiChainId:a,sequenceMetadataUrl:l,contexts:f,networks:c,tracker:u,orchestrator:d}=n;let v;if(Z8(r)){const g=r.config.address||ae.context.addressOf(f[1],Di.config.ConfigCoder.imageHashOf(wp({},r.config,{version:1})));if(v=new $i({address:g,tracker:u,networks:c,contexts:f,orchestrator:d}),!await v.isMigratedAllChains().then(m=>m.migratedAllChains)){if(s&&!await s(v))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await v.signAllMigrations(i),!await v.isMigratedAllChains().then(m=>m.migratedAllChains))throw Error("Failed to migrate account")}}else if(e4(r))v=new $i({address:r.address,tracker:u,networks:c,contexts:f,orchestrator:d});else throw Error("Invalid dump format");return new Ph(o,a,l,c,f,v,r.metadata,r.jwt)}}function XH(t){return A3(t).exp}const t4=async(t,e,r)=>{const n=Se(await t.getAddress());if(!n||n===""||n==="0x")throw r4;const i=new Im;if(i.address=n,!r||!r.app||r.app==="")throw new sw("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):iw);const s=i.messageTypedData(),o=F3(e);i.signature=await(t instanceof $i?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const l=await new bh().encodeProof(i,!0);return{typedData:s,proofString:l}};class sw extends Error{constructor(e){super(e),this.name="AuthError"}}const r4=new sw("auth error: account address is empty"),ZH=(t,e,r)=>async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},eq=Object.freeze(Object.defineProperty({__proto__:null,AuthError:sw,CRITICAL_CHAINS:bp,DEFAULT_SESSION_EXPIRATION:iw,ErrAccountIsRequired:r4,LONG_SESSION_EXPIRATION:QH,Session:Ph,ValidateSequenceWalletProof:ZH,isSessionDumpV1:Z8,isSessionDumpV2:e4,signAuthorization:t4},Symbol.toStringTag,{value:"Module"}));function xp(){return xp=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ga({},n)).then(i=>ma(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),ga({},n)).then(i=>ma(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ga({},n)).then(i=>ma(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),ga(n,i)).then(s=>ma(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),ga(n,i)).then(s=>ma(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),ga(n,i)).then(s=>ma(s).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ga=(t={},e={})=>({method:"POST",headers:xp({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ma=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),iq=typeof global=="object"?global.fetch:window.fetch;class sq{constructor(e,r,n=!1){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.guard=new n4(r,iq)}async getAddress(){return this.address}async requestSignature(e,r,n,i){return ae.isWalletSignRequestMetadata(n)?this.requests.set(e,i):i.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ae.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,i){return jr.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}keyOfRequest(e,r,n,i){return Ui(["address","uint256","bytes","bytes"],[e,i,r,n])}async evaluateRequest(e,r,n,i){var s;const o=Gr.genericCoderFor(i.config.version),{encoded:a}=o.signature.encodeSigners(i.config,(s=i.parts)!=null?s:new Map,[],i.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,i.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const u=await this.guard.signWith({signer:this.address,request:{msg:Q(r),auxData:this.packMsgAndSig(i.address,i.digest,a,i.chainId),chainId:U.from(i.chainId).toNumber()}});X(u.sig).length!==0&&(this.requests.get(e).onSignature(u.sig),this.requests.delete(e))}catch{}}suffix(){return this.appendSuffix?[3]:[]}}const oq=Object.freeze(Object.defineProperty({__proto__:null,Guard:n4,GuardSigner:sq,WebRPCSchemaHash:nq,WebRPCSchemaVersion:rq,WebRPCVersion:tq},Symbol.toStringTag,{value:"Module"}));function Ih(){return Ih=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)return;if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&r.scheduleExecution();const i=a[0].next;let s;var[a,l]=wC(a,v=>{try{if(v.next!==i)return!1;switch(v.request.method){case er.ethCall:if(v.request.params[0].from||v.request.params[0].gasPrice||v.request.params[0].value)return!1;case er.ethGetBalance:case er.ethGetCode:const g=lq(v.request.params[1]);if(s===void 0&&(s=g),!fq(g,s))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(v=>{try{switch(v.request.method){case er.ethCall:return{delegateCall:!1,revertOnError:!1,target:v.request.params[0].to,data:v.request.params[0].data,gasLimit:v.request.params[0].gas?v.request.params[0].gas:0,value:0};case er.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[v.request.params[0]])};case er.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[v.request.params[0]])};default:return null}}catch{return null}});var[a,l]=wC(a,(v,g)=>o[g]!==void 0);if(o=o.filter(v=>v),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let f;try{f=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const c=Dm(),u=await aq(Om(i)({id:c,jsonrpc:bl,method:er.ethCall,params:[{to:r.options.contract,value:0,data:f},U.isBigNumber(s)?s.toNumber():s]}),v=>({jsonrpc:bl,id:c,result:void 0,error:v}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((v,g)=>{if(!d[0][g])r.forward(v);else switch(v.request.method){case er.ethCall:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:d[1][g]});break;case er.ethGetCode:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:jr.decode(["bytes"],d[1][g])[0]});break;case er.ethGetBalance:v.callback(void 0,{jsonrpc:v.request.jsonrpc,id:v.request.id,result:jr.decode(["uint256"],d[1][g])[0]});break}})},this.options=e?Ih({},Sn.DefaultOptions,e):Sn.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Sn.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Sn.DefaultOptions=Ih({},cq);const i4=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class uq extends _m{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new Jy(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case er.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case er.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case er.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.provider=e,this.multicall=Sn.isMulticall(r)?r:new Sn(r),i4.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:bl,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(er.ethCall,e,r)}async getCode(e,r){return this.rpcCall(er.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(er.ethGetBalance,e,r)}async rpcCall(e,...r){const n=Dm();return(await Om(this.multicall.handle)(this.next,{jsonrpc:bl,id:n,method:e,params:r})).result}}class dq{constructor(e,r){if(this.provider=e,this.multicall=Sn.isMulticall(r)?r:new Sn(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const hq=t=>e=>{const r=Sn.isMulticall(t)?t:new Sn(t);return(n,i)=>r.handle(e,n,i)};var vq=Object.freeze({__proto__:null,ProxyMethods:i4,MulticallProvider:uq,MulticallExternalProvider:dq,multicallMiddleware:hq});const yq=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Sn,providers:vq},Symbol.toStringTag,{value:"Module"}));var xl={},pq={get exports(){return xl},set exports(t){xl=t}};/*! + * EventEmitter2 + * https://github.com/hij1nx/EventEmitter2 + * + * Copyright (c) 2013 hij1nx + * Licensed under the MIT license. + */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function(k){return Object.prototype.toString.call(k)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",f=typeof setImmediate=="function",c=f?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(p){var k=Object.getOwnPropertyNames(p);return k.push.apply(k,Object.getOwnPropertySymbols(p)),k}:Object.keys;function d(){this._events={},this._conf&&v.call(this,this._conf)}function v(p){p&&(this._conf=p,p.delimiter&&(this.delimiter=p.delimiter),p.maxListeners!==r&&(this._maxListeners=p.maxListeners),p.wildcard&&(this.wildcard=p.wildcard),p.newListener&&(this._newListener=p.newListener),p.removeListener&&(this._removeListener=p.removeListener),p.verboseMemoryLeak&&(this.verboseMemoryLeak=p.verboseMemoryLeak),p.ignoreErrors&&(this.ignoreErrors=p.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function g(p,k){var I="(node) warning: possible EventEmitter memory leak detected. "+p+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(I+=" Event name: "+k+"."),typeof process<"u"&&process.emitWarning){var b=new Error(I);b.name="MaxListenersExceededWarning",b.emitter=this,b.count=p,process.emitWarning(b)}else console.error(I),console.trace&&console.trace()}var m=function(p,k,I){var b=arguments.length;switch(b){case 0:return[];case 1:return[p];case 2:return[p,k];case 3:return[p,k,I];default:for(var h=new Array(b);b--;)h[b]=arguments[b];return h}};function M(p,k){for(var I={},b,h=p.length,_=k?k.length:0,$=0;$0;)p=_[D],$.call(C,p,I[p]);this._listeners={},this._listenersCount=0,B()}}});function A(p,k,I,b){var h=Object.assign({},k);if(!p)return h;if(typeof p!="object")throw TypeError("options must be an object");var _=Object.keys(p),$=_.length,C,D,B;function j(ee){throw Error('Invalid "'+C+'" option value'+(ee?". Reason: "+ee:""))}for(var Y=0;Y<$;Y++){if(C=_[Y],!b&&!n.call(k,C))throw Error('Unknown "'+C+'" option');D=p[C],D!==r&&(B=I[C],h[C]=B?B(D,j):D)}return h}function S(p,k){return(typeof p!="function"||!p.hasOwnProperty("prototype"))&&k("value must be a constructor"),p}function P(p){var k="value must be type of "+p.join("|"),I=p.length,b=p[0],h=p[1];return I===1?function(_,$){if(typeof _===b)return _;$(k)}:I===2?function(_,$){var C=typeof _;if(C===b||C===h)return _;$(k)}:function(_,$){for(var C=typeof _,D=I;D-- >0;)if(C===p[D])return _;$(k)}}var R=P(["function"]),L=P(["object","function"]);function F(p,k,I){var b,h,_=0,$,C=new p(function(D,B,j){I=A(I,{timeout:0,overload:!1},{timeout:function(J,he){return J*=1,(typeof J!="number"||J<0||!Number.isFinite(J))&&he("timeout must be a positive number"),J}}),b=!I.overload&&typeof p.prototype.cancel=="function"&&typeof j=="function";function Y(){h&&(h=null),_&&(clearTimeout(_),_=0)}var ee=function(J){Y(),D(J)},G=function(J){Y(),B(J)};b?k(ee,G,j):(h=[function(J){G(J||Error("canceled"))}],k(ee,G,function(J){if($)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof J!="function")throw TypeError("onCancel callback must be a function");h.push(J)}),$=!0),I.timeout>0&&(_=setTimeout(function(){var J=Error("timeout");J.code="ETIMEDOUT",_=0,C.cancel(J),B(J)},I.timeout))});return b||(C.cancel=function(D){if(h){for(var B=h.length,j=1;j0;)G=Ee[C],G!=="_listeners"&&(St=H(p,k,I[G],b+1,h),St&&(ee?ee.push.apply(ee,St):ee=St));return ee}else if(Kt==="**"){for(ve=b+1===h||b+2===h&&Ie==="*",ve&&I._listeners&&(ee=H(p,k,I,h,h)),Ee=u(I),C=Ee.length;C-- >0;)G=Ee[C],G!=="_listeners"&&(G==="*"||G==="**"?(I[G]._listeners&&!ve&&(St=H(p,k,I[G],h,h),St&&(ee?ee.push.apply(ee,St):ee=St)),St=H(p,k,I[G],b,h)):G===Ie?St=H(p,k,I[G],b+2,h):St=H(p,k,I[G],b,h),St&&(ee?ee.push.apply(ee,St):ee=St));return ee}else I[Kt]&&(ee=H(p,k,I[Kt],b+1,h));if(J=I["*"],J&&H(p,k,J,b+1,h),he=I["**"],he)if(b0;)G=Ee[C],G!=="_listeners"&&(G===Ie?H(p,k,he[G],b+2,h):G===Kt?H(p,k,he[G],b+1,h):(ie={},ie[G]=he[G],H(p,k,{"**":ie},b+1,h)));else he._listeners?H(p,k,he,h,h):he["*"]&&he["*"]._listeners&&H(p,k,he["*"],h,h);return ee}function q(p,k,I){var b=0,h=0,_,$=this.delimiter,C=$.length,D;if(typeof p=="string")if((_=p.indexOf($))!==-1){D=new Array(5);do D[b++]=p.slice(h,_),h=_+C;while((_=p.indexOf($,h))!==-1);D[b++]=p.slice(h)}else D=[p],b=1;else D=p,b=p.length;if(b>1){for(_=0;_+10&&B._listeners.length>this._maxListeners&&(B._listeners.warned=!0,g.call(this,B._listeners.length,j))):B._listeners=k,!0;return!0}function K(p,k,I,b){for(var h=u(p),_=h.length,$,C,D,B=p._listeners,j;_-- >0;)C=h[_],$=p[C],C==="_listeners"?D=I:D=I?I.concat(C):[C],j=b||typeof C=="symbol",B&&k.push(j?D:D.join(this.delimiter)),typeof $=="object"&&K.call(this,$,k,D,j);return k}function ne(p){for(var k=u(p),I=k.length,b,h,_;I-- >0;)h=k[I],b=p[h],b&&(_=!0,h!=="_listeners"&&!ne(b)&&delete p[h]);return _}function O(p,k,I){this.emitter=p,this.event=k,this.listener=I}O.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function y(p,k,I){if(I===!0)h=!0;else if(I===!1)b=!0;else{if(!I||typeof I!="object")throw TypeError("options should be an object or true");var b=I.async,h=I.promisify,_=I.nextTick,$=I.objectify}if(b||_||h){var C=k,D=k._origin||k;if(_&&!o)throw Error("process.nextTick is not supported");h===r&&(h=k.constructor.name==="AsyncFunction"),k=function(){var B=arguments,j=this,Y=this.event;return h?_?Promise.resolve():new Promise(function(ee){c(ee)}).then(function(){return j.event=Y,C.apply(j,B)}):(_?process.nextTick:c)(function(){j.event=Y,C.apply(j,B)})},k._async=!0,k._origin=D}return[k,$?new O(this,p,k):this]}function w(p){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,v.call(this,p)}w.EventEmitter2=w,w.prototype.listenTo=function(p,k,I){if(typeof p!="object")throw TypeError("target musts be an object");var b=this;I=A(I,{on:r,off:r,reducers:r},{on:R,off:R,reducers:L});function h(_){if(typeof _!="object")throw TypeError("events must be an object");var $=I.reducers,C=z.call(b,p),D;C===-1?D=new E(b,p,I):D=b._observers[C];for(var B=u(_),j=B.length,Y,ee=typeof $=="function",G=0;G0;)h=I[b],(!p||h._target===p)&&(h.unsubscribe(k),_=!0);return _},w.prototype.delimiter=".",w.prototype.setMaxListeners=function(p){p!==r&&(this._maxListeners=p,this._conf||(this._conf={}),this._conf.maxListeners=p)},w.prototype.getMaxListeners=function(){return this._maxListeners},w.prototype.event="",w.prototype.once=function(p,k,I){return this._once(p,k,!1,I)},w.prototype.prependOnceListener=function(p,k,I){return this._once(p,k,!0,I)},w.prototype._once=function(p,k,I,b){return this._many(p,1,k,I,b)},w.prototype.many=function(p,k,I,b){return this._many(p,k,I,!1,b)},w.prototype.prependMany=function(p,k,I,b){return this._many(p,k,I,!0,b)},w.prototype._many=function(p,k,I,b,h){var _=this;if(typeof I!="function")throw new Error("many only accepts instances of Function");function $(){return--k===0&&_.off(p,$),I.apply(this,arguments)}return $._origin=I,this._on(p,$,b,h)},w.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var p=arguments[0],k,I=this.wildcard,b,h,_,$,C;if(p==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(I&&(k=p,p!=="newListener"&&p!=="removeListener"&&typeof p=="object")){if(h=p.length,a){for(_=0;_3)for(b=new Array(D-1),$=1;$3)for(h=new Array(B-1),C=1;C0&&this._events[p].length>this._maxListeners&&(this._events[p].warned=!0,g.call(this,this._events[p].length,p))):this._events[p]=k,h)},w.prototype.off=function(p,k){if(typeof k!="function")throw new Error("removeListener only takes instances of Function");var I,b=[];if(this.wildcard){var h=typeof p=="string"?p.split(this.delimiter):p.slice();if(b=H.call(this,null,h,this.listenerTree,0),!b)return this}else{if(!this._events[p])return this;I=this._events[p],b.push({_listeners:I})}for(var _=0;_0){for(b=this._all,k=0,I=b.length;k0;)b=k[I[_]],typeof b=="function"?h.push(b):h.push.apply(h,b);return h}else{if(this.wildcard){if($=this.listenerTree,!$)return[];var C=[],D=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,C,D,$,0),C}return k?(b=k[p],b?typeof b=="function"?[b]:b:[]):[]}},w.prototype.eventNames=function(p){var k=this._events;return this.wildcard?K.call(this,this.listenerTree,[],null,p):k?u(k):[]},w.prototype.listenerCount=function(p){return this.listeners(p).length},w.prototype.hasListeners=function(p){if(this.wildcard){var k=[],I=typeof p=="string"?p.split(this.delimiter):p.slice();return H.call(this,k,I,this.listenerTree,0),k.length>0}var b=this._events,h=this._all;return!!(h&&h.length||b&&(p===r?u(b).length:b[p]))},w.prototype.listenersAny=function(){return this._all?this._all:[]},w.prototype.waitFor=function(p,k){var I=this,b=typeof k;return b==="number"?k={timeout:k}:b==="function"&&(k={filter:k}),k=A(k,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:R,Promise:S}),F(k.Promise,function(h,_,$){function C(){var D=k.filter;if(!(D&&!D.apply(I,arguments)))if(I.off(p,C),k.handleError){var B=arguments[0];B?_(B):h(m.apply(null,arguments).slice(1))}else h(m.apply(null,arguments))}$(function(){I.off(p,C)}),I._on(p,C,!1)},{timeout:k.timeout,overload:k.overload})};function T(p,k,I){I=A(I,{Promise,timeout:0,overload:!1},{Promise:S});var b=I.Promise;return F(b,function(h,_,$){var C;if(typeof p.addEventListener=="function"){C=function(){h(m.apply(null,arguments))},$(function(){p.removeEventListener(k,C)}),p.addEventListener(k,C,{once:!0});return}var D=function(){B&&p.removeListener("error",B),h(m.apply(null,arguments))},B;k!=="error"&&(B=function(j){p.removeListener(k,D),_(j)},p.once("error",B)),$(function(){B&&p.removeListener("error",B),p.removeListener(k,D)}),p.once(k,D)},{timeout:I.timeout,overload:I.overload})}var N=w.prototype;Object.defineProperties(w,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(p){if(typeof p!="number"||p<0||Number.isNaN(p))throw TypeError("n must be a non-negative number");N._maxListeners=p},enumerable:!0},once:{value:T,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return w}):t.exports=w})()})(pq);function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e++gq;class Qc{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new xl.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===wn.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:l4(),type:_e.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,l)=>{if(a)i(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(de.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=ow){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=wn.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=wn.CLOSED,this._registered=!1,this._init=Ct.NIL}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===wn.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}handleMessage(e){var r=this;if(e.type===_e.INIT){de.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){de.error("invalid init nonce");return}this._init=Ct.OK,this.sendMessage({idx:-1,type:_e.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==Ct.OK)return;de.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===_e.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){de.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw de.error(l),this.close(),l}this.state=wn.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(f){r.sendMessage(f)});return}if(e.type===_e.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===_e.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Se(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);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!==wn.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),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!==wn.CLOSED&&(this.state=wn.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,de.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(Jr({},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 mq(t){return wq.some(e=>e.predicate(t))}const wq=[{name:"Decentraland Exception",predicate:xq},{name:"0x v3 Exception",predicate:Cq}],bq=/^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 xq(t){try{const e=ts(t);return bq.test(e)}catch{return!1}}function Cq(t){const e=new pr(Eq);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const Eq=[{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"}],vd=We(`Ethereum Signed Message: +`),f4=t=>Zi(t)||Me(t)?X(t):We(t),M1=t=>{const e=f4(t);return mq(e)?e:At([vd,We(String(e.length)),e])},Aq=t=>{if(JSON.stringify(t.slice(0,vd.length))!==JSON.stringify(vd))return t;const e=t.slice(vd.length),r=String(e.length).length;let n,i;try{i=Number(ts(e.slice(0,r)))}catch{i=Number(Q(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Cl=async(t,e,r,n)=>new ae.reader.OnChainReader(n).isValidSignature(t,e,r),c4=async(t,e,r,n)=>{const i=M1(e),s=Rm(i);return Cl(t,s,r,n)},u4=(t,e,r,n)=>Cl(t,E1(e),r,n),Mh=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",d4=()=>!!navigator.userAgent.match(/UnitySequence/i),h4=t=>t.onChain.deployed&&t.fullyMigrated;class v4{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 _c{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!_c.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.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 Nh(){return _c.isAvailable()?new _c:new v4}async function y4(t){return Array.isArray(t)?Promise.all(t.map(e=>xt(e))):xt(t)}const bC="@sequence.transportSession";class Yc{constructor(e){var r=this;this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==Ct.OK){if(i.type===_e.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case _e.OPEN:{if(r._init!==Ct.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case _e.CLOSE:return r._init!==Ct.OK,void 0;case _e.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:de.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=_3(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=Bm(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Mh()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=P3(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=T3(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.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(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){de.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!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=>{Nh().setItem(bC,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Nh().getItem(bC);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=Ct.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(Q(n.find(i=>i.isDefaultChain).chainId)))}),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")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:_e.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:_e.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:_e.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:_e.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:_e.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:_e.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:_e.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:_e.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Ct.OK)return de.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==_e.INIT)return de.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(de.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(de.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===Ct.OK){e();return}if(this._init!==Ct.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{de.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},ow/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=Ct.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:_e.INIT,data:{nonce:this._initNonce}}),this._init=Ct.SENT_NONCE})}}class Sq{constructor(){const e=new Cp,r=new Cp;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class Cp{constructor(){this.events=new xl.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 p4 extends Qc{constructor(e){if(super(),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,i)=>{if(this.state===wn.CLOSED){this.state=wn.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:_e.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=wn.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Ct.OK}closeWallet(){this.sendMessage({idx:-1,type:_e.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class kq extends Yc{constructor(e,r){super(e),this.port=r,this._init=Ct.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 g4(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=(...i)=>{n.logfromjs(`${t}: ${d0(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${d0(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${d0(i)}`)},window.logsOverriddenForUnreal=!0}}function d0(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let wa;class m4 extends Qc{constructor(e){super(),this.register=()=>{var r;g4("dapp"),wa&&(wa.unregister(),wa=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),wa=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),wa===this&&(wa=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Jc;r&&(s.pathname=r.toLowerCase()),this._init=Ct.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",Mm(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.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,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class _q extends Yc{constructor(e){super(e),this.onMessageFromUnreal=r=>{de.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Jc(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:Nm(n.get("intent"))}},this._init=Ct.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;g4("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){de.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;de.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;de.error(l),this.notifyClose({message:l}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==_e.INIT&&this._init!==Ct.OK){de.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}const aw="sequence-extension-message-handler";class Tq extends Yc{constructor(e,r){super(e),this.runtime=r,this._init=Ct.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:aw})}sendMessage(e){de.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class w4 extends Qc{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===aw&&(this._init=Ct.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Pq extends xl.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;de.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case _e.MESSAGE:if(s)this.emit(_e.MESSAGE,n),s(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((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(l,f)=>{if(l)s(l);else if(f)i(f);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,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 ba;class b4 extends Qc{constructor(e){super(),this.register=()=>{ba&&(ba.unregister(),ba=this),window.addEventListener("message",this.onWindowEvent),ba=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),ba===this&&(ba=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Jc;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=Ct.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Mh()&&!d4()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",Mm(n))),i&&o.set("net",`${i}`);let a,l;Mh()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const f=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",f)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){de.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class Iq extends Yc{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(de.debug("RECEIVED MESSAGE",i),r._init!==Ct.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===Ct.OK&&(!r.appOrigin||r.appOrigin.length<8)){de.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Jc(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:Nm(i.get("intent"))}},this._init=Ct.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){de.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}`;de.error(f),this.notifyClose({message:f}),window.close()}}).catch(a=>{var l;const f=`failed to open to network ${(l=s)==null?void 0:l.networkId}, due to: ${a}`;de.error(f),this.notifyClose({message:f}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);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!==Ct.OK){de.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):de.error("unable to postMessage as parentOrigin is invalid")}}function x4(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 N1{constructor(...e){var r=this;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(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},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){var r,n,i,s;const o=new N1;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new b4(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new p4(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new w4(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new m4(e.walletAppURL);o.add(a)}return o.register(),o}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;nRq(t,i))}function Rq(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data&&X(e.data).length>=4)throw new Error("self calls are forbidden");if(e.delegateCall)throw new Error("delegate calls are forbidden")}const Oq=1e4;class Dq{constructor(e,r,n){var i=this;this.signerReadyCallbacks=[],this.events=new xl.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const l={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var f;if((!i.account||i.account===null)&&!Bq.includes(s.method))throw a4;const c=i.account;if(!c)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(f=i.account)==null?void 0:f.provider(a??i.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof fa?u:void 0;switch(s.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send("net_version",[]);l.result=v;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send("eth_chainId",[]);l.result=v;break}case"eth_accounts":{const v=c.address;l.result=[v];break}case"eth_getBalance":{const[v,g]=s.params,m=await u.getBalance(v,g);l.result=m.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let v;switch(s.method){case"sequence_sign":case"personal_sign":{const[E,A]=s.params;v=E;break}case"eth_sign":{const[E,A]=s.params;v=A;break}}let g="";const m=M1(v),M=s.method==="sequence_sign";if(i.prompter===null?g=await c.signMessage(m,a??i.defaultChainId(),M?"eip6492":"ignore"):g=await i.prompter.promptSignMessage({chainId:a,message:m,eip6492:M},i.connectOptions),g&&g.length>0)l.result=g;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[v,g]=s.params;let m;if(typeof g=="string")try{m=JSON.parse(g)}catch(A){console.warn("walletRequestHandler: error parsing typedData",A)}else m=g;if(!m||!m.domain||!m.types||!m.message)throw new Error("invalid typedData object");let M="";const E=s.method==="sequence_signTypedData_v4";if(i.prompter===null?M=await c.signTypedData(m.domain,m.types,m.message,a??i.defaultChainId(),E?"eip6492":"ignore"):M=await i.prompter.promptSignMessage({chainId:a,typedData:m,eip6492:E},i.connectOptions),M&&M.length>0)l.result=M;else throw new Error("declined by user");break}case"eth_sendTransaction":{const v=Nq(s.params[0]).map(m=>("gas"in m&&m.gasLimit===void 0&&(m.gasLimit=m.gas,delete m.gas),m));xC(c.address,v);let g="";if(i.prompter===null?g=(await c.sendTransaction(v,a??i.defaultChainId())).hash:g=await i.prompter.promptSendTransaction(v,a,i.connectOptions),g)l.result=g;else throw new Error("declined by user");break}case"eth_signTransaction":{const[v]=s.params;if(Se(v.from)!==c.address)throw new Error("sender address does not match wallet");xC(c.address,v),i.prompter===null?l.result=await c.signTransactions(v,a??i.defaultChainId()):l.result=await i.prompter.promptSignTransaction(v,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(ae.transaction.isSignedTransactionBundle(s.params[0])){const v=U.from(s.params[0].chainId).toNumber(),g=await c.relayer(v).relay(s.params[0]);l.result=g.hash}else{const v=await u.sendTransaction(s.params[0]);l.result=v.hash}break}case"eth_getTransactionCount":{const v=Se(s.params[0]),g=s.params[1],m=await u.getTransactionCount(v,g);l.result=U.from(m).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(s.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(s.params[0]);break}case"eth_call":{const[v,g]=s.params;l.result=await u.call(v,g);break}case"eth_getCode":{const[v,g]=s.params;l.result=await u.getCode(v,g);break}case"eth_estimateGas":{const[v]=s.params;l.result=await u.estimateGas(v);break}case"eth_gasPrice":{const v=await u.getGasPrice();l.result=v.toHexString();break}case"wallet_switchEthereumChain":{const[v]=s.params;if(!v.chainId||v.chainId.length===0)throw new Error("invalid chainId");const g=U.from(v.chainId);i.setDefaultChainId(g.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=c.contexts;break}case"sequence_getWalletConfig":{const[v]=s.params;v?l.result=[(await c.status(v)).onChain.config]:l.result=await Promise.all(c.networks.map(async function(g){return(await c.status(g.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[v]=s.params;v?l.result=[CC(v,await c.status(v))]:l.result=await Promise.all(c.networks.map(async function(g){const m=await c.status(g.chainId);return CC(g.chainId,m)}));break}case"sequence_getNetworks":{l.result=await i.getNetworks(!0);break}case"sequence_isSequence":{l.result=!0;break}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[v]=s.params;if(!v)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(v),l.result=await i.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const v=await d.send(s.method,s.params);l.result=v}}}catch(c){de.error(c),l.result=null,l.error=Jr({},new Error(c),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.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:i}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var s;l=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=Oq){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 i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:Z.MAINNET,s=Bm(i).chainId,o={connected:!0,chainId:Vs(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry};try{o.proof=await t4(this.account,s,a)}catch(l){return de.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=await this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=Jr({},e,{data:i});r(s)},e.chainId)})}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=Jr({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(de.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(i=>Jr({},i,{provider:void 0,relayer:void 0}))};if(e){const i=Hs(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.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 i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",Q(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){de.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,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const l=await r.status(i);return s(l)?!0:(de.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function CC(t,e){return{context:e.original.context,config:e.onChain.config,address:ae.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 Bq=["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"];class jl{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!zl.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new jl(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new lw(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||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await y4(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await To(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,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,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}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){}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 lw extends jl{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_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 Lq{constructor(e){if(this.signer=e,lw.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,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return Cl(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=M1(r),a=Rm(o);return Cl(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,E1(r),n,i)}}class zl extends _m{constructor(e,r,n=Ac){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new jl(this.client,this),this.utils=new Lq(this.signer)}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(Jr({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Hs(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 E4(this.client,this.providerFor,r)),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,r){var n;if(e==="eth_chainId")return Vs(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=C4(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}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=Hs(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}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 getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}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 Vk(await 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}}zl.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function C4(t){return typeof t=="object"?C4(t.chainId):U.from(t).toNumber()}class E4 extends zl{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_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=Hs(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}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}}class Bo{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(Bo.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Bo.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Bo.SESSION_LOCALSTORE_KEY)}}Bo.SESSION_LOCALSTORE_KEY="@sequence.session";class Lo{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(Lo.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(Lo.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(Lo.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}Lo.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class fw{constructor(e,r,n){if(this.callbacks={},x4(e))this.transport=N1.new(e);else if(s4(e))this.transport=e;else throw new Error("Invalid transport");this.session=new Bo(r),this.defaultChainId=new Lo(r,n),this.transport.on("accountsChanged",i=>{var s;i.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(s=this.callbacks.accountsChanged)==null||s.forEach(o=>o(i))}),this.transport.on("connect",i=>{var s;const o=Vs(this.getChainId());(s=this.callbacks.connect)==null||s.forEach(a=>a(Jr({},i,{chainId:o})))}),this.transport.on("disconnect",i=>{var s;(s=this.callbacks.disconnect)==null||s.forEach(o=>o(i))}),this.transport.on("networks",i=>{var s;(s=this.callbacks.networks)==null||s.forEach(o=>o(i))}),this.transport.on("walletContext",i=>{var s;(s=this.callbacks.walletContext)==null||s.forEach(o=>o(i))}),this.transport.on("open",i=>{var s;(s=this.callbacks.open)==null||s.forEach(o=>o(i))}),this.transport.on("close",()=>{var i;(i=this.callbacks.close)==null||i.forEach(s=>s())}),this.defaultChainId.onDefaultChainIdChanged(i=>{var s;const o=Vs(i);(s=this.callbacks.chainChanged)==null||s.forEach(a=>a(o))})}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)}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&&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:Jr({},e,{networkId:this.getChainId()})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=U.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}async signMessage(e,r){const n=r!=null&&r.eip6492?"sequence_sign":"personal_sign";return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=r!=null&&r.eip6492?"sequence_signTypedData_v4":"eth_signTypedData_v4",i=sr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&U.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=Mq(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const Ep={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let ui;const A4=t=>{var e,r,n;if(ui)return ui;const i=Jr({},Ep,t,{transports:Jr({},Ep.transports,t==null?void 0:t.transports)}),s={},o=(e=(r=i.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Ac.find(v=>v.chainId===d.chainId)}))!=null?e:[],a=Ac.map(d=>{var v;const g=(v=i.networks)==null?void 0:v.find(m=>m.chainId===d.chainId);return g?Jr({},d,g):d}).concat(o),l=d=>{if(!s[d]){var v;const g=(v=a.find(E=>E.chainId===d))==null?void 0:v.rpcUrl;if(!g)throw new Error(`no rpcUrl found for chainId: ${d}`);const m=new fa(g),M=new Lm([H3,W3,new $m],new Ch(m));s[d]=new rU(M,d)}return s[d]},f=i.defaultNetwork?(n=Hs(a,i.defaultNetwork))==null?void 0:n.chainId:void 0;if(!f&&i.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${i.defaultNetwork}`);const c=i.localStorage||Nh(),u=new fw(i.transports,c,f);return ui=new zl(u,l),ui},S4=()=>{ui&&(ui.client.closeWallet(),ui.client.transport.unregister(),ui=void 0)},k4=()=>{if(!ui)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return ui},$q=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Pq,BaseProviderTransport:Qc,BaseWalletTransport:Yc,CHANNEL_ID:aw,DefaultChainIdTracker:Lo,DefaultProviderConfig:Ep,ErrSignedInRequired:a4,EventType:_e,ExtensionMessageHandler:Tq,ExtensionMessageProvider:w4,InitState:Ct,LocalStorage:_c,MemoryItemStore:v4,MuxMessageProvider:N1,OpenState:wn,PROVIDER_OPEN_TIMEOUT:ow,ProviderError:o4,ProxyMessageChannel:Sq,ProxyMessageChannelPort:Cp,ProxyMessageHandler:kq,ProxyMessageProvider:p4,SequenceClient:fw,SequenceClientSession:Bo,SequenceProvider:zl,SequenceSigner:jl,SingleNetworkSequenceProvider:E4,SingleNetworkSequenceSigner:lw,UnrealMessageHandler:_q,UnrealMessageProvider:m4,WalletRequestHandler:Dq,WindowMessageHandler:Iq,WindowMessageProvider:b4,WindowSessionParams:Jc,getWallet:k4,initWallet:A4,isBrowserExtension:Mh,isMuxTransportTemplate:x4,isProviderTransport:s4,isUnityPlugin:d4,isValidMessageSignature:c4,isValidSignature:Cl,isValidTypedDataSignature:u4,isWalletUpToDate:h4,messageToBytes:f4,nextMessageIdx:l4,prefixEIP191Message:M1,resolveArrayProperties:y4,trimEIP191Prefix:Aq,unregisterWallet:S4,useBestStore:Nh},Symbol.toStringTag,{value:"Module"}));function Mr(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 i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var Fq=Mr({__proto__:null},[IU]),jq=Mr({__proto__:null},[LU]),zq=Mr({__proto__:null},[eq]),Uq=Mr({__proto__:null},[oq]),Vq=Mr({__proto__:null},[JH]),Wq=Mr({__proto__:null},[LH]),Hq=Mr({__proto__:null},[yq]),qq=Mr({__proto__:null},[NV]),Gq=Mr({__proto__:null},[$q]),Kq=Mr({__proto__:null},[VW]);const Jq=ae.transaction;var Qq=Object.freeze({__proto__:null,transactions:Jq}),Yq=Mr({__proto__:null,isValidSignature:Cl,isValidMessageSignature:c4,isValidTypedDataSignature:u4,isWalletUpToDate:h4},[gV]),Xq=Mr({__proto__:null},[CW]),Zq=Mr({__proto__:null},[HW]),eG=Mr({__proto__:null},[TH]),tG=Mr({__proto__:null},[TW]),rG=Mr({__proto__:null},[KW]),ze=Object.freeze({__proto__:null,abi:Fq,api:jq,auth:zq,guard:Uq,indexer:Vq,metadata:Wq,multicall:Hq,network:qq,provider:Gq,relayer:Kq,transactions:Qq,utils:Yq,core:Xq,signhub:Zq,sessions:eG,migration:tG,account:rG,initWallet:A4,getWallet:k4,unregisterWallet:S4,SequenceProvider:zl,SequenceClient:fw,SequenceSigner:jl});const EC=[{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"}],nG="/demo-dapp/assets/logo-b757309e.svg",h0="/demo-dapp/assets/skyweaver-banner-6d47c1d1.png";var iG="_1e9z9271";const sG=({message:t,loading:e})=>le(F7,{label:"Console",defaultOpen:!0,children:nn(pe,{as:"pre",style:{fontFamily:"monospace",whiteSpace:"break-spaces",overflowWrap:"anywhere"},children:[t,e&&(()=>t?` +...`:"...")(),le(pe,{className:iG,display:"inline-block",fontSize:"large",lineHeight:"4",style:{top:"-4px",position:"relative"},children:"_"})]})});var oG="_1q07ov40";const vo=t=>{const{label:e,children:r,style:n,className:i}=t;return nn(pe,{marginTop:"10",marginBottom:"8",marginX:"0",width:"full",className:i,style:n,children:[e&&le(pe,{marginBottom:"2",children:le(aG,{children:e})}),le(pe,{className:oG,children:Wt.Children.map(r,(s,o)=>le(pe,{children:s},o))})]})},aG=t=>le(nr,{variant:"normal",fontWeight:"medium",color:"text50",children:t.children}),Du="data:image/png;base64,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",AC="data:image/png;base64,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",lG="/demo-dapp/assets/100-cf3a0cbf.png",fG="/demo-dapp/assets/1101-1d0b8ff9.png",SC="data:image/png;base64,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",kC="/demo-dapp/assets/250-2aa72264.png",_C="/demo-dapp/assets/42161-90b816d4.png",cG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAkxQTFRF////AAAA74Ig8Iwx8ZA4//7974Qj74Mh///+//////78////74Mi//v4//////z5/vfx74Um//37////////////////////////////////////////8ZE774Yn8Y42/fLn////////8Isw////86FW/evc/OXR////+dGt/vPp8Igq++HK+9u/976M8pZE/ezd8Icp+dOx/vbu9KZg/vr2/OjW9a9w9Kll+ti5/e/j/vnz8pxO//r3////8Y838pZD////////////////8Iwy////851Q////+MWX+cyk+tWz+97E8ZI9////8Y0z////////////8ptM/fDk9rZ9972J+93C86Nb8ZM+9riB/OXQ+c+p/OfU/OnY8ZRB////9Kdi9a5u////9axr////////////////////////////////////9Kpn////98KS86Rd/////////vfw/////OPN////859U98GQ////////9rmB+9/G9bJ298CO+Mqg/e3f9bR686JZ8plI9a1t+dKv9bJ18ZA6/vXs8Igs+Mui/e7h/OrZ+Mmf+c6n8phI8Iov86Ve////////+MaZ////8Ikt////+tm7+c2l////++LM98OT8pdG////////+Mid9ruF855S////////////////+Mib////9rN49rd++tq997yG+ta3////98OV////////++DI////////9rV7+tW19bBy/vPq9rqD9Ktp////8ppK////////////////////////Mj9/0QAAAMR0Uk5T/wD/////////Af/+///9/////5/W9TQF4uDZ6MT/////x1L/Av///5b////////////////////////////Q///vCh77/6X/uP//////p/8SDgb/////////////////J///UP8QSyRsVr4rDZr/Wf//bwz/9/9N///8L///////////////////////////////h7H/5P9d///c////j+n////zMuxm/6D//////5v/WFv/MCz///////9U/2M11GLeOHwhNZoAAAr/SURBVHicxVv3Y1RFEJ67JCSXkII5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",TC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAADQNJREFUeJztnXuMVNUdxxEUi0obW9BCNDH+YYymWAKNFRLDYxcUBZaXqOCL2hRkBWEp8miVhZalKKa4dLXyShQfQBugFKWRRzYIAhGQRwEBK7LgnnntY2b2NbMzp7/fvRcc1tmZuefee37nzsw3+fyjYfb3O7/f3Lnnd875nQ4dslBs4KCbgPuAUcAcYBWwHTgInAIuAAzwAwHAC1wEzgCHgZ3AOqAUmADcD3QHrqH2La82MoL9IFAMrDWCGAe4A1QDm4ykGgbcSu1/zgkGvRPQF5hhfKtbHAp2JmCiHQIWAgVAF+rxyUp5Bg7qCIP7AFBmPL6pAp6OILAGGA7cSD1urhcM4m1ACbAPaFQgwJnSCpwElgC/BDpSj6VrBIN1DXA3UAF8p0Aw7XgqbAEGANdSj6+yMgL/K2Az0KBA4Jx4KuwHxgOdqcdbGXn0wPcCtgHNCgTKaWJMn2qOAK6jHn9SMf03vjxLv/GZPBE+BvqwXKsvgMNdgClArQKBoAansctZrtQUwNHeTH8EUg+8aniAMUAn6hg5InDsBmA6UK/AYKsK/izg7KcHdbxsFTjUjekvedQD7BZOA32p42aLwJFC4FsFBtVthJn+xHTnTwLTy7fzWW6+4dsFrjVsALpSx9OUwODOwArm3KpcrrEX6EYd14zE9OXZLQoMWrZxFriLOr4pBQbeDFQqMFjZShXQizrOScX0qt5+BQYp28GdTP2p432VwKCewAEFBidXwCToRx13TUyf43+mwKDkGpeA3tTBx7f9TQoMRq5yDuhJFXyc57+pwCDkOrjTWX6dAP7oXObyeb5n2CPcWzSKs8EF5LZYBJeV5VUMmb4NO6qA42IUFPJgRQWP+Xw8HgrxlkOHuP/pZ+jtssY8WcG/g+lLl9QOCxMsL+c8FuOJipw+zb3DR5DbZgFcSRztdPDxpW+PAs4K45v4FI/5AzyZwuveJ7fPInjC6Xango8vffMUcFKcQYN547+2Jg0+KhYIcP+zz9HbaQ1cdrf/pRA+tB8QUsBBYQJTXuDxhoZ2EwDVtHMnuZ02MNXu4Hdlbi/2wLe/5ejRlMG/rJrpL9Hbaw0fcI+dCVCigFOWqH3l1YyCj4p89VU2TA3XMzvOH8CH3Mn02jO1Q8J4hgzlrVVVGScAqv6118nttgiePxhpMfgD8dDGhwo4Y4nQ6tWmgo+KB4NaoYjadot8A/zYyrcfDy1EFHBEGO/IorQvfu0pvG4duf028IJo8K9leomR2gFLNG5tf9qX9ikQiXD/M8+S+2ARLNqZ304G/2go06tL1A4Ig9O+thU/s2o+cIDcDxtYajb42IVjpwKGW6Ll8GFLwdfU2sprZs8m98UieMz+Z2YSAJsauPqkbu38P8AzPG49AUCRU6e0OgK1TxYpMZMA7n7zLyjk0a//Z0vwL6v+9WX0flkDTxv9JJPg/4K5/NRucMXfbA0+Kub1ct/jT5D7ZgGsC0zKJAEWKGCsML4nntSC5YS01UJ3/xTgrK79XgTwP38EHFXAUDEgOA0bNzoSfBRuHvE/N4neT3GwX1H7G0mZ3vzQtYWfwOQpPN7U5FgCoJo+/dTtT4HSVAng2k2ensIh2pzdaWFV0TvuMXJ/LfA5S9atDP7j9cBxBQwUombWLMtFn0xV+/Iccn8tgMfO+yRLAOxjR9l2VRjPQw/z6LmvpQQfFVy+nNxni7ycLAFKFTBMiNA770gLPgr/HrXPFjmQLAFc2bjJO2KktpdPpurfeIPcb4vEqwcOuiUx+D9XwCghGjdvkRp8VM2MmeR+28CIttM/aoNM45swUXitX1S4UQT3GFD7bgOliQkwXwGDzDG4gDfv+Uxq8FHhDz+i990eKhMTYKsCBpmi9tUFnEejUoOvrQc8Np7cd5vAGd/1HaoHaM2afQoYlDGeh4fxyPHjUoOPCr39NrnvNnMvfvt7KGCIKeqXLZNW9Lms6Pnz3DtqNLnvNjMGE6C/AoZkjLeoiMfq6qQGHzeW1P7xFXLfHWAxJsAkBQzJmPD7H8gNPgiPj7t8Aag9tmIC/EUBQzLCN3GitlNXquBFMzC1mNx3hziCCfBPBQxJD57tO3hQbvA5Lv/uoPfdOaoxAVxx6LNm5kzbNnlmKiwyZdG0LxkRTID/KmBISvBsX/TMWanBR4VWryH33WkwAVS+iFEj+Nfl0oMfq6nR6g3UvstIAD+1EanAIMT8fukJUFdWRu67rAQIUhuRioYNG6QHv+XLLy31B8A+RNhkAjeqUI9fJgmg7JWs3rHjeLyxUXoCBKZNE7MZkqZp+3+ufE6svp7XTJtOPo7uTICCQq1fj2w17RCf9uG5gbbCdwnfU0/Tj2eKBFDyJ6CmZJZ2MFOmsMQsehxcK1I1Nyf93MZPPtESmnpM20sA5V4C8bfTlpO9JhV+T6whhGfoQ7x53+ftf3AsxmvnzCUf1/YSQLkbvbA/j2y1XqjS+wYL2Fu3aFH6z6+6yD2PPEo+tskS4AS1EYlgEFo9HgkhTxB8Q4NvlovZO7KIR89mUKSKx3mwfAX5+CZLAKVKwaGVq5wPeBthWzjRhlBm7I3V1qp2qiii1GIQzp/j4bCDoU6iaJTXzCwRs/fJCaY3pWqzDHWWlrXFoKUKGKINSvOePQ5FuX01790nVvTBOf8O89NUXM4OvChYZ7CfI8psCAkUF0tf68eTxP5Jk8TsnVosvCk1cuyYKtPCrWpsCSscwiMnTtgc3vQSbQ+P0z5L9sILYd3ixdTBRxYrcSqo7k9/lr7WjwtMops8ccZg1d7W6mruo38hHNvh0oCBeA8A2bZw7+gx2o5bqcIpmeAJX+8o+6apDes3UCfAveQHQ0Jr1toymGYUOXlSuCgTXr/eNjtiwSD3/+Z5quDrB0OMBCC5CQTP9sk+2att8Z4/X8hefPGz+yxiyxdfUCVAJfnhUJwTy1ZzZaXWTsa0vTDta9nvTAsaojMHC0iPh2t9fCVLm4MXi23xritd6NjqZOvFi9rMQnIMvj8eLr1BxKDBPJLh9S12qmHTJqEqHJaJnd6WFn73XZnBxws/b2mbANJaxGjfJsnC3Tmiq32hvzvfggb3EnjHjJWVAAfJmkThWj/FJs/QypVC9vrGP87jLS1SbGzavVtWAiRtEiWlTVxolfnrW6wqev5b4U2euJtHpgKTJzsdfLz674dt4owkcLRRpOfR4dqjWKpg2ie62ud//rfSm1BoO5KdTYDkjSITpoOOtYqtL1sidTBRTbt2CS+/Nm7fLt1eTNjA7xx9CixIGnwjARxtFt2w8R9Sx7Ll2DFL27DwQmkKOXhlXT1L1SzaSALH2sVji1Upgm8RFpk8Fm8DD38gvxcB1iocvJfgY7wKMF0COHdhBG6i2LXbsfYuOJXCOn/dwkW2rLfjO4vWi0jSSiXaH1zh2L7BzC6MMJLAuStjIAnw5apucRkPlpfzYMVbPPSWIPBv8TPqly7lNb+frR/ltvnKVzyZjGsA9Utf04IjbGs7BCsqtJXJutJSp28kOV2dyZUxRgK4/tKoPD/A1KVRWXFtXJ4r4LVxP804AYwkKGQuvzgyzxWWmQp+wlPA9VfH5tGuju1uOgGMJHD95dF5BC+P1hMgO66Pz2G+YVaujzeeAncCTAFn8pgD5/1FloKfkAQlCjiUxxwbgM52JUBXptgh0jwpwW3+99gS/IQk6Mf0tWRq5/KkZ6qtwTcSAA+QzFXAuTyp2QZ0tT0BjCToDOxRwMk8yfECtzsS/IQkuMP4Q9TO5rkarNqOdjT4CUnwIBBVwOk83zNPSvATkgDfB+IKOJ5HL9l3kpwA2qli1942nkUcZE699KVPAu2lcJMCg5CrnAN6kgQ/IQm6sXyRiIJLLN0GT1nCLAQOKDAouQKuzfSnjvtVAoNuA/YrMDjZjnrBvyww7GagUoFBylYuAr2o45xSYOBNwBYFBivbOAszr7uo45uRmD47WMHydQK72At0o46rKRl1AryWXs0LKdwBfoFwXZ9mnm+HmL67WLmW9C4gDEyHL5LcCp8TYnqtYJsCg+oWTgN9qeNmq8ChG4CXmH5ClXqAVQVX9CqAHtTxckzgXG/giAKDrRq4f39MtexFHQqBo12AKcypU8juAvsyLQdupY6LdDG9elgONCgQCNng4x6XcftUpzuzn80yDp/0Av7NJHQpUwDcr489GUcA11GPvzIyEuHXwGaWnU8E/Mbjgtm4fOBTCAYHE+Fupr8Nf6dA4KyCF3NiaRz7MCbvzpVXcjH9HWEmsI+5q6KI+yVPAkuY3myjI/VYulpGWfkBoIypXVXEb/tqYDhwI/W4ZaWY3regLzAD2M5oXxyxVn8IWAgUAF2oxyfnxPTlZ9ym/iKwFjjDnFuFrGb6Hsg5TG+qmXtzdzeI6YdZ7wNGGcFaZTwtcAftKeAC03fW+A2wCldlJA9O0bA/0jqmd1CfANwPdPcMyL75+v8BTjnTYDkmUekAAAAASUVORK5CYII=",PC="/demo-dapp/assets/56-06b98271.png",uG={[Z.MAINNET]:Du,[Z.ROPSTEN]:Du,[Z.GOERLI]:Du,[Z.KOVAN]:Du,[Z.OPTIMISM]:AC,[Z.OPTIMISM_TESTNET]:AC,[Z.POLYGON]:SC,[Z.POLYGON_MUMBAI]:SC,[Z.POLYGON_ZKEVM]:fG,[Z.ARBITRUM]:_C,[Z.ARBITRUM_NOVA]:cG,[Z.ARBITRUM_GOERLI]:_C,[Z.GNOSIS]:lG,[Z.BSC]:PC,[Z.BSC_TESTNET]:PC,[Z.FANTOM]:kC,[Z.FANTOM_TESTNET]:kC,[Z.AVALANCHE]:TC,[Z.AVALANCHE_TESTNET]:TC},dG=()=>{const t=window.localStorage.getItem("defaultChainId");return t==null?null:Number(t)};k3({logLevel:"DEBUG"});const hG="https://sequence.app",vG="https://api.sequence.app",IC=dG()||Z.MAINNET,_4=new URLSearchParams(window.location.search);let Ua=_4.get("walletAppURL")??hG;Ua&&Ua.length>0?ze.initWallet({defaultNetwork:IC,transports:{walletAppURL:Ua}}):ze.initWallet({defaultNetwork:IC,transports:{walletAppURL:Ua}});const yG=()=>{const[t,e]=x.useState(null),[r,n]=x.useState(!1),[i,s]=x.useState(!1),o=ze.getWallet().getProvider(),[a,l]=x.useState(o.getChainId());x.useMemo(()=>{o.on("chainChanged",b=>{l(U.from(b).toNumber())})},[]),x.useEffect(()=>{s(o.isConnected())},[o]),x.useEffect(()=>{N()},[i]),x.useEffect(()=>{o.on("disconnect",()=>{console.log("wallet disconnected"),u()})},[o]);const f={app:"Demo Dapp",askForEmail:!0},c=async(b={app:"Demo dapp"})=>{if(i){T(),w("Wallet already connected!"),n(!1);return}b={...f,...b,settings:{...f.settings,...b.settings}};try{T(),w("Connecting");const h=ze.getWallet(),_=await h.connect(b);if(b.authorize){let $=_4.get("apiUrl");(!$||$.length===0)&&($=vG);const C=new ze.api.SequenceAPIClient($),{isValid:D}=await C.isValidETHAuthProof({chainId:_.chainId,walletAddress:_.session.accountAddress,ethAuthProofString:_.proof.proofString});w(`isValid (API)?: ${D}`)}if(b.authorize){const $=new bh;if(_.proof){const C=await $.decodeProof(_.proof.proofString,!0),D=await h.utils.isValidTypedDataSignature(h.getAddress(),_.proof.typedData,C.signature,U.from(_.chainId).toNumber());w(`connected using chainId: ${U.from(_.chainId).toString()}`),w(`isValid (client)?: ${D}`)}}n(!1),_.connected?(w("Wallet connected!"),w(`shared email: ${_.email}`),s(!0)):w("Failed to connect wallet - "+_.error)}catch(h){console.error(h),p()}},u=()=>{ze.getWallet().disconnect(),N(),s(!1)},d=()=>{ze.getWallet().openWallet()},v=()=>{const b=ze.getWallet(),_={type:"openWithOptions",options:{app:"Demo Dapp",settings:{theme:"light",includedPaymentProviders:["moonpay","ramp","wyre"],defaultFundingCurrency:"eth",defaultPurchaseAmount:400,lockFundingCurrencyToDefault:!1}}},$="wallet/add-funds";b.openWallet($,_)},g=()=>{ze.getWallet().closeWallet()},m=async()=>{T();const b=ze.getWallet();w(`isConnected?: ${b.isConnected()}`),n(!1)},M=async()=>{T();const b=ze.getWallet();w(`isOpened?: ${b.isOpened()}`),n(!1)},E=async()=>{try{T();const b=o.getChainId();w(`top chainId: ${b}`);const _=o.getProvider().getChainId();w(`provider.getChainId(): ${_}`);const C=await o.getSigner().getChainId();w(`signer.getChainId(): ${C}`),n(!1)}catch(b){console.error(b),p()}},A=async()=>{try{T();const b=ze.getWallet(),h=b.getAddress();w(`getAddress(): ${h}`);const $=b.getProvider().listAccounts();w(`accounts: ${JSON.stringify($)}`),n(!1)}catch(b){console.error(b),p()}},S=async()=>{try{T();const b=ze.getWallet(),h=b.getProvider(),_=b.getAddress(),$=await h.getBalance(_);w(`balance check 1: ${$.toString()}`);const D=await b.getSigner().getBalance();w(`balance check 2: ${D.toString()}`),n(!1)}catch(b){console.error(b),p()}},P=async()=>{try{T();const h=await ze.getWallet().getNetworks();w(`networks: ${JSON.stringify(h,null,2)}`),n(!1)}catch(b){console.error(b),p()}},R=async()=>{try{T();const b=ze.getWallet();w("signing message...");const h=b.getSigner(),_=`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. + +ā˜ ā˜€ ā˜‚`,$=await h.signMessage(_);w(`signature: ${$}`);const C=await b.utils.isValidMessageSignature(b.getAddress(),_,$,await h.getChainId());if(w(`isValid?: ${C}`),!C)throw new Error("sig invalid");n(!1)}catch(b){console.error(b),p()}},L=async()=>{try{T();const b=ze.getWallet();w("signing typedData...");const h={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"]}},_=b.getSigner(),$=await _.signTypedData(h.domain,h.types,h.message);w(`signature: ${$}`);const C=await b.utils.isValidTypedDataSignature(b.getAddress(),h,$,await _.getChainId());w(`isValid?: ${C}`),n(!1)}catch(b){console.error(b),p()}},F=async()=>{try{T();const b=ze.getWallet(),h="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",_=new pr(["function withdraw(uint256 amount)"]),$={to:h,data:_.encodeFunctionData("withdraw",["1000000000000000000"])},D=await b.getProvider().estimateGas($);w(`estimated gas needed for wmatic withdrawal : ${D.toString()}`),n(!1)}catch(b){console.error(b),p()}},z=async b=>{try{T();const h=ze.getWallet();b=b||h.getSigner(),w(`Transfer txn on ${b.getChainId()} chainId`);const _=await b.getAddress(),$={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:_,value:Yy("1.234"),data:"0x"},C={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:_,value:Yy("0.4242"),data:"0x"},D=b.provider,B=await D.getBalance(_);w(`balance of ${_}, before: ${B}`);const j=await b.sendTransaction([$,C]);w(`txnResponse: ${JSON.stringify(j)}`);const Y=await D.getBalance(_);w(`balance of ${_}, after: ${Y}`),n(!1)}catch(h){console.error(h),p()}},H=async b=>{try{T();const h=ze.getWallet();b=b||h.getSigner();const _=await b.getAddress(),$=mh("1",1),D={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x07865c6e87b9f70255377e024ace6630c1eaa37f",value:0,data:new pr(EC).encodeFunctionData("transfer",[_,$.toHexString()])},B=await b.sendTransaction([D],{chainId:Z.GOERLI});w(`txnResponse: ${JSON.stringify(B)}`),n(!1)}catch(h){console.error(h),p()}},q=async b=>{try{T();const h=ze.getWallet();b=b||h.getSigner();const _=await b.getAddress(),$=mh("0.05",18),D={delegateCall:!1,revertOnError:!1,gasLimit:"0x55555",to:"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063",value:0,data:new pr(EC).encodeFunctionData("transfer",[_,$.toHexString()])},B=await b.sendTransaction([D]);w(`txnResponse: ${JSON.stringify(B)}`),n(!1)}catch(h){console.error(h),p()}},K=async()=>{try{const b=ze.getWallet(),h=b.getChainId()===Z.ARBITRUM?Z.OPTIMISM:Z.ARBITRUM;z(b.getSigner(h))}catch(b){console.error(b),p()}},ne=async()=>{try{T(),w("TODO"),n(!1)}catch(b){console.error(b),p()}},O=async b=>{try{T();const h=ze.getWallet();b=b||h.getSigner();const _=["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)"],$="0x2791bca1f2de4661ed88a30c99a7a9449aa84174",C=new Ll($,_,b),D=await C.symbol();w(`Token symbol: ${D}`);const B=await C.balanceOf(await b.getAddress());w(`Token Balance: ${B.toString()}`),n(!1)}catch(h){console.error(h),p()}},y=async()=>{try{T();const _=await ze.getWallet().getSigner().getAddress(),$=new ze.indexer.SequenceIndexerClient(ze.indexer.SequenceIndexerServices.POLYGON),C=await $.getTokenBalances({accountAddress:_,includeMetadata:!0});w(`tokens in your account: ${JSON.stringify(C)}`);const D=await $.getTokenBalances({accountAddress:_,includeMetadata:!0,contractAddress:"0x631998e91476DA5B870D741192fc5Cbc55F5a52E"});w(`skyweaver collectibles in your account: ${JSON.stringify(D)}`),n(!1)}catch(b){console.error(b),p()}},w=(b,h=!1)=>(console.log(b),e(h?b:_=>`${_} + +${b}`)),T=()=>{n(!0)},N=()=>{n(!1),e(i?"Status: Wallet is connected :)":"Status: Wallet not connected. Please connect wallet first.")},p=()=>{n(!1),e("An error occurred")},k=[Z.RINKEBY,Z.HARDHAT,Z.HARDHAT_2,Z.KOVAN,Z.FANTOM,Z.FANTOM_TESTNET,Z.ROPSTEN,Z.AURORA,Z.AURORA_TESTNET,Z.HOMEVERSE_TESTNET,Z.BASE_GOERLI],I=Object.values(ze.network.networks).filter(b=>k.indexOf(b.chainId)<0).sort((b,h)=>b.title>h.title?1:-1);return nn(pe,{marginY:"0",marginX:"auto",paddingX:"6",style:{maxWidth:"720px",marginTop:"80px",marginBottom:"80px"},children:[le(pe,{marginBottom:"10",children:le("a",{href:"https://sequence.xyz/",target:"_blank",rel:"noopener",children:le(nk,{height:"6",alt:"logo",src:nG})})}),le(pe,{children:le(nr,{variant:"normal",color:"text100",fontWeight:"bold",children:"Demo Dapp"})}),le(pe,{marginTop:"1",marginBottom:"4",children:le(nr,{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."})}),nn(HR,{background:"backgroundMuted",alignItems:"center",gap:"3",children:[le(w7,{}),le(nr,{variant:"normal",color:"text80",children:"Please open your browser dev inspector to view output of functions below."})]}),le(_2,{background:"buttonGlass"}),nn(pe,{marginBottom:"4",children:[le(nr,{as:"div",variant:"small",color:"text100",children:"Wallet URL"}),le("a",{href:Ua,target:"_blank",rel:"noopener",children:nn(pe,{gap:"1",marginTop:"1",alignItems:"center",children:[le(nr,{as:"div",variant:"normal",color:"text80",children:Ua}),le(y7,{})]})})]}),le(_2,{background:"buttonGlass"}),le(pe,{marginBottom:"4",children:le(PB,{name:"chainId",label:"Network",labelLocation:"top",onValueChange:b=>o.setDefaultChainId(Number(b)),value:String(a),options:[...Object.values(I).map(b=>({label:nn(pe,{alignItems:"center",gap:"2",children:[le(aL,{src:uG[b.chainId],size:"sm"}),le(nr,{children:b.title})]}),value:String(b.chainId)}))]})}),nn(vo,{label:"Connection",children:[le(je,{width:"full",shape:"square",onClick:()=>c(),label:"Connect"}),le(je,{width:"full",shape:"square",onClick:()=>c({app:"Demo Dapp",authorize:!0}),label:"Connect & Auth"}),le(je,{width:"full",shape:"square",onClick:()=>c({app:"Demo Dapp",authorize:!0,settings:{theme:"dark",bannerUrl:`${window.location.origin}${h0}`,includedPaymentProviders:["moonpay"],defaultFundingCurrency:"matic",defaultPurchaseAmount:111}}),label:"Connect with Settings"}),le(je,{width:"full",shape:"square",onClick:()=>{const b=prompt("Auto-email login, please specify the email address:");c({app:"Demo Dapp",authorize:!0,settings:{signInWithEmail:b,theme:"dark",bannerUrl:`${window.location.origin}${h0}`}})},label:"Connect with Email"}),le(je,{width:"full",shape:"square",onClick:()=>{c({app:"Demo Dapp",authorize:!0,settings:{signInWith:"google",theme:"dark",bannerUrl:`${window.location.origin}${h0}`}})},label:"Connect with Google"}),le(je,{width:"full",shape:"square",onClick:()=>u(),label:"Disconnect"})]}),nn(vo,{label:"Basics",children:[le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>d(),label:"Open Wallet"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>v(),label:"Open Wallet with Settings"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>g(),label:"Close Wallet"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>m(),label:"Is Connected?"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>M(),label:"Is Opened?"})]}),nn(vo,{label:"State",children:[le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>E(),label:"ChainID"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>P(),label:"Networks"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>A(),label:"Get Accounts"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>S(),label:"Get Balance"})]}),nn(vo,{label:"Signing",children:[le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>R(),label:"Sign Message"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>L(),label:"Sign TypedData"})]}),le(vo,{label:"Simulation",children:le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>F(),label:"Estimate Unwrap Gas"})}),nn(vo,{label:"Transactions",children:[le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>z(),label:"Send funds"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>K(),label:"Send on L2"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>q(),label:"Send DAI"}),le(je,{width:"full",shape:"square",disabled:!i||!0,onClick:()=>ne(),label:"Send ERC-1155 Tokens"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>H(),label:"Send USDC on Goerli"})]}),nn(vo,{label:"Various",children:[le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>O(),label:"Read Symbol and Balance"}),le(je,{width:"full",shape:"square",disabled:!i,onClick:()=>y(),label:"Fetch Token Balances"})]}),le(sG,{message:t,loading:r})]})},pG=Wt.memo(yG),gG=Tk(document.getElementById("root"));gG.render(le(Wt.StrictMode,{children:le(nL,{children:le(pG,{})})})); diff --git a/index.html b/index.html index 4a00c1e..6d5ec3f 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 - +