From e65176dc16923dc06ee42e147fb324117578e3ae Mon Sep 17 00:00:00 2001 From: polarker Date: Wed, 28 Feb 2024 13:07:50 +0000 Subject: [PATCH] deploy: fc52e6a001f867cfda285c9c8853c1aee9e2c73a --- assets/index-5468cfad.js | 2200 ++++++++++++++++++++++++++++++++++++++ assets/index-fc0d89fc.js | 2191 ------------------------------------- index.html | 2 +- 3 files changed, 2201 insertions(+), 2192 deletions(-) create mode 100644 assets/index-5468cfad.js delete mode 100644 assets/index-fc0d89fc.js diff --git a/assets/index-5468cfad.js b/assets/index-5468cfad.js new file mode 100644 index 0000000..6123807 --- /dev/null +++ b/assets/index-5468cfad.js @@ -0,0 +1,2200 @@ +var Sne=Object.defineProperty;var Ene=(e,t,r)=>t in e?Sne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $g=(e,t,r)=>(Ene(e,typeof t!="symbol"?t+"":t,r),r);function Cne(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zi(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var sF={exports:{}},Zb={},cF={exports:{}},Ct={};/** + * @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 S0=Symbol.for("react.element"),Pne=Symbol.for("react.portal"),Ane=Symbol.for("react.fragment"),One=Symbol.for("react.strict_mode"),Ine=Symbol.for("react.profiler"),Tne=Symbol.for("react.provider"),Mne=Symbol.for("react.context"),kne=Symbol.for("react.forward_ref"),$ne=Symbol.for("react.suspense"),Dne=Symbol.for("react.memo"),Rne=Symbol.for("react.lazy"),a9=Symbol.iterator;function Nne(e){return e===null||typeof e!="object"?null:(e=a9&&e[a9]||e["@@iterator"],typeof e=="function"?e:null)}var lF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uF=Object.assign,fF={};function md(e,t,r){this.props=e,this.context=t,this.refs=fF,this.updater=r||lF}md.prototype.isReactComponent={};md.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};md.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dF(){}dF.prototype=md.prototype;function wE(e,t,r){this.props=e,this.context=t,this.refs=fF,this.updater=r||lF}var _E=wE.prototype=new dF;_E.constructor=wE;uF(_E,md.prototype);_E.isPureReactComponent=!0;var s9=Array.isArray,hF=Object.prototype.hasOwnProperty,xE={current:null},pF={key:!0,ref:!0,__self:!0,__source:!0};function gF(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)hF.call(t,n)&&!pF.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,g=S[C];if(0>>1;Co(W,E))eeo(ce,W)?(S[C]=ce,S[ee]=E,C=ee):(S[C]=W,S[re]=E,C=re);else if(eeo(ce,E))S[C]=ce,S[ee]=E,C=ee;else break e}}return k}function o(S,k){var E=S.sortIndex-k.sortIndex;return E!==0?E:S.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var c=[],l=[],u=1,d=null,p=3,m=!1,w=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $(S){for(var k=r(l);k!==null;){if(k.callback===null)n(l);else if(k.startTime<=S)n(l),k.sortIndex=k.expirationTime,t(c,k);else break;k=r(l)}}function R(S){if(A=!1,$(S),!w)if(r(c)!==null)w=!0,x(j);else{var k=r(l);k!==null&&v(R,k.startTime-S)}}function j(S,k){w=!1,A&&(A=!1,O(N),N=-1),m=!0;var E=p;try{for($(k),d=r(c);d!==null&&(!(d.expirationTime>k)||S&&!q());){var C=d.callback;if(typeof C=="function"){d.callback=null,p=d.priorityLevel;var g=C(d.expirationTime<=k);k=e.unstable_now(),typeof g=="function"?d.callback=g:d===r(c)&&n(c),$(k)}else n(c);d=r(c)}if(d!==null)var M=!0;else{var re=r(l);re!==null&&v(R,re.startTime-k),M=!1}return M}finally{d=null,p=E,m=!1}}var I=!1,b=null,N=-1,V=5,Z=-1;function q(){return!(e.unstable_now()-ZS||125C?(S.sortIndex=E,t(l,S),r(c)===null&&S===r(l)&&(A?(O(N),N=-1):A=!0,v(R,E-C))):(S.sortIndex=g,t(c,S),w||m||(w=!0,x(j))),S},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(S){var k=p;return function(){var E=p;p=k;try{return S.apply(this,arguments)}finally{p=E}}}})(bF);yF.exports=bF;var Gne=yF.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var wF=z,To=Gne;function et(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v6=Object.prototype.hasOwnProperty,Kne=/^[: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]*$/,l9={},u9={};function Yne(e){return v6.call(u9,e)?!0:v6.call(l9,e)?!1:Kne.test(e)?u9[e]=!0:(l9[e]=!0,!1)}function Jne(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Zne(e,t,r,n){if(t===null||typeof t>"u"||Jne(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Zn(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vn[e]=new Zn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vn[t]=new Zn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vn[e]=new Zn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vn[e]=new Zn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){vn[e]=new Zn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vn[e]=new Zn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vn[e]=new Zn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vn[e]=new Zn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vn[e]=new Zn(e,5,!1,e.toLowerCase(),null,!1,!1)});var EE=/[\-:]([a-z])/g;function CE(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(EE,CE);vn[t]=new Zn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(EE,CE);vn[t]=new Zn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(EE,CE);vn[t]=new Zn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vn[e]=new Zn(e,1,!1,e.toLowerCase(),null,!1,!1)});vn.xlinkHref=new Zn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vn[e]=new Zn(e,1,!1,e.toLowerCase(),null,!0,!0)});function PE(e,t,r,n){var o=vn.hasOwnProperty(t)?vn[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var c=` +`+o[a].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=a&&0<=s);break}}}finally{h_=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Wh(e):""}function Xne(e){switch(e.tag){case 5:return Wh(e.type);case 16:return Wh("Lazy");case 13:return Wh("Suspense");case 19:return Wh("SuspenseList");case 0:case 2:case 15:return e=p_(e.type,!1),e;case 11:return e=p_(e.type.render,!1),e;case 1:return e=p_(e.type,!0),e;default:return""}}function _6(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xu:return"Fragment";case Zu:return"Portal";case y6:return"Profiler";case AE:return"StrictMode";case b6:return"Suspense";case w6:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case SF:return(e.displayName||"Context")+".Consumer";case xF:return(e._context.displayName||"Context")+".Provider";case OE:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case IE:return t=e.displayName||null,t!==null?t:_6(e.type)||"Memo";case zs:t=e._payload,e=e._init;try{return _6(e(t))}catch{}}return null}function Qne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _6(t);case 8:return t===AE?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CF(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eoe(e){var t=CF(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ng(e){e._valueTracker||(e._valueTracker=eoe(e))}function PF(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=CF(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function $v(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function x6(e,t){var r=t.checked;return dr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function d9(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Pc(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function AF(e,t){t=t.checked,t!=null&&PE(e,"checked",t,!1)}function S6(e,t){AF(e,t);var r=Pc(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?E6(e,t.type,r):t.hasOwnProperty("defaultValue")&&E6(e,t.type,Pc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function h9(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function E6(e,t,r){(t!=="number"||$v(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Gh=Array.isArray;function bf(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Bg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var rp={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},toe=["Webkit","ms","Moz","O"];Object.keys(rp).forEach(function(e){toe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rp[t]=rp[e]})});function MF(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||rp.hasOwnProperty(e)&&rp[e]?(""+t).trim():t+"px"}function kF(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=MF(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var roe=dr({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 A6(e,t){if(t){if(roe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(et(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(et(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(et(61))}if(t.style!=null&&typeof t.style!="object")throw Error(et(62))}}function O6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var I6=null;function TE(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var T6=null,wf=null,_f=null;function m9(e){if(e=P0(e)){if(typeof T6!="function")throw Error(et(280));var t=e.stateNode;t&&(t=rw(t),T6(e.stateNode,e.type,t))}}function $F(e){wf?_f?_f.push(e):_f=[e]:wf=e}function DF(){if(wf){var e=wf,t=_f;if(_f=wf=null,m9(e),t)for(e=0;e>>=0,e===0?32:31-(hoe(e)/poe|0)|0}var Fg=64,jg=4194304;function Kh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=Kh(s):(i&=a,i!==0&&(n=Kh(i)))}else a=r&~o,a!==0?n=Kh(a):i!==0&&(n=Kh(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function E0(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ki(t),e[t]=r}function yoe(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=op),C9=String.fromCharCode(32),P9=!1;function ej(e,t){switch(e){case"keyup":return Woe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qu=!1;function Koe(e,t){switch(e){case"compositionend":return tj(t);case"keypress":return t.which!==32?null:(P9=!0,C9);case"textInput":return e=t.data,e===C9&&P9?null:e;default:return null}}function Yoe(e,t){if(Qu)return e==="compositionend"||!FE&&ej(e,t)?(e=XF(),Zm=RE=Js=null,Qu=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=T9(r)}}function ij(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ij(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function aj(){for(var e=window,t=$v();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=$v(e.document)}return t}function jE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function oie(e){var t=aj(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ij(r.ownerDocument.documentElement,r)){if(n!==null&&jE(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=M9(r,i);var a=M9(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ef=null,N6=null,ap=null,B6=!1;function k9(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;B6||ef==null||ef!==$v(n)||(n=ef,"selectionStart"in n&&jE(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}),ap&&Up(ap,n)||(ap=n,n=Lv(N6,"onSelect"),0nf||(e.current=z6[nf],z6[nf]=null,nf--)}function zt(e,t){nf++,z6[nf]=e.current,e.current=t}var Ac={},Bn=Nc(Ac),ao=Nc(!1),ql=Ac;function Nf(e,t){var r=e.type.contextTypes;if(!r)return Ac;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function so(e){return e=e.childContextTypes,e!=null}function Hv(){er(ao),er(Bn)}function j9(e,t,r){if(Bn.current!==Ac)throw Error(et(168));zt(Bn,t),zt(ao,r)}function gj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(et(108,Qne(e)||"Unknown",o));return dr({},r,n)}function zv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ac,ql=Bn.current,zt(Bn,e),zt(ao,ao.current),!0}function L9(e,t,r){var n=e.stateNode;if(!n)throw Error(et(169));r?(e=gj(e,t,ql),n.__reactInternalMemoizedMergedChildContext=e,er(ao),er(Bn),zt(Bn,e)):er(ao),zt(ao,r)}var Ha=null,nw=!1,O_=!1;function mj(e){Ha===null?Ha=[e]:Ha.push(e)}function mie(e){nw=!0,mj(e)}function Bc(){if(!O_&&Ha!==null){O_=!0;var e=0,t=Rt;try{var r=Ha;for(Rt=1;e>=a,o-=a,Wa=1<<32-ki(t)+o|r<N?(V=b,b=null):V=b.sibling;var Z=p(O,b,$[N],R);if(Z===null){b===null&&(b=V);break}e&&b&&Z.alternate===null&&t(O,b),P=i(Z,P,N),I===null?j=Z:I.sibling=Z,I=Z,b=V}if(N===$.length)return r(O,b),nr&&xl(O,N),j;if(b===null){for(;N<$.length;N++)b=d(O,$[N],R),b!==null&&(P=i(b,P,N),I===null?j=b:I.sibling=b,I=b);return nr&&xl(O,N),j}for(b=n(O,b);N<$.length;N++)V=m(b,O,N,$[N],R),V!==null&&(e&&V.alternate!==null&&b.delete(V.key===null?N:V.key),P=i(V,P,N),I===null?j=V:I.sibling=V,I=V);return e&&b.forEach(function(q){return t(O,q)}),nr&&xl(O,N),j}function A(O,P,$,R){var j=Jd($);if(typeof j!="function")throw Error(et(150));if($=j.call($),$==null)throw Error(et(151));for(var I=j=null,b=P,N=P=0,V=null,Z=$.next();b!==null&&!Z.done;N++,Z=$.next()){b.index>N?(V=b,b=null):V=b.sibling;var q=p(O,b,Z.value,R);if(q===null){b===null&&(b=V);break}e&&b&&q.alternate===null&&t(O,b),P=i(q,P,N),I===null?j=q:I.sibling=q,I=q,b=V}if(Z.done)return r(O,b),nr&&xl(O,N),j;if(b===null){for(;!Z.done;N++,Z=$.next())Z=d(O,Z.value,R),Z!==null&&(P=i(Z,P,N),I===null?j=Z:I.sibling=Z,I=Z);return nr&&xl(O,N),j}for(b=n(O,b);!Z.done;N++,Z=$.next())Z=m(b,O,N,Z.value,R),Z!==null&&(e&&Z.alternate!==null&&b.delete(Z.key===null?N:Z.key),P=i(Z,P,N),I===null?j=Z:I.sibling=Z,I=Z);return e&&b.forEach(function(_){return t(O,_)}),nr&&xl(O,N),j}function T(O,P,$,R){if(typeof $=="object"&&$!==null&&$.type===Xu&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case Rg:e:{for(var j=$.key,I=P;I!==null;){if(I.key===j){if(j=$.type,j===Xu){if(I.tag===7){r(O,I.sibling),P=o(I,$.props.children),P.return=O,O=P;break e}}else if(I.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===zs&&G9(j)===I.type){r(O,I.sibling),P=o(I,$.props),P.ref=th(O,I,$),P.return=O,O=P;break e}r(O,I);break}else t(O,I);I=I.sibling}$.type===Xu?(P=jl($.props.children,O.mode,R,$.key),P.return=O,O=P):(R=iv($.type,$.key,$.props,null,O.mode,R),R.ref=th(O,P,$),R.return=O,O=R)}return a(O);case Zu:e:{for(I=$.key;P!==null;){if(P.key===I)if(P.tag===4&&P.stateNode.containerInfo===$.containerInfo&&P.stateNode.implementation===$.implementation){r(O,P.sibling),P=o(P,$.children||[]),P.return=O,O=P;break e}else{r(O,P);break}else t(O,P);P=P.sibling}P=N_($,O.mode,R),P.return=O,O=P}return a(O);case zs:return I=$._init,T(O,P,I($._payload),R)}if(Gh($))return w(O,P,$,R);if(Jd($))return A(O,P,$,R);Wg(O,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,P!==null&&P.tag===6?(r(O,P.sibling),P=o(P,$),P.return=O,O=P):(r(O,P),P=R_($,O.mode,R),P.return=O,O=P),a(O)):r(O,P)}return T}var Ff=Ej(!0),Cj=Ej(!1),A0={},ha=Nc(A0),qp=Nc(A0),Wp=Nc(A0);function Ml(e){if(e===A0)throw Error(et(174));return e}function KE(e,t){switch(zt(Wp,t),zt(qp,e),zt(ha,A0),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:P6(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=P6(t,e)}er(ha),zt(ha,t)}function jf(){er(ha),er(qp),er(Wp)}function Pj(e){Ml(Wp.current);var t=Ml(ha.current),r=P6(t,e.type);t!==r&&(zt(qp,e),zt(ha,r))}function YE(e){qp.current===e&&(er(ha),er(qp))}var cr=Nc(0);function Yv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var I_=[];function JE(){for(var e=0;er?r:4,e(!0);var n=T_.transition;T_.transition={};try{e(!1),t()}finally{Rt=r,T_.transition=n}}function Hj(){return ii().memoizedState}function wie(e,t,r){var n=hc(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},zj(e))Vj(t,r);else if(r=wj(e,t,r,n),r!==null){var o=Gn();$i(r,e,n,o),qj(r,t,n)}}function _ie(e,t,r){var n=hc(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(zj(e))Vj(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Fi(s,a)){var c=t.interleaved;c===null?(o.next=o,WE(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}r=wj(e,t,o,n),r!==null&&(o=Gn(),$i(r,e,n,o),qj(r,t,n))}}function zj(e){var t=e.alternate;return e===ur||t!==null&&t===ur}function Vj(e,t){sp=Jv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function qj(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,kE(e,r)}}var Zv={readContext:oi,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},xie={readContext:oi,useCallback:function(e,t){return ta().memoizedState=[e,t===void 0?null:t],e},useContext:oi,useEffect:Y9,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,tv(4194308,4,Bj.bind(null,t,e),r)},useLayoutEffect:function(e,t){return tv(4194308,4,e,t)},useInsertionEffect:function(e,t){return tv(4,2,e,t)},useMemo:function(e,t){var r=ta();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ta();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=wie.bind(null,ur,e),[n.memoizedState,e]},useRef:function(e){var t=ta();return e={current:e},t.memoizedState=e},useState:K9,useDebugValue:t4,useDeferredValue:function(e){return ta().memoizedState=e},useTransition:function(){var e=K9(!1),t=e[0];return e=bie.bind(null,e[1]),ta().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ur,o=ta();if(nr){if(r===void 0)throw Error(et(407));r=r()}else{if(r=t(),Hr===null)throw Error(et(349));Gl&30||Ij(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,Y9(Mj.bind(null,n,i,e),[e]),n.flags|=2048,Yp(9,Tj.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=ta(),t=Hr.identifierPrefix;if(nr){var r=Ga,n=Wa;r=(n&~(1<<32-ki(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Gp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[ca]=t,e[Vp]=n,eL(e,t,!1,!1),t.stateNode=e;e:{switch(a=O6(r,n),r){case"dialog":Xt("cancel",e),Xt("close",e),o=n;break;case"iframe":case"object":case"embed":Xt("load",e),o=n;break;case"video":case"audio":for(o=0;oUf&&(t.flags|=128,n=!0,rh(i,!1),t.lanes=4194304)}else{if(!n)if(e=Yv(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),rh(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!nr)return En(t),null}else 2*xr()-i.renderingStartTime>Uf&&r!==1073741824&&(t.flags|=128,n=!0,rh(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xr(),t.sibling=null,r=cr.current,zt(cr,n?r&1|2:r&1),t):(En(t),null);case 22:case 23:return s4(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?xo&1073741824&&(En(t),t.subtreeFlags&6&&(t.flags|=8192)):En(t),null;case 24:return null;case 25:return null}throw Error(et(156,t.tag))}function Tie(e,t){switch(UE(t),t.tag){case 1:return so(t.type)&&Hv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jf(),er(ao),er(Bn),JE(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return YE(t),null;case 13:if(er(cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(et(340));Bf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return er(cr),null;case 4:return jf(),null;case 10:return qE(t.type._context),null;case 22:case 23:return s4(),null;case 24:return null;default:return null}}var Kg=!1,Tn=!1,Mie=typeof WeakSet=="function"?WeakSet:Set,ut=null;function cf(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){gr(e,t,n)}else r.current=null}function tx(e,t,r){try{r()}catch(n){gr(e,t,n)}}var oA=!1;function kie(e,t){if(F6=Fv,e=aj(),jE(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,c=-1,l=0,u=0,d=e,p=null;t:for(;;){for(var m;d!==r||o!==0&&d.nodeType!==3||(s=a+o),d!==i||n!==0&&d.nodeType!==3||(c=a+n),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===e)break t;if(p===r&&++l===o&&(s=a),p===i&&++u===n&&(c=a),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(j6={focusedElem:e,selectionRange:r},Fv=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){t=ut;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var A=w.memoizedProps,T=w.memoizedState,O=t.stateNode,P=O.getSnapshotBeforeUpdate(t.elementType===t.type?A:Ei(t.type,A),T);O.__reactInternalSnapshotBeforeUpdate=P}break;case 3:var $=t.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(et(163))}}catch(R){gr(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,ut=e;break}ut=t.return}return w=oA,oA=!1,w}function cp(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&tx(t,r,i)}o=o.next}while(o!==n)}}function aw(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function rx(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function nL(e){var t=e.alternate;t!==null&&(e.alternate=null,nL(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ca],delete t[Vp],delete t[H6],delete t[pie],delete t[gie])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function oL(e){return e.tag===5||e.tag===3||e.tag===4}function iA(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oL(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nx(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Uv));else if(n!==4&&(e=e.child,e!==null))for(nx(e,t,r),e=e.sibling;e!==null;)nx(e,t,r),e=e.sibling}function ox(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ox(e,t,r),e=e.sibling;e!==null;)ox(e,t,r),e=e.sibling}var fn=null,Ci=!1;function Ms(e,t,r){for(r=r.child;r!==null;)iL(e,t,r),r=r.sibling}function iL(e,t,r){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(Xb,r)}catch{}switch(r.tag){case 5:Tn||cf(r,t);case 6:var n=fn,o=Ci;fn=null,Ms(e,t,r),fn=n,Ci=o,fn!==null&&(Ci?(e=fn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):fn.removeChild(r.stateNode));break;case 18:fn!==null&&(Ci?(e=fn,r=r.stateNode,e.nodeType===8?A_(e.parentNode,r):e.nodeType===1&&A_(e,r),jp(e)):A_(fn,r.stateNode));break;case 4:n=fn,o=Ci,fn=r.stateNode.containerInfo,Ci=!0,Ms(e,t,r),fn=n,Ci=o;break;case 0:case 11:case 14:case 15:if(!Tn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&tx(r,t,a),o=o.next}while(o!==n)}Ms(e,t,r);break;case 1:if(!Tn&&(cf(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){gr(r,t,s)}Ms(e,t,r);break;case 21:Ms(e,t,r);break;case 22:r.mode&1?(Tn=(n=Tn)||r.memoizedState!==null,Ms(e,t,r),Tn=n):Ms(e,t,r);break;default:Ms(e,t,r)}}function aA(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Mie),t.forEach(function(n){var o=Uie.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function pi(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=xr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Die(n/1960))-n,10e?16:e,Zs===null)var n=!1;else{if(e=Zs,Zs=null,e1=0,Tt&6)throw Error(et(331));var o=Tt;for(Tt|=4,ut=e.current;ut!==null;){var i=ut,a=i.child;if(ut.flags&16){var s=i.deletions;if(s!==null){for(var c=0;cxr()-i4?Fl(e,0):o4|=r),co(e,t)}function hL(e,t){t===0&&(e.mode&1?(t=jg,jg<<=1,!(jg&130023424)&&(jg=4194304)):t=1);var r=Gn();e=as(e,t),e!==null&&(E0(e,t,r),co(e,r))}function Lie(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),hL(e,r)}function Uie(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(et(314))}n!==null&&n.delete(t),hL(e,r)}var pL;pL=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ao.current)no=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return no=!1,Oie(e,t,r);no=!!(e.flags&131072)}else no=!1,nr&&t.flags&1048576&&vj(t,qv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;rv(e,t),e=t.pendingProps;var o=Nf(t,Bn.current);Sf(t,r),o=XE(null,t,n,e,o,r);var i=QE();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,so(n)?(i=!0,zv(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,GE(t),o.updater=ow,t.stateNode=o,o._reactInternals=t,K6(t,n,e,r),t=Z6(null,t,n,!0,i,r)):(t.tag=0,nr&&i&&LE(t),qn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(rv(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=zie(n),e=Ei(n,e),o){case 0:t=J6(null,t,n,e,r);break e;case 1:t=tA(null,t,n,e,r);break e;case 11:t=Q9(null,t,n,e,r);break e;case 14:t=eA(null,t,n,Ei(n.type,e),r);break e}throw Error(et(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ei(n,o),J6(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ei(n,o),tA(e,t,n,o,r);case 3:e:{if(Zj(t),e===null)throw Error(et(387));n=t.pendingProps,i=t.memoizedState,o=i.element,_j(e,t),Kv(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Lf(Error(et(423)),t),t=rA(e,t,n,r,o);break e}else if(n!==o){o=Lf(Error(et(424)),t),t=rA(e,t,n,r,o);break e}else for(So=uc(t.stateNode.containerInfo.firstChild),Co=t,nr=!0,Oi=null,r=Cj(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bf(),n===o){t=ss(e,t,r);break e}qn(e,t,n,r)}t=t.child}return t;case 5:return Pj(t),e===null&&q6(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,L6(n,o)?a=null:i!==null&&L6(n,i)&&(t.flags|=32),Jj(e,t),qn(e,t,a,r),t.child;case 6:return e===null&&q6(t),null;case 13:return Xj(e,t,r);case 4:return KE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ff(t,null,n,r):qn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ei(n,o),Q9(e,t,n,o,r);case 7:return qn(e,t,t.pendingProps,r),t.child;case 8:return qn(e,t,t.pendingProps.children,r),t.child;case 12:return qn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,zt(Wv,n._currentValue),n._currentValue=a,i!==null)if(Fi(i.value,a)){if(i.children===o.children&&!ao.current){t=ss(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Xa(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),W6(i.return,r,t),s.lanes|=r;break}c=c.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(et(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),W6(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}qn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Sf(t,r),o=oi(o),n=n(o),t.flags|=1,qn(e,t,n,r),t.child;case 14:return n=t.type,o=Ei(n,t.pendingProps),o=Ei(n.type,o),eA(e,t,n,o,r);case 15:return Kj(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Ei(n,o),rv(e,t),t.tag=1,so(n)?(e=!0,zv(t)):e=!1,Sf(t,r),Sj(t,n,o),K6(t,n,o,r),Z6(null,t,n,!0,e,r);case 19:return Qj(e,t,r);case 22:return Yj(e,t,r)}throw Error(et(156,t.tag))};function gL(e,t){return UF(e,t)}function Hie(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 ei(e,t,r,n){return new Hie(e,t,r,n)}function l4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zie(e){if(typeof e=="function")return l4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===OE)return 11;if(e===IE)return 14}return 2}function pc(e,t){var r=e.alternate;return r===null?(r=ei(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function iv(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")l4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Xu:return jl(r.children,o,i,t);case AE:a=8,o|=8;break;case y6:return e=ei(12,r,t,o|2),e.elementType=y6,e.lanes=i,e;case b6:return e=ei(13,r,t,o),e.elementType=b6,e.lanes=i,e;case w6:return e=ei(19,r,t,o),e.elementType=w6,e.lanes=i,e;case EF:return cw(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xF:a=10;break e;case SF:a=9;break e;case OE:a=11;break e;case IE:a=14;break e;case zs:a=16,n=null;break e}throw Error(et(130,e==null?e:typeof e,""))}return t=ei(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function jl(e,t,r,n){return e=ei(7,e,n,t),e.lanes=r,e}function cw(e,t,r,n){return e=ei(22,e,n,t),e.elementType=EF,e.lanes=r,e.stateNode={isHidden:!1},e}function R_(e,t,r){return e=ei(6,e,null,t),e.lanes=r,e}function N_(e,t,r){return t=ei(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vie(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=m_(0),this.expirationTimes=m_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=m_(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function u4(e,t,r,n,o,i,a,s,c){return e=new Vie(e,t,r,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ei(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},GE(i),e}function qie(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bL)}catch(e){console.error(e)}}bL(),vF.exports=Do;var Fc=vF.exports;const av=Hi(Fc);var pA=Fc;m6.createRoot=pA.createRoot,m6.hydrateRoot=pA.hydrateRoot;var Ks=function(){return Ks=Object.assign||function(t){for(var r,n=1,o=arguments.length;n"u")return hae;var t=pae(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},mae=xL(),vae=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),` + .`.concat(Xie,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(s,"px ").concat(n,`; + } + body { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(o,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(sv,` { + right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(cv,` { + margin-right: `).concat(s,"px ").concat(n,`; + } + + .`).concat(sv," .").concat(sv,` { + right: 0 `).concat(n,`; + } + + .`).concat(cv," .").concat(cv,` { + margin-right: 0 `).concat(n,`; + } + + body { + `).concat(Qie,": ").concat(s,`px; + } +`)},yae=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=z.useMemo(function(){return gae(o)},[o]);return z.createElement(mae,{styles:vae(i,!t,o,r?"":"!important")})},lx=!1;if(typeof window<"u")try{var Zg=Object.defineProperty({},"passive",{get:function(){return lx=!0,!0}});window.addEventListener("test",Zg,Zg),window.removeEventListener("test",Zg,Zg)}catch{lx=!1}var ku=lx?{passive:!1}:!1,bae=function(e){return e.tagName==="TEXTAREA"},SL=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bae(e)&&r[t]==="visible")},wae=function(e){return SL(e,"overflowY")},_ae=function(e){return SL(e,"overflowX")},vA=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=EL(e,n);if(o){var i=CL(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},xae=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Sae=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},EL=function(e,t){return e==="v"?wae(t):_ae(t)},CL=function(e,t){return e==="v"?xae(t):Sae(t)},Eae=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cae=function(e,t,r,n,o){var i=Eae(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,c=t.contains(s),l=!1,u=a>0,d=0,p=0;do{var m=CL(e,s),w=m[0],A=m[1],T=m[2],O=A-T-i*w;(w||O)&&EL(e,s)&&(d+=O,p+=w),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(d)<1||!o&&a>d)||!u&&(o&&Math.abs(p)<1||!o&&-a>p))&&(l=!0),l},Xg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yA=function(e){return[e.deltaX,e.deltaY]},bA=function(e){return e&&"current"in e?e.current:e},Pae=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Aae=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Oae=0,$u=[];function Iae(e){var t=z.useRef([]),r=z.useRef([0,0]),n=z.useRef(),o=z.useState(Oae++)[0],i=z.useState(xL)[0],a=z.useRef(e);z.useEffect(function(){a.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var A=Zie([e.lockRef.current],(e.shards||[]).map(bA),!0).filter(Boolean);return A.forEach(function(T){return T.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),A.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(A,T){if("touches"in A&&A.touches.length===2)return!a.current.allowPinchZoom;var O=Xg(A),P=r.current,$="deltaX"in A?A.deltaX:P[0]-O[0],R="deltaY"in A?A.deltaY:P[1]-O[1],j,I=A.target,b=Math.abs($)>Math.abs(R)?"h":"v";if("touches"in A&&b==="h"&&I.type==="range")return!1;var N=vA(b,I);if(!N)return!0;if(N?j=b:(j=b==="v"?"h":"v",N=vA(b,I)),!N)return!1;if(!n.current&&"changedTouches"in A&&($||R)&&(n.current=j),!j)return!0;var V=n.current||j;return Cae(V,T,A,V==="h"?$:R,!0)},[]),c=z.useCallback(function(A){var T=A;if(!(!$u.length||$u[$u.length-1]!==i)){var O="deltaY"in T?yA(T):Xg(T),P=t.current.filter(function(j){return j.name===T.type&&(j.target===T.target||T.target===j.shadowParent)&&Pae(j.delta,O)})[0];if(P&&P.should){T.cancelable&&T.preventDefault();return}if(!P){var $=(a.current.shards||[]).map(bA).filter(Boolean).filter(function(j){return j.contains(T.target)}),R=$.length>0?s(T,$[0]):!a.current.noIsolation;R&&T.cancelable&&T.preventDefault()}}},[]),l=z.useCallback(function(A,T,O,P){var $={name:A,delta:T,target:O,should:P,shadowParent:Tae(O)};t.current.push($),setTimeout(function(){t.current=t.current.filter(function(R){return R!==$})},1)},[]),u=z.useCallback(function(A){r.current=Xg(A),n.current=void 0},[]),d=z.useCallback(function(A){l(A.type,yA(A),A.target,s(A,e.lockRef.current))},[]),p=z.useCallback(function(A){l(A.type,Xg(A),A.target,s(A,e.lockRef.current))},[]);z.useEffect(function(){return $u.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,ku),document.addEventListener("touchmove",c,ku),document.addEventListener("touchstart",u,ku),function(){$u=$u.filter(function(A){return A!==i}),document.removeEventListener("wheel",c,ku),document.removeEventListener("touchmove",c,ku),document.removeEventListener("touchstart",u,ku)}},[]);var m=e.removeScrollBar,w=e.inert;return z.createElement(z.Fragment,null,w?z.createElement(i,{styles:Aae(o)}):null,m?z.createElement(yae,{gapMode:e.gapMode}):null)}function Tae(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Mae=aae(_L,Iae);var PL=z.forwardRef(function(e,t){return z.createElement(hw,Ks({},e,{ref:t,sideCar:Mae}))});PL.classNames=hw.classNames;const kae=PL;function o1(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function $ae(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function Dae(e,t,r){for(let n=e+1;n{var c;r==null||r(s);const l=Array.from(((c=o1(s.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(A=>Rae(s.currentTarget,A,e)),u=l.findIndex(A=>s.currentTarget===A),d=Dae(u,l,n),p=$ae(u,l,n),m=i==="rtl"?p:d,w=i==="rtl"?d:p;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[m].focus(),o&&l[m].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[w].focus(),o&&l[w].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[p].focus(),o&&l[p].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[d].focus(),o&&l[d].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const A=l.length-1;!l[A].disabled&&l[A].focus();break}}}}function Bae(e,t,r){var n;return r?Array.from(((n=o1(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function O0(e){const t=z.createContext(null);return[({children:o,value:i})=>fe.createElement(t.Provider,{value:i},o),()=>{const o=z.useContext(t);if(o===null)throw new Error(e);return o}]}function p4(e){return Array.isArray(e)?e:[e]}const Fae=()=>{};function jae(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||Fae:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function Ka(e,t){return r=>{e==null||e(r),t==null||t(r)}}function Lae(){const[e,t]=z.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function Uae({data:e}){const t=[],r=[],n=e.reduce((o,i,a)=>(i.group?o[i.group]?o[i.group].push(a):o[i.group]=[a]:r.push(a),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(i=>e[i]))}),t.push(...r.map(o=>e[o])),t}function Hae(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const zae=typeof window<"u"?z.useLayoutEffect:z.useEffect;function Vae(e){function t(n){const o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});zae(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>Hae(`${e}:${String(n)}`,o[0])}return[t,r]}function I0(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==fe.Fragment:!1}function AL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var Gae=Object.defineProperty,wA=Object.getOwnPropertySymbols,Kae=Object.prototype.hasOwnProperty,Yae=Object.prototype.propertyIsEnumerable,_A=(e,t,r)=>t in e?Gae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xA=(e,t)=>{for(var r in t||(t={}))Kae.call(t,r)&&_A(e,r,t[r]);if(wA)for(var r of wA(t))Yae.call(t,r)&&_A(e,r,t[r]);return e};function Jae(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:xA({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:xA({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function T0(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function g4(e){const t=T0(e);return(r,n,o=!0,i=!0)=>{if(typeof r=="string"&&r.includes(".")){const[s,c]=r.split("."),l=parseInt(c,10);if(s in e.colors&&l>=0&&l<10)return e.colors[s][typeof n=="number"&&!i?n:l]}const a=typeof n=="number"?n:t();return r in e.colors?e.colors[r][a]:o?e.colors[e.primaryColor][a]:r}}function IL(e){let t="";for(let r=1;r{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function ML(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const xe=ML("rem"),Kn=ML("em");function Ke({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?Kn(e):xe(e):e||t.md}function ai(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function Qae(e){return t=>`@media (min-width: ${Kn(ai(Ke({size:t,sizes:e.breakpoints})))})`}function ese(e){return t=>`@media (max-width: ${Kn(ai(Ke({size:t,sizes:e.breakpoints}))-1)})`}function tse(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function rse(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function nse(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function m4(e){return tse(e)?rse(e):e.startsWith("rgb")?nse(e):{r:0,g:0,b:0,a:1}}function Vu(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=m4(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function ose(e=0){return{position:"absolute",top:xe(e),right:xe(e),left:xe(e),bottom:xe(e)}}function ise(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=m4(e),a=1-t,s=c=>Math.round(c*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function ase(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=m4(e),a=s=>Math.round(s+(255-s)*t);return`rgba(${a(r)}, ${a(n)}, ${a(o)}, ${i})`}function sse(e){return t=>{if(typeof t=="number")return xe(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function cse(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function lse(e){const t=g4(e),r=T0(e),n=TL(e);return({variant:o,color:i,gradient:a,primaryFallback:s})=>{const c=cse(i,e);switch(o){case"light":return{border:"transparent",background:Vu(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Vu(t(i,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Vu(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?Vu(t(i,5,s,!1),.05):Vu(t(i,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,r()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:e.white,border:"transparent",hover:null};default:{const l=r(),u=c.isSplittedColor?c.shade:l,d=c.isSplittedColor?c.key:i;return{border:"transparent",background:t(d,u,s),color:e.white,hover:t(d,u===9?8:u+1)}}}}}function use(e){return t=>{const r=T0(e)(t);return e.colors[e.primaryColor][r]}}function fse(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function dse(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function hse(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const kr={fontStyles:Wae,themeColor:g4,focusStyles:Jae,linearGradient:Zae,radialGradient:Xae,smallerThan:ese,largerThan:Qae,rgba:Vu,cover:ose,darken:ise,lighten:ase,radius:sse,variant:lse,primaryShade:T0,hover:fse,gradient:TL,primaryColor:use,placeholderStyles:dse,dimmed:hse};var pse=Object.defineProperty,gse=Object.defineProperties,mse=Object.getOwnPropertyDescriptors,SA=Object.getOwnPropertySymbols,vse=Object.prototype.hasOwnProperty,yse=Object.prototype.propertyIsEnumerable,EA=(e,t,r)=>t in e?pse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bse=(e,t)=>{for(var r in t||(t={}))vse.call(t,r)&&EA(e,r,t[r]);if(SA)for(var r of SA(t))yse.call(t,r)&&EA(e,r,t[r]);return e},wse=(e,t)=>gse(e,mse(t));function kL(e){return wse(bse({},e),{fn:{fontStyles:kr.fontStyles(e),themeColor:kr.themeColor(e),focusStyles:kr.focusStyles(e),largerThan:kr.largerThan(e),smallerThan:kr.smallerThan(e),radialGradient:kr.radialGradient,linearGradient:kr.linearGradient,gradient:kr.gradient(e),rgba:kr.rgba,cover:kr.cover,lighten:kr.lighten,darken:kr.darken,primaryShade:kr.primaryShade(e),radius:kr.radius(e),variant:kr.variant(e),hover:kr.hover,primaryColor:kr.primaryColor(e),placeholderStyles:kr.placeholderStyles(e),dimmed:kr.dimmed(e)}})}const $L=["xs","sm","md","lg","xl"],_se={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:qae,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},v4=kL(_se),kt=globalThis||void 0||self;function xse(e){if(e.sheet)return e.sheet;for(var t=0;t0?hn(bd,--lo):0,Hf--,Or===10&&(Hf=1,gw--),Or}function Po(){return Or=lo2||Xp(Or)>3?"":" "}function Rse(e,t){for(;--t&&Po()&&!(Or<48||Or>102||Or>57&&Or<65||Or>70&&Or<97););return M0(e,lv()+(t<6&&pa()==32&&Po()==32))}function fx(e){for(;Po();)switch(Or){case e:return lo;case 34:case 39:e!==34&&e!==39&&fx(Or);break;case 40:e===41&&fx(e);break;case 92:Po();break}return lo}function Nse(e,t){for(;Po()&&e+Or!==47+10;)if(e+Or===42+42&&pa()===47)break;return"/*"+M0(t,lo-1)+"*"+pw(e===47?e:Po())}function Bse(e){for(;!Xp(pa());)Po();return M0(e,lo)}function Fse(e){return jL(fv("",null,null,null,[""],e=FL(e),0,[0],e))}function fv(e,t,r,n,o,i,a,s,c){for(var l=0,u=0,d=a,p=0,m=0,w=0,A=1,T=1,O=1,P=0,$="",R=o,j=i,I=n,b=$;T;)switch(w=P,P=Po()){case 40:if(w!=108&&hn(b,d-1)==58){ux(b+=Dt(uv(P),"&","&\f"),"&\f")!=-1&&(O=-1);break}case 34:case 39:case 91:b+=uv(P);break;case 9:case 10:case 13:case 32:b+=Dse(w);break;case 92:b+=Rse(lv()-1,7);continue;case 47:switch(pa()){case 42:case 47:Qg(jse(Nse(Po(),lv()),t,r),c);break;default:b+="/"}break;case 123*A:s[l++]=aa(b)*O;case 125*A:case 59:case 0:switch(P){case 0:case 125:T=0;case 59+u:O==-1&&(b=Dt(b,/\f/g,"")),m>0&&aa(b)-d&&Qg(m>32?PA(b+";",n,r,d-1):PA(Dt(b," ","")+";",n,r,d-2),c);break;case 59:b+=";";default:if(Qg(I=CA(b,t,r,l,u,o,s,$,R=[],j=[],d),i),P===123)if(u===0)fv(b,t,I,I,R,i,d,s,j);else switch(p===99&&hn(b,3)===110?100:p){case 100:case 108:case 109:case 115:fv(e,I,I,n&&Qg(CA(e,I,I,0,0,o,s,$,o,R=[],d),j),o,j,d,s,n?R:j);break;default:fv(b,I,I,I,[""],j,0,s,j)}}l=u=m=0,A=O=1,$=b="",d=a;break;case 58:d=1+aa(b),m=w;default:if(A<1){if(P==123)--A;else if(P==125&&A++==0&&$se()==125)continue}switch(b+=pw(P),P*A){case 38:O=u>0?1:(b+="\f",-1);break;case 44:s[l++]=(aa(b)-1)*O,O=1;break;case 64:pa()===45&&(b+=uv(Po())),p=pa(),u=d=aa($=b+=Bse(lv())),P++;break;case 45:w===45&&aa(b)==2&&(A=0)}}return i}function CA(e,t,r,n,o,i,a,s,c,l,u){for(var d=o-1,p=o===0?i:[""],m=w4(p),w=0,A=0,T=0;w0?p[O]+" "+P:Dt(P,/&\f/g,p[O])))&&(c[T++]=$);return mw(e,t,r,o===0?y4:s,c,l,u)}function jse(e,t,r){return mw(e,t,r,DL,pw(kse()),Zp(e,2,-2),0)}function PA(e,t,r,n){return mw(e,t,r,b4,Zp(e,0,n),Zp(e,n+1,-1),n)}function Cf(e,t){for(var r="",n=w4(e),o=0;o6)switch(hn(e,t+1)){case 109:if(hn(e,t+4)!==45)break;case 102:return Dt(e,/(.+:)(.+)-([^]+)/,"$1"+$t+"$2-$3$1"+i1+(hn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ux(e,"stretch")?UL(Dt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(hn(e,t+1)!==115)break;case 6444:switch(hn(e,aa(e)-3-(~ux(e,"!important")&&10))){case 107:return Dt(e,":",":"+$t)+e;case 101:return Dt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$t+(hn(e,14)===45?"inline-":"")+"box$3$1"+$t+"$2$3$1"+On+"$2box$3")+e}break;case 5936:switch(hn(e,t+11)){case 114:return $t+e+On+Dt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $t+e+On+Dt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $t+e+On+Dt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $t+e+On+e+e}return e}var Kse=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case b4:t.return=UL(t.value,t.length);break;case RL:return Cf([oh(t,{value:Dt(t.value,"@","@"+$t)})],o);case y4:if(t.length)return Mse(t.props,function(i){switch(Tse(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cf([oh(t,{props:[Dt(i,/:(read-\w+)/,":"+i1+"$1")]})],o);case"::placeholder":return Cf([oh(t,{props:[Dt(i,/:(plac\w+)/,":"+$t+"input-$1")]}),oh(t,{props:[Dt(i,/:(plac\w+)/,":"+i1+"$1")]}),oh(t,{props:[Dt(i,/:(plac\w+)/,On+"input-$1")]})],o)}return""})}},Yse=[Kse],HL=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(A){var T=A.getAttribute("data-emotion");T.indexOf(" ")!==-1&&(document.head.appendChild(A),A.setAttribute("data-s",""))})}var o=t.stylisPlugins||Yse,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(A){for(var T=A.getAttribute("data-emotion").split(" "),O=1;O=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var hce={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},pce=/[A-Z]|^ms/g,gce=/_EMO_([^_]+?)_([^]*?)_EMO_/g,KL=function(t){return t.charCodeAt(1)===45},kA=function(t){return t!=null&&typeof t!="boolean"},L_=LL(function(e){return KL(e)?e:e.replace(pce,"-$&").toLowerCase()}),$A=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(gce,function(n,o,i){return sa={name:o,styles:i,next:sa},o})}return hce[t]!==1&&!KL(t)&&typeof r=="number"&&r!==0?r+"px":r};function Qp(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return sa={name:r.name,styles:r.styles,next:sa},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)sa={name:n.name,styles:n.styles,next:sa},n=n.next;var o=r.styles+";";return o}return mce(e,t,r)}case"function":{if(e!==void 0){var i=sa,a=r(e);return sa=i,Qp(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function mce(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot in e?Sce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Oce=(e,t)=>{for(var r in t||(t={}))Pce.call(t,r)&&BA(e,r,t[r]);if(NA)for(var r of NA(t))Ace.call(t,r)&&BA(e,r,t[r]);return e},Ice=(e,t)=>Ece(e,Cce(t));function Tce({theme:e}){return fe.createElement(k0,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Ice(Oce({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function ih(e,t,r,n=xe){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function Mce({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};ih(t,e.shadows,"shadow"),ih(t,e.fontSizes,"font-size"),ih(t,e.radius,"radius"),ih(t,e.spacing,"spacing"),ih(t,e.breakpoints,"breakpoints",Kn),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,i)=>{t[`--mantine-color-${n}-${i}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),fe.createElement(k0,{styles:{":root":t}})}var kce=Object.defineProperty,$ce=Object.defineProperties,Dce=Object.getOwnPropertyDescriptors,FA=Object.getOwnPropertySymbols,Rce=Object.prototype.hasOwnProperty,Nce=Object.prototype.propertyIsEnumerable,jA=(e,t,r)=>t in e?kce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ki=(e,t)=>{for(var r in t||(t={}))Rce.call(t,r)&&jA(e,r,t[r]);if(FA)for(var r of FA(t))Nce.call(t,r)&&jA(e,r,t[r]);return e},U_=(e,t)=>$ce(e,Dce(t));function Bce(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const a=t.headings.sizes?Object.keys(e.headings.sizes).reduce((s,c)=>(s[c]=Ki(Ki({},e.headings.sizes[c]),t.headings.sizes[c]),s),{}):e.headings.sizes;return U_(Ki({},o),{headings:U_(Ki(Ki({},e.headings),t.headings),{sizes:a})})}if(i==="breakpoints"&&t.breakpoints){const a=Ki(Ki({},e.breakpoints),t.breakpoints);return U_(Ki({},o),{breakpoints:Object.fromEntries(Object.entries(a).sort((s,c)=>ai(s[1])-ai(c[1])))})}return o[i]=typeof t[i]=="object"?Ki(Ki({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function Fce(e,t){return kL(Bce(e,t))}function JL(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const jce={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${xe(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Lce(){return fe.createElement(k0,{styles:jce})}var Uce=Object.defineProperty,LA=Object.getOwnPropertySymbols,Hce=Object.prototype.hasOwnProperty,zce=Object.prototype.propertyIsEnumerable,UA=(e,t,r)=>t in e?Uce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fp=(e,t)=>{for(var r in t||(t={}))Hce.call(t,r)&&UA(e,r,t[r]);if(LA)for(var r of LA(t))zce.call(t,r)&&UA(e,r,t[r]);return e};const a1=z.createContext({theme:v4});function Kr(){var e;return((e=z.useContext(a1))==null?void 0:e.theme)||v4}function Vce(e){const t=Kr(),r=n=>{var o,i,a,s;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((i=t.components[n])==null?void 0:i.classNames)||{},variants:(a=t.components[n])==null?void 0:a.variants,sizes:(s=t.components[n])==null?void 0:s.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function ZL(){var e;return(e=z.useContext(a1))==null?void 0:e.emotionCache}function ct(e,t,r){var n;const o=Kr(),i=(n=o.components[e])==null?void 0:n.defaultProps,a=typeof i=="function"?i(o):i;return fp(fp(fp({},t),a),JL(r))}function XL({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:i=!1,children:a}){const s=z.useContext(a1),c=Fce(v4,i?fp(fp({},s.theme),e):e);return fe.createElement(_ce,{theme:c},fe.createElement(a1.Provider,{value:{theme:c,emotionCache:t}},r&&fe.createElement(Lce,null),n&&fe.createElement(Tce,{theme:c}),o&&fe.createElement(Mce,{theme:c}),typeof c.globalStyles=="function"&&fe.createElement(k0,{styles:c.globalStyles(c)}),a))}XL.displayName="@mantine/core/MantineProvider";const QL=z.createContext(null);function qce(){const e=z.useContext(QL);if(!e)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return e}function eU({colorScheme:e,toggleColorScheme:t,children:r}){return fe.createElement(QL.Provider,{value:{colorScheme:e,toggleColorScheme:t}},r)}eU.displayName="@mantine/core/ColorSchemeProvider";const Wce={app:100,modal:200,popover:300,overlay:400,max:9999};function bs(e){return Wce[e]}function Gce(e,t){const r=z.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const Kce=HL({key:"mantine",prepend:!0});function Yce(){return ZL()||Kce}var Jce=Object.defineProperty,HA=Object.getOwnPropertySymbols,Zce=Object.prototype.hasOwnProperty,Xce=Object.prototype.propertyIsEnumerable,zA=(e,t,r)=>t in e?Jce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qce=(e,t)=>{for(var r in t||(t={}))Zce.call(t,r)&&zA(e,r,t[r]);if(HA)for(var r of HA(t))Xce.call(t,r)&&zA(e,r,t[r]);return e};const H_="ref";function ele(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(H_ in r))return{args:e,ref:t};t=r[H_];const n=Qce({},r);return delete n[H_],{args:[n],ref:t}}const{cssFactory:tle}=(()=>{function e(r,n,o){const i=[],a=uce(r,i,o);return i.length<2?o:a+n(i)}function t(r){const{cache:n}=r,o=(...a)=>{const{ref:s,args:c}=ele(a),l=A4(c,n.registered);return GL(n,l,!1),`${n.key}-${l.name}${s===void 0?"":` ${s}`}`};return{css:o,cx:(...a)=>e(n.registered,o,OL(a))}}return{cssFactory:t}})();function tU(){const e=Yce();return Gce(()=>tle({cache:e}),[e])}function rle({cx:e,classes:t,context:r,classNames:n,name:o,cache:i}){const a=r.reduce((s,c)=>(Object.keys(c.classNames).forEach(l=>{typeof s[l]!="string"?s[l]=`${c.classNames[l]}`:s[l]=`${s[l]} ${c.classNames[l]}`}),s),{});return Object.keys(t).reduce((s,c)=>(s[c]=e(t[c],a[c],n!=null&&n[c],Array.isArray(o)?o.filter(Boolean).map(l=>`${(i==null?void 0:i.key)||"mantine"}-${l}-${c}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${c}`:null),s),{})}var nle=Object.defineProperty,VA=Object.getOwnPropertySymbols,ole=Object.prototype.hasOwnProperty,ile=Object.prototype.propertyIsEnumerable,qA=(e,t,r)=>t in e?nle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z_=(e,t)=>{for(var r in t||(t={}))ole.call(t,r)&&qA(e,r,t[r]);if(VA)for(var r of VA(t))ile.call(t,r)&&qA(e,r,t[r]);return e};function gx(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=z_(z_({},e[r]),t[r]):e[r]=z_({},t[r])}),e}function WA(e,t,r,n){const o=i=>typeof i=="function"?i(t,r||{},n):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,a)=>gx(i,a),{}):o(e)}function ale({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((i,a)=>(a.variants&&n in a.variants&&gx(i,a.variants[n](t,r,{variant:n,size:o})),a.sizes&&o in a.sizes&&gx(i,a.sizes[o](t,r,{variant:n,size:o})),i),{})}function ft(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const i=Kr(),a=Vce(o==null?void 0:o.name),s=ZL(),c={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:l,cx:u}=tU(),d=t(i,n,c),p=WA(o==null?void 0:o.styles,i,n,c),m=WA(a,i,n,c),w=ale({ctx:a,theme:i,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),A=Object.fromEntries(Object.keys(d).map(T=>{const O=u({[l(d[T])]:!(o!=null&&o.unstyled)},l(w[T]),l(m[T]),l(p[T]));return[T,O]}));return{classes:rle({cx:u,classes:A,context:a,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:s}),cx:u,theme:i}}return r}function Ii(e){return`___ref-${e||""}`}function rU({styles:e}){const t=Kr();return fe.createElement(k0,{styles:xce(typeof e=="function"?e(t):e)})}var sle=Object.defineProperty,cle=Object.defineProperties,lle=Object.getOwnPropertyDescriptors,GA=Object.getOwnPropertySymbols,ule=Object.prototype.hasOwnProperty,fle=Object.prototype.propertyIsEnumerable,KA=(e,t,r)=>t in e?sle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ah=(e,t)=>{for(var r in t||(t={}))ule.call(t,r)&&KA(e,r,t[r]);if(GA)for(var r of GA(t))fle.call(t,r)&&KA(e,r,t[r]);return e},sh=(e,t)=>cle(e,lle(t));const ch={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${xe(10)})`},transitionProperty:"transform, opacity"},em={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${xe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${xe(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${xe(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${xe(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:sh(ah({},ch),{common:{transformOrigin:"center center"}}),"pop-bottom-left":sh(ah({},ch),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":sh(ah({},ch),{common:{transformOrigin:"bottom right"}}),"pop-top-left":sh(ah({},ch),{common:{transformOrigin:"top left"}}),"pop-top-right":sh(ah({},ch),{common:{transformOrigin:"top right"}})},YA=["mousedown","touchstart"];function dle(e,t,r){const n=z.useRef();return z.useEffect(()=>{const o=i=>{const{target:a}=i??{};if(Array.isArray(r)){const s=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(l=>!!l&&!i.composedPath().includes(l))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||YA).forEach(i=>document.addEventListener(i,o)),()=>{(t||YA).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}function hle({timeout:e=2e3}={}){const[t,r]=z.useState(null),[n,o]=z.useState(!1),[i,a]=z.useState(null),s=u=>{clearTimeout(i),a(setTimeout(()=>o(!1),e)),o(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>s(!0)).catch(d=>r(d)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(i)},error:t,copied:n}}function ple(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function gle(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function mle(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=z.useState(r?t:gle(e,t)),i=z.useRef();return z.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),ple(i.current,a=>o(a.matches))},[e]),n}function gc(e,t,r){return Math.min(Math.max(e,t),r)}const O4=typeof document<"u"?z.useLayoutEffect:z.useEffect;function Mo(e,t){const r=z.useRef(!1);z.useEffect(()=>()=>{r.current=!1},[]),z.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function nU({opened:e,shouldReturnFocus:t=!0}){const r=z.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return Mo(()=>{let o=-1;const i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}const vle=/input|select|textarea|button|object/,oU="a, input, select, textarea, button, object, [tabindex]";function yle(e){return e.style.display==="none"}function ble(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(yle(r))return!1;r=r.parentNode}return!0}function iU(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function mx(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(iU(e));return(vle.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&ble(e)}function aU(e){const t=iU(e);return(Number.isNaN(t)||t>=0)&&mx(e)}function wle(e){return Array.from(e.querySelectorAll(oU)).filter(aU)}function _le(e,t){const r=wle(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const a=r[t.shiftKey?r.length-1:0];a&&a.focus()}function Aw(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function xle(e,t="body > :not(script)"){const r=Aw(),n=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o==null?void 0:o.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const a=o.getAttribute("aria-hidden"),s=o.getAttribute("data-hidden"),c=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),a===null||a==="false"?o.setAttribute("aria-hidden","true"):!s&&!c&&o.setAttribute("data-hidden",a),{node:o,ariaHidden:s||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function Sle(e=!0){const t=z.useRef(),r=z.useRef(null),n=i=>{let a=i.querySelector("[data-autofocus]");if(!a){const s=Array.from(i.querySelectorAll(oU));a=s.find(aU)||s.find(mx)||null,!a&&mx(i)&&(a=i)}a&&a.focus({preventScroll:!0})},o=z.useCallback(i=>{if(e){if(i===null){r.current&&(r.current(),r.current=null);return}r.current=xle(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),t.current=i):t.current=null)}},[e]);return z.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const i=a=>{a.key==="Tab"&&t.current&&_le(t.current,a)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),r.current&&r.current()}},[e]),o}const Ele=e=>(e+1)%1e6;function Cle(){const[,e]=z.useReducer(Ele,0);return e}const Ple=fe["useId".toString()]||(()=>{});function Ale(){const e=Ple();return e?`mantine-${e.replace(/:/g,"")}`:""}function au(e){const t=Ale(),[r,n]=z.useState(t);return O4(()=>{n(Aw())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function e0(e,t,r){z.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Ole(e,t){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function Ile(e){try{return JSON.parse(e)}catch{return e}}function Tle(e,t){const r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage";return function({key:o,defaultValue:i=void 0,getInitialValueInEffect:a=!0,deserialize:s=Ile,serialize:c=l=>Ole(l,t)}){const l=z.useCallback(w=>{if(typeof window>"u"||!(e in window)||window[e]===null||w)return i;const A=window[e].getItem(o);return A!==null?s(A):i},[o,i]),[u,d]=z.useState(l(a)),p=z.useCallback(w=>{w instanceof Function?d(A=>{const T=w(A);return window[e].setItem(o,c(T)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:w(A)}})),T}):(window[e].setItem(o,c(w)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:w}})),d(w))},[o]),m=z.useCallback(()=>{window[e].removeItem(o),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:i}}))},[]);return e0("storage",w=>{var A;w.storageArea===window[e]&&w.key===o&&d(s((A=w.newValue)!=null?A:void 0))}),e0(r,w=>{w.detail.key===o&&d(w.detail.value)}),z.useEffect(()=>{i!==void 0&&u===void 0&&p(i)},[i,u,p]),z.useEffect(()=>{a&&d(l())},[o]),[u===void 0?i:u,p,m]}}function Mle(e){return Tle("localStorage","use-local-storage")(e)}function sU(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function cU(...e){return t=>{e.forEach(r=>sU(r,t))}}function jc(...e){return z.useCallback(cU(...e),e)}function kle(e,t,r="ltr"){const n=z.useRef(),o=z.useRef(!1),i=z.useRef(!1),a=z.useRef(0),[s,c]=z.useState(!1);return z.useEffect(()=>{o.current=!0},[]),z.useEffect(()=>{const l=({x:P,y:$})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(o.current&&n.current){n.current.style.userSelect="none";const R=n.current.getBoundingClientRect();if(R.width&&R.height){const j=gc((P-R.left)/R.width,0,1);e({x:r==="ltr"?j:1-j,y:gc(($-R.top)/R.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",A),document.addEventListener("mouseup",m),document.addEventListener("touchmove",O),document.addEventListener("touchend",m)},d=()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",O),document.removeEventListener("touchend",m)},p=()=>{!i.current&&o.current&&(i.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),c(!0),u())},m=()=>{i.current&&o.current&&(i.current=!1,c(!1),d(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},w=P=>{p(),P.preventDefault(),A(P)},A=P=>l({x:P.clientX,y:P.clientY}),T=P=>{P.cancelable&&P.preventDefault(),p(),O(P)},O=P=>{P.cancelable&&P.preventDefault(),l({x:P.changedTouches[0].clientX,y:P.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",w),n.current.addEventListener("touchstart",T,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",w),n.current.removeEventListener("touchstart",T))}},[r,e]),{ref:n,active:s}}function Jl({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,i]=z.useState(t!==void 0?t:r),a=s=>{i(s),n==null||n(s)};return e!==void 0?[e,n,!0]:[o,a,!1]}function $le({initialValues:e=[],limit:t}){const[{state:r,queue:n},o]=z.useState({state:e.slice(0,t),queue:e.slice(t)});return{state:r,queue:n,add:(...c)=>o(l=>{const u=[...l.state,...l.queue,...c];return{state:u.slice(0,t),queue:u.slice(t)}}),update:c=>o(l=>{const u=c([...l.state,...l.queue]);return{state:u.slice(0,t),queue:u.slice(t)}}),cleanQueue:()=>o(c=>({state:c.state,queue:[]}))}}function $0(e,t){return mle("(prefers-reduced-motion: reduce)",e,t)}const Dle=e=>e<.5?2*e*e:-1+(4-2*e)*e,Rle=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:i})=>{if(!t||!r&&typeof document>"u")return 0;const a=!!r,c=(r||document.body).getBoundingClientRect(),l=t.getBoundingClientRect(),u=d=>l[d]-c[d];if(e==="y"){const d=u("top");if(d===0)return 0;if(n==="start"){const m=d-o;return m<=l.height*(i?0:1)||!i?m:0}const p=a?c.height:window.innerHeight;if(n==="end"){const m=d+o-p+l.height;return m>=-l.height*(i?0:1)||!i?m:0}return n==="center"?d-p/2+l.height/2:0}if(e==="x"){const d=u("left");if(d===0)return 0;if(n==="start"){const m=d-o;return m<=l.width||!i?m:0}const p=a?c.width:window.innerWidth;if(n==="end"){const m=d+o-p+l.width;return m>=-l.width||!i?m:0}return n==="center"?d-p/2+l.width/2:0}return 0},Nle=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},Ble=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:i}=document;o[n]=r,i[n]=r}};function Fle({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=Dle,offset:o=0,cancelable:i=!0,isList:a=!1}={}){const s=z.useRef(0),c=z.useRef(0),l=z.useRef(!1),u=z.useRef(null),d=z.useRef(null),p=$0(),m=()=>{s.current&&cancelAnimationFrame(s.current)},w=z.useCallback(({alignment:T="start"}={})=>{var O;l.current=!1,s.current&&m();const P=(O=Nle({parent:u.current,axis:t}))!=null?O:0,$=Rle({parent:u.current,target:d.current,axis:t,alignment:T,offset:o,isList:a})-(u.current?0:P);function R(){c.current===0&&(c.current=performance.now());const I=performance.now()-c.current,b=p||e===0?1:I/e,N=P+$*n(b);Ble({parent:u.current,axis:t,distance:N}),!l.current&&b<1?s.current=requestAnimationFrame(R):(typeof r=="function"&&r(),c.current=0,s.current=0,m())}R()},[t,e,n,a,o,r,p]),A=()=>{i&&(l.current=!0)};return e0("wheel",A,{passive:!0}),e0("touchmove",A,{passive:!0}),z.useEffect(()=>m,[]),{scrollableRef:u,targetRef:d,scrollIntoView:w,cancel:m}}var jle=Object.defineProperty,Lle=Object.defineProperties,Ule=Object.getOwnPropertyDescriptors,JA=Object.getOwnPropertySymbols,Hle=Object.prototype.hasOwnProperty,zle=Object.prototype.propertyIsEnumerable,ZA=(e,t,r)=>t in e?jle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vle=(e,t)=>{for(var r in t||(t={}))Hle.call(t,r)&&ZA(e,r,t[r]);if(JA)for(var r of JA(t))zle.call(t,r)&&ZA(e,r,t[r]);return e},qle=(e,t)=>Lle(e,Ule(t));function Wle(e){const t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return qle(Vle({},r),{key:o})}function Gle(e,t){const{alt:r,ctrl:n,meta:o,mod:i,shift:a,key:s}=e,{altKey:c,ctrlKey:l,metaKey:u,shiftKey:d,key:p}=t;if(r!==c)return!1;if(i){if(!l&&!u)return!1}else if(n!==l||o!==u)return!1;return a!==d?!1:!!(s&&(p.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}function Kle(e){return t=>Gle(Wle(e),t)}function Yle(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function Jle(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){z.useEffect(()=>{const n=o=>{e.forEach(([i,a,s={preventDefault:!0}])=>{Kle(i)(o)&&Yle(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}function XA(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,r=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return t.test(e)?"macos":n.test(e)?"ios":r.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function Zle(e={getValueInEffect:!0}){const[t,r]=z.useState(e.getValueInEffect?"undetermined":XA());return O4(()=>{e.getValueInEffect&&r(XA)},[]),t}function lU(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,i]=z.useState(e),a=z.useCallback(()=>{i(l=>l||(r==null||r(),!0))},[r]),s=z.useCallback(()=>{i(l=>l&&(n==null||n(),!1))},[n]),c=z.useCallback(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:c}]}var QA=Object.getOwnPropertySymbols,Xle=Object.prototype.hasOwnProperty,Qle=Object.prototype.propertyIsEnumerable,eue=(e,t)=>{var r={};for(var n in e)Xle.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&QA)for(var n of QA(e))t.indexOf(n)<0&&Qle.call(e,n)&&(r[n]=e[n]);return r};function wd(e){const t=e,{m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:c,p:l,px:u,py:d,pt:p,pb:m,pl:w,pr:A,bg:T,c:O,opacity:P,ff:$,fz:R,fw:j,lts:I,ta:b,lh:N,fs:V,tt:Z,td:q,w:_,miw:y,maw:f,h,mih:x,mah:v,bgsz:S,bgp:k,bgr:E,bga:C,pos:g,top:M,left:re,bottom:W,right:ee,inset:ce,display:ie}=t,le=eue(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:JL({m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:c,p:l,px:u,py:d,pt:p,pb:m,pl:w,pr:A,bg:T,c:O,opacity:P,ff:$,fz:R,fw:j,lts:I,ta:b,lh:N,fs:V,tt:Z,td:q,w:_,miw:y,maw:f,h,mih:x,mah:v,bgsz:S,bgp:k,bgr:E,bga:C,pos:g,top:M,left:re,bottom:W,right:ee,inset:ce,display:ie}),rest:le}}function tue(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>ai(Ke({size:n,sizes:t.breakpoints}))-ai(Ke({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function rue({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return tue(e,t).reduce((a,s)=>{if(s==="base"&&e.base!==void 0){const l=r(e.base,t);return Array.isArray(n)?(n.forEach(u=>{a[u]=l}),a):(a[n]=l,a)}const c=r(e[s],t);return Array.isArray(n)?(a[t.fn.largerThan(s)]={},n.forEach(l=>{a[t.fn.largerThan(s)][l]=c}),a):(a[t.fn.largerThan(s)]={[n]:c},a)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((i,a)=>(i[a]=o,i),{}):{[n]:o}}function nue(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function oue(e){return xe(e)}function iue(e){return e}function aue(e,t){return Ke({size:e,sizes:t.fontSizes})}const sue=["-xs","-sm","-md","-lg","-xl"];function cue(e,t){return sue.includes(e)?`calc(${Ke({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Ke({size:e,sizes:t.spacing})}const lue={identity:iue,color:nue,size:oue,fontSize:aue,spacing:cue},uue={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var fue=Object.defineProperty,e7=Object.getOwnPropertySymbols,due=Object.prototype.hasOwnProperty,hue=Object.prototype.propertyIsEnumerable,t7=(e,t,r)=>t in e?fue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,r7=(e,t)=>{for(var r in t||(t={}))due.call(t,r)&&t7(e,r,t[r]);if(e7)for(var r of e7(t))hue.call(t,r)&&t7(e,r,t[r]);return e};function n7(e,t,r=uue){return Object.keys(r).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(rue({value:e[i],getValue:lue[r[i].type],property:r[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(a=>{typeof i[a]=="object"&&i[a]!==null&&a in o?o[a]=r7(r7({},o[a]),i[a]):o[a]=i[a]}),o),{})}function o7(e,t){return typeof e=="function"?e(t):e}function pue(e,t,r){const n=Kr(),{css:o,cx:i}=tU();return Array.isArray(e)?i(r,o(n7(t,n)),e.map(a=>o(o7(a,n)))):i(r,o(o7(e,n)),o(n7(t,n)))}var gue=Object.defineProperty,s1=Object.getOwnPropertySymbols,uU=Object.prototype.hasOwnProperty,fU=Object.prototype.propertyIsEnumerable,i7=(e,t,r)=>t in e?gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mue=(e,t)=>{for(var r in t||(t={}))uU.call(t,r)&&i7(e,r,t[r]);if(s1)for(var r of s1(t))fU.call(t,r)&&i7(e,r,t[r]);return e},vue=(e,t)=>{var r={};for(var n in e)uU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&s1)for(var n of s1(e))t.indexOf(n)<0&&fU.call(e,n)&&(r[n]=e[n]);return r};const dU=z.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:i,sx:a}=r,s=vue(r,["className","component","style","sx"]);const{systemStyles:c,rest:l}=wd(s),u=o||"div";return fe.createElement(u,mue({ref:t,className:pue(a,c,n),style:i},l))});dU.displayName="@mantine/core/Box";const at=dU;var yue=Object.defineProperty,bue=Object.defineProperties,wue=Object.getOwnPropertyDescriptors,a7=Object.getOwnPropertySymbols,_ue=Object.prototype.hasOwnProperty,xue=Object.prototype.propertyIsEnumerable,s7=(e,t,r)=>t in e?yue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c7=(e,t)=>{for(var r in t||(t={}))_ue.call(t,r)&&s7(e,r,t[r]);if(a7)for(var r of a7(t))xue.call(t,r)&&s7(e,r,t[r]);return e},Sue=(e,t)=>bue(e,wue(t)),Eue=ft(e=>({root:Sue(c7(c7({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Cue=Eue;var Pue=Object.defineProperty,c1=Object.getOwnPropertySymbols,hU=Object.prototype.hasOwnProperty,pU=Object.prototype.propertyIsEnumerable,l7=(e,t,r)=>t in e?Pue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Aue=(e,t)=>{for(var r in t||(t={}))hU.call(t,r)&&l7(e,r,t[r]);if(c1)for(var r of c1(t))pU.call(t,r)&&l7(e,r,t[r]);return e},Oue=(e,t)=>{var r={};for(var n in e)hU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&c1)for(var n of c1(e))t.indexOf(n)<0&&pU.call(e,n)&&(r[n]=e[n]);return r};const gU=z.forwardRef((e,t)=>{const r=ct("UnstyledButton",{},e),{className:n,component:o="button",unstyled:i,variant:a}=r,s=Oue(r,["className","component","unstyled","variant"]),{classes:c,cx:l}=Cue(null,{name:"UnstyledButton",unstyled:i,variant:a});return fe.createElement(at,Aue({component:o,ref:t,className:l(c.root,n),type:o==="button"?"button":void 0},s))});gU.displayName="@mantine/core/UnstyledButton";const D0=gU;var Iue=Object.defineProperty,Tue=Object.defineProperties,Mue=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertySymbols,mU=Object.prototype.hasOwnProperty,vU=Object.prototype.propertyIsEnumerable,u7=(e,t,r)=>t in e?Iue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yc=(e,t)=>{for(var r in t||(t={}))mU.call(t,r)&&u7(e,r,t[r]);if(l1)for(var r of l1(t))vU.call(t,r)&&u7(e,r,t[r]);return e},V_=(e,t)=>Tue(e,Mue(t)),kue=(e,t)=>{var r={};for(var n in e)mU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&l1)for(var n of l1(e))t.indexOf(n)<0&&vU.call(e,n)&&(r[n]=e[n]);return r};function $ue(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function q_(e){return e!=null&&e.current?e.current.scrollHeight:"auto"}const tm=typeof window<"u"&&window.requestAnimationFrame;function Due({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){const o=z.useRef(null),i=0,a={display:"none",height:0,overflow:"hidden"},[s,c]=z.useState(n?{}:a),l=w=>{Fc.flushSync(()=>c(w))},u=w=>{l(A=>Yc(Yc({},A),w))};function d(w){return{transition:`height ${e||$ue(w)}ms ${t}`}}Mo(()=>{tm(n?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),tm(()=>{const w=q_(o);u(V_(Yc({},d(w)),{height:w}))})}:()=>{const w=q_(o);u(V_(Yc({},d(w)),{willChange:"height",height:w})),tm(()=>u({height:i,overflow:"hidden"}))})},[n]);const p=w=>{if(!(w.target!==o.current||w.propertyName!=="height"))if(n){const A=q_(o);A===s.height?l({}):u({height:A}),r()}else s.height===i&&(l(a),r())};function m(w={}){var A=w,{style:T={},refKey:O="ref"}=A,P=kue(A,["style","refKey"]);const $=P[O];return V_(Yc({"aria-hidden":!n},P),{[O]:cU(o,$),onTransitionEnd:p,style:Yc(Yc({boxSizing:"border-box"},T),s)})}return m}var Rue=Object.defineProperty,u1=Object.getOwnPropertySymbols,yU=Object.prototype.hasOwnProperty,bU=Object.prototype.propertyIsEnumerable,f7=(e,t,r)=>t in e?Rue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rm=(e,t)=>{for(var r in t||(t={}))yU.call(t,r)&&f7(e,r,t[r]);if(u1)for(var r of u1(t))bU.call(t,r)&&f7(e,r,t[r]);return e},Nue=(e,t)=>{var r={};for(var n in e)yU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&u1)for(var n of u1(e))t.indexOf(n)<0&&bU.call(e,n)&&(r[n]=e[n]);return r};const Bue={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},wU=z.forwardRef((e,t)=>{const r=ct("Collapse",Bue,e),{children:n,in:o,transitionDuration:i,transitionTimingFunction:a,style:s,onTransitionEnd:c,animateOpacity:l}=r,u=Nue(r,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),d=Kr(),p=$0(),w=(d.respectReducedMotion?p:!1)?0:i,{systemStyles:A,rest:T}=wd(u),O=Due({opened:o,transitionDuration:w,transitionTimingFunction:a,onTransitionEnd:c});return w===0?o?fe.createElement(at,rm({},T),n):null:fe.createElement(at,rm({},O(rm(rm({style:s,ref:t},T),A))),fe.createElement("div",{style:{opacity:o||!l?1:0,transition:l?`opacity ${w}ms ${a}`:"none"}},n))});wU.displayName="@mantine/core/Collapse";var Fue=Object.defineProperty,jue=Object.defineProperties,Lue=Object.getOwnPropertyDescriptors,d7=Object.getOwnPropertySymbols,Uue=Object.prototype.hasOwnProperty,Hue=Object.prototype.propertyIsEnumerable,h7=(e,t,r)=>t in e?Fue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vx=(e,t)=>{for(var r in t||(t={}))Uue.call(t,r)&&h7(e,r,t[r]);if(d7)for(var r of d7(t))Hue.call(t,r)&&h7(e,r,t[r]);return e},p7=(e,t)=>jue(e,Lue(t));const zue=["subtle","filled","outline","light","default","transparent","gradient"],nm={xs:xe(18),sm:xe(22),md:xe(28),lg:xe(34),xl:xe(44)};function Vue({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:zue.includes(e)?vx({border:`${xe(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var que=ft((e,{radius:t,color:r,gradient:n},{variant:o,size:i})=>({root:p7(vx({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Ke({size:i,sizes:nm}),minHeight:Ke({size:i,sizes:nm}),width:Ke({size:i,sizes:nm}),minWidth:Ke({size:i,sizes:nm})},Vue({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":p7(vx({content:'""'},e.fn.cover(xe(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const Wue=que;var Gue=Object.defineProperty,f1=Object.getOwnPropertySymbols,_U=Object.prototype.hasOwnProperty,xU=Object.prototype.propertyIsEnumerable,g7=(e,t,r)=>t in e?Gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m7=(e,t)=>{for(var r in t||(t={}))_U.call(t,r)&&g7(e,r,t[r]);if(f1)for(var r of f1(t))xU.call(t,r)&&g7(e,r,t[r]);return e},v7=(e,t)=>{var r={};for(var n in e)_U.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&f1)for(var n of f1(e))t.indexOf(n)<0&&xU.call(e,n)&&(r[n]=e[n]);return r};function Kue(e){var t=e,{size:r,color:n}=t,o=v7(t,["size","color"]);const i=o,{style:a}=i,s=v7(i,["style"]);return fe.createElement("svg",m7({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:m7({width:r},a)},s),fe.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},fe.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},fe.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},fe.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},fe.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},fe.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Yue=Object.defineProperty,d1=Object.getOwnPropertySymbols,SU=Object.prototype.hasOwnProperty,EU=Object.prototype.propertyIsEnumerable,y7=(e,t,r)=>t in e?Yue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b7=(e,t)=>{for(var r in t||(t={}))SU.call(t,r)&&y7(e,r,t[r]);if(d1)for(var r of d1(t))EU.call(t,r)&&y7(e,r,t[r]);return e},w7=(e,t)=>{var r={};for(var n in e)SU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&d1)for(var n of d1(e))t.indexOf(n)<0&&EU.call(e,n)&&(r[n]=e[n]);return r};function Jue(e){var t=e,{size:r,color:n}=t,o=w7(t,["size","color"]);const i=o,{style:a}=i,s=w7(i,["style"]);return fe.createElement("svg",b7({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:b7({width:r,height:r},a)},s),fe.createElement("g",{fill:"none",fillRule:"evenodd"},fe.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},fe.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),fe.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},fe.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Zue=Object.defineProperty,h1=Object.getOwnPropertySymbols,CU=Object.prototype.hasOwnProperty,PU=Object.prototype.propertyIsEnumerable,_7=(e,t,r)=>t in e?Zue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x7=(e,t)=>{for(var r in t||(t={}))CU.call(t,r)&&_7(e,r,t[r]);if(h1)for(var r of h1(t))PU.call(t,r)&&_7(e,r,t[r]);return e},S7=(e,t)=>{var r={};for(var n in e)CU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&h1)for(var n of h1(e))t.indexOf(n)<0&&PU.call(e,n)&&(r[n]=e[n]);return r};function Xue(e){var t=e,{size:r,color:n}=t,o=S7(t,["size","color"]);const i=o,{style:a}=i,s=S7(i,["style"]);return fe.createElement("svg",x7({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:x7({width:r},a)},s),fe.createElement("circle",{cx:"15",cy:"15",r:"15"},fe.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},fe.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),fe.createElement("circle",{cx:"105",cy:"15",r:"15"},fe.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),fe.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Que=Object.defineProperty,p1=Object.getOwnPropertySymbols,AU=Object.prototype.hasOwnProperty,OU=Object.prototype.propertyIsEnumerable,E7=(e,t,r)=>t in e?Que(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,efe=(e,t)=>{for(var r in t||(t={}))AU.call(t,r)&&E7(e,r,t[r]);if(p1)for(var r of p1(t))OU.call(t,r)&&E7(e,r,t[r]);return e},tfe=(e,t)=>{var r={};for(var n in e)AU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&p1)for(var n of p1(e))t.indexOf(n)<0&&OU.call(e,n)&&(r[n]=e[n]);return r};const W_={bars:Kue,oval:Jue,dots:Xue},rfe={xs:xe(18),sm:xe(22),md:xe(36),lg:xe(44),xl:xe(58)},nfe={size:"md"};function Zl(e){const t=ct("Loader",nfe,e),{size:r,color:n,variant:o}=t,i=tfe(t,["size","color","variant"]),a=Kr(),s=o in W_?o:a.loader;return fe.createElement(at,efe({role:"presentation",component:W_[s]||W_.bars,size:Ke({size:r,sizes:rfe}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},i))}Zl.displayName="@mantine/core/Loader";var ofe=Object.defineProperty,g1=Object.getOwnPropertySymbols,IU=Object.prototype.hasOwnProperty,TU=Object.prototype.propertyIsEnumerable,C7=(e,t,r)=>t in e?ofe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P7=(e,t)=>{for(var r in t||(t={}))IU.call(t,r)&&C7(e,r,t[r]);if(g1)for(var r of g1(t))TU.call(t,r)&&C7(e,r,t[r]);return e},ife=(e,t)=>{var r={};for(var n in e)IU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&g1)for(var n of g1(e))t.indexOf(n)<0&&TU.call(e,n)&&(r[n]=e[n]);return r};const afe={color:"gray",size:"md",variant:"subtle"},MU=z.forwardRef((e,t)=>{const r=ct("ActionIcon",afe,e),{className:n,color:o,children:i,radius:a,size:s,variant:c,gradient:l,disabled:u,loaderProps:d,loading:p,unstyled:m,__staticSelector:w}=r,A=ife(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:T,cx:O,theme:P}=Wue({radius:a,color:o,gradient:l},{name:["ActionIcon",w],unstyled:m,size:s,variant:c}),$=fe.createElement(Zl,P7({color:P.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},d));return fe.createElement(D0,P7({className:O(T.root,n),ref:t,disabled:u,"data-disabled":u||void 0,"data-loading":p||void 0,unstyled:m},A),p?$:i)});MU.displayName="@mantine/core/ActionIcon";const m1=MU;var sfe=Object.defineProperty,cfe=Object.defineProperties,lfe=Object.getOwnPropertyDescriptors,v1=Object.getOwnPropertySymbols,kU=Object.prototype.hasOwnProperty,$U=Object.prototype.propertyIsEnumerable,A7=(e,t,r)=>t in e?sfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ufe=(e,t)=>{for(var r in t||(t={}))kU.call(t,r)&&A7(e,r,t[r]);if(v1)for(var r of v1(t))$U.call(t,r)&&A7(e,r,t[r]);return e},ffe=(e,t)=>cfe(e,lfe(t)),dfe=(e,t)=>{var r={};for(var n in e)kU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&v1)for(var n of v1(e))t.indexOf(n)<0&&$U.call(e,n)&&(r[n]=e[n]);return r};function I4(e){const t=ct("Portal",{},e),{children:r,target:n,className:o,innerRef:i}=t,a=dfe(t,["children","target","className","innerRef"]),s=Kr(),[c,l]=z.useState(!1),u=z.useRef();return O4(()=>(l(!0),u.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(u.current),()=>{!n&&document.body.removeChild(u.current)}),[n]),c?Fc.createPortal(fe.createElement("div",ffe(ufe({className:o,dir:s.dir},a),{ref:i}),r),u.current):null}I4.displayName="@mantine/core/Portal";var hfe=Object.defineProperty,y1=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,RU=Object.prototype.propertyIsEnumerable,O7=(e,t,r)=>t in e?hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pfe=(e,t)=>{for(var r in t||(t={}))DU.call(t,r)&&O7(e,r,t[r]);if(y1)for(var r of y1(t))RU.call(t,r)&&O7(e,r,t[r]);return e},gfe=(e,t)=>{var r={};for(var n in e)DU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&y1)for(var n of y1(e))t.indexOf(n)<0&&RU.call(e,n)&&(r[n]=e[n]);return r};function R0(e){var t=e,{withinPortal:r=!0,children:n}=t,o=gfe(t,["withinPortal","children"]);return r?fe.createElement(I4,pfe({},o),n):fe.createElement(fe.Fragment,null,n)}R0.displayName="@mantine/core/OptionalPortal";var mfe=Object.defineProperty,vfe=Object.defineProperties,yfe=Object.getOwnPropertyDescriptors,I7=Object.getOwnPropertySymbols,bfe=Object.prototype.hasOwnProperty,wfe=Object.prototype.propertyIsEnumerable,T7=(e,t,r)=>t in e?mfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G_=(e,t)=>{for(var r in t||(t={}))bfe.call(t,r)&&T7(e,r,t[r]);if(I7)for(var r of I7(t))wfe.call(t,r)&&T7(e,r,t[r]);return e},M7=(e,t)=>vfe(e,yfe(t));function _fe({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var xfe=ft((e,{radius:t,color:r},{variant:n})=>({root:G_(M7(G_({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${xe(1)} solid transparent`}),_fe({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:xe(20),height:xe(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:M7(G_({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:xe(10),height:xe(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const Sfe=xfe;var Efe=Object.defineProperty,b1=Object.getOwnPropertySymbols,NU=Object.prototype.hasOwnProperty,BU=Object.prototype.propertyIsEnumerable,k7=(e,t,r)=>t in e?Efe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$7=(e,t)=>{for(var r in t||(t={}))NU.call(t,r)&&k7(e,r,t[r]);if(b1)for(var r of b1(t))BU.call(t,r)&&k7(e,r,t[r]);return e},Cfe=(e,t)=>{var r={};for(var n in e)NU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&b1)for(var n of b1(e))t.indexOf(n)<0&&BU.call(e,n)&&(r[n]=e[n]);return r};function FU(e){const t=e,{width:r,height:n,style:o}=t,i=Cfe(t,["width","height","style"]);return fe.createElement("svg",$7({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:$7({width:r,height:n},o)},i),fe.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}FU.displayName="@mantine/core/CloseIcon";var Pfe=Object.defineProperty,w1=Object.getOwnPropertySymbols,jU=Object.prototype.hasOwnProperty,LU=Object.prototype.propertyIsEnumerable,D7=(e,t,r)=>t in e?Pfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Afe=(e,t)=>{for(var r in t||(t={}))jU.call(t,r)&&D7(e,r,t[r]);if(w1)for(var r of w1(t))LU.call(t,r)&&D7(e,r,t[r]);return e},Ofe=(e,t)=>{var r={};for(var n in e)jU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&w1)for(var n of w1(e))t.indexOf(n)<0&&LU.call(e,n)&&(r[n]=e[n]);return r};const Ife={xs:xe(12),sm:xe(16),md:xe(20),lg:xe(28),xl:xe(34)},Tfe={size:"sm"},UU=z.forwardRef((e,t)=>{const r=ct("CloseButton",Tfe,e),{iconSize:n,size:o,children:i}=r,a=Ofe(r,["iconSize","size","children"]),s=xe(n||Ife[o]);return fe.createElement(m1,Afe({ref:t,__staticSelector:"CloseButton",size:o},a),i||fe.createElement(FU,{width:s,height:s}))});UU.displayName="@mantine/core/CloseButton";const Ow=UU;var Mfe=Object.defineProperty,_1=Object.getOwnPropertySymbols,HU=Object.prototype.hasOwnProperty,zU=Object.prototype.propertyIsEnumerable,R7=(e,t,r)=>t in e?Mfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kfe=(e,t)=>{for(var r in t||(t={}))HU.call(t,r)&&R7(e,r,t[r]);if(_1)for(var r of _1(t))zU.call(t,r)&&R7(e,r,t[r]);return e},$fe=(e,t)=>{var r={};for(var n in e)HU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_1)for(var n of _1(e))t.indexOf(n)<0&&zU.call(e,n)&&(r[n]=e[n]);return r};const Dfe={variant:"light"},T4=z.forwardRef((e,t)=>{const r=ct("Alert",Dfe,e),{id:n,className:o,title:i,variant:a,children:s,color:c,classNames:l,icon:u,styles:d,onClose:p,radius:m,withCloseButton:w,closeButtonLabel:A,unstyled:T}=r,O=$fe(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:P,cx:$}=Sfe({color:c,radius:m},{classNames:l,styles:d,unstyled:T,variant:a,name:"Alert"}),R=au(n),j=i&&`${R}-title`,I=`${R}-body`;return fe.createElement(at,kfe({id:R,role:"alert","aria-labelledby":j,"aria-describedby":I,className:$(P.root,P[a],o),ref:t},O),fe.createElement("div",{className:P.wrapper},u&&fe.createElement("div",{className:P.icon},u),fe.createElement("div",{className:P.body},i&&fe.createElement("div",{className:P.title,"data-with-close-button":w||void 0},fe.createElement("span",{id:j,className:P.label},i)),fe.createElement("div",{id:I,className:P.message},s)),w&&fe.createElement(Ow,{className:P.closeButton,onClick:p,variant:"transparent",size:16,iconSize:16,"aria-label":A})))});T4.displayName="@mantine/core/Alert";var Rfe=Object.defineProperty,Nfe=Object.defineProperties,Bfe=Object.getOwnPropertyDescriptors,N7=Object.getOwnPropertySymbols,Ffe=Object.prototype.hasOwnProperty,jfe=Object.prototype.propertyIsEnumerable,B7=(e,t,r)=>t in e?Rfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,om=(e,t)=>{for(var r in t||(t={}))Ffe.call(t,r)&&B7(e,r,t[r]);if(N7)for(var r of N7(t))jfe.call(t,r)&&B7(e,r,t[r]);return e},Lfe=(e,t)=>Nfe(e,Bfe(t));function Ufe({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function Hfe({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function zfe(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function Vfe({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var qfe=ft((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:i,underline:a,gradient:s,weight:c,transform:l,align:u,strikethrough:d,italic:p},{size:m})=>{const w=e.fn.variant({variant:"gradient",gradient:s});return{root:Lfe(om(om(om(om({},e.fn.fontStyles()),e.fn.focusStyles()),zfe(r)),Vfe({theme:e,truncate:n})),{color:Hfe({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||m===void 0?"inherit":Ke({size:m,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:Ufe({underline:a,strikethrough:d}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:l,textAlign:u,fontStyle:p?"italic":void 0}),gradient:{backgroundImage:w.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const Wfe=qfe;var Gfe=Object.defineProperty,x1=Object.getOwnPropertySymbols,VU=Object.prototype.hasOwnProperty,qU=Object.prototype.propertyIsEnumerable,F7=(e,t,r)=>t in e?Gfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kfe=(e,t)=>{for(var r in t||(t={}))VU.call(t,r)&&F7(e,r,t[r]);if(x1)for(var r of x1(t))qU.call(t,r)&&F7(e,r,t[r]);return e},Yfe=(e,t)=>{var r={};for(var n in e)VU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&x1)for(var n of x1(e))t.indexOf(n)<0&&qU.call(e,n)&&(r[n]=e[n]);return r};const Jfe={variant:"text"},WU=z.forwardRef((e,t)=>{const r=ct("Text",Jfe,e),{className:n,size:o,weight:i,transform:a,color:s,align:c,variant:l,lineClamp:u,truncate:d,gradient:p,inline:m,inherit:w,underline:A,strikethrough:T,italic:O,classNames:P,styles:$,unstyled:R,span:j,__staticSelector:I}=r,b=Yfe(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:N,cx:V}=Wfe({color:s,lineClamp:u,truncate:d,inline:m,inherit:w,underline:A,strikethrough:T,italic:O,weight:i,transform:a,align:c,gradient:p},{unstyled:R,name:I||"Text",variant:l,size:o});return fe.createElement(at,Kfe({ref:t,className:V(N.root,{[N.gradient]:l==="gradient"},n),component:j?"span":"div"},b))});WU.displayName="@mantine/core/Text";const St=WU;var Zfe=Object.defineProperty,j7=Object.getOwnPropertySymbols,Xfe=Object.prototype.hasOwnProperty,Qfe=Object.prototype.propertyIsEnumerable,L7=(e,t,r)=>t in e?Zfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ede=(e,t)=>{for(var r in t||(t={}))Xfe.call(t,r)&&L7(e,r,t[r]);if(j7)for(var r of j7(t))Qfe.call(t,r)&&L7(e,r,t[r]);return e};function tde({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var rde=ft((e,{color:t,underline:r})=>({root:ede({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:tde({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const nde=rde;var ode=Object.defineProperty,S1=Object.getOwnPropertySymbols,GU=Object.prototype.hasOwnProperty,KU=Object.prototype.propertyIsEnumerable,U7=(e,t,r)=>t in e?ode(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H7=(e,t)=>{for(var r in t||(t={}))GU.call(t,r)&&U7(e,r,t[r]);if(S1)for(var r of S1(t))KU.call(t,r)&&U7(e,r,t[r]);return e},ide=(e,t)=>{var r={};for(var n in e)GU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&S1)for(var n of S1(e))t.indexOf(n)<0&&KU.call(e,n)&&(r[n]=e[n]);return r};const ade={underline:!0},YU=z.forwardRef((e,t)=>{const r=ct("Anchor",ade,e),{component:n,className:o,unstyled:i,variant:a,size:s,color:c,underline:l}=r,u=ide(r,["component","className","unstyled","variant","size","color","underline"]),{classes:d,cx:p}=nde({color:c,underline:l},{name:"Anchor",unstyled:i,variant:a,size:s}),m=n==="button"?{type:"button"}:null;return fe.createElement(St,H7(H7({component:n||"a",ref:t,className:p(d.root,o),size:s},m),u))});YU.displayName="@mantine/core/Anchor";const yx=YU,JU=z.createContext({zIndex:1e3,fixed:!1,layout:"default"}),sde=JU.Provider;function ZU(){return z.useContext(JU)}function Iw(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[Ke({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>ai(n[0])-ai(o[0])),r}var cde=Object.defineProperty,lde=Object.defineProperties,ude=Object.getOwnPropertyDescriptors,z7=Object.getOwnPropertySymbols,fde=Object.prototype.hasOwnProperty,dde=Object.prototype.propertyIsEnumerable,V7=(e,t,r)=>t in e?cde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,im=(e,t)=>{for(var r in t||(t={}))fde.call(t,r)&&V7(e,r,t[r]);if(z7)for(var r of z7(t))dde.call(t,r)&&V7(e,r,t[r]);return e},q7=(e,t)=>lde(e,ude(t)),hde=ft((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:i,zIndex:a,section:s,withBorder:c,layout:l})=>{const u=typeof r=="object"&&r!==null?Iw(r,e).reduce((p,[m,w])=>(p[`@media (min-width: ${Kn(m)})`]={width:xe(w),minWidth:xe(w)},p),{}):null,d=c?{[s==="navbar"?"borderRight":"borderLeft"]:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:q7(im(im(q7(im(im({},e.fn.fontStyles()),o),{top:l==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:a,height:t?xe(t):l==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?xe(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),d),u),{"&[data-hidden]":{[`@media (max-width: ${Kn(ai(Ke({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const pde=hde;var gde=Object.defineProperty,E1=Object.getOwnPropertySymbols,XU=Object.prototype.hasOwnProperty,QU=Object.prototype.propertyIsEnumerable,W7=(e,t,r)=>t in e?gde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G7=(e,t)=>{for(var r in t||(t={}))XU.call(t,r)&&W7(e,r,t[r]);if(E1)for(var r of E1(t))QU.call(t,r)&&W7(e,r,t[r]);return e},mde=(e,t)=>{var r={};for(var n in e)XU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&E1)for(var n of E1(e))t.indexOf(n)<0&&QU.call(e,n)&&(r[n]=e[n]);return r};const eH=z.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:i=!1,position:a,zIndex:s,hiddenBreakpoint:c="md",hidden:l=!1,withBorder:u=!0,className:d,classNames:p,styles:m,children:w,section:A,__staticSelector:T,unstyled:O,variant:P}=r,$=mde(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const R=ZU(),{classes:j,cx:I,theme:b}=pde({width:n,height:o,fixed:R.fixed||i,position:a,hiddenBreakpoint:c,zIndex:s||R.zIndex||bs("app"),section:A,withBorder:u,layout:R.layout},{classNames:p,styles:m,name:T,unstyled:O,variant:P}),N=Iw(n,b).reduce((V,[Z,q])=>(V[`@media (min-width: ${Kn(Z)})`]={[`--mantine-${A}-width`]:xe(q)},V),{});return fe.createElement(at,G7({component:A==="navbar"?"nav":"aside",ref:t,"data-hidden":l||void 0,className:I(j.root,d)},$),w,fe.createElement(rU,{styles:()=>({":root":G7({[`--mantine-${A}-width`]:n!=null&&n.base?xe(n.base):"0rem"},N)})}))});eH.displayName="@mantine/core/HorizontalSection";var vde=Object.defineProperty,C1=Object.getOwnPropertySymbols,tH=Object.prototype.hasOwnProperty,rH=Object.prototype.propertyIsEnumerable,K7=(e,t,r)=>t in e?vde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yde=(e,t)=>{for(var r in t||(t={}))tH.call(t,r)&&K7(e,r,t[r]);if(C1)for(var r of C1(t))rH.call(t,r)&&K7(e,r,t[r]);return e},bde=(e,t)=>{var r={};for(var n in e)tH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&C1)for(var n of C1(e))t.indexOf(n)<0&&rH.call(e,n)&&(r[n]=e[n]);return r};const nH=z.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:i}=r,a=bde(r,["children","grow","sx"]);return fe.createElement(at,yde({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...p4(i)]},a),n)});nH.displayName="@mantine/core/Section";const wde=nH;var _de=Object.defineProperty,Y7=Object.getOwnPropertySymbols,xde=Object.prototype.hasOwnProperty,Sde=Object.prototype.propertyIsEnumerable,J7=(e,t,r)=>t in e?_de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ede=(e,t)=>{for(var r in t||(t={}))xde.call(t,r)&&J7(e,r,t[r]);if(Y7)for(var r of Y7(t))Sde.call(t,r)&&J7(e,r,t[r]);return e};const Cde={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},P1=z.forwardRef((e,t)=>{const r=ct("Navbar",Cde,e);return fe.createElement(eH,Ede({section:"navbar",__staticSelector:"Navbar",ref:t},r))});P1.Section=wde;P1.displayName="@mantine/core/Navbar";var Pde=Object.defineProperty,Ade=Object.defineProperties,Ode=Object.getOwnPropertyDescriptors,Z7=Object.getOwnPropertySymbols,Ide=Object.prototype.hasOwnProperty,Tde=Object.prototype.propertyIsEnumerable,X7=(e,t,r)=>t in e?Pde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K_=(e,t)=>{for(var r in t||(t={}))Ide.call(t,r)&&X7(e,r,t[r]);if(Z7)for(var r of Z7(t))Tde.call(t,r)&&X7(e,r,t[r]);return e},Q7=(e,t)=>Ade(e,Ode(t)),Mde=ft((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:i,layout:a})=>{const s=typeof t=="object"&&t!==null?Iw(t,e).reduce((c,[l,u])=>(c[`@media (min-width: ${Kn(l)})`]={height:xe(u),minHeight:xe(u)},c),{}):null;return{root:Q7(K_(Q7(K_(K_({},e.fn.fontStyles()),n),{zIndex:o,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?xe(t==null?void 0:t.base)||"100%":xe(t),maxHeight:typeof t=="object"?xe(t==null?void 0:t.base)||"100%":xe(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),s),{borderBottom:i==="bottom"?`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const kde=Mde;var $de=Object.defineProperty,A1=Object.getOwnPropertySymbols,oH=Object.prototype.hasOwnProperty,iH=Object.prototype.propertyIsEnumerable,eO=(e,t,r)=>t in e?$de(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tO=(e,t)=>{for(var r in t||(t={}))oH.call(t,r)&&eO(e,r,t[r]);if(A1)for(var r of A1(t))iH.call(t,r)&&eO(e,r,t[r]);return e},Dde=(e,t)=>{var r={};for(var n in e)oH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&A1)for(var n of A1(e))t.indexOf(n)<0&&iH.call(e,n)&&(r[n]=e[n]);return r};const M4=z.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:i,styles:a,height:s,fixed:c=!1,withBorder:l=!0,position:u,zIndex:d,section:p,unstyled:m,__staticSelector:w,variant:A}=r,T=Dde(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const O=ZU(),P=d||O.zIndex||bs("app"),{classes:$,cx:R,theme:j}=kde({height:s,fixed:O.fixed||c,position:u,zIndex:typeof P=="number"&&O.layout==="default"?P+1:P,layout:O.layout,borderPosition:l?p==="header"?"bottom":"top":"none"},{name:w,classNames:i,styles:a,unstyled:m,variant:A}),I=typeof s=="object"&&s!==null?Iw(s,j).reduce((b,[N,V])=>(b[`@media (min-width: ${Kn(N)})`]={[`--mantine-${p}-height`]:xe(V)},b),{}):null;return fe.createElement(at,tO({component:p==="header"?"header":"footer",className:R($.root,o),ref:t},T),n,fe.createElement(rU,{styles:()=>({":root":tO({[`--mantine-${p}-height`]:typeof s=="object"?xe(s==null?void 0:s.base)||"100%":xe(s)},I)})}))});M4.displayName="@mantine/core/VerticalSection";var Rde=Object.defineProperty,Nde=Object.defineProperties,Bde=Object.getOwnPropertyDescriptors,rO=Object.getOwnPropertySymbols,Fde=Object.prototype.hasOwnProperty,jde=Object.prototype.propertyIsEnumerable,nO=(e,t,r)=>t in e?Rde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lde=(e,t)=>{for(var r in t||(t={}))Fde.call(t,r)&&nO(e,r,t[r]);if(rO)for(var r of rO(t))jde.call(t,r)&&nO(e,r,t[r]);return e},Ude=(e,t)=>Nde(e,Bde(t));const Hde={fixed:!1,position:{top:0,left:0,right:0}},aH=z.forwardRef((e,t)=>{const r=ct("Header",Hde,e);return fe.createElement(M4,Ude(Lde({section:"header",__staticSelector:"Header"},r),{ref:t}))});aH.displayName="@mantine/core/Header";var zde=Object.defineProperty,Vde=Object.defineProperties,qde=Object.getOwnPropertyDescriptors,oO=Object.getOwnPropertySymbols,Wde=Object.prototype.hasOwnProperty,Gde=Object.prototype.propertyIsEnumerable,iO=(e,t,r)=>t in e?zde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kde=(e,t)=>{for(var r in t||(t={}))Wde.call(t,r)&&iO(e,r,t[r]);if(oO)for(var r of oO(t))Gde.call(t,r)&&iO(e,r,t[r]);return e},Yde=(e,t)=>Vde(e,qde(t));const Jde={fixed:!1,position:{bottom:0,left:0,right:0}},sH=z.forwardRef((e,t)=>{const r=ct("Footer",Jde,e);return fe.createElement(M4,Yde(Kde({section:"footer",__staticSelector:"Footer"},r),{ref:t}))});sH.displayName="@mantine/core/Footer";var Zde=Object.defineProperty,aO=Object.getOwnPropertySymbols,Xde=Object.prototype.hasOwnProperty,Qde=Object.prototype.propertyIsEnumerable,sO=(e,t,r)=>t in e?Zde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cH=(e,t)=>{for(var r in t||(t={}))Xde.call(t,r)&&sO(e,r,t[r]);if(aO)for(var r of aO(t))Qde.call(t,r)&&sO(e,r,t[r]);return e};function ehe(e,t){const r=Ke({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?Ke({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?Ke({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const i=ai(n),a=ai(o);return cH({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},i===a?{[`@media (max-width: ${Kn(i-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${Kn(i-1)})`]:{paddingLeft:r},[`@media (max-width: ${Kn(a-1)})`]:{paddingRight:r}})}var the=ft((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:cH({flex:1,width:"100vw",boxSizing:"border-box"},ehe(t,e))}));const rhe=the;var nhe=Object.defineProperty,O1=Object.getOwnPropertySymbols,lH=Object.prototype.hasOwnProperty,uH=Object.prototype.propertyIsEnumerable,cO=(e,t,r)=>t in e?nhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ohe=(e,t)=>{for(var r in t||(t={}))lH.call(t,r)&&cO(e,r,t[r]);if(O1)for(var r of O1(t))uH.call(t,r)&&cO(e,r,t[r]);return e},ihe=(e,t)=>{var r={};for(var n in e)lH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&O1)for(var n of O1(e))t.indexOf(n)<0&&uH.call(e,n)&&(r[n]=e[n]);return r};const ahe={fixed:!0,padding:"md"},fH=z.forwardRef((e,t)=>{const r=ct("AppShell",ahe,e),{children:n,navbar:o,header:i,footer:a,aside:s,fixed:c,zIndex:l,padding:u,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:p,className:m,styles:w,classNames:A,unstyled:T,hidden:O,layout:P,variant:$}=r,R=ihe(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:j,cx:I}=rhe({padding:u,fixed:c,navbarOffsetBreakpoint:d,asideOffsetBreakpoint:p},{styles:w,classNames:A,unstyled:T,name:"AppShell",variant:$});return O?fe.createElement(fe.Fragment,null,n):fe.createElement(sde,{value:{fixed:c,zIndex:l,layout:P}},fe.createElement(at,ohe({className:I(j.root,m),ref:t},R),i,fe.createElement("div",{className:j.body},o,fe.createElement("main",{className:j.main},n),s),a))});fH.displayName="@mantine/core/AppShell";const am={xs:xe(1),sm:xe(2),md:xe(3),lg:xe(4),xl:xe(5)};function sm(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var she=ft((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:xe(1),borderTop:`${Ke({size:r,sizes:am})} ${n} ${sm(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Ke({size:r,sizes:am})} ${n} ${sm(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:xe(Ke({size:r,sizes:am})),borderTopColor:sm(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:xe(Ke({size:r,sizes:am})),borderLeftColor:sm(e,t),borderLeftStyle:n}}));const che=she;var lhe=Object.defineProperty,uhe=Object.defineProperties,fhe=Object.getOwnPropertyDescriptors,I1=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,hH=Object.prototype.propertyIsEnumerable,lO=(e,t,r)=>t in e?lhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uO=(e,t)=>{for(var r in t||(t={}))dH.call(t,r)&&lO(e,r,t[r]);if(I1)for(var r of I1(t))hH.call(t,r)&&lO(e,r,t[r]);return e},dhe=(e,t)=>uhe(e,fhe(t)),hhe=(e,t)=>{var r={};for(var n in e)dH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&I1)for(var n of I1(e))t.indexOf(n)<0&&hH.call(e,n)&&(r[n]=e[n]);return r};const phe={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},bx=z.forwardRef((e,t)=>{const r=ct("Divider",phe,e),{className:n,color:o,orientation:i,size:a,label:s,labelPosition:c,labelProps:l,variant:u,styles:d,classNames:p,unstyled:m}=r,w=hhe(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:A,cx:T}=che({color:o},{classNames:p,styles:d,unstyled:m,name:"Divider",variant:u,size:a}),O=i==="vertical",P=i==="horizontal",$=!!s&&P,R=!(l!=null&&l.color);return fe.createElement(at,uO({ref:t,className:T(A.root,{[A.vertical]:O,[A.horizontal]:P,[A.withLabel]:$},n),role:"separator"},w),$&&fe.createElement(St,dhe(uO({},l),{size:(l==null?void 0:l.size)||"xs",mt:xe(2),className:T(A.label,A[c],{[A.labelDefaultStyles]:R})}),s))});bx.displayName="@mantine/core/Divider";var ghe=Object.defineProperty,mhe=Object.defineProperties,vhe=Object.getOwnPropertyDescriptors,fO=Object.getOwnPropertySymbols,yhe=Object.prototype.hasOwnProperty,bhe=Object.prototype.propertyIsEnumerable,dO=(e,t,r)=>t in e?ghe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hO=(e,t)=>{for(var r in t||(t={}))yhe.call(t,r)&&dO(e,r,t[r]);if(fO)for(var r of fO(t))bhe.call(t,r)&&dO(e,r,t[r]);return e},whe=(e,t)=>mhe(e,vhe(t)),_he=ft((e,t,{size:r})=>({item:whe(hO({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Ke({size:r,sizes:e.spacing})} / 1.5) ${Ke({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:Ke({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":hO({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Ke({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Ke({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Ke({size:r,sizes:e.spacing})} / 1.5) ${Ke({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const xhe=_he;var She=Object.defineProperty,pO=Object.getOwnPropertySymbols,Ehe=Object.prototype.hasOwnProperty,Che=Object.prototype.propertyIsEnumerable,gO=(e,t,r)=>t in e?She(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Phe=(e,t)=>{for(var r in t||(t={}))Ehe.call(t,r)&&gO(e,r,t[r]);if(pO)for(var r of pO(t))Che.call(t,r)&&gO(e,r,t[r]);return e};function pH({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:i,__staticSelector:a,onItemHover:s,onItemSelect:c,itemsRefs:l,itemComponent:u,size:d,nothingFound:p,creatable:m,createLabel:w,unstyled:A,variant:T}){const{classes:O}=xhe(null,{classNames:r,styles:n,unstyled:A,name:a,variant:T,size:d}),P=[],$=[];let R=null;const j=(b,N)=>{const V=typeof o=="function"?o(b.value):!1;return fe.createElement(u,Phe({key:b.value,className:O.item,"data-disabled":b.disabled||void 0,"data-hovered":!b.disabled&&t===N||void 0,"data-selected":!b.disabled&&V||void 0,selected:V,onMouseEnter:()=>s(N),id:`${i}-${N}`,role:"option",tabIndex:-1,"aria-selected":t===N,ref:Z=>{l&&l.current&&(l.current[b.value]=Z)},onMouseDown:b.disabled?null:Z=>{Z.preventDefault(),c(b)},disabled:b.disabled,variant:T},b))};let I=null;if(e.forEach((b,N)=>{b.creatable?R=N:b.group?(I!==b.group&&(I=b.group,$.push(fe.createElement("div",{className:O.separator,key:`__mantine-divider-${N}`},fe.createElement(bx,{classNames:{label:O.separatorLabel},label:b.group})))),$.push(j(b,N))):P.push(j(b,N))}),m){const b=e[R];P.push(fe.createElement("div",{key:Aw(),className:O.item,"data-hovered":t===R||void 0,onMouseEnter:()=>s(R),onMouseDown:N=>{N.preventDefault(),c(b)},tabIndex:-1,ref:N=>{l&&l.current&&(l.current[b.value]=N)}},w))}return $.length>0&&P.length>0&&P.unshift(fe.createElement("div",{className:O.separator,key:"empty-group-separator"},fe.createElement(bx,null))),$.length>0||P.length>0?fe.createElement(fe.Fragment,null,$,P):fe.createElement(St,{size:d,unstyled:A,className:O.nothingFound},p)}pH.displayName="@mantine/core/SelectItems";var Ahe=Object.defineProperty,T1=Object.getOwnPropertySymbols,gH=Object.prototype.hasOwnProperty,mH=Object.prototype.propertyIsEnumerable,mO=(e,t,r)=>t in e?Ahe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ohe=(e,t)=>{for(var r in t||(t={}))gH.call(t,r)&&mO(e,r,t[r]);if(T1)for(var r of T1(t))mH.call(t,r)&&mO(e,r,t[r]);return e},Ihe=(e,t)=>{var r={};for(var n in e)gH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&T1)for(var n of T1(e))t.indexOf(n)<0&&mH.call(e,n)&&(r[n]=e[n]);return r};const vH=z.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,i=Ihe(r,["label","value"]);return fe.createElement("div",Ohe({ref:t},i),n||o)});vH.displayName="@mantine/core/DefaultItem";function tr(){return tr=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(r=>The(r,t))}function su(...e){return z.useCallback(yH(...e),e)}const bH=z.forwardRef((e,t)=>{const{children:r,...n}=e,o=z.Children.toArray(r),i=o.find(khe);if(i){const a=i.props.children,s=o.map(c=>c===i?z.Children.count(a)>1?z.Children.only(null):z.isValidElement(a)?a.props.children:null:c);return z.createElement(wx,tr({},n,{ref:t}),z.isValidElement(a)?z.cloneElement(a,void 0,s):null)}return z.createElement(wx,tr({},n,{ref:t}),r)});bH.displayName="Slot";const wx=z.forwardRef((e,t)=>{const{children:r,...n}=e;return z.isValidElement(r)?z.cloneElement(r,{...$he(n,r.props),ref:yH(t,r.ref)}):z.Children.count(r)>1?z.Children.only(null):null});wx.displayName="SlotClone";const Mhe=({children:e})=>z.createElement(z.Fragment,null,e);function khe(e){return z.isValidElement(e)&&e.type===Mhe}function $he(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Dhe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],N0=Dhe.reduce((e,t)=>{const r=z.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?bH:t;return z.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),z.createElement(s,tr({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_x=globalThis!=null&&globalThis.document?z.useLayoutEffect:()=>{};function Rhe(e,t){return z.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const B0=e=>{const{present:t,children:r}=e,n=Nhe(t),o=typeof r=="function"?r({present:n.isPresent}):z.Children.only(r),i=su(n.ref,o.ref);return typeof r=="function"||n.isPresent?z.cloneElement(o,{ref:i}):null};B0.displayName="Presence";function Nhe(e){const[t,r]=z.useState(),n=z.useRef({}),o=z.useRef(e),i=z.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Rhe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return z.useEffect(()=>{const l=cm(n.current);i.current=s==="mounted"?l:"none"},[s]),_x(()=>{const l=n.current,u=o.current;if(u!==e){const p=i.current,m=cm(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),_x(()=>{if(t){const l=d=>{const m=cm(n.current).includes(d.animationName);d.target===t&&m&&Fc.flushSync(()=>c("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=cm(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:z.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function cm(e){return(e==null?void 0:e.animationName)||"none"}function Bhe(e,t=[]){let r=[];function n(i,a){const s=z.createContext(a),c=r.length;r=[...r,a];function l(d){const{scope:p,children:m,...w}=d,A=(p==null?void 0:p[e][c])||s,T=z.useMemo(()=>w,Object.values(w));return z.createElement(A.Provider,{value:T},m)}function u(d,p){const m=(p==null?void 0:p[e][c])||s,w=z.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=r.map(a=>z.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return z.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,Fhe(o,...t)]}function Fhe(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Al(e){const t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const jhe=z.createContext(void 0);function Lhe(e){const t=z.useContext(jhe);return e||t||"ltr"}function Uhe(e,[t,r]){return Math.min(r,Math.max(t,e))}function Ll(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Hhe(e,t){return z.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const wH="ScrollArea",[_H,YYe]=Bhe(wH),[zhe,li]=_H(wH),Vhe=z.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,c]=z.useState(null),[l,u]=z.useState(null),[d,p]=z.useState(null),[m,w]=z.useState(null),[A,T]=z.useState(null),[O,P]=z.useState(0),[$,R]=z.useState(0),[j,I]=z.useState(!1),[b,N]=z.useState(!1),V=su(t,q=>c(q)),Z=Lhe(o);return z.createElement(zhe,{scope:r,type:n,dir:Z,scrollHideDelay:i,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:p,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:j,onScrollbarXEnabledChange:I,scrollbarY:A,onScrollbarYChange:T,scrollbarYEnabled:b,onScrollbarYEnabledChange:N,onCornerWidthChange:P,onCornerHeightChange:R},z.createElement(N0.div,tr({dir:Z},a,{ref:V,style:{position:"relative","--radix-scroll-area-corner-width":O+"px","--radix-scroll-area-corner-height":$+"px",...e.style}})))}),qhe="ScrollAreaViewport",Whe=z.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=li(qhe,r),a=z.useRef(null),s=su(t,a,i.onViewportChange);return z.createElement(z.Fragment,null,z.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),z.createElement(N0.div,tr({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),z.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),ws="ScrollAreaScrollbar",Ghe=z.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=li(ws,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return z.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?z.createElement(Khe,tr({},n,{ref:t,forceMount:r})):o.type==="scroll"?z.createElement(Yhe,tr({},n,{ref:t,forceMount:r})):o.type==="auto"?z.createElement(xH,tr({},n,{ref:t,forceMount:r})):o.type==="always"?z.createElement(k4,tr({},n,{ref:t})):null}),Khe=z.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=li(ws,e.__scopeScrollArea),[i,a]=z.useState(!1);return z.useEffect(()=>{const s=o.scrollArea;let c=0;if(s){const l=()=>{window.clearTimeout(c),a(!0)},u=()=>{c=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(c),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),z.createElement(B0,{present:r||i},z.createElement(xH,tr({"data-state":i?"visible":"hidden"},n,{ref:t})))}),Yhe=z.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=li(ws,e.__scopeScrollArea),i=e.orientation==="horizontal",a=Mw(()=>c("SCROLL_END"),100),[s,c]=Hhe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return z.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,o.scrollHideDelay,c]),z.useEffect(()=>{const l=o.viewport,u=i?"scrollLeft":"scrollTop";if(l){let d=l[u];const p=()=>{const m=l[u];d!==m&&(c("SCROLL"),a()),d=m};return l.addEventListener("scroll",p),()=>l.removeEventListener("scroll",p)}},[o.viewport,i,c,a]),z.createElement(B0,{present:r||s!=="hidden"},z.createElement(k4,tr({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Ll(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ll(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),xH=z.forwardRef((e,t)=>{const r=li(ws,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=z.useState(!1),s=e.orientation==="horizontal",c=Mw(()=>{if(r.viewport){const l=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,o=li(ws,e.__scopeScrollArea),i=z.useRef(null),a=z.useRef(0),[s,c]=z.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=PH(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,m){return npe(p,a.current,s,m)}return r==="horizontal"?z.createElement(Jhe,tr({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,m=vO(p,s,o.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?z.createElement(Zhe,tr({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,m=vO(p,s);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),Jhe=z.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=li(ws,e.__scopeScrollArea),[a,s]=z.useState(),c=z.useRef(null),l=su(t,c,i.onScrollbarXChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),z.createElement(EH,tr({"data-orientation":"horizontal"},o,{ref:l,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Tw(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(p),OH(p,d)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:M1(a.paddingLeft),paddingEnd:M1(a.paddingRight)}})}}))}),Zhe=z.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=li(ws,e.__scopeScrollArea),[a,s]=z.useState(),c=z.useRef(null),l=su(t,c,i.onScrollbarYChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),z.createElement(EH,tr({"data-orientation":"vertical"},o,{ref:l,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Tw(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){const p=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(p),OH(p,d)&&u.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:M1(a.paddingTop),paddingEnd:M1(a.paddingBottom)}})}}))}),[Xhe,SH]=_H(ws),EH=z.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...p}=e,m=li(ws,r),[w,A]=z.useState(null),T=su(t,V=>A(V)),O=z.useRef(null),P=z.useRef(""),$=m.viewport,R=n.content-n.viewport,j=Al(u),I=Al(c),b=Mw(d,10);function N(V){if(O.current){const Z=V.clientX-O.current.left,q=V.clientY-O.current.top;l({x:Z,y:q})}}return z.useEffect(()=>{const V=Z=>{const q=Z.target;(w==null?void 0:w.contains(q))&&j(Z,R)};return document.addEventListener("wheel",V,{passive:!1}),()=>document.removeEventListener("wheel",V,{passive:!1})},[$,w,R,j]),z.useEffect(I,[n,I]),zf(w,b),zf(m.content,b),z.createElement(Xhe,{scope:r,scrollbar:w,hasThumb:o,onThumbChange:Al(i),onThumbPointerUp:Al(a),onThumbPositionChange:I,onThumbPointerDown:Al(s)},z.createElement(N0.div,tr({},p,{ref:T,style:{position:"absolute",...p.style},onPointerDown:Ll(e.onPointerDown,V=>{V.button===0&&(V.target.setPointerCapture(V.pointerId),O.current=w.getBoundingClientRect(),P.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",N(V))}),onPointerMove:Ll(e.onPointerMove,N),onPointerUp:Ll(e.onPointerUp,V=>{const Z=V.target;Z.hasPointerCapture(V.pointerId)&&Z.releasePointerCapture(V.pointerId),document.body.style.webkitUserSelect=P.current,O.current=null})})))}),xx="ScrollAreaThumb",Qhe=z.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=SH(xx,e.__scopeScrollArea);return z.createElement(B0,{present:r||o.hasThumb},z.createElement(epe,tr({ref:t},n)))}),epe=z.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=li(xx,r),a=SH(xx,r),{onThumbPositionChange:s}=a,c=su(t,d=>a.onThumbChange(d)),l=z.useRef(),u=Mw(()=>{l.current&&(l.current(),l.current=void 0)},100);return z.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(u(),!l.current){const m=ope(d,s);l.current=m,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,u,s]),z.createElement(N0.div,tr({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ll(e.onPointerDownCapture,d=>{const m=d.target.getBoundingClientRect(),w=d.clientX-m.left,A=d.clientY-m.top;a.onThumbPointerDown({x:w,y:A})}),onPointerUp:Ll(e.onPointerUp,a.onThumbPointerUp)}))}),CH="ScrollAreaCorner",tpe=z.forwardRef((e,t)=>{const r=li(CH,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?z.createElement(rpe,tr({},e,{ref:t})):null}),rpe=z.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=li(CH,r),[i,a]=z.useState(0),[s,c]=z.useState(0),l=!!(i&&s);return zf(o.scrollbarX,()=>{var u;const d=((u=o.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;o.onCornerHeightChange(d),c(d)}),zf(o.scrollbarY,()=>{var u;const d=((u=o.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),l?z.createElement(N0.div,tr({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function M1(e){return e?parseInt(e,10):0}function PH(e,t){const r=e/t;return isNaN(r)?0:r}function Tw(e){const t=PH(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function npe(e,t,r,n="ltr"){const o=Tw(r),i=o/2,a=t||i,s=o-a,c=r.scrollbar.paddingStart+a,l=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return AH([c,l],d)(e)}function vO(e,t,r="ltr"){const n=Tw(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,c=r==="ltr"?[0,a]:[a*-1,0],l=Uhe(e,c);return AH([0,a],[0,s])(l)}function AH(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function OH(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Mw(e,t){const r=Al(e),n=z.useRef(0);return z.useEffect(()=>()=>window.clearTimeout(n.current),[]),z.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function zf(e,t){const r=Al(t);_x(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const ipe=Vhe,ape=Whe,yO=Ghe,bO=Qhe,spe=tpe;var cpe=ft((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?xe(t):void 0,paddingBottom:r?xe(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${xe(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Ii("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:xe(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:xe(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ii("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:xe(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:xe(44),minHeight:xe(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const lpe=cpe;var upe=Object.defineProperty,fpe=Object.defineProperties,dpe=Object.getOwnPropertyDescriptors,k1=Object.getOwnPropertySymbols,IH=Object.prototype.hasOwnProperty,TH=Object.prototype.propertyIsEnumerable,wO=(e,t,r)=>t in e?upe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sx=(e,t)=>{for(var r in t||(t={}))IH.call(t,r)&&wO(e,r,t[r]);if(k1)for(var r of k1(t))TH.call(t,r)&&wO(e,r,t[r]);return e},MH=(e,t)=>fpe(e,dpe(t)),kH=(e,t)=>{var r={};for(var n in e)IH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&k1)for(var n of k1(e))t.indexOf(n)<0&&TH.call(e,n)&&(r[n]=e[n]);return r};const $H={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},kw=z.forwardRef((e,t)=>{const r=ct("ScrollArea",$H,e),{children:n,className:o,classNames:i,styles:a,scrollbarSize:s,scrollHideDelay:c,type:l,dir:u,offsetScrollbars:d,viewportRef:p,onScrollPositionChange:m,unstyled:w,variant:A,viewportProps:T}=r,O=kH(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[P,$]=z.useState(!1),R=Kr(),{classes:j,cx:I}=lpe({scrollbarSize:s,offsetScrollbars:d,scrollbarHovered:P,hidden:l==="never"},{name:"ScrollArea",classNames:i,styles:a,unstyled:w,variant:A});return fe.createElement(ipe,{type:l==="never"?"always":l,scrollHideDelay:c,dir:u||R.dir,ref:t,asChild:!0},fe.createElement(at,Sx({className:I(j.root,o)},O),fe.createElement(ape,MH(Sx({},T),{className:j.viewport,ref:p,onScroll:typeof m=="function"?({currentTarget:b})=>m({x:b.scrollLeft,y:b.scrollTop}):void 0}),n),fe.createElement(yO,{orientation:"horizontal",className:j.scrollbar,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1)},fe.createElement(bO,{className:j.thumb})),fe.createElement(yO,{orientation:"vertical",className:j.scrollbar,forceMount:!0,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1)},fe.createElement(bO,{className:j.thumb})),fe.createElement(spe,{className:j.corner})))}),DH=z.forwardRef((e,t)=>{const r=ct("ScrollAreaAutosize",$H,e),{children:n,classNames:o,styles:i,scrollbarSize:a,scrollHideDelay:s,type:c,dir:l,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:p,unstyled:m,sx:w,variant:A,viewportProps:T}=r,O=kH(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return fe.createElement(at,MH(Sx({},O),{ref:t,sx:[{display:"flex"},...p4(w)]}),fe.createElement(at,{sx:{display:"flex",flexDirection:"column",flex:1}},fe.createElement(kw,{classNames:o,styles:i,scrollHideDelay:s,scrollbarSize:a,type:c,dir:l,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:p,unstyled:m,variant:A,viewportProps:T},n)))});DH.displayName="@mantine/core/ScrollAreaAutosize";kw.displayName="@mantine/core/ScrollArea";kw.Autosize=DH;const RH=kw;var hpe=Object.defineProperty,ppe=Object.defineProperties,gpe=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,NH=Object.prototype.hasOwnProperty,BH=Object.prototype.propertyIsEnumerable,_O=(e,t,r)=>t in e?hpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xO=(e,t)=>{for(var r in t||(t={}))NH.call(t,r)&&_O(e,r,t[r]);if($1)for(var r of $1(t))BH.call(t,r)&&_O(e,r,t[r]);return e},mpe=(e,t)=>ppe(e,gpe(t)),vpe=(e,t)=>{var r={};for(var n in e)NH.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$1)for(var n of $1(e))t.indexOf(n)<0&&BH.call(e,n)&&(r[n]=e[n]);return r};const $4=z.forwardRef((e,t)=>{var r=e,{style:n}=r,o=vpe(r,["style"]);return fe.createElement(RH,mpe(xO({},o),{style:xO({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});$4.displayName="@mantine/core/SelectScrollArea";var ype=ft(()=>({dropdown:{},itemsWrapper:{padding:xe(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const bpe=ype,ji=Math.min,Mn=Math.max,D1=Math.round,lm=Math.floor,Oc=e=>({x:e,y:e}),wpe={left:"right",right:"left",bottom:"top",top:"bottom"},_pe={start:"end",end:"start"};function Ex(e,t,r){return Mn(e,ji(t,r))}function cs(e,t){return typeof e=="function"?e(t):e}function Li(e){return e.split("-")[0]}function _d(e){return e.split("-")[1]}function D4(e){return e==="x"?"y":"x"}function R4(e){return e==="y"?"height":"width"}function cu(e){return["top","bottom"].includes(Li(e))?"y":"x"}function N4(e){return D4(cu(e))}function xpe(e,t,r){r===void 0&&(r=!1);const n=_d(e),o=N4(e),i=R4(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=R1(a)),[a,R1(a)]}function Spe(e){const t=R1(e);return[Cx(e),t,Cx(t)]}function Cx(e){return e.replace(/start|end/g,t=>_pe[t])}function Epe(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}function Cpe(e,t,r,n){const o=_d(e);let i=Epe(Li(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Cx)))),i}function R1(e){return e.replace(/left|right|bottom|top/g,t=>wpe[t])}function Ppe(e){return{top:0,right:0,bottom:0,left:0,...e}}function B4(e){return typeof e!="number"?Ppe(e):{top:e,right:e,bottom:e,left:e}}function Vf(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function SO(e,t,r){let{reference:n,floating:o}=e;const i=cu(t),a=N4(t),s=R4(a),c=Li(t),l=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let m;switch(c){case"top":m={x:u,y:n.y-o.height};break;case"bottom":m={x:u,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:d};break;case"left":m={x:n.x-o.width,y:d};break;default:m={x:n.x,y:n.y}}switch(_d(t)){case"start":m[a]-=p*(r&&l?-1:1);break;case"end":m[a]+=p*(r&&l?-1:1);break}return m}const Ape=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=SO(l,n,c),p=n,m={},w=0;for(let A=0;A({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=cs(e,t)||{};if(l==null)return{};const d=B4(u),p={x:r,y:n},m=N4(o),w=R4(m),A=await a.getDimensions(l),T=m==="y",O=T?"top":"left",P=T?"bottom":"right",$=T?"clientHeight":"clientWidth",R=i.reference[w]+i.reference[m]-p[m]-i.floating[w],j=p[m]-i.reference[m],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let b=I?I[$]:0;(!b||!await(a.isElement==null?void 0:a.isElement(I)))&&(b=s.floating[$]||i.floating[w]);const N=R/2-j/2,V=b/2-A[w]/2-1,Z=ji(d[O],V),q=ji(d[P],V),_=Z,y=b-A[w]-q,f=b/2-A[w]/2+N,h=Ex(_,f,y),x=!c.arrow&&_d(o)!=null&&f!=h&&i.reference[w]/2-(f<_?Z:q)-A[w]/2<0,v=x?f<_?f-_:f-y:0;return{[m]:p[m]+v,data:{[m]:h,centerOffset:f-h-v,...x&&{alignmentOffset:v}},reset:x}}}),Ipe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:A=!0,...T}=cs(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const O=Li(o),P=Li(s)===s,$=await(c.isRTL==null?void 0:c.isRTL(l.floating)),R=p||(P||!A?[R1(s)]:Spe(s));!p&&w!=="none"&&R.push(...Cpe(s,A,w,$));const j=[s,...R],I=await F4(t,T),b=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&b.push(I[O]),d){const _=xpe(o,a,$);b.push(I[_[0]],I[_[1]])}if(N=[...N,{placement:o,overflows:b}],!b.every(_=>_<=0)){var V,Z;const _=(((V=i.flip)==null?void 0:V.index)||0)+1,y=j[_];if(y)return{data:{index:_,overflows:N},reset:{placement:y}};let f=(Z=N.filter(h=>h.overflows[0]<=0).sort((h,x)=>h.overflows[1]-x.overflows[1])[0])==null?void 0:Z.placement;if(!f)switch(m){case"bestFit":{var q;const h=(q=N.map(x=>[x.placement,x.overflows.filter(v=>v>0).reduce((v,S)=>v+S,0)]).sort((x,v)=>x[1]-v[1])[0])==null?void 0:q[0];h&&(f=h);break}case"initialPlacement":f=s;break}if(o!==f)return{reset:{placement:f}}}return{}}}};function FH(e){const t=ji(...e.map(i=>i.left)),r=ji(...e.map(i=>i.top)),n=Mn(...e.map(i=>i.right)),o=Mn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Tpe(e){const t=e.slice().sort((o,i)=>o.y-i.y),r=[];let n=null;for(let o=0;on.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>Vf(FH(o)))}const Mpe=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:c,y:l}=cs(e,t),u=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]),d=Tpe(u),p=Vf(FH(u)),m=B4(s);function w(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(T=>c>T.left-m.left&&cT.top-m.top&&l=2){if(cu(r)==="y"){const Z=d[0],q=d[d.length-1],_=Li(r)==="top",y=Z.top,f=q.bottom,h=_?Z.left:q.left,x=_?Z.right:q.right,v=x-h,S=f-y;return{top:y,bottom:f,left:h,right:x,width:v,height:S,x:h,y}}const T=Li(r)==="left",O=Mn(...d.map(Z=>Z.right)),P=ji(...d.map(Z=>Z.left)),$=d.filter(Z=>T?Z.left===P:Z.right===O),R=$[0].top,j=$[$.length-1].bottom,I=P,b=O,N=b-I,V=j-R;return{top:R,bottom:j,left:I,right:b,width:N,height:V,x:I,y:R}}return p}const A=await i.getElementRects({reference:{getBoundingClientRect:w},floating:n.floating,strategy:a});return o.reference.x!==A.reference.x||o.reference.y!==A.reference.y||o.reference.width!==A.reference.width||o.reference.height!==A.reference.height?{reset:{rects:A}}:{}}}};async function kpe(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=Li(r),s=_d(r),c=cu(r)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=cs(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof w=="number"&&(m=s==="end"?w*-1:w),c?{x:m*u,y:p*l}:{x:p*l,y:m*u}}const jH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await kpe(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},$pe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:T=>{let{x:O,y:P}=T;return{x:O,y:P}}},...c}=cs(e,t),l={x:r,y:n},u=await F4(t,c),d=cu(Li(o)),p=D4(d);let m=l[p],w=l[d];if(i){const T=p==="y"?"top":"left",O=p==="y"?"bottom":"right",P=m+u[T],$=m-u[O];m=Ex(P,m,$)}if(a){const T=d==="y"?"top":"left",O=d==="y"?"bottom":"right",P=w+u[T],$=w-u[O];w=Ex(P,w,$)}const A=s.fn({...t,[p]:m,[d]:w});return{...A,data:{x:A.x-r,y:A.y-n}}}}},Dpe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=cs(e,t),u={x:r,y:n},d=cu(o),p=D4(d);let m=u[p],w=u[d];const A=cs(s,t),T=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(c){const $=p==="y"?"height":"width",R=i.reference[p]-i.floating[$]+T.mainAxis,j=i.reference[p]+i.reference[$]-T.mainAxis;mj&&(m=j)}if(l){var O,P;const $=p==="y"?"width":"height",R=["top","left"].includes(Li(o)),j=i.reference[d]-i.floating[$]+(R&&((O=a.offset)==null?void 0:O[d])||0)+(R?0:T.crossAxis),I=i.reference[d]+i.reference[$]+(R?0:((P=a.offset)==null?void 0:P[d])||0)-(R?T.crossAxis:0);wI&&(w=I)}return{[p]:m,[d]:w}}}},Rpe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=cs(e,t),c=await F4(t,s),l=Li(r),u=_d(r),d=cu(r)==="y",{width:p,height:m}=n.floating;let w,A;l==="top"||l==="bottom"?(w=l,A=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(A=l,w=u==="end"?"top":"bottom");const T=m-c[w],O=p-c[A],P=!t.middlewareData.shift;let $=T,R=O;if(d){const I=p-c.left-c.right;R=u||P?ji(O,I):I}else{const I=m-c.top-c.bottom;$=u||P?ji(T,I):I}if(P&&!u){const I=Mn(c.left,0),b=Mn(c.right,0),N=Mn(c.top,0),V=Mn(c.bottom,0);d?R=p-2*(I!==0||b!==0?I+b:Mn(c.left,c.right)):$=m-2*(N!==0||V!==0?N+V:Mn(c.top,c.bottom))}await a({...t,availableWidth:R,availableHeight:$});const j=await o.getDimensions(i.floating);return p!==j.width||m!==j.height?{reset:{rects:!0}}:{}}}};function Ic(e){return LH(e)?(e.nodeName||"").toLowerCase():"#document"}function Ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _s(e){var t;return(t=(LH(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LH(e){return e instanceof Node||e instanceof Ao(e).Node}function ls(e){return e instanceof Element||e instanceof Ao(e).Element}function xa(e){return e instanceof HTMLElement||e instanceof Ao(e).HTMLElement}function EO(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ao(e).ShadowRoot}function F0(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=si(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Npe(e){return["table","td","th"].includes(Ic(e))}function j4(e){const t=L4(),r=si(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Bpe(e){let t=qf(e);for(;xa(t)&&!$w(t);){if(j4(t))return t;t=qf(t)}return null}function L4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $w(e){return["html","body","#document"].includes(Ic(e))}function si(e){return Ao(e).getComputedStyle(e)}function Dw(e){return ls(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qf(e){if(Ic(e)==="html")return e;const t=e.assignedSlot||e.parentNode||EO(e)&&e.host||_s(e);return EO(t)?t.host:t}function UH(e){const t=qf(e);return $w(t)?e.ownerDocument?e.ownerDocument.body:e.body:xa(t)&&F0(t)?t:UH(t)}function Qa(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=UH(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Ao(o);return i?t.concat(a,a.visualViewport||[],F0(o)?o:[],a.frameElement&&r?Qa(a.frameElement):[]):t.concat(o,Qa(o,[],r))}function HH(e){const t=si(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=xa(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=D1(r)!==i||D1(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function U4(e){return ls(e)?e:e.contextElement}function Pf(e){const t=U4(e);if(!xa(t))return Oc(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=HH(t);let a=(i?D1(r.width):r.width)/n,s=(i?D1(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Fpe=Oc(0);function zH(e){const t=Ao(e);return!L4()||!t.visualViewport?Fpe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jpe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ao(e)?!1:t}function Xl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=U4(e);let a=Oc(1);t&&(n?ls(n)&&(a=Pf(n)):a=Pf(e));const s=jpe(i,r,n)?zH(i):Oc(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Ao(i),m=n&&ls(n)?Ao(n):n;let w=p.frameElement;for(;w&&n&&m!==p;){const A=Pf(w),T=w.getBoundingClientRect(),O=si(w),P=T.left+(w.clientLeft+parseFloat(O.paddingLeft))*A.x,$=T.top+(w.clientTop+parseFloat(O.paddingTop))*A.y;c*=A.x,l*=A.y,u*=A.x,d*=A.y,c+=P,l+=$,w=Ao(w).frameElement}}return Vf({width:u,height:d,x:c,y:l})}function Lpe(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=xa(r),i=_s(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=Oc(1);const c=Oc(0);if((o||!o&&n!=="fixed")&&((Ic(r)!=="body"||F0(i))&&(a=Dw(r)),xa(r))){const l=Xl(r);s=Pf(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function Upe(e){return Array.from(e.getClientRects())}function VH(e){return Xl(_s(e)).left+Dw(e).scrollLeft}function Hpe(e){const t=_s(e),r=Dw(e),n=e.ownerDocument.body,o=Mn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Mn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+VH(e);const s=-r.scrollTop;return si(n).direction==="rtl"&&(a+=Mn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function zpe(e,t){const r=Ao(e),n=_s(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=L4();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function Vpe(e,t){const r=Xl(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=xa(e)?Pf(e):Oc(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=n*i.y;return{width:a,height:s,x:c,y:l}}function CO(e,t,r){let n;if(t==="viewport")n=zpe(e,r);else if(t==="document")n=Hpe(_s(e));else if(ls(t))n=Vpe(t,r);else{const o=zH(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Vf(n)}function qH(e,t){const r=qf(e);return r===t||!ls(r)||$w(r)?!1:si(r).position==="fixed"||qH(r,t)}function qpe(e,t){const r=t.get(e);if(r)return r;let n=Qa(e,[],!1).filter(s=>ls(s)&&Ic(s)!=="body"),o=null;const i=si(e).position==="fixed";let a=i?qf(e):e;for(;ls(a)&&!$w(a);){const s=si(a),c=j4(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||F0(a)&&!c&&qH(e,a))?n=n.filter(u=>u!==a):o=s,a=qf(a)}return t.set(e,n),n}function Wpe(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?qpe(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((l,u)=>{const d=CO(t,u,o);return l.top=Mn(d.top,l.top),l.right=ji(d.right,l.right),l.bottom=ji(d.bottom,l.bottom),l.left=Mn(d.left,l.left),l},CO(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Gpe(e){const{width:t,height:r}=HH(e);return{width:t,height:r}}function Kpe(e,t,r){const n=xa(t),o=_s(t),i=r==="fixed",a=Xl(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Oc(0);if(n||!n&&!i)if((Ic(t)!=="body"||F0(o))&&(s=Dw(t)),n){const l=Xl(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=VH(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function PO(e,t){return!xa(e)||si(e).position==="fixed"?null:t?t(e):e.offsetParent}function WH(e,t){const r=Ao(e);if(!xa(e))return r;let n=PO(e,t);for(;n&&Npe(n)&&si(n).position==="static";)n=PO(n,t);return n&&(Ic(n)==="html"||Ic(n)==="body"&&si(n).position==="static"&&!j4(n))?r:n||Bpe(e)||r}const Ype=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||WH,i=this.getDimensions;return{reference:Kpe(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function Jpe(e){return si(e).direction==="rtl"}const Zpe={convertOffsetParentRelativeRectToViewportRelativeRect:Lpe,getDocumentElement:_s,getClippingRect:Wpe,getOffsetParent:WH,getElementRects:Ype,getClientRects:Upe,getDimensions:Gpe,getScale:Pf,isElement:ls,isRTL:Jpe};function Xpe(e,t){let r=null,n;const o=_s(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const m=lm(u),w=lm(o.clientWidth-(l+d)),A=lm(o.clientHeight-(u+p)),T=lm(l),P={rootMargin:-m+"px "+-w+"px "+-A+"px "+-T+"px",threshold:Mn(0,ji(1,c))||1};let $=!0;function R(j){const I=j[0].intersectionRatio;if(I!==c){if(!$)return a();I?a(!1,I):n=setTimeout(()=>{a(!1,1e-7)},100)}$=!1}try{r=new IntersectionObserver(R,{...P,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,P)}r.observe(e)}return a(!0),i}function Qpe(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=U4(e),u=o||i?[...l?Qa(l):[],...Qa(t)]:[];u.forEach(O=>{o&&O.addEventListener("scroll",r,{passive:!0}),i&&O.addEventListener("resize",r)});const d=l&&s?Xpe(l,r):null;let p=-1,m=null;a&&(m=new ResizeObserver(O=>{let[P]=O;P&&P.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{m&&m.observe(t)})),r()}),l&&!c&&m.observe(l),m.observe(t));let w,A=c?Xl(e):null;c&&T();function T(){const O=Xl(e);A&&(O.x!==A.x||O.y!==A.y||O.width!==A.width||O.height!==A.height)&&r(),A=O,w=requestAnimationFrame(T)}return r(),()=>{u.forEach(O=>{o&&O.removeEventListener("scroll",r),i&&O.removeEventListener("resize",r)}),d&&d(),m&&m.disconnect(),m=null,c&&cancelAnimationFrame(w)}}const H4=$pe,GH=Ipe,e0e=Rpe,AO=Ope,KH=Mpe,t0e=Dpe,r0e=(e,t,r)=>{const n=new Map,o={platform:Zpe,...r},i={...o.platform,_c:n};return Ape(e,t,{...o,platform:i})},YH=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?AO({element:t.current,padding:r}).fn(o):{}:t?AO({element:t,padding:r}).fn(o):{}}}};var dv=typeof document<"u"?z.useLayoutEffect:z.useEffect;function N1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!N1(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!N1(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function OO(e){const t=z.useRef(e);return dv(()=>{t.current=e}),t}function n0e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:i,open:a}=e,[s,c]=z.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[l,u]=z.useState(n);N1(l,n)||u(n);const d=z.useRef(null),p=z.useRef(null),m=z.useRef(s),w=OO(i),A=OO(o),[T,O]=z.useState(null),[P,$]=z.useState(null),R=z.useCallback(Z=>{d.current!==Z&&(d.current=Z,O(Z))},[]),j=z.useCallback(Z=>{p.current!==Z&&(p.current=Z,$(Z))},[]),I=z.useCallback(()=>{if(!d.current||!p.current)return;const Z={placement:t,strategy:r,middleware:l};A.current&&(Z.platform=A.current),r0e(d.current,p.current,Z).then(q=>{const _={...q,isPositioned:!0};b.current&&!N1(m.current,_)&&(m.current=_,Fc.flushSync(()=>{c(_)}))})},[l,t,r,A]);dv(()=>{a===!1&&m.current.isPositioned&&(m.current.isPositioned=!1,c(Z=>({...Z,isPositioned:!1})))},[a]);const b=z.useRef(!1);dv(()=>(b.current=!0,()=>{b.current=!1}),[]),dv(()=>{if(T&&P){if(w.current)return w.current(T,P,I);I()}},[T,P,I,w]);const N=z.useMemo(()=>({reference:d,floating:p,setReference:R,setFloating:j}),[R,j]),V=z.useMemo(()=>({reference:T,floating:P}),[T,P]);return z.useMemo(()=>({...s,update:I,refs:N,elements:V,reference:R,floating:j}),[s,I,N,V,R,j])}var Wf=typeof document<"u"?z.useLayoutEffect:z.useEffect;let Y_=!1,o0e=0;const IO=()=>"floating-ui-"+o0e++;function i0e(){const[e,t]=z.useState(()=>Y_?IO():void 0);return Wf(()=>{e==null&&t(IO())},[]),z.useEffect(()=>{Y_||(Y_=!0)},[]),e}const a0e=$p["useId".toString()],TO=a0e||i0e;function s0e(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const c0e=z.createContext(null),l0e=z.createContext(null),JH=()=>{var e;return((e=z.useContext(c0e))==null?void 0:e.id)||null},z4=()=>z.useContext(l0e);function Xs(e){return(e==null?void 0:e.ownerDocument)||document}function u0e(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function f0e(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function V4(e){return Xs(e).defaultView||window}function ua(e){return e?e instanceof V4(e).Element:!1}function ZH(e){return e?e instanceof V4(e).HTMLElement:!1}function d0e(e){if(typeof ShadowRoot>"u")return!1;const t=V4(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function h0e(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(u0e())||t.test(f0e()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function p0e(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function XH(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function MO(e){const t=z.useRef(e);return Wf(()=>{t.current=e}),t}const kO="data-floating-ui-safe-polygon";function hv(e,t,r){return r&&!XH(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const g0e=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:s=!0}=t===void 0?{}:t;const{open:c,onOpenChange:l,dataRef:u,events:d,elements:{domReference:p,floating:m},refs:w}=e,A=z4(),T=JH(),O=MO(o),P=MO(n),$=z.useRef(),R=z.useRef(),j=z.useRef(),I=z.useRef(),b=z.useRef(!0),N=z.useRef(!1),V=z.useRef(()=>{}),Z=z.useCallback(()=>{var f;const h=(f=u.current.openEvent)==null?void 0:f.type;return(h==null?void 0:h.includes("mouse"))&&h!=="mousedown"},[u]);z.useEffect(()=>{if(!r)return;function f(){clearTimeout(R.current),clearTimeout(I.current),b.current=!0}return d.on("dismiss",f),()=>{d.off("dismiss",f)}},[r,d]),z.useEffect(()=>{if(!r||!O.current||!c)return;function f(){Z()&&l(!1)}const h=Xs(m).documentElement;return h.addEventListener("mouseleave",f),()=>{h.removeEventListener("mouseleave",f)}},[m,c,l,r,O,u,Z]);const q=z.useCallback(function(f){f===void 0&&(f=!0);const h=hv(P.current,"close",$.current);h&&!j.current?(clearTimeout(R.current),R.current=setTimeout(()=>l(!1),h)):f&&(clearTimeout(R.current),l(!1))},[P,l]),_=z.useCallback(()=>{V.current(),j.current=void 0},[]),y=z.useCallback(()=>{if(N.current){const f=Xs(w.floating.current).body;f.style.pointerEvents="",f.removeAttribute(kO),N.current=!1}},[w]);return z.useEffect(()=>{if(!r)return;function f(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function h(S){if(clearTimeout(R.current),b.current=!1,i&&!XH($.current)||a>0&&hv(P.current,"open")===0)return;u.current.openEvent=S;const k=hv(P.current,"open",$.current);k?R.current=setTimeout(()=>{l(!0)},k):l(!0)}function x(S){if(f())return;V.current();const k=Xs(m);if(clearTimeout(I.current),O.current){c||clearTimeout(R.current),j.current=O.current({...e,tree:A,x:S.clientX,y:S.clientY,onClose(){y(),_(),q()}});const E=j.current;k.addEventListener("mousemove",E),V.current=()=>{k.removeEventListener("mousemove",E)};return}q()}function v(S){f()||O.current==null||O.current({...e,tree:A,x:S.clientX,y:S.clientY,onClose(){y(),_(),q()}})(S)}if(ua(p)){const S=p;return c&&S.addEventListener("mouseleave",v),m==null||m.addEventListener("mouseleave",v),s&&S.addEventListener("mousemove",h,{once:!0}),S.addEventListener("mouseenter",h),S.addEventListener("mouseleave",x),()=>{c&&S.removeEventListener("mouseleave",v),m==null||m.removeEventListener("mouseleave",v),s&&S.removeEventListener("mousemove",h),S.removeEventListener("mouseenter",h),S.removeEventListener("mouseleave",x)}}},[p,m,r,e,i,a,s,q,_,y,l,c,A,P,O,u]),Wf(()=>{var f;if(r&&c&&(f=O.current)!=null&&f.__options.blockPointerEvents&&Z()){const v=Xs(m).body;if(v.setAttribute(kO,""),v.style.pointerEvents="none",N.current=!0,ua(p)&&m){var h,x;const S=p,k=A==null||(h=A.nodesRef.current.find(E=>E.id===T))==null||(x=h.context)==null?void 0:x.elements.floating;return k&&(k.style.pointerEvents=""),S.style.pointerEvents="auto",m.style.pointerEvents="auto",()=>{S.style.pointerEvents="",m.style.pointerEvents=""}}}},[r,c,T,m,p,A,O,u,Z]),Wf(()=>{c||($.current=void 0,_(),y())},[c,_,y]),z.useEffect(()=>()=>{_(),clearTimeout(R.current),clearTimeout(I.current),y()},[r,_,y]),z.useMemo(()=>{if(!r)return{};function f(h){$.current=h.pointerType}return{reference:{onPointerDown:f,onPointerEnter:f,onMouseMove(){c||a===0||(clearTimeout(I.current),I.current=setTimeout(()=>{b.current||l(!0)},a))}},floating:{onMouseEnter(){clearTimeout(R.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),q(!1)}}}},[d,r,a,c,l,q])},QH=z.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),ez=()=>z.useContext(QH),m0e=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,i]=z.useReducer((c,l)=>({...c,...l}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=z.useRef(null),s=z.useCallback(c=>{i({currentId:c})},[]);return Wf(()=>{o.currentId?a.current===null?a.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),a.current=null)},[o.currentId]),z.createElement(QH.Provider,{value:z.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,i,s])},t)},v0e=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:i,setCurrentId:a,initialDelay:s,setState:c,timeoutMs:l}=ez();z.useEffect(()=>{i&&(c({delay:{open:1,close:hv(s,"close")}}),i!==o&&n(!1))},[o,n,c,i,s]),z.useEffect(()=>{function u(){n(!1),c({delay:s,currentId:null})}if(!r&&i===o)if(l){const d=window.setTimeout(u,l);return()=>{clearTimeout(d)}}else u()},[r,c,i,o,n,s,l]),z.useEffect(()=>{r&&a(o)},[r,a,o])};function y0e(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function $O(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&d0e(r)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function J_(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function b0e(e){return"composedPath"in e?e.composedPath()[0]:e.target}const w0e=$p["useInsertionEffect".toString()],_0e=w0e||(e=>e());function tz(e){const t=z.useRef(()=>{});return _0e(()=>{t.current=e}),z.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o!1),j=typeof p=="function"?R:p,I=z.useRef(!1),{escapeKeyBubbles:b,outsidePressBubbles:N}=E0e(O);return z.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=b,l.current.__outsidePressBubbles=N;function V(f){if(f.key==="Escape"){const h=P?J_(P.nodesRef.current,i):[];if(h.length>0){let x=!0;if(h.forEach(v=>{var S;if((S=v.context)!=null&&S.open&&!v.context.dataRef.current.__escapeKeyBubbles){x=!1;return}}),!x)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function Z(f){const h=I.current;if(I.current=!1,h||typeof j=="function"&&!j(f))return;const x=b0e(f);if(ZH(x)&&c){const k=c.ownerDocument.defaultView||window,E=x.scrollWidth>x.clientWidth,C=x.scrollHeight>x.clientHeight;let g=C&&f.offsetX>x.clientWidth;if(C&&k.getComputedStyle(x).direction==="rtl"&&(g=f.offsetX<=x.offsetWidth-x.clientWidth),g||E&&f.offsetY>x.clientHeight)return}const v=P&&J_(P.nodesRef.current,i).some(k=>{var E;return pv(f,(E=k.context)==null?void 0:E.elements.floating)});if(pv(f,c)||pv(f,s)||v)return;const S=P?J_(P.nodesRef.current,i):[];if(S.length>0){let k=!0;if(S.forEach(E=>{var C;if((C=E.context)!=null&&C.open&&!E.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:$?{preventScroll:!0}:h0e(f)||p0e(f)}}),n(!1)}function q(){n(!1)}const _=Xs(c);d&&_.addEventListener("keydown",V),j&&_.addEventListener(m,Z);let y=[];return T&&(ua(s)&&(y=Qa(s)),ua(c)&&(y=y.concat(Qa(c))),!ua(a)&&a&&a.contextElement&&(y=y.concat(Qa(a.contextElement)))),y=y.filter(f=>{var h;return f!==((h=_.defaultView)==null?void 0:h.visualViewport)}),y.forEach(f=>{f.addEventListener("scroll",q,{passive:!0})}),()=>{d&&_.removeEventListener("keydown",V),j&&_.removeEventListener(m,Z),y.forEach(f=>{f.removeEventListener("scroll",q)})}},[l,c,s,a,d,j,m,o,P,i,r,n,T,u,b,N,$]),z.useEffect(()=>{I.current=!1},[j,m]),z.useMemo(()=>u?{reference:{[x0e[A]]:()=>{w&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[S0e[m]]:()=>{I.current=!0}}}:{},[u,o,w,m,A,n])},P0e=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:i,refs:a,elements:{floating:s,domReference:c}}=e,{enabled:l=!0,keyboardOnly:u=!0}=t===void 0?{}:t;const d=z.useRef(""),p=z.useRef(!1),m=z.useRef();return z.useEffect(()=>{if(!l)return;const A=Xs(s).defaultView||window;function T(){!r&&ZH(c)&&c===y0e(Xs(c))&&(p.current=!0)}return A.addEventListener("blur",T),()=>{A.removeEventListener("blur",T)}},[s,c,r,l]),z.useEffect(()=>{if(!l)return;function w(A){(A.type==="referencePress"||A.type==="escapeKey")&&(p.current=!0)}return i.on("dismiss",w),()=>{i.off("dismiss",w)}},[i,l]),z.useEffect(()=>()=>{clearTimeout(m.current)},[]),z.useMemo(()=>l?{reference:{onPointerDown(w){let{pointerType:A}=w;d.current=A,p.current=!!(A&&u)},onMouseLeave(){p.current=!1},onFocus(w){var A;p.current||w.type==="focus"&&((A=o.current.openEvent)==null?void 0:A.type)==="mousedown"&&o.current.openEvent&&pv(o.current.openEvent,c)||(o.current.openEvent=w.nativeEvent,n(!0))},onBlur(w){p.current=!1;const A=w.relatedTarget,T=ua(A)&&A.hasAttribute("data-floating-ui-focus-guard")&&A.getAttribute("data-type")==="outside";m.current=setTimeout(()=>{$O(a.floating.current,A)||$O(c,A)||T||n(!1)})}}}:{},[l,u,c,a,o,n])},A0e=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const i=TO(),a=TO();return z.useMemo(()=>{const s={id:i,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?i:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[n,o,r,i,a])};function q4(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=n0e(e),i=z4(),a=z.useRef(null),s=z.useRef({}),c=z.useState(()=>s0e())[0],[l,u]=z.useState(null),d=z.useCallback(O=>{const P=ua(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),contextElement:O}:O;o.refs.setReference(P)},[o.refs]),p=z.useCallback(O=>{(ua(O)||O===null)&&(a.current=O,u(O)),(ua(o.refs.reference.current)||o.refs.reference.current===null||O!==null&&!ua(O))&&o.refs.setReference(O)},[o.refs]),m=z.useMemo(()=>({...o.refs,setReference:p,setPositionReference:d,domReference:a}),[o.refs,p,d]),w=z.useMemo(()=>({...o.elements,domReference:l}),[o.elements,l]),A=tz(r),T=z.useMemo(()=>({...o,refs:m,elements:w,dataRef:s,nodeId:n,events:c,open:t,onOpenChange:A}),[o,n,c,t,A,m,w]);return Wf(()=>{const O=i==null?void 0:i.nodesRef.current.find(P=>P.id===n);O&&(O.context=T)}),z.useMemo(()=>({...o,context:T,refs:m,reference:p,positionReference:d}),[o,m,T,p,d])}function Z_(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var l;(l=n.get(s))==null||l.push(c),o[s]=function(){for(var u,d=arguments.length,p=new Array(d),m=0;mw(...p))}}}else o[s]=c}),o),{})}}const O0e=function(e){e===void 0&&(e=[]);const t=e,r=z.useCallback(i=>Z_(i,e,"reference"),t),n=z.useCallback(i=>Z_(i,e,"floating"),t),o=z.useCallback(i=>Z_(i,e,"item"),e.map(i=>i==null?void 0:i.item));return z.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])};function rz({opened:e,floating:t,position:r,positionDependencies:n}){const[o,i]=z.useState(0);z.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return Qpe(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),Mo(()=>{t.update()},n),Mo(()=>{i(a=>a+1)},[e])}function I0e(e){const t=[jH(e.offset)];return e.middlewares.shift&&t.push(H4({limiter:t0e()})),e.middlewares.flip&&t.push(GH()),e.middlewares.inline&&t.push(KH()),t.push(YH({element:e.arrowRef,padding:e.arrowOffset})),t}function T0e(e){const[t,r]=Jl({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var a;(a=e.onClose)==null||a.call(e),r(!1)},o=()=>{var a,s;t?((a=e.onClose)==null||a.call(e),r(!1)):((s=e.onOpen)==null||s.call(e),r(!0))},i=q4({placement:e.position,middleware:[...I0e(e),...e.width==="target"?[e0e({apply({rects:a}){var s,c;Object.assign((c=(s=i.refs.floating.current)==null?void 0:s.style)!=null?c:{},{width:`${a.reference.width}px`})}})]:[]]});return rz({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Mo(()=>{var a;(a=e.onPositionChange)==null||a.call(e,i.placement)},[i.placement]),Mo(()=>{var a,s;e.opened?(s=e.onOpen)==null||s.call(e):(a=e.onClose)==null||a.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const nz={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[M0e,oz]=O0(nz.context);var k0e=Object.defineProperty,$0e=Object.defineProperties,D0e=Object.getOwnPropertyDescriptors,B1=Object.getOwnPropertySymbols,iz=Object.prototype.hasOwnProperty,az=Object.prototype.propertyIsEnumerable,DO=(e,t,r)=>t in e?k0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,um=(e,t)=>{for(var r in t||(t={}))iz.call(t,r)&&DO(e,r,t[r]);if(B1)for(var r of B1(t))az.call(t,r)&&DO(e,r,t[r]);return e},R0e=(e,t)=>$0e(e,D0e(t)),N0e=(e,t)=>{var r={};for(var n in e)iz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&B1)for(var n of B1(e))t.indexOf(n)<0&&az.call(e,n)&&(r[n]=e[n]);return r};const B0e={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},sz=z.forwardRef((e,t)=>{const r=ct("PopoverTarget",B0e,e),{children:n,refProp:o,popupType:i,shouldOverrideDefaultTargetId:a}=r,s=N0e(r,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!I0(n))throw new Error(nz.children);const c=s,l=oz(),u=jc(l.reference,n.ref,t),d=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:a?l.getTargetId():n.props.id}:{};return z.cloneElement(n,um(R0e(um(um(um({},c),d),l.targetProps),{className:OL(l.targetProps.className,c.className,n.props.className),[o]:u}),l.controlled?null:{onClick:l.onToggle}))});sz.displayName="@mantine/core/PopoverTarget";var F0e=ft((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const j0e=F0e;var L0e=Object.defineProperty,RO=Object.getOwnPropertySymbols,U0e=Object.prototype.hasOwnProperty,H0e=Object.prototype.propertyIsEnumerable,NO=(e,t,r)=>t in e?L0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Du=(e,t)=>{for(var r in t||(t={}))U0e.call(t,r)&&NO(e,r,t[r]);if(RO)for(var r of RO(t))H0e.call(t,r)&&NO(e,r,t[r]);return e};const BO={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function z0e({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in em?Du(Du(Du({transitionProperty:em[e].transitionProperty},o),em[e].common),em[e][BO[t]]):null:Du(Du(Du({transitionProperty:e.transitionProperty},o),e.common),e[BO[t]])}function V0e({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s}){const c=Kr(),l=$0(),u=c.respectReducedMotion?l:!1,[d,p]=z.useState(u?0:e),[m,w]=z.useState(n?"entered":"exited"),A=z.useRef(-1),T=O=>{const P=O?o:i,$=O?a:s;w(O?"pre-entering":"pre-exiting"),window.clearTimeout(A.current);const R=u?0:O?e:t;if(p(R),R===0)typeof P=="function"&&P(),typeof $=="function"&&$(),w(O?"entered":"exited");else{const j=window.setTimeout(()=>{typeof P=="function"&&P(),w(O?"entering":"exiting")},10);A.current=window.setTimeout(()=>{window.clearTimeout(j),typeof $=="function"&&$(),w(O?"entered":"exited")},R)}};return Mo(()=>{T(n)},[n]),z.useEffect(()=>()=>window.clearTimeout(A.current),[]),{transitionDuration:d,transitionStatus:m,transitionTimingFunction:r||c.transitionTimingFunction}}function lu({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a,onExit:s,onEntered:c,onEnter:l,onExited:u}){const{transitionDuration:d,transitionStatus:p,transitionTimingFunction:m}=V0e({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:c,onEnter:l,onExited:u});return d===0?o?fe.createElement(fe.Fragment,null,i({})):e?i({display:"none"}):null:p==="exited"?e?i({display:"none"}):null:fe.createElement(fe.Fragment,null,i(z0e({transition:t,duration:d,state:p,timingFunction:m})))}lu.displayName="@mantine/core/Transition";function W4({children:e,active:t=!0,refProp:r="ref"}){const n=Sle(t),o=jc(n,e==null?void 0:e.ref);return I0(e)?z.cloneElement(e,{[r]:o}):e}W4.displayName="@mantine/core/FocusTrap";var q0e=Object.defineProperty,W0e=Object.defineProperties,G0e=Object.getOwnPropertyDescriptors,FO=Object.getOwnPropertySymbols,K0e=Object.prototype.hasOwnProperty,Y0e=Object.prototype.propertyIsEnumerable,jO=(e,t,r)=>t in e?q0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ks=(e,t)=>{for(var r in t||(t={}))K0e.call(t,r)&&jO(e,r,t[r]);if(FO)for(var r of FO(t))Y0e.call(t,r)&&jO(e,r,t[r]);return e},fm=(e,t)=>W0e(e,G0e(t));function LO(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function UO(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const J0e={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Z0e({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){const[c,l="center"]=e.split("-"),u={width:xe(t),height:xe(t),transform:"rotate(45deg)",position:"absolute",[J0e[c]]:xe(n)},d=xe(-t/2);return c==="left"?fm(ks(ks({},u),LO(l,a,r,o)),{right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?fm(ks(ks({},u),LO(l,a,r,o)),{left:d,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?fm(ks(ks({},u),UO(l,i,r,o,s)),{bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?fm(ks(ks({},u),UO(l,i,r,o,s)),{top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var X0e=Object.defineProperty,Q0e=Object.defineProperties,ege=Object.getOwnPropertyDescriptors,F1=Object.getOwnPropertySymbols,cz=Object.prototype.hasOwnProperty,lz=Object.prototype.propertyIsEnumerable,HO=(e,t,r)=>t in e?X0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tge=(e,t)=>{for(var r in t||(t={}))cz.call(t,r)&&HO(e,r,t[r]);if(F1)for(var r of F1(t))lz.call(t,r)&&HO(e,r,t[r]);return e},rge=(e,t)=>Q0e(e,ege(t)),nge=(e,t)=>{var r={};for(var n in e)cz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&F1)for(var n of F1(e))t.indexOf(n)<0&&lz.call(e,n)&&(r[n]=e[n]);return r};const G4=z.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,visible:c,arrowX:l,arrowY:u}=r,d=nge(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const p=Kr();return c?fe.createElement("div",rge(tge({},d),{ref:t,style:Z0e({position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,dir:p.dir,arrowX:l,arrowY:u})})):null});G4.displayName="@mantine/core/FloatingArrow";var oge=Object.defineProperty,ige=Object.defineProperties,age=Object.getOwnPropertyDescriptors,j1=Object.getOwnPropertySymbols,uz=Object.prototype.hasOwnProperty,fz=Object.prototype.propertyIsEnumerable,zO=(e,t,r)=>t in e?oge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ru=(e,t)=>{for(var r in t||(t={}))uz.call(t,r)&&zO(e,r,t[r]);if(j1)for(var r of j1(t))fz.call(t,r)&&zO(e,r,t[r]);return e},dm=(e,t)=>ige(e,age(t)),sge=(e,t)=>{var r={};for(var n in e)uz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&j1)for(var n of j1(e))t.indexOf(n)<0&&fz.call(e,n)&&(r[n]=e[n]);return r};const cge={};function dz(e){var t;const r=ct("PopoverDropdown",cge,e),{style:n,className:o,children:i,onKeyDownCapture:a}=r,s=sge(r,["style","className","children","onKeyDownCapture"]),c=oz(),{classes:l,cx:u}=j0e({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),d=nU({opened:c.opened,shouldReturnFocus:c.returnFocus}),p=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:fe.createElement(R0,dm(Ru({},c.portalProps),{withinPortal:c.withinPortal}),fe.createElement(lu,dm(Ru({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),m=>{var w,A;return fe.createElement(W4,{active:c.trapFocus},fe.createElement(at,Ru(dm(Ru({},p),{tabIndex:-1,ref:c.floating,style:dm(Ru(Ru({},n),m),{zIndex:c.zIndex,top:(w=c.y)!=null?w:0,left:(A=c.x)!=null?A:0,width:c.width==="target"?void 0:xe(c.width)}),className:u(l.dropdown,o),onKeyDownCapture:jae(c.onClose,{active:c.closeOnEscape,onTrigger:d,onKeyDown:a}),"data-position":c.placement}),s),i,fe.createElement(G4,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:l.arrow})))}))}dz.displayName="@mantine/core/PopoverDropdown";function hz(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var VO=Object.getOwnPropertySymbols,lge=Object.prototype.hasOwnProperty,uge=Object.prototype.propertyIsEnumerable,fge=(e,t)=>{var r={};for(var n in e)lge.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&VO)for(var n of VO(e))t.indexOf(n)<0&&uge.call(e,n)&&(r[n]=e[n]);return r};const dge={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:bs("popover"),__staticSelector:"Popover",width:"max-content"};function xs(e){var t,r,n,o,i,a;const s=z.useRef(null),c=ct("Popover",dge,e),{children:l,position:u,offset:d,onPositionChange:p,positionDependencies:m,opened:w,transitionProps:A,width:T,middlewares:O,withArrow:P,arrowSize:$,arrowOffset:R,arrowRadius:j,arrowPosition:I,unstyled:b,classNames:N,styles:V,closeOnClickOutside:Z,withinPortal:q,portalProps:_,closeOnEscape:y,clickOutsideEvents:f,trapFocus:h,onClose:x,onOpen:v,onChange:S,zIndex:k,radius:E,shadow:C,id:g,defaultOpened:M,__staticSelector:re,withRoles:W,disabled:ee,returnFocus:ce,variant:ie,keepMounted:le}=c,L=fge(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[te,ae]=z.useState(null),[ye,ve]=z.useState(null),me=au(g),Pe=Kr(),he=T0e({middlewares:O,width:T,position:hz(Pe.dir,u),offset:typeof d=="number"?d+(P?$/2:0):d,arrowRef:s,arrowOffset:R,onPositionChange:p,positionDependencies:m,opened:w,defaultOpened:M,onChange:S,onOpen:v,onClose:x});dle(()=>he.opened&&Z&&he.onClose(),f,[te,ye]);const be=z.useCallback(we=>{ae(we),he.floating.reference(we)},[he.floating.reference]),Ie=z.useCallback(we=>{ve(we),he.floating.floating(we)},[he.floating.floating]);return fe.createElement(M0e,{value:{returnFocus:ce,disabled:ee,controlled:he.controlled,reference:be,floating:Ie,x:he.floating.x,y:he.floating.y,arrowX:(n=(r=(t=he.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(a=(i=(o=he.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:a.y,opened:he.opened,arrowRef:s,transitionProps:A,width:T,withArrow:P,arrowSize:$,arrowOffset:R,arrowRadius:j,arrowPosition:I,placement:he.floating.placement,trapFocus:h,withinPortal:q,portalProps:_,zIndex:k,radius:E,shadow:C,closeOnEscape:y,onClose:he.onClose,onToggle:he.onToggle,getTargetId:()=>`${me}-target`,getDropdownId:()=>`${me}-dropdown`,withRoles:W,targetProps:L,__staticSelector:re,classNames:N,styles:V,unstyled:b,variant:ie,keepMounted:le}},l)}xs.Target=sz;xs.Dropdown=dz;xs.displayName="@mantine/core/Popover";var hge=Object.defineProperty,L1=Object.getOwnPropertySymbols,pz=Object.prototype.hasOwnProperty,gz=Object.prototype.propertyIsEnumerable,qO=(e,t,r)=>t in e?hge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pge=(e,t)=>{for(var r in t||(t={}))pz.call(t,r)&&qO(e,r,t[r]);if(L1)for(var r of L1(t))gz.call(t,r)&&qO(e,r,t[r]);return e},gge=(e,t)=>{var r={};for(var n in e)pz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&L1)for(var n of L1(e))t.indexOf(n)<0&&gz.call(e,n)&&(r[n]=e[n]);return r};function mge(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:i="column",id:a,innerRef:s,__staticSelector:c,styles:l,classNames:u,unstyled:d}=t,p=gge(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:m}=bpe(null,{name:c,styles:l,classNames:u,unstyled:d});return fe.createElement(xs.Dropdown,pge({p:0,onMouseDown:w=>w.preventDefault()},p),fe.createElement("div",{style:{maxHeight:xe(o),display:"flex"}},fe.createElement(at,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:w=>w.preventDefault(),style:{flex:1,overflowY:n!==$4?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:s},fe.createElement("div",{className:m.itemsWrapper,style:{flexDirection:i}},r))))}function dp({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:i,__staticSelector:a,onDirectionChange:s,switchDirectionOnFlip:c,zIndex:l,dropdownPosition:u,positionDependencies:d=[],classNames:p,styles:m,unstyled:w,readOnly:A,variant:T}){return fe.createElement(xs,{unstyled:w,classNames:p,styles:m,width:"target",withRoles:!1,opened:e,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:d,zIndex:l,__staticSelector:a,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:A,onPositionChange:O=>c&&(s==null?void 0:s(O==="top"?"column-reverse":"column")),variant:T},i)}dp.Target=xs.Target;dp.Dropdown=mge;var vge=Object.defineProperty,yge=Object.defineProperties,bge=Object.getOwnPropertyDescriptors,U1=Object.getOwnPropertySymbols,mz=Object.prototype.hasOwnProperty,vz=Object.prototype.propertyIsEnumerable,WO=(e,t,r)=>t in e?vge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hm=(e,t)=>{for(var r in t||(t={}))mz.call(t,r)&&WO(e,r,t[r]);if(U1)for(var r of U1(t))vz.call(t,r)&&WO(e,r,t[r]);return e},wge=(e,t)=>yge(e,bge(t)),_ge=(e,t)=>{var r={};for(var n in e)mz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&U1)for(var n of U1(e))t.indexOf(n)<0&&vz.call(e,n)&&(r[n]=e[n]);return r};function yz(e,t,r){const n=ct(e,t,r),{label:o,description:i,error:a,required:s,classNames:c,styles:l,className:u,unstyled:d,__staticSelector:p,sx:m,errorProps:w,labelProps:A,descriptionProps:T,wrapperProps:O,id:P,size:$,style:R,inputContainer:j,inputWrapperOrder:I,withAsterisk:b,variant:N}=n,V=_ge(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),Z=au(P),{systemStyles:q,rest:_}=wd(V),y=hm({label:o,description:i,error:a,required:s,classNames:c,className:u,__staticSelector:p,sx:m,errorProps:w,labelProps:A,descriptionProps:T,unstyled:d,styles:l,id:Z,size:$,style:R,inputContainer:j,inputWrapperOrder:I,withAsterisk:b,variant:N},O);return wge(hm({},_),{classNames:c,styles:l,unstyled:d,wrapperProps:hm(hm({},y),q),inputProps:{required:s,classNames:c,styles:l,unstyled:d,id:Z,size:$,__staticSelector:p,error:a,variant:N}})}var xge=ft((e,t,{size:r})=>({label:{display:"inline-block",fontSize:Ke({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const Sge=xge;var Ege=Object.defineProperty,H1=Object.getOwnPropertySymbols,bz=Object.prototype.hasOwnProperty,wz=Object.prototype.propertyIsEnumerable,GO=(e,t,r)=>t in e?Ege(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cge=(e,t)=>{for(var r in t||(t={}))bz.call(t,r)&&GO(e,r,t[r]);if(H1)for(var r of H1(t))wz.call(t,r)&&GO(e,r,t[r]);return e},Pge=(e,t)=>{var r={};for(var n in e)bz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&H1)for(var n of H1(e))t.indexOf(n)<0&&wz.call(e,n)&&(r[n]=e[n]);return r};const Age={labelElement:"label",size:"sm"},K4=z.forwardRef((e,t)=>{const r=ct("InputLabel",Age,e),{labelElement:n,children:o,required:i,size:a,classNames:s,styles:c,unstyled:l,className:u,htmlFor:d,__staticSelector:p,variant:m,onMouseDown:w}=r,A=Pge(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:T,cx:O}=Sge(null,{name:["InputWrapper",p],classNames:s,styles:c,unstyled:l,variant:m,size:a});return fe.createElement(at,Cge({component:n,ref:t,className:O(T.label,u),htmlFor:n==="label"?d:void 0,onMouseDown:P=>{w==null||w(P),!P.defaultPrevented&&P.detail>1&&P.preventDefault()}},A),o,i&&fe.createElement("span",{className:T.required,"aria-hidden":!0}," *"))});K4.displayName="@mantine/core/InputLabel";var Oge=ft((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Ke({size:r,sizes:e.fontSizes})} - ${xe(2)})`,lineHeight:1.2,display:"block"}}));const Ige=Oge;var Tge=Object.defineProperty,z1=Object.getOwnPropertySymbols,_z=Object.prototype.hasOwnProperty,xz=Object.prototype.propertyIsEnumerable,KO=(e,t,r)=>t in e?Tge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mge=(e,t)=>{for(var r in t||(t={}))_z.call(t,r)&&KO(e,r,t[r]);if(z1)for(var r of z1(t))xz.call(t,r)&&KO(e,r,t[r]);return e},kge=(e,t)=>{var r={};for(var n in e)_z.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&z1)for(var n of z1(e))t.indexOf(n)<0&&xz.call(e,n)&&(r[n]=e[n]);return r};const $ge={size:"sm"},Y4=z.forwardRef((e,t)=>{const r=ct("InputError",$ge,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:c,__staticSelector:l,variant:u}=r,d=kge(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:p,cx:m}=Ige(null,{name:["InputWrapper",l],classNames:i,styles:a,unstyled:s,variant:u,size:c});return fe.createElement(St,Mge({className:m(p.error,o),ref:t},d),n)});Y4.displayName="@mantine/core/InputError";var Dge=ft((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Ke({size:r,sizes:e.fontSizes})} - ${xe(2)})`,lineHeight:1.2,display:"block"}}));const Rge=Dge;var Nge=Object.defineProperty,V1=Object.getOwnPropertySymbols,Sz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,YO=(e,t,r)=>t in e?Nge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bge=(e,t)=>{for(var r in t||(t={}))Sz.call(t,r)&&YO(e,r,t[r]);if(V1)for(var r of V1(t))Ez.call(t,r)&&YO(e,r,t[r]);return e},Fge=(e,t)=>{var r={};for(var n in e)Sz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&V1)for(var n of V1(e))t.indexOf(n)<0&&Ez.call(e,n)&&(r[n]=e[n]);return r};const jge={size:"sm"},J4=z.forwardRef((e,t)=>{const r=ct("InputDescription",jge,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:c,__staticSelector:l,variant:u}=r,d=Fge(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:p,cx:m}=Rge(null,{name:["InputWrapper",l],classNames:i,styles:a,unstyled:s,variant:u,size:c});return fe.createElement(St,Bge({color:"dimmed",className:m(p.description,o),ref:t,unstyled:s},d),n)});J4.displayName="@mantine/core/InputDescription";const Cz=z.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),Lge=Cz.Provider,Uge=()=>z.useContext(Cz);function Hge(e,{hasDescription:t,hasError:r}){const n=e.findIndex(c=>c==="input"),o=e[n-1],i=e[n+1];return{offsetBottom:t&&i==="description"||r&&i==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var zge=Object.defineProperty,Vge=Object.defineProperties,qge=Object.getOwnPropertyDescriptors,JO=Object.getOwnPropertySymbols,Wge=Object.prototype.hasOwnProperty,Gge=Object.prototype.propertyIsEnumerable,ZO=(e,t,r)=>t in e?zge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kge=(e,t)=>{for(var r in t||(t={}))Wge.call(t,r)&&ZO(e,r,t[r]);if(JO)for(var r of JO(t))Gge.call(t,r)&&ZO(e,r,t[r]);return e},Yge=(e,t)=>Vge(e,qge(t)),Jge=ft(e=>({root:Yge(Kge({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Zge=Jge;var Xge=Object.defineProperty,Qge=Object.defineProperties,eme=Object.getOwnPropertyDescriptors,q1=Object.getOwnPropertySymbols,Pz=Object.prototype.hasOwnProperty,Az=Object.prototype.propertyIsEnumerable,XO=(e,t,r)=>t in e?Xge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$s=(e,t)=>{for(var r in t||(t={}))Pz.call(t,r)&&XO(e,r,t[r]);if(q1)for(var r of q1(t))Az.call(t,r)&&XO(e,r,t[r]);return e},QO=(e,t)=>Qge(e,eme(t)),tme=(e,t)=>{var r={};for(var n in e)Pz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&q1)for(var n of q1(e))t.indexOf(n)<0&&Az.call(e,n)&&(r[n]=e[n]);return r};const rme={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Oz=z.forwardRef((e,t)=>{const r=ct("InputWrapper",rme,e),{className:n,label:o,children:i,required:a,id:s,error:c,description:l,labelElement:u,labelProps:d,descriptionProps:p,errorProps:m,classNames:w,styles:A,size:T,inputContainer:O,__staticSelector:P,unstyled:$,inputWrapperOrder:R,withAsterisk:j,variant:I}=r,b=tme(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:N,cx:V}=Zge(null,{classNames:w,styles:A,name:["InputWrapper",P],unstyled:$,variant:I,size:T}),Z={classNames:w,styles:A,unstyled:$,size:T,variant:I,__staticSelector:P},q=typeof j=="boolean"?j:a,_=s?`${s}-error`:m==null?void 0:m.id,y=s?`${s}-description`:p==null?void 0:p.id,h=`${!!c&&typeof c!="boolean"?_:""} ${l?y:""}`,x=h.trim().length>0?h.trim():void 0,v=o&&fe.createElement(K4,$s($s({key:"label",labelElement:u,id:s?`${s}-label`:void 0,htmlFor:s,required:q},Z),d),o),S=l&&fe.createElement(J4,QO($s($s({key:"description"},p),Z),{size:(p==null?void 0:p.size)||Z.size,id:(p==null?void 0:p.id)||y}),l),k=fe.createElement(z.Fragment,{key:"input"},O(i)),E=typeof c!="boolean"&&c&&fe.createElement(Y4,QO($s($s({},m),Z),{size:(m==null?void 0:m.size)||Z.size,key:"error",id:(m==null?void 0:m.id)||_}),c),C=R.map(g=>{switch(g){case"label":return v;case"input":return k;case"description":return S;case"error":return E;default:return null}});return fe.createElement(Lge,{value:$s({describedBy:x},Hge(R,{hasDescription:!!S,hasError:!!E}))},fe.createElement(at,$s({className:V(N.root,n),ref:t},b),C))});Oz.displayName="@mantine/core/InputWrapper";var nme=Object.defineProperty,W1=Object.getOwnPropertySymbols,Iz=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,eI=(e,t,r)=>t in e?nme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ome=(e,t)=>{for(var r in t||(t={}))Iz.call(t,r)&&eI(e,r,t[r]);if(W1)for(var r of W1(t))Tz.call(t,r)&&eI(e,r,t[r]);return e},ime=(e,t)=>{var r={};for(var n in e)Iz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&W1)for(var n of W1(e))t.indexOf(n)<0&&Tz.call(e,n)&&(r[n]=e[n]);return r};const ame={},Mz=z.forwardRef((e,t)=>{const r=ct("InputPlaceholder",ame,e),{sx:n}=r,o=ime(r,["sx"]);return fe.createElement(at,ome({component:"span",sx:[i=>i.fn.placeholderStyles(),...p4(n)],ref:t},o))});Mz.displayName="@mantine/core/InputPlaceholder";var sme=Object.defineProperty,cme=Object.defineProperties,lme=Object.getOwnPropertyDescriptors,tI=Object.getOwnPropertySymbols,ume=Object.prototype.hasOwnProperty,fme=Object.prototype.propertyIsEnumerable,rI=(e,t,r)=>t in e?sme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pm=(e,t)=>{for(var r in t||(t={}))ume.call(t,r)&&rI(e,r,t[r]);if(tI)for(var r of tI(t))fme.call(t,r)&&rI(e,r,t[r]);return e},X_=(e,t)=>cme(e,lme(t));const zn={xs:xe(30),sm:xe(36),md:xe(42),lg:xe(50),xl:xe(60)},dme=["default","filled","unstyled"];function hme({theme:e,variant:t}){return dme.includes(t)?t==="default"?{border:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${xe(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:xe(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var pme=ft((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:i,iconWidth:a,offsetBottom:s,offsetTop:c,pointer:l},{variant:u,size:d})=>{const p=e.fn.variant({variant:"filled",color:"red"}).background,m=u==="default"||u==="filled"?{minHeight:Ke({size:d,sizes:zn}),paddingLeft:`calc(${Ke({size:d,sizes:zn})} / 3)`,paddingRight:i?o||Ke({size:d,sizes:zn}):`calc(${Ke({size:d,sizes:zn})} / 3)`,borderRadius:e.fn.radius(r)}:u==="unstyled"&&i?{paddingRight:o||Ke({size:d,sizes:zn})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:s?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:X_(pm(pm(X_(pm({},e.fn.fontStyles()),{height:t?u==="unstyled"?void 0:"auto":Ke({size:d,sizes:zn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Ke({size:d,sizes:zn})} - ${xe(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Ke({size:d,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:l?"pointer":void 0}),hme({theme:e,variant:u})),m),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:p,borderColor:p,"&::placeholder":{opacity:1,color:p}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?xe(a):Ke({size:d,sizes:zn})},"&::placeholder":X_(pm({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?xe(a):Ke({size:d,sizes:zn}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Ke({size:d,sizes:zn})}}});const gme=pme;var mme=Object.defineProperty,vme=Object.defineProperties,yme=Object.getOwnPropertyDescriptors,G1=Object.getOwnPropertySymbols,kz=Object.prototype.hasOwnProperty,$z=Object.prototype.propertyIsEnumerable,nI=(e,t,r)=>t in e?mme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gm=(e,t)=>{for(var r in t||(t={}))kz.call(t,r)&&nI(e,r,t[r]);if(G1)for(var r of G1(t))$z.call(t,r)&&nI(e,r,t[r]);return e},oI=(e,t)=>vme(e,yme(t)),bme=(e,t)=>{var r={};for(var n in e)kz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&G1)for(var n of G1(e))t.indexOf(n)<0&&$z.call(e,n)&&(r[n]=e[n]);return r};const wme={size:"sm",variant:"default"},uu=z.forwardRef((e,t)=>{const r=ct("Input",wme,e),{className:n,error:o,required:i,disabled:a,variant:s,icon:c,style:l,rightSectionWidth:u,iconWidth:d,rightSection:p,rightSectionProps:m,radius:w,size:A,wrapperProps:T,classNames:O,styles:P,__staticSelector:$,multiline:R,sx:j,unstyled:I,pointer:b}=r,N=bme(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:V,offsetTop:Z,describedBy:q}=Uge(),{classes:_,cx:y}=gme({radius:w,multiline:R,invalid:!!o,rightSectionWidth:u?xe(u):void 0,iconWidth:d,withRightSection:!!p,offsetBottom:V,offsetTop:Z,pointer:b},{classNames:O,styles:P,name:["Input",$],unstyled:I,variant:s,size:A}),{systemStyles:f,rest:h}=wd(N);return fe.createElement(at,gm(gm({className:y(_.wrapper,n),sx:j,style:l},f),T),c&&fe.createElement("div",{className:_.icon},c),fe.createElement(at,oI(gm({component:"input"},h),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":q,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:_.input})),p&&fe.createElement("div",oI(gm({},m),{className:_.rightSection}),p))});uu.displayName="@mantine/core/Input";uu.Wrapper=Oz;uu.Label=K4;uu.Description=J4;uu.Error=Y4;uu.Placeholder=Mz;const ga=uu,_me={xs:xe(12),sm:xe(18),md:xe(24),lg:xe(34),xl:xe(42)};var xme=ft((e,{color:t,transitionDuration:r},{size:n})=>{const o=Ke({size:n,sizes:_me}),i=t||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:i,outline:`${xe(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${r}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}});const Sme=xme;var Eme=Object.defineProperty,K1=Object.getOwnPropertySymbols,Dz=Object.prototype.hasOwnProperty,Rz=Object.prototype.propertyIsEnumerable,iI=(e,t,r)=>t in e?Eme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cme=(e,t)=>{for(var r in t||(t={}))Dz.call(t,r)&&iI(e,r,t[r]);if(K1)for(var r of K1(t))Rz.call(t,r)&&iI(e,r,t[r]);return e},Pme=(e,t)=>{var r={};for(var n in e)Dz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&K1)for(var n of K1(e))t.indexOf(n)<0&&Rz.call(e,n)&&(r[n]=e[n]);return r};const Ame={size:"md",transitionDuration:300},Nz=z.forwardRef((e,t)=>{const r=ct("Burger",Ame,e),{className:n,opened:o,color:i,size:a,classNames:s,styles:c,transitionDuration:l,variant:u}=r,d=Pme(r,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:p,cx:m}=Sme({color:i,transitionDuration:l},{classNames:s,styles:c,name:"Burger",variant:u,size:a});return fe.createElement(D0,Cme({className:m(p.root,n),ref:t},d),fe.createElement("div",{"data-opened":o||void 0,className:p.burger}))});Nz.displayName="@mantine/core/Burger";var Ome=ft((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${xe(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${xe(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${xe(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${xe(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Ime=Ome;var Tme=Object.defineProperty,Y1=Object.getOwnPropertySymbols,Bz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,aI=(e,t,r)=>t in e?Tme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mme=(e,t)=>{for(var r in t||(t={}))Bz.call(t,r)&&aI(e,r,t[r]);if(Y1)for(var r of Y1(t))Fz.call(t,r)&&aI(e,r,t[r]);return e},kme=(e,t)=>{var r={};for(var n in e)Bz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Y1)for(var n of Y1(e))t.indexOf(n)<0&&Fz.call(e,n)&&(r[n]=e[n]);return r};const $me={orientation:"horizontal",buttonBorderWidth:1},jz=z.forwardRef((e,t)=>{const r=ct("ButtonGroup",$me,e),{className:n,orientation:o,buttonBorderWidth:i,unstyled:a}=r,s=kme(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:l}=Ime({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:a});return fe.createElement(at,Mme({className:l(c.root,n),ref:t},s))});jz.displayName="@mantine/core/ButtonGroup";var Dme=Object.defineProperty,Rme=Object.defineProperties,Nme=Object.getOwnPropertyDescriptors,sI=Object.getOwnPropertySymbols,Bme=Object.prototype.hasOwnProperty,Fme=Object.prototype.propertyIsEnumerable,cI=(e,t,r)=>t in e?Dme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,za=(e,t)=>{for(var r in t||(t={}))Bme.call(t,r)&&cI(e,r,t[r]);if(sI)for(var r of sI(t))Fme.call(t,r)&&cI(e,r,t[r]);return e},gv=(e,t)=>Rme(e,Nme(t));const jme=["filled","outline","light","white","default","subtle","gradient"],Px={xs:{height:zn.xs,paddingLeft:xe(14),paddingRight:xe(14)},sm:{height:zn.sm,paddingLeft:xe(18),paddingRight:xe(18)},md:{height:zn.md,paddingLeft:xe(22),paddingRight:xe(22)},lg:{height:zn.lg,paddingLeft:xe(26),paddingRight:xe(26)},xl:{height:zn.xl,paddingLeft:xe(32),paddingRight:xe(32)},"compact-xs":{height:xe(22),paddingLeft:xe(7),paddingRight:xe(7)},"compact-sm":{height:xe(26),paddingLeft:xe(8),paddingRight:xe(8)},"compact-md":{height:xe(30),paddingLeft:xe(10),paddingRight:xe(10)},"compact-lg":{height:xe(34),paddingLeft:xe(12),paddingRight:xe(12)},"compact-xl":{height:xe(40),paddingLeft:xe(14),paddingRight:xe(14)}};function Lme({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return Px[`compact-${t}`];const o=Px[t];return o?gv(za({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const Ume=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function Hme({variant:e,theme:t,color:r,gradient:n}){if(!jme.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?za({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):za({border:`${xe(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var zme=ft((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:i,color:a,gradient:s},{variant:c,size:l})=>({root:gv(za(gv(za(za(za(za({},Lme({compact:n,size:l,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),Ume(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:Ke({size:l,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),Hme({variant:c,theme:e,color:a,gradient:s})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":gv(za({content:'""'},e.fn.cover(xe(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const Vme=zme;var qme=Object.defineProperty,J1=Object.getOwnPropertySymbols,Lz=Object.prototype.hasOwnProperty,Uz=Object.prototype.propertyIsEnumerable,lI=(e,t,r)=>t in e?qme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uI=(e,t)=>{for(var r in t||(t={}))Lz.call(t,r)&&lI(e,r,t[r]);if(J1)for(var r of J1(t))Uz.call(t,r)&&lI(e,r,t[r]);return e},Wme=(e,t)=>{var r={};for(var n in e)Lz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&J1)for(var n of J1(e))t.indexOf(n)<0&&Uz.call(e,n)&&(r[n]=e[n]);return r};const Gme={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},Z4=z.forwardRef((e,t)=>{const r=ct("Button",Gme,e),{className:n,size:o,color:i,type:a,disabled:s,children:c,leftIcon:l,rightIcon:u,fullWidth:d,variant:p,radius:m,uppercase:w,compact:A,loading:T,loaderPosition:O,loaderProps:P,gradient:$,classNames:R,styles:j,unstyled:I}=r,b=Wme(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:N,cx:V,theme:Z}=Vme({radius:m,color:i,fullWidth:d,compact:A,gradient:$,withLeftIcon:!!l,withRightIcon:!!u},{name:"Button",unstyled:I,classNames:R,styles:j,variant:p,size:o}),q=Z.fn.variant({color:i,variant:p}),_=fe.createElement(Zl,uI({color:q.color,size:`calc(${Ke({size:o,sizes:Px}).height} / 2)`},P));return fe.createElement(D0,uI({className:V(N.root,n),type:a,disabled:s,"data-button":!0,"data-disabled":s||void 0,"data-loading":T||void 0,ref:t,unstyled:I},b),fe.createElement("div",{className:N.inner},(l||T&&O==="left")&&fe.createElement("span",{className:V(N.icon,N.leftIcon)},T&&O==="left"?_:l),T&&O==="center"&&fe.createElement("span",{className:N.centerLoader},_),fe.createElement("span",{className:N.label,style:{textTransform:w?"uppercase":void 0}},c),(u||T&&O==="right")&&fe.createElement("span",{className:V(N.icon,N.rightIcon)},T&&O==="right"?_:u)))});Z4.displayName="@mantine/core/Button";Z4.Group=jz;const _r=Z4;var Kme=ft((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const Yme=Kme;var Jme=Object.defineProperty,Z1=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,zz=Object.prototype.propertyIsEnumerable,fI=(e,t,r)=>t in e?Jme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zme=(e,t)=>{for(var r in t||(t={}))Hz.call(t,r)&&fI(e,r,t[r]);if(Z1)for(var r of Z1(t))zz.call(t,r)&&fI(e,r,t[r]);return e},Xme=(e,t)=>{var r={};for(var n in e)Hz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Z1)for(var n of Z1(e))t.indexOf(n)<0&&zz.call(e,n)&&(r[n]=e[n]);return r};const Qme={},Vz=z.forwardRef((e,t)=>{const r=ct("Paper",Qme,e),{className:n,children:o,radius:i,withBorder:a,shadow:s,unstyled:c,variant:l}=r,u=Xme(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:d,cx:p}=Yme({radius:i,shadow:s},{name:"Paper",unstyled:c,variant:l});return fe.createElement(at,Zme({className:p(d.root,n),"data-with-border":a||void 0,ref:t},u),o)});Vz.displayName="@mantine/core/Paper";const X4=Vz;var eve=ft((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const tve=eve;var rve=Object.defineProperty,X1=Object.getOwnPropertySymbols,qz=Object.prototype.hasOwnProperty,Wz=Object.prototype.propertyIsEnumerable,dI=(e,t,r)=>t in e?rve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nve=(e,t)=>{for(var r in t||(t={}))qz.call(t,r)&&dI(e,r,t[r]);if(X1)for(var r of X1(t))Wz.call(t,r)&&dI(e,r,t[r]);return e},ove=(e,t)=>{var r={};for(var n in e)qz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&X1)for(var n of X1(e))t.indexOf(n)<0&&Wz.call(e,n)&&(r[n]=e[n]);return r};const Gz=z.forwardRef((e,t)=>{const r=ct("Center",{},e),{inline:n,className:o,unstyled:i,variant:a}=r,s=ove(r,["inline","className","unstyled","variant"]),{classes:c,cx:l}=tve({inline:n},{name:"Center",unstyled:i,variant:a});return fe.createElement(at,nve({ref:t,className:l(c.root,o)},s))});Gz.displayName="@mantine/core/Center";const j0=Gz;var ive=Object.defineProperty,Q1=Object.getOwnPropertySymbols,Kz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,hI=(e,t,r)=>t in e?ive(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ey=(e,t)=>{for(var r in t||(t={}))Kz.call(t,r)&&hI(e,r,t[r]);if(Q1)for(var r of Q1(t))Yz.call(t,r)&&hI(e,r,t[r]);return e},Jz=(e,t)=>{var r={};for(var n in e)Kz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Q1)for(var n of Q1(e))t.indexOf(n)<0&&Yz.call(e,n)&&(r[n]=e[n]);return r};function Zz(e){const t=e,{width:r,height:n,style:o}=t,i=Jz(t,["width","height","style"]);return fe.createElement("svg",ey({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:ey({width:r,height:n},o)},i),fe.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function ave(e){var t=e,{indeterminate:r}=t,n=Jz(t,["indeterminate"]);return r?fe.createElement("svg",ey({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),fe.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):fe.createElement(Zz,ey({},n))}const Xz=z.createContext(null),sve=Xz.Provider,cve=()=>z.useContext(Xz),lve={};function Qz(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:i}=ct("ChipGroup",lve,e),[a,s]=Jl({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),c=u=>Array.isArray(a)?a.includes(u):u===a,l=u=>{const d=u.currentTarget.value;Array.isArray(a)?s(a.includes(d)?a.filter(p=>p!==d):[...a,d]):s(d)};return fe.createElement(sve,{value:{isChipSelected:c,onChange:l,multiple:o}},i)}Qz.displayName="@mantine/core/ChipGroup";var uve=Object.defineProperty,fve=Object.defineProperties,dve=Object.getOwnPropertyDescriptors,pI=Object.getOwnPropertySymbols,hve=Object.prototype.hasOwnProperty,pve=Object.prototype.propertyIsEnumerable,gI=(e,t,r)=>t in e?uve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ti=(e,t)=>{for(var r in t||(t={}))hve.call(t,r)&&gI(e,r,t[r]);if(pI)for(var r of pI(t))pve.call(t,r)&&gI(e,r,t[r]);return e},Jh=(e,t)=>fve(e,dve(t));const mI={xs:xe(24),sm:xe(28),md:xe(32),lg:xe(36),xl:xe(40)},lh={xs:xe(10),sm:xe(12),md:xe(14),lg:xe(16),xl:xe(18)},vI={xs:xe(16),sm:xe(20),md:xe(24),lg:xe(28),xl:xe(32)},mm={xs:xe(7.5),sm:xe(10),md:xe(11.5),lg:xe(13),xl:xe(15)};function gve(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:Ti({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Jh(Ti({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:Ti({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Ti({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:Ti({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${xe(1)} solid ${n.background}`}}:{label:null,checked:null}}var mve=ft((e,{radius:t,color:r},{size:n,variant:o})=>{const i=gve(e,{color:r},o);return{root:{},label:Jh(Ti(Jh(Ti({ref:Ii("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${xe(1)} solid transparent`,borderRadius:e.fn.radius(t),height:Ke({size:n,sizes:mI}),fontSize:Ke({size:n,sizes:e.fontSizes}),lineHeight:`calc(${Ke({size:n,sizes:mI})} - ${xe(2)})`,paddingLeft:Ke({size:n,sizes:vI}),paddingRight:Ke({size:n,sizes:vI}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),i.label),{"&[data-disabled]":Jh(Ti({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${Ii("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Ke({size:n,sizes:mm}),paddingRight:Ke({size:n,sizes:mm}),"&:not([data-disabled])":i.checked}}),iconWrapper:{ref:Ii("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${Ke({size:n,sizes:lh})} + (${Ke({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${Ke({size:n,sizes:lh})} + (${Ke({size:n,sizes:e.spacing})} / 1.5))`,height:Ke({size:n,sizes:lh}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Ke({size:n,sizes:lh}),height:`calc(${Ke({size:n,sizes:lh})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Jh(Ti({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${Ii("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:Ke({size:n,sizes:mm}),paddingRight:Ke({size:n,sizes:mm}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${Ii("label")}`]:Ti({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${Ii("label")}`]:Ti({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const vve=mve;var yve=Object.defineProperty,ty=Object.getOwnPropertySymbols,eV=Object.prototype.hasOwnProperty,tV=Object.prototype.propertyIsEnumerable,yI=(e,t,r)=>t in e?yve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vm=(e,t)=>{for(var r in t||(t={}))eV.call(t,r)&&yI(e,r,t[r]);if(ty)for(var r of ty(t))tV.call(t,r)&&yI(e,r,t[r]);return e},bve=(e,t)=>{var r={};for(var n in e)eV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ty)for(var n of ty(e))t.indexOf(n)<0&&tV.call(e,n)&&(r[n]=e[n]);return r};const wve={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},ry=z.forwardRef((e,t)=>{const r=ct("Chip",wve,e),{radius:n,type:o,size:i,variant:a,disabled:s,id:c,color:l,children:u,className:d,classNames:p,style:m,styles:w,checked:A,defaultChecked:T,onChange:O,sx:P,wrapperProps:$,value:R,unstyled:j}=r,I=bve(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),b=cve(),N=au(c),{systemStyles:V,rest:Z}=wd(I),{classes:q,cx:_}=vve({radius:n,color:l},{classNames:p,styles:w,unstyled:j,name:"Chip",variant:a,size:i}),[y,f]=Jl({value:A,defaultValue:T,finalValue:!1,onChange:O}),h=b?{checked:b.isChipSelected(R),onChange:b.onChange,type:b.multiple?"checkbox":"radio"}:{},x=h.checked||y;return fe.createElement(at,vm(vm({className:_(q.root,d),style:m,sx:P},V),$),fe.createElement("input",vm(vm({type:o,className:q.input,checked:x,onChange:v=>f(v.currentTarget.checked),id:N,disabled:s,ref:t,value:R},h),Z)),fe.createElement("label",{htmlFor:N,"data-checked":x||void 0,"data-disabled":s||void 0,className:q.label},x&&fe.createElement("span",{className:q.iconWrapper},fe.createElement(Zz,{className:q.checkIcon})),u))});ry.displayName="@mantine/core/Chip";ry.Group=Qz;var _ve=ft((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":Ke({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const xve=_ve;var Sve=Object.defineProperty,ny=Object.getOwnPropertySymbols,rV=Object.prototype.hasOwnProperty,nV=Object.prototype.propertyIsEnumerable,bI=(e,t,r)=>t in e?Sve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eve=(e,t)=>{for(var r in t||(t={}))rV.call(t,r)&&bI(e,r,t[r]);if(ny)for(var r of ny(t))nV.call(t,r)&&bI(e,r,t[r]);return e},Cve=(e,t)=>{var r={};for(var n in e)rV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ny)for(var n of ny(e))t.indexOf(n)<0&&nV.call(e,n)&&(r[n]=e[n]);return r};const Pve={sizes:{xs:xe(540),sm:xe(720),md:xe(960),lg:xe(1140),xl:xe(1320)}},Q4=z.forwardRef((e,t)=>{const r=ct("Container",Pve,e),{className:n,fluid:o,size:i,unstyled:a,sizes:s,variant:c}=r,l=Cve(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:d}=xve({fluid:o,sizes:s},{unstyled:a,name:"Container",variant:c,size:i});return fe.createElement(at,Eve({className:d(u.root,n),ref:t},l))});Q4.displayName="@mantine/core/Container";var Ave=Object.defineProperty,oy=Object.getOwnPropertySymbols,oV=Object.prototype.hasOwnProperty,iV=Object.prototype.propertyIsEnumerable,wI=(e,t,r)=>t in e?Ave(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ove=(e,t)=>{for(var r in t||(t={}))oV.call(t,r)&&wI(e,r,t[r]);if(oy)for(var r of oy(t))iV.call(t,r)&&wI(e,r,t[r]);return e},Ive=(e,t)=>{var r={};for(var n in e)oV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&oy)for(var n of oy(e))t.indexOf(n)<0&&iV.call(e,n)&&(r[n]=e[n]);return r};const Tve={timeout:1e3};function Rw(e){const t=ct("CopyButton",Tve,e),{children:r,timeout:n,value:o}=t,i=Ive(t,["children","timeout","value"]),a=hle({timeout:n}),s=()=>a.copy(o);return fe.createElement(fe.Fragment,null,r(Ove({copy:s,copied:a.copied},i)))}Rw.displayName="@mantine/core/CopyButton";const[Mve,xd]=O0("ModalBase component was not found in tree");var kve=ft(()=>({close:{marginLeft:"auto",marginRight:0}}));const $ve=kve;var Dve=Object.defineProperty,iy=Object.getOwnPropertySymbols,aV=Object.prototype.hasOwnProperty,sV=Object.prototype.propertyIsEnumerable,_I=(e,t,r)=>t in e?Dve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rve=(e,t)=>{for(var r in t||(t={}))aV.call(t,r)&&_I(e,r,t[r]);if(iy)for(var r of iy(t))sV.call(t,r)&&_I(e,r,t[r]);return e},Nve=(e,t)=>{var r={};for(var n in e)aV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&iy)for(var n of iy(e))t.indexOf(n)<0&&sV.call(e,n)&&(r[n]=e[n]);return r};const Bve={size:"sm"},Fve=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}CloseButton`,Bve,e),{className:o}=n,i=Nve(n,["className"]),{classes:a,cx:s}=$ve(null,r.stylesApi);return fe.createElement(Ow,Rve({className:s(a.close,o),ref:t,onClick:r.onClose},i))});var jve=ft(()=>({overlay:{}}));const Lve=jve;var Uve=Object.defineProperty,Hve=Object.defineProperties,zve=Object.getOwnPropertyDescriptors,xI=Object.getOwnPropertySymbols,Vve=Object.prototype.hasOwnProperty,qve=Object.prototype.propertyIsEnumerable,SI=(e,t,r)=>t in e?Uve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wve=(e,t)=>{for(var r in t||(t={}))Vve.call(t,r)&&SI(e,r,t[r]);if(xI)for(var r of xI(t))qve.call(t,r)&&SI(e,r,t[r]);return e},Gve=(e,t)=>Hve(e,zve(t)),Kve=ft((e,{color:t,opacity:r,blur:n,radius:o,gradient:i,fixed:a,zIndex:s})=>({root:Gve(Wve({},e.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,r),backgroundImage:i,backdropFilter:n?`blur(${xe(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:s,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Yve=Kve;var Jve=Object.defineProperty,ay=Object.getOwnPropertySymbols,cV=Object.prototype.hasOwnProperty,lV=Object.prototype.propertyIsEnumerable,EI=(e,t,r)=>t in e?Jve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zve=(e,t)=>{for(var r in t||(t={}))cV.call(t,r)&&EI(e,r,t[r]);if(ay)for(var r of ay(t))lV.call(t,r)&&EI(e,r,t[r]);return e},Xve=(e,t)=>{var r={};for(var n in e)cV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ay)for(var n of ay(e))t.indexOf(n)<0&&lV.call(e,n)&&(r[n]=e[n]);return r};const Qve={opacity:.6,color:"#000",zIndex:bs("modal"),radius:0},uV=z.forwardRef((e,t)=>{const r=ct("Overlay",Qve,e),{variant:n,opacity:o,color:i,blur:a,gradient:s,zIndex:c,radius:l,children:u,className:d,classNames:p,styles:m,unstyled:w,center:A,fixed:T}=r,O=Xve(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:P,cx:$}=Yve({color:i,opacity:o,blur:a,radius:l,gradient:s,fixed:T,zIndex:c},{name:"Overlay",classNames:p,styles:m,unstyled:w,variant:n});return fe.createElement(at,Zve({ref:t,className:$(P.root,d),"data-center":A||void 0},O),u)});uV.displayName="@mantine/core/Overlay";const e1e=uV;var t1e=Object.defineProperty,r1e=Object.defineProperties,n1e=Object.getOwnPropertyDescriptors,sy=Object.getOwnPropertySymbols,fV=Object.prototype.hasOwnProperty,dV=Object.prototype.propertyIsEnumerable,CI=(e,t,r)=>t in e?t1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uh=(e,t)=>{for(var r in t||(t={}))fV.call(t,r)&&CI(e,r,t[r]);if(sy)for(var r of sy(t))dV.call(t,r)&&CI(e,r,t[r]);return e},o1e=(e,t)=>r1e(e,n1e(t)),i1e=(e,t)=>{var r={};for(var n in e)fV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sy)for(var n of sy(e))t.indexOf(n)<0&&dV.call(e,n)&&(r[n]=e[n]);return r};const a1e={},s1e=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}Overlay`,a1e,e),{onClick:o,transitionProps:i,style:a,className:s}=n,c=i1e(n,["onClick","transitionProps","style","className"]),{classes:l,cx:u}=Lve(null,r.stylesApi),d=p=>{o==null||o(p),r.closeOnClickOutside&&r.onClose()};return fe.createElement(lu,o1e(uh(uh({mounted:r.opened},r.transitionProps),i),{transition:"fade"}),p=>fe.createElement(e1e,uh({ref:t,onClick:d,fixed:!0,style:uh(uh({},a),p),className:u(l.overlay,s),zIndex:r.zIndex},c)))});var c1e=ft((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const l1e=c1e;var u1e=Object.defineProperty,cy=Object.getOwnPropertySymbols,hV=Object.prototype.hasOwnProperty,pV=Object.prototype.propertyIsEnumerable,PI=(e,t,r)=>t in e?u1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fh=(e,t)=>{for(var r in t||(t={}))hV.call(t,r)&&PI(e,r,t[r]);if(cy)for(var r of cy(t))pV.call(t,r)&&PI(e,r,t[r]);return e},f1e=(e,t)=>{var r={};for(var n in e)hV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cy)for(var n of cy(e))t.indexOf(n)<0&&pV.call(e,n)&&(r[n]=e[n]);return r};const d1e={},h1e=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}Content`,d1e,e),{className:o,transitionProps:i,style:a,onKeyDown:s}=n,c=f1e(n,["className","transitionProps","style","onKeyDown"]),{classes:l,cx:u}=l1e({zIndex:r.zIndex},r.stylesApi),d=p=>{var m;((m=p.target)==null?void 0:m.getAttribute("data-mantine-stop-propagation"))!=="true"&&p.key==="Escape"&&r.closeOnEscape&&r.onClose(),s==null||s(p)};return fe.createElement(lu,fh(fh({mounted:r.opened,transition:"pop"},r.transitionProps),i),p=>fe.createElement("div",{className:u(l.inner)},fe.createElement(W4,{active:r.opened&&r.trapFocus},fe.createElement(X4,fh({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:d,ref:t,className:u(l.content,o),style:fh(fh({},a),p),shadow:r.shadow},c),c.children))))});var p1e=ft((e,{padding:t})=>{const r=Ke({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${xe(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const g1e=p1e;var m1e=Object.defineProperty,ly=Object.getOwnPropertySymbols,gV=Object.prototype.hasOwnProperty,mV=Object.prototype.propertyIsEnumerable,AI=(e,t,r)=>t in e?m1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v1e=(e,t)=>{for(var r in t||(t={}))gV.call(t,r)&&AI(e,r,t[r]);if(ly)for(var r of ly(t))mV.call(t,r)&&AI(e,r,t[r]);return e},y1e=(e,t)=>{var r={};for(var n in e)gV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ly)for(var n of ly(e))t.indexOf(n)<0&&mV.call(e,n)&&(r[n]=e[n]);return r};const b1e={},w1e=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}Header`,b1e,e),{className:o}=n,i=y1e(n,["className"]),{classes:a,cx:s}=g1e({padding:r.padding},r.stylesApi);return fe.createElement(at,v1e({ref:t,className:s(a.header,o)},i))});var _1e=ft(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const x1e=_1e;var S1e=Object.defineProperty,uy=Object.getOwnPropertySymbols,vV=Object.prototype.hasOwnProperty,yV=Object.prototype.propertyIsEnumerable,OI=(e,t,r)=>t in e?S1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E1e=(e,t)=>{for(var r in t||(t={}))vV.call(t,r)&&OI(e,r,t[r]);if(uy)for(var r of uy(t))yV.call(t,r)&&OI(e,r,t[r]);return e},C1e=(e,t)=>{var r={};for(var n in e)vV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uy)for(var n of uy(e))t.indexOf(n)<0&&yV.call(e,n)&&(r[n]=e[n]);return r};const P1e={},A1e=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}Title`,P1e,e),{className:o}=n,i=C1e(n,["className"]),{classes:a,cx:s}=x1e(null,r.stylesApi);return z.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),fe.createElement(at,E1e({component:"h2",id:r.getTitleId(),className:s(a.title,o),ref:t},i))});var O1e=ft((e,{padding:t})=>({body:{padding:Ke({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const I1e=O1e;var T1e=Object.defineProperty,fy=Object.getOwnPropertySymbols,bV=Object.prototype.hasOwnProperty,wV=Object.prototype.propertyIsEnumerable,II=(e,t,r)=>t in e?T1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M1e=(e,t)=>{for(var r in t||(t={}))bV.call(t,r)&&II(e,r,t[r]);if(fy)for(var r of fy(t))wV.call(t,r)&&II(e,r,t[r]);return e},k1e=(e,t)=>{var r={};for(var n in e)bV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fy)for(var n of fy(e))t.indexOf(n)<0&&wV.call(e,n)&&(r[n]=e[n]);return r};const $1e={},D1e=z.forwardRef((e,t)=>{const r=xd(),n=ct(`${r.__staticSelector}Body`,$1e,e),{className:o}=n,i=k1e(n,["className"]),{classes:a,cx:s}=I1e({padding:r.padding},r.stylesApi);return z.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),fe.createElement(at,M1e({id:r.getBodyId(),className:s(a.body,o),ref:t},i))});function R1e({children:e}){return fe.createElement(fe.Fragment,null,e)}function N1e({opened:e,transitionDuration:t}){const[r,n]=z.useState(e),o=z.useRef(),a=$0()?0:t;return z.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}var B1e=ft(()=>({root:{}}));const F1e=B1e;var j1e=Object.defineProperty,L1e=Object.defineProperties,U1e=Object.getOwnPropertyDescriptors,dy=Object.getOwnPropertySymbols,_V=Object.prototype.hasOwnProperty,xV=Object.prototype.propertyIsEnumerable,TI=(e,t,r)=>t in e?j1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q_=(e,t)=>{for(var r in t||(t={}))_V.call(t,r)&&TI(e,r,t[r]);if(dy)for(var r of dy(t))xV.call(t,r)&&TI(e,r,t[r]);return e},MI=(e,t)=>L1e(e,U1e(t)),H1e=(e,t)=>{var r={};for(var n in e)_V.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dy)for(var n of dy(e))t.indexOf(n)<0&&xV.call(e,n)&&(r[n]=e[n]);return r};const eC={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:bs("modal"),padding:"md",size:"md",shadow:"xl"};function Sr(e){const t=ct("ModalBase",eC,e),{opened:r,onClose:n,children:o,closeOnClickOutside:i,__staticSelector:a,transitionProps:s,withinPortal:c,portalProps:l,keepMounted:u,target:d,zIndex:p,lockScroll:m,trapFocus:w,closeOnEscape:A,returnFocus:T,padding:O,shadow:P,id:$,size:R,variant:j,classNames:I,unstyled:b,styles:N,className:V}=t,Z=H1e(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:q,cx:_}=F1e(null,{name:a,classNames:I,styles:N,unstyled:b,variant:j,size:R}),y=au($),[f,h]=z.useState(!1),[x,v]=z.useState(!1),S=typeof(s==null?void 0:s.duration)=="number"?s==null?void 0:s.duration:200,k=N1e({opened:r,transitionDuration:S});return e0("keydown",E=>{!w&&E.key==="Escape"&&A&&n()}),nU({opened:r,shouldReturnFocus:w&&T}),fe.createElement(R0,MI(Q_({},l),{withinPortal:c,target:d}),fe.createElement(Mve,{value:{__staticSelector:a,opened:r,onClose:n,closeOnClickOutside:i,transitionProps:MI(Q_({},s),{duration:S,keepMounted:u}),zIndex:p,padding:O,id:y,getTitleId:()=>`${y}-title`,getBodyId:()=>`${y}-body`,titleMounted:f,bodyMounted:x,setTitleMounted:h,setBodyMounted:v,trapFocus:w,closeOnEscape:A,shadow:P,stylesApi:{name:a,size:R,variant:j,classNames:I,styles:N,unstyled:b}}},fe.createElement(kae,{enabled:k&&m},fe.createElement(at,Q_({className:_(q.root,V)},Z),o))))}Sr.CloseButton=Fve;Sr.Overlay=s1e;Sr.Content=h1e;Sr.Header=w1e;Sr.Title=A1e;Sr.Body=D1e;Sr.NativeScrollArea=R1e;const[z1e,V1e]=O0("Grid component was not found in tree");var q1e=Object.defineProperty,kI=Object.getOwnPropertySymbols,W1e=Object.prototype.hasOwnProperty,G1e=Object.prototype.propertyIsEnumerable,$I=(e,t,r)=>t in e?q1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K1e=(e,t)=>{for(var r in t||(t={}))W1e.call(t,r)&&$I(e,r,t[r]);if(kI)for(var r of kI(t))G1e.call(t,r)&&$I(e,r,t[r]);return e};const tC=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,SV=(e,t,r)=>r||e==="auto"||e==="content"?"unset":tC(e,t),EV=(e,t)=>{if(e)return e==="auto"||t?1:0},CV=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,PV=(e,t)=>typeof e<"u"?`calc(${Ke({size:e,sizes:t.spacing})} / 2)`:void 0;function Y1e({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:i,grow:a}){return $L.reduce((s,c)=>(s[`@media (min-width: ${Kn(n.breakpoints[c])})`]={order:r[c],flexBasis:tC(e[c],o),padding:PV(i[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:SV(e[c],o,a),marginLeft:CV(t[c],o),flexGrow:EV(e[c],a)},s),{})}var J1e=ft((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:i,gutterXl:a,grow:s,offset:c,offsetXs:l,offsetSm:u,offsetMd:d,offsetLg:p,offsetXl:m,columns:w,span:A,xs:T,sm:O,md:P,lg:$,xl:R,order:j,orderXs:I,orderSm:b,orderMd:N,orderLg:V,orderXl:Z})=>({col:K1e({boxSizing:"border-box",flexGrow:EV(A,s),order:j,padding:PV(t,e),marginLeft:CV(c,w),flexBasis:tC(A,w),flexShrink:0,width:A==="content"?"auto":void 0,maxWidth:SV(A,w,s)},Y1e({sizes:{xs:T,sm:O,md:P,lg:$,xl:R},offsets:{xs:l,sm:u,md:d,lg:p,xl:m},orders:{xs:I,sm:b,md:N,lg:V,xl:Z},gutters:{xs:r,sm:n,md:o,lg:i,xl:a},theme:e,columns:w,grow:s}))}));const Z1e=J1e;var X1e=Object.defineProperty,hy=Object.getOwnPropertySymbols,AV=Object.prototype.hasOwnProperty,OV=Object.prototype.propertyIsEnumerable,DI=(e,t,r)=>t in e?X1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q1e=(e,t)=>{for(var r in t||(t={}))AV.call(t,r)&&DI(e,r,t[r]);if(hy)for(var r of hy(t))OV.call(t,r)&&DI(e,r,t[r]);return e},eye=(e,t)=>{var r={};for(var n in e)AV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hy)for(var n of hy(e))t.indexOf(n)<0&&OV.call(e,n)&&(r[n]=e[n]);return r};const tye={};function rye(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const IV=z.forwardRef((e,t)=>{const r=ct("GridCol",tye,e),{children:n,span:o,offset:i,offsetXs:a,offsetSm:s,offsetMd:c,offsetLg:l,offsetXl:u,xs:d,sm:p,md:m,lg:w,xl:A,order:T,orderXs:O,orderSm:P,orderMd:$,orderLg:R,orderXl:j,className:I,unstyled:b,variant:N}=r,V=eye(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),Z=V1e(),q=o||Z.columns,{classes:_,cx:y}=Z1e({gutter:Z.gutter,gutterXs:Z.gutterXs,gutterSm:Z.gutterSm,gutterMd:Z.gutterMd,gutterLg:Z.gutterLg,gutterXl:Z.gutterXl,offset:i,offsetXs:a,offsetSm:s,offsetMd:c,offsetLg:l,offsetXl:u,xs:d,sm:p,md:m,lg:w,xl:A,order:T,orderXs:O,orderSm:P,orderMd:$,orderLg:R,orderXl:j,grow:Z.grow,columns:Z.columns,span:q},{unstyled:b,name:"Grid",variant:N});return!rye(q)||q>Z.columns?null:fe.createElement(at,Q1e({className:y(_.col,I),ref:t},V),n)});IV.displayName="@mantine/core/Col";var nye=Object.defineProperty,RI=Object.getOwnPropertySymbols,oye=Object.prototype.hasOwnProperty,iye=Object.prototype.propertyIsEnumerable,NI=(e,t,r)=>t in e?nye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aye=(e,t)=>{for(var r in t||(t={}))oye.call(t,r)&&NI(e,r,t[r]);if(RI)for(var r of RI(t))iye.call(t,r)&&NI(e,r,t[r]);return e};function sye(e,t){return $L.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${Ke({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var cye=ft((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:c})=>({root:aye({margin:`calc(-${Ke({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},sye({xs:o,sm:i,md:a,lg:s,xl:c},e))}));const lye=cye;var uye=Object.defineProperty,py=Object.getOwnPropertySymbols,TV=Object.prototype.hasOwnProperty,MV=Object.prototype.propertyIsEnumerable,BI=(e,t,r)=>t in e?uye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fye=(e,t)=>{for(var r in t||(t={}))TV.call(t,r)&&BI(e,r,t[r]);if(py)for(var r of py(t))MV.call(t,r)&&BI(e,r,t[r]);return e},dye=(e,t)=>{var r={};for(var n in e)TV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&py)for(var n of py(e))t.indexOf(n)<0&&MV.call(e,n)&&(r[n]=e[n]);return r};const hye={gutter:"md",justify:"flex-start",align:"stretch",columns:12},mc=z.forwardRef((e,t)=>{const r=ct("Grid",hye,e),{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:c,children:l,grow:u,justify:d,align:p,columns:m,className:w,unstyled:A,variant:T}=r,O=dye(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:P,cx:$}=lye({gutter:n,justify:d,align:p,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:c},{unstyled:A,name:"Grid",variant:T});return fe.createElement(z1e,{value:{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:c,grow:u,columns:m}},fe.createElement(at,fye({className:$(P.root,w),ref:t},O),l))});mc.Col=IV;mc.displayName="@mantine/core/Grid";function pye(e){return z.Children.toArray(e).filter(Boolean)}const gye={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var mye=ft((e,{spacing:t,position:r,noWrap:n,grow:o,align:i,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:n?"nowrap":"wrap",justifyContent:gye[r],gap:Ke({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/a}% - (${xe(Ke({size:t,sizes:e.spacing}))} - ${Ke({size:t,sizes:e.spacing})} / ${a}))`:void 0,flexGrow:o?1:0}}}));const vye=mye;var yye=Object.defineProperty,gy=Object.getOwnPropertySymbols,kV=Object.prototype.hasOwnProperty,$V=Object.prototype.propertyIsEnumerable,FI=(e,t,r)=>t in e?yye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bye=(e,t)=>{for(var r in t||(t={}))kV.call(t,r)&&FI(e,r,t[r]);if(gy)for(var r of gy(t))$V.call(t,r)&&FI(e,r,t[r]);return e},wye=(e,t)=>{var r={};for(var n in e)kV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gy)for(var n of gy(e))t.indexOf(n)<0&&$V.call(e,n)&&(r[n]=e[n]);return r};const _ye={position:"left",spacing:"md"},Ut=z.forwardRef((e,t)=>{const r=ct("Group",_ye,e),{className:n,position:o,align:i,children:a,noWrap:s,grow:c,spacing:l,unstyled:u,variant:d}=r,p=wye(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),m=pye(a),{classes:w,cx:A}=vye({align:i,grow:c,noWrap:s,spacing:l,position:o,count:m.length},{unstyled:u,name:"Group",variant:d});return fe.createElement(at,bye({className:A(w.root,n),ref:t},p),m)});Ut.displayName="@mantine/core/Group";var xye=ft((e,{color:t})=>({root:{backgroundColor:e.fn.themeColor(t,e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"}}));const Sye=xye;var Eye=Object.defineProperty,my=Object.getOwnPropertySymbols,DV=Object.prototype.hasOwnProperty,RV=Object.prototype.propertyIsEnumerable,jI=(e,t,r)=>t in e?Eye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cye=(e,t)=>{for(var r in t||(t={}))DV.call(t,r)&&jI(e,r,t[r]);if(my)for(var r of my(t))RV.call(t,r)&&jI(e,r,t[r]);return e},Pye=(e,t)=>{var r={};for(var n in e)DV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&my)for(var n of my(e))t.indexOf(n)<0&&RV.call(e,n)&&(r[n]=e[n]);return r};const Aye={color:"yellow"},rC=z.forwardRef((e,t)=>{const r=ct("Mark",Aye,e),{color:n,className:o,unstyled:i,variant:a}=r,s=Pye(r,["color","className","unstyled","variant"]),{classes:c,cx:l}=Sye({color:n},{unstyled:i,name:"Mark",variant:a});return fe.createElement(at,Cye({component:"mark",ref:t,className:l(c.root,o)},s))});rC.displayName="@mantine/core/Mark";function Oye({open:e,close:t,openDelay:r,closeDelay:n}){const o=z.useRef(-1),i=z.useRef(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0?e():o.current=window.setTimeout(e,r)},c=()=>{a(),n===0?t():i.current=window.setTimeout(t,n)};return z.useEffect(()=>a,[]),{openDropdown:s,closeDropdown:c}}var Iye=Object.defineProperty,vy=Object.getOwnPropertySymbols,NV=Object.prototype.hasOwnProperty,BV=Object.prototype.propertyIsEnumerable,LI=(e,t,r)=>t in e?Iye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UI=(e,t)=>{for(var r in t||(t={}))NV.call(t,r)&&LI(e,r,t[r]);if(vy)for(var r of vy(t))BV.call(t,r)&&LI(e,r,t[r]);return e},Tye=(e,t)=>{var r={};for(var n in e)NV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vy)for(var n of vy(e))t.indexOf(n)<0&&BV.call(e,n)&&(r[n]=e[n]);return r};function Mye(e){const t=e,{width:r,height:n,style:o}=t,i=Tye(t,["width","height","style"]);return fe.createElement("svg",UI({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:UI({width:r,height:n},o)},i),fe.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var kye=Object.defineProperty,$ye=Object.defineProperties,Dye=Object.getOwnPropertyDescriptors,HI=Object.getOwnPropertySymbols,Rye=Object.prototype.hasOwnProperty,Nye=Object.prototype.propertyIsEnumerable,zI=(e,t,r)=>t in e?kye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VI=(e,t)=>{for(var r in t||(t={}))Rye.call(t,r)&&zI(e,r,t[r]);if(HI)for(var r of HI(t))Nye.call(t,r)&&zI(e,r,t[r]);return e},qI=(e,t)=>$ye(e,Dye(t)),Bye=ft((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:qI(VI({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(t)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:qI(VI({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(t)})}));const Fye=Bye;var jye=Object.defineProperty,Lye=Object.defineProperties,Uye=Object.getOwnPropertyDescriptors,yy=Object.getOwnPropertySymbols,FV=Object.prototype.hasOwnProperty,jV=Object.prototype.propertyIsEnumerable,WI=(e,t,r)=>t in e?jye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dh=(e,t)=>{for(var r in t||(t={}))FV.call(t,r)&&WI(e,r,t[r]);if(yy)for(var r of yy(t))jV.call(t,r)&&WI(e,r,t[r]);return e},Hye=(e,t)=>Lye(e,Uye(t)),zye=(e,t)=>{var r={};for(var n in e)FV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yy)for(var n of yy(e))t.indexOf(n)<0&&jV.call(e,n)&&(r[n]=e[n]);return r};const Vye={fit:"cover",width:"100%",height:"auto",radius:0},LV=z.forwardRef((e,t)=>{const r=ct("Image",Vye,e),{className:n,alt:o,src:i,fit:a,width:s,height:c,radius:l,imageProps:u,withPlaceholder:d,placeholder:p,imageRef:m,classNames:w,styles:A,caption:T,unstyled:O,style:P,variant:$}=r,R=zye(r,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:j,cx:I}=Fye({radius:l},{classNames:w,styles:A,unstyled:O,name:"Image",variant:$}),[b,N]=z.useState(!i),V=d&&b;return Mo(()=>{N(!i)},[i]),fe.createElement(at,dh({className:I(j.root,n),style:dh({width:xe(s)},P),ref:t},R),fe.createElement("figure",{className:j.figure},fe.createElement("div",{className:j.imageWrapper},fe.createElement("img",Hye(dh({src:i,alt:o,ref:m},u),{className:I(j.image,u==null?void 0:u.className),onError:Z=>{N(!0),typeof(u==null?void 0:u.onError)=="function"&&u.onError(Z)},style:dh(dh({objectFit:a,width:xe(s),height:xe(c)},V&&{overflow:"hidden"}),u==null?void 0:u.style)})),V&&fe.createElement("div",{className:j.placeholder,title:o},p||fe.createElement("div",null,fe.createElement(Mye,{width:xe(40),height:xe(40)})))),!!T&&fe.createElement(St,{component:"figcaption",size:"sm",align:"center",className:j.caption},T)))});LV.displayName="@mantine/core/Image";function nC(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}var qye=z.useLayoutEffect,Wye=function(t){var r=z.useRef(t);return qye(function(){r.current=t}),r},GI=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},Gye=function(t,r){var n=z.useRef();return z.useCallback(function(o){t.current=o,n.current&&GI(n.current,null),n.current=r,r&&GI(r,o)},[r])},KI={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},YI=function(t){Object.keys(KI).forEach(function(r){t.style.setProperty(r,KI[r],"important")})},mo=null,Kye=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Yye(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),mo||(mo=document.createElement("textarea"),mo.setAttribute("tabindex","-1"),mo.setAttribute("aria-hidden","true"),YI(mo)),mo.parentNode===null&&document.body.appendChild(mo);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var m=p;mo.style[m]=a[m]}),YI(mo),mo.value=t;var c=Kye(mo,e);mo.value="x";var l=mo.scrollHeight-o,u=l*r;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var d=l*n;return s==="border-box"&&(d=d+o+i),c=Math.min(d,c),[c,l]}var JI=function(){},Jye=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Zye=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Xye=!!document.documentElement.currentStyle,Qye=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=Jye(Zye,r),o=n.boxSizing;if(o==="")return null;Xye&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},ebe=function(t){var r=Wye(t);z.useLayoutEffect(function(){var n=function(i){r.current(i)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},tbe=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?JI:a,c=t.onHeightChange,l=c===void 0?JI:c,u=nC(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),d=u.value!==void 0,p=z.useRef(null),m=Gye(p,r),w=z.useRef(0),A=z.useRef(),T=function(){var $=p.current,R=n&&A.current?A.current:Qye($);if(R){A.current=R;var j=Yye(R,$.value||$.placeholder||"x",i,o),I=j[0],b=j[1];w.current!==I&&(w.current=I,$.style.setProperty("height",I+"px","important"),l(I,{rowHeight:b}))}},O=function($){d||T(),s($)};return z.useLayoutEffect(T),ebe(T),z.createElement("textarea",tr({},u,{onChange:O,ref:m}))},rbe=z.forwardRef(tbe);const nbe=rbe;var obe=ft(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const ibe=obe;var abe=Object.defineProperty,sbe=Object.defineProperties,cbe=Object.getOwnPropertyDescriptors,by=Object.getOwnPropertySymbols,UV=Object.prototype.hasOwnProperty,HV=Object.prototype.propertyIsEnumerable,ZI=(e,t,r)=>t in e?abe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nu=(e,t)=>{for(var r in t||(t={}))UV.call(t,r)&&ZI(e,r,t[r]);if(by)for(var r of by(t))HV.call(t,r)&&ZI(e,r,t[r]);return e},e5=(e,t)=>sbe(e,cbe(t)),lbe=(e,t)=>{var r={};for(var n in e)UV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&by)for(var n of by(e))t.indexOf(n)<0&&HV.call(e,n)&&(r[n]=e[n]);return r};const ube={autosize:!1,size:"sm",__staticSelector:"Textarea"},oC=z.forwardRef((e,t)=>{const r=ct("Textarea",ube,e),{autosize:n,maxRows:o,minRows:i,label:a,error:s,description:c,id:l,className:u,required:d,style:p,wrapperProps:m,classNames:w,styles:A,size:T,__staticSelector:O,sx:P,errorProps:$,descriptionProps:R,labelProps:j,inputWrapperOrder:I,inputContainer:b,unstyled:N,withAsterisk:V,variant:Z}=r,q=lbe(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),_=au(l),{classes:y,cx:f}=ibe(),{systemStyles:h,rest:x}=wd(q),v=Nu({required:d,ref:t,error:s,id:_,classNames:e5(Nu({},w),{input:f(y.input,w==null?void 0:w.input)}),styles:A,__staticSelector:O,size:T,multiline:!0,unstyled:N,variant:Z},x);return fe.createElement(ga.Wrapper,Nu(Nu({label:a,error:s,id:_,description:c,required:d,style:p,className:u,classNames:w,styles:A,size:T,__staticSelector:O,sx:P,errorProps:$,labelProps:j,descriptionProps:R,inputContainer:b,inputWrapperOrder:I,unstyled:N,withAsterisk:V,variant:Z},h),m),n?fe.createElement(ga,e5(Nu({},v),{component:nbe,maxRows:o,minRows:i})):fe.createElement(ga,e5(Nu({},v),{component:"textarea",rows:i})))});oC.displayName="@mantine/core/Textarea";const zV={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[fbe,L0]=O0(zV.context);var dbe=ft(e=>({divider:{marginTop:xe(4),marginBottom:xe(4),borderTop:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const hbe=dbe;var pbe=Object.defineProperty,wy=Object.getOwnPropertySymbols,VV=Object.prototype.hasOwnProperty,qV=Object.prototype.propertyIsEnumerable,XI=(e,t,r)=>t in e?pbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gbe=(e,t)=>{for(var r in t||(t={}))VV.call(t,r)&&XI(e,r,t[r]);if(wy)for(var r of wy(t))qV.call(t,r)&&XI(e,r,t[r]);return e},mbe=(e,t)=>{var r={};for(var n in e)VV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wy)for(var n of wy(e))t.indexOf(n)<0&&qV.call(e,n)&&(r[n]=e[n]);return r};const vbe={},WV=z.forwardRef((e,t)=>{const r=ct("MenuDivider",vbe,e),{children:n,className:o}=r,i=mbe(r,["children","className"]),{classNames:a,styles:s,unstyled:c,variant:l}=L0(),{classes:u,cx:d}=hbe(null,{name:"Menu",classNames:a,styles:s,unstyled:c,variant:l});return fe.createElement(at,gbe({className:d(u.divider,o),ref:t},i))});WV.displayName="@mantine/core/MenuDivider";var ybe=Object.defineProperty,_y=Object.getOwnPropertySymbols,GV=Object.prototype.hasOwnProperty,KV=Object.prototype.propertyIsEnumerable,QI=(e,t,r)=>t in e?ybe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bbe=(e,t)=>{for(var r in t||(t={}))GV.call(t,r)&&QI(e,r,t[r]);if(_y)for(var r of _y(t))KV.call(t,r)&&QI(e,r,t[r]);return e},wbe=(e,t)=>{var r={};for(var n in e)GV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_y)for(var n of _y(e))t.indexOf(n)<0&&KV.call(e,n)&&(r[n]=e[n]);return r};const _be={};function YV(e){const t=ct("MenuDropdown",_be,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,i=wbe(t,["children","onMouseEnter","onMouseLeave"]),a=z.useRef(),s=L0(),c=d=>{var p;(d.key==="ArrowUp"||d.key==="ArrowDown")&&(d.preventDefault(),(p=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||p.focus())},l=Ka(n,()=>s.trigger==="hover"&&s.openDropdown()),u=Ka(o,()=>s.trigger==="hover"&&s.closeDropdown());return fe.createElement(xs.Dropdown,bbe({onMouseEnter:l,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},i),fe.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:a,style:{outline:0}},r))}YV.displayName="@mantine/core/MenuDropdown";var xbe=Object.defineProperty,Sbe=Object.defineProperties,Ebe=Object.getOwnPropertyDescriptors,eT=Object.getOwnPropertySymbols,Cbe=Object.prototype.hasOwnProperty,Pbe=Object.prototype.propertyIsEnumerable,tT=(e,t,r)=>t in e?xbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Abe=(e,t)=>{for(var r in t||(t={}))Cbe.call(t,r)&&tT(e,r,t[r]);if(eT)for(var r of eT(t))Pbe.call(t,r)&&tT(e,r,t[r]);return e},Obe=(e,t)=>Sbe(e,Ebe(t)),Ibe=ft((e,{color:t,radius:r})=>({item:Obe(Abe({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const Tbe=Ibe;var Mbe=Object.defineProperty,kbe=Object.defineProperties,$be=Object.getOwnPropertyDescriptors,xy=Object.getOwnPropertySymbols,JV=Object.prototype.hasOwnProperty,ZV=Object.prototype.propertyIsEnumerable,rT=(e,t,r)=>t in e?Mbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dbe=(e,t)=>{for(var r in t||(t={}))JV.call(t,r)&&rT(e,r,t[r]);if(xy)for(var r of xy(t))ZV.call(t,r)&&rT(e,r,t[r]);return e},Rbe=(e,t)=>kbe(e,$be(t)),Nbe=(e,t)=>{var r={};for(var n in e)JV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xy)for(var n of xy(e))t.indexOf(n)<0&&ZV.call(e,n)&&(r[n]=e[n]);return r};const Bbe={},XV=z.forwardRef((e,t)=>{const r=ct("MenuItem",Bbe,e),{children:n,className:o,color:i,closeMenuOnClick:a,icon:s,rightSection:c}=r,l=Nbe(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=L0(),{classes:d,cx:p,theme:m}=Tbe({radius:u.radius,color:i},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),w=z.useRef(),A=u.getItemIndex(w.current),T=l,O=Ka(T.onMouseLeave,()=>u.setHovered(-1)),P=Ka(T.onMouseEnter,()=>u.setHovered(u.getItemIndex(w.current))),$=Ka(T.onClick,()=>{typeof a=="boolean"?a&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),R=Ka(T.onFocus,()=>u.setHovered(u.getItemIndex(w.current)));return fe.createElement(at,Rbe(Dbe({component:"button",type:"button"},l),{tabIndex:-1,onFocus:R,className:p(d.item,o),ref:jc(w,t),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===A?!0:void 0,onMouseEnter:P,onMouseLeave:O,onClick:$,onKeyDown:Nae({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:m.dir,orientation:"vertical",onKeyDown:T.onKeydown})}),s&&fe.createElement("div",{className:d.itemIcon},s),n&&fe.createElement("div",{className:d.itemLabel},n),c&&fe.createElement("div",{className:d.itemRightSection},c))});XV.displayName="@mantine/core/MenuItem";const Fbe=XV;var jbe=ft(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Lbe=jbe;var Ube=Object.defineProperty,Sy=Object.getOwnPropertySymbols,QV=Object.prototype.hasOwnProperty,eq=Object.prototype.propertyIsEnumerable,nT=(e,t,r)=>t in e?Ube(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hbe=(e,t)=>{for(var r in t||(t={}))QV.call(t,r)&&nT(e,r,t[r]);if(Sy)for(var r of Sy(t))eq.call(t,r)&&nT(e,r,t[r]);return e},zbe=(e,t)=>{var r={};for(var n in e)QV.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sy)for(var n of Sy(e))t.indexOf(n)<0&&eq.call(e,n)&&(r[n]=e[n]);return r};const Vbe={},tq=z.forwardRef((e,t)=>{const r=ct("MenuLabel",Vbe,e),{children:n,className:o}=r,i=zbe(r,["children","className"]),{classNames:a,styles:s,unstyled:c,variant:l}=L0(),{classes:u,cx:d}=Lbe(null,{name:"Menu",classNames:a,styles:s,unstyled:c,variant:l});return fe.createElement(St,Hbe({className:d(u.label,o),ref:t},i),n)});tq.displayName="@mantine/core/MenuLabel";var qbe=Object.defineProperty,Ey=Object.getOwnPropertySymbols,rq=Object.prototype.hasOwnProperty,nq=Object.prototype.propertyIsEnumerable,oT=(e,t,r)=>t in e?qbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wbe=(e,t)=>{for(var r in t||(t={}))rq.call(t,r)&&oT(e,r,t[r]);if(Ey)for(var r of Ey(t))nq.call(t,r)&&oT(e,r,t[r]);return e},Gbe=(e,t)=>{var r={};for(var n in e)rq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ey)for(var n of Ey(e))t.indexOf(n)<0&&nq.call(e,n)&&(r[n]=e[n]);return r};const Kbe={refProp:"ref"},oq=z.forwardRef((e,t)=>{const r=ct("MenuTarget",Kbe,e),{children:n,refProp:o}=r,i=Gbe(r,["children","refProp"]);if(!I0(n))throw new Error(zV.children);const a=L0(),s=Ka(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),c=Ka(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),l=Ka(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return fe.createElement(xs.Target,Wbe({refProp:o,popupType:"menu",ref:t},i),z.cloneElement(n,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0}))});oq.displayName="@mantine/core/MenuTarget";var Ybe=ft({dropdown:{padding:xe(4)}});const Jbe=Ybe;var Zbe=Object.defineProperty,Xbe=Object.defineProperties,Qbe=Object.getOwnPropertyDescriptors,Cy=Object.getOwnPropertySymbols,iq=Object.prototype.hasOwnProperty,aq=Object.prototype.propertyIsEnumerable,iT=(e,t,r)=>t in e?Zbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aT=(e,t)=>{for(var r in t||(t={}))iq.call(t,r)&&iT(e,r,t[r]);if(Cy)for(var r of Cy(t))aq.call(t,r)&&iT(e,r,t[r]);return e},sT=(e,t)=>Xbe(e,Qbe(t)),ewe=(e,t)=>{var r={};for(var n in e)iq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cy)for(var n of Cy(e))t.indexOf(n)<0&&aq.call(e,n)&&(r[n]=e[n]);return r};const twe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function Xo(e){const t=ct("Menu",twe,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,onChange:s,closeOnItemClick:c,loop:l,closeOnEscape:u,trigger:d,openDelay:p,closeDelay:m,classNames:w,styles:A,unstyled:T,radius:O,variant:P}=t,$=ewe(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:R,cx:j}=Jbe(),[I,{setHovered:b,resetHovered:N}]=Lae(),[V,Z]=Jl({value:i,defaultValue:a,finalValue:!1,onChange:s}),q=()=>{Z(!1),V&&(o==null||o())},_=()=>{Z(!0),!V&&(n==null||n())},y=()=>V?q():_(),{openDropdown:f,closeDropdown:h}=Oye({open:_,close:q,closeDelay:m,openDelay:p}),x=v=>Bae("[data-menu-item]","[data-menu-dropdown]",v);return Mo(()=>{N()},[V]),fe.createElement(fbe,{value:{opened:V,toggleDropdown:y,getItemIndex:x,hovered:I,setHovered:b,closeOnItemClick:c,closeDropdown:d==="click"?q:h,openDropdown:d==="click"?_:f,closeDropdownImmediately:q,loop:l,trigger:d,radius:O,classNames:w,styles:A,unstyled:T,variant:P}},fe.createElement(xs,sT(aT({},$),{radius:O,opened:V,onChange:y,defaultOpened:a,trapFocus:d==="click",closeOnEscape:u&&d==="click",__staticSelector:"Menu",classNames:sT(aT({},w),{dropdown:j(R.dropdown,w==null?void 0:w.dropdown)}),styles:A,unstyled:T,variant:P}),r))}Xo.displayName="@mantine/core/Menu";Xo.Item=Fbe;Xo.Label=tq;Xo.Dropdown=YV;Xo.Target=oq;Xo.Divider=WV;const[rwe,nwe]=O0("Modal component was not found in tree"),owe={xs:xe(320),sm:xe(380),md:xe(440),lg:xe(620),xl:xe(780)};var iwe=ft((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${Ke({size:i,sizes:owe})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${xe(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const awe=iwe;var swe=Object.defineProperty,cwe=Object.defineProperties,lwe=Object.getOwnPropertyDescriptors,Py=Object.getOwnPropertySymbols,sq=Object.prototype.hasOwnProperty,cq=Object.prototype.propertyIsEnumerable,cT=(e,t,r)=>t in e?swe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ax=(e,t)=>{for(var r in t||(t={}))sq.call(t,r)&&cT(e,r,t[r]);if(Py)for(var r of Py(t))cq.call(t,r)&&cT(e,r,t[r]);return e},lq=(e,t)=>cwe(e,lwe(t)),uwe=(e,t)=>{var r={};for(var n in e)sq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Py)for(var n of Py(e))t.indexOf(n)<0&&cq.call(e,n)&&(r[n]=e[n]);return r};const fwe=lq(Ax({},eC),{yOffset:"5dvh",xOffset:"5vw"});function uq(e){const t=ct("ModalRoot",fwe,e),{classNames:r,variant:n,size:o,yOffset:i,xOffset:a,scrollAreaComponent:s,radius:c,centered:l,fullScreen:u}=t,d=uwe(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:p,cx:m}=awe({yOffset:i,xOffset:a,centered:l,fullScreen:u},{name:"Modal",variant:n,size:o});return fe.createElement(rwe,{value:{yOffset:i,scrollAreaComponent:s,radius:c}},fe.createElement(Sr,Ax({__staticSelector:"Modal",size:o,variant:n,classNames:lq(Ax({},r),{content:m(p.content,r==null?void 0:r.content),inner:m(p.inner,r==null?void 0:r.inner)})},d)))}var dwe=Object.defineProperty,Ay=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,dq=Object.prototype.propertyIsEnumerable,lT=(e,t,r)=>t in e?dwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hwe=(e,t)=>{for(var r in t||(t={}))fq.call(t,r)&&lT(e,r,t[r]);if(Ay)for(var r of Ay(t))dq.call(t,r)&&lT(e,r,t[r]);return e},pwe=(e,t)=>{var r={};for(var n in e)fq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ay)for(var n of Ay(e))t.indexOf(n)<0&&dq.call(e,n)&&(r[n]=e[n]);return r};const gwe={shadow:"xl"},hq=z.forwardRef((e,t)=>{const r=ct("ModalContent",gwe,e),{children:n,scrollAreaComponent:o}=r,i=pwe(r,["children","scrollAreaComponent"]),a=nwe(),s=o||a.scrollAreaComponent||Sr.NativeScrollArea;return fe.createElement(Sr.Content,hwe({ref:t,radius:a.radius},i),fe.createElement(s,{style:{maxHeight:`calc(100dvh - (${xe(a.yOffset)} * 2))`}},n))});var mwe=Object.defineProperty,vwe=Object.defineProperties,ywe=Object.getOwnPropertyDescriptors,Oy=Object.getOwnPropertySymbols,pq=Object.prototype.hasOwnProperty,gq=Object.prototype.propertyIsEnumerable,uT=(e,t,r)=>t in e?mwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mv=(e,t)=>{for(var r in t||(t={}))pq.call(t,r)&&uT(e,r,t[r]);if(Oy)for(var r of Oy(t))gq.call(t,r)&&uT(e,r,t[r]);return e},bwe=(e,t)=>vwe(e,ywe(t)),wwe=(e,t)=>{var r={};for(var n in e)pq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Oy)for(var n of Oy(e))t.indexOf(n)<0&&gq.call(e,n)&&(r[n]=e[n]);return r};const _we=bwe(mv({},eC),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ss(e){const t=ct("Modal",_we,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s}=t,c=wwe(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),l=!!r||i;return fe.createElement(uq,mv({},c),n&&fe.createElement(Sr.Overlay,mv({},o)),fe.createElement(hq,null,l&&fe.createElement(Sr.Header,null,r&&fe.createElement(Sr.Title,null,r),i&&fe.createElement(Sr.CloseButton,mv({},a))),fe.createElement(Sr.Body,null,s)))}Ss.Root=uq;Ss.CloseButton=Sr.CloseButton;Ss.Overlay=Sr.Overlay;Ss.Content=hq;Ss.Header=Sr.Header;Ss.Title=Sr.Title;Ss.Body=Sr.Body;Ss.NativeScrollArea=Sr.NativeScrollArea;var xwe=Object.defineProperty,Iy=Object.getOwnPropertySymbols,mq=Object.prototype.hasOwnProperty,vq=Object.prototype.propertyIsEnumerable,fT=(e,t,r)=>t in e?xwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dT=(e,t)=>{for(var r in t||(t={}))mq.call(t,r)&&fT(e,r,t[r]);if(Iy)for(var r of Iy(t))vq.call(t,r)&&fT(e,r,t[r]);return e},Swe=(e,t)=>{var r={};for(var n in e)mq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Iy)for(var n of Iy(e))t.indexOf(n)<0&&vq.call(e,n)&&(r[n]=e[n]);return r};const Ewe={xs:xe(14),sm:xe(18),md:xe(20),lg:xe(24),xl:xe(28)};function Cwe(e){var t=e,{size:r,error:n,style:o}=t,i=Swe(t,["size","error","style"]);const a=Kr(),s=Ke({size:r,sizes:Ewe});return fe.createElement("svg",dT({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:dT({color:n?a.colors.red[6]:a.colors.gray[6],width:s,height:s},o),"data-chevron":!0},i),fe.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Pwe=Object.defineProperty,Awe=Object.defineProperties,Owe=Object.getOwnPropertyDescriptors,hT=Object.getOwnPropertySymbols,Iwe=Object.prototype.hasOwnProperty,Twe=Object.prototype.propertyIsEnumerable,pT=(e,t,r)=>t in e?Pwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mwe=(e,t)=>{for(var r in t||(t={}))Iwe.call(t,r)&&pT(e,r,t[r]);if(hT)for(var r of hT(t))Twe.call(t,r)&&pT(e,r,t[r]);return e},kwe=(e,t)=>Awe(e,Owe(t));function yq({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?fe.createElement(Ow,kwe(Mwe({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:i=>i.preventDefault()})):fe.createElement(Cwe,{error:o,size:n})}yq.displayName="@mantine/core/SelectRightSection";var $we=Object.defineProperty,Dwe=Object.defineProperties,Rwe=Object.getOwnPropertyDescriptors,Ty=Object.getOwnPropertySymbols,bq=Object.prototype.hasOwnProperty,wq=Object.prototype.propertyIsEnumerable,gT=(e,t,r)=>t in e?$we(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t5=(e,t)=>{for(var r in t||(t={}))bq.call(t,r)&&gT(e,r,t[r]);if(Ty)for(var r of Ty(t))wq.call(t,r)&&gT(e,r,t[r]);return e},mT=(e,t)=>Dwe(e,Rwe(t)),Nwe=(e,t)=>{var r={};for(var n in e)bq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ty)for(var n of Ty(e))t.indexOf(n)<0&&wq.call(e,n)&&(r[n]=e[n]);return r};function Bwe(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:i}=t,a=Nwe(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const s=typeof r=="function"?r(i):r;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&fe.createElement(yq,t5({},a)),styles:mT(t5({},s),{rightSection:mT(t5({},s==null?void 0:s.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}var Fwe=ft((e,{color:t,radius:r,withTitle:n})=>{const o=e.fn.radius(r),i=e.fn.variant({variant:"filled",color:t});return{closeButton:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:e.spacing.md,width:xe(28),height:xe(28),borderRadius:xe(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:i.background,color:e.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:xe(22),paddingRight:e.spacing.xs,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:o,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:xe(6),top:o,bottom:o,left:xe(4),borderRadius:o,backgroundColor:i.background},"&[data-with-icon]":{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:e.spacing.xs},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:xe(2),overflow:"hidden",textOverflow:"ellipsis",color:e.colorScheme==="dark"?e.white:e.colors.gray[9]},description:{color:n?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const jwe=Fwe;var Lwe=Object.defineProperty,Uwe=Object.defineProperties,Hwe=Object.getOwnPropertyDescriptors,My=Object.getOwnPropertySymbols,_q=Object.prototype.hasOwnProperty,xq=Object.prototype.propertyIsEnumerable,vT=(e,t,r)=>t in e?Lwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yT=(e,t)=>{for(var r in t||(t={}))_q.call(t,r)&&vT(e,r,t[r]);if(My)for(var r of My(t))xq.call(t,r)&&vT(e,r,t[r]);return e},zwe=(e,t)=>Uwe(e,Hwe(t)),Vwe=(e,t)=>{var r={};for(var n in e)_q.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&My)for(var n of My(e))t.indexOf(n)<0&&xq.call(e,n)&&(r[n]=e[n]);return r};const qwe={withCloseButton:!0},Sq=z.forwardRef((e,t)=>{const r=ct("Notification",qwe,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:c,title:l,icon:u,children:d,onClose:p,closeButtonProps:m,classNames:w,styles:A,unstyled:T,variant:O}=r,P=Vwe(r,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:$,cx:R}=jwe({color:o,radius:i,withTitle:!!l},{name:"Notification",classNames:w,styles:A,unstyled:T,variant:O});return fe.createElement(at,yT({className:R($.root,n),"data-with-icon":!!u||a||void 0,"data-with-border":c||void 0,role:"alert",ref:t},P),u&&!a&&fe.createElement("div",{className:$.icon},u),a&&fe.createElement(Zl,{size:28,color:o,className:$.loader}),fe.createElement("div",{className:$.body},l&&fe.createElement(St,{className:$.title,size:"sm",weight:500},l),fe.createElement(St,{color:"dimmed",className:$.description,size:"sm"},d)),s&&fe.createElement(Ow,zwe(yT({iconSize:16,color:"gray"},m),{onClick:p,className:$.closeButton})))});Sq.displayName="@mantine/core/Notification";const Wwe=(e,t,r)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?r==="ios"?"text":"decimal":"numeric";function bT({direction:e,size:t}){return fe.createElement("svg",{style:{width:xe(t),height:xe(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fe.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const Eq={xs:xe(20),sm:xe(24),md:xe(30),lg:xe(34),xl:xe(36)};var Gwe=ft((e,{radius:t},{size:r})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${xe(2)})`,margin:xe(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Ke({size:r,sizes:Eq}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:xe(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const Kwe=Gwe;var Ywe=Object.defineProperty,Jwe=Object.defineProperties,Zwe=Object.getOwnPropertyDescriptors,ky=Object.getOwnPropertySymbols,Cq=Object.prototype.hasOwnProperty,Pq=Object.prototype.propertyIsEnumerable,wT=(e,t,r)=>t in e?Ywe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,r5=(e,t)=>{for(var r in t||(t={}))Cq.call(t,r)&&wT(e,r,t[r]);if(ky)for(var r of ky(t))Pq.call(t,r)&&wT(e,r,t[r]);return e},Xwe=(e,t)=>Jwe(e,Zwe(t)),Qwe=(e,t)=>{var r={};for(var n in e)Cq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ky)for(var n of ky(e))t.indexOf(n)<0&&Pq.call(e,n)&&(r[n]=e[n]);return r};const e2e={type:"text",size:"sm",__staticSelector:"TextInput"},ma=z.forwardRef((e,t)=>{const r=yz("TextInput",e2e,e),{inputProps:n,wrapperProps:o}=r,i=Qwe(r,["inputProps","wrapperProps"]);return fe.createElement(ga.Wrapper,r5({},o),fe.createElement(ga,Xwe(r5(r5({},n),i),{ref:t})))});ma.displayName="@mantine/core/TextInput";var t2e=Object.defineProperty,r2e=Object.defineProperties,n2e=Object.getOwnPropertyDescriptors,$y=Object.getOwnPropertySymbols,Aq=Object.prototype.hasOwnProperty,Oq=Object.prototype.propertyIsEnumerable,_T=(e,t,r)=>t in e?t2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o2e=(e,t)=>{for(var r in t||(t={}))Aq.call(t,r)&&_T(e,r,t[r]);if($y)for(var r of $y(t))Oq.call(t,r)&&_T(e,r,t[r]);return e},i2e=(e,t)=>r2e(e,n2e(t)),a2e=(e,t)=>{var r={};for(var n in e)Aq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$y)for(var n of $y(e))t.indexOf(n)<0&&Oq.call(e,n)&&(r[n]=e[n]);return r};const s2e=e=>e||"",c2e=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const r=parseFloat(t);return Number.isNaN(r)?"":e},xT={xs:xe(10),sm:xe(14),md:xe(16),lg:xe(18),xl:xe(20)},l2e={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:s2e,parser:c2e,type:"text"},t0=z.forwardRef((e,t)=>{const r=ct("NumberInput",l2e,e),{readOnly:n,disabled:o,value:i,onChange:a,decimalSeparator:s,thousandsSeparator:c,min:l,max:u,startValue:d,step:p,stepHoldInterval:m,stepHoldDelay:w,onFocus:A,onBlur:T,onKeyDown:O,onKeyUp:P,hideControls:$,radius:R,variant:j,precision:I,removeTrailingZeros:b,defaultValue:N,noClampOnBlur:V,handlersRef:Z,classNames:q,styles:_,size:y,rightSection:f,rightSectionWidth:h,formatter:x,parser:v,inputMode:S,unstyled:k,type:E}=r,C=a2e(r,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:g,cx:M}=Kwe({radius:R},{classNames:q,styles:_,unstyled:k,name:"NumberInput",variant:j,size:y}),re=ne=>{if(ne==="")return"";let oe=ne.toFixed(I);return b&&I>0&&(oe=oe.replace(new RegExp(`[0]{0,${I}}$`),""),oe.endsWith(".")&&(oe=oe.slice(0,-1))),oe},W=ne=>{let oe=ne;return s&&(oe=oe.replace(".",s)),x(oe)},ee=ne=>{let oe=ne;return s&&(oe=oe.replaceAll(c,"").replace(s,".")),v(oe)},ce=ne=>W(re(ne)),[ie,le]=z.useState(typeof i=="number"?i:typeof N=="number"?N:""),[L,te]=z.useState(()=>ce(ie)),ae=z.useRef(),[ye,ve]=z.useState(!1),me=(ne,oe)=>{if(!ye||oe){const de=ce(ne);de!==L&&te(de)}ne!==ie&&le(ne)},Pe=typeof l=="number"?l:-1/0,he=typeof u=="number"?u:1/0,be=z.useRef();be.current=()=>{var ne;let oe;ie===""?oe=(ne=d??l)!=null?ne:0:oe=parseFloat(re(gc(ie+p,Pe,he))),me(oe,!0),a==null||a(oe)};const Ie=z.useRef();Ie.current=()=>{var ne;let oe;ie===""?oe=(ne=d??l)!=null?ne:0:oe=parseFloat(re(gc(ie-p,Pe,he))),me(oe,!0),a==null||a(oe)},sU(Z,{increment:be.current,decrement:Ie.current}),z.useEffect(()=>{ye||me(i===void 0?ie:i,!0)},[i,ye]);const we=w!==void 0&&m!==void 0,Oe=z.useRef(null),Be=z.useRef(0),ke=()=>{Oe.current&&window.clearTimeout(Oe.current),Oe.current=null,Be.current=0},Me=ne=>{ne?be.current():Ie.current(),Be.current+=1},Ue=ne=>{if(Me(ne),we){const oe=typeof m=="number"?m:m(Be.current);Oe.current=window.setTimeout(()=>Ue(ne),oe)}},je=(ne,oe)=>{ne.preventDefault(),ae.current.focus(),Me(oe),we&&(Oe.current=window.setTimeout(()=>Ue(oe),w))};z.useEffect(()=>(ke(),ke),[]);const X=fe.createElement("div",{className:g.rightSection},fe.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie>=u,className:M(g.control,g.controlUp),onPointerDown:ne=>{je(ne,!0)},onPointerUp:ke,onPointerLeave:ke},fe.createElement(bT,{size:Ke({size:y,sizes:xT}),direction:"up"})),fe.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie<=l,className:M(g.control,g.controlDown),onPointerDown:ne=>{je(ne,!1)},onPointerUp:ke,onPointerLeave:ke},fe.createElement(bT,{size:Ke({size:y,sizes:xT}),direction:"down"}))),D=ne=>{let oe=ne;(oe[0]===`${s}`||oe[0]===".")&&(oe=`0${oe}`);const de=parseFloat(re(parseFloat(ee(oe)))),Te=V?de:gc(de,Pe,he),$e=Number.isNaN(Te)?"":Te,De=ie!==$e;te(ne),me($e),De&&(a==null||a($e))},H=ne=>{ne.nativeEvent.isComposing||D(ne.target.value)},F=ne=>{ve(!0),A==null||A(ne)},B=ne=>{ve(!1),T==null||T(ne)},U=ne=>{if(typeof O=="function"&&O(ne),ne.repeat&&we&&(ne.key==="ArrowUp"||ne.key==="ArrowDown")){ne.preventDefault();return}n||(ne.key==="ArrowUp"?je(ne,!0):ne.key==="ArrowDown"&&je(ne,!1))},J=ne=>{typeof P=="function"&&P(ne),(ne.key==="ArrowUp"||ne.key==="ArrowDown")&&ke()};return fe.createElement(ma,i2e(o2e({},C),{type:E,variant:j,value:L,disabled:o,readOnly:n,ref:jc(ae,t),onChange:H,onFocus:F,onBlur:B,onKeyDown:U,onKeyUp:J,rightSection:f||(o||n||$||j==="unstyled"?null:X),rightSectionWidth:h??`calc(${Ke({size:y,sizes:Eq})} + ${xe(1)})`,radius:R,max:u,min:l,step:p,size:y,styles:_,classNames:q,inputMode:S||Wwe(p,I,Zle()),__staticSelector:"NumberInput",unstyled:k}))});t0.displayName="@mantine/core/NumberInput";const Iq=z.createContext(!1),u2e=Iq.Provider,f2e=()=>z.useContext(Iq);function Tq({children:e,openDelay:t=0,closeDelay:r=0}){return fe.createElement(u2e,{value:!0},fe.createElement(m0e,{delay:{open:t,close:r}},e))}Tq.displayName="@mantine/core/TooltipGroup";var d2e=Object.defineProperty,h2e=Object.defineProperties,p2e=Object.getOwnPropertyDescriptors,ST=Object.getOwnPropertySymbols,g2e=Object.prototype.hasOwnProperty,m2e=Object.prototype.propertyIsEnumerable,ET=(e,t,r)=>t in e?d2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CT=(e,t)=>{for(var r in t||(t={}))g2e.call(t,r)&&ET(e,r,t[r]);if(ST)for(var r of ST(t))m2e.call(t,r)&&ET(e,r,t[r]);return e},v2e=(e,t)=>h2e(e,p2e(t));function y2e(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}var b2e=ft((e,{color:t,radius:r,width:n,multiline:o})=>({tooltip:v2e(CT(CT({},e.fn.fontStyles()),y2e(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const Mq=b2e,kq={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function w2e({offset:e,position:t}){const[r,n]=z.useState(!1),o=z.useRef(),{x:i,y:a,reference:s,floating:c,refs:l,update:u,placement:d}=q4({placement:t,middleware:[H4({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:t.includes("left")?e*-1:0,m=d.includes("bottom")?e:t.includes("top")?e*-1:0,w=z.useCallback(({clientX:A,clientY:T})=>{s({getBoundingClientRect(){return{width:0,height:0,x:A,y:T,left:A+p,top:T+m,right:A,bottom:T}}})},[s]);return z.useEffect(()=>{if(l.floating.current){const A=o.current;A.addEventListener("mousemove",w);const T=Qa(l.floating.current);return T.forEach(O=>{O.addEventListener("scroll",u)}),()=>{A.removeEventListener("mousemove",w),T.forEach(O=>{O.removeEventListener("scroll",u)})}}},[s,l.floating.current,u,w,r]),{handleMouseMove:w,x:i,y:a,opened:r,setOpened:n,boundaryRef:o,floating:c}}var _2e=Object.defineProperty,x2e=Object.defineProperties,S2e=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,$q=Object.prototype.hasOwnProperty,Dq=Object.prototype.propertyIsEnumerable,PT=(e,t,r)=>t in e?_2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ym=(e,t)=>{for(var r in t||(t={}))$q.call(t,r)&&PT(e,r,t[r]);if(Dy)for(var r of Dy(t))Dq.call(t,r)&&PT(e,r,t[r]);return e},bm=(e,t)=>x2e(e,S2e(t)),E2e=(e,t)=>{var r={};for(var n in e)$q.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dy)for(var n of Dy(e))t.indexOf(n)<0&&Dq.call(e,n)&&(r[n]=e[n]);return r};const C2e={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:bs("popover")};function Rq(e){var t;const r=ct("TooltipFloating",C2e,e),{children:n,refProp:o,withinPortal:i,portalProps:a,style:s,className:c,classNames:l,styles:u,unstyled:d,radius:p,color:m,label:w,offset:A,position:T,multiline:O,width:P,zIndex:$,disabled:R,variant:j}=r,I=E2e(r,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:b,x:N,y:V,opened:Z,boundaryRef:q,floating:_,setOpened:y}=w2e({offset:A,position:T}),{classes:f,cx:h}=Mq({radius:p,color:m,multiline:O,width:P},{name:"TooltipFloating",classNames:l,styles:u,unstyled:d,variant:j});if(!I0(n))throw new Error(kq.children);const x=jc(q,n.ref),v=k=>{var E,C;(C=(E=n.props).onMouseEnter)==null||C.call(E,k),b(k),y(!0)},S=k=>{var E,C;(C=(E=n.props).onMouseLeave)==null||C.call(E,k),y(!1)};return fe.createElement(fe.Fragment,null,fe.createElement(R0,bm(ym({},a),{withinPortal:i}),fe.createElement(at,bm(ym({},I),{ref:_,className:h(f.tooltip,c),style:bm(ym({},s),{zIndex:$,display:!R&&Z?"block":"none",top:V??"",left:(t=Math.round(N))!=null?t:""})}),w)),z.cloneElement(n,bm(ym({},n.props),{[o]:x,onMouseEnter:v,onMouseLeave:S})))}Rq.displayName="@mantine/core/TooltipFloating";function P2e(e){const[t,r]=z.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=f2e(),a=au(),{delay:s,currentId:c,setCurrentId:l}=ez(),u=z.useCallback(N=>{r(N),N&&l(a)},[l,a]),{x:d,y:p,reference:m,floating:w,context:A,refs:T,update:O,placement:P,middlewareData:{arrow:{x:$,y:R}={}}}=q4({placement:e.position,open:o,onOpenChange:u,middleware:[jH(e.offset),H4({padding:8}),GH(),YH({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[KH()]:[]]}),{getReferenceProps:j,getFloatingProps:I}=O0e([g0e(A,{enabled:e.events.hover,delay:i?s:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),P0e(A,{enabled:e.events.focus,keyboardOnly:!0}),A0e(A,{role:"tooltip"}),C0e(A,{enabled:typeof e.opened===void 0}),v0e(A,{id:a})]);return rz({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:T,update:O}}),Mo(()=>{var N;(N=e.onPositionChange)==null||N.call(e,P)},[P]),{x:d,y:p,arrowX:$,arrowY:R,reference:m,floating:w,getFloatingProps:I,getReferenceProps:j,isGroupPhase:o&&c&&c!==a,opened:o,placement:P}}var A2e=Object.defineProperty,O2e=Object.defineProperties,I2e=Object.getOwnPropertyDescriptors,Ry=Object.getOwnPropertySymbols,Nq=Object.prototype.hasOwnProperty,Bq=Object.prototype.propertyIsEnumerable,AT=(e,t,r)=>t in e?A2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jc=(e,t)=>{for(var r in t||(t={}))Nq.call(t,r)&&AT(e,r,t[r]);if(Ry)for(var r of Ry(t))Bq.call(t,r)&&AT(e,r,t[r]);return e},n5=(e,t)=>O2e(e,I2e(t)),T2e=(e,t)=>{var r={};for(var n in e)Nq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ry)for(var n of Ry(e))t.indexOf(n)<0&&Bq.call(e,n)&&(r[n]=e[n]);return r};const M2e={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:bs("popover"),positionDependencies:[]},Nw=z.forwardRef((e,t)=>{var r;const n=z.useRef(null),o=ct("Tooltip",M2e,e),{children:i,position:a,refProp:s,label:c,openDelay:l,closeDelay:u,onPositionChange:d,opened:p,withinPortal:m,portalProps:w,radius:A,color:T,classNames:O,styles:P,unstyled:$,style:R,className:j,withArrow:I,arrowSize:b,arrowOffset:N,arrowRadius:V,arrowPosition:Z,offset:q,transitionProps:_,multiline:y,width:f,events:h,zIndex:x,disabled:v,positionDependencies:S,onClick:k,onMouseEnter:E,onMouseLeave:C,inline:g,variant:M,keepMounted:re}=o,W=T2e(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ee,cx:ce,theme:ie}=Mq({radius:A,color:T,width:f,multiline:y},{name:"Tooltip",classNames:O,styles:P,unstyled:$,variant:M}),le=P2e({position:hz(ie.dir,a),closeDelay:u,openDelay:l,onPositionChange:d,opened:p,events:h,arrowRef:n,arrowOffset:N,offset:q+(I?b/2:0),positionDependencies:[...S,i],inline:g});if(!I0(i))throw new Error(kq.children);const L=jc(le.reference,i.ref,t);return fe.createElement(fe.Fragment,null,fe.createElement(R0,n5(Jc({},w),{withinPortal:m}),fe.createElement(lu,n5(Jc({keepMounted:re,mounted:!v&&le.opened},_),{transition:_.transition||"fade",duration:le.isGroupPhase?10:(r=_.duration)!=null?r:100}),te=>{var ae,ye;return fe.createElement(at,Jc(Jc({},W),le.getFloatingProps({ref:le.floating,className:ee.tooltip,style:n5(Jc(Jc({},R),te),{zIndex:x,top:(ae=le.y)!=null?ae:0,left:(ye=le.x)!=null?ye:0})})),c,fe.createElement(G4,{ref:n,arrowX:le.arrowX,arrowY:le.arrowY,visible:I,position:le.placement,arrowSize:b,arrowOffset:N,arrowRadius:V,arrowPosition:Z,className:ee.arrow}))})),z.cloneElement(i,le.getReferenceProps(Jc({onClick:k,onMouseEnter:E,onMouseLeave:C,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[s]:L,className:ce(j,i.props.className)},i.props))))});Nw.Group=Tq;Nw.Floating=Rq;Nw.displayName="@mantine/core/Tooltip";const U0=Nw;function k2e({size:e,thickness:t,sum:r,value:n,root:o,offset:i}){const a=(e*.9-t*2)/2,s=Math.PI*a*2/100,c=o?`${(100-r)*s}, ${r*s}`:`${n*s}, ${(100-n)*s}`;return{strokeWidth:t,cx:e/2,cy:e/2,r:a,transform:o?`scale(1, -1) translate(0, -${e})`:null,strokeDasharray:c,strokeDashoffset:o?0:i}}var $2e=Object.defineProperty,D2e=Object.defineProperties,R2e=Object.getOwnPropertyDescriptors,Ny=Object.getOwnPropertySymbols,Fq=Object.prototype.hasOwnProperty,jq=Object.prototype.propertyIsEnumerable,OT=(e,t,r)=>t in e?$2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IT=(e,t)=>{for(var r in t||(t={}))Fq.call(t,r)&&OT(e,r,t[r]);if(Ny)for(var r of Ny(t))jq.call(t,r)&&OT(e,r,t[r]);return e},N2e=(e,t)=>D2e(e,R2e(t)),B2e=(e,t)=>{var r={};for(var n in e)Fq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ny)for(var n of Ny(e))t.indexOf(n)<0&&jq.call(e,n)&&(r[n]=e[n]);return r};function Lq(e){var t=e,{size:r,value:n,offset:o,sum:i,thickness:a,root:s,color:c,lineRoundCaps:l,tooltip:u}=t,d=B2e(t,["size","value","offset","sum","thickness","root","color","lineRoundCaps","tooltip"]);const p=Kr(),m=p.fn.themeColor(c||(p.colorScheme==="dark"?"dark":"gray"),c?p.fn.primaryShade():p.colorScheme==="dark"?4:1,!1);return fe.createElement(U0.Floating,{disabled:!u,label:u},fe.createElement("circle",IT(N2e(IT({},d),{fill:"none",strokeLinecap:l?"round":"butt",stroke:m}),k2e({sum:i,size:r,thickness:a,value:n,offset:o,root:s}))))}Lq.displayName="@mantine/core/Curve";var F2e=Object.defineProperty,j2e=Object.defineProperties,L2e=Object.getOwnPropertyDescriptors,TT=Object.getOwnPropertySymbols,U2e=Object.prototype.hasOwnProperty,H2e=Object.prototype.propertyIsEnumerable,MT=(e,t,r)=>t in e?F2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hh=(e,t)=>{for(var r in t||(t={}))U2e.call(t,r)&&MT(e,r,t[r]);if(TT)for(var r of TT(t))H2e.call(t,r)&&MT(e,r,t[r]);return e},ph=(e,t)=>j2e(e,L2e(t));function z2e({size:e,thickness:t,sections:r,renderRoundedLineCaps:n,rootColor:o}){const i=r.reduce((u,d)=>u+d.value,0),a=Math.PI*((e*.9-t*2)/2)*2;let s=a;const c=[],l=[];for(let u=0;u2){l.push(ph(hh({},c[0]),{lineRoundCaps:n})),l.push(ph(hh({},c[c.length-2]),{lineRoundCaps:n}));for(let u=1;u<=c.length-3;u+=1)l.push(ph(hh({},c[u]),{lineRoundCaps:!1}))}else l.push(ph(hh({},c[0]),{lineRoundCaps:n}));return l}var V2e=ft({root:{position:"relative"},label:{position:"absolute",top:"50%",transform:"translateY(-50%)"}});const q2e=V2e;var W2e=Object.defineProperty,G2e=Object.defineProperties,K2e=Object.getOwnPropertyDescriptors,By=Object.getOwnPropertySymbols,Uq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,kT=(e,t,r)=>t in e?W2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o5=(e,t)=>{for(var r in t||(t={}))Uq.call(t,r)&&kT(e,r,t[r]);if(By)for(var r of By(t))Hq.call(t,r)&&kT(e,r,t[r]);return e},Y2e=(e,t)=>G2e(e,K2e(t)),J2e=(e,t)=>{var r={};for(var n in e)Uq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&By)for(var n of By(e))t.indexOf(n)<0&&Hq.call(e,n)&&(r[n]=e[n]);return r};const Z2e={size:120,thickness:12},zq=z.forwardRef((e,t)=>{const r=ct("RingProgress",Z2e,e),{className:n,style:o,label:i,sections:a,size:s,thickness:c,classNames:l,styles:u,roundCaps:d,rootColor:p,unstyled:m,variant:w}=r,A=J2e(r,["className","style","label","sections","size","thickness","classNames","styles","roundCaps","rootColor","unstyled","variant"]),{classes:T,cx:O}=q2e(null,{name:"RingProgress",classNames:l,styles:u,unstyled:m,variant:w}),P=z2e({size:s,thickness:c,sections:a,renderRoundedLineCaps:d,rootColor:p}).map(({data:$,sum:R,root:j,lineRoundCaps:I,offset:b},N)=>fe.createElement(Lq,Y2e(o5({},$),{key:N,size:s,thickness:c,sum:R,offset:b,color:$==null?void 0:$.color,root:j,lineRoundCaps:I})));return fe.createElement(at,o5({style:o5({width:s,height:s},o),className:O(T.root,n),ref:t},A),fe.createElement("svg",{style:{width:s,height:s,transform:"rotate(-90deg)"}},P),i&&fe.createElement("div",{className:T.label,style:{right:c*2,left:c*2}},i))});zq.displayName="@mantine/core/RingProgress";function X2e({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:i,filterDataOnExactSearchMatch:a}){if(!t)return e;const s=i!=null&&e.find(l=>l.value===i)||null;if(s&&!a&&(s==null?void 0:s.label)===n){if(r){if(r>=e.length)return e;const l=e.indexOf(s),u=l+r,d=u-e.length;return d>0?e.slice(l-d):e.slice(l,u)}return e}const c=[];for(let l=0;l=r));l+=1);return c}var Q2e=ft(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const e_e=Q2e;var t_e=Object.defineProperty,r_e=Object.defineProperties,n_e=Object.getOwnPropertyDescriptors,Fy=Object.getOwnPropertySymbols,Vq=Object.prototype.hasOwnProperty,qq=Object.prototype.propertyIsEnumerable,$T=(e,t,r)=>t in e?t_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gh=(e,t)=>{for(var r in t||(t={}))Vq.call(t,r)&&$T(e,r,t[r]);if(Fy)for(var r of Fy(t))qq.call(t,r)&&$T(e,r,t[r]);return e},i5=(e,t)=>r_e(e,n_e(t)),o_e=(e,t)=>{var r={};for(var n in e)Vq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fy)for(var n of Fy(e))t.indexOf(n)<0&&qq.call(e,n)&&(r[n]=e[n]);return r};function i_e(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function a_e(e,t){return!!e&&!t.some(r=>r.label.toLowerCase()===e.toLowerCase())}const s_e={required:!1,size:"sm",shadow:"sm",itemComponent:vH,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:i_e,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:a_e,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:bs("popover"),positionDependencies:[],dropdownPosition:"flip"},jy=z.forwardRef((e,t)=>{const r=yz("Select",s_e,e),{inputProps:n,wrapperProps:o,shadow:i,data:a,value:s,defaultValue:c,onChange:l,itemComponent:u,onKeyDown:d,onBlur:p,onFocus:m,transitionProps:w,initiallyOpened:A,unstyled:T,classNames:O,styles:P,filter:$,maxDropdownHeight:R,searchable:j,clearable:I,nothingFound:b,limit:N,disabled:V,onSearchChange:Z,searchValue:q,rightSection:_,rightSectionWidth:y,creatable:f,getCreateLabel:h,shouldCreate:x,selectOnBlur:v,onCreate:S,dropdownComponent:k,onDropdownClose:E,onDropdownOpen:C,withinPortal:g,portalProps:M,switchDirectionOnFlip:re,zIndex:W,name:ee,dropdownPosition:ce,allowDeselect:ie,placeholder:le,filterDataOnExactSearchMatch:L,form:te,positionDependencies:ae,readOnly:ye,clearButtonProps:ve,hoverOnSearchChange:me}=r,Pe=o_e(r,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:he,cx:be,theme:Ie}=e_e(),[we,Oe]=z.useState(A),[Be,ke]=z.useState(-1),Me=z.useRef(),Ue=z.useRef({}),[je,X]=z.useState("column"),D=je==="column",{scrollIntoView:H,targetRef:F,scrollableRef:B}=Fle({duration:0,offset:5,cancelable:!1,isList:!0}),U=ie===void 0?I:ie,J=Ne=>{if(we!==Ne){Oe(Ne);const We=Ne?C:E;typeof We=="function"&&We()}},ne=f&&typeof h=="function";let oe=null;const de=a.map(Ne=>typeof Ne=="string"?{label:Ne,value:Ne}:Ne),Te=Uae({data:de}),[$e,De,Xe]=Jl({value:s,defaultValue:c,finalValue:null,onChange:l}),ze=Te.find(Ne=>Ne.value===$e),[He,Ge]=Jl({value:q,defaultValue:(ze==null?void 0:ze.label)||"",finalValue:void 0,onChange:Z}),qe=Ne=>{Ge(Ne),j&&typeof Z=="function"&&Z(Ne)},pe=()=>{var Ne;ye||(De(null),Xe||qe(""),(Ne=Me.current)==null||Ne.focus())};z.useEffect(()=>{const Ne=Te.find(We=>We.value===$e);Ne?qe(Ne.label):(!ne||!$e)&&qe("")},[$e]),z.useEffect(()=>{ze&&(!j||!we)&&qe(ze.label)},[ze==null?void 0:ze.label]);const ue=Ne=>{if(!ye)if(U&&(ze==null?void 0:ze.value)===Ne.value)De(null),J(!1);else{if(Ne.creatable&&typeof S=="function"){const We=S(Ne.value);typeof We<"u"&&We!==null&&De(typeof We=="string"?We:We.value)}else De(Ne.value);Xe||qe(Ne.label),ke(-1),J(!1),Me.current.focus()}},ge=X2e({data:Te,searchable:j,limit:N,searchValue:He,filter:$,filterDataOnExactSearchMatch:L,value:$e});ne&&x(He,ge)&&(oe=h(He),ge.push({label:He,value:He,creatable:!0}));const Q=(Ne,We,mt)=>{let Je=Ne;for(;mt(Je);)if(Je=We(Je),!ge[Je].disabled)return Je;return Ne};Mo(()=>{ke(me&&He?0:-1)},[He,me]);const K=$e?ge.findIndex(Ne=>Ne.value===$e):0,Y=!ye&&(ge.length>0?we:we&&!!b),se=()=>{ke(Ne=>{var We;const mt=Q(Ne,Je=>Je-1,Je=>Je>0);return F.current=Ue.current[(We=ge[mt])==null?void 0:We.value],Y&&H({alignment:D?"start":"end"}),mt})},_e=()=>{ke(Ne=>{var We;const mt=Q(Ne,Je=>Je+1,Je=>Jewindow.setTimeout(()=>{var Ne;F.current=Ue.current[(Ne=ge[K])==null?void 0:Ne.value],H({alignment:D?"end":"start"})},50);Mo(()=>{Y&&Se()},[Y]);const Ee=Ne=>{switch(typeof d=="function"&&d(Ne),Ne.key){case"ArrowUp":{Ne.preventDefault(),we?D?se():_e():(ke(K),J(!0),Se());break}case"ArrowDown":{Ne.preventDefault(),we?D?_e():se():(ke(K),J(!0),Se());break}case"Home":{if(!j){Ne.preventDefault(),we||J(!0);const We=ge.findIndex(mt=>!mt.disabled);ke(We),Y&&H({alignment:D?"end":"start"})}break}case"End":{if(!j){Ne.preventDefault(),we||J(!0);const We=ge.map(mt=>!!mt.disabled).lastIndexOf(!1);ke(We),Y&&H({alignment:D?"end":"start"})}break}case"Escape":{Ne.preventDefault(),J(!1),ke(-1);break}case" ":{j||(Ne.preventDefault(),ge[Be]&&we?ue(ge[Be]):(J(!0),ke(K),Se()));break}case"Enter":j||Ne.preventDefault(),ge[Be]&&we&&(Ne.preventDefault(),ue(ge[Be]))}},Ve=Ne=>{typeof p=="function"&&p(Ne);const We=Te.find(mt=>mt.value===$e);v&&ge[Be]&&we&&ue(ge[Be]),qe((We==null?void 0:We.label)||""),J(!1)},Le=Ne=>{typeof m=="function"&&m(Ne),j&&J(!0)},Fe=Ne=>{ye||(qe(Ne.currentTarget.value),I&&Ne.currentTarget.value===""&&De(null),ke(-1),J(!0))},Qe=()=>{ye||(J(!we),$e&&!we&&ke(K))};return fe.createElement(ga.Wrapper,i5(gh({},o),{__staticSelector:"Select"}),fe.createElement(dp,{opened:Y,transitionProps:w,shadow:i,withinPortal:g,portalProps:M,__staticSelector:"Select",onDirectionChange:X,switchDirectionOnFlip:re,zIndex:W,dropdownPosition:ce,positionDependencies:[...ae,He],classNames:O,styles:P,unstyled:T,variant:n.variant},fe.createElement(dp.Target,null,fe.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Y?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Y,onMouseLeave:()=>ke(-1),tabIndex:-1},fe.createElement("input",{type:"hidden",name:ee,value:$e||"",form:te,disabled:V}),fe.createElement(ga,gh(i5(gh(gh({autoComplete:"off",type:"search"},n),Pe),{ref:jc(t,Me),onKeyDown:Ee,__staticSelector:"Select",value:He,placeholder:le,onChange:Fe,"aria-autocomplete":"list","aria-controls":Y?`${n.id}-items`:null,"aria-activedescendant":Be>=0?`${n.id}-${Be}`:null,onMouseDown:Qe,onBlur:Ve,onFocus:Le,readOnly:!j||ye,disabled:V,"data-mantine-stop-propagation":Y,name:null,classNames:i5(gh({},O),{input:be({[he.input]:!j},O==null?void 0:O.input)})}),Bwe({theme:Ie,rightSection:_,rightSectionWidth:y,styles:P,size:n.size,shouldClear:I&&!!ze,onClear:pe,error:o.error,clearButtonProps:ve,disabled:V,readOnly:ye}))))),fe.createElement(dp.Dropdown,{component:k||$4,maxHeight:R,direction:je,id:n.id,innerRef:B,__staticSelector:"Select",classNames:O,styles:P},fe.createElement(pH,{data:ge,hovered:Be,classNames:O,styles:P,isItemSelected:Ne=>Ne===$e,uuid:n.id,__staticSelector:"Select",onItemHover:ke,onItemSelect:ue,itemsRefs:Ue,itemComponent:u,size:n.size,nothingFound:b,creatable:ne&&!!oe,createLabel:oe,"aria-label":o.label,unstyled:T,variant:n.variant}))))});jy.displayName="@mantine/core/Select";function Wq({value:e,min:t,max:r}){const n=(e-t)/(r-t)*100;return Math.min(Math.max(n,0),100)}function c_e({value:e,containerWidth:t,min:r,max:n,step:o,precision:i}){const s=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),c=(s!==0?Math.round(s/o)*o:0)+r,l=Math.max(c,r);return i!==void 0?Number(l.toFixed(i)):l}var l_e=Object.defineProperty,u_e=Object.defineProperties,f_e=Object.getOwnPropertyDescriptors,DT=Object.getOwnPropertySymbols,d_e=Object.prototype.hasOwnProperty,h_e=Object.prototype.propertyIsEnumerable,RT=(e,t,r)=>t in e?l_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p_e=(e,t)=>{for(var r in t||(t={}))d_e.call(t,r)&&RT(e,r,t[r]);if(DT)for(var r of DT(t))h_e.call(t,r)&&RT(e,r,t[r]);return e},g_e=(e,t)=>u_e(e,f_e(t));const kn={xs:xe(4),sm:xe(6),md:xe(8),lg:xe(10),xl:xe(12)};var m_e=ft(e=>({root:g_e(p_e({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const v_e=m_e;var y_e=Object.defineProperty,b_e=Object.defineProperties,w_e=Object.getOwnPropertyDescriptors,NT=Object.getOwnPropertySymbols,__e=Object.prototype.hasOwnProperty,x_e=Object.prototype.propertyIsEnumerable,BT=(e,t,r)=>t in e?y_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S_e=(e,t)=>{for(var r in t||(t={}))__e.call(t,r)&&BT(e,r,t[r]);if(NT)for(var r of NT(t))x_e.call(t,r)&&BT(e,r,t[r]);return e},E_e=(e,t)=>b_e(e,w_e(t)),C_e=ft((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({label:{position:"absolute",top:xe(-36),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs} / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:E_e(S_e({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:r?"none":"flex",height:n?xe(n):`calc(${Ke({sizes:kn,size:o})} * 2)`,width:n?xe(n):`calc(${Ke({sizes:kn,size:o})} * 2)`,backgroundColor:e.colorScheme==="dark"?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`${xe(4)} solid ${e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}}));const P_e=C_e,Gq=z.forwardRef(({max:e,min:t,value:r,position:n,label:o,dragging:i,onMouseDown:a,onKeyDownCapture:s,color:c,classNames:l,styles:u,size:d,labelTransition:p,labelTransitionDuration:m,labelTransitionTimingFunction:w,labelAlwaysOn:A,thumbLabel:T,onFocus:O,onBlur:P,showLabelOnHover:$,isHovered:R,children:j=null,disabled:I,unstyled:b,thumbSize:N,variant:V},Z)=>{const{classes:q,cx:_,theme:y}=P_e({color:c,disabled:I,thumbSize:N},{name:"Slider",classNames:l,styles:u,unstyled:b,variant:V,size:d}),[f,h]=z.useState(!1),x=A||i||f||$&&R;return fe.createElement(at,{tabIndex:0,role:"slider","aria-label":T,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:Z,className:_(q.thumb,{[q.dragging]:i}),onFocus:()=>{h(!0),typeof O=="function"&&O()},onBlur:()=>{h(!1),typeof P=="function"&&P()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:s,onClick:v=>v.stopPropagation(),style:{[y.dir==="rtl"?"right":"left"]:`${n}%`}},j,fe.createElement(lu,{mounted:o!=null&&x,duration:m,transition:p,timingFunction:w||y.transitionTimingFunction},v=>fe.createElement("div",{style:v,className:q.label},o)))});Gq.displayName="@mantine/core/SliderThumb";function A_e({mark:e,offset:t,value:r,inverted:n=!1}){return n?typeof t=="number"&&e.value<=t||e.value>=r:typeof t=="number"?e.value>=t&&e.value<=r:e.value<=r}var O_e=ft((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({marksContainer:{position:"absolute",right:n?xe(n/2):Ke({sizes:kn,size:o}),left:n?xe(n/2):Ke({sizes:kn,size:o}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${xe(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,borderColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${xe(Ke({sizes:kn,size:o}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${xe(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,height:Ke({sizes:kn,size:o}),width:Ke({sizes:kn,size:o}),borderRadius:1e3,transform:`translateX(calc(-${Ke({sizes:kn,size:o})} / 2))`,backgroundColor:e.white,pointerEvents:"none"},markFilled:{borderColor:r?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:t}).background},markLabel:{transform:`translate(-50%, calc(${e.spacing.xs} / 2))`,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const I_e=O_e;function Kq({marks:e,color:t,size:r,thumbSize:n,min:o,max:i,value:a,classNames:s,styles:c,offset:l,onChange:u,disabled:d,unstyled:p,inverted:m,variant:w}){const{classes:A,cx:T}=I_e({color:t,disabled:d,thumbSize:n},{name:"Slider",classNames:s,styles:c,unstyled:p,variant:w,size:r}),O=e.map((P,$)=>fe.createElement(at,{className:A.markWrapper,sx:{left:`${Wq({value:P.value,min:o,max:i})}%`},key:$},fe.createElement("div",{className:T(A.mark,{[A.markFilled]:A_e({mark:P,value:a,offset:l,inverted:m})})}),P.label&&fe.createElement("div",{className:A.markLabel,onMouseDown:R=>{R.stopPropagation(),!d&&u(P.value)},onTouchStart:R=>{R.stopPropagation(),!d&&u(P.value)}},P.label)));return fe.createElement("div",{className:A.marksContainer},O)}Kq.displayName="@mantine/core/SliderMarks";var T_e=ft((e,{radius:t,color:r,disabled:n,inverted:o,thumbSize:i},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Ke({sizes:kn,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},track:{position:"relative",height:Ke({sizes:kn,size:a}),width:"100%",marginRight:i?xe(i/2):Ke({size:a,sizes:kn}),marginLeft:i?xe(i/2):Ke({size:a,sizes:kn}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.radius(t),right:`calc(${i?xe(i/2):Ke({size:a,sizes:kn})} * -1)`,left:`calc(${i?xe(i/2):Ke({size:a,sizes:kn})} * -1)`,backgroundColor:o?n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background,borderRadius:e.fn.radius(t)}}));const M_e=T_e;var k_e=Object.defineProperty,$_e=Object.defineProperties,D_e=Object.getOwnPropertyDescriptors,Ly=Object.getOwnPropertySymbols,Yq=Object.prototype.hasOwnProperty,Jq=Object.prototype.propertyIsEnumerable,FT=(e,t,r)=>t in e?k_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jT=(e,t)=>{for(var r in t||(t={}))Yq.call(t,r)&&FT(e,r,t[r]);if(Ly)for(var r of Ly(t))Jq.call(t,r)&&FT(e,r,t[r]);return e},R_e=(e,t)=>$_e(e,D_e(t)),N_e=(e,t)=>{var r={};for(var n in e)Yq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ly)for(var n of Ly(e))t.indexOf(n)<0&&Jq.call(e,n)&&(r[n]=e[n]);return r};function Zq(e){var t=e,{filled:r,size:n,thumbSize:o,color:i,classNames:a,styles:s,radius:c,children:l,offset:u,disabled:d,marksOffset:p,unstyled:m,inverted:w,variant:A,containerProps:T}=t,O=N_e(t,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:P}=M_e({color:i,radius:c,disabled:d,inverted:w,thumbSize:o},{name:"Slider",classNames:a,styles:s,unstyled:m,variant:A,size:n});return fe.createElement(fe.Fragment,null,fe.createElement("div",jT({className:P.trackContainer},T),fe.createElement("div",{className:P.track},fe.createElement(at,{className:P.bar,sx:{left:`calc(${u}% - ${o?xe(o/2):Ke({size:n,sizes:kn})})`,width:`calc(${r}% + 2 * ${o?xe(o/2):Ke({size:n,sizes:kn})})`}}),l)),fe.createElement(Kq,R_e(jT({},O),{size:n,thumbSize:o,color:i,offset:p,classNames:a,styles:s,disabled:d,unstyled:m,inverted:w,variant:A})))}Zq.displayName="@mantine/core/SliderTrack";var B_e=Object.defineProperty,F_e=Object.defineProperties,j_e=Object.getOwnPropertyDescriptors,Uy=Object.getOwnPropertySymbols,Xq=Object.prototype.hasOwnProperty,Qq=Object.prototype.propertyIsEnumerable,LT=(e,t,r)=>t in e?B_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L_e=(e,t)=>{for(var r in t||(t={}))Xq.call(t,r)&<(e,r,t[r]);if(Uy)for(var r of Uy(t))Qq.call(t,r)&<(e,r,t[r]);return e},U_e=(e,t)=>F_e(e,j_e(t)),H_e=(e,t)=>{var r={};for(var n in e)Xq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uy)for(var n of Uy(e))t.indexOf(n)<0&&Qq.call(e,n)&&(r[n]=e[n]);return r};const eW=z.forwardRef((e,t)=>{var r=e,{className:n,size:o,classNames:i,styles:a,disabled:s,unstyled:c,variant:l}=r,u=H_e(r,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:d,cx:p}=v_e(null,{name:"Slider",classNames:i,styles:a,unstyled:c,variant:l,size:o});return fe.createElement(at,U_e(L_e({},u),{tabIndex:-1,className:p(d.root,n),ref:t}))});eW.displayName="@mantine/core/SliderRoot";function wm(e,t){return parseFloat(e.toFixed(t))}function z_e(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}var V_e=Object.defineProperty,q_e=Object.defineProperties,W_e=Object.getOwnPropertyDescriptors,Hy=Object.getOwnPropertySymbols,tW=Object.prototype.hasOwnProperty,rW=Object.prototype.propertyIsEnumerable,UT=(e,t,r)=>t in e?V_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G_e=(e,t)=>{for(var r in t||(t={}))tW.call(t,r)&&UT(e,r,t[r]);if(Hy)for(var r of Hy(t))rW.call(t,r)&&UT(e,r,t[r]);return e},K_e=(e,t)=>q_e(e,W_e(t)),Y_e=(e,t)=>{var r={};for(var n in e)tW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hy)for(var n of Hy(e))t.indexOf(n)<0&&rW.call(e,n)&&(r[n]=e[n]);return r};const J_e={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},nW=z.forwardRef((e,t)=>{const r=ct("Slider",J_e,e),{classNames:n,styles:o,color:i,value:a,onChange:s,onChangeEnd:c,size:l,radius:u,min:d,max:p,step:m,precision:w,defaultValue:A,name:T,marks:O,label:P,labelTransition:$,labelTransitionDuration:R,labelTransitionTimingFunction:j,labelAlwaysOn:I,thumbLabel:b,showLabelOnHover:N,thumbChildren:V,disabled:Z,unstyled:q,thumbSize:_,scale:y,inverted:f,variant:h}=r,x=Y_e(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),v=w??z_e(m),S=Kr(),[k,E]=z.useState(!1),[C,g]=Jl({value:typeof a=="number"?gc(a,d,p):a,defaultValue:typeof A=="number"?gc(A,d,p):A,finalValue:gc(0,d,p),onChange:s}),M=z.useRef(C),re=z.useRef(),W=z.useRef(),ee=Wq({value:C,min:d,max:p}),ce=y(C),ie=typeof P=="function"?P(ce):P,le=z.useCallback(({x:ye})=>{if(!Z){const ve=c_e({value:ye,min:d,max:p,step:m,precision:v});g(ve),M.current=ve}},[Z,d,p,m,v,g]),{ref:L,active:te}=kle(le,{onScrubEnd:()=>c==null?void 0:c(M.current)},S.dir),ae=ye=>{if(!Z)switch(ye.key){case"ArrowUp":{ye.preventDefault(),W.current.focus();const ve=wm(Math.min(Math.max(C+m,d),p),v);c==null||c(ve),g(ve);break}case"ArrowRight":{ye.preventDefault(),W.current.focus();const ve=wm(Math.min(Math.max(S.dir==="rtl"?C-m:C+m,d),p),v);c==null||c(ve),g(ve);break}case"ArrowDown":{ye.preventDefault(),W.current.focus();const ve=wm(Math.min(Math.max(C-m,d),p),v);c==null||c(ve),g(ve);break}case"ArrowLeft":{ye.preventDefault(),W.current.focus();const ve=wm(Math.min(Math.max(S.dir==="rtl"?C+m:C-m,d),p),v);c==null||c(ve),g(ve);break}case"Home":{ye.preventDefault(),W.current.focus(),c==null||c(d),g(d);break}case"End":{ye.preventDefault(),W.current.focus(),c==null||c(p),g(p);break}}};return fe.createElement(eW,K_e(G_e({},x),{ref:jc(t,re),onKeyDownCapture:ae,onMouseDownCapture:()=>{var ye;return(ye=re.current)==null?void 0:ye.focus()},size:l,classNames:n,styles:o,disabled:Z,unstyled:q,variant:h}),fe.createElement(Zq,{inverted:f,offset:0,filled:ee,marks:O,size:l,thumbSize:_,radius:u,color:i,min:d,max:p,value:ce,onChange:g,classNames:n,styles:o,disabled:Z,unstyled:q,variant:h,containerProps:{ref:L,onMouseEnter:N?()=>E(!0):void 0,onMouseLeave:N?()=>E(!1):void 0}},fe.createElement(Gq,{max:p,min:d,value:ce,position:ee,dragging:te,color:i,size:l,label:ie,ref:W,labelTransition:$,labelTransitionDuration:R,labelTransitionTimingFunction:j,labelAlwaysOn:I,classNames:n,styles:o,thumbLabel:b,showLabelOnHover:N,isHovered:k,disabled:Z,unstyled:q,thumbSize:_,variant:h},V)),fe.createElement("input",{type:"hidden",name:T,value:ce}))});nW.displayName="@mantine/core/Slider";var Z_e=Object.defineProperty,zy=Object.getOwnPropertySymbols,oW=Object.prototype.hasOwnProperty,iW=Object.prototype.propertyIsEnumerable,HT=(e,t,r)=>t in e?Z_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X_e=(e,t)=>{for(var r in t||(t={}))oW.call(t,r)&&HT(e,r,t[r]);if(zy)for(var r of zy(t))iW.call(t,r)&&HT(e,r,t[r]);return e},Q_e=(e,t)=>{var r={};for(var n in e)oW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zy)for(var n of zy(e))t.indexOf(n)<0&&iW.call(e,n)&&(r[n]=e[n]);return r};const e5e={w:0,h:0},iC=z.forwardRef((e,t)=>{const r=ct("Space",e5e,e),{w:n,h:o}=r,i=Q_e(r,["w","h"]);return fe.createElement(at,X_e({ref:t,w:n,miw:n,h:o,mih:o},i))});iC.displayName="@mantine/core/Space";var t5e=ft((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:Ke({size:t,sizes:e.spacing})}}));const r5e=t5e;var n5e=Object.defineProperty,Vy=Object.getOwnPropertySymbols,aW=Object.prototype.hasOwnProperty,sW=Object.prototype.propertyIsEnumerable,zT=(e,t,r)=>t in e?n5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o5e=(e,t)=>{for(var r in t||(t={}))aW.call(t,r)&&zT(e,r,t[r]);if(Vy)for(var r of Vy(t))sW.call(t,r)&&zT(e,r,t[r]);return e},i5e=(e,t)=>{var r={};for(var n in e)aW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vy)for(var n of Vy(e))t.indexOf(n)<0&&sW.call(e,n)&&(r[n]=e[n]);return r};const a5e={spacing:"md",align:"stretch",justify:"flex-start"},H0=z.forwardRef((e,t)=>{const r=ct("Stack",a5e,e),{spacing:n,className:o,align:i,justify:a,unstyled:s,variant:c}=r,l=i5e(r,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:d}=r5e({spacing:n,align:i,justify:a},{name:"Stack",unstyled:s,variant:c});return fe.createElement(at,o5e({className:d(u.root,o),ref:t},l))});H0.displayName="@mantine/core/Stack";var s5e=Object.defineProperty,c5e=Object.defineProperties,l5e=Object.getOwnPropertyDescriptors,VT=Object.getOwnPropertySymbols,u5e=Object.prototype.hasOwnProperty,f5e=Object.prototype.propertyIsEnumerable,qT=(e,t,r)=>t in e?s5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a5=(e,t)=>{for(var r in t||(t={}))u5e.call(t,r)&&qT(e,r,t[r]);if(VT)for(var r of VT(t))f5e.call(t,r)&&qT(e,r,t[r]);return e},d5e=(e,t)=>c5e(e,l5e(t));const cW={xs:xe(34),sm:xe(36),md:xe(42),lg:xe(48),xl:xe(52)};var h5e=ft((e,{color:t,iconSize:r,radius:n,allowStepClick:o,iconPosition:i,orientation:a},{size:s})=>{const c=r?xe(r):Ke({size:s,sizes:cW}),l=s==="xl"||s==="lg"?e.spacing.md:e.spacing.sm,u=e.fn.radius(n),d=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),p=`calc(${e.spacing.xs} / 2)`,m={step:{justifyContent:"flex-start",minHeight:`calc(${c} + ${e.spacing.xl} + ${p})`,marginTop:p,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${Ii("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:a5({display:"flex",flexDirection:i==="left"?"row":"row-reverse",cursor:o?"pointer":"default"},a==="vertical"?m.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${c} + ${p})`,left:`calc(${c} / 2)`,height:"100vh",position:"absolute",borderLeft:`${xe(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,ref:Ii("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:c,width:c,minWidth:c,borderRadius:u,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],border:`${xe(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],fontSize:Ke({size:s,sizes:e.fontSizes}),"&[data-progress]":{borderColor:d.background},"&[data-completed]":{backgroundColor:d.background,borderColor:d.background,color:e.white}},stepCompletedIcon:d5e(a5({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:a5({display:"flex",flexDirection:"column",marginLeft:i==="left"?l:void 0,marginRight:i==="right"?l:void 0},a==="vertical"?{marginTop:`calc(${r} / 4)`}:null),stepLabel:{textAlign:i,fontWeight:500,fontSize:Ke({size:s,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:i,marginTop:`calc(${Ke({size:s,sizes:e.spacing})} / 3)`,marginBottom:`calc(${Ke({size:s,sizes:e.spacing})} / 3)`,fontSize:`calc(${Ke({size:s,sizes:e.fontSizes})} - ${xe(2)})`,lineHeight:1}}});const p5e=h5e;var g5e=Object.defineProperty,qy=Object.getOwnPropertySymbols,lW=Object.prototype.hasOwnProperty,uW=Object.prototype.propertyIsEnumerable,WT=(e,t,r)=>t in e?g5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s5=(e,t)=>{for(var r in t||(t={}))lW.call(t,r)&&WT(e,r,t[r]);if(qy)for(var r of qy(t))uW.call(t,r)&&WT(e,r,t[r]);return e},m5e=(e,t)=>{var r={};for(var n in e)lW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qy)for(var n of qy(e))t.indexOf(n)<0&&uW.call(e,n)&&(r[n]=e[n]);return r};const v5e={xs:16,sm:18,md:20,lg:22,xl:24},y5e={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},_m=(e,t)=>typeof e=="function"?fe.createElement(e,{step:t}):e,fW=z.forwardRef((e,t)=>{const r=ct("StepperStep",y5e,e),{className:n,step:o,state:i,color:a,icon:s,completedIcon:c,progressIcon:l,label:u,description:d,withIcon:p,iconSize:m,size:w,radius:A,loading:T,allowStepClick:O,allowStepSelect:P,iconPosition:$,__staticSelector:R,classNames:j,styles:I,unstyled:b,orientation:N,variant:V}=r,Z=m5e(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:q,cx:_}=p5e({color:a,iconSize:m,radius:A,allowStepClick:O,iconPosition:$,orientation:N},{name:R,classNames:j,styles:I,unstyled:b,variant:V,size:w}),y=Ke({size:w,sizes:v5e}),f=i==="stepCompleted"?null:i==="stepProgress"?l:s,h={"data-progress":i==="stepProgress"||void 0,"data-completed":i==="stepCompleted"||void 0};return fe.createElement(D0,s5(s5({className:_(q.step,n),tabIndex:O?0:-1,ref:t},h),Z),p&&fe.createElement("div",{className:q.stepWrapper},fe.createElement("div",s5({className:q.stepIcon},h),fe.createElement(lu,{mounted:i==="stepCompleted",transition:"pop",duration:200},x=>fe.createElement("div",{className:q.stepCompletedIcon,style:x},T?fe.createElement(Zl,{color:"#fff",size:y,className:q.stepLoader}):_m(c,o)||fe.createElement(ave,{indeterminate:!1,width:y,height:y}))),i!=="stepCompleted"?T?fe.createElement(Zl,{size:y,color:a}):_m(f||s,o):null),N==="vertical"&&fe.createElement("div",{className:_(q.verticalSeparator,{[q.verticalSeparatorActive]:i==="stepCompleted"})})),(u||d)&&fe.createElement("div",{className:q.stepBody},u&&fe.createElement(St,{className:q.stepLabel},_m(u,o)),d&&fe.createElement(St,{className:q.stepDescription,color:"dimmed"},_m(d,o))))});fW.displayName="@mantine/core/Step";function Wy(e){return null}Wy.displayName="@mantine/core/StepCompleted";var b5e=Object.defineProperty,w5e=Object.defineProperties,_5e=Object.getOwnPropertyDescriptors,GT=Object.getOwnPropertySymbols,x5e=Object.prototype.hasOwnProperty,S5e=Object.prototype.propertyIsEnumerable,KT=(e,t,r)=>t in e?b5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mh=(e,t)=>{for(var r in t||(t={}))x5e.call(t,r)&&KT(e,r,t[r]);if(GT)for(var r of GT(t))S5e.call(t,r)&&KT(e,r,t[r]);return e},E5e=(e,t)=>w5e(e,_5e(t)),C5e=ft((e,{contentPadding:t,color:r,orientation:n,iconPosition:o,iconSize:i,breakpoint:a},{size:s})=>{const c=typeof a<"u",l=ai(Ke({size:a,sizes:e.breakpoints})),u=typeof i<"u"?`calc(${xe(i)} / 2 - ${xe(1)})`:`calc(${Ke({size:s,sizes:cW})} / 2 - ${xe(1)})`,d={steps:{flexDirection:"column",alignItems:o==="left"?"flex-start":"flex-end"},separator:{width:xe(2),minHeight:e.spacing.xl,marginLeft:o==="left"?u:0,marginRight:o==="right"?u:0,marginTop:`calc(${e.spacing.xs} / 2)`,marginBottom:`calc(${e.spacing.xs} - ${xe(2)})`}},p={steps:{[`@media (max-width: ${Kn(l-1)})`]:d.steps},separator:{[`@media (max-width: ${Kn(l-1)})`]:d.separator}};return{root:{},steps:mh(mh({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?d.steps:null),c?p.steps:null),separator:mh(mh({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:xe(2),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},n==="vertical"?d.separator:null),c?p.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:E5e(mh({},e.fn.fontStyles()),{paddingTop:Ke({size:t,sizes:e.spacing})})}});const P5e=C5e;var A5e=Object.defineProperty,Gy=Object.getOwnPropertySymbols,dW=Object.prototype.hasOwnProperty,hW=Object.prototype.propertyIsEnumerable,YT=(e,t,r)=>t in e?A5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O5e=(e,t)=>{for(var r in t||(t={}))dW.call(t,r)&&YT(e,r,t[r]);if(Gy)for(var r of Gy(t))hW.call(t,r)&&YT(e,r,t[r]);return e},I5e=(e,t)=>{var r={};for(var n in e)dW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gy)for(var n of Gy(e))t.indexOf(n)<0&&hW.call(e,n)&&(r[n]=e[n]);return r};const T5e={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},Ys=z.forwardRef((e,t)=>{var r,n,o;const i=ct("Stepper",T5e,e),{className:a,children:s,onStepClick:c,active:l,icon:u,completedIcon:d,progressIcon:p,color:m,iconSize:w,contentPadding:A,size:T,radius:O,orientation:P,breakpoint:$,iconPosition:R,allowNextStepsSelect:j,classNames:I,styles:b,unstyled:N,variant:V}=i,Z=I5e(i,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:q,cx:_}=P5e({contentPadding:A,color:m,orientation:P,iconPosition:R,iconSize:w,breakpoint:$},{name:"Stepper",classNames:I,styles:b,unstyled:N,variant:V,size:T}),y=z.Children.toArray(s),f=y.filter(E=>E.type!==Wy),h=y.find(E=>E.type===Wy),x=f.reduce((E,C,g)=>{const M=l===g?"stepProgress":l>g?"stepCompleted":"stepInactive",W=(()=>typeof c!="function"?!1:typeof C.props.allowStepSelect=="boolean"?C.props.allowStepSelect:M==="stepCompleted"||j)();return E.push(z.cloneElement(C,{__staticSelector:"Stepper",icon:C.props.icon||u||g+1,key:g,step:g,variant:V,state:M,onClick:()=>W&&c(g),allowStepClick:W,completedIcon:C.props.completedIcon||d,progressIcon:C.props.progressIcon||p,color:C.props.color||m,iconSize:w,size:T,radius:O,classNames:I,styles:b,iconPosition:C.props.iconPosition||R,orientation:P,unstyled:N})),P==="horizontal"&&g!==f.length-1&&E.push(fe.createElement("div",{className:_(q.separator,{[q.separatorActive]:gf.length-1?S:v;return fe.createElement(at,O5e({className:_(q.root,a),ref:t},Z),fe.createElement("div",{className:q.steps},x),k&&fe.createElement("div",{className:q.content},k))});Ys.Step=fW;Ys.Completed=Wy;Ys.displayName="@mantine/core/Stepper";var M5e=Object.defineProperty,k5e=Object.defineProperties,$5e=Object.getOwnPropertyDescriptors,JT=Object.getOwnPropertySymbols,D5e=Object.prototype.hasOwnProperty,R5e=Object.prototype.propertyIsEnumerable,ZT=(e,t,r)=>t in e?M5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N5e=(e,t)=>{for(var r in t||(t={}))D5e.call(t,r)&&ZT(e,r,t[r]);if(JT)for(var r of JT(t))R5e.call(t,r)&&ZT(e,r,t[r]);return e},B5e=(e,t)=>k5e(e,$5e(t)),F5e=ft((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:i,withColumnBorders:a})=>{const s=`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:B5e(N5e({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?s:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:Ke({size:o,sizes:e.fontSizes}),padding:`${Ke({size:n,sizes:e.spacing})} ${Ke({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:s},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:s},"& > tbody > tr > td":{padding:`${Ke({size:n,sizes:e.spacing})} ${Ke({size:r,sizes:e.spacing})}`,borderTop:s,fontSize:Ke({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:a?s:"none","&:last-of-type":{borderRight:"none",borderLeft:a?s:"none"}},"& > tbody > tr > th":{borderRight:a?s:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const j5e=F5e;var L5e=Object.defineProperty,U5e=Object.defineProperties,H5e=Object.getOwnPropertyDescriptors,Ky=Object.getOwnPropertySymbols,pW=Object.prototype.hasOwnProperty,gW=Object.prototype.propertyIsEnumerable,XT=(e,t,r)=>t in e?L5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z5e=(e,t)=>{for(var r in t||(t={}))pW.call(t,r)&&XT(e,r,t[r]);if(Ky)for(var r of Ky(t))gW.call(t,r)&&XT(e,r,t[r]);return e},V5e=(e,t)=>U5e(e,H5e(t)),q5e=(e,t)=>{var r={};for(var n in e)pW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ky)for(var n of Ky(e))t.indexOf(n)<0&&gW.call(e,n)&&(r[n]=e[n]);return r};const W5e={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},mW=z.forwardRef((e,t)=>{const r=ct("Table",W5e,e),{className:n,children:o,striped:i,highlightOnHover:a,captionSide:s,horizontalSpacing:c,verticalSpacing:l,fontSize:u,unstyled:d,withBorder:p,withColumnBorders:m,variant:w}=r,A=q5e(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:T,cx:O}=j5e({captionSide:s,verticalSpacing:l,horizontalSpacing:c,fontSize:u,withBorder:p,withColumnBorders:m},{unstyled:d,name:"Table",variant:w});return fe.createElement(at,V5e(z5e({},A),{component:"table",ref:t,className:O(T.root,n),"data-striped":i||void 0,"data-hover":a||void 0}),o)});mW.displayName="@mantine/core/Table";var G5e=Object.defineProperty,K5e=Object.defineProperties,Y5e=Object.getOwnPropertyDescriptors,QT=Object.getOwnPropertySymbols,J5e=Object.prototype.hasOwnProperty,Z5e=Object.prototype.propertyIsEnumerable,eM=(e,t,r)=>t in e?G5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tM=(e,t)=>{for(var r in t||(t={}))J5e.call(t,r)&&eM(e,r,t[r]);if(QT)for(var r of QT(t))Z5e.call(t,r)&&eM(e,r,t[r]);return e},X5e=(e,t)=>K5e(e,Y5e(t));const Q5e={xs:xe(16),sm:xe(20),md:xe(26),lg:xe(32),xl:xe(40)},e3e=["filled","light","gradient","outline","default"];function t3e({theme:e,variant:t,color:r,gradient:n}){if(!e3e.includes(t))return null;const o=e.fn.variant({variant:t,color:r||e.primaryColor,gradient:n,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${xe(t==="gradient"?0:1)} solid ${o.border}`}}var r3e=ft((e,{color:t,radius:r,gradient:n},{variant:o,size:i})=>{const a=Ke({size:i,sizes:Q5e});return{root:tM(X5e(tM({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:a,height:a,minWidth:a,minHeight:a,borderRadius:e.fn.radius(r)}),t3e({theme:e,variant:o,gradient:n,color:t}))}});const n3e=r3e;var o3e=Object.defineProperty,Yy=Object.getOwnPropertySymbols,vW=Object.prototype.hasOwnProperty,yW=Object.prototype.propertyIsEnumerable,rM=(e,t,r)=>t in e?o3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i3e=(e,t)=>{for(var r in t||(t={}))vW.call(t,r)&&rM(e,r,t[r]);if(Yy)for(var r of Yy(t))yW.call(t,r)&&rM(e,r,t[r]);return e},a3e=(e,t)=>{var r={};for(var n in e)vW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yy)for(var n of Yy(e))t.indexOf(n)<0&&yW.call(e,n)&&(r[n]=e[n]);return r};const s3e={size:"md",variant:"filled"},aC=z.forwardRef((e,t)=>{const r=ct("ThemeIcon",s3e,e),{className:n,size:o,radius:i,variant:a,color:s,children:c,gradient:l,unstyled:u}=r,d=a3e(r,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:p,cx:m}=n3e({variant:a,radius:i,color:s,gradient:l},{name:"ThemeIcon",unstyled:u,variant:a,size:o});return fe.createElement(at,i3e({className:m(p.root,n),ref:t},d),c)});aC.displayName="@mantine/core/ThemeIcon";var c3e=Object.defineProperty,l3e=Object.defineProperties,u3e=Object.getOwnPropertyDescriptors,nM=Object.getOwnPropertySymbols,f3e=Object.prototype.hasOwnProperty,d3e=Object.prototype.propertyIsEnumerable,oM=(e,t,r)=>t in e?c3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h3e=(e,t)=>{for(var r in t||(t={}))f3e.call(t,r)&&oM(e,r,t[r]);if(nM)for(var r of nM(t))d3e.call(t,r)&&oM(e,r,t[r]);return e},p3e=(e,t)=>l3e(e,u3e(t));function g3e(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:xe(e):r.headings.sizes[t].fontSize}function m3e(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var v3e=ft((e,{element:t,weight:r,inline:n},{size:o})=>({root:p3e(h3e({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:g3e(o,t,e),lineHeight:n?1:m3e(o,t,e),margin:0})}));const y3e=v3e;var b3e=Object.defineProperty,Jy=Object.getOwnPropertySymbols,bW=Object.prototype.hasOwnProperty,wW=Object.prototype.propertyIsEnumerable,iM=(e,t,r)=>t in e?b3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w3e=(e,t)=>{for(var r in t||(t={}))bW.call(t,r)&&iM(e,r,t[r]);if(Jy)for(var r of Jy(t))wW.call(t,r)&&iM(e,r,t[r]);return e},_3e=(e,t)=>{var r={};for(var n in e)bW.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jy)for(var n of Jy(e))t.indexOf(n)<0&&wW.call(e,n)&&(r[n]=e[n]);return r};const x3e={order:1},Bw=z.forwardRef((e,t)=>{const r=ct("Title",x3e,e),{className:n,order:o,children:i,unstyled:a,size:s,weight:c,inline:l,variant:u}=r,d=_3e(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:p,cx:m}=y3e({element:`h${o}`,weight:c,inline:l},{name:"Title",unstyled:a,variant:u,size:s});return[1,2,3,4,5,6].includes(o)?fe.createElement(St,w3e({variant:u,component:`h${o}`,ref:t,className:m(p.root,n)},d),i):null});Bw.displayName="@mantine/core/Title";/** + * @remix-run/router v1.7.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function r0(){return r0=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Fw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function E3e(){return Math.random().toString(36).substr(2,8)}function sM(e,t){return{usr:e.state,key:e.key,idx:t}}function Ox(e,t,r,n){return r===void 0&&(r=null),r0({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?fu(t):t,{state:r,key:t&&t.key||n||E3e()})}function Zy(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function fu(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function C3e(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s=Qs.Pop,c=null,l=u();l==null&&(l=0,a.replaceState(r0({},a.state,{idx:l}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=Qs.Pop;let T=u(),O=T==null?null:T-l;l=T,c&&c({action:s,location:A.location,delta:O})}function p(T,O){s=Qs.Push;let P=Ox(A.location,T,O);r&&r(P,T),l=u()+1;let $=sM(P,l),R=A.createHref(P);try{a.pushState($,"",R)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;o.location.assign(R)}i&&c&&c({action:s,location:A.location,delta:1})}function m(T,O){s=Qs.Replace;let P=Ox(A.location,T,O);r&&r(P,T),l=u();let $=sM(P,l),R=A.createHref(P);a.replaceState($,"",R),i&&c&&c({action:s,location:A.location,delta:0})}function w(T){let O=o.location.origin!=="null"?o.location.origin:o.location.href,P=typeof T=="string"?T:Zy(T);return Mr(O,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,O)}let A={get action(){return s},get location(){return e(o,a)},listen(T){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(aM,d),c=T,()=>{o.removeEventListener(aM,d),c=null}},createHref(T){return t(o,T)},createURL:w,encodeLocation(T){let O=w(T);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:p,replace:m,go(T){return a.go(T)}};return A}var cM;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(cM||(cM={}));function P3e(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?fu(t):t,o=sC(n.pathname||"/",r);if(o==null)return null;let i=_W(e);A3e(i);let a=null;for(let s=0;a==null&&s{let c={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(Mr(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=vc([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&(Mr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),_W(i.children,t,u,l)),!(i.path==null&&!i.index)&&t.push({path:l,score:D3e(l,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let c of xW(i.path))o(i,a,c)}),t}function xW(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=xW(n.join("/")),s=[];return s.push(...a.map(c=>c===""?i:[i,c].join("/"))),o&&s.push(...a),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function A3e(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:R3e(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const O3e=/^:\w+$/,I3e=3,T3e=2,M3e=1,k3e=10,$3e=-2,lM=e=>e==="*";function D3e(e,t){let r=e.split("/"),n=r.length;return r.some(lM)&&(n+=$3e),t&&(n+=T3e),r.filter(o=>!lM(o)).reduce((o,i)=>o+(O3e.test(i)?I3e:i===""?M3e:k3e),n)}function R3e(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function N3e(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let a=0;a{if(u==="*"){let p=s[d]||"";a=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}return l[u]=L3e(s[d]||"",u),l},{}),pathname:i,pathnameBase:a,pattern:e}}function F3e(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Fw(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function j3e(e){try{return decodeURI(e)}catch(t){return Fw(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function L3e(e,t){try{return decodeURIComponent(e)}catch(r){return Fw(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function sC(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function U3e(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?fu(e):e;return{pathname:r?r.startsWith("/")?r:H3e(r,t):t,search:V3e(n),hash:q3e(o)}}function H3e(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function c5(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function SW(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function EW(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=fu(e):(o=r0({},e),Mr(!o.pathname||!o.pathname.includes("?"),c5("?","pathname","search",o)),Mr(!o.pathname||!o.pathname.includes("#"),c5("#","pathname","hash",o)),Mr(!o.search||!o.search.includes("#"),c5("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(n||a==null)s=r;else{let d=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;o.pathname=p.join("/")}s=d>=0?t[d]:"/"}let c=U3e(o,s),l=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const vc=e=>e.join("/").replace(/\/\/+/g,"/"),z3e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),V3e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q3e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function W3e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const CW=["post","put","patch","delete"];new Set(CW);const G3e=["get",...CW];new Set(G3e);/** + * React Router v6.14.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Xy(){return Xy=Object.assign?Object.assign.bind():function(e){for(var t=1;tc.pathnameBase)),a=z.useRef(!1);return AW(()=>{a.current=!0}),z.useCallback(function(c,l){if(l===void 0&&(l={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=EW(c,JSON.parse(i),o,l.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:vc([t,u.pathname])),(l.replace?r.replace:r.push)(u,l.state,l)},[t,r,i,o,e])}function OW(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=z.useContext(du),{pathname:o}=Ed(),i=JSON.stringify(SW(n).map(a=>a.pathnameBase));return z.useMemo(()=>EW(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function Z3e(e,t){return X3e(e,t)}function X3e(e,t,r){z0()||Mr(!1);let{navigator:n}=z.useContext(Sd),{matches:o}=z.useContext(du),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let c=Ed(),l;if(t){var u;let A=typeof t=="string"?fu(t):t;s==="/"||(u=A.pathname)!=null&&u.startsWith(s)||Mr(!1),l=A}else l=c;let d=l.pathname||"/",p=s==="/"?d:d.slice(s.length)||"/",m=P3e(e,{pathname:p}),w=n6e(m&&m.map(A=>Object.assign({},A,{params:Object.assign({},a,A.params),pathname:vc([s,n.encodeLocation?n.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?s:vc([s,n.encodeLocation?n.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),o,r);return t&&w?z.createElement(jw.Provider,{value:{location:Xy({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:Qs.Pop}},w):w}function Q3e(){let e=s6e(),t=W3e(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},t),r?z.createElement("pre",{style:o},r):null,i)}const e6e=z.createElement(Q3e,null);class t6e extends z.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?z.createElement(du.Provider,{value:this.props.routeContext},z.createElement(PW.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function r6e(e){let{routeContext:t,match:r,children:n}=e,o=z.useContext(cC);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),z.createElement(du.Provider,{value:t},n)}function n6e(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let s=i.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id]));s>=0||Mr(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,c,l)=>{let u=c.route.id?a==null?void 0:a[c.route.id]:null,d=null;r&&(d=c.route.errorElement||e6e);let p=t.concat(i.slice(0,l+1)),m=()=>{let w;return u?w=d:c.route.Component?w=z.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=s,z.createElement(r6e,{match:c,routeContext:{outlet:s,matches:p,isDataRoute:r!=null},children:w})};return r&&(c.route.ErrorBoundary||c.route.errorElement||l===0)?z.createElement(t6e,{location:r.location,revalidation:r.revalidation,component:d,error:u,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Ix;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Ix||(Ix={}));var n0;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(n0||(n0={}));function o6e(e){let t=z.useContext(cC);return t||Mr(!1),t}function i6e(e){let t=z.useContext(K3e);return t||Mr(!1),t}function a6e(e){let t=z.useContext(du);return t||Mr(!1),t}function IW(e){let t=a6e(),r=t.matches[t.matches.length-1];return r.route.id||Mr(!1),r.route.id}function s6e(){var e;let t=z.useContext(PW),r=i6e(n0.UseRouteError),n=IW(n0.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function c6e(){let{router:e}=o6e(Ix.UseNavigateStable),t=IW(n0.UseNavigateStable),r=z.useRef(!1);return AW(()=>{r.current=!0}),z.useCallback(function(o,i){i===void 0&&(i={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Xy({fromRouteId:t},i)))},[e,t])}function $r(e){Mr(!1)}function l6e(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Qs.Pop,navigator:i,static:a=!1}=e;z0()&&Mr(!1);let s=t.replace(/^\/*/,"/"),c=z.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof n=="string"&&(n=fu(n));let{pathname:l="/",search:u="",hash:d="",state:p=null,key:m="default"}=n,w=z.useMemo(()=>{let A=sC(l,s);return A==null?null:{location:{pathname:A,search:u,hash:d,state:p,key:m},navigationType:o}},[s,l,u,d,p,m,o]);return w==null?null:z.createElement(Sd.Provider,{value:c},z.createElement(jw.Provider,{children:r,value:w}))}function u6e(e){let{children:t,location:r}=e;return Z3e(Tx(t),r)}var uM;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(uM||(uM={}));new Promise(()=>{});function Tx(e,t){t===void 0&&(t=[]);let r=[];return z.Children.forEach(e,(n,o)=>{if(!z.isValidElement(n))return;let i=[...t,o];if(n.type===z.Fragment){r.push.apply(r,Tx(n.props.children,i));return}n.type!==$r&&Mr(!1),!n.props.index||!n.props.children||Mr(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=Tx(n.props.children,i)),r.push(a)}),r}/** + * React Router DOM v6.14.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Mx(){return Mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function d6e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function h6e(e,t){return e.button===0&&(!t||t==="_self")&&!d6e(e)}const p6e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],g6e="startTransition",fM=$p[g6e];function m6e(e){let{basename:t,children:r,future:n,window:o}=e,i=z.useRef();i.current==null&&(i.current=S3e({window:o,v5Compat:!0}));let a=i.current,[s,c]=z.useState({action:a.action,location:a.location}),{v7_startTransition:l}=n||{},u=z.useCallback(d=>{l&&fM?fM(()=>c(d)):c(d)},[c,l]);return z.useLayoutEffect(()=>a.listen(u),[a,u]),z.createElement(l6e,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}const v6e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y6e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,b6e=z.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:i,replace:a,state:s,target:c,to:l,preventScrollReset:u}=t,d=f6e(t,p6e),{basename:p}=z.useContext(Sd),m,w=!1;if(typeof l=="string"&&y6e.test(l)&&(m=l,v6e))try{let P=new URL(window.location.href),$=l.startsWith("//")?new URL(P.protocol+l):new URL(l),R=sC($.pathname,p);$.origin===P.origin&&R!=null?l=R+$.search+$.hash:w=!0}catch{}let A=Y3e(l,{relative:o}),T=w6e(l,{replace:a,state:s,target:c,preventScrollReset:u,relative:o});function O(P){n&&n(P),P.defaultPrevented||T(P)}return z.createElement("a",Mx({},d,{href:m||A,onClick:w||i?n:O,ref:r,target:c}))});var dM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(dM||(dM={}));var hM;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(hM||(hM={}));function w6e(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=V0(),c=Ed(),l=OW(e,{relative:a});return z.useCallback(u=>{if(h6e(u,r)){u.preventDefault();let d=n!==void 0?n:Zy(c)===Zy(l);s(e,{replace:d,state:o,preventScrollReset:i,relative:a})}},[c,s,l,n,o,r,e,i,a])}var TW={exports:{}},_6e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",x6e=_6e,S6e=x6e;function MW(){}function kW(){}kW.resetWarningCache=MW;var E6e=function(){function e(n,o,i,a,s,c){if(c!==S6e){var l=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 l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:kW,resetWarningCache:MW};return r.PropTypes=r,r};TW.exports=E6e();var C6e=TW.exports;const Zc=Hi(C6e);var P6e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},A6e=Object.defineProperty,O6e=Object.defineProperties,I6e=Object.getOwnPropertyDescriptors,Qy=Object.getOwnPropertySymbols,$W=Object.prototype.hasOwnProperty,DW=Object.prototype.propertyIsEnumerable,pM=(e,t,r)=>t in e?A6e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gM=(e,t)=>{for(var r in t||(t={}))$W.call(t,r)&&pM(e,r,t[r]);if(Qy)for(var r of Qy(t))DW.call(t,r)&&pM(e,r,t[r]);return e},T6e=(e,t)=>O6e(e,I6e(t)),M6e=(e,t)=>{var r={};for(var n in e)$W.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qy)for(var n of Qy(e))t.indexOf(n)<0&&DW.call(e,n)&&(r[n]=e[n]);return r},yn=(e,t,r)=>{const n=z.forwardRef((o,i)=>{var a=o,{color:s="currentColor",size:c=24,stroke:l=2,children:u}=a,d=M6e(a,["color","size","stroke","children"]);return z.createElement("svg",gM(T6e(gM({ref:i},P6e),{width:c,height:c,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),d),[...r.map(([p,m])=>z.createElement(p,m)),...u||[]])});return n.propTypes={color:Zc.string,size:Zc.oneOfType([Zc.string,Zc.number]),stroke:Zc.oneOfType([Zc.string,Zc.number])},n.displayName=`${t}`,n},k6e=yn("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),$6e=yn("at","IconAt",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]]),D6e=yn("calendar-stats","IconCalendarStats",[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]]),RW=yn("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),R6e=yn("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),N6e=yn("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),B6e=yn("external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]),F6e=yn("file-analytics","IconFileAnalytics",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17l0 -5",key:"svg-2"}],["path",{d:"M12 17l0 -1",key:"svg-3"}],["path",{d:"M15 17l0 -3",key:"svg-4"}]]),j6e=yn("gauge","IconGauge",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M13.41 10.59l2.59 -2.59",key:"svg-2"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-3"}]]),L6e=yn("grip-vertical","IconGripVertical",[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),U6e=yn("info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]),H6e=yn("moon-stars","IconMoonStars",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]]),z6e=yn("notes","IconNotes",[["path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 7l6 0",key:"svg-1"}],["path",{d:"M9 11l6 0",key:"svg-2"}],["path",{d:"M9 15l4 0",key:"svg-3"}]]),V6e=yn("presentation-analytics","IconPresentationAnalytics",[["path",{d:"M9 12v-4",key:"svg-0"}],["path",{d:"M15 12v-2",key:"svg-1"}],["path",{d:"M12 12v-1",key:"svg-2"}],["path",{d:"M3 4h18",key:"svg-3"}],["path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10",key:"svg-4"}],["path",{d:"M12 16v4",key:"svg-5"}],["path",{d:"M9 20h6",key:"svg-6"}]]),q6e=yn("square-rounded-minus","IconSquareRoundedMinus",[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}]]),W6e=yn("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),G6e=yn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);const K6e=ft(e=>({control:{fontWeight:500,display:"block",width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:e.fontSizes.sm,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},link:{fontWeight:500,display:"block",textDecoration:"none",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:xe(31),marginLeft:xe(30),fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],borderLeft:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,[`& .${Ii("icon")}`]:{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}},chevron:{transition:"transform 200ms ease"}}));function Y6e({icon:e,label:t,initiallyOpened:r,links:n,groupLink:o,active:i,setActive:a}){const{classes:s,theme:c,cx:l}=K6e(),u=V0(),d=Array.isArray(n),[p,m]=z.useState(r??!0),w=c.dir==="ltr"?N6e:R6e,A=(d?n:[]).map(T=>G.jsx(St,{component:b6e,className:l(s.link,{[s.linkActive]:T.link===i}),to:T.link,ta:"left",onClick:()=>a(T.link),children:T.label},T.label));return G.jsxs(G.Fragment,{children:[G.jsx(D0,{onClick:()=>{m(T=>!T),d||a(o??""),o&&u(o)},className:l(s.control,{[s.linkActive]:!d&&o===i}),children:G.jsxs(Ut,{position:"apart",spacing:0,children:[G.jsxs(at,{sx:{display:"flex",alignItems:"center"},children:[G.jsx(aC,{variant:"light",size:30,children:G.jsx(e,{size:"1.1rem"})}),G.jsx(at,{ml:"md",children:t})]}),d&&G.jsx(w,{className:s.chevron,size:"1rem",stroke:1.5,style:{transform:p?`rotate(${c.dir==="rtl"?-90:90}deg)`:"none"}})]})}),d?G.jsx(wU,{in:p,children:A}):null]})}const J6e=[{label:"Wallet Info",icon:j6e,groupLink:"/"},{label:"Fungible Tokens",icon:z6e,initiallyOpened:!1,links:[{label:"Token info",link:"/token/info"},{label:"Issue new tokens",link:"/token/new"},{label:"Burn tokens",link:"/token/burn"}]},{label:"NFT",icon:D6e,initiallyOpened:!1,links:[{label:"NFT info",link:"/nft/info"},{label:"Create new collection",link:"/nft/new-collection"},{label:"Burn NFTs",link:"/nft/burn"}]},{label:"Contracts",icon:F6e,initiallyOpened:!1,links:[{label:"Playground",link:"/contract/play"},{label:"Contract info",link:"/contract/info"},{label:"Deploy Contract",link:"/contract/deploy"}]},{label:"Multisig",icon:V6e,initiallyOpened:!0,links:[{label:"Create Multisig",link:"/multisig/create"},{label:"Import Multisig",link:"/multisig/import"},{label:"Show Multisig",link:"/multisig/show"},{label:"Build Transaction",link:"/multisig/build-tx"},{label:"Sign Transaction",link:"/multisig/sign-tx"}]}],Z6e=ft(e=>({navbar:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,paddingBottom:0},header:{padding:e.spacing.md,paddingTop:0,marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,color:e.colorScheme==="dark"?e.white:e.black,borderBottom:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},links:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`},linksInner:{paddingTop:e.spacing.xl,paddingBottom:e.spacing.xl},footer:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,borderTop:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}));function X6e(){const{classes:e}=Z6e(),t=Ed(),[r,n]=z.useState(t.pathname);z.useEffect(()=>{n(t.pathname)},[t.pathname]);const o=J6e.map(i=>z.createElement(Y6e,{...i,key:i.label,active:r,setActive:n}));return G.jsx(P1,{width:{sm:300},p:"md",className:e.navbar,children:G.jsx(P1.Section,{grow:!0,className:e.links,component:RH,children:G.jsx("div",{className:e.linksInner,children:o})})})}function Q6e(){const{colorScheme:e,toggleColorScheme:t}=qce(),r=e==="dark";return G.jsx(m1,{variant:"outline",color:r?"yellow":"blue",onClick:()=>t(),title:"Toggle color scheme",children:r?G.jsx(W6e,{size:"1.1rem"}):G.jsx(H6e,{size:"1.1rem"})})}var kx=function(e,t){return kx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},kx(e,t)};function NW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var tt=function(){return tt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function yr(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Di(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n1)for(var r=1;r"u"||fr.env===void 0?ixe:"production",Da=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},o0={measureLayout:Da(["layout","layoutId","drag"]),animation:Da(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Da(["exit"]),drag:Da(["drag","dragControls"]),focus:Da(["whileFocus"]),hover:Da(["whileHover","onHoverStart","onHoverEnd"]),tap:Da(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Da(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Da(["whileInView","onViewportEnter","onViewportLeave"])};function axe(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?o0.projectionNodeConstructor=e[t]:o0[t].Component=e[t])}var sxe=function(){},eb=function(){},UW=z.createContext({strict:!1}),HW=Object.keys(o0),cxe=HW.length;function lxe(e,t,r){var n=[],o=z.useContext(UW);if(!t)return null;lC!=="production"&&r&&o.strict;for(var i=0;i"u")return t;var r=new Map;return new Proxy(t,{get:function(n,o){return r.has(o)||r.set(o,t(o)),r.get(o)}})}var Axe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function dC(e){return typeof e!="string"||e.includes("-")?!1:!!(Axe.indexOf(e)>-1||/[A-Z]/.test(e))}var rb={};function Oxe(e){Object.assign(rb,e)}var Nx=["","X","Y","Z"],Ixe=["translate","scale","rotate","skew"],i0=["transformPerspective","x","y","z"];Ixe.forEach(function(e){return Nx.forEach(function(t){return i0.push(e+t)})});function Txe(e,t){return i0.indexOf(e)-i0.indexOf(t)}var Mxe=new Set(i0);function G0(e){return Mxe.has(e)}var kxe=new Set(["originX","originY","originZ"]);function KW(e){return kxe.has(e)}function YW(e,t){var r=t.layout,n=t.layoutId;return G0(e)||KW(e)||(r||n!==void 0)&&(!!rb[e]||e==="opacity")}var us=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},$xe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function Dxe(e,t,r,n){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,c=t.allowTransformNone,l=c===void 0?!0:c,u="";i.sort(Txe);for(var d=!1,p=i.length,m=0;mr=>Math.max(Math.min(r,t),e),pp=e=>e%1?Number(e.toFixed(5)):e,a0=/(-)?([\d]*\.?[\d])+/g,Bx=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,Bxe=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function K0(e){return typeof e=="string"}const hu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gp=Object.assign(Object.assign({},hu),{transform:ZW(0,1)}),xm=Object.assign(Object.assign({},hu),{default:1}),Y0=e=>({test:t=>K0(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ls=Y0("deg"),va=Y0("%"),vt=Y0("px"),Fxe=Y0("vh"),jxe=Y0("vw"),vM=Object.assign(Object.assign({},va),{parse:e=>va.parse(e)/100,transform:e=>va.transform(e*100)}),hC=(e,t)=>r=>!!(K0(r)&&Bxe.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),XW=(e,t,r)=>n=>{if(!K0(n))return n;const[o,i,a,s]=n.match(a0);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},$l={test:hC("hsl","hue"),parse:XW("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+va.transform(pp(t))+", "+va.transform(pp(r))+", "+pp(gp.transform(n))+")"},Lxe=ZW(0,255),l5=Object.assign(Object.assign({},hu),{transform:e=>Math.round(Lxe(e))}),ec={test:hC("rgb","red"),parse:XW("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+l5.transform(e)+", "+l5.transform(t)+", "+l5.transform(r)+", "+pp(gp.transform(n))+")"};function Uxe(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const Fx={test:hC("#"),parse:Uxe,transform:ec.transform},Vn={test:e=>ec.test(e)||Fx.test(e)||$l.test(e),parse:e=>ec.test(e)?ec.parse(e):$l.test(e)?$l.parse(e):Fx.parse(e),transform:e=>K0(e)?e:e.hasOwnProperty("red")?ec.transform(e):$l.transform(e)},QW="${c}",eG="${n}";function Hxe(e){var t,r,n,o;return isNaN(e)&&K0(e)&&((r=(t=e.match(a0))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(Bx))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function tG(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(Bx);n&&(r=n.length,e=e.replace(Bx,QW),t.push(...n.map(Vn.parse)));const o=e.match(a0);return o&&(e=e.replace(a0,eG),t.push(...o.map(hu.parse))),{values:t,numColors:r,tokenised:e}}function rG(e){return tG(e).values}function nG(e){const{values:t,numColors:r,tokenised:n}=tG(e),o=t.length;return i=>{let a=n;for(let s=0;stypeof e=="number"?0:e;function Vxe(e){const t=rG(e);return nG(e)(t.map(zxe))}const fs={test:Hxe,parse:rG,createTransformer:nG,getAnimatableNone:Vxe},qxe=new Set(["brightness","contrast","saturate","opacity"]);function Wxe(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(a0)||[];if(!n)return e;const o=r.replace(n,"");let i=qxe.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const Gxe=/([a-z-]*)\(.*?\)/g,jx=Object.assign(Object.assign({},fs),{getAnimatableNone:e=>{const t=e.match(Gxe);return t?t.map(Wxe).join(" "):e}});var yM=tt(tt({},hu),{transform:Math.round}),oG={borderWidth:vt,borderTopWidth:vt,borderRightWidth:vt,borderBottomWidth:vt,borderLeftWidth:vt,borderRadius:vt,radius:vt,borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomRightRadius:vt,borderBottomLeftRadius:vt,width:vt,maxWidth:vt,height:vt,maxHeight:vt,size:vt,top:vt,right:vt,bottom:vt,left:vt,padding:vt,paddingTop:vt,paddingRight:vt,paddingBottom:vt,paddingLeft:vt,margin:vt,marginTop:vt,marginRight:vt,marginBottom:vt,marginLeft:vt,rotate:Ls,rotateX:Ls,rotateY:Ls,rotateZ:Ls,scale:xm,scaleX:xm,scaleY:xm,scaleZ:xm,skew:Ls,skewX:Ls,skewY:Ls,distance:vt,translateX:vt,translateY:vt,translateZ:vt,x:vt,y:vt,z:vt,perspective:vt,transformPerspective:vt,opacity:gp,originX:vM,originY:vM,originZ:vt,zIndex:yM,fillOpacity:gp,strokeOpacity:gp,numOctaves:yM};function pC(e,t,r,n){var o,i=e.style,a=e.vars,s=e.transform,c=e.transformKeys,l=e.transformOrigin;c.length=0;var u=!1,d=!1,p=!0;for(var m in t){var w=t[m];if(JW(m)){a[m]=w;continue}var A=oG[m],T=Nxe(w,A);if(G0(m)){if(u=!0,s[m]=T,c.push(m),!p)continue;w!==((o=A.default)!==null&&o!==void 0?o:0)&&(p=!1)}else KW(m)?(l[m]=T,d=!0):i[m]=T}u?i.transform=Dxe(e,r,p,n):n?i.transform=n({},""):!t.transform&&i.transform&&(i.transform="none"),d&&(i.transformOrigin=Rxe(l))}var gC=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function iG(e,t,r){for(var n in t)!us(t[n])&&!YW(n,r)&&(e[n]=t[n])}function Kxe(e,t,r){var n=e.transformTemplate;return z.useMemo(function(){var o=gC();pC(o,t,{enableHardwareAcceleration:!r},n);var i=o.vars,a=o.style;return tt(tt({},i),a)},[t])}function Yxe(e,t,r){var n=e.style||{},o={};return iG(o,n,e),Object.assign(o,Kxe(e,t,r)),e.transformValues&&(o=e.transformValues(o)),o}function Jxe(e,t,r){var n={},o=Yxe(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),n.style=o,n}var Zxe=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function nb(e){return Zxe.has(e)}var aG=function(e){return!nb(e)};function Xxe(e){e&&(aG=function(t){return t.startsWith("on")?!nb(t):e(t)})}try{Xxe(require("@emotion/is-prop-valid").default)}catch{}function Qxe(e,t,r){var n={};for(var o in e)(aG(o)||r===!0&&nb(o)||!t&&!nb(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function bM(e,t,r){return typeof e=="string"?e:vt.transform(t+r*e)}function eSe(e,t,r){var n=bM(t,e.x,e.width),o=bM(r,e.y,e.height);return"".concat(n," ").concat(o)}var tSe={offset:"stroke-dashoffset",array:"stroke-dasharray"},rSe={offset:"strokeDashoffset",array:"strokeDasharray"};function nSe(e,t,r,n,o){r===void 0&&(r=1),n===void 0&&(n=0),o===void 0&&(o=!0),e.pathLength=1;var i=o?tSe:rSe;e[i.offset]=vt.transform(-n);var a=vt.transform(t),s=vt.transform(r);e[i.array]="".concat(a," ").concat(s)}function mC(e,t,r,n){var o=t.attrX,i=t.attrY,a=t.originX,s=t.originY,c=t.pathLength,l=t.pathSpacing,u=l===void 0?1:l,d=t.pathOffset,p=d===void 0?0:d,m=Oa(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);pC(e,m,r,n),e.attrs=e.style,e.style={};var w=e.attrs,A=e.style,T=e.dimensions;w.transform&&(T&&(A.transform=w.transform),delete w.transform),T&&(a!==void 0||s!==void 0||A.transform)&&(A.transformOrigin=eSe(T,a!==void 0?a:.5,s!==void 0?s:.5)),o!==void 0&&(w.x=o),i!==void 0&&(w.y=i),c!==void 0&&nSe(w,c,u,p,!1)}var sG=function(){return tt(tt({},gC()),{attrs:{}})};function oSe(e,t){var r=z.useMemo(function(){var o=sG();return mC(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),tt(tt({},o.attrs),{style:tt({},o.style)})},[t]);if(e.style){var n={};iG(n,e.style,e),r.style=tt(tt({},n),r.style)}return r}function iSe(e){e===void 0&&(e=!1);var t=function(r,n,o,i,a,s){var c=a.latestValues,l=dC(r)?oSe:Jxe,u=l(n,c,s),d=Qxe(n,typeof r=="string",e),p=tt(tt(tt({},d),u),{ref:i});return o&&(p["data-projection-id"]=o),z.createElement(r,p)};return t}var aSe=/([a-z])([A-Z])/g,sSe="$1-$2",cG=function(e){return e.replace(aSe,sSe).toLowerCase()};function lG(e,t,r,n){var o=t.style,i=t.vars;Object.assign(e.style,o,n&&n.getProjectionStyles(r));for(var a in i)e.style.setProperty(a,i[a])}var uG=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function fG(e,t,r,n){lG(e,t,void 0,n);for(var o in t.attrs)e.setAttribute(uG.has(o)?o:cG(o),t.attrs[o])}function vC(e){var t=e.style,r={};for(var n in t)(us(t[n])||YW(n,e))&&(r[n]=t[n]);return r}function dG(e){var t=vC(e);for(var r in e)if(us(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function yC(e){return typeof e=="object"&&typeof e.start=="function"}var s0=function(e){return Array.isArray(e)},cSe=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},hG=function(e){return s0(e)?e[e.length-1]||0:e};function yv(e){var t=us(e)?e.get():e;return cSe(t)?t.toValue():t}function wM(e,t,r,n){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:lSe(t,r,n,o),renderState:i()};return a&&(s.mount=function(c){return a(t,c,s)}),s}var pG=function(e){return function(t,r){var n=z.useContext(Lw),o=z.useContext(q0);return r?wM(e,t,n,o):W0(function(){return wM(e,t,n,o)})}};function lSe(e,t,r,n){var o={},i=(r==null?void 0:r.initial)===!1,a=n(e);for(var s in a)o[s]=yv(a[s]);var c=e.initial,l=e.animate,u=Hw(e),d=WW(e);t&&d&&!u&&e.inherit!==!1&&(c??(c=t.initial),l??(l=t.animate));var p=i||c===!1,m=p?l:c;if(m&&typeof m!="boolean"&&!yC(m)){var w=Array.isArray(m)?m:[m];w.forEach(function(A){var T=qW(e,A);if(T){var O=T.transitionEnd;T.transition;var P=Oa(T,["transitionEnd","transition"]);for(var $ in P){var R=P[$];if(Array.isArray(R)){var j=p?R.length-1:0;R=R[j]}R!==null&&(o[$]=R)}for(var $ in O)o[$]=O[$]}})}return o}var uSe={useVisualState:pG({scrapeMotionValuesFromProps:dG,createRenderState:sG,onMount:function(e,t,r){var n=r.renderState,o=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}mC(n,o,{enableHardwareAcceleration:!1},e.transformTemplate),fG(t,n)}})},fSe={useVisualState:pG({scrapeMotionValuesFromProps:vC,createRenderState:gC})};function dSe(e,t,r,n,o){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=dC(e)?uSe:fSe;return tt(tt({},s),{preloadedFeatures:r,useRender:iSe(a),createVisualElement:n,projectionNodeConstructor:o,Component:e})}var Ht;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Ht||(Ht={}));function zw(e,t,r,n){return n===void 0&&(n={passive:!0}),e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r)}}function Lx(e,t,r,n){z.useEffect(function(){var o=e.current;if(r&&o)return zw(o,t,r,n)},[e,t,r,n])}function hSe(e){var t=e.whileFocus,r=e.visualElement,n=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(Ht.Focus,!0)},o=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(Ht.Focus,!1)};Lx(r,"focus",t?n:void 0),Lx(r,"blur",t?o:void 0)}function gG(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function mG(e){var t=!!e.touches;return t}function pSe(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var gSe={pageX:0,pageY:0};function mSe(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||gSe;return{x:n[t+"X"],y:n[t+"Y"]}}function vSe(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function bC(e,t){return t===void 0&&(t="page"),{point:mG(e)?mSe(e,t):vSe(e,t)}}var vG=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,bC(n))};return t?pSe(r):r},ySe=function(){return Cd&&window.onpointerdown===null},bSe=function(){return Cd&&window.ontouchstart===null},wSe=function(){return Cd&&window.onmousedown===null},_Se={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},xSe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function yG(e){return ySe()?e:bSe()?xSe[e]:wSe()?_Se[e]:e}function Of(e,t,r,n){return zw(e,yG(t),vG(r,t==="pointerdown"),n)}function ob(e,t,r,n){return Lx(e,yG(t),r&&vG(r,t==="pointerdown"),n)}function bG(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var _M=bG("dragHorizontal"),xM=bG("dragVertical");function wG(e){var t=!1;if(e==="y")t=xM();else if(e==="x")t=_M();else{var r=_M(),n=xM();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function _G(){var e=wG(!0);return e?(e(),!1):!0}function SM(e,t,r){return function(n,o){var i;!gG(n)||_G()||((i=e.animationState)===null||i===void 0||i.setActive(Ht.Hover,t),r==null||r(n,o))}}function SSe(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,o=e.visualElement;ob(o,"pointerenter",t||n?SM(o,!0,t):void 0,{passive:!t}),ob(o,"pointerleave",r||n?SM(o,!1,r):void 0,{passive:!r})}var xG=function(e,t){return t?e===t?!0:xG(e,t.parentElement):!1};function wC(e){return z.useEffect(function(){return function(){return e()}},[])}function SG(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);oMath.min(Math.max(r,e),t),u5=.001,ESe=.01,EM=10,CSe=.05,PSe=1;function ASe({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;sxe(e<=EM*1e3);let a=1-t;a=ib(CSe,PSe,a),e=ib(ESe,EM,e/1e3),a<1?(o=l=>{const u=l*a,d=u*e,p=u-r,m=Ux(l,a),w=Math.exp(-d);return u5-p/m*w},i=l=>{const d=l*a*e,p=d*r+r,m=Math.pow(a,2)*Math.pow(l,2)*e,w=Math.exp(-d),A=Ux(Math.pow(l,2),a);return(-o(l)+u5>0?-1:1)*((p-m)*w)/A}):(o=l=>{const u=Math.exp(-l*e),d=(l-r)*e+1;return-u5+u*d},i=l=>{const u=Math.exp(-l*e),d=(r-l)*(e*e);return u*d});const s=5/e,c=ISe(o,i,s);if(e=e*1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:a*2*Math.sqrt(n*l),duration:e}}}const OSe=12;function ISe(e,t,r){let n=r;for(let o=1;oe[r]!==void 0)}function kSe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!CM(e,MSe)&&CM(e,TSe)){const r=ASe(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function _C(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,i=SG(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:p}=kSe(i),m=PM,w=PM;function A(){const T=u?-(u/1e3):0,O=r-t,P=c/(2*Math.sqrt(s*l)),$=Math.sqrt(s/l)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),P<1){const R=Ux($,P);m=j=>{const I=Math.exp(-P*$*j);return r-I*((T+P*$*O)/R*Math.sin(R*j)+O*Math.cos(R*j))},w=j=>{const I=Math.exp(-P*$*j);return P*$*I*(Math.sin(R*j)*(T+P*$*O)/R+O*Math.cos(R*j))-I*(Math.cos(R*j)*(T+P*$*O)-R*O*Math.sin(R*j))}}else if(P===1)m=R=>r-Math.exp(-$*R)*(O+(T+$*O)*R);else{const R=$*Math.sqrt(P*P-1);m=j=>{const I=Math.exp(-P*$*j),b=Math.min(R*j,300);return r-I*((T+P*$*O)*Math.sinh(b)+R*O*Math.cosh(b))/R}}}return A(),{next:T=>{const O=m(T);if(p)a.done=T>=d;else{const P=w(T)*1e3,$=Math.abs(P)<=n,R=Math.abs(r-O)<=o;a.done=$&&R}return a.value=a.done?r:O,a},flipTarget:()=>{u=-u,[t,r]=[r,t],A()}}}_C.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const PM=e=>0,c0=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},mr=(e,t,r)=>-r*e+r*t+e;function f5(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function AM({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;o=f5(c,s,e+1/3),i=f5(c,s,e),a=f5(c,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const $Se=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},DSe=[Fx,ec,$l],OM=e=>DSe.find(t=>t.test(e)),EG=(e,t)=>{let r=OM(e),n=OM(t),o=r.parse(e),i=n.parse(t);r===$l&&(o=AM(o),r=ec),n===$l&&(i=AM(i),n=ec);const a=Object.assign({},o);return s=>{for(const c in a)c!=="alpha"&&(a[c]=$Se(o[c],i[c],s));return a.alpha=mr(o.alpha,i.alpha,s),r.transform(a)}},Hx=e=>typeof e=="number",RSe=(e,t)=>r=>t(e(r)),Vw=(...e)=>e.reduce(RSe);function CG(e,t){return Hx(e)?r=>mr(e,t,r):Vn.test(e)?EG(e,t):AG(e,t)}const PG=(e,t)=>{const r=[...e],n=r.length,o=e.map((i,a)=>CG(i,t[a]));return i=>{for(let a=0;a{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=CG(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}};function IM(e){const t=fs.parse(e),r=t.length;let n=0,o=0,i=0;for(let a=0;a{const r=fs.createTransformer(t),n=IM(e),o=IM(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?Vw(PG(n.parsed,o.parsed),r):a=>`${a>0?t:e}`},BSe=(e,t)=>r=>mr(e,t,r);function FSe(e){if(typeof e=="number")return BSe;if(typeof e=="string")return Vn.test(e)?EG:AG;if(Array.isArray(e))return PG;if(typeof e=="object")return NSe}function jSe(e,t,r){const n=[],o=r||FSe(e[0]),i=e.length-1;for(let a=0;ar(c0(e,t,n))}function USe(e,t){const r=e.length,n=r-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[n]&&(i=n-1,a=!0),!a){let c=1;for(;co||c===n);c++);i=c-1}const s=c0(e[i],e[i+1],o);return t[i](s)}}function OG(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;eb(i===t.length),eb(!n||!Array.isArray(n)||n.length===i-1),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=jSe(t,n,o),s=i===2?LSe(e,a):USe(e,a);return r?c=>s(ib(e[0],e[i-1],c)):s}const qw=e=>t=>1-e(1-t),xC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,HSe=e=>t=>Math.pow(t,e),IG=e=>t=>t*t*((e+1)*t-e),zSe=e=>{const t=IG(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},TG=1.525,VSe=4/11,qSe=8/11,WSe=9/10,SC=e=>e,EC=HSe(2),GSe=qw(EC),MG=xC(EC),kG=e=>1-Math.sin(Math.acos(e)),CC=qw(kG),KSe=xC(CC),PC=IG(TG),YSe=qw(PC),JSe=xC(PC),ZSe=zSe(TG),XSe=4356/361,QSe=35442/1805,eEe=16061/1805,ab=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-ab(1-e*2)):.5*ab(e*2-1)+.5;function nEe(e,t){return e.map(()=>t||MG).splice(0,e.length-1)}function oEe(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function iEe(e,t){return e.map(r=>r*t)}function bv({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=iEe(n&&n.length===a.length?n:oEe(a),o);function c(){return OG(s,a,{ease:Array.isArray(r)?r:nEe(a,r)})}let l=c();return{next:u=>(i.value=l(u),i.done=u>=o,i),flipTarget:()=>{a.reverse(),l=c()}}}function aEe({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=r*e;const c=t+s,l=i===void 0?c:i(c);return l!==c&&(s=l-t),{next:u=>{const d=-s*Math.exp(-u/n);return a.done=!(d>o||d<-o),a.value=a.done?l:l+d,a},flipTarget:()=>{}}}const TM={keyframes:bv,spring:_C,decay:aEe};function sEe(e){if(Array.isArray(e.to))return bv;if(TM[e.type])return TM[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?bv:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?_C:bv}const $G=1/60*1e3,cEe=typeof performance<"u"?()=>performance.now():()=>Date.now(),DG=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(cEe()),$G);function lEe(e){let t=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(c,l=!1,u=!1)=>{const d=u&&o,p=d?t:r;return l&&a.add(c),p.indexOf(c)===-1&&(p.push(c),d&&o&&(n=t.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),a.delete(c)},process:c=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let l=0;l(e[t]=lEe(()=>l0=!0),e),{}),Ri=J0.reduce((e,t)=>{const r=Ww[t];return e[t]=(n,o=!1,i=!1)=>(l0||dEe(),r.schedule(n,o,i)),e},{}),Gf=J0.reduce((e,t)=>(e[t]=Ww[t].cancel,e),{}),d5=J0.reduce((e,t)=>(e[t]=()=>Ww[t].process(If),e),{}),fEe=e=>Ww[e].process(If),RG=e=>{l0=!1,If.delta=zx?$G:Math.max(Math.min(e-If.timestamp,uEe),1),If.timestamp=e,Vx=!0,J0.forEach(fEe),Vx=!1,l0&&(zx=!1,DG(RG))},dEe=()=>{l0=!0,zx=!0,Vx||DG(RG)},sb=()=>If;function NG(e,t,r=0){return e-t-r}function hEe(e,t,r=0,n=!0){return n?NG(t+-e,t,r):t-(e-t)+r}function pEe(e,t,r,n){return n?e>=t+r:e<=-r}const gEe=e=>{const t=({delta:r})=>e(r);return{start:()=>Ri.update(t,!0),stop:()=>Gf.update(t)}};function BG(e){var t,r,{from:n,autoplay:o=!0,driver:i=gEe,elapsed:a=0,repeat:s=0,repeatType:c="loop",repeatDelay:l=0,onPlay:u,onStop:d,onComplete:p,onRepeat:m,onUpdate:w}=e,A=SG(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:T}=A,O,P=0,$=A.duration,R,j=!1,I=!0,b;const N=sEe(A);!((r=(t=N).needsInterpolation)===null||r===void 0)&&r.call(t,n,T)&&(b=OG([0,100],[n,T],{clamp:!1}),n=0,T=100);const V=N(Object.assign(Object.assign({},A),{from:n,to:T}));function Z(){P++,c==="reverse"?(I=P%2===0,a=hEe(a,$,l,I)):(a=NG(a,$,l),c==="mirror"&&V.flipTarget()),j=!1,m&&m()}function q(){O.stop(),p&&p()}function _(f){if(I||(f=-f),a+=f,!j){const h=V.next(Math.max(0,a));R=h.value,b&&(R=b(R)),j=I?h.done:a<=0}w==null||w(R),j&&(P===0&&($??($=a)),P{d==null||d(),O.stop()}}}function FG(e,t){return t?e*(1e3/t):0}function mEe({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:p,onStop:m}){let w;function A($){return r!==void 0&&$n}function T($){return r===void 0?n:n===void 0||Math.abs(r-$){var j;d==null||d(R),(j=$.onUpdate)===null||j===void 0||j.call($,R)},onComplete:p,onStop:m}))}function P($){O(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:c},$))}if(A(e))P({from:e,velocity:t,to:T(e)});else{let $=o*t+e;typeof l<"u"&&($=l($));const R=T($),j=R===r?-1:1;let I,b;const N=V=>{I=b,b=V,t=FG(V-I,sb().delta),(j===1&&V>R||j===-1&&Vw==null?void 0:w.stop()}}const qx=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),MM=e=>qx(e)&&e.hasOwnProperty("z"),Sm=(e,t)=>Math.abs(e-t);function jG(e,t){if(Hx(e)&&Hx(t))return Sm(e,t);if(qx(e)&&qx(t)){const r=Sm(e.x,t.x),n=Sm(e.y,t.y),o=MM(e)&&MM(t)?Sm(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const LG=(e,t)=>1-3*t+3*e,UG=(e,t)=>3*t-6*e,HG=e=>3*e,cb=(e,t,r)=>((LG(t,r)*e+UG(t,r))*e+HG(t))*e,zG=(e,t,r)=>3*LG(t,r)*e*e+2*UG(t,r)*e+HG(t),vEe=1e-7,yEe=10;function bEe(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=cb(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>vEe&&++s=_Ee?xEe(a,d,e,r):p===0?d:bEe(a,s,s+Em,e,r)}return a=>a===0||a===1?a:cb(i(a),t,n)}function EEe(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||r||n||o,s=z.useRef(!1),c=z.useRef(null),l={passive:!(r||t||n||w)};function u(){var A;(A=c.current)===null||A===void 0||A.call(c),c.current=null}function d(){var A;return u(),s.current=!1,(A=i.animationState)===null||A===void 0||A.setActive(Ht.Tap,!1),!_G()}function p(A,T){d()&&(xG(i.getInstance(),A.target)?t==null||t(A,T):n==null||n(A,T))}function m(A,T){d()&&(n==null||n(A,T))}function w(A,T){var O;u(),!s.current&&(s.current=!0,c.current=Vw(Of(window,"pointerup",p,l),Of(window,"pointercancel",m,l)),(O=i.animationState)===null||O===void 0||O.setActive(Ht.Tap,!0),r==null||r(A,T))}ob(i,"pointerdown",a?w:void 0,l),wC(u)}var kM=new Set;function CEe(e,t,r){e||kM.has(t)||(console.warn(t),r&&console.warn(r),kM.add(t))}var Wx=new WeakMap,h5=new WeakMap,PEe=function(e){var t;(t=Wx.get(e.target))===null||t===void 0||t(e)},AEe=function(e){e.forEach(PEe)};function OEe(e){var t=e.root,r=Oa(e,["root"]),n=t||document;h5.has(n)||h5.set(n,{});var o=h5.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(AEe,tt({root:t},r))),o[i]}function IEe(e,t,r){var n=OEe(t);return Wx.set(e,r),n.observe(e),function(){Wx.delete(e),n.unobserve(e)}}function TEe(e){var t=e.visualElement,r=e.whileInView,n=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=i===void 0?{}:i,s=z.useRef({hasEnteredView:!1,isInView:!1}),c=!!(r||n||o);a.once&&s.current.hasEnteredView&&(c=!1);var l=typeof IntersectionObserver>"u"?$Ee:kEe;l(c,s.current,t,a)}var MEe={some:0,all:1};function kEe(e,t,r,n){var o=n.root,i=n.margin,a=n.amount,s=a===void 0?"some":a,c=n.once;z.useEffect(function(){if(e){var l={root:o==null?void 0:o.current,rootMargin:i,threshold:typeof s=="number"?s:MEe[s]},u=function(d){var p,m=d.isIntersecting;if(t.isInView!==m&&(t.isInView=m,!(c&&!m&&t.hasEnteredView))){m&&(t.hasEnteredView=!0),(p=r.animationState)===null||p===void 0||p.setActive(Ht.InView,m);var w=r.getProps(),A=m?w.onViewportEnter:w.onViewportLeave;A==null||A(d)}};return IEe(r.getInstance(),l,u)}},[e,o,i,s])}function $Ee(e,t,r,n){var o=n.fallback,i=o===void 0?!0:o;z.useEffect(function(){!e||!i||(lC!=="production"&&CEe(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=r.getProps().onViewportEnter;s==null||s(null),(a=r.animationState)===null||a===void 0||a.setActive(Ht.InView,!0)}))},[e])}var tc=function(e){return function(t){return e(t),null}},DEe={inView:tc(TEe),tap:tc(EEe),focus:tc(hSe),hover:tc(SSe)},REe=0,NEe=function(){return REe++},VG=function(){return W0(NEe)};function qG(){var e=z.useContext(q0);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,o=VG();z.useEffect(function(){return n(o)},[]);var i=function(){return r==null?void 0:r(o)};return!t&&r?[!1,i]:[!0]}function WG(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n-1&&e.splice(r,1)}var mp=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return MC(this.subscriptions,t),function(){return kC(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(var i=0;iP&&q,x=Array.isArray(Z)?Z:[Z],v=x.reduce(i,{});_===!1&&(v={});var S=V.prevResolvedValues,k=S===void 0?{}:S,E=tt(tt({},k),v),C=function(W){h=!0,T.delete(W),V.needsAnimating[W]=!0};for(var g in E){var M=v[g],re=k[g];O.hasOwnProperty(g)||(M!==re?s0(M)&&s0(re)?!WG(M,re)||f?C(g):V.protectedKeys[g]=!0:M!==void 0?C(g):T.add(g):M!==void 0&&T.has(g)?C(g):V.protectedKeys[g]=!0)}V.prevProp=Z,V.prevResolvedValues=v,V.isActive&&(O=tt(tt({},O),v)),o&&e.blockInitialAnimation&&(h=!1),h&&!y&&A.push.apply(A,Di([],yr(x.map(function(W){return{animation:W,options:tt({type:N},u)}})),!1))},R=0;R=3;if(!(!m&&!w)){var A=p.point,T=sb().timestamp;o.history.push(tt(tt({},A),{timestamp:T}));var O=o.handlers,P=O.onStart,$=O.onMove;m||(P&&P(o.lastMoveEvent,p),o.startEvent=o.lastMoveEvent),$&&$(o.lastMoveEvent,p)}}},this.handlePointerMove=function(p,m){if(o.lastMoveEvent=p,o.lastMoveEventInfo=g5(m,o.transformPagePoint),gG(p)&&p.buttons===0){o.handlePointerUp(p,m);return}Ri.update(o.updatePoint,!0)},this.handlePointerUp=function(p,m){o.end();var w=o.handlers,A=w.onEnd,T=w.onSessionEnd,O=m5(g5(m,o.transformPagePoint),o.history);o.startEvent&&A&&A(p,O),T&&T(p,O)},!(mG(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=a;var s=bC(t),c=g5(s,this.transformPagePoint),l=c.point,u=sb().timestamp;this.history=[tt(tt({},l),{timestamp:u})];var d=r.onSessionStart;d&&d(t,m5(c,this.history)),this.removeListeners=Vw(Of(window,"pointermove",this.handlePointerMove),Of(window,"pointerup",this.handlePointerUp),Of(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Gf.update(this.updatePoint)},e}();function g5(e,t){return t?{point:t(e.point)}:e}function FM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function m5(e,t){var r=e.point;return{point:r,delta:FM(r,ZG(t)),offset:FM(r,v4e(t)),velocity:y4e(t,.1)}}function v4e(e){return e[0]}function ZG(e){return e[e.length-1]}function y4e(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=ZG(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>lb(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ds(e){return e.max-e.min}function jM(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),jG(e,t)o&&(e=r?mr(o,e,r.max):Math.min(e,o)),e}function zM(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function _4e(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:zM(e.x,n,i),y:zM(e.y,r,o)}}function VM(e,t){var r,n=t.min-e.min,o=t.max-e.max;return t.max-t.minn?r=c0(t.min,t.max-n,e.min):n>o&&(r=c0(e.min,e.max-o,t.min)),ib(0,1,r)}function E4e(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var Kx=.35;function C4e(e){return e===void 0&&(e=Kx),e===!1?e=0:e===!0&&(e=Kx),{x:qM(e,"left","right"),y:qM(e,"top","bottom")}}function qM(e,t,r){return{min:WM(e,t),max:WM(e,r)}}function WM(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}var GM=function(){return{translate:0,scale:1,origin:0,originPoint:0}},bp=function(){return{x:GM(),y:GM()}},KM=function(){return{min:0,max:0}},In=function(){return{x:KM(),y:KM()}};function ra(e){return[e("x"),e("y")]}function XG(e){var t=e.top,r=e.left,n=e.right,o=e.bottom;return{x:{min:r,max:n},y:{min:t,max:o}}}function P4e(e){var t=e.x,r=e.y;return{top:r.min,right:t.max,bottom:r.max,left:t.min}}function A4e(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function v5(e){return e===void 0||e===1}function QG(e){var t=e.scale,r=e.scaleX,n=e.scaleY;return!v5(t)||!v5(r)||!v5(n)}function Us(e){return QG(e)||YM(e.x)||YM(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function YM(e){return e&&e!=="0%"}function ub(e,t,r){var n=e-r,o=t*n;return r+o}function JM(e,t,r,n,o){return o!==void 0&&(e=ub(e,o,n)),ub(e,r,n)+t}function Yx(e,t,r,n,o){t===void 0&&(t=0),r===void 0&&(r=1),e.min=JM(e.min,t,r,n,o),e.max=JM(e.max,t,r,n,o)}function eK(e,t){var r=t.x,n=t.y;Yx(e.x,r.translate,r.scale,r.originPoint),Yx(e.y,n.translate,n.scale,n.originPoint)}function O4e(e,t,r,n){var o,i;n===void 0&&(n=!1);var a=r.length;if(a){t.x=t.y=1;for(var s,c,l=0;lt?r="y":Math.abs(e.x)>t&&(r="x"),r}function R4e(e){var t=e.dragControls,r=e.visualElement,n=W0(function(){return new $4e(r)});z.useEffect(function(){return t&&t.subscribe(n)},[n,t]),z.useEffect(function(){return n.addListeners()},[n])}function N4e(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||r||n||o,s=z.useRef(null),c=z.useContext(uC).transformPagePoint,l={onSessionStart:o,onStart:r,onMove:t,onEnd:function(d,p){s.current=null,n&&n(d,p)}};z.useEffect(function(){s.current!==null&&s.current.updateHandlers(l)});function u(d){s.current=new JG(d,l,{transformPagePoint:c})}ob(i,"pointerdown",a&&u),wC(function(){return s.current&&s.current.end()})}var B4e={pan:tc(N4e),drag:tc(R4e)},Am=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function F4e(){var e=Am.map(function(){return new mp}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){Am.forEach(function(o){var i,a="on"+o,s=n[a];(i=t[o])===null||i===void 0||i.call(t),s&&(t[o]=r[a](s))})}};return e.forEach(function(n,o){r["on"+Am[o]]=function(i){return n.add(i)},r["notify"+Am[o]]=function(){for(var i=[],a=0;a=0?window.pageYOffset:null,l=K4e(t,e,s);return i.length&&i.forEach(function(u){var d=yr(u,2),p=d[0],m=d[1];e.getValue(p).set(m)}),e.syncRender(),c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:t,transitionEnd:n}};function J4e(e,t,r,n){return V4e(t)?Y4e(e,t,r,n):{target:t,transitionEnd:n}}var Z4e=function(e,t,r,n){var o=H4e(e,t,n);return t=o.target,n=o.transitionEnd,J4e(e,t,r,n)};function X4e(e){return window.getComputedStyle(e)}var sK={treeType:"dom",readValueFromInstance:function(e,t){if(G0(t)){var r=AC(t);return r&&r.default||0}else{var n=X4e(e);return(JW(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return tK(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var o=r.transformValues;n===void 0&&(n=!0);var i=t.transition,a=t.transitionEnd,s=Oa(t,["transition","transitionEnd"]),c=i4e(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),c&&(c=o(c))),n){n4e(e,s,c);var l=Z4e(e,s,c,a);a=l.transitionEnd,s=l.target}return tt({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:vC,build:function(e,t,r,n,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),pC(t,r,n,o.transformTemplate)},render:lG},Q4e=rK(sK),eCe=rK(tt(tt({},sK),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return G0(t)?((r=AC(t))===null||r===void 0?void 0:r.default)||0:(t=uG.has(t)?t:cG(t),e.getAttribute(t))},scrapeMotionValuesFromProps:dG,build:function(e,t,r,n,o){mC(t,r,n,o.transformTemplate)},render:fG})),tCe=function(e,t){return dC(e)?eCe(t,{enableHardwareAcceleration:!1}):Q4e(t,{enableHardwareAcceleration:!0})};function nk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var yh={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(vt.test(e))e=parseFloat(e);else return e;var r=nk(e,t.target.x),n=nk(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},ok="_$css",rCe={correct:function(e,t){var r=t.treeScale,n=t.projectionDelta,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(oK,function(A){return a.push(A),ok}));var s=fs.parse(e);if(s.length>5)return o;var c=fs.createTransformer(e),l=typeof s[0]!="number"?1:0,u=n.x.scale*r.x,d=n.y.scale*r.y;s[0+l]/=u,s[1+l]/=d;var p=mr(u,d,.5);typeof s[2+l]=="number"&&(s[2+l]/=p),typeof s[3+l]=="number"&&(s[3+l]/=p);var m=c(s);if(i){var w=0;m=m.replace(ok,function(){var A=a[w];return w++,A})}return m}},nCe=function(e){NW(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this,n=this.props,o=n.visualElement,i=n.layoutGroup,a=n.switchLayoutGroup,s=n.layoutId,c=o.projection;Oxe(iCe),c&&(i!=null&&i.group&&i.group.add(c),a!=null&&a.register&&s&&a.register(c),c.root.didUpdate(),c.addEventListener("animationComplete",function(){r.safeToRemove()}),c.setOptions(tt(tt({},c.options),{onExitComplete:function(){return r.safeToRemove()}}))),hp.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(r){var n=this,o=this.props,i=o.layoutDependency,a=o.visualElement,s=o.drag,c=o.isPresent,l=a.projection;return l&&(l.isPresent=c,s||r.layoutDependency!==i||i===void 0?l.willUpdate():this.safeToRemove(),r.isPresent!==c&&(c?l.promote():l.relegate()||Ri.postRender(function(){var u;!((u=l.getStack())===null||u===void 0)&&u.members.length||n.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var r=this.props.visualElement.projection;r&&(r.root.didUpdate(),!r.currentAnimation&&r.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(a),i!=null&&i.deregister&&i.deregister(a))},t.prototype.safeToRemove=function(){var r=this.props.safeToRemove;r==null||r()},t.prototype.render=function(){return null},t}(fe.Component);function oCe(e){var t=yr(qG(),2),r=t[0],n=t[1],o=z.useContext(fC);return fe.createElement(nCe,tt({},e,{layoutGroup:o,switchLayoutGroup:z.useContext(GW),isPresent:r,safeToRemove:n}))}var iCe={borderRadius:tt(tt({},yh),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:yh,borderTopRightRadius:yh,borderBottomLeftRadius:yh,borderBottomRightRadius:yh,boxShadow:rCe},aCe={measureLayout:oCe};function sCe(e,t,r){r===void 0&&(r={});var n=us(e)?e:Kf(e);return TC("",n,t,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var cK=["TopLeft","TopRight","BottomLeft","BottomRight"],cCe=cK.length,ik=function(e){return typeof e=="string"?parseFloat(e):e},ak=function(e){return typeof e=="number"||vt.test(e)};function lCe(e,t,r,n,o,i){var a,s,c,l;o?(e.opacity=mr(0,(a=r.opacity)!==null&&a!==void 0?a:1,uCe(n)),e.opacityExit=mr((s=t.opacity)!==null&&s!==void 0?s:1,0,fCe(n))):i&&(e.opacity=mr((c=t.opacity)!==null&&c!==void 0?c:1,(l=r.opacity)!==null&&l!==void 0?l:1,n));for(var u=0;ut?1:r(c0(e,t,n))}}function ck(e,t){e.min=t.min,e.max=t.max}function gi(e,t){ck(e.x,t.x),ck(e.y,t.y)}function lk(e,t,r,n,o){return e-=t,e=ub(e,1/r,n),o!==void 0&&(e=ub(e,1/o,n)),e}function dCe(e,t,r,n,o,i,a){if(t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5),i===void 0&&(i=e),a===void 0&&(a=e),va.test(t)){t=parseFloat(t);var s=mr(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var c=mr(i.min,i.max,n);e===i&&(c-=t),e.min=lk(e.min,t,r,c,o),e.max=lk(e.max,t,r,c,o)}}function uk(e,t,r,n,o){var i=yr(r,3),a=i[0],s=i[1],c=i[2];dCe(e,t[a],t[s],t[c],t.scale,n,o)}var hCe=["x","scaleX","originX"],pCe=["y","scaleY","originY"];function fk(e,t,r,n){uk(e.x,t,hCe,r==null?void 0:r.x,n==null?void 0:n.x),uk(e.y,t,pCe,r==null?void 0:r.y,n==null?void 0:n.y)}function dk(e){return e.translate===0&&e.scale===1}function uK(e){return dk(e.x)&&dk(e.y)}function fK(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var gCe=function(){function e(){this.members=[]}return e.prototype.add=function(t){MC(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(kC(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var r=this.members[this.members.length-1];r&&this.promote(r)}},e.prototype.relegate=function(t){var r=this.members.findIndex(function(a){return t===a});if(r===0)return!1;for(var n,o=r;o>=0;o--){var i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1},e.prototype.promote=function(t,r){var n,o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);var i=t.options.crossfade;i===!1&&o.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var r,n,o,i,a;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(a=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||a===void 0||a.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),mCe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function hk(e,t,r){var n=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,c=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),c&&(i+="rotateY(".concat(c,"deg) "))}var l=e.x.scale*t.x,u=e.y.scale*t.y;return i+="scale(".concat(l,", ").concat(u,")"),i===mCe?"none":i}var vCe=function(e,t){return e.depth-t.depth},yCe=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){MC(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){kC(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(vCe),this.isDirty=!1,this.children.forEach(t)},e}(),pk=1e3;function dK(e){var t=e.attachResizeListener,r=e.defaultParent,n=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function a(s,c,l){var u=this;c===void 0&&(c={}),l===void 0&&(l=r==null?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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=function(){u.isUpdating&&(u.isUpdating=!1,u.clearAllSnapshots())},this.updateProjection=function(){u.nodes.forEach(ECe),u.nodes.forEach(CCe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=c,this.root=l?l.root||l:this,this.path=l?Di(Di([],yr(l.path),!1),[l],!1):[],this.parent=l,this.depth=l?l.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var d=0;d=0;n--)if(e.path[n].instance){r=e.path[n];break}var o=r&&r!==e.root?r.instance:document,i=o.querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function yk(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function bk(e){yk(e.x),yk(e.y)}var kCe=dK({attachResizeListener:function(e,t){return zw(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),y5={current:void 0},$Ce=dK({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!y5.current){var e=new kCe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),y5.current=e}return y5.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),DCe=tt(tt(tt(tt({},m4e),DEe),B4e),aCe),gt=Pxe(function(e,t){return dSe(e,t,DCe,tCe,$Ce)});function hK(){var e=z.useRef(!1);return tb(function(){return e.current=!0,function(){e.current=!1}},[]),e}function RCe(){var e=hK(),t=yr(z.useState(0),2),r=t[0],n=t[1],o=z.useCallback(function(){e.current&&n(r+1)},[r]),i=z.useCallback(function(){return Ri.postRender(o)},[o]);return[i,r]}var b5=function(e){var t=e.children,r=e.initial,n=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=W0(NCe),c=VG(),l=z.useMemo(function(){return{id:c,initial:r,isPresent:n,custom:i,onExitComplete:function(u){var d,p;s.set(u,!0);try{for(var m=exe(s.values()),w=m.next();!w.done;w=m.next()){var A=w.value;if(!A)return}}catch(T){d={error:T}}finally{try{w&&!w.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}o==null||o()},register:function(u){return s.set(u,!1),function(){return s.delete(u)}}}},a?void 0:[n]);return z.useMemo(function(){s.forEach(function(u,d){return s.set(d,!1)})},[n]),z.useEffect(function(){!n&&!s.size&&(o==null||o())},[n]),z.createElement(q0.Provider,{value:l},t)};function NCe(){return new Map}var qu=function(e){return e.key||""};function BCe(e,t){e.forEach(function(r){var n=qu(r);t.set(n,r)})}function FCe(e){var t=[];return z.Children.forEach(e,function(r){z.isValidElement(r)&&t.push(r)}),t}var Ni=function(e){var t=e.children,r=e.custom,n=e.initial,o=n===void 0?!0:n,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,c=s===void 0?!0:s,l=yr(RCe(),1),u=l[0],d=z.useContext(fC).forceRender;d&&(u=d);var p=hK(),m=FCe(t),w=m,A=new Set,T=z.useRef(w),O=z.useRef(new Map).current,P=z.useRef(!0);if(tb(function(){P.current=!1,BCe(m,O),T.current=w}),wC(function(){P.current=!0,O.clear(),A.clear()}),P.current)return z.createElement(z.Fragment,null,w.map(function(N){return z.createElement(b5,{key:qu(N),isPresent:!0,initial:o?void 0:!1,presenceAffectsLayout:c},N)}));w=Di([],yr(w),!1);for(var $=T.current.map(qu),R=m.map(qu),j=$.length,I=0;I1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),z.createElement(z.Fragment,null,A.size?w:w.map(function(N){return z.cloneElement(N)}))},wk=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new zCe:typeof navigator<"u"?Sk(navigator.userAgent):YCe()}function GCe(e){return e!==""&&WCe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function Sk(e){var t=GCe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new HCe;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.length<_k&&(o=wk(wk([],o,!0),JCe(_k-o.length),!0)):o=[];var i=o.join("."),a=KCe(e),s=qCe.exec(e);return s&&s[1]?new UCe(r,i,a,s[1]):new jCe(r,i,a)}function KCe(e){for(var t=0,r=xk.length;tte)&&(we=(Me=Me.replace(" ",":")).length),0W&&(W=(M=M.trim()).charCodeAt(0)),W){case 38:return M.replace(O,"$1"+g.trim());case 58:return g.trim()+M.replace(O,"$1"+g.trim());default:if(0<1*re&&0ie.charCodeAt(8))break;case 115:ee=ee.replace(ie,"-webkit-"+ie)+";"+ee;break;case 207:case 102:ee=ee.replace(ie,"-webkit-"+(102re.charCodeAt(0)&&(re=re.trim()),C=re,re=[C],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var t8e=function(){function e(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var t=e.prototype;return t.indexOfGroup=function(r){for(var n=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;r>=a;)(a<<=1)<0&&Ql(16,""+r);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var s=i;s=this.length||this.groupSizes[r]===0)return n;for(var o=this.groupSizes[r],i=this.indexOfGroup(r),a=i+o,s=i;s=wp&&(wp=t+1),_v.set(e,t),db.set(t,e)},o8e="style["+Jf+'][data-styled-version="5.3.11"]',i8e=new RegExp("^"+Jf+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),a8e=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i=0;l--){var u=c[l];if(u&&u.nodeType===1&&u.hasAttribute(Jf))return u}}(r),i=o!==void 0?o.nextSibling:null;n.setAttribute(Jf,"active"),n.setAttribute("data-styled-version","5.3.11");var a=c8e();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},l8e=function(){function e(r){var n=this.element=pK(r);n.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,s=i.length;a=0){var o=document.createTextNode(n),i=this.nodes[r];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},t.getRule=function(r){return r0&&(d+=p+",")}),i+=""+l+u+'{content:"'+d+`"}/*!sc*/ +`}}}return i}(this)},e}(),h8e=/(a)(d)/gi,Ok=function(e){return String.fromCharCode(e+(e>25?39:97))};function Qx(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=Ok(t%52)+r;return(Ok(t%52)+r).replace(h8e,"$1-$2")}var df=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},mK=function(e){return df(5381,e)};function p8e(e){for(var t=0;t>>0);if(!r.hasNameForId(o,s)){var c=n(a,"."+s,void 0,o);r.insertRules(o,s,c)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,u=df(this.baseHash,n.hash),d="",p=0;p>>0);if(!r.hasNameForId(o,T)){var O=n(d,"."+T,void 0,o);r.insertRules(o,T,O)}i.push(T)}}return i.join(" ")},e}(),v8e=/^\s*\/\/.*$/gm,y8e=[":","[",".","#"];function b8e(e){var t,r,n,o,i=e===void 0?yc:e,a=i.options,s=a===void 0?yc:a,c=i.plugins,l=c===void 0?fb:c,u=new ZCe(s),d=[],p=function(A){function T(O){if(O)try{A(O+"}")}catch{}}return function(O,P,$,R,j,I,b,N,V,Z){switch(O){case 1:if(V===0&&P.charCodeAt(0)===64)return A(P+";"),"";break;case 2:if(N===0)return P+"/*|*/";break;case 3:switch(N){case 102:case 112:return A($[0]+P),"";default:return P+(Z===0?"/*|*/":"")}case-2:P.split("/*|*/}").forEach(T)}}}(function(A){d.push(A)}),m=function(A,T,O){return T===0&&y8e.indexOf(O[r.length])!==-1||O.match(o)?A:"."+t};function w(A,T,O,P){P===void 0&&(P="&");var $=A.replace(v8e,""),R=T&&O?O+" "+T+" { "+$+" }":$;return t=P,r=T,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(O||!T?"":T,R)}return u.use([].concat(l,[function(A,T,O){A===2&&O.length&&O[0].lastIndexOf(r)>0&&(O[0]=O[0].replace(n,m))},p,function(A){if(A===-2){var T=d;return d=[],T}}])),w.hash=l.length?l.reduce(function(A,T){return T.name||Ql(15),df(A,T.name)},5381).toString():"",w}var vK=fe.createContext();vK.Consumer;var yK=fe.createContext(),w8e=(yK.Consumer,new gK),eS=b8e();function _8e(){return z.useContext(vK)||w8e}function x8e(){return z.useContext(yK)||eS}var bK=function(){function e(t,r){var n=this;this.inject=function(o,i){i===void 0&&(i=eS);var a=n.name+i.hash;o.hasNameForId(n.id,a)||o.insertRules(n.id,a,i(n.rules,a,"@keyframes"))},this.toString=function(){return Ql(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=r}return e.prototype.getName=function(t){return t===void 0&&(t=eS),this.name+t.hash},e}(),S8e=/([A-Z])/,E8e=/([A-Z])/g,C8e=/^ms-/,P8e=function(e){return"-"+e.toLowerCase()};function Ik(e){return S8e.test(e)?e.replace(E8e,P8e).replace(C8e,"-ms-"):e}var Tk=function(e){return e==null||e===!1||e===""};function Zf(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,I8e=/(^-|-$)/g;function w5(e){return e.replace(O8e,"-").replace(I8e,"")}var wK=function(e){return Qx(mK(e)>>>0)};function Im(e){return typeof e=="string"&&!0}var tS=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},T8e=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function M8e(e,t,r){var n=e[r];tS(t)&&tS(n)?_K(n,t):e[r]=t}function _K(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(Z[N]=I[N]);return Z}(t,["componentId"]),j=$&&$+"-"+(Im(P)?P:w5(Pk(P)));return xK(P,fa({},R,{attrs:p,componentId:j}),r)},Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(P){this._foldedDefaultProps=n?_K({},e.defaultProps,P):P}}),Object.defineProperty(w,"toString",{value:function(){return"."+w.styledComponentId}}),o&&hx(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}var rS=function(e){return function t(r,n,o){if(o===void 0&&(o=yc),!E4.isValidElementType(n))return Ql(1,String(n));var i=function(){return r(n,o,Tr.apply(void 0,arguments))};return i.withConfig=function(a){return t(r,n,fa({},o,{},a))},i.attrs=function(a){return t(r,n,fa({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(xK,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){rS[e]=rS(e)});function Bo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(P.current=setTimeout(j,$));break;case P5:R>=0&&(P.current=setTimeout(j,R));break;case S5:case C5:P.current=setTimeout(function(){return Z(q+1)},0);break}},V=O.current<=Tm;typeof b!="boolean"&&(b=!V),b?V||N(o?s?S5:E5:Tm):V&&N(a?c?C5:P5:A5(p))},[j,m,o,a,s,c,$,R,p]);return z.useEffect(function(){return function(){return clearTimeout(P.current)}},[]),[SK[A],I,j]},CK=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!nS||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),L8e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!nS||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=j8e.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),PK=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof Xf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new Y8e(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Xf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new J8e(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),OK=typeof WeakMap<"u"?new WeakMap:new CK,IK=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=U8e.getInstance(),n=new Z8e(t,r,this);OK.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){IK.prototype[e]=function(){var t;return(t=OK.get(this))[e].apply(t,arguments)}});var X8e=function(){return typeof pb.ResizeObserver<"u"?pb.ResizeObserver:IK}();function oS(e,t,r){var n,o,i,a,s;t==null&&(t=100);function c(){var u=Date.now()-a;u=0?n=setTimeout(c,t-u):(n=null,r||(s=e.apply(i,o),i=o=null))}var l=function(){i=this,o=arguments,a=Date.now();var u=r&&!n;return n||(n=setTimeout(c,t)),u&&(s=e.apply(i,o),i=o=null),s};return l.clear=function(){n&&(clearTimeout(n),n=null)},l.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},l}oS.debounce=oS;var Q8e=oS;const Dk=Hi(Q8e);function TK(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=z.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=z.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),l=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,d=z.useRef(!1);z.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,w]=z.useMemo(()=>{const P=()=>{if(!c.current.element)return;const{left:$,top:R,width:j,height:I,bottom:b,right:N,x:V,y:Z}=c.current.element.getBoundingClientRect(),q={left:$,top:R,width:j,height:I,bottom:b,right:N,x:V,y:Z};c.current.element instanceof HTMLElement&&o&&(q.height=c.current.element.offsetHeight,q.width=c.current.element.offsetWidth),Object.freeze(q),d.current&&!nPe(c.current.lastBounds,q)&&s(c.current.lastBounds=q)};return[P,u?Dk(P,u):P,l?Dk(P,l):P]},[s,o,l,u]);function A(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(P=>P.removeEventListener("scroll",w,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function T(){c.current.element&&(c.current.resizeObserver=new i(w),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach(P=>P.addEventListener("scroll",w,{capture:!0,passive:!0})))}const O=P=>{!P||P===c.current.element||(A(),c.current.element=P,c.current.scrollContainers=MK(P),T())};return tPe(w,!!r),ePe(m),z.useEffect(()=>{A(),T()},[r,w,m]),z.useEffect(()=>A,[]),[O,a,p]}function ePe(e){z.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function tPe(e,t){z.useEffect(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function MK(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...MK(e.parentElement)]}const rPe=["x","y","top","bottom","left","right","width","height"],nPe=(e,t)=>rPe.every(r=>e[r]===t[r]);var BC={};/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var iS=function(e,t){return iS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},iS(e,t)};function oPe(e,t){iS(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var aS=function(){return aS=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function sPe(e,t){return function(r,n){t(r,n,e)}}function cPe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function lPe(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function uPe(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kK(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function hPe(){for(var e=[],t=0;t1||s(p,m)})})}function s(p,m){try{c(n[p](m))}catch(w){d(i[0][3],w)}}function c(p){p.value instanceof u0?Promise.resolve(p.value.v).then(l,u):d(i[0][2],p)}function l(p){s("next",p)}function u(p){s("throw",p)}function d(p,m){p(m),i.shift(),i.length&&s(i[0][0],i[0][1])}}function mPe(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:u0(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function vPe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof sS=="function"?sS(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,c){a=e[i](a),o(s,c,a.done,a.value)})}}function o(i,a,s,c){Promise.resolve(c).then(function(l){i({value:l,done:s})},a)}}function yPe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function bPe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function wPe(e){return e&&e.__esModule?e:{default:e}}function _Pe(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function xPe(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const SPe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return aS},__asyncDelegator:mPe,__asyncGenerator:gPe,__asyncValues:vPe,__await:u0,__awaiter:lPe,__classPrivateFieldGet:_Pe,__classPrivateFieldSet:xPe,__createBinding:fPe,__decorate:aPe,__exportStar:dPe,__extends:oPe,__generator:uPe,__importDefault:wPe,__importStar:bPe,__makeTemplateObject:yPe,__metadata:cPe,__param:sPe,__read:kK,__rest:iPe,__spread:hPe,__spreadArrays:pPe,__values:sS},Symbol.toStringTag,{value:"Module"})),ui=zi(SPe);var cn={},O5={exports:{}},Rk;function Kw(){return Rk||(Rk=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function i(c,l,u,d,p){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new o(u,d||c,p),w=r?r+l:l;return c._events[w]?c._events[w].fn?c._events[w]=[c._events[w],m]:c._events[w].push(m):(c._events[w]=m,c._eventsCount++),c}function a(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,d;if(this._eventsCount===0)return l;for(d in u=this._events)t.call(u,d)&&l.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=r?r+l:l,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,m=d.length,w=new Array(m);p0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[t];if(c===void 0)return!1;if(typeof c=="function")Nk(c,this,r);else for(var l=c.length,u=jK(c,l),n=0;n0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,EPe(s)}return e}Bt.prototype.addListener=function(t,r){return RK(this,t,r,!1)};Bt.prototype.on=Bt.prototype.addListener;Bt.prototype.prependListener=function(t,r){return RK(this,t,r,!0)};function CPe(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function NK(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=CPe.bind(n);return o.listener=r,n.wrapFn=o,o}Bt.prototype.once=function(t,r){return Yw(r),this.on(t,NK(this,t,r)),this};Bt.prototype.prependOnceListener=function(t,r){return Yw(r),this.prependListener(t,NK(this,t,r)),this};Bt.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Yw(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():PPe(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Bt.prototype.off=Bt.prototype.removeListener;Bt.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o=0;o--)this.removeListener(t,r[o]);return this};function BK(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?APe(o):jK(o,o.length)}Bt.prototype.listeners=function(t){return BK(this,t,!0)};Bt.prototype.rawListeners=function(t){return BK(this,t,!1)};Bt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):FK.call(e,t)};Bt.prototype.listenerCount=FK;function FK(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Bt.prototype.eventNames=function(){return this._eventsCount>0?xv(this._events):[]};function jK(e,t){for(var r=new Array(t),n=0;n0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function BPe(e){var t=HK(e),r=t[0],n=t[1];return(r+n)*3/4-n}function FPe(e,t,r){return(t+r)*3/4-r}function jPe(e){var t,r=HK(e),n=r[0],o=r[1],i=new RPe(FPe(e,n,o)),a=0,s=o>0?n-4:n,c;for(c=0;c>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=Wo[e.charCodeAt(c)]<<2|Wo[e.charCodeAt(c+1)]>>4,i[a++]=t&255),o===1&&(t=Wo[e.charCodeAt(c)]<<10|Wo[e.charCodeAt(c+1)]<<4|Wo[e.charCodeAt(c+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function LPe(e){return la[e>>18&63]+la[e>>12&63]+la[e>>6&63]+la[e&63]}function UPe(e,t,r){for(var n,o=[],i=t;is?s:a+i));return n===1?(t=e[r-1],o.push(la[t>>2]+la[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(la[t>>10]+la[t>>4&63]+la[t<<2&63]+"=")),o.join("")}var jC={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */jC.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,c=(1<>1,u=-7,d=r?o-1:0,p=r?-1:1,m=e[t+d];for(d+=p,i=m&(1<<-u)-1,m>>=-u,u+=s;u>0;i=i*256+e[t+d],d+=p,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=a*256+e[t+d],d+=p,u-=8);if(i===0)i=1-l;else{if(i===c)return a?NaN:(m?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-l}return(m?-1:1)*a*Math.pow(2,i-n)};jC.write=function(e,t,r,n,o,i){var a,s,c,l=i*8-o-1,u=(1<>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:i-1,w=n?1:-1,A=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),a+d>=1?t+=p/c:t+=p*Math.pow(2,1-d),t*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a=a+d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+m]=s&255,m+=w,s/=256,o-=8);for(a=a<0;e[r+m]=a&255,m+=w,a/=256,l-=8);e[r+m-w]|=A*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(e){const t=Jw,r=jC,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=j,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o;const{Uint8Array:i,ArrayBuffer:a,SharedArrayBuffer:s}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const F=new i(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,i.prototype),Object.setPrototypeOf(F,B),F.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(F){if(F>o)throw new RangeError('The value "'+F+'" is invalid for option "size"');const B=new i(F);return Object.setPrototypeOf(B,u.prototype),B}function u(F,B,U){if(typeof F=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(F)}return d(F,B,U)}u.poolSize=8192;function d(F,B,U){if(typeof F=="string")return A(F,B);if(a.isView(F))return O(F);if(F==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F);if(Ue(F,a)||F&&Ue(F.buffer,a)||typeof s<"u"&&(Ue(F,s)||F&&Ue(F.buffer,s)))return P(F,B,U);if(typeof F=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const J=F.valueOf&&F.valueOf();if(J!=null&&J!==F)return u.from(J,B,U);const ne=$(F);if(ne)return ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof F[Symbol.toPrimitive]=="function")return u.from(F[Symbol.toPrimitive]("string"),B,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof F)}u.from=function(F,B,U){return d(F,B,U)},Object.setPrototypeOf(u.prototype,i.prototype),Object.setPrototypeOf(u,i);function p(F){if(typeof F!="number")throw new TypeError('"size" argument must be of type number');if(F<0)throw new RangeError('The value "'+F+'" is invalid for option "size"')}function m(F,B,U){return p(F),F<=0?l(F):B!==void 0?typeof U=="string"?l(F).fill(B,U):l(F).fill(B):l(F)}u.alloc=function(F,B,U){return m(F,B,U)};function w(F){return p(F),l(F<0?0:R(F)|0)}u.allocUnsafe=function(F){return w(F)},u.allocUnsafeSlow=function(F){return w(F)};function A(F,B){if((typeof B!="string"||B==="")&&(B="utf8"),!u.isEncoding(B))throw new TypeError("Unknown encoding: "+B);const U=I(F,B)|0;let J=l(U);const ne=J.write(F,B);return ne!==U&&(J=J.slice(0,ne)),J}function T(F){const B=F.length<0?0:R(F.length)|0,U=l(B);for(let J=0;J=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return F|0}function j(F){return+F!=F&&(F=0),u.alloc(+F)}u.isBuffer=function(B){return B!=null&&B._isBuffer===!0&&B!==u.prototype},u.compare=function(B,U){if(Ue(B,i)&&(B=u.from(B,B.offset,B.byteLength)),Ue(U,i)&&(U=u.from(U,U.offset,U.byteLength)),!u.isBuffer(B)||!u.isBuffer(U))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(B===U)return 0;let J=B.length,ne=U.length;for(let oe=0,de=Math.min(J,ne);oene.length?(u.isBuffer(de)||(de=u.from(de)),de.copy(ne,oe)):i.prototype.set.call(ne,de,oe);else if(u.isBuffer(de))de.copy(ne,oe);else throw new TypeError('"list" argument must be an Array of Buffers');oe+=de.length}return ne};function I(F,B){if(u.isBuffer(F))return F.length;if(a.isView(F)||Ue(F,a))return F.byteLength;if(typeof F!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof F);const U=F.length,J=arguments.length>2&&arguments[2]===!0;if(!J&&U===0)return 0;let ne=!1;for(;;)switch(B){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return we(F).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U*2;case"hex":return U>>>1;case"base64":return ke(F).length;default:if(ne)return J?-1:we(F).length;B=(""+B).toLowerCase(),ne=!0}}u.byteLength=I;function b(F,B,U){let J=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0,B>>>=0,U<=B))return"";for(F||(F="utf8");;)switch(F){case"hex":return g(this,B,U);case"utf8":case"utf-8":return v(this,B,U);case"ascii":return E(this,B,U);case"latin1":case"binary":return C(this,B,U);case"base64":return x(this,B,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,B,U);default:if(J)throw new TypeError("Unknown encoding: "+F);F=(F+"").toLowerCase(),J=!0}}u.prototype._isBuffer=!0;function N(F,B,U){const J=F[B];F[B]=F[U],F[U]=J}u.prototype.swap16=function(){const B=this.length;if(B%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;UU&&(B+=" ... "),""},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(B,U,J,ne,oe){if(Ue(B,i)&&(B=u.from(B,B.offset,B.byteLength)),!u.isBuffer(B))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof B);if(U===void 0&&(U=0),J===void 0&&(J=B?B.length:0),ne===void 0&&(ne=0),oe===void 0&&(oe=this.length),U<0||J>B.length||ne<0||oe>this.length)throw new RangeError("out of range index");if(ne>=oe&&U>=J)return 0;if(ne>=oe)return-1;if(U>=J)return 1;if(U>>>=0,J>>>=0,ne>>>=0,oe>>>=0,this===B)return 0;let de=oe-ne,Te=J-U;const $e=Math.min(de,Te),De=this.slice(ne,oe),Xe=B.slice(U,J);for(let ze=0;ze<$e;++ze)if(De[ze]!==Xe[ze]){de=De[ze],Te=Xe[ze];break}return de2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),U=+U,je(U)&&(U=ne?0:F.length-1),U<0&&(U=F.length+U),U>=F.length){if(ne)return-1;U=F.length-1}else if(U<0)if(ne)U=0;else return-1;if(typeof B=="string"&&(B=u.from(B,J)),u.isBuffer(B))return B.length===0?-1:Z(F,B,U,J,ne);if(typeof B=="number")return B=B&255,typeof i.prototype.indexOf=="function"?ne?i.prototype.indexOf.call(F,B,U):i.prototype.lastIndexOf.call(F,B,U):Z(F,[B],U,J,ne);throw new TypeError("val must be string, number or Buffer")}function Z(F,B,U,J,ne){let oe=1,de=F.length,Te=B.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(F.length<2||B.length<2)return-1;oe=2,de/=2,Te/=2,U/=2}function $e(Xe,ze){return oe===1?Xe[ze]:Xe.readUInt16BE(ze*oe)}let De;if(ne){let Xe=-1;for(De=U;Dede&&(U=de-Te),De=U;De>=0;De--){let Xe=!0;for(let ze=0;zene&&(J=ne)):J=ne;const oe=B.length;J>oe/2&&(J=oe/2);let de;for(de=0;de>>0,isFinite(J)?(J=J>>>0,ne===void 0&&(ne="utf8")):(ne=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const oe=this.length-U;if((J===void 0||J>oe)&&(J=oe),B.length>0&&(J<0||U<0)||U>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");let de=!1;for(;;)switch(ne){case"hex":return q(this,B,U,J);case"utf8":case"utf-8":return _(this,B,U,J);case"ascii":case"latin1":case"binary":return y(this,B,U,J);case"base64":return f(this,B,U,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,B,U,J);default:if(de)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),de=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(F,B,U){return B===0&&U===F.length?t.fromByteArray(F):t.fromByteArray(F.slice(B,U))}function v(F,B,U){U=Math.min(F.length,U);const J=[];let ne=B;for(;ne239?4:oe>223?3:oe>191?2:1;if(ne+Te<=U){let $e,De,Xe,ze;switch(Te){case 1:oe<128&&(de=oe);break;case 2:$e=F[ne+1],($e&192)===128&&(ze=(oe&31)<<6|$e&63,ze>127&&(de=ze));break;case 3:$e=F[ne+1],De=F[ne+2],($e&192)===128&&(De&192)===128&&(ze=(oe&15)<<12|($e&63)<<6|De&63,ze>2047&&(ze<55296||ze>57343)&&(de=ze));break;case 4:$e=F[ne+1],De=F[ne+2],Xe=F[ne+3],($e&192)===128&&(De&192)===128&&(Xe&192)===128&&(ze=(oe&15)<<18|($e&63)<<12|(De&63)<<6|Xe&63,ze>65535&&ze<1114112&&(de=ze))}}de===null?(de=65533,Te=1):de>65535&&(de-=65536,J.push(de>>>10&1023|55296),de=56320|de&1023),J.push(de),ne+=Te}return k(J)}const S=4096;function k(F){const B=F.length;if(B<=S)return String.fromCharCode.apply(String,F);let U="",J=0;for(;JJ)&&(U=J);let ne="";for(let oe=B;oeJ&&(B=J),U<0?(U+=J,U<0&&(U=0)):U>J&&(U=J),UU)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(B,U,J){B=B>>>0,U=U>>>0,J||re(B,U,this.length);let ne=this[B],oe=1,de=0;for(;++de>>0,U=U>>>0,J||re(B,U,this.length);let ne=this[B+--U],oe=1;for(;U>0&&(oe*=256);)ne+=this[B+--U]*oe;return ne},u.prototype.readUint8=u.prototype.readUInt8=function(B,U){return B=B>>>0,U||re(B,1,this.length),this[B]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(B,U){return B=B>>>0,U||re(B,2,this.length),this[B]|this[B+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(B,U){return B=B>>>0,U||re(B,2,this.length),this[B]<<8|this[B+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(B,U){return B=B>>>0,U||re(B,4,this.length),(this[B]|this[B+1]<<8|this[B+2]<<16)+this[B+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(B,U){return B=B>>>0,U||re(B,4,this.length),this[B]*16777216+(this[B+1]<<16|this[B+2]<<8|this[B+3])},u.prototype.readBigUInt64LE=D(function(B){B=B>>>0,Pe(B,"offset");const U=this[B],J=this[B+7];(U===void 0||J===void 0)&&he(B,this.length-8);const ne=U+this[++B]*2**8+this[++B]*2**16+this[++B]*2**24,oe=this[++B]+this[++B]*2**8+this[++B]*2**16+J*2**24;return BigInt(ne)+(BigInt(oe)<>>0,Pe(B,"offset");const U=this[B],J=this[B+7];(U===void 0||J===void 0)&&he(B,this.length-8);const ne=U*2**24+this[++B]*2**16+this[++B]*2**8+this[++B],oe=this[++B]*2**24+this[++B]*2**16+this[++B]*2**8+J;return(BigInt(ne)<>>0,U=U>>>0,J||re(B,U,this.length);let ne=this[B],oe=1,de=0;for(;++de=oe&&(ne-=Math.pow(2,8*U)),ne},u.prototype.readIntBE=function(B,U,J){B=B>>>0,U=U>>>0,J||re(B,U,this.length);let ne=U,oe=1,de=this[B+--ne];for(;ne>0&&(oe*=256);)de+=this[B+--ne]*oe;return oe*=128,de>=oe&&(de-=Math.pow(2,8*U)),de},u.prototype.readInt8=function(B,U){return B=B>>>0,U||re(B,1,this.length),this[B]&128?(255-this[B]+1)*-1:this[B]},u.prototype.readInt16LE=function(B,U){B=B>>>0,U||re(B,2,this.length);const J=this[B]|this[B+1]<<8;return J&32768?J|4294901760:J},u.prototype.readInt16BE=function(B,U){B=B>>>0,U||re(B,2,this.length);const J=this[B+1]|this[B]<<8;return J&32768?J|4294901760:J},u.prototype.readInt32LE=function(B,U){return B=B>>>0,U||re(B,4,this.length),this[B]|this[B+1]<<8|this[B+2]<<16|this[B+3]<<24},u.prototype.readInt32BE=function(B,U){return B=B>>>0,U||re(B,4,this.length),this[B]<<24|this[B+1]<<16|this[B+2]<<8|this[B+3]},u.prototype.readBigInt64LE=D(function(B){B=B>>>0,Pe(B,"offset");const U=this[B],J=this[B+7];(U===void 0||J===void 0)&&he(B,this.length-8);const ne=this[B+4]+this[B+5]*2**8+this[B+6]*2**16+(J<<24);return(BigInt(ne)<>>0,Pe(B,"offset");const U=this[B],J=this[B+7];(U===void 0||J===void 0)&&he(B,this.length-8);const ne=(U<<24)+this[++B]*2**16+this[++B]*2**8+this[++B];return(BigInt(ne)<>>0,U||re(B,4,this.length),r.read(this,B,!0,23,4)},u.prototype.readFloatBE=function(B,U){return B=B>>>0,U||re(B,4,this.length),r.read(this,B,!1,23,4)},u.prototype.readDoubleLE=function(B,U){return B=B>>>0,U||re(B,8,this.length),r.read(this,B,!0,52,8)},u.prototype.readDoubleBE=function(B,U){return B=B>>>0,U||re(B,8,this.length),r.read(this,B,!1,52,8)};function W(F,B,U,J,ne,oe){if(!u.isBuffer(F))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>ne||BF.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(B,U,J,ne){if(B=+B,U=U>>>0,J=J>>>0,!ne){const Te=Math.pow(2,8*J)-1;W(this,B,U,J,Te,0)}let oe=1,de=0;for(this[U]=B&255;++de>>0,J=J>>>0,!ne){const Te=Math.pow(2,8*J)-1;W(this,B,U,J,Te,0)}let oe=J-1,de=1;for(this[U+oe]=B&255;--oe>=0&&(de*=256);)this[U+oe]=B/de&255;return U+J},u.prototype.writeUint8=u.prototype.writeUInt8=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,1,255,0),this[U]=B&255,U+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,2,65535,0),this[U]=B&255,this[U+1]=B>>>8,U+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,2,65535,0),this[U]=B>>>8,this[U+1]=B&255,U+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,4,4294967295,0),this[U+3]=B>>>24,this[U+2]=B>>>16,this[U+1]=B>>>8,this[U]=B&255,U+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,4,4294967295,0),this[U]=B>>>24,this[U+1]=B>>>16,this[U+2]=B>>>8,this[U+3]=B&255,U+4};function ee(F,B,U,J,ne){me(B,J,ne,F,U,7);let oe=Number(B&BigInt(4294967295));F[U++]=oe,oe=oe>>8,F[U++]=oe,oe=oe>>8,F[U++]=oe,oe=oe>>8,F[U++]=oe;let de=Number(B>>BigInt(32)&BigInt(4294967295));return F[U++]=de,de=de>>8,F[U++]=de,de=de>>8,F[U++]=de,de=de>>8,F[U++]=de,U}function ce(F,B,U,J,ne){me(B,J,ne,F,U,7);let oe=Number(B&BigInt(4294967295));F[U+7]=oe,oe=oe>>8,F[U+6]=oe,oe=oe>>8,F[U+5]=oe,oe=oe>>8,F[U+4]=oe;let de=Number(B>>BigInt(32)&BigInt(4294967295));return F[U+3]=de,de=de>>8,F[U+2]=de,de=de>>8,F[U+1]=de,de=de>>8,F[U]=de,U+8}u.prototype.writeBigUInt64LE=D(function(B,U=0){return ee(this,B,U,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=D(function(B,U=0){return ce(this,B,U,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(B,U,J,ne){if(B=+B,U=U>>>0,!ne){const $e=Math.pow(2,8*J-1);W(this,B,U,J,$e-1,-$e)}let oe=0,de=1,Te=0;for(this[U]=B&255;++oe>0)-Te&255;return U+J},u.prototype.writeIntBE=function(B,U,J,ne){if(B=+B,U=U>>>0,!ne){const $e=Math.pow(2,8*J-1);W(this,B,U,J,$e-1,-$e)}let oe=J-1,de=1,Te=0;for(this[U+oe]=B&255;--oe>=0&&(de*=256);)B<0&&Te===0&&this[U+oe+1]!==0&&(Te=1),this[U+oe]=(B/de>>0)-Te&255;return U+J},u.prototype.writeInt8=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,1,127,-128),B<0&&(B=255+B+1),this[U]=B&255,U+1},u.prototype.writeInt16LE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,2,32767,-32768),this[U]=B&255,this[U+1]=B>>>8,U+2},u.prototype.writeInt16BE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,2,32767,-32768),this[U]=B>>>8,this[U+1]=B&255,U+2},u.prototype.writeInt32LE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,4,2147483647,-2147483648),this[U]=B&255,this[U+1]=B>>>8,this[U+2]=B>>>16,this[U+3]=B>>>24,U+4},u.prototype.writeInt32BE=function(B,U,J){return B=+B,U=U>>>0,J||W(this,B,U,4,2147483647,-2147483648),B<0&&(B=4294967295+B+1),this[U]=B>>>24,this[U+1]=B>>>16,this[U+2]=B>>>8,this[U+3]=B&255,U+4},u.prototype.writeBigInt64LE=D(function(B,U=0){return ee(this,B,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=D(function(B,U=0){return ce(this,B,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ie(F,B,U,J,ne,oe){if(U+J>F.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function le(F,B,U,J,ne){return B=+B,U=U>>>0,ne||ie(F,B,U,4),r.write(F,B,U,J,23,4),U+4}u.prototype.writeFloatLE=function(B,U,J){return le(this,B,U,!0,J)},u.prototype.writeFloatBE=function(B,U,J){return le(this,B,U,!1,J)};function L(F,B,U,J,ne){return B=+B,U=U>>>0,ne||ie(F,B,U,8),r.write(F,B,U,J,52,8),U+8}u.prototype.writeDoubleLE=function(B,U,J){return L(this,B,U,!0,J)},u.prototype.writeDoubleBE=function(B,U,J){return L(this,B,U,!1,J)},u.prototype.copy=function(B,U,J,ne){if(!u.isBuffer(B))throw new TypeError("argument should be a Buffer");if(J||(J=0),!ne&&ne!==0&&(ne=this.length),U>=B.length&&(U=B.length),U||(U=0),ne>0&&ne=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),B.length-U>>0,J=J===void 0?this.length:J>>>0,B||(B=0);let oe;if(typeof B=="number")for(oe=U;oe2**32?ne=ye(String(U)):typeof U=="bigint"&&(ne=String(U),(U>BigInt(2)**BigInt(32)||U<-(BigInt(2)**BigInt(32)))&&(ne=ye(ne)),ne+="n"),J+=` It must be ${B}. Received ${ne}`,J},RangeError);function ye(F){let B="",U=F.length;const J=F[0]==="-"?1:0;for(;U>=J+4;U-=3)B=`_${F.slice(U-3,U)}${B}`;return`${F.slice(0,U)}${B}`}function ve(F,B,U){Pe(B,"offset"),(F[B]===void 0||F[B+U]===void 0)&&he(B,F.length-(U+1))}function me(F,B,U,J,ne,oe){if(F>U||F3?B===0||B===BigInt(0)?Te=`>= 0${de} and < 2${de} ** ${(oe+1)*8}${de}`:Te=`>= -(2${de} ** ${(oe+1)*8-1}${de}) and < 2 ** ${(oe+1)*8-1}${de}`:Te=`>= ${B}${de} and <= ${U}${de}`,new te.ERR_OUT_OF_RANGE("value",Te,F)}ve(J,ne,oe)}function Pe(F,B){if(typeof F!="number")throw new te.ERR_INVALID_ARG_TYPE(B,"number",F)}function he(F,B,U){throw Math.floor(F)!==F?(Pe(F,U),new te.ERR_OUT_OF_RANGE(U||"offset","an integer",F)):B<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE(U||"offset",`>= ${U?1:0} and <= ${B}`,F)}const be=/[^+/0-9A-Za-z-_]/g;function Ie(F){if(F=F.split("=")[0],F=F.trim().replace(be,""),F.length<2)return"";for(;F.length%4!==0;)F=F+"=";return F}function we(F,B){B=B||1/0;let U;const J=F.length;let ne=null;const oe=[];for(let de=0;de55295&&U<57344){if(!ne){if(U>56319){(B-=3)>-1&&oe.push(239,191,189);continue}else if(de+1===J){(B-=3)>-1&&oe.push(239,191,189);continue}ne=U;continue}if(U<56320){(B-=3)>-1&&oe.push(239,191,189),ne=U;continue}U=(ne-55296<<10|U-56320)+65536}else ne&&(B-=3)>-1&&oe.push(239,191,189);if(ne=null,U<128){if((B-=1)<0)break;oe.push(U)}else if(U<2048){if((B-=2)<0)break;oe.push(U>>6|192,U&63|128)}else if(U<65536){if((B-=3)<0)break;oe.push(U>>12|224,U>>6&63|128,U&63|128)}else if(U<1114112){if((B-=4)<0)break;oe.push(U>>18|240,U>>12&63|128,U>>6&63|128,U&63|128)}else throw new Error("Invalid code point")}return oe}function Oe(F){const B=[];for(let U=0;U>8,ne=U%256,oe.push(ne),oe.push(J);return oe}function ke(F){return t.toByteArray(Ie(F))}function Me(F,B,U,J){let ne;for(ne=0;ne=B.length||ne>=F.length);++ne)B[ne+U]=F[ne];return ne}function Ue(F,B){return F instanceof B||F!=null&&F.constructor!=null&&F.constructor.name!=null&&F.constructor.name===B.name}function je(F){return F!==F}const X=function(){const F="0123456789abcdef",B=new Array(256);for(let U=0;U<16;++U){const J=U*16;for(let ne=0;ne<16;++ne)B[J+ne]=F[U]+F[ne]}return B}();function D(F){return typeof BigInt>"u"?H:F}function H(){throw new Error("BigInt not supported")}})(Br);const Ze=Br.Buffer,zPe=Br.Blob,VPe=Br.BlobOptions,mb=Br.Buffer,qPe=Br.File,WPe=Br.FileOptions,GPe=Br.INSPECT_MAX_BYTES,KPe=Br.SlowBuffer,YPe=Br.TranscodeEncoding,JPe=Br.atob,ZPe=Br.btoa,XPe=Br.constants,QPe=Br.isAscii,e9e=Br.isUtf8,t9e=Br.kMaxLength,r9e=Br.kStringMaxLength,n9e=Br.resolveObjectURL,o9e=Br.transcode,i9e=Object.freeze(Object.defineProperty({__proto__:null,Blob:zPe,BlobOptions:VPe,Buffer:mb,File:qPe,FileOptions:WPe,INSPECT_MAX_BYTES:GPe,SlowBuffer:KPe,TranscodeEncoding:YPe,atob:JPe,btoa:ZPe,constants:XPe,default:Ze,isAscii:QPe,isUtf8:e9e,kMaxLength:t9e,kStringMaxLength:r9e,resolveObjectURL:n9e,transcode:o9e},Symbol.toStringTag,{value:"Module"}));function a9e(e){return!e||typeof e.then!="function"?Promise.resolve(e):e}function Lr(e,...t){try{return a9e(e(...t))}catch(r){return Promise.reject(r)}}function s9e(e){const t=typeof e;return e===null||t!=="object"&&t!=="function"}function c9e(e){const t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}function Sv(e){if(s9e(e))return String(e);if(c9e(e)||Array.isArray(e))return JSON.stringify(e);if(typeof e.toJSON=="function")return Sv(e.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function zK(){if(typeof Ze===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const cS="base64:";function l9e(e){if(typeof e=="string")return e;zK();const t=Ze.from(e).toString("base64");return cS+t}function u9e(e){return typeof e!="string"||!e.startsWith(cS)?e:(zK(),Ze.from(e.slice(cS.length),"base64"))}function eo(e){return e?e.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function f9e(...e){return eo(e.join(":"))}function km(e){return e=eo(e),e?e+":":""}const d9e="memory",h9e=()=>{const e=new Map;return{name:d9e,options:{},hasItem(t){return e.has(t)},getItem(t){return e.get(t)??null},getItemRaw(t){return e.get(t)??null},setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys(){return Array.from(e.keys())},clear(){e.clear()},dispose(){e.clear()}}};function p9e(e={}){const t={mounts:{"":e.driver||h9e()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=l=>{for(const u of t.mountpoints)if(l.startsWith(u))return{base:u,relativeKey:l.slice(u.length),driver:t.mounts[u]};return{base:"",relativeKey:l,driver:t.mounts[""]}},n=(l,u)=>t.mountpoints.filter(d=>d.startsWith(l)||u&&l.startsWith(d)).map(d=>({relativeBase:l.length>d.length?l.slice(d.length):void 0,mountpoint:d,driver:t.mounts[d]})),o=(l,u)=>{if(t.watching){u=eo(u);for(const d of t.watchListeners)d(l,u)}},i=async()=>{if(!t.watching){t.watching=!0;for(const l in t.mounts)t.unwatch[l]=await Fk(t.mounts[l],o,l)}},a=async()=>{if(t.watching){for(const l in t.unwatch)await t.unwatch[l]();t.unwatch={},t.watching=!1}},s=(l,u,d)=>{const p=new Map,m=w=>{let A=p.get(w.base);return A||(A={driver:w.driver,base:w.base,items:[]},p.set(w.base,A)),A};for(const w of l){const A=typeof w=="string",T=eo(A?w:w.key),O=A?void 0:w.value,P=A||!w.options?u:{...u,...w.options},$=r(T);m($).items.push({key:T,value:O,relativeKey:$.relativeKey,options:P})}return Promise.all([...p.values()].map(w=>d(w))).then(w=>w.flat())},c={hasItem(l,u={}){l=eo(l);const{relativeKey:d,driver:p}=r(l);return Lr(p.hasItem,d,u)},getItem(l,u={}){l=eo(l);const{relativeKey:d,driver:p}=r(l);return Lr(p.getItem,d,u).then(m=>Mm(m))},getItems(l,u){return s(l,u,d=>d.driver.getItems?Lr(d.driver.getItems,d.items.map(p=>({key:p.relativeKey,options:p.options})),u).then(p=>p.map(m=>({key:f9e(d.base,m.key),value:Mm(m.value)}))):Promise.all(d.items.map(p=>Lr(d.driver.getItem,p.relativeKey,p.options).then(m=>({key:p.key,value:Mm(m)})))))},getItemRaw(l,u={}){l=eo(l);const{relativeKey:d,driver:p}=r(l);return p.getItemRaw?Lr(p.getItemRaw,d,u):Lr(p.getItem,d,u).then(m=>u9e(m))},async setItem(l,u,d={}){if(u===void 0)return c.removeItem(l);l=eo(l);const{relativeKey:p,driver:m}=r(l);m.setItem&&(await Lr(m.setItem,p,Sv(u),d),m.watch||o("update",l))},async setItems(l,u){await s(l,u,async d=>{d.driver.setItems&&await Lr(d.driver.setItems,d.items.map(p=>({key:p.relativeKey,value:Sv(p.value),options:p.options})),u),d.driver.setItem&&await Promise.all(d.items.map(p=>Lr(d.driver.setItem,p.relativeKey,Sv(p.value),p.options)))})},async setItemRaw(l,u,d={}){if(u===void 0)return c.removeItem(l,d);l=eo(l);const{relativeKey:p,driver:m}=r(l);if(m.setItemRaw)await Lr(m.setItemRaw,p,u,d);else if(m.setItem)await Lr(m.setItem,p,l9e(u),d);else return;m.watch||o("update",l)},async removeItem(l,u={}){typeof u=="boolean"&&(u={removeMeta:u}),l=eo(l);const{relativeKey:d,driver:p}=r(l);p.removeItem&&(await Lr(p.removeItem,d,u),(u.removeMeta||u.removeMata)&&await Lr(p.removeItem,d+"$",u),p.watch||o("remove",l))},async getMeta(l,u={}){typeof u=="boolean"&&(u={nativeOnly:u}),l=eo(l);const{relativeKey:d,driver:p}=r(l),m=Object.create(null);if(p.getMeta&&Object.assign(m,await Lr(p.getMeta,d,u)),!u.nativeOnly){const w=await Lr(p.getItem,d+"$",u).then(A=>Mm(A));w&&typeof w=="object"&&(typeof w.atime=="string"&&(w.atime=new Date(w.atime)),typeof w.mtime=="string"&&(w.mtime=new Date(w.mtime)),Object.assign(m,w))}return m},setMeta(l,u,d={}){return this.setItem(l+"$",u,d)},removeMeta(l,u={}){return this.removeItem(l+"$",u)},async getKeys(l,u={}){l=km(l);const d=n(l,!0);let p=[];const m=[];for(const w of d){const T=(await Lr(w.driver.getKeys,w.relativeBase,u)).map(O=>w.mountpoint+eo(O)).filter(O=>!p.some(P=>O.startsWith(P)));m.push(...T),p=[w.mountpoint,...p.filter(O=>!O.startsWith(w.mountpoint))]}return l?m.filter(w=>w.startsWith(l)&&!w.endsWith("$")):m.filter(w=>!w.endsWith("$"))},async clear(l,u={}){l=km(l),await Promise.all(n(l,!1).map(async d=>{if(d.driver.clear)return Lr(d.driver.clear,d.relativeBase,u);if(d.driver.removeItem){const p=await d.driver.getKeys(d.relativeBase||"",u);return Promise.all(p.map(m=>d.driver.removeItem(m,u)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(l=>jk(l)))},async watch(l){return await i(),t.watchListeners.push(l),async()=>{t.watchListeners=t.watchListeners.filter(u=>u!==l),t.watchListeners.length===0&&await a()}},async unwatch(){t.watchListeners=[],await a()},mount(l,u){if(l=km(l),l&&t.mounts[l])throw new Error(`already mounted at ${l}`);return l&&(t.mountpoints.push(l),t.mountpoints.sort((d,p)=>p.length-d.length)),t.mounts[l]=u,t.watching&&Promise.resolve(Fk(u,o,l)).then(d=>{t.unwatch[l]=d}).catch(console.error),c},async unmount(l,u=!0){l=km(l),!(!l||!t.mounts[l])&&(t.watching&&l in t.unwatch&&(t.unwatch[l](),delete t.unwatch[l]),u&&await jk(t.mounts[l]),t.mountpoints=t.mountpoints.filter(d=>d!==l),delete t.mounts[l])},getMount(l=""){l=eo(l)+":";const u=r(l);return{driver:u.driver,base:u.base}},getMounts(l="",u={}){return l=eo(l),n(l,u.parents).map(p=>({driver:p.driver,base:p.mountpoint}))}};return c}function Fk(e,t,r){return e.watch?e.watch((n,o)=>t(n,r+o)):()=>{}}async function jk(e){typeof e.dispose=="function"&&await Lr(e.dispose)}function pu(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function VK(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=pu(r);return(o,i)=>n.then(a=>i(a.transaction(t,o).objectStore(t)))}let T5;function Z0(){return T5||(T5=VK("keyval-store","keyval")),T5}function Lk(e,t=Z0()){return t("readonly",r=>pu(r.get(e)))}function g9e(e,t,r=Z0()){return r("readwrite",n=>(n.put(t,e),pu(n.transaction)))}function m9e(e,t=Z0()){return t("readwrite",r=>(r.delete(e),pu(r.transaction)))}function v9e(e=Z0()){return e("readwrite",t=>(t.clear(),pu(t.transaction)))}function y9e(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},pu(e.transaction)}function b9e(e=Z0()){return e("readonly",t=>{if(t.getAllKeys)return pu(t.getAllKeys());const r=[];return y9e(t,n=>r.push(n.key)).then(()=>r)})}const w9e=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),_9e=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function Zw(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return _9e(e)}catch{return e}}function X0(e){return typeof e=="string"?e:w9e(e)||""}const x9e="idb-keyval";var S9e=(e={})=>{const t=e.base&&e.base.length>0?`${e.base}:`:"",r=o=>t+o;let n;return e.dbName&&e.storeName&&(n=VK(e.dbName,e.storeName)),{name:x9e,options:e,async hasItem(o){return!(typeof await Lk(r(o),n)>"u")},async getItem(o){return await Lk(r(o),n)??null},setItem(o,i){return g9e(r(o),i,n)},removeItem(o){return m9e(r(o),n)},getKeys(){return b9e(n)},clear(){return v9e(n)}}};const E9e="WALLET_CONNECT_V2_INDEXED_DB",C9e="keyvaluestorage";let P9e=class{constructor(){this.indexedDb=p9e({driver:S9e({dbName:E9e,storeName:C9e})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(t=>[t.key,t.value])}async getItem(t){const r=await this.indexedDb.getItem(t);if(r!==null)return r}async setItem(t,r){await this.indexedDb.setItem(t,X0(r))}async removeItem(t){await this.indexedDb.removeItem(t)}};var M5=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof kt<"u"?kt:typeof self<"u"?self:{},Ev={exports:{}};(function(){let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof M5<"u"&&M5.localStorage?Ev.exports=M5.localStorage:typeof window<"u"&&window.localStorage?Ev.exports=window.localStorage:Ev.exports=new t})();function A9e(e){var t;return[e[0],Zw((t=e[1])!=null?t:"")]}let O9e=class{constructor(){this.localStorage=Ev.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(A9e)}async getItem(t){const r=this.localStorage.getItem(t);if(r!==null)return Zw(r)}async setItem(t,r){this.localStorage.setItem(t,X0(r))}async removeItem(t){this.localStorage.removeItem(t)}};const I9e="wc_storage_version",Uk=1,T9e=async(e,t,r)=>{const n=I9e,o=await t.getItem(n);if(o&&o>=Uk){r(t);return}const i=await e.getKeys();if(!i.length){r(t);return}const a=[];for(;i.length;){const s=i.shift();if(!s)continue;const c=s.toLowerCase();if(c.includes("wc@")||c.includes("walletconnect")||c.includes("wc_")||c.includes("wallet_connect")){const l=await e.getItem(s);await t.setItem(s,l),a.push(s)}}await t.setItem(n,Uk),r(t),M9e(e,a)},M9e=async(e,t)=>{t.length&&t.forEach(async r=>{await e.removeItem(r)})};let lS=class{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const t=new O9e;this.storage=t;try{const r=new P9e;T9e(t,r,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(t){return await this.initialize(),this.storage.getItem(t)}async setItem(t,r){return await this.initialize(),this.storage.setItem(t,r)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const r=setInterval(()=>{this.initialized&&(clearInterval(r),t())},20)})}};const k9e=Object.freeze(Object.defineProperty({__proto__:null,KeyValueStorage:lS,default:lS},Symbol.toStringTag,{value:"Module"}));var Pd={},bh={},dt={},k5={},wh={},Hk;function $9e(){if(Hk)return wh;Hk=1,Object.defineProperty(wh,"__esModule",{value:!0}),wh.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return wh.delay=e,wh}var el={},$5={},tl={},zk;function D9e(){return zk||(zk=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.ONE_THOUSAND=tl.ONE_HUNDRED=void 0,tl.ONE_HUNDRED=100,tl.ONE_THOUSAND=1e3),tl}var D5={},Vk;function R9e(){return Vk||(Vk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(D5)),D5}var qk;function qK(){return qk||(qk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar(D9e(),e),t.__exportStar(R9e(),e)}($5)),$5}var Wk;function N9e(){if(Wk)return el;Wk=1,Object.defineProperty(el,"__esModule",{value:!0}),el.fromMiliseconds=el.toMiliseconds=void 0;const e=qK();function t(n){return n*e.ONE_THOUSAND}el.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return el.fromMiliseconds=r,el}var Gk;function B9e(){return Gk||(Gk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar($9e(),e),t.__exportStar(N9e(),e)}(k5)),k5}var Fu={},Kk;function F9e(){if(Kk)return Fu;Kk=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const o=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:o})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return Fu.Watch=e,Fu.default=e,Fu}var R5={},_h={},Yk;function j9e(){if(Yk)return _h;Yk=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.IWatch=void 0;class e{}return _h.IWatch=e,_h}var Jk;function L9e(){return Jk||(Jk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),ui.__exportStar(j9e(),e)}(R5)),R5}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar(B9e(),e),t.__exportStar(F9e(),e),t.__exportStar(L9e(),e),t.__exportStar(qK(),e)})(dt);var N5={},xh={};let gu=class{};const U9e=Object.freeze(Object.defineProperty({__proto__:null,IEvents:gu},Symbol.toStringTag,{value:"Module"})),H9e=zi(U9e);var Zk;function z9e(){if(Zk)return xh;Zk=1,Object.defineProperty(xh,"__esModule",{value:!0}),xh.IHeartBeat=void 0;const e=H9e;class t extends e.IEvents{constructor(n){super()}}return xh.IHeartBeat=t,xh}var Xk;function WK(){return Xk||(Xk=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),ui.__exportStar(z9e(),e)}(N5)),N5}var B5={},rl={},Qk;function V9e(){if(Qk)return rl;Qk=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.HEARTBEAT_EVENTS=rl.HEARTBEAT_INTERVAL=void 0;const e=dt;return rl.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,rl.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},rl}var e$;function GK(){return e$||(e$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),ui.__exportStar(V9e(),e)}(B5)),B5}var t$;function q9e(){if(t$)return bh;t$=1,Object.defineProperty(bh,"__esModule",{value:!0}),bh.HeartBeat=void 0;const e=ui,t=Vi,r=dt,n=WK(),o=GK();class i extends n.IHeartBeat{constructor(s){super(s),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(s==null?void 0:s.interval)||o.HEARTBEAT_INTERVAL}static init(s){return e.__awaiter(this,void 0,void 0,function*(){const c=new i(s);return yield c.init(),c})}init(){return e.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(s,c){this.events.on(s,c)}once(s,c){this.events.once(s,c)}off(s,c){this.events.off(s,c)}removeListener(s,c){this.events.removeListener(s,c)}initialize(){return e.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return bh.HeartBeat=i,bh}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar(q9e(),e),t.__exportStar(WK(),e),t.__exportStar(GK(),e)})(Pd);var Ot={},F5,r$;function W9e(){if(r$)return F5;r$=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}F5=t;function t(r,n,o){var i=o&&o.stringify||e,a=1;if(typeof r=="object"&&r!==null){var s=n.length+a;if(s===1)return r;var c=new Array(s);c[0]=i(r);for(var l=1;l-1?m:0,r.charCodeAt(A+1)){case 100:case 102:if(p>=u||n[p]==null)break;m=u||n[p]==null)break;m=u||n[p]===void 0)break;m",m=A+2,A++;break}d+=i(n[p]),m=A+2,A++;break;case 115:if(p>=u)break;m-1&&(q=!1);const _=["error","fatal","warn","info","debug","trace"];typeof N=="function"&&(N.error=N.fatal=N.warn=N.info=N.debug=N.trace=N),I.enabled===!1&&(I.level="silent");const y=I.level||"info",f=Object.create(N);f.log||(f.log=T),Object.defineProperty(f,"levelVal",{get:x}),Object.defineProperty(f,"level",{get:v,set:S});const h={transmit:b,serialize:Z,asObject:I.browser.asObject,levels:_,timestamp:m(I)};f.levels=o.levels,f.level=y,f.setMaxListeners=f.getMaxListeners=f.emit=f.addListener=f.on=f.prependListener=f.once=f.prependOnceListener=f.removeListener=f.removeAllListeners=f.listeners=f.listenerCount=f.eventNames=f.write=f.flush=T,f.serializers=V,f._serialize=Z,f._stdErrSerialize=q,f.child=k,b&&(f._logEvent=d());function x(){return this.level==="silent"?1/0:this.levels.values[this.level]}function v(){return this._level}function S(E){if(E!=="silent"&&!this.levels.values[E])throw Error("unknown level "+E);this._level=E,i(h,f,"error","log"),i(h,f,"fatal","error"),i(h,f,"warn","error"),i(h,f,"info","log"),i(h,f,"debug","log"),i(h,f,"trace","log")}function k(E,C){if(!E)throw new Error("missing bindings for child Pino");C=C||{},Z&&E.serializers&&(C.serializers=E.serializers);const g=C.serializers;if(Z&&g){var M=Object.assign({},V,g),re=I.browser.serialize===!0?Object.keys(M):Z;delete E.serializers,c([E],re,M,this._stdErrSerialize)}function W(ee){this._childLevel=(ee._childLevel|0)+1,this.error=l(ee,E,"error"),this.fatal=l(ee,E,"fatal"),this.warn=l(ee,E,"warn"),this.info=l(ee,E,"info"),this.debug=l(ee,E,"debug"),this.trace=l(ee,E,"trace"),M&&(this.serializers=M,this._serialize=re),b&&(this._logEvent=d([].concat(ee._logEvent.bindings,E)))}return W.prototype=this,new W(this)}return f}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=r,o.stdTimeFunctions=Object.assign({},{nullTime:O,epochTime:P,unixTime:$,isoTime:R});function i(I,b,N,V){const Z=Object.getPrototypeOf(b);b[N]=b.levelVal>b.levels.values[N]?T:Z[N]?Z[N]:t[N]||t[V]||T,a(I,b,N)}function a(I,b,N){!I.transmit&&b[N]===T||(b[N]=function(V){return function(){const q=I.timestamp(),_=new Array(arguments.length),y=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var f=0;f<_.length;f++)_[f]=arguments[f];if(I.serialize&&!I.asObject&&c(_,this._serialize,this.serializers,this._stdErrSerialize),I.asObject?V.call(y,s(this,N,_,q)):V.apply(y,_),I.transmit){const h=I.transmit.level||b.level,x=o.levels.values[h],v=o.levels.values[N];if(v-1&&q in N&&(I[Z][q]=N[q](I[Z][q]))}function l(I,b,N){return function(){const V=new Array(1+arguments.length);V[0]=b;for(var Z=1;Z"u"?l=r(s,c):l=s.bindings().context||"",l}Ln.getLoggerContext=o;function i(s,c,l=e.PINO_CUSTOM_CONTEXT_KEY){const u=o(s,l);return u.trim()?`${u}/${c}`:c}Ln.formatChildLoggerContext=i;function a(s,c,l=e.PINO_CUSTOM_CONTEXT_KEY){const u=i(s,c,l),d=s.child({context:u});return n(d,u,l)}return Ln.generateChildLogger=a,Ln}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=ui,r=t.__importDefault(G9e());Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return r.default}}),t.__exportStar(KK(),e),t.__exportStar(K9e(),e)})(Ot);let Y9e=class extends gu{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}},J9e=class extends gu{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}},Z9e=class{constructor(t,r){this.logger=t,this.core=r}},X9e=class extends gu{constructor(t,r){super(),this.relayer=t,this.logger=r}},Q9e=class extends gu{constructor(t){super()}},eAe=class{constructor(t,r,n,o){this.core=t,this.logger=r,this.name=n}},tAe=class extends gu{constructor(t,r){super(),this.relayer=t,this.logger=r}},rAe=class extends gu{constructor(t,r){super(),this.core=t,this.logger=r}},nAe=class{constructor(t,r){this.projectId=t,this.logger=r}},oAe=class{constructor(t,r){this.projectId=t,this.logger=r}},iAe=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}},aAe=class{constructor(t){this.client=t}};var LC={},Ad={},Xw={},Qw={};Object.defineProperty(Qw,"__esModule",{value:!0});Qw.BrowserRandomSource=void 0;const a$=65536;class sAe{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let n=0;n>>16&65535,u=s&65535,d=c>>>16&65535,p=c&65535;return u*p+(l*p+u*d<<16>>>0)|0}e.mul=Math.imul||t;function r(s,c){return s+c|0}e.add=r;function n(s,c){return s-c|0}e.sub=n;function o(s,c){return s<>>32-c}e.rotl=o;function i(s,c){return s<<32-c|s>>>c}e.rotr=i;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})(YK);Object.defineProperty(_t,"__esModule",{value:!0});var JK=YK;function vAe(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}_t.readInt16BE=vAe;function yAe(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}_t.readUint16BE=yAe;function bAe(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}_t.readInt16LE=bAe;function wAe(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}_t.readUint16LE=wAe;function ZK(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}_t.writeUint16BE=ZK;_t.writeInt16BE=ZK;function XK(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}_t.writeUint16LE=XK;_t.writeInt16LE=XK;function uS(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}_t.readInt32BE=uS;function fS(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}_t.readUint32BE=fS;function dS(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}_t.readInt32LE=dS;function hS(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}_t.readUint32LE=hS;function vb(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}_t.writeUint32BE=vb;_t.writeInt32BE=vb;function yb(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}_t.writeUint32LE=yb;_t.writeInt32LE=yb;function _Ae(e,t){t===void 0&&(t=0);var r=uS(e,t),n=uS(e,t+4);return r*4294967296+n-(n>>31)*4294967296}_t.readInt64BE=_Ae;function xAe(e,t){t===void 0&&(t=0);var r=fS(e,t),n=fS(e,t+4);return r*4294967296+n}_t.readUint64BE=xAe;function SAe(e,t){t===void 0&&(t=0);var r=dS(e,t),n=dS(e,t+4);return n*4294967296+r-(r>>31)*4294967296}_t.readInt64LE=SAe;function EAe(e,t){t===void 0&&(t=0);var r=hS(e,t),n=hS(e,t+4);return n*4294967296+r}_t.readUint64LE=EAe;function QK(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),vb(e/4294967296>>>0,t,r),vb(e>>>0,t,r+4),t}_t.writeUint64BE=QK;_t.writeInt64BE=QK;function eY(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),yb(e>>>0,t,r),yb(e/4294967296>>>0,t,r+4),t}_t.writeUint64LE=eY;_t.writeInt64LE=eY;function CAe(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n}_t.readUintBE=CAe;function PAe(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i=n;i--)r[i]=t/o&255,o*=256;return r}_t.writeUintBE=AAe;function OAe(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!JK.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=n;i256)throw new Error("randomString charset is too long");let p="";const m=u.length,w=256-256%m;for(;l>0;){const A=o(Math.ceil(l*256/w),d);for(let T=0;T0;T++){const O=A[T];O0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},s.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,d=l/536870912|0,p=l<<3,m=l%128<112?128:256;this._buffer[u]=128;for(var w=u+1;w0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._stateHi.set(c.stateHi),this._stateLo.set(c.stateLo),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.stateHi),r.wipe(c.stateLo),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();e.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function i(s,c,l,u,d,p,m){for(var w=l[0],A=l[1],T=l[2],O=l[3],P=l[4],$=l[5],R=l[6],j=l[7],I=u[0],b=u[1],N=u[2],V=u[3],Z=u[4],q=u[5],_=u[6],y=u[7],f,h,x,v,S,k,E,C;m>=128;){for(var g=0;g<16;g++){var M=8*g+p;s[g]=t.readUint32BE(d,M),c[g]=t.readUint32BE(d,M+4)}for(var g=0;g<80;g++){var re=w,W=A,ee=T,ce=O,ie=P,le=$,L=R,te=j,ae=I,ye=b,ve=N,me=V,Pe=Z,he=q,be=_,Ie=y;if(f=j,h=y,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=(P>>>14|Z<<32-14)^(P>>>18|Z<<32-18)^(Z>>>41-32|P<<32-(41-32)),h=(Z>>>14|P<<32-14)^(Z>>>18|P<<32-18)^(P>>>41-32|Z<<32-(41-32)),S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,f=P&$^~P&R,h=Z&q^~Z&_,S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,f=o[g*2],h=o[g*2+1],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,f=s[g%16],h=c[g%16],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,x=E&65535|C<<16,v=S&65535|k<<16,f=x,h=v,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=(w>>>28|I<<32-28)^(I>>>34-32|w<<32-(34-32))^(I>>>39-32|w<<32-(39-32)),h=(I>>>28|w<<32-28)^(w>>>34-32|I<<32-(34-32))^(w>>>39-32|I<<32-(39-32)),S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,f=w&A^w&T^A&T,h=I&b^I&N^b&N,S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,te=E&65535|C<<16,Ie=S&65535|k<<16,f=ce,h=me,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=x,h=v,S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,ce=E&65535|C<<16,me=S&65535|k<<16,A=re,T=W,O=ee,P=ce,$=ie,R=le,j=L,w=te,b=ae,N=ye,V=ve,Z=me,q=Pe,_=he,y=be,I=Ie,g%16===15)for(var M=0;M<16;M++)f=s[M],h=c[M],S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=s[(M+9)%16],h=c[(M+9)%16],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,x=s[(M+1)%16],v=c[(M+1)%16],f=(x>>>1|v<<32-1)^(x>>>8|v<<32-8)^x>>>7,h=(v>>>1|x<<32-1)^(v>>>8|x<<32-8)^(v>>>7|x<<32-7),S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,x=s[(M+14)%16],v=c[(M+14)%16],f=(x>>>19|v<<32-19)^(v>>>61-32|x<<32-(61-32))^x>>>6,h=(v>>>19|x<<32-19)^(x>>>61-32|v<<32-(61-32))^(v>>>6|x<<32-6),S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,s[M]=E&65535|C<<16,c[M]=S&65535|k<<16}f=w,h=I,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[0],h=u[0],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[0]=w=E&65535|C<<16,u[0]=I=S&65535|k<<16,f=A,h=b,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[1],h=u[1],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[1]=A=E&65535|C<<16,u[1]=b=S&65535|k<<16,f=T,h=N,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[2],h=u[2],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[2]=T=E&65535|C<<16,u[2]=N=S&65535|k<<16,f=O,h=V,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[3],h=u[3],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[3]=O=E&65535|C<<16,u[3]=V=S&65535|k<<16,f=P,h=Z,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[4],h=u[4],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[4]=P=E&65535|C<<16,u[4]=Z=S&65535|k<<16,f=$,h=q,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[5],h=u[5],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[5]=$=E&65535|C<<16,u[5]=q=S&65535|k<<16,f=R,h=_,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[6],h=u[6],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[6]=R=E&65535|C<<16,u[6]=_=S&65535|k<<16,f=j,h=y,S=h&65535,k=h>>>16,E=f&65535,C=f>>>16,f=l[7],h=u[7],S+=h&65535,k+=h>>>16,E+=f&65535,C+=f>>>16,k+=S>>>16,E+=k>>>16,C+=E>>>16,l[7]=j=E&65535|C<<16,u[7]=y=S&65535|k<<16,p+=128,m-=128}return p}function a(s){var c=new n;c.update(s);var l=c.digest();return c.clean(),l}e.hash=a})(tY);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=Ad,r=tY,n=Fo;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(ce){const ie=new Float64Array(16);if(ce)for(let le=0;le>16&1),le[ye-1]&=65535;le[15]=L[15]-32767-(le[14]>>16&1);const ae=le[15]>>16&1;le[14]&=65535,A(L,le,1-ae)}for(let te=0;te<16;te++)ce[2*te]=L[te]&255,ce[2*te+1]=L[te]>>8}function O(ce,ie){let le=0;for(let L=0;L<32;L++)le|=ce[L]^ie[L];return(1&le-1>>>8)-1}function P(ce,ie){const le=new Uint8Array(32),L=new Uint8Array(32);return T(le,ce),T(L,ie),O(le,L)}function $(ce){const ie=new Uint8Array(32);return T(ie,ce),ie[0]&1}function R(ce,ie){for(let le=0;le<16;le++)ce[le]=ie[2*le]+(ie[2*le+1]<<8);ce[15]&=32767}function j(ce,ie,le){for(let L=0;L<16;L++)ce[L]=ie[L]+le[L]}function I(ce,ie,le){for(let L=0;L<16;L++)ce[L]=ie[L]-le[L]}function b(ce,ie,le){let L,te,ae=0,ye=0,ve=0,me=0,Pe=0,he=0,be=0,Ie=0,we=0,Oe=0,Be=0,ke=0,Me=0,Ue=0,je=0,X=0,D=0,H=0,F=0,B=0,U=0,J=0,ne=0,oe=0,de=0,Te=0,$e=0,De=0,Xe=0,ze=0,He=0,Ge=le[0],qe=le[1],pe=le[2],ue=le[3],ge=le[4],Q=le[5],K=le[6],Y=le[7],se=le[8],_e=le[9],Se=le[10],Ee=le[11],Ve=le[12],Le=le[13],Fe=le[14],Qe=le[15];L=ie[0],ae+=L*Ge,ye+=L*qe,ve+=L*pe,me+=L*ue,Pe+=L*ge,he+=L*Q,be+=L*K,Ie+=L*Y,we+=L*se,Oe+=L*_e,Be+=L*Se,ke+=L*Ee,Me+=L*Ve,Ue+=L*Le,je+=L*Fe,X+=L*Qe,L=ie[1],ye+=L*Ge,ve+=L*qe,me+=L*pe,Pe+=L*ue,he+=L*ge,be+=L*Q,Ie+=L*K,we+=L*Y,Oe+=L*se,Be+=L*_e,ke+=L*Se,Me+=L*Ee,Ue+=L*Ve,je+=L*Le,X+=L*Fe,D+=L*Qe,L=ie[2],ve+=L*Ge,me+=L*qe,Pe+=L*pe,he+=L*ue,be+=L*ge,Ie+=L*Q,we+=L*K,Oe+=L*Y,Be+=L*se,ke+=L*_e,Me+=L*Se,Ue+=L*Ee,je+=L*Ve,X+=L*Le,D+=L*Fe,H+=L*Qe,L=ie[3],me+=L*Ge,Pe+=L*qe,he+=L*pe,be+=L*ue,Ie+=L*ge,we+=L*Q,Oe+=L*K,Be+=L*Y,ke+=L*se,Me+=L*_e,Ue+=L*Se,je+=L*Ee,X+=L*Ve,D+=L*Le,H+=L*Fe,F+=L*Qe,L=ie[4],Pe+=L*Ge,he+=L*qe,be+=L*pe,Ie+=L*ue,we+=L*ge,Oe+=L*Q,Be+=L*K,ke+=L*Y,Me+=L*se,Ue+=L*_e,je+=L*Se,X+=L*Ee,D+=L*Ve,H+=L*Le,F+=L*Fe,B+=L*Qe,L=ie[5],he+=L*Ge,be+=L*qe,Ie+=L*pe,we+=L*ue,Oe+=L*ge,Be+=L*Q,ke+=L*K,Me+=L*Y,Ue+=L*se,je+=L*_e,X+=L*Se,D+=L*Ee,H+=L*Ve,F+=L*Le,B+=L*Fe,U+=L*Qe,L=ie[6],be+=L*Ge,Ie+=L*qe,we+=L*pe,Oe+=L*ue,Be+=L*ge,ke+=L*Q,Me+=L*K,Ue+=L*Y,je+=L*se,X+=L*_e,D+=L*Se,H+=L*Ee,F+=L*Ve,B+=L*Le,U+=L*Fe,J+=L*Qe,L=ie[7],Ie+=L*Ge,we+=L*qe,Oe+=L*pe,Be+=L*ue,ke+=L*ge,Me+=L*Q,Ue+=L*K,je+=L*Y,X+=L*se,D+=L*_e,H+=L*Se,F+=L*Ee,B+=L*Ve,U+=L*Le,J+=L*Fe,ne+=L*Qe,L=ie[8],we+=L*Ge,Oe+=L*qe,Be+=L*pe,ke+=L*ue,Me+=L*ge,Ue+=L*Q,je+=L*K,X+=L*Y,D+=L*se,H+=L*_e,F+=L*Se,B+=L*Ee,U+=L*Ve,J+=L*Le,ne+=L*Fe,oe+=L*Qe,L=ie[9],Oe+=L*Ge,Be+=L*qe,ke+=L*pe,Me+=L*ue,Ue+=L*ge,je+=L*Q,X+=L*K,D+=L*Y,H+=L*se,F+=L*_e,B+=L*Se,U+=L*Ee,J+=L*Ve,ne+=L*Le,oe+=L*Fe,de+=L*Qe,L=ie[10],Be+=L*Ge,ke+=L*qe,Me+=L*pe,Ue+=L*ue,je+=L*ge,X+=L*Q,D+=L*K,H+=L*Y,F+=L*se,B+=L*_e,U+=L*Se,J+=L*Ee,ne+=L*Ve,oe+=L*Le,de+=L*Fe,Te+=L*Qe,L=ie[11],ke+=L*Ge,Me+=L*qe,Ue+=L*pe,je+=L*ue,X+=L*ge,D+=L*Q,H+=L*K,F+=L*Y,B+=L*se,U+=L*_e,J+=L*Se,ne+=L*Ee,oe+=L*Ve,de+=L*Le,Te+=L*Fe,$e+=L*Qe,L=ie[12],Me+=L*Ge,Ue+=L*qe,je+=L*pe,X+=L*ue,D+=L*ge,H+=L*Q,F+=L*K,B+=L*Y,U+=L*se,J+=L*_e,ne+=L*Se,oe+=L*Ee,de+=L*Ve,Te+=L*Le,$e+=L*Fe,De+=L*Qe,L=ie[13],Ue+=L*Ge,je+=L*qe,X+=L*pe,D+=L*ue,H+=L*ge,F+=L*Q,B+=L*K,U+=L*Y,J+=L*se,ne+=L*_e,oe+=L*Se,de+=L*Ee,Te+=L*Ve,$e+=L*Le,De+=L*Fe,Xe+=L*Qe,L=ie[14],je+=L*Ge,X+=L*qe,D+=L*pe,H+=L*ue,F+=L*ge,B+=L*Q,U+=L*K,J+=L*Y,ne+=L*se,oe+=L*_e,de+=L*Se,Te+=L*Ee,$e+=L*Ve,De+=L*Le,Xe+=L*Fe,ze+=L*Qe,L=ie[15],X+=L*Ge,D+=L*qe,H+=L*pe,F+=L*ue,B+=L*ge,U+=L*Q,J+=L*K,ne+=L*Y,oe+=L*se,de+=L*_e,Te+=L*Se,$e+=L*Ee,De+=L*Ve,Xe+=L*Le,ze+=L*Fe,He+=L*Qe,ae+=38*D,ye+=38*H,ve+=38*F,me+=38*B,Pe+=38*U,he+=38*J,be+=38*ne,Ie+=38*oe,we+=38*de,Oe+=38*Te,Be+=38*$e,ke+=38*De,Me+=38*Xe,Ue+=38*ze,je+=38*He,te=1,L=ae+te+65535,te=Math.floor(L/65536),ae=L-te*65536,L=ye+te+65535,te=Math.floor(L/65536),ye=L-te*65536,L=ve+te+65535,te=Math.floor(L/65536),ve=L-te*65536,L=me+te+65535,te=Math.floor(L/65536),me=L-te*65536,L=Pe+te+65535,te=Math.floor(L/65536),Pe=L-te*65536,L=he+te+65535,te=Math.floor(L/65536),he=L-te*65536,L=be+te+65535,te=Math.floor(L/65536),be=L-te*65536,L=Ie+te+65535,te=Math.floor(L/65536),Ie=L-te*65536,L=we+te+65535,te=Math.floor(L/65536),we=L-te*65536,L=Oe+te+65535,te=Math.floor(L/65536),Oe=L-te*65536,L=Be+te+65535,te=Math.floor(L/65536),Be=L-te*65536,L=ke+te+65535,te=Math.floor(L/65536),ke=L-te*65536,L=Me+te+65535,te=Math.floor(L/65536),Me=L-te*65536,L=Ue+te+65535,te=Math.floor(L/65536),Ue=L-te*65536,L=je+te+65535,te=Math.floor(L/65536),je=L-te*65536,L=X+te+65535,te=Math.floor(L/65536),X=L-te*65536,ae+=te-1+37*(te-1),te=1,L=ae+te+65535,te=Math.floor(L/65536),ae=L-te*65536,L=ye+te+65535,te=Math.floor(L/65536),ye=L-te*65536,L=ve+te+65535,te=Math.floor(L/65536),ve=L-te*65536,L=me+te+65535,te=Math.floor(L/65536),me=L-te*65536,L=Pe+te+65535,te=Math.floor(L/65536),Pe=L-te*65536,L=he+te+65535,te=Math.floor(L/65536),he=L-te*65536,L=be+te+65535,te=Math.floor(L/65536),be=L-te*65536,L=Ie+te+65535,te=Math.floor(L/65536),Ie=L-te*65536,L=we+te+65535,te=Math.floor(L/65536),we=L-te*65536,L=Oe+te+65535,te=Math.floor(L/65536),Oe=L-te*65536,L=Be+te+65535,te=Math.floor(L/65536),Be=L-te*65536,L=ke+te+65535,te=Math.floor(L/65536),ke=L-te*65536,L=Me+te+65535,te=Math.floor(L/65536),Me=L-te*65536,L=Ue+te+65535,te=Math.floor(L/65536),Ue=L-te*65536,L=je+te+65535,te=Math.floor(L/65536),je=L-te*65536,L=X+te+65535,te=Math.floor(L/65536),X=L-te*65536,ae+=te-1+37*(te-1),ce[0]=ae,ce[1]=ye,ce[2]=ve,ce[3]=me,ce[4]=Pe,ce[5]=he,ce[6]=be,ce[7]=Ie,ce[8]=we,ce[9]=Oe,ce[10]=Be,ce[11]=ke,ce[12]=Me,ce[13]=Ue,ce[14]=je,ce[15]=X}function N(ce,ie){b(ce,ie,ie)}function V(ce,ie){const le=o();let L;for(L=0;L<16;L++)le[L]=ie[L];for(L=253;L>=0;L--)N(le,le),L!==2&&L!==4&&b(le,le,ie);for(L=0;L<16;L++)ce[L]=le[L]}function Z(ce,ie){const le=o();let L;for(L=0;L<16;L++)le[L]=ie[L];for(L=250;L>=0;L--)N(le,le),L!==1&&b(le,le,ie);for(L=0;L<16;L++)ce[L]=le[L]}function q(ce,ie){const le=o(),L=o(),te=o(),ae=o(),ye=o(),ve=o(),me=o(),Pe=o(),he=o();I(le,ce[1],ce[0]),I(he,ie[1],ie[0]),b(le,le,he),j(L,ce[0],ce[1]),j(he,ie[0],ie[1]),b(L,L,he),b(te,ce[3],ie[3]),b(te,te,l),b(ae,ce[2],ie[2]),j(ae,ae,ae),I(ye,L,le),I(ve,ae,te),j(me,ae,te),j(Pe,L,le),b(ce[0],ye,ve),b(ce[1],Pe,me),b(ce[2],me,ve),b(ce[3],ye,Pe)}function _(ce,ie,le){for(let L=0;L<4;L++)A(ce[L],ie[L],le)}function y(ce,ie){const le=o(),L=o(),te=o();V(te,ie[2]),b(le,ie[0],te),b(L,ie[1],te),T(ce,L),ce[31]^=$(le)<<7}function f(ce,ie,le){m(ce[0],a),m(ce[1],s),m(ce[2],s),m(ce[3],a);for(let L=255;L>=0;--L){const te=le[L/8|0]>>(L&7)&1;_(ce,ie,te),q(ie,ce),q(ce,ce),_(ce,ie,te)}}function h(ce,ie){const le=[o(),o(),o(),o()];m(le[0],u),m(le[1],d),m(le[2],s),b(le[3],u,d),f(ce,le,ie)}function x(ce){if(ce.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const ie=(0,r.hash)(ce);ie[0]&=248,ie[31]&=127,ie[31]|=64;const le=new Uint8Array(32),L=[o(),o(),o(),o()];h(L,ie),y(le,L);const te=new Uint8Array(64);return te.set(ce),te.set(le,32),{publicKey:le,secretKey:te}}e.generateKeyPairFromSeed=x;function v(ce){const ie=(0,t.randomBytes)(32,ce),le=x(ie);return(0,n.wipe)(ie),le}e.generateKeyPair=v;function S(ce){if(ce.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(ce.subarray(32))}e.extractPublicKeyFromSecretKey=S;const k=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function E(ce,ie){let le,L,te,ae;for(L=63;L>=32;--L){for(le=0,te=L-32,ae=L-12;te>4)*k[te],le=ie[te]>>8,ie[te]&=255;for(te=0;te<32;te++)ie[te]-=le*k[te];for(L=0;L<32;L++)ie[L+1]+=ie[L]>>8,ce[L]=ie[L]&255}function C(ce){const ie=new Float64Array(64);for(let le=0;le<64;le++)ie[le]=ce[le];for(let le=0;le<64;le++)ce[le]=0;E(ce,ie)}function g(ce,ie){const le=new Float64Array(64),L=[o(),o(),o(),o()],te=(0,r.hash)(ce.subarray(0,32));te[0]&=248,te[31]&=127,te[31]|=64;const ae=new Uint8Array(64);ae.set(te.subarray(32),32);const ye=new r.SHA512;ye.update(ae.subarray(32)),ye.update(ie);const ve=ye.digest();ye.clean(),C(ve),h(L,ve),y(ae,L),ye.reset(),ye.update(ae.subarray(0,32)),ye.update(ce.subarray(32)),ye.update(ie);const me=ye.digest();C(me);for(let Pe=0;Pe<32;Pe++)le[Pe]=ve[Pe];for(let Pe=0;Pe<32;Pe++)for(let he=0;he<32;he++)le[Pe+he]+=me[Pe]*te[he];return E(ae.subarray(32),le),ae}e.sign=g;function M(ce,ie){const le=o(),L=o(),te=o(),ae=o(),ye=o(),ve=o(),me=o();return m(ce[2],s),R(ce[1],ie),N(te,ce[1]),b(ae,te,c),I(te,te,ce[2]),j(ae,ce[2],ae),N(ye,ae),N(ve,ye),b(me,ve,ye),b(le,me,te),b(le,le,ae),Z(le,le),b(le,le,te),b(le,le,ae),b(le,le,ae),b(ce[0],le,ae),N(L,ce[0]),b(L,L,ae),P(L,te)&&b(ce[0],ce[0],p),N(L,ce[0]),b(L,L,ae),P(L,te)?-1:($(ce[0])===ie[31]>>7&&I(ce[0],a,ce[0]),b(ce[3],ce[0],ce[1]),0)}function re(ce,ie,le){const L=new Uint8Array(32),te=[o(),o(),o(),o()],ae=[o(),o(),o(),o()];if(le.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(M(ae,ce))return!1;const ye=new r.SHA512;ye.update(le.subarray(0,32)),ye.update(ce),ye.update(ie);const ve=ye.digest();return C(ve),f(te,ae,ve),h(ae,le.subarray(32)),q(te,ae),y(L,te),!O(le,L)}e.verify=re;function W(ce){let ie=[o(),o(),o(),o()];if(M(ie,ce))throw new Error("Ed25519: invalid public key");let le=o(),L=o(),te=ie[1];j(le,s,te),I(L,s,te),V(L,L),b(le,le,L);let ae=new Uint8Array(32);return T(ae,le),ae}e.convertPublicKeyToX25519=W;function ee(ce){const ie=(0,r.hash)(ce.subarray(0,32));ie[0]&=248,ie[31]&=127,ie[31]|=64;const le=new Uint8Array(ie.subarray(0,32));return(0,n.wipe)(ie),le}e.convertSecretKeyToX25519=ee})(LC);const BAe="EdDSA",FAe="JWT",rY=".",nY="base64url",jAe="utf8",LAe="utf8",UAe=":",HAe="did",zAe="key",s$="base58btc",VAe="z",qAe="K36",WAe=32;function UC(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function oY(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?UC(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function pS(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=oY(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return UC(r)}function GAe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,R=new Uint8Array($);O!==P;){for(var j=w[O],I=0,b=$-1;(j!==0||I>>0,R[b]=j%s>>>0,j=j/s>>>0;if(j!==0)throw new Error("Non-zero carry");T=I,O++}for(var N=$-T;N!==$&&R[N]===0;)N++;for(var V=c.repeat(A);N<$;++N)V+=e.charAt(R[N]);return V}function p(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var A=0;if(w[A]!==" "){for(var T=0,O=0;w[A]===c;)T++,A++;for(var P=(w.length-A)*l+1>>>0,$=new Uint8Array(P);w[A];){var R=r[w.charCodeAt(A)];if(R===255)return;for(var j=0,I=P-1;(R!==0||j>>0,$[I]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");O=j,A++}if(w[A]!==" "){for(var b=P-O;b!==P&&$[b]===0;)b++;for(var N=new Uint8Array(T+(P-b)),V=T;b!==P;)N[V++]=$[b++];return N}}}function m(w){var A=p(w);if(A)return A;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:p,decode:m}}var KAe=GAe,YAe=KAe;const JAe=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},ZAe=e=>new TextEncoder().encode(e),XAe=e=>new TextDecoder().decode(e);class QAe{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class e7e{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return iY(this,t)}}class t7e{constructor(t){this.decoders=t}or(t){return iY(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const iY=(e,t)=>new t7e({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class r7e{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new QAe(t,r,n),this.decoder=new e7e(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const t2=({name:e,prefix:t,encode:r,decode:n})=>new r7e(e,t,r,n),Q0=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=YAe(r,t);return t2({prefix:e,name:t,encode:n,decode:i=>JAe(o(i))})},n7e=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[l++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a},o7e=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<t2({prefix:t,name:e,encode(o){return o7e(o,n,r)},decode(o){return n7e(o,n,r,e)}}),i7e=t2({prefix:"\0",name:"identity",encode:e=>XAe(e),decode:e=>ZAe(e)}),a7e=Object.freeze(Object.defineProperty({__proto__:null,identity:i7e},Symbol.toStringTag,{value:"Module"})),s7e=bn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),c7e=Object.freeze(Object.defineProperty({__proto__:null,base2:s7e},Symbol.toStringTag,{value:"Module"})),l7e=bn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),u7e=Object.freeze(Object.defineProperty({__proto__:null,base8:l7e},Symbol.toStringTag,{value:"Module"})),f7e=Q0({prefix:"9",name:"base10",alphabet:"0123456789"}),d7e=Object.freeze(Object.defineProperty({__proto__:null,base10:f7e},Symbol.toStringTag,{value:"Module"})),h7e=bn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),p7e=bn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),g7e=Object.freeze(Object.defineProperty({__proto__:null,base16:h7e,base16upper:p7e},Symbol.toStringTag,{value:"Module"})),m7e=bn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),v7e=bn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),y7e=bn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),b7e=bn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),w7e=bn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),_7e=bn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),x7e=bn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),S7e=bn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),E7e=bn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),C7e=Object.freeze(Object.defineProperty({__proto__:null,base32:m7e,base32hex:w7e,base32hexpad:x7e,base32hexpadupper:S7e,base32hexupper:_7e,base32pad:y7e,base32padupper:b7e,base32upper:v7e,base32z:E7e},Symbol.toStringTag,{value:"Module"})),P7e=Q0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),A7e=Q0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),O7e=Object.freeze(Object.defineProperty({__proto__:null,base36:P7e,base36upper:A7e},Symbol.toStringTag,{value:"Module"})),I7e=Q0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),T7e=Q0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),M7e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:I7e,base58flickr:T7e},Symbol.toStringTag,{value:"Module"})),k7e=bn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$7e=bn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),D7e=bn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),R7e=bn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),N7e=Object.freeze(Object.defineProperty({__proto__:null,base64:k7e,base64pad:$7e,base64url:D7e,base64urlpad:R7e},Symbol.toStringTag,{value:"Module"})),aY=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),B7e=aY.reduce((e,t,r)=>(e[r]=t,e),[]),F7e=aY.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function j7e(e){return e.reduce((t,r)=>(t+=B7e[r],t),"")}function L7e(e){const t=[];for(const r of e){const n=F7e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const U7e=t2({prefix:"🚀",name:"base256emoji",encode:j7e,decode:L7e}),H7e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:U7e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const c$={...a7e,...c7e,...u7e,...d7e,...g7e,...C7e,...O7e,...M7e,...N7e,...H7e};function sY(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const l$=sY("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),L5=sY("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=oY(e.length);for(let r=0;r>>32-16|h<<16,q=q+h|0,b^=q,b=b>>>32-12|b<<12,R=R+N|0,x^=R,x=x>>>32-16|x<<16,_=_+x|0,N^=_,N=N>>>32-12|N<<12,j=j+V|0,v^=j,v=v>>>32-16|v<<16,y=y+v|0,V^=y,V=V>>>32-12|V<<12,I=I+Z|0,S^=I,S=S>>>32-16|S<<16,f=f+S|0,Z^=f,Z=Z>>>32-12|Z<<12,j=j+V|0,v^=j,v=v>>>32-8|v<<8,y=y+v|0,V^=y,V=V>>>32-7|V<<7,I=I+Z|0,S^=I,S=S>>>32-8|S<<8,f=f+S|0,Z^=f,Z=Z>>>32-7|Z<<7,R=R+N|0,x^=R,x=x>>>32-8|x<<8,_=_+x|0,N^=_,N=N>>>32-7|N<<7,$=$+b|0,h^=$,h=h>>>32-8|h<<8,q=q+h|0,b^=q,b=b>>>32-7|b<<7,$=$+N|0,S^=$,S=S>>>32-16|S<<16,y=y+S|0,N^=y,N=N>>>32-12|N<<12,R=R+V|0,h^=R,h=h>>>32-16|h<<16,f=f+h|0,V^=f,V=V>>>32-12|V<<12,j=j+Z|0,x^=j,x=x>>>32-16|x<<16,q=q+x|0,Z^=q,Z=Z>>>32-12|Z<<12,I=I+b|0,v^=I,v=v>>>32-16|v<<16,_=_+v|0,b^=_,b=b>>>32-12|b<<12,j=j+Z|0,x^=j,x=x>>>32-8|x<<8,q=q+x|0,Z^=q,Z=Z>>>32-7|Z<<7,I=I+b|0,v^=I,v=v>>>32-8|v<<8,_=_+v|0,b^=_,b=b>>>32-7|b<<7,R=R+V|0,h^=R,h=h>>>32-8|h<<8,f=f+h|0,V^=f,V=V>>>32-7|V<<7,$=$+N|0,S^=$,S=S>>>32-8|S<<8,y=y+S|0,N^=y,N=N>>>32-7|N<<7;Cn.writeUint32LE($+n|0,e,0),Cn.writeUint32LE(R+o|0,e,4),Cn.writeUint32LE(j+i|0,e,8),Cn.writeUint32LE(I+a|0,e,12),Cn.writeUint32LE(b+s|0,e,16),Cn.writeUint32LE(N+c|0,e,20),Cn.writeUint32LE(V+l|0,e,24),Cn.writeUint32LE(Z+u|0,e,28),Cn.writeUint32LE(q+d|0,e,32),Cn.writeUint32LE(_+p|0,e,36),Cn.writeUint32LE(y+m|0,e,40),Cn.writeUint32LE(f+w|0,e,44),Cn.writeUint32LE(h+A|0,e,48),Cn.writeUint32LE(x+T|0,e,52),Cn.writeUint32LE(v+O|0,e,56),Cn.writeUint32LE(S+P|0,e,60)}function uY(e,t,r,n,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}var fY={},Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});function Z7e(e,t,r){return~(e-1)&t|e-1&r}Lc.select=Z7e;function X7e(e,t){return(e|0)-(t|0)-1>>>31&1}Lc.lessOrEqual=X7e;function dY(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Lc.compare=dY;function Q7e(e,t){return e.length===0||t.length===0?!1:dY(e,t)!==0}Lc.equal=Q7e;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Lc,r=Fo;e.DIGEST_LENGTH=16;var n=function(){function a(s){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=s[0]|s[1]<<8;this._r[0]=c&8191;var l=s[2]|s[3]<<8;this._r[1]=(c>>>13|l<<3)&8191;var u=s[4]|s[5]<<8;this._r[2]=(l>>>10|u<<6)&7939;var d=s[6]|s[7]<<8;this._r[3]=(u>>>7|d<<9)&8191;var p=s[8]|s[9]<<8;this._r[4]=(d>>>4|p<<12)&255,this._r[5]=p>>>1&8190;var m=s[10]|s[11]<<8;this._r[6]=(p>>>14|m<<2)&8191;var w=s[12]|s[13]<<8;this._r[7]=(m>>>11|w<<5)&8065;var A=s[14]|s[15]<<8;this._r[8]=(w>>>8|A<<8)&8191,this._r[9]=A>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return a.prototype._blocks=function(s,c,l){for(var u=this._fin?0:2048,d=this._h[0],p=this._h[1],m=this._h[2],w=this._h[3],A=this._h[4],T=this._h[5],O=this._h[6],P=this._h[7],$=this._h[8],R=this._h[9],j=this._r[0],I=this._r[1],b=this._r[2],N=this._r[3],V=this._r[4],Z=this._r[5],q=this._r[6],_=this._r[7],y=this._r[8],f=this._r[9];l>=16;){var h=s[c+0]|s[c+1]<<8;d+=h&8191;var x=s[c+2]|s[c+3]<<8;p+=(h>>>13|x<<3)&8191;var v=s[c+4]|s[c+5]<<8;m+=(x>>>10|v<<6)&8191;var S=s[c+6]|s[c+7]<<8;w+=(v>>>7|S<<9)&8191;var k=s[c+8]|s[c+9]<<8;A+=(S>>>4|k<<12)&8191,T+=k>>>1&8191;var E=s[c+10]|s[c+11]<<8;O+=(k>>>14|E<<2)&8191;var C=s[c+12]|s[c+13]<<8;P+=(E>>>11|C<<5)&8191;var g=s[c+14]|s[c+15]<<8;$+=(C>>>8|g<<8)&8191,R+=g>>>5|u;var M=0,re=M;re+=d*j,re+=p*(5*f),re+=m*(5*y),re+=w*(5*_),re+=A*(5*q),M=re>>>13,re&=8191,re+=T*(5*Z),re+=O*(5*V),re+=P*(5*N),re+=$*(5*b),re+=R*(5*I),M+=re>>>13,re&=8191;var W=M;W+=d*I,W+=p*j,W+=m*(5*f),W+=w*(5*y),W+=A*(5*_),M=W>>>13,W&=8191,W+=T*(5*q),W+=O*(5*Z),W+=P*(5*V),W+=$*(5*N),W+=R*(5*b),M+=W>>>13,W&=8191;var ee=M;ee+=d*b,ee+=p*I,ee+=m*j,ee+=w*(5*f),ee+=A*(5*y),M=ee>>>13,ee&=8191,ee+=T*(5*_),ee+=O*(5*q),ee+=P*(5*Z),ee+=$*(5*V),ee+=R*(5*N),M+=ee>>>13,ee&=8191;var ce=M;ce+=d*N,ce+=p*b,ce+=m*I,ce+=w*j,ce+=A*(5*f),M=ce>>>13,ce&=8191,ce+=T*(5*y),ce+=O*(5*_),ce+=P*(5*q),ce+=$*(5*Z),ce+=R*(5*V),M+=ce>>>13,ce&=8191;var ie=M;ie+=d*V,ie+=p*N,ie+=m*b,ie+=w*I,ie+=A*j,M=ie>>>13,ie&=8191,ie+=T*(5*f),ie+=O*(5*y),ie+=P*(5*_),ie+=$*(5*q),ie+=R*(5*Z),M+=ie>>>13,ie&=8191;var le=M;le+=d*Z,le+=p*V,le+=m*N,le+=w*b,le+=A*I,M=le>>>13,le&=8191,le+=T*j,le+=O*(5*f),le+=P*(5*y),le+=$*(5*_),le+=R*(5*q),M+=le>>>13,le&=8191;var L=M;L+=d*q,L+=p*Z,L+=m*V,L+=w*N,L+=A*b,M=L>>>13,L&=8191,L+=T*I,L+=O*j,L+=P*(5*f),L+=$*(5*y),L+=R*(5*_),M+=L>>>13,L&=8191;var te=M;te+=d*_,te+=p*q,te+=m*Z,te+=w*V,te+=A*N,M=te>>>13,te&=8191,te+=T*b,te+=O*I,te+=P*j,te+=$*(5*f),te+=R*(5*y),M+=te>>>13,te&=8191;var ae=M;ae+=d*y,ae+=p*_,ae+=m*q,ae+=w*Z,ae+=A*V,M=ae>>>13,ae&=8191,ae+=T*N,ae+=O*b,ae+=P*I,ae+=$*j,ae+=R*(5*f),M+=ae>>>13,ae&=8191;var ye=M;ye+=d*f,ye+=p*y,ye+=m*_,ye+=w*q,ye+=A*Z,M=ye>>>13,ye&=8191,ye+=T*V,ye+=O*N,ye+=P*b,ye+=$*I,ye+=R*j,M+=ye>>>13,ye&=8191,M=(M<<2)+M|0,M=M+re|0,re=M&8191,M=M>>>13,W+=M,d=re,p=W,m=ee,w=ce,A=ie,T=le,O=L,P=te,$=ae,R=ye,c+=16,l-=16}this._h[0]=d,this._h[1]=p,this._h[2]=m,this._h[3]=w,this._h[4]=A,this._h[5]=T,this._h[6]=O,this._h[7]=P,this._h[8]=$,this._h[9]=R},a.prototype.finish=function(s,c){c===void 0&&(c=0);var l=new Uint16Array(10),u,d,p,m;if(this._leftover){for(m=this._leftover,this._buffer[m++]=1;m<16;m++)this._buffer[m]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,m=2;m<10;m++)this._h[m]+=u,u=this._h[m]>>>13,this._h[m]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,l[0]=this._h[0]+5,u=l[0]>>>13,l[0]&=8191,m=1;m<10;m++)l[m]=this._h[m]+u,u=l[m]>>>13,l[m]&=8191;for(l[9]-=8192,d=(u^1)-1,m=0;m<10;m++)l[m]&=d;for(d=~d,m=0;m<10;m++)this._h[m]=this._h[m]&d|l[m];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,p=this._h[0]+this._pad[0],this._h[0]=p&65535,m=1;m<8;m++)p=(this._h[m]+this._pad[m]|0)+(p>>>16)|0,this._h[m]=p&65535;return s[c+0]=this._h[0]>>>0,s[c+1]=this._h[0]>>>8,s[c+2]=this._h[1]>>>0,s[c+3]=this._h[1]>>>8,s[c+4]=this._h[2]>>>0,s[c+5]=this._h[2]>>>8,s[c+6]=this._h[3]>>>0,s[c+7]=this._h[3]>>>8,s[c+8]=this._h[4]>>>0,s[c+9]=this._h[4]>>>8,s[c+10]=this._h[5]>>>0,s[c+11]=this._h[5]>>>8,s[c+12]=this._h[6]>>>0,s[c+13]=this._h[6]>>>8,s[c+14]=this._h[7]>>>0,s[c+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(s){var c=0,l=s.length,u;if(this._leftover){u=16-this._leftover,u>l&&(u=l);for(var d=0;d=16&&(u=l-l%16,this._blocks(s,c,u),c+=u,l-=u),l){for(var d=0;d16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var m=new Uint8Array(16);m.set(l,m.length-l.length);var w=new Uint8Array(32);t.stream(this._key,m,w,4);var A=u.length+this.tagLength,T;if(p){if(p.length!==A)throw new Error("ChaCha20Poly1305: incorrect destination length");T=p}else T=new Uint8Array(A);return t.streamXOR(this._key,m,u,T,4),this._authenticate(T.subarray(T.length-this.tagLength,T.length),w,T.subarray(0,T.length-this.tagLength),d),n.wipe(m),T},c.prototype.open=function(l,u,d,p){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&m.update(a.subarray(p.length%16))),m.update(d),d.length%16>0&&m.update(a.subarray(d.length%16));var w=new Uint8Array(8);p&&o.writeUint64LE(p.length,w),m.update(w),o.writeUint64LE(d.length,w),m.update(w);for(var A=m.digest(),T=0;Tthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),n=0;n0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=i(this._temp,this._state,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},s.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,d=l/536870912|0,p=l<<3,m=l%64<56?64:128;this._buffer[u]=128;for(var w=u+1;w0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},s}();e.SHA256=n;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(s,c,l,u,d){for(;d>=64;){for(var p=c[0],m=c[1],w=c[2],A=c[3],T=c[4],O=c[5],P=c[6],$=c[7],R=0;R<16;R++){var j=u+R*4;s[R]=t.readUint32BE(l,j)}for(var R=16;R<64;R++){var I=s[R-2],b=(I>>>17|I<<32-17)^(I>>>19|I<<32-19)^I>>>10;I=s[R-15];var N=(I>>>7|I<<32-7)^(I>>>18|I<<32-18)^I>>>3;s[R]=(b+s[R-7]|0)+(N+s[R-16]|0)}for(var R=0;R<64;R++){var b=(((T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7))+(T&O^~T&P)|0)+($+(o[R]+s[R]|0)|0)|0,N=((p>>>2|p<<32-2)^(p>>>13|p<<32-13)^(p>>>22|p<<32-22))+(p&m^p&w^m&w)|0;$=P,P=O,O=T,T=A+b|0,A=w,w=m,m=p,p=b+N|0}c[0]+=p,c[1]+=m,c[2]+=w,c[3]+=A,c[4]+=T,c[5]+=O,c[6]+=P,c[7]+=$,u+=64,d-=64}return u}function a(s){var c=new n;c.update(s);var l=c.digest();return c.clean(),l}e.hash=a})(n2);var VC={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=Ad,r=Fo;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(R){const j=new Float64Array(16);if(R)for(let I=0;I>16&1),I[Z-1]&=65535;I[15]=b[15]-32767-(I[14]>>16&1);const V=I[15]>>16&1;I[14]&=65535,s(b,I,1-V)}for(let N=0;N<16;N++)R[2*N]=b[N]&255,R[2*N+1]=b[N]>>8}function l(R,j){for(let I=0;I<16;I++)R[I]=j[2*I]+(j[2*I+1]<<8);R[15]&=32767}function u(R,j,I){for(let b=0;b<16;b++)R[b]=j[b]+I[b]}function d(R,j,I){for(let b=0;b<16;b++)R[b]=j[b]-I[b]}function p(R,j,I){let b,N,V=0,Z=0,q=0,_=0,y=0,f=0,h=0,x=0,v=0,S=0,k=0,E=0,C=0,g=0,M=0,re=0,W=0,ee=0,ce=0,ie=0,le=0,L=0,te=0,ae=0,ye=0,ve=0,me=0,Pe=0,he=0,be=0,Ie=0,we=I[0],Oe=I[1],Be=I[2],ke=I[3],Me=I[4],Ue=I[5],je=I[6],X=I[7],D=I[8],H=I[9],F=I[10],B=I[11],U=I[12],J=I[13],ne=I[14],oe=I[15];b=j[0],V+=b*we,Z+=b*Oe,q+=b*Be,_+=b*ke,y+=b*Me,f+=b*Ue,h+=b*je,x+=b*X,v+=b*D,S+=b*H,k+=b*F,E+=b*B,C+=b*U,g+=b*J,M+=b*ne,re+=b*oe,b=j[1],Z+=b*we,q+=b*Oe,_+=b*Be,y+=b*ke,f+=b*Me,h+=b*Ue,x+=b*je,v+=b*X,S+=b*D,k+=b*H,E+=b*F,C+=b*B,g+=b*U,M+=b*J,re+=b*ne,W+=b*oe,b=j[2],q+=b*we,_+=b*Oe,y+=b*Be,f+=b*ke,h+=b*Me,x+=b*Ue,v+=b*je,S+=b*X,k+=b*D,E+=b*H,C+=b*F,g+=b*B,M+=b*U,re+=b*J,W+=b*ne,ee+=b*oe,b=j[3],_+=b*we,y+=b*Oe,f+=b*Be,h+=b*ke,x+=b*Me,v+=b*Ue,S+=b*je,k+=b*X,E+=b*D,C+=b*H,g+=b*F,M+=b*B,re+=b*U,W+=b*J,ee+=b*ne,ce+=b*oe,b=j[4],y+=b*we,f+=b*Oe,h+=b*Be,x+=b*ke,v+=b*Me,S+=b*Ue,k+=b*je,E+=b*X,C+=b*D,g+=b*H,M+=b*F,re+=b*B,W+=b*U,ee+=b*J,ce+=b*ne,ie+=b*oe,b=j[5],f+=b*we,h+=b*Oe,x+=b*Be,v+=b*ke,S+=b*Me,k+=b*Ue,E+=b*je,C+=b*X,g+=b*D,M+=b*H,re+=b*F,W+=b*B,ee+=b*U,ce+=b*J,ie+=b*ne,le+=b*oe,b=j[6],h+=b*we,x+=b*Oe,v+=b*Be,S+=b*ke,k+=b*Me,E+=b*Ue,C+=b*je,g+=b*X,M+=b*D,re+=b*H,W+=b*F,ee+=b*B,ce+=b*U,ie+=b*J,le+=b*ne,L+=b*oe,b=j[7],x+=b*we,v+=b*Oe,S+=b*Be,k+=b*ke,E+=b*Me,C+=b*Ue,g+=b*je,M+=b*X,re+=b*D,W+=b*H,ee+=b*F,ce+=b*B,ie+=b*U,le+=b*J,L+=b*ne,te+=b*oe,b=j[8],v+=b*we,S+=b*Oe,k+=b*Be,E+=b*ke,C+=b*Me,g+=b*Ue,M+=b*je,re+=b*X,W+=b*D,ee+=b*H,ce+=b*F,ie+=b*B,le+=b*U,L+=b*J,te+=b*ne,ae+=b*oe,b=j[9],S+=b*we,k+=b*Oe,E+=b*Be,C+=b*ke,g+=b*Me,M+=b*Ue,re+=b*je,W+=b*X,ee+=b*D,ce+=b*H,ie+=b*F,le+=b*B,L+=b*U,te+=b*J,ae+=b*ne,ye+=b*oe,b=j[10],k+=b*we,E+=b*Oe,C+=b*Be,g+=b*ke,M+=b*Me,re+=b*Ue,W+=b*je,ee+=b*X,ce+=b*D,ie+=b*H,le+=b*F,L+=b*B,te+=b*U,ae+=b*J,ye+=b*ne,ve+=b*oe,b=j[11],E+=b*we,C+=b*Oe,g+=b*Be,M+=b*ke,re+=b*Me,W+=b*Ue,ee+=b*je,ce+=b*X,ie+=b*D,le+=b*H,L+=b*F,te+=b*B,ae+=b*U,ye+=b*J,ve+=b*ne,me+=b*oe,b=j[12],C+=b*we,g+=b*Oe,M+=b*Be,re+=b*ke,W+=b*Me,ee+=b*Ue,ce+=b*je,ie+=b*X,le+=b*D,L+=b*H,te+=b*F,ae+=b*B,ye+=b*U,ve+=b*J,me+=b*ne,Pe+=b*oe,b=j[13],g+=b*we,M+=b*Oe,re+=b*Be,W+=b*ke,ee+=b*Me,ce+=b*Ue,ie+=b*je,le+=b*X,L+=b*D,te+=b*H,ae+=b*F,ye+=b*B,ve+=b*U,me+=b*J,Pe+=b*ne,he+=b*oe,b=j[14],M+=b*we,re+=b*Oe,W+=b*Be,ee+=b*ke,ce+=b*Me,ie+=b*Ue,le+=b*je,L+=b*X,te+=b*D,ae+=b*H,ye+=b*F,ve+=b*B,me+=b*U,Pe+=b*J,he+=b*ne,be+=b*oe,b=j[15],re+=b*we,W+=b*Oe,ee+=b*Be,ce+=b*ke,ie+=b*Me,le+=b*Ue,L+=b*je,te+=b*X,ae+=b*D,ye+=b*H,ve+=b*F,me+=b*B,Pe+=b*U,he+=b*J,be+=b*ne,Ie+=b*oe,V+=38*W,Z+=38*ee,q+=38*ce,_+=38*ie,y+=38*le,f+=38*L,h+=38*te,x+=38*ae,v+=38*ye,S+=38*ve,k+=38*me,E+=38*Pe,C+=38*he,g+=38*be,M+=38*Ie,N=1,b=V+N+65535,N=Math.floor(b/65536),V=b-N*65536,b=Z+N+65535,N=Math.floor(b/65536),Z=b-N*65536,b=q+N+65535,N=Math.floor(b/65536),q=b-N*65536,b=_+N+65535,N=Math.floor(b/65536),_=b-N*65536,b=y+N+65535,N=Math.floor(b/65536),y=b-N*65536,b=f+N+65535,N=Math.floor(b/65536),f=b-N*65536,b=h+N+65535,N=Math.floor(b/65536),h=b-N*65536,b=x+N+65535,N=Math.floor(b/65536),x=b-N*65536,b=v+N+65535,N=Math.floor(b/65536),v=b-N*65536,b=S+N+65535,N=Math.floor(b/65536),S=b-N*65536,b=k+N+65535,N=Math.floor(b/65536),k=b-N*65536,b=E+N+65535,N=Math.floor(b/65536),E=b-N*65536,b=C+N+65535,N=Math.floor(b/65536),C=b-N*65536,b=g+N+65535,N=Math.floor(b/65536),g=b-N*65536,b=M+N+65535,N=Math.floor(b/65536),M=b-N*65536,b=re+N+65535,N=Math.floor(b/65536),re=b-N*65536,V+=N-1+37*(N-1),N=1,b=V+N+65535,N=Math.floor(b/65536),V=b-N*65536,b=Z+N+65535,N=Math.floor(b/65536),Z=b-N*65536,b=q+N+65535,N=Math.floor(b/65536),q=b-N*65536,b=_+N+65535,N=Math.floor(b/65536),_=b-N*65536,b=y+N+65535,N=Math.floor(b/65536),y=b-N*65536,b=f+N+65535,N=Math.floor(b/65536),f=b-N*65536,b=h+N+65535,N=Math.floor(b/65536),h=b-N*65536,b=x+N+65535,N=Math.floor(b/65536),x=b-N*65536,b=v+N+65535,N=Math.floor(b/65536),v=b-N*65536,b=S+N+65535,N=Math.floor(b/65536),S=b-N*65536,b=k+N+65535,N=Math.floor(b/65536),k=b-N*65536,b=E+N+65535,N=Math.floor(b/65536),E=b-N*65536,b=C+N+65535,N=Math.floor(b/65536),C=b-N*65536,b=g+N+65535,N=Math.floor(b/65536),g=b-N*65536,b=M+N+65535,N=Math.floor(b/65536),M=b-N*65536,b=re+N+65535,N=Math.floor(b/65536),re=b-N*65536,V+=N-1+37*(N-1),R[0]=V,R[1]=Z,R[2]=q,R[3]=_,R[4]=y,R[5]=f,R[6]=h,R[7]=x,R[8]=v,R[9]=S,R[10]=k,R[11]=E,R[12]=C,R[13]=g,R[14]=M,R[15]=re}function m(R,j){p(R,j,j)}function w(R,j){const I=n();for(let b=0;b<16;b++)I[b]=j[b];for(let b=253;b>=0;b--)m(I,I),b!==2&&b!==4&&p(I,I,j);for(let b=0;b<16;b++)R[b]=I[b]}function A(R,j){const I=new Uint8Array(32),b=new Float64Array(80),N=n(),V=n(),Z=n(),q=n(),_=n(),y=n();for(let v=0;v<31;v++)I[v]=R[v];I[31]=R[31]&127|64,I[0]&=248,l(b,j);for(let v=0;v<16;v++)V[v]=b[v];N[0]=q[0]=1;for(let v=254;v>=0;--v){const S=I[v>>>3]>>>(v&7)&1;s(N,V,S),s(Z,q,S),u(_,N,Z),d(N,N,Z),u(Z,V,q),d(V,V,q),m(q,_),m(y,N),p(N,Z,N),p(Z,V,_),u(_,N,Z),d(N,N,Z),m(V,N),d(Z,q,y),p(N,Z,i),u(N,N,q),p(Z,Z,N),p(N,q,y),p(q,V,b),m(V,_),s(N,V,S),s(Z,q,S)}for(let v=0;v<16;v++)b[v+16]=N[v],b[v+32]=Z[v],b[v+48]=V[v],b[v+64]=q[v];const f=b.subarray(32),h=b.subarray(16);w(f,f),p(h,h,f);const x=new Uint8Array(32);return c(x,h),x}e.scalarMult=A;function T(R){return A(R,o)}e.scalarMultBase=T;function O(R){if(R.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const j=new Uint8Array(R);return{publicKey:T(j),secretKey:j}}e.generateKeyPairFromSeed=O;function P(R){const j=(0,t.randomBytes)(32,R),I=O(j);return(0,r.wipe)(j),I}e.generateKeyPair=P;function $(R,j,I=!1){if(R.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(j.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const b=A(R,j);if(I){let N=0;for(let V=0;V-1){const T=w.getAttribute("href");if(T)if(T.toLowerCase().indexOf("https:")===-1&&T.toLowerCase().indexOf("http:")===-1&&T.indexOf("//")!==0){let O=t.protocol+"//"+t.host;if(T.indexOf("/")===0)O+=T;else{const P=t.pathname.split("/");P.pop();const $=P.join("/");O+=$+"/"+T}p.push(O)}else if(T.indexOf("//")===0){const O=t.protocol+T;p.push(O)}else p.push(T)}}return p}function n(...d){const p=e.getElementsByTagName("meta");for(let m=0;mw.getAttribute(T)).filter(T=>T?d.includes(T):!1);if(A.length&&A){const T=w.getAttribute("content");if(T)return T}}return""}function o(){let d=n("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),c=t.origin,l=r();return{description:s,url:c,icons:l,name:a}}gY=KC.getWindowMetadata=mOe;var f0={},vOe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),mY="%[a-f0-9]{2}",p$=new RegExp("("+mY+")|([^%]+?)","gi"),g$=new RegExp("("+mY+")+","gi");function mS(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],mS(r),mS(n))}function yOe(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(p$)||[],r=1;r{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},xOe=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;iP==null,a=Symbol("encodeFragmentIdentifier");function s(P){switch(P.arrayFormat){case"index":return $=>(R,j)=>{const I=R.length;return j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?R:j===null?[...R,[u($,P),"[",I,"]"].join("")]:[...R,[u($,P),"[",u(I,P),"]=",u(j,P)].join("")]};case"bracket":return $=>(R,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?R:j===null?[...R,[u($,P),"[]"].join("")]:[...R,[u($,P),"[]=",u(j,P)].join("")];case"colon-list-separator":return $=>(R,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?R:j===null?[...R,[u($,P),":list="].join("")]:[...R,[u($,P),":list=",u(j,P)].join("")];case"comma":case"separator":case"bracket-separator":{const $=P.arrayFormat==="bracket-separator"?"[]=":"=";return R=>(j,I)=>I===void 0||P.skipNull&&I===null||P.skipEmptyString&&I===""?j:(I=I===null?"":I,j.length===0?[[u(R,P),$,u(I,P)].join("")]:[[j,u(I,P)].join(P.arrayFormatSeparator)])}default:return $=>(R,j)=>j===void 0||P.skipNull&&j===null||P.skipEmptyString&&j===""?R:j===null?[...R,u($,P)]:[...R,[u($,P),"=",u(j,P)].join("")]}}function c(P){let $;switch(P.arrayFormat){case"index":return(R,j,I)=>{if($=/\[(\d*)\]$/.exec(R),R=R.replace(/\[\d*\]$/,""),!$){I[R]=j;return}I[R]===void 0&&(I[R]={}),I[R][$[1]]=j};case"bracket":return(R,j,I)=>{if($=/(\[\])$/.exec(R),R=R.replace(/\[\]$/,""),!$){I[R]=j;return}if(I[R]===void 0){I[R]=[j];return}I[R]=[].concat(I[R],j)};case"colon-list-separator":return(R,j,I)=>{if($=/(:list)$/.exec(R),R=R.replace(/:list$/,""),!$){I[R]=j;return}if(I[R]===void 0){I[R]=[j];return}I[R]=[].concat(I[R],j)};case"comma":case"separator":return(R,j,I)=>{const b=typeof j=="string"&&j.includes(P.arrayFormatSeparator),N=typeof j=="string"&&!b&&d(j,P).includes(P.arrayFormatSeparator);j=N?d(j,P):j;const V=b||N?j.split(P.arrayFormatSeparator).map(Z=>d(Z,P)):j===null?j:d(j,P);I[R]=V};case"bracket-separator":return(R,j,I)=>{const b=/(\[\])$/.test(R);if(R=R.replace(/\[\]$/,""),!b){I[R]=j&&d(j,P);return}const N=j===null?[]:j.split(P.arrayFormatSeparator).map(V=>d(V,P));if(I[R]===void 0){I[R]=N;return}I[R]=[].concat(I[R],N)};default:return(R,j,I)=>{if(I[R]===void 0){I[R]=j;return}I[R]=[].concat(I[R],j)}}}function l(P){if(typeof P!="string"||P.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(P,$){return $.encode?$.strict?t(P):encodeURIComponent(P):P}function d(P,$){return $.decode?r(P):P}function p(P){return Array.isArray(P)?P.sort():typeof P=="object"?p(Object.keys(P)).sort(($,R)=>Number($)-Number(R)).map($=>P[$]):P}function m(P){const $=P.indexOf("#");return $!==-1&&(P=P.slice(0,$)),P}function w(P){let $="";const R=P.indexOf("#");return R!==-1&&($=P.slice(R)),$}function A(P){P=m(P);const $=P.indexOf("?");return $===-1?"":P.slice($+1)}function T(P,$){return $.parseNumbers&&!Number.isNaN(Number(P))&&typeof P=="string"&&P.trim()!==""?P=Number(P):$.parseBooleans&&P!==null&&(P.toLowerCase()==="true"||P.toLowerCase()==="false")&&(P=P.toLowerCase()==="true"),P}function O(P,$){$=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},$),l($.arrayFormatSeparator);const R=c($),j=Object.create(null);if(typeof P!="string"||(P=P.trim().replace(/^[?#&]/,""),!P))return j;for(const I of P.split("&")){if(I==="")continue;let[b,N]=n($.decode?I.replace(/\+/g," "):I,"=");N=N===void 0?null:["comma","separator","bracket-separator"].includes($.arrayFormat)?N:d(N,$),R(d(b,$),N,j)}for(const I of Object.keys(j)){const b=j[I];if(typeof b=="object"&&b!==null)for(const N of Object.keys(b))b[N]=T(b[N],$);else j[I]=T(b,$)}return $.sort===!1?j:($.sort===!0?Object.keys(j).sort():Object.keys(j).sort($.sort)).reduce((I,b)=>{const N=j[b];return N&&typeof N=="object"&&!Array.isArray(N)?I[b]=p(N):I[b]=N,I},Object.create(null))}e.extract=A,e.parse=O,e.stringify=(P,$)=>{if(!P)return"";$=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},$),l($.arrayFormatSeparator);const R=N=>$.skipNull&&i(P[N])||$.skipEmptyString&&P[N]==="",j=s($),I={};for(const N of Object.keys(P))R(N)||(I[N]=P[N]);const b=Object.keys(I);return $.sort!==!1&&b.sort($.sort),b.map(N=>{const V=P[N];return V===void 0?"":V===null?u(N,$):Array.isArray(V)?V.length===0&&$.arrayFormat==="bracket-separator"?u(N,$)+"[]":V.reduce(j(N),[]).join("&"):u(N,$)+"="+u(V,$)}).filter(N=>N.length>0).join("&")},e.parseUrl=(P,$)=>{$=Object.assign({decode:!0},$);const[R,j]=n(P,"#");return Object.assign({url:R.split("?")[0]||"",query:O(A(P),$)},$&&$.parseFragmentIdentifier&&j?{fragmentIdentifier:d(j,$)}:{})},e.stringifyUrl=(P,$)=>{$=Object.assign({encode:!0,strict:!0,[a]:!0},$);const R=m(P.url).split("?")[0]||"",j=e.extract(P.url),I=e.parse(j,{sort:!1}),b=Object.assign(I,P.query);let N=e.stringify(b,$);N&&(N=`?${N}`);let V=w(P.url);return P.fragmentIdentifier&&(V=`#${$[a]?u(P.fragmentIdentifier,$):P.fragmentIdentifier}`),`${R}${N}${V}`},e.pick=(P,$,R)=>{R=Object.assign({parseFragmentIdentifier:!0,[a]:!1},R);const{url:j,query:I,fragmentIdentifier:b}=e.parseUrl(P,R);return e.stringifyUrl({url:j,query:o(I,$),fragmentIdentifier:b},R)},e.exclude=(P,$,R)=>{const j=Array.isArray($)?I=>!$.includes(I):(I,b)=>!$(I,b);return e.pick(P,j,R)}})(f0);const SOe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},o2=":";function vY(e){const[t,r]=e.split(o2);return{namespace:t,reference:r}}function yY(e){const{namespace:t,reference:r}=e;return[t,r].join(o2)}function YC(e){const[t,r,n]=e.split(o2);return{namespace:t,reference:r,address:n}}function bY(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(o2)}function JC(e,t){const r=[];return e.forEach(n=>{const o=t(n);r.includes(o)||r.push(o)}),r}function wY(e){const{address:t}=YC(e);return t}function _Y(e){const{namespace:t,reference:r}=YC(e);return yY({namespace:t,reference:r})}function EOe(e,t){const{namespace:r,reference:n}=vY(t);return bY({namespace:r,reference:n,address:e})}function COe(e){return JC(e,wY)}function xY(e){return JC(e,_Y)}function POe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...o.accounts)}),r}function AOe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...xY(o.accounts))}),r}function OOe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...i2(n,o))}),r}function i2(e,t){return e.includes(":")?[e]:t.chains||[]}const a2=e=>e==null?void 0:e.split(":"),SY=e=>{const t=e&&a2(e);if(t)return t[3]},IOe=e=>{const t=e&&a2(e);if(t)return t[2]+":"+t[3]},EY=e=>{const t=e&&a2(e);if(t)return t.pop()},TOe=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,n=EY(t),o=e.statement,i=`URI: ${e.aud}`,a=`Version: ${e.version}`,s=`Chain ID: ${SY(t)}`,c=`Nonce: ${e.nonce}`,l=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources: +${e.resources.map(d=>`- ${d}`).join(` +`)}`:void 0;return[r,n,"",o,"",i,a,s,c,l,u].filter(d=>d!=null).join(` +`)},ZC="base10",Rn="base16",wb="base64pad",s2="utf8",XC=0,Uc=1,MOe=0,m$=1,vS=12,QC=32;function CY(){const e=VC.generateKeyPair();return{privateKey:Yn(e.secretKey,Rn),publicKey:Yn(e.publicKey,Rn)}}function _b(){const e=Ad.randomBytes(QC);return Yn(e,Rn)}function PY(e,t){const r=VC.sharedKey(oo(e,Rn),oo(t,Rn),!0),n=new iOe(n2.SHA256,r).expand(QC);return Yn(n,Rn)}function AY(e){const t=n2.hash(oo(e,Rn));return Yn(t,Rn)}function Ul(e){const t=n2.hash(oo(e,s2));return Yn(t,Rn)}function OY(e){return oo(`${e}`,ZC)}function Id(e){return Number(Yn(e,ZC))}function IY(e){const t=OY(typeof e.type<"u"?e.type:XC);if(Id(t)===Uc&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?oo(e.senderPublicKey,Rn):void 0,n=typeof e.iv<"u"?oo(e.iv,Rn):Ad.randomBytes(vS),o=new HC.ChaCha20Poly1305(oo(e.symKey,Rn)).seal(n,oo(e.message,s2));return MY({type:t,sealed:o,iv:n,senderPublicKey:r})}function TY(e){const t=new HC.ChaCha20Poly1305(oo(e.symKey,Rn)),{sealed:r,iv:n}=d0(e.encoded),o=t.open(n,r);if(o===null)throw new Error("Failed to decrypt");return Yn(o,s2)}function MY(e){if(Id(e.type)===Uc){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Yn(pS([e.type,e.senderPublicKey,e.iv,e.sealed]),wb)}return Yn(pS([e.type,e.iv,e.sealed]),wb)}function d0(e){const t=oo(e,wb),r=t.slice(MOe,m$),n=m$;if(Id(r)===Uc){const s=n+QC,c=s+vS,l=t.slice(n,s),u=t.slice(s,c),d=t.slice(c);return{type:r,sealed:d,iv:u,senderPublicKey:l}}const o=n+vS,i=t.slice(n,o),a=t.slice(o);return{type:r,sealed:a,iv:i}}function kY(e,t){const r=d0(e);return e8({type:Id(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Yn(r.senderPublicKey,Rn):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function e8(e){const t=(e==null?void 0:e.type)||XC;if(t===Uc){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function yS(e){return e.type===Uc&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var kOe=Object.defineProperty,v$=Object.getOwnPropertySymbols,$Oe=Object.prototype.hasOwnProperty,DOe=Object.prototype.propertyIsEnumerable,y$=(e,t,r)=>t in e?kOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b$=(e,t)=>{for(var r in t||(t={}))$Oe.call(t,r)&&y$(e,r,t[r]);if(v$)for(var r of v$(t))DOe.call(t,r)&&y$(e,r,t[r]);return e};const $Y="ReactNative",Wn={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},xb=" ",ROe=":",DY="/",t8=2,NOe=1e3,RY="js";function c2(){return typeof fr<"u"&&typeof fr.versions<"u"&&typeof fr.versions.node<"u"}function vu(){return!qC()&&!!WC()&&navigator.product===$Y}function yu(){return!c2()&&!!WC()&&!!qC()}function bu(){return vu()?Wn.reactNative:c2()?Wn.node:yu()?Wn.browser:Wn.unknown}function NY(){var e;try{return vu()&&typeof kt<"u"&&typeof(kt==null?void 0:kt.Application)<"u"?(e=kt.Application)==null?void 0:e.applicationId:void 0}catch{return}}function BY(e,t){let r=f0.parse(e);return r=b$(b$({},r),t),e=f0.stringify(r),e}function FY(){return gY()||{name:"",description:"",url:"",icons:[""]}}function BOe(e,t){var r;const n=bu(),o={protocol:e,version:t,env:n};return n==="browser"&&(o.host=((r=GC())==null?void 0:r.host)||"unknown"),o}function jY(){if(bu()===Wn.reactNative&&typeof kt<"u"&&typeof(kt==null?void 0:kt.Platform)<"u"){const{OS:r,Version:n}=kt.Platform;return[r,n].join("-")}const e=DC();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function LY(){var e;const t=bu();return t===Wn.browser?[t,((e=GC())==null?void 0:e.host)||"unknown"].join(":"):t}function UY(e,t,r){const n=jY(),o=LY();return[[e,t].join("-"),[RY,r].join("-"),n,o].join("/")}function HY({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:o,projectId:i,useOnCloseEvent:a,bundleId:s}){const c=r.split("?"),l=UY(e,t,n),u={auth:o,ua:l,projectId:i,useOnCloseEvent:a||void 0,origin:s||void 0},d=BY(c[1]||"",u);return c[0]+"?"+d}function FOe(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t=t==="wss"?"https":"http",[t,r].join("://")}function jOe(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function zY(e,t=t8){return VY(e.split(DY),t)}function LOe(e){return zY(e).join(xb)}function rc(e,t){return e.filter(r=>t.includes(r)).length===e.length}function VY(e,t=t8){return e.slice(Math.max(e.length-t,0))}function r8(e){return Object.fromEntries(e.entries())}function n8(e){return new Map(Object.entries(e))}function UOe(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=t(e[n])}),r}const HOe=e=>e;function qY(e){return e.trim().replace(/^\w/,t=>t.toUpperCase())}function zOe(e){return e.split(xb).map(t=>qY(t)).join(xb)}function Ol(e=dt.FIVE_MINUTES,t){const r=dt.toMiliseconds(e||dt.FIVE_MINUTES);let n,o,i;return{resolve:a=>{i&&n&&(clearTimeout(i),n(a))},reject:a=>{i&&o&&(clearTimeout(i),o(a))},done:()=>new Promise((a,s)=>{i=setTimeout(()=>{s(new Error(t))},r),n=a,o=s})}}function Qf(e,t,r){return new Promise(async(n,o)=>{const i=setTimeout(()=>o(new Error(r)),t);try{const a=await e;n(a)}catch(a){o(a)}clearTimeout(i)})}function o8(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function WY(e){return o8("topic",e)}function GY(e){return o8("id",e)}function i8(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")n.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function Yo(e,t){return dt.fromMiliseconds((t||Date.now())+dt.toMiliseconds(e))}function Va(e){return Date.now()>=dt.toMiliseconds(e)}function wr(e,t){return`${e}${t?`:${t}`:""}`}function nc(e=[],t=[]){return[...new Set([...e,...t])]}async function KY({id:e,topic:t,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let o=n==null?void 0:n.href;if(typeof o!="string")return;o.endsWith("/")&&(o=o.slice(0,-1));const i=`${o}/wc?requestId=${e}&sessionTopic=${t}`,a=bu();a===Wn.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):a===Wn.reactNative&&typeof(kt==null?void 0:kt.Linking)<"u"&&await kt.Linking.openURL(i)}catch(n){console.error(n)}}async function YY(e,t){try{return await e.getItem(t)||(yu()?localStorage.getItem(t):void 0)}catch(r){console.error(r)}}const JY="irn";function Sb(e){return(e==null?void 0:e.relay)||{protocol:JY}}function _p(e){const t=SOe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var VOe=Object.defineProperty,w$=Object.getOwnPropertySymbols,qOe=Object.prototype.hasOwnProperty,WOe=Object.prototype.propertyIsEnumerable,_$=(e,t,r)=>t in e?VOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,GOe=(e,t)=>{for(var r in t||(t={}))qOe.call(t,r)&&_$(e,r,t[r]);if(w$)for(var r of w$(t))WOe.call(t,r)&&_$(e,r,t[r]);return e};function ZY(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach(o=>{if(o.startsWith(n)){const i=o.replace(n,""),a=e[o];r[i]=a}}),r}function bS(e){e=e.includes("wc://")?e.replace("wc://",""):e,e=e.includes("wc:")?e.replace("wc:",""):e;const t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,t),o=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",a=f0.parse(i);return{protocol:n,topic:XY(o[0]),version:parseInt(o[1],10),symKey:a.symKey,relay:ZY(a)}}function XY(e){return e.startsWith("//")?e.substring(2):e}function QY(e,t="-"){const r="relay",n={};return Object.keys(e).forEach(o=>{const i=r+t+o;e[o]&&(n[i]=e[o])}),n}function eJ(e){return`${e.protocol}:${e.topic}@${e.version}?`+f0.stringify(GOe({symKey:e.symKey},QY(e.relay)))}var KOe=Object.defineProperty,YOe=Object.defineProperties,JOe=Object.getOwnPropertyDescriptors,x$=Object.getOwnPropertySymbols,ZOe=Object.prototype.hasOwnProperty,XOe=Object.prototype.propertyIsEnumerable,S$=(e,t,r)=>t in e?KOe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QOe=(e,t)=>{for(var r in t||(t={}))ZOe.call(t,r)&&S$(e,r,t[r]);if(x$)for(var r of x$(t))XOe.call(t,r)&&S$(e,r,t[r]);return e},eIe=(e,t)=>YOe(e,JOe(t));function wu(e){const t=[];return e.forEach(r=>{const[n,o]=r.split(":");t.push(`${n}:${o}`)}),t}function tJ(e){const t=[];return Object.values(e).forEach(r=>{t.push(...wu(r.accounts))}),t}function rJ(e,t){const r=[];return Object.values(e).forEach(n=>{wu(n.accounts).includes(t)&&r.push(...n.methods)}),r}function nJ(e,t){const r=[];return Object.values(e).forEach(n=>{wu(n.accounts).includes(t)&&r.push(...n.events)}),r}function oJ(e,t){const r=xp(e,t);if(r)throw new Error(r.message);const n={};for(const[o,i]of Object.entries(e))n[o]={methods:i.methods,events:i.events,chains:i.accounts.map(a=>`${a.split(":")[0]}:${a.split(":")[1]}`)};return n}function tIe(e){const{proposal:{requiredNamespaces:t,optionalNamespaces:r={}},supportedNamespaces:n}=e,o=wS(t),i=wS(r),a={};Object.keys(n).forEach(l=>{const u=n[l].chains,d=n[l].methods,p=n[l].events,m=n[l].accounts;u.forEach(w=>{if(!m.some(A=>A.includes(w)))throw new Error(`No accounts provided for chain ${w} in namespace ${l}`)}),a[l]={chains:u,methods:d,events:p,accounts:m}});const s=Eb(t,a,"approve()");if(s)throw new Error(s.message);const c={};return!Object.keys(t).length&&!Object.keys(r).length?a:(Object.keys(o).forEach(l=>{const u=n[l].chains.filter(w=>{var A,T;return(T=(A=o[l])==null?void 0:A.chains)==null?void 0:T.includes(w)}),d=n[l].methods.filter(w=>{var A,T;return(T=(A=o[l])==null?void 0:A.methods)==null?void 0:T.includes(w)}),p=n[l].events.filter(w=>{var A,T;return(T=(A=o[l])==null?void 0:A.events)==null?void 0:T.includes(w)}),m=u.map(w=>n[l].accounts.filter(A=>A.includes(`${w}:`))).flat();c[l]={chains:u,methods:d,events:p,accounts:m}}),Object.keys(i).forEach(l=>{var u,d,p,m,w,A;if(!n[l])return;const T=(d=(u=i[l])==null?void 0:u.chains)==null?void 0:d.filter(R=>n[l].chains.includes(R)),O=n[l].methods.filter(R=>{var j,I;return(I=(j=i[l])==null?void 0:j.methods)==null?void 0:I.includes(R)}),P=n[l].events.filter(R=>{var j,I;return(I=(j=i[l])==null?void 0:j.events)==null?void 0:I.includes(R)}),$=T==null?void 0:T.map(R=>n[l].accounts.filter(j=>j.includes(`${R}:`))).flat();c[l]={chains:nc((p=c[l])==null?void 0:p.chains,T),methods:nc((m=c[l])==null?void 0:m.methods,O),events:nc((w=c[l])==null?void 0:w.events,P),accounts:nc((A=c[l])==null?void 0:A.accounts,$)}}),c)}function a8(e){return e.includes(":")}function iJ(e){return a8(e)?e.split(":")[0]:e}function wS(e){var t,r,n;const o={};if(!Hl(e))return o;for(const[i,a]of Object.entries(e)){const s=a8(i)?[i]:a.chains,c=a.methods||[],l=a.events||[],u=iJ(i);o[u]=eIe(QOe({},o[u]),{chains:nc(s,(t=o[u])==null?void 0:t.chains),methods:nc(c,(r=o[u])==null?void 0:r.methods),events:nc(l,(n=o[u])==null?void 0:n.events)})}return o}const aJ={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},sJ={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function nt(e,t){const{message:r,code:n}=sJ[e];return{message:t?`${r} ${t}`:r,code:n}}function Ar(e,t){const{message:r,code:n}=aJ[e];return{message:t?`${r} ${t}`:r,code:n}}function Td(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function Hl(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function $n(e){return typeof e>"u"}function Rr(e,t){return t&&$n(e)?!0:typeof e=="string"&&!!e.trim().length}function l2(e,t){return t&&$n(e)?!0:typeof e=="number"&&!isNaN(e)}function cJ(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),o=Object.keys(r);let i=!0;return rc(o,n)?(n.forEach(a=>{const{accounts:s,methods:c,events:l}=e.namespaces[a],u=wu(s),d=r[a];(!rc(i2(a,d),u)||!rc(d.methods,c)||!rc(d.events,l))&&(i=!1)}),i):!1}function h0(e){return Rr(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function lJ(e){if(Rr(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&h0(r)}}return!1}function uJ(e){if(Rr(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function fJ(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function dJ(e){return e==null?void 0:e.topic}function hJ(e,t){let r=null;return Rr(e==null?void 0:e.publicKey,!1)||(r=nt("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function _S(e){let t=!0;return Td(e)?e.length&&(t=e.every(r=>Rr(r,!1))):t=!1,t}function pJ(e,t,r){let n=null;return Td(t)&&t.length?t.forEach(o=>{n||h0(o)||(n=Ar("UNSUPPORTED_CHAINS",`${r}, chain ${o} should be a string and conform to "namespace:chainId" format`))}):h0(e)||(n=Ar("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function gJ(e,t,r){let n=null;return Object.entries(e).forEach(([o,i])=>{if(n)return;const a=pJ(o,i2(o,i),`${t} ${r}`);a&&(n=a)}),n}function mJ(e,t){let r=null;return Td(e)?e.forEach(n=>{r||lJ(n)||(r=Ar("UNSUPPORTED_ACCOUNTS",`${t}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Ar("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function vJ(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=mJ(n==null?void 0:n.accounts,`${t} namespace`);o&&(r=o)}),r}function yJ(e,t){let r=null;return _S(e==null?void 0:e.methods)?_S(e==null?void 0:e.events)||(r=Ar("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=Ar("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function s8(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=yJ(n,`${t}, namespace`);o&&(r=o)}),r}function bJ(e,t,r){let n=null;if(e&&Hl(e)){const o=s8(e,t);o&&(n=o);const i=gJ(e,t,r);i&&(n=i)}else n=nt("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function xp(e,t){let r=null;if(e&&Hl(e)){const n=s8(e,t);n&&(r=n);const o=vJ(e,t);o&&(r=o)}else r=nt("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function c8(e){return Rr(e.protocol,!0)}function wJ(e,t){let r=!1;return t&&!e?r=!0:e&&Td(e)&&e.length&&e.forEach(n=>{r=c8(n)}),r}function _J(e){return typeof e=="number"}function Hn(e){return typeof e<"u"&&typeof e!==null}function xJ(e){return!(!e||typeof e!="object"||!e.code||!l2(e.code,!1)||!e.message||!Rr(e.message,!1))}function SJ(e){return!($n(e)||!Rr(e.method,!1))}function EJ(e){return!($n(e)||$n(e.result)&&$n(e.error)||!l2(e.id,!1)||!Rr(e.jsonrpc,!1))}function CJ(e){return!($n(e)||!Rr(e.name,!1))}function xS(e,t){return!(!h0(t)||!tJ(e).includes(t))}function PJ(e,t,r){return Rr(r,!1)?rJ(e,t).includes(r):!1}function AJ(e,t,r){return Rr(r,!1)?nJ(e,t).includes(r):!1}function Eb(e,t,r){let n=null;const o=rIe(e),i=nIe(t),a=Object.keys(o),s=Object.keys(i),c=E$(Object.keys(e)),l=E$(Object.keys(t)),u=c.filter(d=>!l.includes(d));return u.length&&(n=nt("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. + Required: ${u.toString()} + Received: ${Object.keys(t).toString()}`)),rc(a,s)||(n=nt("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. + Required: ${a.toString()} + Approved: ${s.toString()}`)),Object.keys(t).forEach(d=>{if(!d.includes(":")||n)return;const p=wu(t[d].accounts);p.includes(d)||(n=nt("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${d} + Required: ${d} + Approved: ${p.toString()}`))}),a.forEach(d=>{n||(rc(o[d].methods,i[d].methods)?rc(o[d].events,i[d].events)||(n=nt("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${d}`)):n=nt("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${d}`))}),n}function rIe(e){const t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:(n=e[r].chains)==null||n.forEach(o=>{t[o]={methods:e[r].methods,events:e[r].events}})}),t}function E$(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function nIe(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{const n=wu(e[r].accounts);n==null||n.forEach(o=>{t[o]={accounts:e[r].accounts.filter(i=>i.includes(`${o}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function OJ(e,t){return l2(e,!1)&&e<=t.max&&e>=t.min}function SS(){const e=bu();return new Promise(t=>{switch(e){case Wn.browser:t(IJ());break;case Wn.reactNative:t(TJ());break;case Wn.node:t(MJ());break;default:t(!0)}})}function IJ(){return yu()&&(navigator==null?void 0:navigator.onLine)}async function TJ(){if(vu()&&typeof kt<"u"&&kt!=null&&kt.NetInfo){const e=await(kt==null?void 0:kt.NetInfo.fetch());return e==null?void 0:e.isConnected}return!0}function MJ(){return!0}function kJ(e){switch(bu()){case Wn.browser:$J(e);break;case Wn.reactNative:DJ(e);break;case Wn.node:break}}function $J(e){!vu()&&yu()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)))}function DJ(e){vu()&&typeof kt<"u"&&kt!=null&&kt.NetInfo&&(kt==null||kt.NetInfo.addEventListener(t=>e(t==null?void 0:t.isConnected)))}const U5={};let Zh=class{static get(t){return U5[t]}static set(t,r){U5[t]=r}static delete(t){delete U5[t]}};const oIe=Object.freeze(Object.defineProperty({__proto__:null,BASE10:ZC,BASE16:Rn,BASE64:wb,COLON:ROe,DEFAULT_DEPTH:t8,EMPTY_SPACE:xb,ENV_MAP:Wn,INTERNAL_ERRORS:sJ,MemoryStore:Zh,ONE_THOUSAND:NOe,REACT_NATIVE_PRODUCT:$Y,RELAYER_DEFAULT_PROTOCOL:JY,SDK_ERRORS:aJ,SDK_TYPE:RY,SLASH:DY,TYPE_0:XC,TYPE_1:Uc,UTF8:s2,appendToQueryString:BY,assertType:jOe,buildApprovedNamespaces:tIe,calcExpiry:Yo,capitalize:zOe,capitalizeWord:qY,createDelayedPromise:Ol,createExpiringPromise:Qf,decodeTypeByte:Id,decrypt:TY,deriveSymKey:PY,deserialize:d0,encodeTypeByte:OY,encrypt:IY,engineEvent:wr,enumify:HOe,formatAccountId:bY,formatAccountWithChain:EOe,formatChainId:yY,formatExpirerTarget:o8,formatIdTarget:GY,formatMessage:TOe,formatMessageContext:LOe,formatRelayParams:QY,formatRelayRpcUrl:HY,formatTopicTarget:WY,formatUA:UY,formatUri:eJ,generateKeyPair:CY,generateRandomBytes32:_b,getAccountsChains:wu,getAccountsFromNamespaces:POe,getAddressFromAccount:wY,getAddressesFromAccounts:COe,getAppMetadata:FY,getBrowserOnlineStatus:IJ,getBundleId:NY,getChainFromAccount:_Y,getChainsFromAccounts:xY,getChainsFromNamespace:i2,getChainsFromNamespaces:AOe,getChainsFromRequiredNamespaces:OOe,getDeepLink:YY,getDidAddress:EY,getDidAddressSegments:a2,getDidChainId:SY,getEnvironment:bu,getHttpUrl:FOe,getInternalError:nt,getJavascriptID:LY,getJavascriptOS:jY,getLastItems:VY,getNamespacedDidChainId:IOe,getNamespacesChains:tJ,getNamespacesEventsForChainId:nJ,getNamespacesMethodsForChainId:rJ,getNodeOnlineStatus:MJ,getReactNativeOnlineStatus:TJ,getRelayClientMetadata:BOe,getRelayProtocolApi:_p,getRelayProtocolName:Sb,getRequiredNamespacesFromNamespaces:oJ,getSdkError:Ar,getUniqueValues:JC,handleDeeplinkRedirect:KY,hasOverlap:rc,hashKey:AY,hashMessage:Ul,isBrowser:yu,isCaipNamespace:a8,isConformingNamespaces:Eb,isExpired:Va,isNode:c2,isOnline:SS,isProposalStruct:fJ,isReactNative:vu,isSessionCompatible:cJ,isSessionStruct:dJ,isTypeOneEnvelope:yS,isUndefined:$n,isValidAccountId:lJ,isValidAccounts:mJ,isValidActions:yJ,isValidArray:Td,isValidChainId:h0,isValidChains:pJ,isValidController:hJ,isValidErrorReason:xJ,isValidEvent:CJ,isValidId:_J,isValidNamespaceAccounts:vJ,isValidNamespaceActions:s8,isValidNamespaceChains:gJ,isValidNamespaceMethodsOrEvents:_S,isValidNamespaces:xp,isValidNamespacesChainId:xS,isValidNamespacesEvent:AJ,isValidNamespacesRequest:PJ,isValidNumber:l2,isValidObject:Hl,isValidParams:Hn,isValidRelay:c8,isValidRelays:wJ,isValidRequest:SJ,isValidRequestExpiry:OJ,isValidRequiredNamespaces:bJ,isValidResponse:EJ,isValidString:Rr,isValidUrl:uJ,mapEntries:UOe,mapToObj:r8,mergeArrays:nc,normalizeNamespaces:wS,objToMap:n8,parseAccountId:YC,parseChainId:vY,parseContextNames:zY,parseExpirerTarget:i8,parseNamespaceKey:iJ,parseRelayParams:ZY,parseTopic:XY,parseUri:bS,serialize:MY,subscribeToBrowserNetworkChange:$J,subscribeToNetworkChange:kJ,subscribeToReactNativeNetworkChange:DJ,validateDecoding:kY,validateEncoding:e8},Symbol.toStringTag,{value:"Module"})),iIe="PARSE_ERROR",aIe="INVALID_REQUEST",sIe="METHOD_NOT_FOUND",cIe="INVALID_PARAMS",RJ="INTERNAL_ERROR",l8="SERVER_ERROR",lIe=[-32700,-32600,-32601,-32602,-32603],Sp={[iIe]:{code:-32700,message:"Parse error"},[aIe]:{code:-32600,message:"Invalid Request"},[sIe]:{code:-32601,message:"Method not found"},[cIe]:{code:-32602,message:"Invalid params"},[RJ]:{code:-32603,message:"Internal error"},[l8]:{code:-32e3,message:"Server error"}},NJ=l8;function uIe(e){return lIe.includes(e)}function C$(e){return Object.keys(Sp).includes(e)?Sp[e]:Sp[NJ]}function fIe(e){const t=Object.values(Sp).find(r=>r.code===e);return t||Sp[NJ]}function dIe(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var BJ={},Ra={},P$;function hIe(){if(P$)return Ra;P$=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.isBrowserCryptoAvailable=Ra.getSubtleCrypto=Ra.getBrowerCrypto=void 0;function e(){return(Ae==null?void 0:Ae.crypto)||(Ae==null?void 0:Ae.msCrypto)||{}}Ra.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}Ra.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return Ra.isBrowserCryptoAvailable=r,Ra}var Na={},A$;function pIe(){if(A$)return Na;A$=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.isBrowser=Na.isNode=Na.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}Na.isReactNative=e;function t(){return typeof fr<"u"&&typeof fr.versions<"u"&&typeof fr.versions.node<"u"}Na.isNode=t;function r(){return!e()&&!t()}return Na.isBrowser=r,Na}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar(hIe(),e),t.__exportStar(pIe(),e)})(BJ);function u8(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function FJ(e=6){return BigInt(u8(e))}function Mf(e,t,r){return{id:r||u8(),jsonrpc:"2.0",method:e,params:t}}function f8(e,t){return{id:e,jsonrpc:"2.0",result:t}}function d8(e,t,r){return{id:e,jsonrpc:"2.0",error:gIe(t,r)}}function gIe(e,t){return typeof e>"u"?C$(RJ):(typeof e=="string"&&(e=Object.assign(Object.assign({},C$(l8)),{message:e})),typeof t<"u"&&(e.data=t),uIe(e.code)&&(e=fIe(e.code)),e)}class mIe{}class vIe extends mIe{constructor(){super()}}class yIe extends vIe{constructor(t){super()}}const bIe="^wss?:";function wIe(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function _Ie(e,t){const r=wIe(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function O$(e){return _Ie(e,bIe)}function xIe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function jJ(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function h8(e){return jJ(e)&&"method"in e}function u2(e){return jJ(e)&&(Ua(e)||Ai(e))}function Ua(e){return"result"in e}function Ai(e){return"error"in e}class SIe extends yIe{constructor(t){super(t),this.events=new Vi.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(Mf(t.method,t.params||[],t.id||FJ().toString()),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{Ai(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),u2(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const EIe=()=>typeof WebSocket<"u"?WebSocket:typeof kt<"u"&&typeof kt.WebSocket<"u"?kt.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:require("ws"),CIe=()=>typeof WebSocket<"u"||typeof kt<"u"&&typeof kt.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u",I$=e=>e.split("?")[0],T$=10,PIe=EIe();let AIe=class{constructor(t){if(this.url=t,this.events=new Vi.EventEmitter,this.registering=!1,!O$(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(X0(t))}catch(r){this.onError(t.id,r)}}register(t=this.url){if(!O$(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const o=new URLSearchParams(t).get("origin"),i=BJ.isReactNative()?{headers:{origin:o}}:{rejectUnauthorized:!xIe(t)},a=new PIe(t,[],i);CIe()?a.onerror=s=>{const c=s;n(this.emitError(c.error))}:a.on("error",s=>{n(this.emitError(s))}),a.onopen=()=>{this.onOpen(a),r(a)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?Zw(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=d8(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return dIe(t,I$(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>T$&&this.events.setMaxListeners(T$)}emitError(t){const r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for host: ${I$(this.url)}`));return this.events.emit("register_error",r),r}};var Cb={exports:{}};Cb.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",m="[object Function]",w="[object GeneratorFunction]",A="[object Map]",T="[object Number]",O="[object Null]",P="[object Object]",$="[object Promise]",R="[object Proxy]",j="[object RegExp]",I="[object Set]",b="[object String]",N="[object Symbol]",V="[object Undefined]",Z="[object WeakMap]",q="[object ArrayBuffer]",_="[object DataView]",y="[object Float32Array]",f="[object Float64Array]",h="[object Int8Array]",x="[object Int16Array]",v="[object Int32Array]",S="[object Uint8Array]",k="[object Uint8ClampedArray]",E="[object Uint16Array]",C="[object Uint32Array]",g=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,W={};W[y]=W[f]=W[h]=W[x]=W[v]=W[S]=W[k]=W[E]=W[C]=!0,W[s]=W[c]=W[q]=W[u]=W[_]=W[d]=W[p]=W[m]=W[A]=W[T]=W[P]=W[j]=W[I]=W[b]=W[Z]=!1;var ee=typeof Ae=="object"&&Ae&&Ae.Object===Object&&Ae,ce=typeof self=="object"&&self&&self.Object===Object&&self,ie=ee||ce||Function("return this")(),le=t&&!t.nodeType&&t,L=le&&!0&&e&&!e.nodeType&&e,te=L&&L.exports===le,ae=te&&ee.process,ye=function(){try{return ae&&ae.binding&&ae.binding("util")}catch{}}(),ve=ye&&ye.isTypedArray;function me(Ce,Re){for(var Ye=-1,lt=Ce==null?0:Ce.length,qt=0,xt=[];++Ye-1}function Fr(Ce,Re){var Ye=this.__data__,lt=Og(Ye,Ce);return lt<0?(++this.size,Ye.push([Ce,Re])):Ye[lt][1]=Re,this}Je.prototype.clear=it,Je.prototype.delete=hr,Je.prototype.get=br,Je.prototype.has=ir,Je.prototype.set=Fr;function ar(Ce){var Re=-1,Ye=Ce==null?0:Ce.length;for(this.clear();++Rejr))return!1;var sr=xt.get(Ce);if(sr&&xt.get(Re))return sr==Re;var go=-1,hi=!0,xn=Ye&i?new Pr:void 0;for(xt.set(Ce,Re),xt.set(Re,Ce);++go-1&&Ce%1==0&&Ce-1&&Ce%1==0&&Ce<=a}function n9(Ce){var Re=typeof Ce;return Ce!=null&&(Re=="object"||Re=="function")}function Yd(Ce){return Ce!=null&&typeof Ce=="object"}var o9=ve?Ie(ve):ane;function wne(Ce){return yne(Ce)?rne(Ce):sne(Ce)}function _ne(){return[]}function xne(){return!1}e.exports=bne})(Cb,Cb.exports);var OIe=Cb.exports;const IIe=Hi(OIe);function TIe(e,t){return t=t||{},new Promise(function(r,n){var o=new XMLHttpRequest,i=[],a=[],s={},c=function(){return{ok:(o.status/100|0)==2,statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:c,headers:{keys:function(){return i},entries:function(){return a},get:function(u){return s[u.toLowerCase()]},has:function(u){return u.toLowerCase()in s}}}};for(var l in o.open(t.method||"get",e,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(u,d,p){i.push(d=d.toLowerCase()),a.push([d,p]),s[d]=s[d]?s[d]+","+p:p}),r(c())},o.onerror=n,o.withCredentials=t.credentials=="include",t.headers)o.setRequestHeader(l,t.headers[l]);o.send(t.body||null)})}const MIe=Object.freeze(Object.defineProperty({__proto__:null,default:TIe},Symbol.toStringTag,{value:"Module"})),M$=zi(MIe);var kIe=self.fetch||(self.fetch=M$.default||M$);const $Ie=Hi(kIe);function DIe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,R=new Uint8Array($);O!==P;){for(var j=w[O],I=0,b=$-1;(j!==0||I>>0,R[b]=j%s>>>0,j=j/s>>>0;if(j!==0)throw new Error("Non-zero carry");T=I,O++}for(var N=$-T;N!==$&&R[N]===0;)N++;for(var V=c.repeat(A);N<$;++N)V+=e.charAt(R[N]);return V}function p(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var A=0;if(w[A]!==" "){for(var T=0,O=0;w[A]===c;)T++,A++;for(var P=(w.length-A)*l+1>>>0,$=new Uint8Array(P);w[A];){var R=r[w.charCodeAt(A)];if(R===255)return;for(var j=0,I=P-1;(R!==0||j>>0,$[I]=R%256>>>0,R=R/256>>>0;if(R!==0)throw new Error("Non-zero carry");O=j,A++}if(w[A]!==" "){for(var b=P-O;b!==P&&$[b]===0;)b++;for(var N=new Uint8Array(T+(P-b)),V=T;b!==P;)N[V++]=$[b++];return N}}}function m(w){var A=p(w);if(A)return A;throw new Error(`Non-${t} character`)}return{encode:d,decodeUnsafe:p,decode:m}}var RIe=DIe,NIe=RIe;const LJ=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},BIe=e=>new TextEncoder().encode(e),FIe=e=>new TextDecoder().decode(e);class jIe{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}let LIe=class{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return UJ(this,t)}},UIe=class{constructor(t){this.decoders=t}or(t){return UJ(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const UJ=(e,t)=>new UIe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});let HIe=class{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new jIe(t,r,n),this.decoder=new LIe(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}};const f2=({name:e,prefix:t,encode:r,decode:n})=>new HIe(e,t,r,n),tg=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=NIe(r,t);return f2({prefix:e,name:t,encode:n,decode:i=>LJ(o(i))})},zIe=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[l++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a},VIe=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<f2({prefix:t,name:e,encode(o){return VIe(o,n,r)},decode(o){return zIe(o,n,r,e)}}),qIe=f2({prefix:"\0",name:"identity",encode:e=>FIe(e),decode:e=>BIe(e)});var WIe=Object.freeze({__proto__:null,identity:qIe});const GIe=wn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var KIe=Object.freeze({__proto__:null,base2:GIe});const YIe=wn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var JIe=Object.freeze({__proto__:null,base8:YIe});const ZIe=tg({prefix:"9",name:"base10",alphabet:"0123456789"});var XIe=Object.freeze({__proto__:null,base10:ZIe});const QIe=wn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),eTe=wn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var tTe=Object.freeze({__proto__:null,base16:QIe,base16upper:eTe});const rTe=wn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),nTe=wn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),oTe=wn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),iTe=wn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),aTe=wn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sTe=wn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),cTe=wn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),lTe=wn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),uTe=wn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var fTe=Object.freeze({__proto__:null,base32:rTe,base32upper:nTe,base32pad:oTe,base32padupper:iTe,base32hex:aTe,base32hexupper:sTe,base32hexpad:cTe,base32hexpadupper:lTe,base32z:uTe});const dTe=tg({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),hTe=tg({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var pTe=Object.freeze({__proto__:null,base36:dTe,base36upper:hTe});const gTe=tg({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),mTe=tg({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var vTe=Object.freeze({__proto__:null,base58btc:gTe,base58flickr:mTe});const yTe=wn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),bTe=wn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),wTe=wn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),_Te=wn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var xTe=Object.freeze({__proto__:null,base64:yTe,base64pad:bTe,base64url:wTe,base64urlpad:_Te});const HJ=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),STe=HJ.reduce((e,t,r)=>(e[r]=t,e),[]),ETe=HJ.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function CTe(e){return e.reduce((t,r)=>(t+=STe[r],t),"")}function PTe(e){const t=[];for(const r of e){const n=ETe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const ATe=f2({prefix:"🚀",name:"base256emoji",encode:CTe,decode:PTe});var OTe=Object.freeze({__proto__:null,base256emoji:ATe}),ITe=zJ,k$=128,TTe=127,MTe=~TTe,kTe=Math.pow(2,31);function zJ(e,t,r){t=t||[],r=r||0;for(var n=r;e>=kTe;)t[r++]=e&255|k$,e/=128;for(;e&MTe;)t[r++]=e&255|k$,e>>>=7;return t[r]=e|0,zJ.bytes=r-n+1,t}var $Te=ES,DTe=128,$$=127;function ES(e,n){var r=0,n=n||0,o=0,i=n,a,s=e.length;do{if(i>=s)throw ES.bytes=0,new RangeError("Could not decode varint");a=e[i++],r+=o<28?(a&$$)<=DTe);return ES.bytes=i-n,r}var RTe=Math.pow(2,7),NTe=Math.pow(2,14),BTe=Math.pow(2,21),FTe=Math.pow(2,28),jTe=Math.pow(2,35),LTe=Math.pow(2,42),UTe=Math.pow(2,49),HTe=Math.pow(2,56),zTe=Math.pow(2,63),VTe=function(e){return e(VJ.encode(e,t,r),t),R$=e=>VJ.encodingLength(e),CS=(e,t)=>{const r=t.byteLength,n=R$(e),o=n+R$(r),i=new Uint8Array(o+r);return D$(e,i,0),D$(r,i,n),i.set(t,o),new WTe(e,r,t,i)};class WTe{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}}const qJ=({name:e,code:t,encode:r})=>new GTe(e,t,r);class GTe{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?CS(this.code,r):r.then(n=>CS(this.code,n))}else throw Error("Unknown type, must be binary type")}}const WJ=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),KTe=qJ({name:"sha2-256",code:18,encode:WJ("SHA-256")}),YTe=qJ({name:"sha2-512",code:19,encode:WJ("SHA-512")});var JTe=Object.freeze({__proto__:null,sha256:KTe,sha512:YTe});const GJ=0,ZTe="identity",KJ=LJ,XTe=e=>CS(GJ,KJ(e)),QTe={code:GJ,name:ZTe,encode:KJ,digest:XTe};var eMe=Object.freeze({__proto__:null,identity:QTe});new TextEncoder,new TextDecoder;const N$={...WIe,...KIe,...JIe,...XIe,...tTe,...fTe,...pTe,...vTe,...xTe,...OTe};({...JTe,...eMe});function YJ(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function tMe(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?YJ(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function JJ(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const B$=JJ("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),H5=JJ("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=tMe(e.length);for(let r=0;r{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:i}=nt("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=t,this.logger=Ot.generateChildLogger(r,this.name)}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,r8(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?n8(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class IZ{constructor(t,r,n){this.core=t,this.logger=r,this.name=eZ,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),i=u$(o);return lY(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=CY();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const i=await this.getClientSeed(),a=u$(i),s=_b();return await W7e(s,o,tZ,a)},this.generateSharedKey=(o,i,a)=>{this.isInitialized();const s=this.getPrivateKey(o),c=PY(s,i);return this.setSymKey(c,a)},this.setSymKey=async(o,i)=>{this.isInitialized();const a=i||AY(o);return await this.keychain.set(a,o),a},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,i,a)=>{this.isInitialized();const s=e8(a),c=X0(i);if(yS(s)){const p=s.senderPublicKey,m=s.receiverPublicKey;o=await this.generateSharedKey(p,m)}const l=this.getSymKey(o),{type:u,senderPublicKey:d}=s;return IY({type:u,symKey:l,message:c,senderPublicKey:d})},this.decode=async(o,i,a)=>{this.isInitialized();const s=kY(i,a);if(yS(s)){const c=s.receiverPublicKey,l=s.senderPublicKey;o=await this.generateSharedKey(c,l)}try{const c=this.getSymKey(o),l=TY({symKey:c,encoded:i});return Zw(l)}catch(c){this.logger.error(`Failed to decode message from topic: '${o}', clientId: '${await this.getClientId()}'`),this.logger.error(c)}},this.getPayloadType=o=>{const i=d0(o);return Id(i.type)},this.getPayloadSenderPublicKey=o=>{const i=d0(o);return i.senderPublicKey?Yn(i.senderPublicKey,Rn):void 0},this.core=t,this.logger=Ot.generateChildLogger(r,this.name),this.keychain=n||new OZ(this.core,this.logger)}get context(){return Ot.getLoggerContext(this.logger)}async setPrivateKey(t,r){return await this.keychain.set(t,r),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(PS)}catch{t=_b(),await this.keychain.set(PS,t)}return nMe(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class TZ extends Z9e{constructor(t,r){super(t,r),this.logger=t,this.core=r,this.messages=new Map,this.name=oZ,this.version=iZ,this.initialized=!1,this.storagePrefix=hs,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const i=Ul(o);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[i]<"u"||(a[i]=o,this.messages.set(n,a),await this.persist()),i},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const i=this.get(n),a=Ul(o);return typeof i[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Ot.generateChildLogger(t,this.name),this.core=r}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,r8(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?n8(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class cMe extends X9e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.events=new Vi.EventEmitter,this.name=sZ,this.queue=new Map,this.publishTimeout=dt.toMiliseconds(dt.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,o,i)=>{var a;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}});try{const s=(i==null?void 0:i.ttl)||aZ,c=Sb(i),l=(i==null?void 0:i.prompt)||!1,u=(i==null?void 0:i.tag)||0,d=(i==null?void 0:i.id)||FJ().toString(),p={topic:n,message:o,opts:{ttl:s,relay:c,prompt:l,tag:u,id:d}},m=setTimeout(()=>this.queue.set(d,p),this.publishTimeout);try{await await Qf(this.rpcPublish(n,o,s,c,l,u,d),this.publishTimeout,"Failed to publish payload, please try again."),this.removeRequestFromQueue(d),this.relayer.events.emit(pn.publish,p)}catch(w){if(this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0,(a=i==null?void 0:i.internal)!=null&&a.throwOnFailedPublish)throw this.removeRequestFromQueue(d),w;return}finally{clearTimeout(m)}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}})}catch(s){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(s),s}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=t,this.logger=Ot.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return Ot.getLoggerContext(this.logger)}rpcPublish(t,r,n,o,i,a,s){var c,l,u,d;const p={method:_p(o.protocol).publish,params:{topic:t,message:r,ttl:n,prompt:i,tag:a},id:s};return $n((c=p.params)==null?void 0:c.prompt)&&((l=p.params)==null||delete l.prompt),$n((u=p.params)==null?void 0:u.tag)&&((d=p.params)==null||delete d.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:p}),this.relayer.request(p)}removeRequestFromQueue(t){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{const{topic:r,message:n,opts:o}=t;await this.publish(r,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(Pd.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(pn.connection_stalled);return}this.checkQueue()}),this.relayer.on(pn.message_ack,t=>{this.removeRequestFromQueue(t.id.toString())})}}class lMe{constructor(){this.map=new Map,this.set=(t,r)=>{const n=this.get(t);this.exists(t,r)||this.map.set(t,[...n,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const n=this.get(t);if(!this.exists(t,r))return;const o=n.filter(i=>i!==r);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var uMe=Object.defineProperty,fMe=Object.defineProperties,dMe=Object.getOwnPropertyDescriptors,F$=Object.getOwnPropertySymbols,hMe=Object.prototype.hasOwnProperty,pMe=Object.prototype.propertyIsEnumerable,j$=(e,t,r)=>t in e?uMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sh=(e,t)=>{for(var r in t||(t={}))hMe.call(t,r)&&j$(e,r,t[r]);if(F$)for(var r of F$(t))pMe.call(t,r)&&j$(e,r,t[r]);return e},z5=(e,t)=>fMe(e,dMe(t));class MZ extends tAe{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new lMe,this.events=new Vi.EventEmitter,this.name=mZ,this.version=vZ,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=hs,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const i=Sb(o),a={topic:n,relay:i};this.pending.set(n,a);const s=await this.rpcSubscribe(n,i);return this.onSubscribe(s,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),s}catch(i){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(i),i}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,i)=>{const a=new dt.Watch;a.start(this.pendingSubscriptionWatchLabel);const s=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),o(!0)),a.elapsed(this.pendingSubscriptionWatchLabel)>=yZ&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),i(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Ot.generateChildLogger(r,this.name),this.clientId=""}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let n=!1;try{n=this.getSubscription(t).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,r){const n=this.topicMap.get(t);await Promise.all(n.map(async o=>await this.unsubscribeById(t,o,r)))}async unsubscribeById(t,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}});try{const o=Sb(n);await this.rpcUnsubscribe(t,r,o);const i=Ar("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,r,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,r){const n={method:_p(r.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await Qf(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(pn.connection_stalled)}return Ul(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const r=t[0].relay,n={method:_p(r.protocol).batchSubscribe,params:{topics:t.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await Qf(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(pn.connection_stalled)}}rpcUnsubscribe(t,r,n){const o={method:_p(n.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(t,r){this.setSubscription(t,z5(Sh({},r),{id:t})),this.pending.delete(r.topic)}onBatchSubscribe(t){t.length&&t.forEach(r=>{this.setSubscription(r.id,Sh({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(t,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,t)&&this.deleteSubscription(r,n),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,Sh({},r)),this.topicMap.set(r.topic,t),this.events.emit(Ko.created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const r=this.subscriptions.get(t);if(!r){const{message:n}=nt("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});const n=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(n.topic,t),this.events.emit(Ko.deleted,z5(Sh({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ko.sync)}async reset(){if(this.cached.length){const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r"u"||!t.length)return;if(this.subscriptions.size){const{message:r}=nt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const r=await this.rpcBatchSubscribe(t);Td(r)&&this.onBatchSubscribe(r.map((n,o)=>z5(Sh({},t[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(!this.initialized||this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach(r=>{t.push(r)}),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(Pd.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(pn.connect,async()=>{await this.onConnect()}),this.relayer.on(pn.disconnect,()=>{this.onDisconnect()}),this.events.on(Ko.created,async t=>{const r=Ko.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()}),this.events.on(Ko.deleted,async t=>{const r=Ko.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise(t=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),t())},this.pollingInterval)})}}var gMe=Object.defineProperty,L$=Object.getOwnPropertySymbols,mMe=Object.prototype.hasOwnProperty,vMe=Object.prototype.propertyIsEnumerable,U$=(e,t,r)=>t in e?gMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yMe=(e,t)=>{for(var r in t||(t={}))mMe.call(t,r)&&U$(e,r,t[r]);if(L$)for(var r of L$(t))vMe.call(t,r)&&U$(e,r,t[r]);return e};class kZ extends Q9e{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new Vi.EventEmitter,this.name=lZ,this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.onPayloadHandler=r=>{this.onProviderPayload(r)},this.onConnectHandler=()=>{this.events.emit(pn.connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=r=>{this.logger.error(r),this.events.emit(pn.error,r),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(Xi.payload,this.onPayloadHandler),this.provider.on(Xi.connect,this.onConnectHandler),this.provider.on(Xi.disconnect,this.onDisconnectHandler),this.provider.on(Xi.error,this.onProviderErrorHandler)},this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Ot.generateChildLogger(t.logger,this.name):Ot.pino(Ot.getDefaultLoggerOptions({level:t.logger||cZ})),this.messages=new TZ(this.logger,t.core),this.subscriber=new MZ(this,this.logger),this.publisher=new cMe(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||m8,this.projectId=t.projectId,this.bundleId=NY(),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${AS}...`),await this.restartTransport(AS)}this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},hZ)}get context(){return Ot.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,r,n){this.isInitialized(),await this.publisher.publish(t,r,n),await this.recordMessageEvent({topic:t,message:r,publishedAt:Date.now()})}async subscribe(t,r){var n;this.isInitialized();let o=((n=this.subscriber.topicMap.get(t))==null?void 0:n[0])||"";if(o)return o;let i;const a=s=>{s.topic===t&&(this.subscriber.off(Ko.created,a),i())};return await Promise.all([new Promise(s=>{i=s,this.subscriber.on(Ko.created,a)}),new Promise(async s=>{o=await this.subscriber.subscribe(t,r),s()})]),o}async unsubscribe(t,r){this.isInitialized(),await this.subscriber.unsubscribe(t,r)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.hasExperiencedNetworkDisruption&&this.connected?await Qf(this.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.connected&&await this.provider.disconnect()}async transportOpen(t){if(this.transportExplicitlyClosed=!1,await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress){t&&t!==this.relayUrl&&(this.relayUrl=t,await this.transportClose(),await this.createProvider()),this.connectionAttemptInProgress=!0;try{await Promise.all([new Promise(r=>{if(!this.initialized)return r();this.subscriber.once(Ko.resubscribed,()=>{r()})}),new Promise(async(r,n)=>{try{await Qf(this.provider.connect(),1e4,`Socket stalled when trying to connect to ${this.relayUrl}`)}catch(o){n(o);return}r()})])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.provider.events.emit(Xi.disconnect)}finally{this.connectionAttemptInProgress=!1,this.hasExperiencedNetworkDisruption=!1}}}async restartTransport(t){await this.confirmOnlineStateOrThrow(),!this.connectionAttemptInProgress&&(this.relayUrl=t||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await SS())throw new Error("No internet connection detected. Please restart your network and try again.")}isConnectionStalled(t){return this.staleConnectionErrors.some(r=>t.includes(r))}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new SIe(new AIe(HY({sdkVersion:dZ,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0,bundleId:this.bundleId}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:r,message:n}=t;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(t){const{topic:r,message:n}=t;if(!n||n.length===0)return this.logger.debug(`Ignoring invalid/empty message: ${n}`),!0;if(!await this.subscriber.isSubscribed(r))return this.logger.debug(`Ignoring message for non-subscribed topic ${r}`),!0;const o=this.messages.has(r,n);return o&&this.logger.debug(`Ignoring duplicate message: ${n}`),o}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),h8(t)){if(!t.method.endsWith(uZ))return;const r=t.params,{topic:n,message:o,publishedAt:i}=r.data,a={topic:n,message:o,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(yMe({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(t),await this.onMessageEvent(a)}else u2(t)&&this.events.emit(pn.message_ack,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(pn.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const r=f8(t.id,!0);await this.provider.connection.send(r)}unregisterProviderListeners(){this.provider.off(Xi.payload,this.onPayloadHandler),this.provider.off(Xi.connect,this.onConnectHandler),this.provider.off(Xi.disconnect,this.onDisconnectHandler),this.provider.off(Xi.error,this.onProviderErrorHandler)}async registerEventListeners(){this.events.on(pn.connection_stalled,()=>{this.restartTransport().catch(r=>this.logger.error(r))});let t=await SS();kJ(async r=>{this.initialized&&t!==r&&(t=r,r?await this.restartTransport().catch(n=>this.logger.error(n)):(this.hasExperiencedNetworkDisruption=!0,await this.transportClose().catch(n=>this.logger.error(n))))})}onProviderDisconnect(){this.events.emit(pn.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout(async()=>{await this.restartTransport().catch(t=>this.logger.error(t))},dt.toMiliseconds(fZ)))}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectionAttemptInProgress)return await new Promise(t=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),t())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var bMe=Object.defineProperty,H$=Object.getOwnPropertySymbols,wMe=Object.prototype.hasOwnProperty,_Me=Object.prototype.propertyIsEnumerable,z$=(e,t,r)=>t in e?bMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V$=(e,t)=>{for(var r in t||(t={}))wMe.call(t,r)&&z$(e,r,t[r]);if(H$)for(var r of H$(t))_Me.call(t,r)&&z$(e,r,t[r]);return e};class rg extends eAe{constructor(t,r,n,o=hs,i=void 0){super(t,r,n,o),this.core=t,this.logger=r,this.name=n,this.map=new Map,this.version=pZ,this.cached=[],this.initialized=!1,this.storagePrefix=hs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!$n(a)?this.map.set(this.getKey(a),a):fJ(a)?this.map.set(a.id,a):dJ(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,s)=>{this.isInitialized(),this.map.has(a)?await this.update(a,s):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:s}),this.map.set(a,s),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(s=>Object.keys(a).every(c=>IIe(s[c],a[c]))):this.values),this.update=async(a,s)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:s});const c=V$(V$({},this.getData(a)),s);this.map.set(a,c),await this.persist()},this.delete=async(a,s)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:s}),this.map.delete(a),await this.persist())},this.logger=Ot.generateChildLogger(r,this.name),this.storagePrefix=o,this.getKey=i}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const r=this.map.get(t);if(!r){const{message:n}=nt("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:r}=nt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class $Z{constructor(t,r){this.core=t,this.logger=r,this.name=bZ,this.version=wZ,this.events=new UK,this.initialized=!1,this.storagePrefix=hs,this.ignoredPayloadTypes=[Uc],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=_b(),o=await this.core.crypto.setSymKey(n),i=Yo(dt.FIVE_MINUTES),a={protocol:g8},s={topic:o,expiry:i,relay:a,active:!1},c=eJ({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:a});return await this.pairings.set(o,s),await this.core.relayer.subscribe(o),this.core.expirer.set(o,i),{topic:o,uri:c}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:i,relay:a}=bS(n.uri);let s;if(this.pairings.keys.includes(o)&&(s=this.pairings.get(o),s.active))throw new Error(`Pairing already exists: ${o}. Please try again with a new connection URI.`);const c=Yo(dt.FIVE_MINUTES),l={topic:o,relay:a,expiry:c,active:!1};return await this.pairings.set(o,l),this.core.expirer.set(o,c),n.activatePairing&&await this.activate({topic:o}),this.events.emit(hf.create,l),this.core.crypto.keychain.has(o)||(await this.core.crypto.setSymKey(i,o),await this.core.relayer.subscribe(o,{relay:a})),l},this.activate=async({topic:n})=>{this.isInitialized();const o=Yo(dt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const i=await this.sendRequest(o,"wc_pairingPing",{}),{done:a,resolve:s,reject:c}=Ol();this.events.once(wr("pairing_ping",i),({error:l})=>{l?c(l):s()}),await a()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",Ar("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,i)=>{const a=Mf(o,i),s=await this.core.crypto.encode(n,a),c=Wu[o].req;return this.core.history.set(n,a),this.core.relayer.publish(n,s,c),a.id},this.sendResult=async(n,o,i)=>{const a=f8(n,i),s=await this.core.crypto.encode(o,a),c=await this.core.history.get(o,n),l=Wu[c.request.method].res;await this.core.relayer.publish(o,s,l),await this.core.history.resolve(a)},this.sendError=async(n,o,i)=>{const a=d8(n,i),s=await this.core.crypto.encode(o,a),c=await this.core.history.get(o,n),l=Wu[c.request.method]?Wu[c.request.method].res:Wu.unregistered_method.res;await this.core.relayer.publish(o,s,l),await this.core.history.resolve(a)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,Ar("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>Va(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:i}=n;switch(i.method){case"wc_pairingPing":return this.onPairingPingRequest(o,i);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,i);default:return this.onUnknownRpcMethodRequest(o,i)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:i}=n,a=(await this.core.history.get(o,i.id)).request.method;switch(a){case"wc_pairingPing":return this.onPairingPingResponse(o,i);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,o)=>{const{id:i}=o;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.events.emit(hf.ping,{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,o)=>{const{id:i}=o;setTimeout(()=>{Ua(o)?this.events.emit(wr("pairing_ping",i),{}):Ai(o)&&this.events.emit(wr("pairing_ping",i),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:i}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit(hf.delete,{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:i,method:a}=o;try{if(this.registeredMethods.includes(a))return;const s=Ar("WC_METHOD_UNSUPPORTED",a);await this.sendError(i,n,s),this.logger.error(s)}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(Ar("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{var o;if(!Hn(n)){const{message:a}=nt("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(a)}if(!uJ(n.uri)){const{message:a}=nt("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(a)}const i=bS(n.uri);if(!((o=i==null?void 0:i.relay)!=null&&o.protocol)){const{message:a}=nt("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(a)}if(!(i!=null&&i.symKey)){const{message:a}=nt("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(a)}},this.isValidPing=async n=>{if(!Hn(n)){const{message:i}=nt("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!Hn(n)){const{message:i}=nt("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!Rr(n,!1)){const{message:o}=nt("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=nt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(Va(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=nt("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=t,this.logger=Ot.generateChildLogger(r,this.name),this.pairings=new rg(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Ot.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(pn.message,async t=>{const{topic:r,message:n}=t;if(!this.pairings.keys.includes(r)||this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(r,n);try{h8(o)?(this.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):u2(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:r,payload:o}),this.core.history.delete(r,o.id))}catch(i){this.logger.error(i)}})}registerExpirerEvents(){this.core.expirer.on(_o.expired,async t=>{const{topic:r}=i8(t.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit(hf.expire,{topic:r}))})}}class DZ extends J9e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.records=new Map,this.events=new Vi.EventEmitter,this.name=_Z,this.version=xZ,this.cached=[],this.initialized=!1,this.storagePrefix=hs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,i)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:i}),this.records.has(o.id))return;const a={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:i,expiry:Yo(dt.THIRTY_DAYS)};this.records.set(a.id,a),this.events.emit(xi.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=Ai(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(xi.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(i=>{if(i.topic===n){if(typeof o<"u"&&i.id!==o)return;this.records.delete(i.id),this.events.emit(xi.deleted,i)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Ot.generateChildLogger(r,this.name)}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:Mf(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(n)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const r=this.records.get(t);if(!r){const{message:n}=nt("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(xi.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:r}=nt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(xi.created,t=>{const r=xi.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(xi.updated,t=>{const r=xi.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(xi.deleted,t=>{const r=xi.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.core.heartbeat.on(Pd.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(t=>{dt.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.delete(t.topic,t.id))})}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class RZ extends rAe{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.expirations=new Map,this.events=new Vi.EventEmitter,this.name=SZ,this.version=EZ,this.cached=[],this.initialized=!1,this.storagePrefix=hs,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const i=this.formatTarget(n),a={target:i,expiry:o};this.expirations.set(i,a),this.checkExpiry(i,a),this.events.emit(_o.created,{target:i,expiration:a})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),i=this.getExpiration(o);this.expirations.delete(o),this.events.emit(_o.deleted,{target:o,expiration:i})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Ot.generateChildLogger(r,this.name)}get context(){return Ot.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return WY(t);if(typeof t=="number")return GY(t);const{message:r}=nt("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(r)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(_o.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:r}=nt("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const r=this.expirations.get(t);if(!r){const{message:n}=nt("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(t,r){const{expiry:n}=r;dt.toMiliseconds(n)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(_o.expired,{target:t,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(Pd.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(_o.created,t=>{const r=_o.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(_o.expired,t=>{const r=_o.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(_o.deleted,t=>{const r=_o.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}}}class NZ extends nAe{constructor(t,r){super(t,r),this.projectId=t,this.logger=r,this.name=Cv,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=async n=>{if(this.verifyDisabled||vu()||!yu())return;const o=this.getVerifyUrl(n==null?void 0:n.verifyUrl);this.verifyUrl!==o&&this.removeIframe(),this.verifyUrl=o;try{await this.createIframe()}catch(i){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(i)}if(!this.initialized){this.removeIframe(),this.verifyUrl=Pb;try{await this.createIframe()}catch(i){this.logger.info(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.info(i),this.verifyDisabled=!0}}},this.register=async n=>{this.initialized?this.sendPost(n.attestationId):(this.addToQueue(n.attestationId),await this.init())},this.resolve=async n=>{if(this.isDevEnv)return"";const o=this.getVerifyUrl(n==null?void 0:n.verifyUrl);let i;try{i=await this.fetchAttestation(n.attestationId,o)}catch(a){this.logger.info(`failed to resolve attestation: ${n.attestationId} from url: ${o}`),this.logger.info(a),i=await this.fetchAttestation(n.attestationId,Pb)}return i},this.fetchAttestation=async(n,o)=>{this.logger.info(`resolving attestation: ${n} from url: ${o}`);const i=this.startAbortTimer(dt.ONE_SECOND*2),a=await fetch(`${o}/attestation/${n}`,{signal:this.abortController.signal});return clearTimeout(i),a.status===200?await a.json():void 0},this.addToQueue=n=>{this.queue.push(n)},this.processQueue=()=>{this.queue.length!==0&&(this.queue.forEach(n=>this.sendPost(n)),this.queue=[])},this.sendPost=n=>{var o;try{if(!this.iframe)return;(o=this.iframe.contentWindow)==null||o.postMessage(n,"*"),this.logger.info(`postMessage sent: ${n} ${this.verifyUrl}`)}catch{}},this.createIframe=async()=>{let n;const o=i=>{i.data==="verify_ready"&&(this.initialized=!0,this.processQueue(),window.removeEventListener("message",o),n())};await Promise.race([new Promise(i=>{if(document.getElementById(Cv))return i();window.addEventListener("message",o);const a=document.createElement("iframe");a.id=Cv,a.src=`${this.verifyUrl}/${this.projectId}`,a.style.display="none",document.body.append(a),this.iframe=a,n=i}),new Promise((i,a)=>setTimeout(()=>{window.removeEventListener("message",o),a("verify iframe load timeout")},dt.toMiliseconds(dt.FIVE_SECONDS)))])},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=n=>{let o=n||Dl;return CZ.includes(o)||(this.logger.info(`verify url: ${o}, not included in trusted list, assigning default: ${Dl}`),o=Dl),o},this.logger=Ot.generateChildLogger(r,this.name),this.verifyUrl=Dl,this.abortController=new AbortController,this.isDevEnv=c2()&&{}.IS_VITEST}get context(){return Ot.getLoggerContext(this.logger)}startAbortTimer(t){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),dt.toMiliseconds(t))}}class BZ extends oAe{constructor(t,r){super(t,r),this.projectId=t,this.logger=r,this.context=PZ,this.registerDeviceToken=async n=>{const{clientId:o,token:i,notificationType:a,enableEncrypted:s=!1}=n,c=`${AZ}/${this.projectId}/clients`;await $Ie(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:o,type:a,token:i,always_raw:s})})},this.logger=Ot.generateChildLogger(r,this.context)}}var xMe=Object.defineProperty,q$=Object.getOwnPropertySymbols,SMe=Object.prototype.hasOwnProperty,EMe=Object.prototype.propertyIsEnumerable,W$=(e,t,r)=>t in e?xMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G$=(e,t)=>{for(var r in t||(t={}))SMe.call(t,r)&&W$(e,r,t[r]);if(q$)for(var r of q$(t))EMe.call(t,r)&&W$(e,r,t[r]);return e};class h2 extends Y9e{constructor(t){super(t),this.protocol=p8,this.version=ZJ,this.name=d2,this.events=new Vi.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||m8,this.customStoragePrefix=t!=null&&t.customStoragePrefix?`:${t.customStoragePrefix}`:"";const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Ot.pino(Ot.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||XJ.logger}));this.logger=Ot.generateChildLogger(r,this.name),this.heartbeat=new Pd.HeartBeat,this.crypto=new IZ(this,this.logger,t==null?void 0:t.keychain),this.history=new DZ(this,this.logger),this.expirer=new RZ(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new lS(G$(G$({},QJ),t==null?void 0:t.storageOptions)),this.relayer=new kZ({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new $Z(this,this.logger),this.verify=new NZ(this.projectId||"",this.logger),this.echoClient=new BZ(this.projectId||"",this.logger)}static async init(t){const r=new h2(t);await r.initialize();const n=await r.crypto.getClientId();return await r.storage.setItem(gZ,n),r}get context(){return Ot.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}}const FZ=h2,CMe=Object.freeze(Object.defineProperty({__proto__:null,CORE_CONTEXT:d2,CORE_DEFAULT:XJ,CORE_PROTOCOL:p8,CORE_STORAGE_OPTIONS:QJ,CORE_STORAGE_PREFIX:hs,CORE_VERSION:ZJ,CRYPTO_CLIENT_SEED:PS,CRYPTO_CONTEXT:eZ,CRYPTO_JWT_TTL:tZ,Core:FZ,Crypto:IZ,ECHO_CONTEXT:PZ,ECHO_URL:AZ,EXPIRER_CONTEXT:SZ,EXPIRER_DEFAULT_TTL:sMe,EXPIRER_EVENTS:_o,EXPIRER_STORAGE_VERSION:EZ,EchoClient:BZ,Expirer:RZ,HISTORY_CONTEXT:_Z,HISTORY_EVENTS:xi,HISTORY_STORAGE_VERSION:xZ,JsonRpcHistory:DZ,KEYCHAIN_CONTEXT:rZ,KEYCHAIN_STORAGE_VERSION:nZ,KeyChain:OZ,MESSAGES_CONTEXT:oZ,MESSAGES_STORAGE_VERSION:iZ,MessageTracker:TZ,PAIRING_CONTEXT:bZ,PAIRING_DEFAULT_TTL:aMe,PAIRING_EVENTS:hf,PAIRING_RPC_OPTS:Wu,PAIRING_STORAGE_VERSION:wZ,PENDING_SUB_RESOLUTION_TIMEOUT:yZ,PUBLISHER_CONTEXT:sZ,PUBLISHER_DEFAULT_TTL:aZ,Pairing:$Z,RELAYER_CONTEXT:lZ,RELAYER_DEFAULT_LOGGER:cZ,RELAYER_DEFAULT_PROTOCOL:g8,RELAYER_DEFAULT_RELAY_URL:m8,RELAYER_EVENTS:pn,RELAYER_FAILOVER_RELAY_URL:AS,RELAYER_PROVIDER_EVENTS:Xi,RELAYER_RECONNECT_TIMEOUT:fZ,RELAYER_SDK_VERSION:dZ,RELAYER_STORAGE_OPTIONS:oMe,RELAYER_SUBSCRIBER_SUFFIX:uZ,RELAYER_TRANSPORT_CUTOFF:hZ,Relayer:kZ,STORE_STORAGE_VERSION:pZ,SUBSCRIBER_CONTEXT:mZ,SUBSCRIBER_DEFAULT_TTL:iMe,SUBSCRIBER_EVENTS:Ko,SUBSCRIBER_STORAGE_VERSION:vZ,Store:rg,Subscriber:MZ,TRUSTED_VERIFY_URLS:CZ,VERIFY_CONTEXT:Cv,VERIFY_FALLBACK_SERVER:Pb,VERIFY_SERVER:Dl,Verify:NZ,WALLETCONNECT_CLIENT_ID:gZ,default:h2},Symbol.toStringTag,{value:"Module"})),v8="wc",y8=2,b8="client",p2=`${v8}@${y8}:${b8}:`,Pv={name:b8,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},PMe={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire"},AMe={database:":memory:"},OS="WALLETCONNECT_DEEPLINK_CHOICE",OMe={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},IMe="history",TMe="0.3",jZ="proposal",MMe=dt.THIRTY_DAYS,LZ="Proposal expired",UZ="session",Xh=dt.SEVEN_DAYS,HZ="engine",Gu={wc_sessionPropose:{req:{ttl:dt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:dt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:dt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:dt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:dt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:dt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:dt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:dt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:dt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:dt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:dt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:dt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:dt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:dt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:dt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:dt.THIRTY_SECONDS,prompt:!1,tag:1115}}},Av={min:dt.FIVE_MINUTES,max:dt.SEVEN_DAYS},Qi={idle:"IDLE",active:"ACTIVE"},zZ="request",VZ=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var kMe=Object.defineProperty,$Me=Object.defineProperties,DMe=Object.getOwnPropertyDescriptors,K$=Object.getOwnPropertySymbols,RMe=Object.prototype.hasOwnProperty,NMe=Object.prototype.propertyIsEnumerable,Y$=(e,t,r)=>t in e?kMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qn=(e,t)=>{for(var r in t||(t={}))RMe.call(t,r)&&Y$(e,r,t[r]);if(K$)for(var r of K$(t))NMe.call(t,r)&&Y$(e,r,t[r]);return e},Eh=(e,t)=>$Me(e,DMe(t));class BMe extends aAe{constructor(t){super(t),this.name=HZ,this.events=new UK,this.initialized=!1,this.ignoredPayloadTypes=[Uc],this.requestQueue={state:Qi.idle,queue:[]},this.sessionRequestQueue={state:Qi.idle,queue:[]},this.requestQueueDelay=dt.ONE_SECOND,this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),this.client.core.pairing.register({methods:Object.keys(Gu)}),this.initialized=!0,setTimeout(()=>{this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},dt.toMiliseconds(this.requestQueueDelay)))},this.connect=async r=>{await this.isInitialized();const n=Eh(Qn({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,relays:c}=n;let l=o,u,d=!1;if(l&&(d=this.client.core.pairing.pairings.get(l).active),!l||!d){const{topic:$,uri:R}=await this.client.core.pairing.create();l=$,u=R}const p=await this.client.core.crypto.generateKeyPair(),m=Qn({requiredNamespaces:i,optionalNamespaces:a,relays:c??[{protocol:g8}],proposer:{publicKey:p,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:w,resolve:A,done:T}=Ol(dt.FIVE_MINUTES,LZ);if(this.events.once(wr("session_connect"),async({error:$,session:R})=>{if($)w($);else if(R){R.self.publicKey=p;const j=Eh(Qn({},R),{requiredNamespaces:R.requiredNamespaces,optionalNamespaces:R.optionalNamespaces});await this.client.session.set(R.topic,j),await this.setExpiry(R.topic,R.expiry),l&&await this.client.core.pairing.updateMetadata({topic:l,metadata:R.peer.metadata}),A(j)}}),!l){const{message:$}=nt("NO_MATCHING_KEY",`connect() pairing topic: ${l}`);throw new Error($)}const O=await this.sendRequest({topic:l,method:"wc_sessionPropose",params:m}),P=Yo(dt.FIVE_MINUTES);return await this.setProposal(O,Qn({id:O,expiry:P},m)),{uri:u,approval:T}},this.pair=async r=>(await this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{await this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:o,namespaces:i,sessionProperties:a}=r,s=this.client.proposal.get(n);let{pairingTopic:c,proposer:l,requiredNamespaces:u,optionalNamespaces:d}=s;c=c||"",Hl(u)||(u=oJ(i,"approve()"));const p=await this.client.core.crypto.generateKeyPair(),m=l.publicKey,w=await this.client.core.crypto.generateSharedKey(p,m);c&&n&&(await this.client.core.pairing.updateMetadata({topic:c,metadata:l.metadata}),await this.sendResult({id:n,topic:c,result:{relay:{protocol:o??"irn"},responderPublicKey:p}}),await this.client.proposal.delete(n,Ar("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:c}));const A=Qn({relay:{protocol:o??"irn"},namespaces:i,requiredNamespaces:u,optionalNamespaces:d,pairingTopic:c,controller:{publicKey:p,metadata:this.client.metadata},expiry:Yo(Xh)},a&&{sessionProperties:a});await this.client.core.relayer.subscribe(w),await this.sendRequest({topic:w,method:"wc_sessionSettle",params:A,throwOnFailedPublish:!0});const T=Eh(Qn({},A),{topic:w,pairingTopic:c,acknowledged:!1,self:A.controller,peer:{publicKey:l.publicKey,metadata:l.metadata},controller:p});return await this.client.session.set(w,T),await this.setExpiry(w,Yo(Xh)),{topic:w,acknowledged:()=>new Promise(O=>setTimeout(()=>O(this.client.session.get(w)),500))}},this.reject=async r=>{await this.isInitialized(),await this.isValidReject(r);const{id:n,reason:o}=r,{pairingTopic:i}=this.client.proposal.get(n);i&&(await this.sendError(n,i,o),await this.client.proposal.delete(n,Ar("USER_DISCONNECTED")))},this.update=async r=>{await this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:o}=r,i=await this.sendRequest({topic:n,method:"wc_sessionUpdate",params:{namespaces:o}}),{done:a,resolve:s,reject:c}=Ol();return this.events.once(wr("session_update",i),({error:l})=>{l?c(l):s()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:a}},this.extend=async r=>{await this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,o=await this.sendRequest({topic:n,method:"wc_sessionExtend",params:{}}),{done:i,resolve:a,reject:s}=Ol();return this.events.once(wr("session_extend",o),({error:c})=>{c?s(c):a()}),await this.setExpiry(n,Yo(Xh)),{acknowledged:i}},this.request=async r=>{await this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:o,topic:i,expiry:a}=r,s=u8(),{done:c,resolve:l,reject:u}=Ol(a,"Request expired. Please try again.");return this.events.once(wr("session_request",s),({error:d,result:p})=>{d?u(d):l(p)}),await Promise.all([new Promise(async d=>{await this.sendRequest({clientRpcId:s,topic:i,method:"wc_sessionRequest",params:{request:o,chainId:n},expiry:a,throwOnFailedPublish:!0}).catch(p=>u(p)),this.client.events.emit("session_request_sent",{topic:i,request:o,chainId:n,id:s}),d()}),new Promise(async d=>{const p=await YY(this.client.core.storage,OS);KY({id:s,topic:i,wcDeepLink:p}),d()}),c()]).then(d=>d[2])},this.respond=async r=>{await this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:o}=r,{id:i}=o;Ua(o)?await this.sendResult({id:i,topic:n,result:o.result,throwOnFailedPublish:!0}):Ai(o)&&await this.sendError(i,n,o.error),this.cleanupAfterResponse(r)},this.ping=async r=>{await this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const o=await this.sendRequest({topic:n,method:"wc_sessionPing",params:{}}),{done:i,resolve:a,reject:s}=Ol();this.events.once(wr("session_ping",o),({error:c})=>{c?s(c):a()}),await i()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{await this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:o,chainId:i}=r;await this.sendRequest({topic:n,method:"wc_sessionEvent",params:{event:o,chainId:i}})},this.disconnect=async r=>{await this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest({topic:n,method:"wc_sessionDelete",params:Ar("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>cJ(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async r=>{if(r.pairingTopic)try{const n=this.client.core.pairing.pairings.get(r.pairingTopic),o=this.client.core.pairing.pairings.getAll().filter(i=>{var a,s;return((a=i.peerMetadata)==null?void 0:a.url)&&((s=i.peerMetadata)==null?void 0:s.url)===r.peer.metadata.url&&i.topic&&i.topic!==n.topic});if(o.length===0)return;this.client.logger.info(`Cleaning up ${o.length} duplicate pairing(s)`),await Promise.all(o.map(i=>this.client.core.pairing.disconnect({topic:i.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(r,n)=>{const{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),this.client.session.delete(r,Ar("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),n||this.client.core.expirer.del(r),this.client.core.storage.removeItem(OS).catch(i=>this.client.logger.warn(i)),this.getPendingSessionRequests().forEach(i=>{i.topic===r&&this.deletePendingSessionRequest(i.id,Ar("USER_DISCONNECTED"))})},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,Ar("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),o?Promise.resolve():this.client.core.expirer.del(r)]),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(i=>i.id!==r),o&&(this.sessionRequestQueue.state=Qi.idle)},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=Gu.wc_sessionRequest.req.ttl,{id:o,topic:i,params:a,verifyContext:s}=r;await this.client.pendingRequest.set(o,{id:o,topic:i,params:a,verifyContext:s}),n&&this.client.core.expirer.set(o,Yo(n))},this.sendRequest=async r=>{const{topic:n,method:o,params:i,expiry:a,relayRpcId:s,clientRpcId:c,throwOnFailedPublish:l}=r,u=Mf(o,i,c);if(yu()&&VZ.includes(o)){const m=Ul(JSON.stringify(u));this.client.core.verify.register({attestationId:m})}const d=await this.client.core.crypto.encode(n,u),p=Gu[o].req;return a&&(p.ttl=a),s&&(p.id=s),this.client.core.history.set(n,u),l?(p.internal=Eh(Qn({},p.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(n,d,p)):this.client.core.relayer.publish(n,d,p).catch(m=>this.client.logger.error(m)),u.id},this.sendResult=async r=>{const{id:n,topic:o,result:i,throwOnFailedPublish:a}=r,s=f8(n,i),c=await this.client.core.crypto.encode(o,s),l=await this.client.core.history.get(o,n),u=Gu[l.request.method].res;a?(u.internal=Eh(Qn({},u.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(o,c,u)):this.client.core.relayer.publish(o,c,u).catch(d=>this.client.logger.error(d)),await this.client.core.history.resolve(s)},this.sendError=async(r,n,o)=>{const i=d8(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),c=Gu[s.request.method].res;this.client.core.relayer.publish(n,a,c),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(o=>{Va(o.expiry)&&r.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{Va(o.expiry)&&n.push(o.id)}),await Promise.all([...r.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=async r=>{this.requestQueue.queue.push(r),await this.processRequestsQueue()},this.processRequestsQueue=async()=>{if(this.requestQueue.state===Qi.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=Qi.active;const r=this.requestQueue.queue.shift();if(r)try{this.processRequest(r),await new Promise(n=>setTimeout(n,300))}catch(n){this.client.logger.warn(n)}}this.requestQueue.state=Qi.idle},this.processRequest=r=>{const{topic:n,payload:o}=r,i=o.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:o}=r,i=(await this.client.core.history.get(n,o.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onRelayEventUnknownPayload=r=>{const{topic:n}=r,{message:o}=nt("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(o)},this.onSessionProposeRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidConnect(Qn({},n.params));const a=Yo(dt.FIVE_MINUTES),s=Qn({id:i,pairingTopic:r,expiry:a},o);await this.setProposal(i,s);const c=Ul(JSON.stringify(n)),l=await this.getVerifyContext(c,s.proposer.metadata);this.client.events.emit("session_proposal",{id:i,params:s,verifyContext:l})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionProposeResponse=async(r,n)=>{const{id:o}=n;if(Ua(n)){const{result:i}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});const a=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const s=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const c=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:c});const l=await this.client.core.crypto.generateSharedKey(s,c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:l});const u=await this.client.core.relayer.subscribe(l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:r})}else Ai(n)&&(await this.client.proposal.delete(o,Ar("USER_DISCONNECTED")),this.events.emit(wr("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidSessionSettleRequest(i);const{relay:a,controller:s,expiry:c,namespaces:l,requiredNamespaces:u,optionalNamespaces:d,sessionProperties:p,pairingTopic:m}=n.params,w=Qn({topic:r,relay:a,expiry:c,namespaces:l,acknowledged:!0,pairingTopic:m,requiredNamespaces:u,optionalNamespaces:d,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},p&&{sessionProperties:p});await this.sendResult({id:n.id,topic:r,result:!0}),this.events.emit(wr("session_connect"),{session:w}),this.cleanupDuplicatePairings(w)}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionSettleResponse=async(r,n)=>{const{id:o}=n;Ua(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(wr("session_approve",o),{})):Ai(n)&&(await this.client.session.delete(r,Ar("USER_DISCONNECTED")),this.events.emit(wr("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:o,id:i}=n;try{const a=`${r}_session_update`,s=Zh.get(a);if(s&&this.isRequestOutOfSync(s,i)){this.client.logger.info(`Discarding out of sync request - ${i}`);return}this.isValidUpdate(Qn({topic:r},o)),await this.client.session.update(r,{namespaces:o.namespaces}),await this.sendResult({id:i,topic:r,result:!0}),this.client.events.emit("session_update",{id:i,topic:r,params:o}),Zh.set(a,i)}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.isRequestOutOfSync=(r,n)=>parseInt(n.toString().slice(0,-3))<=parseInt(r.toString().slice(0,-3)),this.onSessionUpdateResponse=(r,n)=>{const{id:o}=n;Ua(n)?this.events.emit(wr("session_update",o),{}):Ai(n)&&this.events.emit(wr("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:o}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,Yo(Xh)),await this.sendResult({id:o,topic:r,result:!0}),this.client.events.emit("session_extend",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,n)=>{const{id:o}=n;Ua(n)?this.events.emit(wr("session_extend",o),{}):Ai(n)&&this.events.emit(wr("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:o}=n;try{this.isValidPing({topic:r}),await this.sendResult({id:o,topic:r,result:!0}),this.client.events.emit("session_ping",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,n)=>{const{id:o}=n;setTimeout(()=>{Ua(n)?this.events.emit(wr("session_ping",o),{}):Ai(n)&&this.events.emit(wr("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),await Promise.all([new Promise(i=>{this.client.core.relayer.once(pn.publish,async()=>{i(await this.deleteSession(r))})}),this.sendResult({id:o,topic:r,result:!0})]),this.client.events.emit("session_delete",{id:o,topic:r})}catch(i){this.client.logger.error(i)}},this.onSessionRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidRequest(Qn({topic:r},i));const a=Ul(JSON.stringify(Mf("wc_sessionRequest",i,o))),s=this.client.session.get(r),c=await this.getVerifyContext(a,s.peer.metadata),l={id:o,topic:r,params:i,verifyContext:c};await this.setPendingSessionRequest(l),this.addSessionRequestToSessionRequestQueue(l),this.processSessionRequestQueue()}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionRequestResponse=(r,n)=>{const{id:o}=n;Ua(n)?this.events.emit(wr("session_request",o),{result:n.result}):Ai(n)&&this.events.emit(wr("session_request",o),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:o,params:i}=n;try{const a=`${r}_session_event_${i.event.name}`,s=Zh.get(a);if(s&&this.isRequestOutOfSync(s,o)){this.client.logger.info(`Discarding out of sync request - ${o}`);return}this.isValidEmit(Qn({topic:r},i)),this.client.events.emit("session_event",{id:o,topic:r,params:i}),Zh.set(a,o)}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.addSessionRequestToSessionRequestQueue=r=>{this.sessionRequestQueue.queue.push(r)},this.cleanupAfterResponse=r=>{this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=Qi.idle,this.processSessionRequestQueue()},dt.toMiliseconds(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===Qi.active){this.client.logger.info("session request queue is already active.");return}const r=this.sessionRequestQueue.queue[0];if(!r){this.client.logger.info("session request queue is empty.");return}try{this.sessionRequestQueue.state=Qi.active,this.client.events.emit("session_request",r)}catch(n){this.client.logger.error(n)}},this.onPairingCreated=r=>{if(r.active)return;const n=this.client.proposal.getAll().find(o=>o.pairingTopic===r.topic);n&&this.onSessionProposeRequest(r.topic,Mf("wc_sessionPropose",{requiredNamespaces:n.requiredNamespaces,optionalNamespaces:n.optionalNamespaces,relays:n.relays,proposer:n.proposer,sessionProperties:n.sessionProperties},n.id))},this.isValidConnect=async r=>{if(!Hn(r)){const{message:c}=nt("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(c)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:i,sessionProperties:a,relays:s}=r;if($n(n)||await this.isValidPairingTopic(n),!wJ(s,!0)){const{message:c}=nt("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(c)}!$n(o)&&Hl(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!$n(i)&&Hl(i)!==0&&this.validateNamespaces(i,"optionalNamespaces"),$n(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(r,n)=>{const o=bJ(r,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async r=>{if(!Hn(r))throw new Error(nt("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:o,relayProtocol:i,sessionProperties:a}=r;await this.isValidProposalId(n);const s=this.client.proposal.get(n),c=xp(o,"approve()");if(c)throw new Error(c.message);const l=Eb(s.requiredNamespaces,o,"approve()");if(l)throw new Error(l.message);if(!Rr(i,!0)){const{message:u}=nt("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(u)}$n(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async r=>{if(!Hn(r)){const{message:i}=nt("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(i)}const{id:n,reason:o}=r;if(await this.isValidProposalId(n),!xJ(o)){const{message:i}=nt("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidSessionSettleRequest=r=>{if(!Hn(r)){const{message:l}=nt("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(l)}const{relay:n,controller:o,namespaces:i,expiry:a}=r;if(!c8(n)){const{message:l}=nt("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(l)}const s=hJ(o,"onSessionSettleRequest()");if(s)throw new Error(s.message);const c=xp(i,"onSessionSettleRequest()");if(c)throw new Error(c.message);if(Va(a)){const{message:l}=nt("EXPIRED","onSessionSettleRequest()");throw new Error(l)}},this.isValidUpdate=async r=>{if(!Hn(r)){const{message:c}=nt("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(c)}const{topic:n,namespaces:o}=r;await this.isValidSessionTopic(n);const i=this.client.session.get(n),a=xp(o,"update()");if(a)throw new Error(a.message);const s=Eb(i.requiredNamespaces,o,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!Hn(r)){const{message:o}=nt("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!Hn(r)){const{message:c}=nt("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(c)}const{topic:n,request:o,chainId:i,expiry:a}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!xS(s,i)){const{message:c}=nt("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(c)}if(!SJ(o)){const{message:c}=nt("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(c)}if(!PJ(s,i,o.method)){const{message:c}=nt("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(c)}if(a&&!OJ(a,Av)){const{message:c}=nt("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${Av.min} and ${Av.max}`);throw new Error(c)}},this.isValidRespond=async r=>{var n;if(!Hn(r)){const{message:a}=nt("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(a)}const{topic:o,response:i}=r;try{await this.isValidSessionTopic(o)}catch(a){throw(n=r==null?void 0:r.response)!=null&&n.id&&this.cleanupAfterResponse(r),a}if(!EJ(i)){const{message:a}=nt("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw new Error(a)}},this.isValidPing=async r=>{if(!Hn(r)){const{message:o}=nt("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!Hn(r)){const{message:s}=nt("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(s)}const{topic:n,event:o,chainId:i}=r;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!xS(a,i)){const{message:s}=nt("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(s)}if(!CJ(o)){const{message:s}=nt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}if(!AJ(a,i,o.name)){const{message:s}=nt("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}},this.isValidDisconnect=async r=>{if(!Hn(r)){const{message:o}=nt("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(r,n)=>{const o={verified:{verifyUrl:n.verifyUrl||Dl,validation:"UNKNOWN",origin:n.url||""}};try{const i=await this.client.core.verify.resolve({attestationId:r,verifyUrl:n.verifyUrl});i&&(o.verified.origin=i.origin,o.verified.isScam=i.isScam,o.verified.validation=i.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(i){this.client.logger.info(i)}return this.client.logger.info(`Verify context: ${JSON.stringify(o)}`),o},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(o=>{if(!Rr(o,!1)){const{message:i}=nt("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(i)}})}}async isInitialized(){if(!this.initialized){const{message:t}=nt("NOT_INITIALIZED",this.name);throw new Error(t)}await this.client.core.relayer.confirmOnlineStateOrThrow()}registerRelayerEvents(){this.client.core.relayer.on(pn.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(r,n);try{h8(o)?(this.client.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):u2(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:r,payload:o}),this.client.core.history.delete(r,o.id)):this.onRelayEventUnknownPayload({topic:r,payload:o})}catch(i){this.client.logger.error(i)}})}registerExpirerEvents(){this.client.core.expirer.on(_o.expired,async t=>{const{topic:r,id:n}=i8(t.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,nt("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}registerPairingEvents(){this.client.core.pairing.events.on(hf.create,t=>this.onPairingCreated(t))}isValidPairingTopic(t){if(!Rr(t,!1)){const{message:r}=nt("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:r}=nt("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(Va(this.client.core.pairing.pairings.get(t).expiry)){const{message:r}=nt("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}async isValidSessionTopic(t){if(!Rr(t,!1)){const{message:r}=nt("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(r)}if(!this.client.session.keys.includes(t)){const{message:r}=nt("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(r)}if(Va(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:r}=nt("EXPIRED",`session topic: ${t}`);throw new Error(r)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(Rr(t,!1)){const{message:r}=nt("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(r)}else{const{message:r}=nt("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(r)}}async isValidProposalId(t){if(!_J(t)){const{message:r}=nt("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(r)}if(!this.client.proposal.keys.includes(t)){const{message:r}=nt("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(r)}if(Va(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:r}=nt("EXPIRED",`proposal id: ${t}`);throw new Error(r)}}}class FMe extends rg{constructor(t,r){super(t,r,jZ,p2),this.core=t,this.logger=r}}class qZ extends rg{constructor(t,r){super(t,r,UZ,p2),this.core=t,this.logger=r}}class jMe extends rg{constructor(t,r){super(t,r,zZ,p2,n=>n.id),this.core=t,this.logger=r}}let WZ=class GZ extends iAe{constructor(t){super(t),this.protocol=v8,this.version=y8,this.name=Pv.name,this.events=new Vi.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(t==null?void 0:t.name)||Pv.name,this.metadata=(t==null?void 0:t.metadata)||FY();const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Ot.pino(Ot.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||Pv.logger}));this.core=(t==null?void 0:t.core)||new FZ(t),this.logger=Ot.generateChildLogger(r,this.name),this.session=new qZ(this.core,this.logger),this.proposal=new FMe(this.core,this.logger),this.pendingRequest=new jMe(this.core,this.logger),this.engine=new BMe(this)}static async init(t){const r=new GZ(t);return await r.initialize(),r}get context(){return Ot.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}};const LMe=qZ,UMe=WZ,HMe=Object.freeze(Object.defineProperty({__proto__:null,ENGINE_CONTEXT:HZ,ENGINE_QUEUE_STATES:Qi,ENGINE_RPC_OPTS:Gu,HISTORY_CONTEXT:IMe,HISTORY_EVENTS:OMe,HISTORY_STORAGE_VERSION:TMe,METHODS_TO_VERIFY:VZ,PROPOSAL_CONTEXT:jZ,PROPOSAL_EXPIRY:MMe,PROPOSAL_EXPIRY_MESSAGE:LZ,REQUEST_CONTEXT:zZ,SESSION_CONTEXT:UZ,SESSION_EXPIRY:Xh,SESSION_REQUEST_EXPIRY_BOUNDARIES:Av,SIGN_CLIENT_CONTEXT:b8,SIGN_CLIENT_DEFAULT:Pv,SIGN_CLIENT_EVENTS:PMe,SIGN_CLIENT_PROTOCOL:v8,SIGN_CLIENT_STORAGE_OPTIONS:AMe,SIGN_CLIENT_STORAGE_PREFIX:p2,SIGN_CLIENT_VERSION:y8,SessionStore:LMe,SignClient:UMe,WALLETCONNECT_DEEPLINK_CHOICE:OS,default:WZ},Symbol.toStringTag,{value:"Module"})),J$=zi(HMe),Z$=zi(oIe);var V5={},q5={},Ch={},W5={},G5={},X$;function g2(){return X$||(X$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_GAS_ALPH_AMOUNT=e.DEFAULT_GAS_ATTOALPH_AMOUNT=e.DEFAULT_GAS_PRICE=e.DEFAULT_GAS_AMOUNT=e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",e.DEFAULT_GAS_AMOUNT=2e4,e.DEFAULT_GAS_PRICE=10n**11n,e.DEFAULT_GAS_ATTOALPH_AMOUNT=BigInt(e.DEFAULT_GAS_AMOUNT)*e.DEFAULT_GAS_PRICE,e.DEFAULT_GAS_ALPH_AMOUNT=.002}(G5)),G5}var Ba={},Q$;function KZ(){if(Q$)return Ba;Q$=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.disableDebugMode=Ba.enableDebugMode=Ba.isDebugModeEnabled=void 0;let e=!1;function t(){return e}Ba.isDebugModeEnabled=t;function r(){e=!0}Ba.enableDebugMode=r;function n(){e=!1}return Ba.disableDebugMode=n,Ba}var K5={},Ph={},jn={};(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},r={};r.byteLength=u,r.toByteArray=p,r.fromByteArray=A;for(var n=[],o=[],i=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var R=P.indexOf("=");R===-1&&(R=$);var j=R===$?0:4-R%4;return[R,j]}function u(P){var $=l(P),R=$[0],j=$[1];return(R+j)*3/4-j}function d(P,$,R){return($+R)*3/4-R}function p(P){var $,R=l(P),j=R[0],I=R[1],b=new i(d(P,j,I)),N=0,V=I>0?j-4:j,Z;for(Z=0;Z>16&255,b[N++]=$>>8&255,b[N++]=$&255;return I===2&&($=o[P.charCodeAt(Z)]<<2|o[P.charCodeAt(Z+1)]>>4,b[N++]=$&255),I===1&&($=o[P.charCodeAt(Z)]<<10|o[P.charCodeAt(Z+1)]<<4|o[P.charCodeAt(Z+2)]>>2,b[N++]=$>>8&255,b[N++]=$&255),b}function m(P){return n[P>>18&63]+n[P>>12&63]+n[P>>6&63]+n[P&63]}function w(P,$,R){for(var j,I=[],b=$;bV?V:N+b));return j===1?($=P[R-1],I.push(n[$>>2]+n[$<<4&63]+"==")):j===2&&($=(P[R-2]<<8)+P[R-1],I.push(n[$>>10]+n[$>>4&63]+n[$<<2&63]+"=")),I.join("")}var T={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */T.read=function(P,$,R,j,I){var b,N,V=I*8-j-1,Z=(1<>1,_=-7,y=R?I-1:0,f=R?-1:1,h=P[$+y];for(y+=f,b=h&(1<<-_)-1,h>>=-_,_+=V;_>0;b=b*256+P[$+y],y+=f,_-=8);for(N=b&(1<<-_)-1,b>>=-_,_+=j;_>0;N=N*256+P[$+y],y+=f,_-=8);if(b===0)b=1-q;else{if(b===Z)return N?NaN:(h?-1:1)*(1/0);N=N+Math.pow(2,j),b=b-q}return(h?-1:1)*N*Math.pow(2,b-j)},T.write=function(P,$,R,j,I,b){var N,V,Z,q=b*8-I-1,_=(1<>1,f=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=j?0:b-1,x=j?1:-1,v=$<0||$===0&&1/$<0?1:0;for($=Math.abs($),isNaN($)||$===1/0?(V=isNaN($)?1:0,N=_):(N=Math.floor(Math.log($)/Math.LN2),$*(Z=Math.pow(2,-N))<1&&(N--,Z*=2),N+y>=1?$+=f/Z:$+=f*Math.pow(2,1-y),$*Z>=2&&(N++,Z/=2),N+y>=_?(V=0,N=_):N+y>=1?(V=($*Z-1)*Math.pow(2,I),N=N+y):(V=$*Math.pow(2,y-1)*Math.pow(2,I),N=0));I>=8;P[R+h]=V&255,h+=x,V/=256,I-=8);for(N=N<0;P[R+h]=N&255,h+=x,N/=256,q-=8);P[R+h-x]|=v*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(P){const $=r,R=T,j=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;P.Buffer=_,P.SlowBuffer=M,P.INSPECT_MAX_BYTES=50;const I=2147483647;P.kMaxLength=I;const{Uint8Array:b,ArrayBuffer:N,SharedArrayBuffer:V}=globalThis;_.TYPED_ARRAY_SUPPORT=Z(),!_.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Z(){try{const Q=new b(1),K={foo:function(){return 42}};return Object.setPrototypeOf(K,b.prototype),Object.setPrototypeOf(Q,K),Q.foo()===42}catch{return!1}}Object.defineProperty(_.prototype,"parent",{enumerable:!0,get:function(){if(_.isBuffer(this))return this.buffer}}),Object.defineProperty(_.prototype,"offset",{enumerable:!0,get:function(){if(_.isBuffer(this))return this.byteOffset}});function q(Q){if(Q>I)throw new RangeError('The value "'+Q+'" is invalid for option "size"');const K=new b(Q);return Object.setPrototypeOf(K,_.prototype),K}function _(Q,K,Y){if(typeof Q=="number"){if(typeof K=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(Q)}return y(Q,K,Y)}_.poolSize=8192;function y(Q,K,Y){if(typeof Q=="string")return v(Q,K);if(N.isView(Q))return k(Q);if(Q==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(Ge(Q,N)||Q&&Ge(Q.buffer,N)||typeof V<"u"&&(Ge(Q,V)||Q&&Ge(Q.buffer,V)))return E(Q,K,Y);if(typeof Q=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const se=Q.valueOf&&Q.valueOf();if(se!=null&&se!==Q)return _.from(se,K,Y);const _e=C(Q);if(_e)return _e;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]=="function")return _.from(Q[Symbol.toPrimitive]("string"),K,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}_.from=function(Q,K,Y){return y(Q,K,Y)},Object.setPrototypeOf(_.prototype,b.prototype),Object.setPrototypeOf(_,b);function f(Q){if(typeof Q!="number")throw new TypeError('"size" argument must be of type number');if(Q<0)throw new RangeError('The value "'+Q+'" is invalid for option "size"')}function h(Q,K,Y){return f(Q),Q<=0?q(Q):K!==void 0?typeof Y=="string"?q(Q).fill(K,Y):q(Q).fill(K):q(Q)}_.alloc=function(Q,K,Y){return h(Q,K,Y)};function x(Q){return f(Q),q(Q<0?0:g(Q)|0)}_.allocUnsafe=function(Q){return x(Q)},_.allocUnsafeSlow=function(Q){return x(Q)};function v(Q,K){if((typeof K!="string"||K==="")&&(K="utf8"),!_.isEncoding(K))throw new TypeError("Unknown encoding: "+K);const Y=re(Q,K)|0;let se=q(Y);const _e=se.write(Q,K);return _e!==Y&&(se=se.slice(0,_e)),se}function S(Q){const K=Q.length<0?0:g(Q.length)|0,Y=q(K);for(let se=0;se=I)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+I.toString(16)+" bytes");return Q|0}function M(Q){return+Q!=Q&&(Q=0),_.alloc(+Q)}_.isBuffer=function(K){return K!=null&&K._isBuffer===!0&&K!==_.prototype},_.compare=function(K,Y){if(Ge(K,b)&&(K=_.from(K,K.offset,K.byteLength)),Ge(Y,b)&&(Y=_.from(Y,Y.offset,Y.byteLength)),!_.isBuffer(K)||!_.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(K===Y)return 0;let se=K.length,_e=Y.length;for(let Se=0,Ee=Math.min(se,_e);Se_e.length?(_.isBuffer(Ee)||(Ee=_.from(Ee)),Ee.copy(_e,Se)):b.prototype.set.call(_e,Ee,Se);else if(_.isBuffer(Ee))Ee.copy(_e,Se);else throw new TypeError('"list" argument must be an Array of Buffers');Se+=Ee.length}return _e};function re(Q,K){if(_.isBuffer(Q))return Q.length;if(N.isView(Q)||Ge(Q,N))return Q.byteLength;if(typeof Q!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);const Y=Q.length,se=arguments.length>2&&arguments[2]===!0;if(!se&&Y===0)return 0;let _e=!1;for(;;)switch(K){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return $e(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return ze(Q).length;default:if(_e)return se?-1:$e(Q).length;K=(""+K).toLowerCase(),_e=!0}}_.byteLength=re;function W(Q,K,Y){let se=!1;if((K===void 0||K<0)&&(K=0),K>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,K>>>=0,Y<=K))return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return we(this,K,Y);case"utf8":case"utf-8":return me(this,K,Y);case"ascii":return be(this,K,Y);case"latin1":case"binary":return Ie(this,K,Y);case"base64":return ve(this,K,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oe(this,K,Y);default:if(se)throw new TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),se=!0}}_.prototype._isBuffer=!0;function ee(Q,K,Y){const se=Q[K];Q[K]=Q[Y],Q[Y]=se}_.prototype.swap16=function(){const K=this.length;if(K%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;YY&&(K+=" ... "),""},j&&(_.prototype[j]=_.prototype.inspect),_.prototype.compare=function(K,Y,se,_e,Se){if(Ge(K,b)&&(K=_.from(K,K.offset,K.byteLength)),!_.isBuffer(K))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof K);if(Y===void 0&&(Y=0),se===void 0&&(se=K?K.length:0),_e===void 0&&(_e=0),Se===void 0&&(Se=this.length),Y<0||se>K.length||_e<0||Se>this.length)throw new RangeError("out of range index");if(_e>=Se&&Y>=se)return 0;if(_e>=Se)return-1;if(Y>=se)return 1;if(Y>>>=0,se>>>=0,_e>>>=0,Se>>>=0,this===K)return 0;let Ee=Se-_e,Ve=se-Y;const Le=Math.min(Ee,Ve),Fe=this.slice(_e,Se),Qe=K.slice(Y,se);for(let Ne=0;Ne2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,qe(Y)&&(Y=_e?0:Q.length-1),Y<0&&(Y=Q.length+Y),Y>=Q.length){if(_e)return-1;Y=Q.length-1}else if(Y<0)if(_e)Y=0;else return-1;if(typeof K=="string"&&(K=_.from(K,se)),_.isBuffer(K))return K.length===0?-1:ie(Q,K,Y,se,_e);if(typeof K=="number")return K=K&255,typeof b.prototype.indexOf=="function"?_e?b.prototype.indexOf.call(Q,K,Y):b.prototype.lastIndexOf.call(Q,K,Y):ie(Q,[K],Y,se,_e);throw new TypeError("val must be string, number or Buffer")}function ie(Q,K,Y,se,_e){let Se=1,Ee=Q.length,Ve=K.length;if(se!==void 0&&(se=String(se).toLowerCase(),se==="ucs2"||se==="ucs-2"||se==="utf16le"||se==="utf-16le")){if(Q.length<2||K.length<2)return-1;Se=2,Ee/=2,Ve/=2,Y/=2}function Le(Qe,Ne){return Se===1?Qe[Ne]:Qe.readUInt16BE(Ne*Se)}let Fe;if(_e){let Qe=-1;for(Fe=Y;FeEe&&(Y=Ee-Ve),Fe=Y;Fe>=0;Fe--){let Qe=!0;for(let Ne=0;Ne_e&&(se=_e)):se=_e;const Se=K.length;se>Se/2&&(se=Se/2);let Ee;for(Ee=0;Ee>>0,isFinite(se)?(se=se>>>0,_e===void 0&&(_e="utf8")):(_e=se,se=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Se=this.length-Y;if((se===void 0||se>Se)&&(se=Se),K.length>0&&(se<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let Ee=!1;for(;;)switch(_e){case"hex":return le(this,K,Y,se);case"utf8":case"utf-8":return L(this,K,Y,se);case"ascii":case"latin1":case"binary":return te(this,K,Y,se);case"base64":return ae(this,K,Y,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,K,Y,se);default:if(Ee)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Ee=!0}},_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ve(Q,K,Y){return K===0&&Y===Q.length?$.fromByteArray(Q):$.fromByteArray(Q.slice(K,Y))}function me(Q,K,Y){Y=Math.min(Q.length,Y);const se=[];let _e=K;for(;_e239?4:Se>223?3:Se>191?2:1;if(_e+Ve<=Y){let Le,Fe,Qe,Ne;switch(Ve){case 1:Se<128&&(Ee=Se);break;case 2:Le=Q[_e+1],(Le&192)===128&&(Ne=(Se&31)<<6|Le&63,Ne>127&&(Ee=Ne));break;case 3:Le=Q[_e+1],Fe=Q[_e+2],(Le&192)===128&&(Fe&192)===128&&(Ne=(Se&15)<<12|(Le&63)<<6|Fe&63,Ne>2047&&(Ne<55296||Ne>57343)&&(Ee=Ne));break;case 4:Le=Q[_e+1],Fe=Q[_e+2],Qe=Q[_e+3],(Le&192)===128&&(Fe&192)===128&&(Qe&192)===128&&(Ne=(Se&15)<<18|(Le&63)<<12|(Fe&63)<<6|Qe&63,Ne>65535&&Ne<1114112&&(Ee=Ne))}}Ee===null?(Ee=65533,Ve=1):Ee>65535&&(Ee-=65536,se.push(Ee>>>10&1023|55296),Ee=56320|Ee&1023),se.push(Ee),_e+=Ve}return he(se)}const Pe=4096;function he(Q){const K=Q.length;if(K<=Pe)return String.fromCharCode.apply(String,Q);let Y="",se=0;for(;sese)&&(Y=se);let _e="";for(let Se=K;Sese&&(K=se),Y<0?(Y+=se,Y<0&&(Y=0)):Y>se&&(Y=se),YY)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUintLE=_.prototype.readUIntLE=function(K,Y,se){K=K>>>0,Y=Y>>>0,se||Be(K,Y,this.length);let _e=this[K],Se=1,Ee=0;for(;++Ee>>0,Y=Y>>>0,se||Be(K,Y,this.length);let _e=this[K+--Y],Se=1;for(;Y>0&&(Se*=256);)_e+=this[K+--Y]*Se;return _e},_.prototype.readUint8=_.prototype.readUInt8=function(K,Y){return K=K>>>0,Y||Be(K,1,this.length),this[K]},_.prototype.readUint16LE=_.prototype.readUInt16LE=function(K,Y){return K=K>>>0,Y||Be(K,2,this.length),this[K]|this[K+1]<<8},_.prototype.readUint16BE=_.prototype.readUInt16BE=function(K,Y){return K=K>>>0,Y||Be(K,2,this.length),this[K]<<8|this[K+1]},_.prototype.readUint32LE=_.prototype.readUInt32LE=function(K,Y){return K=K>>>0,Y||Be(K,4,this.length),(this[K]|this[K+1]<<8|this[K+2]<<16)+this[K+3]*16777216},_.prototype.readUint32BE=_.prototype.readUInt32BE=function(K,Y){return K=K>>>0,Y||Be(K,4,this.length),this[K]*16777216+(this[K+1]<<16|this[K+2]<<8|this[K+3])},_.prototype.readBigUInt64LE=ue(function(K){K=K>>>0,ne(K,"offset");const Y=this[K],se=this[K+7];(Y===void 0||se===void 0)&&oe(K,this.length-8);const _e=Y+this[++K]*2**8+this[++K]*2**16+this[++K]*2**24,Se=this[++K]+this[++K]*2**8+this[++K]*2**16+se*2**24;return BigInt(_e)+(BigInt(Se)<>>0,ne(K,"offset");const Y=this[K],se=this[K+7];(Y===void 0||se===void 0)&&oe(K,this.length-8);const _e=Y*2**24+this[++K]*2**16+this[++K]*2**8+this[++K],Se=this[++K]*2**24+this[++K]*2**16+this[++K]*2**8+se;return(BigInt(_e)<>>0,Y=Y>>>0,se||Be(K,Y,this.length);let _e=this[K],Se=1,Ee=0;for(;++Ee=Se&&(_e-=Math.pow(2,8*Y)),_e},_.prototype.readIntBE=function(K,Y,se){K=K>>>0,Y=Y>>>0,se||Be(K,Y,this.length);let _e=Y,Se=1,Ee=this[K+--_e];for(;_e>0&&(Se*=256);)Ee+=this[K+--_e]*Se;return Se*=128,Ee>=Se&&(Ee-=Math.pow(2,8*Y)),Ee},_.prototype.readInt8=function(K,Y){return K=K>>>0,Y||Be(K,1,this.length),this[K]&128?(255-this[K]+1)*-1:this[K]},_.prototype.readInt16LE=function(K,Y){K=K>>>0,Y||Be(K,2,this.length);const se=this[K]|this[K+1]<<8;return se&32768?se|4294901760:se},_.prototype.readInt16BE=function(K,Y){K=K>>>0,Y||Be(K,2,this.length);const se=this[K+1]|this[K]<<8;return se&32768?se|4294901760:se},_.prototype.readInt32LE=function(K,Y){return K=K>>>0,Y||Be(K,4,this.length),this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24},_.prototype.readInt32BE=function(K,Y){return K=K>>>0,Y||Be(K,4,this.length),this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]},_.prototype.readBigInt64LE=ue(function(K){K=K>>>0,ne(K,"offset");const Y=this[K],se=this[K+7];(Y===void 0||se===void 0)&&oe(K,this.length-8);const _e=this[K+4]+this[K+5]*2**8+this[K+6]*2**16+(se<<24);return(BigInt(_e)<>>0,ne(K,"offset");const Y=this[K],se=this[K+7];(Y===void 0||se===void 0)&&oe(K,this.length-8);const _e=(Y<<24)+this[++K]*2**16+this[++K]*2**8+this[++K];return(BigInt(_e)<>>0,Y||Be(K,4,this.length),R.read(this,K,!0,23,4)},_.prototype.readFloatBE=function(K,Y){return K=K>>>0,Y||Be(K,4,this.length),R.read(this,K,!1,23,4)},_.prototype.readDoubleLE=function(K,Y){return K=K>>>0,Y||Be(K,8,this.length),R.read(this,K,!0,52,8)},_.prototype.readDoubleBE=function(K,Y){return K=K>>>0,Y||Be(K,8,this.length),R.read(this,K,!1,52,8)};function ke(Q,K,Y,se,_e,Se){if(!_.isBuffer(Q))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>_e||KQ.length)throw new RangeError("Index out of range")}_.prototype.writeUintLE=_.prototype.writeUIntLE=function(K,Y,se,_e){if(K=+K,Y=Y>>>0,se=se>>>0,!_e){const Ve=Math.pow(2,8*se)-1;ke(this,K,Y,se,Ve,0)}let Se=1,Ee=0;for(this[Y]=K&255;++Ee>>0,se=se>>>0,!_e){const Ve=Math.pow(2,8*se)-1;ke(this,K,Y,se,Ve,0)}let Se=se-1,Ee=1;for(this[Y+Se]=K&255;--Se>=0&&(Ee*=256);)this[Y+Se]=K/Ee&255;return Y+se},_.prototype.writeUint8=_.prototype.writeUInt8=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,1,255,0),this[Y]=K&255,Y+1},_.prototype.writeUint16LE=_.prototype.writeUInt16LE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,2,65535,0),this[Y]=K&255,this[Y+1]=K>>>8,Y+2},_.prototype.writeUint16BE=_.prototype.writeUInt16BE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,2,65535,0),this[Y]=K>>>8,this[Y+1]=K&255,Y+2},_.prototype.writeUint32LE=_.prototype.writeUInt32LE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,4,4294967295,0),this[Y+3]=K>>>24,this[Y+2]=K>>>16,this[Y+1]=K>>>8,this[Y]=K&255,Y+4},_.prototype.writeUint32BE=_.prototype.writeUInt32BE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,4,4294967295,0),this[Y]=K>>>24,this[Y+1]=K>>>16,this[Y+2]=K>>>8,this[Y+3]=K&255,Y+4};function Me(Q,K,Y,se,_e){J(K,se,_e,Q,Y,7);let Se=Number(K&BigInt(4294967295));Q[Y++]=Se,Se=Se>>8,Q[Y++]=Se,Se=Se>>8,Q[Y++]=Se,Se=Se>>8,Q[Y++]=Se;let Ee=Number(K>>BigInt(32)&BigInt(4294967295));return Q[Y++]=Ee,Ee=Ee>>8,Q[Y++]=Ee,Ee=Ee>>8,Q[Y++]=Ee,Ee=Ee>>8,Q[Y++]=Ee,Y}function Ue(Q,K,Y,se,_e){J(K,se,_e,Q,Y,7);let Se=Number(K&BigInt(4294967295));Q[Y+7]=Se,Se=Se>>8,Q[Y+6]=Se,Se=Se>>8,Q[Y+5]=Se,Se=Se>>8,Q[Y+4]=Se;let Ee=Number(K>>BigInt(32)&BigInt(4294967295));return Q[Y+3]=Ee,Ee=Ee>>8,Q[Y+2]=Ee,Ee=Ee>>8,Q[Y+1]=Ee,Ee=Ee>>8,Q[Y]=Ee,Y+8}_.prototype.writeBigUInt64LE=ue(function(K,Y=0){return Me(this,K,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),_.prototype.writeBigUInt64BE=ue(function(K,Y=0){return Ue(this,K,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),_.prototype.writeIntLE=function(K,Y,se,_e){if(K=+K,Y=Y>>>0,!_e){const Le=Math.pow(2,8*se-1);ke(this,K,Y,se,Le-1,-Le)}let Se=0,Ee=1,Ve=0;for(this[Y]=K&255;++Se>0)-Ve&255;return Y+se},_.prototype.writeIntBE=function(K,Y,se,_e){if(K=+K,Y=Y>>>0,!_e){const Le=Math.pow(2,8*se-1);ke(this,K,Y,se,Le-1,-Le)}let Se=se-1,Ee=1,Ve=0;for(this[Y+Se]=K&255;--Se>=0&&(Ee*=256);)K<0&&Ve===0&&this[Y+Se+1]!==0&&(Ve=1),this[Y+Se]=(K/Ee>>0)-Ve&255;return Y+se},_.prototype.writeInt8=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,1,127,-128),K<0&&(K=255+K+1),this[Y]=K&255,Y+1},_.prototype.writeInt16LE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,2,32767,-32768),this[Y]=K&255,this[Y+1]=K>>>8,Y+2},_.prototype.writeInt16BE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,2,32767,-32768),this[Y]=K>>>8,this[Y+1]=K&255,Y+2},_.prototype.writeInt32LE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,4,2147483647,-2147483648),this[Y]=K&255,this[Y+1]=K>>>8,this[Y+2]=K>>>16,this[Y+3]=K>>>24,Y+4},_.prototype.writeInt32BE=function(K,Y,se){return K=+K,Y=Y>>>0,se||ke(this,K,Y,4,2147483647,-2147483648),K<0&&(K=4294967295+K+1),this[Y]=K>>>24,this[Y+1]=K>>>16,this[Y+2]=K>>>8,this[Y+3]=K&255,Y+4},_.prototype.writeBigInt64LE=ue(function(K,Y=0){return Me(this,K,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),_.prototype.writeBigInt64BE=ue(function(K,Y=0){return Ue(this,K,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function je(Q,K,Y,se,_e,Se){if(Y+se>Q.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function X(Q,K,Y,se,_e){return K=+K,Y=Y>>>0,_e||je(Q,K,Y,4),R.write(Q,K,Y,se,23,4),Y+4}_.prototype.writeFloatLE=function(K,Y,se){return X(this,K,Y,!0,se)},_.prototype.writeFloatBE=function(K,Y,se){return X(this,K,Y,!1,se)};function D(Q,K,Y,se,_e){return K=+K,Y=Y>>>0,_e||je(Q,K,Y,8),R.write(Q,K,Y,se,52,8),Y+8}_.prototype.writeDoubleLE=function(K,Y,se){return D(this,K,Y,!0,se)},_.prototype.writeDoubleBE=function(K,Y,se){return D(this,K,Y,!1,se)},_.prototype.copy=function(K,Y,se,_e){if(!_.isBuffer(K))throw new TypeError("argument should be a Buffer");if(se||(se=0),!_e&&_e!==0&&(_e=this.length),Y>=K.length&&(Y=K.length),Y||(Y=0),_e>0&&_e=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),K.length-Y<_e-se&&(_e=K.length-Y+se);const Se=_e-se;return this===K&&typeof b.prototype.copyWithin=="function"?this.copyWithin(Y,se,_e):b.prototype.set.call(K,this.subarray(se,_e),Y),Se},_.prototype.fill=function(K,Y,se,_e){if(typeof K=="string"){if(typeof Y=="string"?(_e=Y,Y=0,se=this.length):typeof se=="string"&&(_e=se,se=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!_.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(K.length===1){const Ee=K.charCodeAt(0);(_e==="utf8"&&Ee<128||_e==="latin1")&&(K=Ee)}}else typeof K=="number"?K=K&255:typeof K=="boolean"&&(K=Number(K));if(Y<0||this.length>>0,se=se===void 0?this.length:se>>>0,K||(K=0);let Se;if(typeof K=="number")for(Se=Y;Se2**32?_e=B(String(Y)):typeof Y=="bigint"&&(_e=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(_e=B(_e)),_e+="n"),se+=` It must be ${K}. Received ${_e}`,se},RangeError);function B(Q){let K="",Y=Q.length;const se=Q[0]==="-"?1:0;for(;Y>=se+4;Y-=3)K=`_${Q.slice(Y-3,Y)}${K}`;return`${Q.slice(0,Y)}${K}`}function U(Q,K,Y){ne(K,"offset"),(Q[K]===void 0||Q[K+Y]===void 0)&&oe(K,Q.length-(Y+1))}function J(Q,K,Y,se,_e,Se){if(Q>Y||Q3?K===0||K===BigInt(0)?Ve=`>= 0${Ee} and < 2${Ee} ** ${(Se+1)*8}${Ee}`:Ve=`>= -(2${Ee} ** ${(Se+1)*8-1}${Ee}) and < 2 ** ${(Se+1)*8-1}${Ee}`:Ve=`>= ${K}${Ee} and <= ${Y}${Ee}`,new H.ERR_OUT_OF_RANGE("value",Ve,Q)}U(se,_e,Se)}function ne(Q,K){if(typeof Q!="number")throw new H.ERR_INVALID_ARG_TYPE(K,"number",Q)}function oe(Q,K,Y){throw Math.floor(Q)!==Q?(ne(Q,Y),new H.ERR_OUT_OF_RANGE(Y||"offset","an integer",Q)):K<0?new H.ERR_BUFFER_OUT_OF_BOUNDS:new H.ERR_OUT_OF_RANGE(Y||"offset",`>= ${Y?1:0} and <= ${K}`,Q)}const de=/[^+/0-9A-Za-z-_]/g;function Te(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(de,""),Q.length<2)return"";for(;Q.length%4!==0;)Q=Q+"=";return Q}function $e(Q,K){K=K||1/0;let Y;const se=Q.length;let _e=null;const Se=[];for(let Ee=0;Ee55295&&Y<57344){if(!_e){if(Y>56319){(K-=3)>-1&&Se.push(239,191,189);continue}else if(Ee+1===se){(K-=3)>-1&&Se.push(239,191,189);continue}_e=Y;continue}if(Y<56320){(K-=3)>-1&&Se.push(239,191,189),_e=Y;continue}Y=(_e-55296<<10|Y-56320)+65536}else _e&&(K-=3)>-1&&Se.push(239,191,189);if(_e=null,Y<128){if((K-=1)<0)break;Se.push(Y)}else if(Y<2048){if((K-=2)<0)break;Se.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((K-=3)<0)break;Se.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((K-=4)<0)break;Se.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return Se}function De(Q){const K=[];for(let Y=0;Y>8,_e=Y%256,Se.push(_e),Se.push(se);return Se}function ze(Q){return $.toByteArray(Te(Q))}function He(Q,K,Y,se){let _e;for(_e=0;_e=K.length||_e>=Q.length);++_e)K[_e+Y]=Q[_e];return _e}function Ge(Q,K){return Q instanceof K||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===K.name}function qe(Q){return Q!==Q}const pe=function(){const Q="0123456789abcdef",K=new Array(256);for(let Y=0;Y<16;++Y){const se=Y*16;for(let _e=0;_e<16;++_e)K[se+_e]=Q[Y]+Q[_e]}return K}();function ue(Q){return typeof BigInt>"u"?ge:Q}function ge(){throw new Error("BigInt not supported")}})(t);const O=t.Buffer;e.Blob=t.Blob,e.BlobOptions=t.BlobOptions,e.Buffer=t.Buffer,e.File=t.File,e.FileOptions=t.FileOptions,e.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,e.SlowBuffer=t.SlowBuffer,e.TranscodeEncoding=t.TranscodeEncoding,e.atob=t.atob,e.btoa=t.btoa,e.constants=t.constants,e.default=O,e.isAscii=t.isAscii,e.isUtf8=t.isUtf8,e.kMaxLength=t.kMaxLength,e.kStringMaxLength=t.kStringMaxLength,e.resolveObjectURL=t.resolveObjectURL,e.transcode=t.transcode})(jn);var eD;function zMe(){if(eD)return Ph;eD=1,Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.WebCrypto=void 0;const e=jn,t=Er,r=typeof window<"u"&&typeof window.document<"u";class n{constructor(){this.subtle=r?globalThis.crypto.subtle:t.webcrypto?t.webcrypto.subtle:crypto.subtle}getRandomValues(i){if(!ArrayBuffer.isView(i))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const a=e.Buffer.from(i.buffer,i.byteOffset,i.byteLength);return r?globalThis.crypto.getRandomValues(a):(0,t.randomFillSync)(a),i}}return Ph.WebCrypto=n,Ph}var Ah={},Y5={};function VMe(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,$=new Uint8Array(P);T!==O;){for(var R=m[T],j=0,I=P-1;(R!==0||j>>0,$[I]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");A=j,T++}for(var b=P-A;b!==P&&$[b]===0;)b++;for(var N=s.repeat(w);b>>0,P=new Uint8Array(O);m[w];){var $=t[m.charCodeAt(w)];if($===255)return;for(var R=0,j=O-1;($!==0||R>>0,P[j]=$%256>>>0,$=$/256>>>0;if($!==0)throw new Error("Non-zero carry");T=R,w++}for(var I=O-T;I!==O&&P[I]===0;)I++;for(var b=new Uint8Array(A+(O-I)),N=A;I!==O;)b[N++]=P[I++];return b}function p(m){var w=d(m);if(w)return w;throw new Error("Non-base"+a+" character")}return{encode:u,decodeUnsafe:d,decode:p}}var w8=VMe,tD;function _8(){return tD||(tD=1,function(e){var t=Ae&&Ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(w8),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58}(Y5)),Y5}var $m={},rD;function x8(){if(rD)return $m;rD=1,Object.defineProperty($m,"__esModule",{value:!0});function e(t){let r=5381;for(let n=0;n>24,c=a>>16,l=a>>8;return s^c^l^a}function i(a){return a&255}return Ah}var J5={},_u={};const WMe="elliptic",GMe="6.5.4",KMe="EC cryptography",YMe="lib/elliptic.js",JMe=["lib"],ZMe={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},XMe={type:"git",url:"git@github.com:indutny/elliptic"},QMe=["EC","Elliptic","curve","Cryptography"],eke="Fedor Indutny ",tke="MIT",rke={url:"https://github.com/indutny/elliptic/issues"},nke="https://github.com/indutny/elliptic",oke={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},ike={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},ake={name:WMe,version:GMe,description:KMe,main:YMe,files:JMe,scripts:ZMe,repository:XMe,keywords:QMe,author:eke,license:tke,bugs:rke,homepage:nke,devDependencies:oke,dependencies:ike};var jo={},S8={exports:{}};const ng=zi(i9e);S8.exports;(function(e){(function(t,r){function n(q,_){if(!q)throw new Error(_||"Assertion failed")}function o(q,_){q.super_=_;var y=function(){};y.prototype=_.prototype,q.prototype=new y,q.prototype.constructor=q}function i(q,_,y){if(i.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((_==="le"||_==="be")&&(y=_,_=10),this._init(q||0,_||10,y||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ng.Buffer}catch{}i.isBN=function(_){return _ instanceof i?!0:_!==null&&typeof _=="object"&&_.constructor.wordSize===i.wordSize&&Array.isArray(_.words)},i.max=function(_,y){return _.cmp(y)>0?_:y},i.min=function(_,y){return _.cmp(y)<0?_:y},i.prototype._init=function(_,y,f){if(typeof _=="number")return this._initNumber(_,y,f);if(typeof _=="object")return this._initArray(_,y,f);y==="hex"&&(y=16),n(y===(y|0)&&y>=2&&y<=36),_=_.toString().replace(/\s+/g,"");var h=0;_[0]==="-"&&(h++,this.negative=1),h<_.length&&(y===16?this._parseHex(_,h,f):(this._parseBase(_,y,h),f==="le"&&this._initArray(this.toArray(),y,f)))},i.prototype._initNumber=function(_,y,f){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[_&67108863],this.length=1):_<4503599627370496?(this.words=[_&67108863,_/67108864&67108863],this.length=2):(n(_<9007199254740992),this.words=[_&67108863,_/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),y,f)},i.prototype._initArray=function(_,y,f){if(n(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var h=0;h=0;h-=3)v=_[h]|_[h-1]<<8|_[h-2]<<16,this.words[x]|=v<>>26-S&67108863,S+=24,S>=26&&(S-=26,x++);else if(f==="le")for(h=0,x=0;h<_.length;h+=3)v=_[h]|_[h+1]<<8|_[h+2]<<16,this.words[x]|=v<>>26-S&67108863,S+=24,S>=26&&(S-=26,x++);return this.strip()};function s(q,_){var y=q.charCodeAt(_);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function c(q,_,y){var f=s(q,y);return y-1>=_&&(f|=s(q,y-1)<<4),f}i.prototype._parseHex=function(_,y,f){this.length=Math.ceil((_.length-y)/6),this.words=new Array(this.length);for(var h=0;h=y;h-=2)S=c(_,y,h)<=18?(x-=18,v+=1,this.words[v]|=S>>>26):x+=8;else{var k=_.length-y;for(h=k%2===0?y+1:y;h<_.length;h+=2)S=c(_,y,h)<=18?(x-=18,v+=1,this.words[v]|=S>>>26):x+=8}this.strip()};function l(q,_,y,f){for(var h=0,x=Math.min(q.length,y),v=_;v=49?h+=S-49+10:S>=17?h+=S-17+10:h+=S}return h}i.prototype._parseBase=function(_,y,f){this.words=[0],this.length=1;for(var h=0,x=1;x<=67108863;x*=y)h++;h--,x=x/y|0;for(var v=_.length-f,S=v%h,k=Math.min(v,v-S)+f,E=0,C=f;C1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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"],d=[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],p=[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];i.prototype.toString=function(_,y){_=_||10,y=y|0||1;var f;if(_===16||_==="hex"){f="";for(var h=0,x=0,v=0;v>>24-h&16777215,x!==0||v!==this.length-1?f=u[6-k.length]+k+f:f=k+f,h+=2,h>=26&&(h-=26,v--)}for(x!==0&&(f=x.toString(16)+f);f.length%y!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(_===(_|0)&&_>=2&&_<=36){var E=d[_],C=p[_];f="";var g=this.clone();for(g.negative=0;!g.isZero();){var M=g.modn(C).toString(_);g=g.idivn(C),g.isZero()?f=M+f:f=u[E-M.length]+M+f}for(this.isZero()&&(f="0"+f);f.length%y!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=this.words[1]*67108864:this.length===3&&this.words[2]===1?_+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(_,y){return n(typeof a<"u"),this.toArrayLike(a,_,y)},i.prototype.toArray=function(_,y){return this.toArrayLike(Array,_,y)},i.prototype.toArrayLike=function(_,y,f){var h=this.byteLength(),x=f||Math.max(1,h);n(h<=x,"byte array longer than desired length"),n(x>0,"Requested array length <= 0"),this.strip();var v=y==="le",S=new _(x),k,E,C=this.clone();if(v){for(E=0;!C.isZero();E++)k=C.andln(255),C.iushrn(8),S[E]=k;for(;E=4096&&(f+=13,y>>>=13),y>=64&&(f+=7,y>>>=7),y>=8&&(f+=4,y>>>=4),y>=2&&(f+=2,y>>>=2),f+y},i.prototype._zeroBits=function(_){if(_===0)return 26;var y=_,f=0;return y&8191||(f+=13,y>>>=13),y&127||(f+=7,y>>>=7),y&15||(f+=4,y>>>=4),y&3||(f+=2,y>>>=2),y&1||f++,f},i.prototype.bitLength=function(){var _=this.words[this.length-1],y=this._countBits(_);return(this.length-1)*26+y};function m(q){for(var _=new Array(q.bitLength()),y=0;y<_.length;y++){var f=y/26|0,h=y%26;_[y]=(q.words[f]&1<>>h}return _}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,y=0;y_.length?this.clone().ior(_):_.clone().ior(this)},i.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},i.prototype.iuand=function(_){var y;this.length>_.length?y=_:y=this;for(var f=0;f_.length?this.clone().iand(_):_.clone().iand(this)},i.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},i.prototype.iuxor=function(_){var y,f;this.length>_.length?(y=this,f=_):(y=_,f=this);for(var h=0;h_.length?this.clone().ixor(_):_.clone().ixor(this)},i.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},i.prototype.inotn=function(_){n(typeof _=="number"&&_>=0);var y=Math.ceil(_/26)|0,f=_%26;this._expand(y),f>0&&y--;for(var h=0;h0&&(this.words[h]=~this.words[h]&67108863>>26-f),this.strip()},i.prototype.notn=function(_){return this.clone().inotn(_)},i.prototype.setn=function(_,y){n(typeof _=="number"&&_>=0);var f=_/26|0,h=_%26;return this._expand(f+1),y?this.words[f]=this.words[f]|1<_.length?(f=this,h=_):(f=_,h=this);for(var x=0,v=0;v>>26;for(;x!==0&&v>>26;if(this.length=f.length,x!==0)this.words[this.length]=x,this.length++;else if(f!==this)for(;v_.length?this.clone().iadd(_):_.clone().iadd(this)},i.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var y=this.iadd(_);return _.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var f=this.cmp(_);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var h,x;f>0?(h=this,x=_):(h=_,x=this);for(var v=0,S=0;S>26,this.words[S]=y&67108863;for(;v!==0&&S>26,this.words[S]=y&67108863;if(v===0&&S>>26,g=k&67108863,M=Math.min(E,_.length-1),re=Math.max(0,E-q.length+1);re<=M;re++){var W=E-re|0;h=q.words[W]|0,x=_.words[re]|0,v=h*x+g,C+=v/67108864|0,g=v&67108863}y.words[E]=g|0,k=C|0}return k!==0?y.words[E]=k|0:y.length--,y.strip()}var A=function(_,y,f){var h=_.words,x=y.words,v=f.words,S=0,k,E,C,g=h[0]|0,M=g&8191,re=g>>>13,W=h[1]|0,ee=W&8191,ce=W>>>13,ie=h[2]|0,le=ie&8191,L=ie>>>13,te=h[3]|0,ae=te&8191,ye=te>>>13,ve=h[4]|0,me=ve&8191,Pe=ve>>>13,he=h[5]|0,be=he&8191,Ie=he>>>13,we=h[6]|0,Oe=we&8191,Be=we>>>13,ke=h[7]|0,Me=ke&8191,Ue=ke>>>13,je=h[8]|0,X=je&8191,D=je>>>13,H=h[9]|0,F=H&8191,B=H>>>13,U=x[0]|0,J=U&8191,ne=U>>>13,oe=x[1]|0,de=oe&8191,Te=oe>>>13,$e=x[2]|0,De=$e&8191,Xe=$e>>>13,ze=x[3]|0,He=ze&8191,Ge=ze>>>13,qe=x[4]|0,pe=qe&8191,ue=qe>>>13,ge=x[5]|0,Q=ge&8191,K=ge>>>13,Y=x[6]|0,se=Y&8191,_e=Y>>>13,Se=x[7]|0,Ee=Se&8191,Ve=Se>>>13,Le=x[8]|0,Fe=Le&8191,Qe=Le>>>13,Ne=x[9]|0,We=Ne&8191,mt=Ne>>>13;f.negative=_.negative^y.negative,f.length=19,k=Math.imul(M,J),E=Math.imul(M,ne),E=E+Math.imul(re,J)|0,C=Math.imul(re,ne);var Je=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Je>>>26)|0,Je&=67108863,k=Math.imul(ee,J),E=Math.imul(ee,ne),E=E+Math.imul(ce,J)|0,C=Math.imul(ce,ne),k=k+Math.imul(M,de)|0,E=E+Math.imul(M,Te)|0,E=E+Math.imul(re,de)|0,C=C+Math.imul(re,Te)|0;var it=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(it>>>26)|0,it&=67108863,k=Math.imul(le,J),E=Math.imul(le,ne),E=E+Math.imul(L,J)|0,C=Math.imul(L,ne),k=k+Math.imul(ee,de)|0,E=E+Math.imul(ee,Te)|0,E=E+Math.imul(ce,de)|0,C=C+Math.imul(ce,Te)|0,k=k+Math.imul(M,De)|0,E=E+Math.imul(M,Xe)|0,E=E+Math.imul(re,De)|0,C=C+Math.imul(re,Xe)|0;var hr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(hr>>>26)|0,hr&=67108863,k=Math.imul(ae,J),E=Math.imul(ae,ne),E=E+Math.imul(ye,J)|0,C=Math.imul(ye,ne),k=k+Math.imul(le,de)|0,E=E+Math.imul(le,Te)|0,E=E+Math.imul(L,de)|0,C=C+Math.imul(L,Te)|0,k=k+Math.imul(ee,De)|0,E=E+Math.imul(ee,Xe)|0,E=E+Math.imul(ce,De)|0,C=C+Math.imul(ce,Xe)|0,k=k+Math.imul(M,He)|0,E=E+Math.imul(M,Ge)|0,E=E+Math.imul(re,He)|0,C=C+Math.imul(re,Ge)|0;var br=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(br>>>26)|0,br&=67108863,k=Math.imul(me,J),E=Math.imul(me,ne),E=E+Math.imul(Pe,J)|0,C=Math.imul(Pe,ne),k=k+Math.imul(ae,de)|0,E=E+Math.imul(ae,Te)|0,E=E+Math.imul(ye,de)|0,C=C+Math.imul(ye,Te)|0,k=k+Math.imul(le,De)|0,E=E+Math.imul(le,Xe)|0,E=E+Math.imul(L,De)|0,C=C+Math.imul(L,Xe)|0,k=k+Math.imul(ee,He)|0,E=E+Math.imul(ee,Ge)|0,E=E+Math.imul(ce,He)|0,C=C+Math.imul(ce,Ge)|0,k=k+Math.imul(M,pe)|0,E=E+Math.imul(M,ue)|0,E=E+Math.imul(re,pe)|0,C=C+Math.imul(re,ue)|0;var ir=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(ir>>>26)|0,ir&=67108863,k=Math.imul(be,J),E=Math.imul(be,ne),E=E+Math.imul(Ie,J)|0,C=Math.imul(Ie,ne),k=k+Math.imul(me,de)|0,E=E+Math.imul(me,Te)|0,E=E+Math.imul(Pe,de)|0,C=C+Math.imul(Pe,Te)|0,k=k+Math.imul(ae,De)|0,E=E+Math.imul(ae,Xe)|0,E=E+Math.imul(ye,De)|0,C=C+Math.imul(ye,Xe)|0,k=k+Math.imul(le,He)|0,E=E+Math.imul(le,Ge)|0,E=E+Math.imul(L,He)|0,C=C+Math.imul(L,Ge)|0,k=k+Math.imul(ee,pe)|0,E=E+Math.imul(ee,ue)|0,E=E+Math.imul(ce,pe)|0,C=C+Math.imul(ce,ue)|0,k=k+Math.imul(M,Q)|0,E=E+Math.imul(M,K)|0,E=E+Math.imul(re,Q)|0,C=C+Math.imul(re,K)|0;var Fr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,k=Math.imul(Oe,J),E=Math.imul(Oe,ne),E=E+Math.imul(Be,J)|0,C=Math.imul(Be,ne),k=k+Math.imul(be,de)|0,E=E+Math.imul(be,Te)|0,E=E+Math.imul(Ie,de)|0,C=C+Math.imul(Ie,Te)|0,k=k+Math.imul(me,De)|0,E=E+Math.imul(me,Xe)|0,E=E+Math.imul(Pe,De)|0,C=C+Math.imul(Pe,Xe)|0,k=k+Math.imul(ae,He)|0,E=E+Math.imul(ae,Ge)|0,E=E+Math.imul(ye,He)|0,C=C+Math.imul(ye,Ge)|0,k=k+Math.imul(le,pe)|0,E=E+Math.imul(le,ue)|0,E=E+Math.imul(L,pe)|0,C=C+Math.imul(L,ue)|0,k=k+Math.imul(ee,Q)|0,E=E+Math.imul(ee,K)|0,E=E+Math.imul(ce,Q)|0,C=C+Math.imul(ce,K)|0,k=k+Math.imul(M,se)|0,E=E+Math.imul(M,_e)|0,E=E+Math.imul(re,se)|0,C=C+Math.imul(re,_e)|0;var ar=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(ar>>>26)|0,ar&=67108863,k=Math.imul(Me,J),E=Math.imul(Me,ne),E=E+Math.imul(Ue,J)|0,C=Math.imul(Ue,ne),k=k+Math.imul(Oe,de)|0,E=E+Math.imul(Oe,Te)|0,E=E+Math.imul(Be,de)|0,C=C+Math.imul(Be,Te)|0,k=k+Math.imul(be,De)|0,E=E+Math.imul(be,Xe)|0,E=E+Math.imul(Ie,De)|0,C=C+Math.imul(Ie,Xe)|0,k=k+Math.imul(me,He)|0,E=E+Math.imul(me,Ge)|0,E=E+Math.imul(Pe,He)|0,C=C+Math.imul(Pe,Ge)|0,k=k+Math.imul(ae,pe)|0,E=E+Math.imul(ae,ue)|0,E=E+Math.imul(ye,pe)|0,C=C+Math.imul(ye,ue)|0,k=k+Math.imul(le,Q)|0,E=E+Math.imul(le,K)|0,E=E+Math.imul(L,Q)|0,C=C+Math.imul(L,K)|0,k=k+Math.imul(ee,se)|0,E=E+Math.imul(ee,_e)|0,E=E+Math.imul(ce,se)|0,C=C+Math.imul(ce,_e)|0,k=k+Math.imul(M,Ee)|0,E=E+Math.imul(M,Ve)|0,E=E+Math.imul(re,Ee)|0,C=C+Math.imul(re,Ve)|0;var Jr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,k=Math.imul(X,J),E=Math.imul(X,ne),E=E+Math.imul(D,J)|0,C=Math.imul(D,ne),k=k+Math.imul(Me,de)|0,E=E+Math.imul(Me,Te)|0,E=E+Math.imul(Ue,de)|0,C=C+Math.imul(Ue,Te)|0,k=k+Math.imul(Oe,De)|0,E=E+Math.imul(Oe,Xe)|0,E=E+Math.imul(Be,De)|0,C=C+Math.imul(Be,Xe)|0,k=k+Math.imul(be,He)|0,E=E+Math.imul(be,Ge)|0,E=E+Math.imul(Ie,He)|0,C=C+Math.imul(Ie,Ge)|0,k=k+Math.imul(me,pe)|0,E=E+Math.imul(me,ue)|0,E=E+Math.imul(Pe,pe)|0,C=C+Math.imul(Pe,ue)|0,k=k+Math.imul(ae,Q)|0,E=E+Math.imul(ae,K)|0,E=E+Math.imul(ye,Q)|0,C=C+Math.imul(ye,K)|0,k=k+Math.imul(le,se)|0,E=E+Math.imul(le,_e)|0,E=E+Math.imul(L,se)|0,C=C+Math.imul(L,_e)|0,k=k+Math.imul(ee,Ee)|0,E=E+Math.imul(ee,Ve)|0,E=E+Math.imul(ce,Ee)|0,C=C+Math.imul(ce,Ve)|0,k=k+Math.imul(M,Fe)|0,E=E+Math.imul(M,Qe)|0,E=E+Math.imul(re,Fe)|0,C=C+Math.imul(re,Qe)|0;var Zr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,k=Math.imul(F,J),E=Math.imul(F,ne),E=E+Math.imul(B,J)|0,C=Math.imul(B,ne),k=k+Math.imul(X,de)|0,E=E+Math.imul(X,Te)|0,E=E+Math.imul(D,de)|0,C=C+Math.imul(D,Te)|0,k=k+Math.imul(Me,De)|0,E=E+Math.imul(Me,Xe)|0,E=E+Math.imul(Ue,De)|0,C=C+Math.imul(Ue,Xe)|0,k=k+Math.imul(Oe,He)|0,E=E+Math.imul(Oe,Ge)|0,E=E+Math.imul(Be,He)|0,C=C+Math.imul(Be,Ge)|0,k=k+Math.imul(be,pe)|0,E=E+Math.imul(be,ue)|0,E=E+Math.imul(Ie,pe)|0,C=C+Math.imul(Ie,ue)|0,k=k+Math.imul(me,Q)|0,E=E+Math.imul(me,K)|0,E=E+Math.imul(Pe,Q)|0,C=C+Math.imul(Pe,K)|0,k=k+Math.imul(ae,se)|0,E=E+Math.imul(ae,_e)|0,E=E+Math.imul(ye,se)|0,C=C+Math.imul(ye,_e)|0,k=k+Math.imul(le,Ee)|0,E=E+Math.imul(le,Ve)|0,E=E+Math.imul(L,Ee)|0,C=C+Math.imul(L,Ve)|0,k=k+Math.imul(ee,Fe)|0,E=E+Math.imul(ee,Qe)|0,E=E+Math.imul(ce,Fe)|0,C=C+Math.imul(ce,Qe)|0,k=k+Math.imul(M,We)|0,E=E+Math.imul(M,mt)|0,E=E+Math.imul(re,We)|0,C=C+Math.imul(re,mt)|0;var Xr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,k=Math.imul(F,de),E=Math.imul(F,Te),E=E+Math.imul(B,de)|0,C=Math.imul(B,Te),k=k+Math.imul(X,De)|0,E=E+Math.imul(X,Xe)|0,E=E+Math.imul(D,De)|0,C=C+Math.imul(D,Xe)|0,k=k+Math.imul(Me,He)|0,E=E+Math.imul(Me,Ge)|0,E=E+Math.imul(Ue,He)|0,C=C+Math.imul(Ue,Ge)|0,k=k+Math.imul(Oe,pe)|0,E=E+Math.imul(Oe,ue)|0,E=E+Math.imul(Be,pe)|0,C=C+Math.imul(Be,ue)|0,k=k+Math.imul(be,Q)|0,E=E+Math.imul(be,K)|0,E=E+Math.imul(Ie,Q)|0,C=C+Math.imul(Ie,K)|0,k=k+Math.imul(me,se)|0,E=E+Math.imul(me,_e)|0,E=E+Math.imul(Pe,se)|0,C=C+Math.imul(Pe,_e)|0,k=k+Math.imul(ae,Ee)|0,E=E+Math.imul(ae,Ve)|0,E=E+Math.imul(ye,Ee)|0,C=C+Math.imul(ye,Ve)|0,k=k+Math.imul(le,Fe)|0,E=E+Math.imul(le,Qe)|0,E=E+Math.imul(L,Fe)|0,C=C+Math.imul(L,Qe)|0,k=k+Math.imul(ee,We)|0,E=E+Math.imul(ee,mt)|0,E=E+Math.imul(ce,We)|0,C=C+Math.imul(ce,mt)|0;var Qr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,k=Math.imul(F,De),E=Math.imul(F,Xe),E=E+Math.imul(B,De)|0,C=Math.imul(B,Xe),k=k+Math.imul(X,He)|0,E=E+Math.imul(X,Ge)|0,E=E+Math.imul(D,He)|0,C=C+Math.imul(D,Ge)|0,k=k+Math.imul(Me,pe)|0,E=E+Math.imul(Me,ue)|0,E=E+Math.imul(Ue,pe)|0,C=C+Math.imul(Ue,ue)|0,k=k+Math.imul(Oe,Q)|0,E=E+Math.imul(Oe,K)|0,E=E+Math.imul(Be,Q)|0,C=C+Math.imul(Be,K)|0,k=k+Math.imul(be,se)|0,E=E+Math.imul(be,_e)|0,E=E+Math.imul(Ie,se)|0,C=C+Math.imul(Ie,_e)|0,k=k+Math.imul(me,Ee)|0,E=E+Math.imul(me,Ve)|0,E=E+Math.imul(Pe,Ee)|0,C=C+Math.imul(Pe,Ve)|0,k=k+Math.imul(ae,Fe)|0,E=E+Math.imul(ae,Qe)|0,E=E+Math.imul(ye,Fe)|0,C=C+Math.imul(ye,Qe)|0,k=k+Math.imul(le,We)|0,E=E+Math.imul(le,mt)|0,E=E+Math.imul(L,We)|0,C=C+Math.imul(L,mt)|0;var en=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(en>>>26)|0,en&=67108863,k=Math.imul(F,He),E=Math.imul(F,Ge),E=E+Math.imul(B,He)|0,C=Math.imul(B,Ge),k=k+Math.imul(X,pe)|0,E=E+Math.imul(X,ue)|0,E=E+Math.imul(D,pe)|0,C=C+Math.imul(D,ue)|0,k=k+Math.imul(Me,Q)|0,E=E+Math.imul(Me,K)|0,E=E+Math.imul(Ue,Q)|0,C=C+Math.imul(Ue,K)|0,k=k+Math.imul(Oe,se)|0,E=E+Math.imul(Oe,_e)|0,E=E+Math.imul(Be,se)|0,C=C+Math.imul(Be,_e)|0,k=k+Math.imul(be,Ee)|0,E=E+Math.imul(be,Ve)|0,E=E+Math.imul(Ie,Ee)|0,C=C+Math.imul(Ie,Ve)|0,k=k+Math.imul(me,Fe)|0,E=E+Math.imul(me,Qe)|0,E=E+Math.imul(Pe,Fe)|0,C=C+Math.imul(Pe,Qe)|0,k=k+Math.imul(ae,We)|0,E=E+Math.imul(ae,mt)|0,E=E+Math.imul(ye,We)|0,C=C+Math.imul(ye,mt)|0;var Pr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,k=Math.imul(F,pe),E=Math.imul(F,ue),E=E+Math.imul(B,pe)|0,C=Math.imul(B,ue),k=k+Math.imul(X,Q)|0,E=E+Math.imul(X,K)|0,E=E+Math.imul(D,Q)|0,C=C+Math.imul(D,K)|0,k=k+Math.imul(Me,se)|0,E=E+Math.imul(Me,_e)|0,E=E+Math.imul(Ue,se)|0,C=C+Math.imul(Ue,_e)|0,k=k+Math.imul(Oe,Ee)|0,E=E+Math.imul(Oe,Ve)|0,E=E+Math.imul(Be,Ee)|0,C=C+Math.imul(Be,Ve)|0,k=k+Math.imul(be,Fe)|0,E=E+Math.imul(be,Qe)|0,E=E+Math.imul(Ie,Fe)|0,C=C+Math.imul(Ie,Qe)|0,k=k+Math.imul(me,We)|0,E=E+Math.imul(me,mt)|0,E=E+Math.imul(Pe,We)|0,C=C+Math.imul(Pe,mt)|0;var tn=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(tn>>>26)|0,tn&=67108863,k=Math.imul(F,Q),E=Math.imul(F,K),E=E+Math.imul(B,Q)|0,C=Math.imul(B,K),k=k+Math.imul(X,se)|0,E=E+Math.imul(X,_e)|0,E=E+Math.imul(D,se)|0,C=C+Math.imul(D,_e)|0,k=k+Math.imul(Me,Ee)|0,E=E+Math.imul(Me,Ve)|0,E=E+Math.imul(Ue,Ee)|0,C=C+Math.imul(Ue,Ve)|0,k=k+Math.imul(Oe,Fe)|0,E=E+Math.imul(Oe,Qe)|0,E=E+Math.imul(Be,Fe)|0,C=C+Math.imul(Be,Qe)|0,k=k+Math.imul(be,We)|0,E=E+Math.imul(be,mt)|0,E=E+Math.imul(Ie,We)|0,C=C+Math.imul(Ie,mt)|0;var rn=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(rn>>>26)|0,rn&=67108863,k=Math.imul(F,se),E=Math.imul(F,_e),E=E+Math.imul(B,se)|0,C=Math.imul(B,_e),k=k+Math.imul(X,Ee)|0,E=E+Math.imul(X,Ve)|0,E=E+Math.imul(D,Ee)|0,C=C+Math.imul(D,Ve)|0,k=k+Math.imul(Me,Fe)|0,E=E+Math.imul(Me,Qe)|0,E=E+Math.imul(Ue,Fe)|0,C=C+Math.imul(Ue,Qe)|0,k=k+Math.imul(Oe,We)|0,E=E+Math.imul(Oe,mt)|0,E=E+Math.imul(Be,We)|0,C=C+Math.imul(Be,mt)|0;var rr=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(rr>>>26)|0,rr&=67108863,k=Math.imul(F,Ee),E=Math.imul(F,Ve),E=E+Math.imul(B,Ee)|0,C=Math.imul(B,Ve),k=k+Math.imul(X,Fe)|0,E=E+Math.imul(X,Qe)|0,E=E+Math.imul(D,Fe)|0,C=C+Math.imul(D,Qe)|0,k=k+Math.imul(Me,We)|0,E=E+Math.imul(Me,mt)|0,E=E+Math.imul(Ue,We)|0,C=C+Math.imul(Ue,mt)|0;var nn=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(nn>>>26)|0,nn&=67108863,k=Math.imul(F,Fe),E=Math.imul(F,Qe),E=E+Math.imul(B,Fe)|0,C=Math.imul(B,Qe),k=k+Math.imul(X,We)|0,E=E+Math.imul(X,mt)|0,E=E+Math.imul(D,We)|0,C=C+Math.imul(D,mt)|0;var on=(S+k|0)+((E&8191)<<13)|0;S=(C+(E>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(F,We),E=Math.imul(F,mt),E=E+Math.imul(B,We)|0,C=Math.imul(B,mt);var an=(S+k|0)+((E&8191)<<13)|0;return S=(C+(E>>>13)|0)+(an>>>26)|0,an&=67108863,v[0]=Je,v[1]=it,v[2]=hr,v[3]=br,v[4]=ir,v[5]=Fr,v[6]=ar,v[7]=Jr,v[8]=Zr,v[9]=Xr,v[10]=Qr,v[11]=en,v[12]=Pr,v[13]=tn,v[14]=rn,v[15]=rr,v[16]=nn,v[17]=on,v[18]=an,S!==0&&(v[19]=S,f.length++),f};Math.imul||(A=w);function T(q,_,y){y.negative=_.negative^q.negative,y.length=q.length+_.length;for(var f=0,h=0,x=0;x>>26)|0,h+=v>>>26,v&=67108863}y.words[x]=S,f=v,v=h}return f!==0?y.words[x]=f:y.length--,y.strip()}function O(q,_,y){var f=new P;return f.mulp(q,_,y)}i.prototype.mulTo=function(_,y){var f,h=this.length+_.length;return this.length===10&&_.length===10?f=A(this,_,y):h<63?f=w(this,_,y):h<1024?f=T(this,_,y):f=O(this,_,y),f};function P(q,_){this.x=q,this.y=_}P.prototype.makeRBT=function(_){for(var y=new Array(_),f=i.prototype._countBits(_)-1,h=0;h<_;h++)y[h]=this.revBin(h,f,_);return y},P.prototype.revBin=function(_,y,f){if(_===0||_===f-1)return _;for(var h=0,x=0;x>=1;return h},P.prototype.permute=function(_,y,f,h,x,v){for(var S=0;S>>1)x++;return 1<>>13,f[2*v+1]=x&8191,x=x>>>13;for(v=2*y;v>=26,y+=h/67108864|0,y+=x>>>26,this.words[f]=x&67108863}return y!==0&&(this.words[f]=y,this.length++),this},i.prototype.muln=function(_){return this.clone().imuln(_)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(_){var y=m(_);if(y.length===0)return new i(1);for(var f=this,h=0;h=0);var y=_%26,f=(_-y)/26,h=67108863>>>26-y<<26-y,x;if(y!==0){var v=0;for(x=0;x>>26-y}v&&(this.words[x]=v,this.length++)}if(f!==0){for(x=this.length-1;x>=0;x--)this.words[x+f]=this.words[x];for(x=0;x=0);var h;y?h=(y-y%26)/26:h=0;var x=_%26,v=Math.min((_-x)/26,this.length),S=67108863^67108863>>>x<v)for(this.length-=v,E=0;E=0&&(C!==0||E>=h);E--){var g=this.words[E]|0;this.words[E]=C<<26-x|g>>>x,C=g&S}return k&&C!==0&&(k.words[k.length++]=C),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(_,y,f){return n(this.negative===0),this.iushrn(_,y,f)},i.prototype.shln=function(_){return this.clone().ishln(_)},i.prototype.ushln=function(_){return this.clone().iushln(_)},i.prototype.shrn=function(_){return this.clone().ishrn(_)},i.prototype.ushrn=function(_){return this.clone().iushrn(_)},i.prototype.testn=function(_){n(typeof _=="number"&&_>=0);var y=_%26,f=(_-y)/26,h=1<=0);var y=_%26,f=(_-y)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(y!==0&&f++,this.length=Math.min(f,this.length),y!==0){var h=67108863^67108863>>>y<=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},i.prototype.isubn=function(_){if(n(typeof _=="number"),n(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y>26)-(k/67108864|0),this.words[x+f]=v&67108863}for(;x>26,this.words[x+f]=v&67108863;if(S===0)return this.strip();for(n(S===-1),S=0,x=0;x>26,this.words[x]=v&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(_,y){var f=this.length-_.length,h=this.clone(),x=_,v=x.words[x.length-1]|0,S=this._countBits(v);f=26-S,f!==0&&(x=x.ushln(f),h.iushln(f),v=x.words[x.length-1]|0);var k=h.length-x.length,E;if(y!=="mod"){E=new i(null),E.length=k+1,E.words=new Array(E.length);for(var C=0;C=0;M--){var re=(h.words[x.length+M]|0)*67108864+(h.words[x.length+M-1]|0);for(re=Math.min(re/v|0,67108863),h._ishlnsubmul(x,re,M);h.negative!==0;)re--,h.negative=0,h._ishlnsubmul(x,1,M),h.isZero()||(h.negative^=1);E&&(E.words[M]=re)}return E&&E.strip(),h.strip(),y!=="div"&&f!==0&&h.iushrn(f),{div:E||null,mod:h}},i.prototype.divmod=function(_,y,f){if(n(!_.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var h,x,v;return this.negative!==0&&_.negative===0?(v=this.neg().divmod(_,y),y!=="mod"&&(h=v.div.neg()),y!=="div"&&(x=v.mod.neg(),f&&x.negative!==0&&x.iadd(_)),{div:h,mod:x}):this.negative===0&&_.negative!==0?(v=this.divmod(_.neg(),y),y!=="mod"&&(h=v.div.neg()),{div:h,mod:v.mod}):this.negative&_.negative?(v=this.neg().divmod(_.neg(),y),y!=="div"&&(x=v.mod.neg(),f&&x.negative!==0&&x.isub(_)),{div:v.div,mod:x}):_.length>this.length||this.cmp(_)<0?{div:new i(0),mod:this}:_.length===1?y==="div"?{div:this.divn(_.words[0]),mod:null}:y==="mod"?{div:null,mod:new i(this.modn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new i(this.modn(_.words[0]))}:this._wordDiv(_,y)},i.prototype.div=function(_){return this.divmod(_,"div",!1).div},i.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},i.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},i.prototype.divRound=function(_){var y=this.divmod(_);if(y.mod.isZero())return y.div;var f=y.div.negative!==0?y.mod.isub(_):y.mod,h=_.ushrn(1),x=_.andln(1),v=f.cmp(h);return v<0||x===1&&v===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},i.prototype.modn=function(_){n(_<=67108863);for(var y=(1<<26)%_,f=0,h=this.length-1;h>=0;h--)f=(y*f+(this.words[h]|0))%_;return f},i.prototype.idivn=function(_){n(_<=67108863);for(var y=0,f=this.length-1;f>=0;f--){var h=(this.words[f]|0)+y*67108864;this.words[f]=h/_|0,y=h%_}return this.strip()},i.prototype.divn=function(_){return this.clone().idivn(_)},i.prototype.egcd=function(_){n(_.negative===0),n(!_.isZero());var y=this,f=_.clone();y.negative!==0?y=y.umod(_):y=y.clone();for(var h=new i(1),x=new i(0),v=new i(0),S=new i(1),k=0;y.isEven()&&f.isEven();)y.iushrn(1),f.iushrn(1),++k;for(var E=f.clone(),C=y.clone();!y.isZero();){for(var g=0,M=1;!(y.words[0]&M)&&g<26;++g,M<<=1);if(g>0)for(y.iushrn(g);g-- >0;)(h.isOdd()||x.isOdd())&&(h.iadd(E),x.isub(C)),h.iushrn(1),x.iushrn(1);for(var re=0,W=1;!(f.words[0]&W)&&re<26;++re,W<<=1);if(re>0)for(f.iushrn(re);re-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(E),S.isub(C)),v.iushrn(1),S.iushrn(1);y.cmp(f)>=0?(y.isub(f),h.isub(v),x.isub(S)):(f.isub(y),v.isub(h),S.isub(x))}return{a:v,b:S,gcd:f.iushln(k)}},i.prototype._invmp=function(_){n(_.negative===0),n(!_.isZero());var y=this,f=_.clone();y.negative!==0?y=y.umod(_):y=y.clone();for(var h=new i(1),x=new i(0),v=f.clone();y.cmpn(1)>0&&f.cmpn(1)>0;){for(var S=0,k=1;!(y.words[0]&k)&&S<26;++S,k<<=1);if(S>0)for(y.iushrn(S);S-- >0;)h.isOdd()&&h.iadd(v),h.iushrn(1);for(var E=0,C=1;!(f.words[0]&C)&&E<26;++E,C<<=1);if(E>0)for(f.iushrn(E);E-- >0;)x.isOdd()&&x.iadd(v),x.iushrn(1);y.cmp(f)>=0?(y.isub(f),h.isub(x)):(f.isub(y),x.isub(h))}var g;return y.cmpn(1)===0?g=h:g=x,g.cmpn(0)<0&&g.iadd(_),g},i.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var y=this.clone(),f=_.clone();y.negative=0,f.negative=0;for(var h=0;y.isEven()&&f.isEven();h++)y.iushrn(1),f.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;f.isEven();)f.iushrn(1);var x=y.cmp(f);if(x<0){var v=y;y=f,f=v}else if(x===0||f.cmpn(1)===0)break;y.isub(f)}while(!0);return f.iushln(h)},i.prototype.invm=function(_){return this.egcd(_).a.umod(_)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(_){return this.words[0]&_},i.prototype.bincn=function(_){n(typeof _=="number");var y=_%26,f=(_-y)/26,h=1<>>26,S&=67108863,this.words[v]=S}return x!==0&&(this.words[v]=x,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(_){var y=_<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var f;if(this.length>1)f=1;else{y&&(_=-_),n(_<=67108863,"Number is too big");var h=this.words[0]|0;f=h===_?0:h<_?-1:1}return this.negative!==0?-f|0:f},i.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var y=this.ucmp(_);return this.negative!==0?-y|0:y},i.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var y=0,f=this.length-1;f>=0;f--){var h=this.words[f]|0,x=_.words[f]|0;if(h!==x){hx&&(y=1);break}}return y},i.prototype.gtn=function(_){return this.cmpn(_)===1},i.prototype.gt=function(_){return this.cmp(_)===1},i.prototype.gten=function(_){return this.cmpn(_)>=0},i.prototype.gte=function(_){return this.cmp(_)>=0},i.prototype.ltn=function(_){return this.cmpn(_)===-1},i.prototype.lt=function(_){return this.cmp(_)===-1},i.prototype.lten=function(_){return this.cmpn(_)<=0},i.prototype.lte=function(_){return this.cmp(_)<=0},i.prototype.eqn=function(_){return this.cmpn(_)===0},i.prototype.eq=function(_){return this.cmp(_)===0},i.red=function(_){return new V(_)},i.prototype.toRed=function(_){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(_){return this.red=_,this},i.prototype.forceRed=function(_){return n(!this.red,"Already a number in reduction context"),this._forceRed(_)},i.prototype.redAdd=function(_){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},i.prototype.redIAdd=function(_){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},i.prototype.redSub=function(_){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},i.prototype.redISub=function(_){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},i.prototype.redShl=function(_){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},i.prototype.redMul=function(_){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},i.prototype.redIMul=function(_){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(_){return n(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var $={k256:null,p224:null,p192:null,p25519:null};function R(q,_){this.name=q,this.p=new i(_,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}R.prototype._tmp=function(){var _=new i(null);return _.words=new Array(Math.ceil(this.n/13)),_},R.prototype.ireduce=function(_){var y=_,f;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),f=y.bitLength();while(f>this.n);var h=f0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},R.prototype.split=function(_,y){_.iushrn(this.n,0,y)},R.prototype.imulK=function(_){return _.imul(this.k)};function j(){R.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(j,R),j.prototype.split=function(_,y){for(var f=4194303,h=Math.min(_.length,9),x=0;x>>22,v=S}v>>>=22,_.words[x-10]=v,v===0&&_.length>10?_.length-=10:_.length-=9},j.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var y=0,f=0;f<_.length;f++){var h=_.words[f]|0;y+=h*977,_.words[f]=y&67108863,y=h*64+(y/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_};function I(){R.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(I,R);function b(){R.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(b,R);function N(){R.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(N,R),N.prototype.imulK=function(_){for(var y=0,f=0;f<_.length;f++){var h=(_.words[f]|0)*19+y,x=h&67108863;h>>>=26,_.words[f]=x,y=h}return y!==0&&(_.words[_.length++]=y),_},i._prime=function(_){if($[_])return $[_];var y;if(_==="k256")y=new j;else if(_==="p224")y=new I;else if(_==="p192")y=new b;else if(_==="p25519")y=new N;else throw new Error("Unknown prime "+_);return $[_]=y,y};function V(q){if(typeof q=="string"){var _=i._prime(q);this.m=_.p,this.prime=_}else n(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}V.prototype._verify1=function(_){n(_.negative===0,"red works only with positives"),n(_.red,"red works only with red numbers")},V.prototype._verify2=function(_,y){n((_.negative|y.negative)===0,"red works only with positives"),n(_.red&&_.red===y.red,"red works only with red numbers")},V.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):_.umod(this.m)._forceRed(this)},V.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},V.prototype.add=function(_,y){this._verify2(_,y);var f=_.add(y);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},V.prototype.iadd=function(_,y){this._verify2(_,y);var f=_.iadd(y);return f.cmp(this.m)>=0&&f.isub(this.m),f},V.prototype.sub=function(_,y){this._verify2(_,y);var f=_.sub(y);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},V.prototype.isub=function(_,y){this._verify2(_,y);var f=_.isub(y);return f.cmpn(0)<0&&f.iadd(this.m),f},V.prototype.shl=function(_,y){return this._verify1(_),this.imod(_.ushln(y))},V.prototype.imul=function(_,y){return this._verify2(_,y),this.imod(_.imul(y))},V.prototype.mul=function(_,y){return this._verify2(_,y),this.imod(_.mul(y))},V.prototype.isqr=function(_){return this.imul(_,_.clone())},V.prototype.sqr=function(_){return this.mul(_,_)},V.prototype.sqrt=function(_){if(_.isZero())return _.clone();var y=this.m.andln(3);if(n(y%2===1),y===3){var f=this.m.add(new i(1)).iushrn(2);return this.pow(_,f)}for(var h=this.m.subn(1),x=0;!h.isZero()&&h.andln(1)===0;)x++,h.iushrn(1);n(!h.isZero());var v=new i(1).toRed(this),S=v.redNeg(),k=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new i(2*E*E).toRed(this);this.pow(E,k).cmp(S)!==0;)E.redIAdd(S);for(var C=this.pow(E,h),g=this.pow(_,h.addn(1).iushrn(1)),M=this.pow(_,h),re=x;M.cmp(v)!==0;){for(var W=M,ee=0;W.cmp(v)!==0;ee++)W=W.redSqr();n(ee=0;x--){for(var C=y.words[x],g=E-1;g>=0;g--){var M=C>>g&1;if(v!==h[0]&&(v=this.sqr(v)),M===0&&S===0){k=0;continue}S<<=1,S|=M,k++,!(k!==f&&(x!==0||g!==0))&&(v=this.mul(v,h[S]),k=0,S=0)}E=26}return v},V.prototype.convertTo=function(_){var y=_.umod(this.m);return y===_?y.clone():y},V.prototype.convertFrom=function(_){var y=_.clone();return y.red=null,y},i.mont=function(_){return new Z(_)};function Z(q){V.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(Z,V),Z.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},Z.prototype.convertFrom=function(_){var y=this.imod(_.mul(this.rinv));return y.red=null,y},Z.prototype.imul=function(_,y){if(_.isZero()||y.isZero())return _.words[0]=0,_.length=1,_;var f=_.imul(y),h=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=f.isub(h).iushrn(this.shift),v=x;return x.cmp(this.m)>=0?v=x.isub(this.m):x.cmpn(0)<0&&(v=x.iadd(this.m)),v._forceRed(this)},Z.prototype.mul=function(_,y){if(_.isZero()||y.isZero())return new i(0)._forceRed(this);var f=_.mul(y),h=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=f.isub(h).iushrn(this.shift),v=x;return x.cmp(this.m)>=0?v=x.isub(this.m):x.cmpn(0)<0&&(v=x.iadd(this.m)),v._forceRed(this)},Z.prototype.invm=function(_){var y=this.imod(_._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(e,Ae)})(S8);var Cs=S8.exports,xu=YZ;function YZ(e,t){if(!e)throw new Error(t||"Assertion failed")}YZ.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)};var E8={};(function(e){var t=e;function r(i,a){if(Array.isArray(i))return i.slice();if(!i)return[];var s=[];if(typeof i!="string"){for(var c=0;c>8,d=l&255;u?s.push(u,d):s.push(d)}return s}t.toArray=r;function n(i){return i.length===1?"0"+i:i}t.zero2=n;function o(i){for(var a="",s=0;s(w>>1)-1?O=(w>>1)-P:O=P,A.isubn(O)):O=0,m[T]=O,A.iushrn(1)}return m}t.getNAF=i;function a(u,d){var p=[[],[]];u=u.clone(),d=d.clone();for(var m=0,w=0,A;u.cmpn(-m)>0||d.cmpn(-w)>0;){var T=u.andln(3)+m&3,O=d.andln(3)+w&3;T===3&&(T=-1),O===3&&(O=-1);var P;T&1?(A=u.andln(7)+m&7,(A===3||A===5)&&O===2?P=-T:P=T):P=0,p[0].push(P);var $;O&1?(A=d.andln(7)+w&7,(A===3||A===5)&&T===2?$=-O:$=O):$=0,p[1].push($),2*m===P+1&&(m=1-m),2*w===$+1&&(w=1-w),u.iushrn(1),d.iushrn(1)}return p}t.getJSF=a;function s(u,d,p){var m="_"+d;u.prototype[d]=function(){return this[m]!==void 0?this[m]:this[m]=p.call(this)}}t.cachedProperty=s;function c(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=c;function l(u){return new r(u,"hex","le")}t.intFromLE=l})(jo);var C8={exports:{}},Z5;C8.exports=function(t){return Z5||(Z5=new oc(null)),Z5.generate(t)};function oc(e){this.rand=e}C8.exports.Rand=oc;oc.prototype.generate=function(t){return this._rand(t)};oc.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),n=0;n0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m2=Hc;Hc.prototype.point=function(){throw new Error("Not implemented")};Hc.prototype.validate=function(){throw new Error("Not implemented")};Hc.prototype._fixedNafMul=function(t,r){Ob(t.precomputed);var n=t._getDoubles(),o=Ab(r,1,this._bitLength),i=(1<=s;l--)c=(c<<1)+o[l];a.push(c)}for(var u=this.jpoint(null,null,null),d=this.jpoint(null,null,null),p=i;p>0;p--){for(s=0;s=0;c--){for(var l=0;c>=0&&a[c]===0;c--)l++;if(c>=0&&l++,s=s.dblp(l),c<0)break;var u=a[c];Ob(u!==0),t.type==="affine"?u>0?s=s.mixedAdd(i[u-1>>1]):s=s.mixedAdd(i[-u-1>>1].neg()):u>0?s=s.add(i[u-1>>1]):s=s.add(i[-u-1>>1].neg())}return t.type==="affine"?s.toP():s};Hc.prototype._wnafMulAdd=function(t,r,n,o,i){var a=this._wnafT1,s=this._wnafT2,c=this._wnafT3,l=0,u,d,p;for(u=0;u=1;u-=2){var w=u-1,A=u;if(a[w]!==1||a[A]!==1){c[w]=Ab(n[w],a[w],this._bitLength),c[A]=Ab(n[A],a[A],this._bitLength),l=Math.max(c[w].length,l),l=Math.max(c[A].length,l);continue}var T=[r[w],null,null,r[A]];r[w].y.cmp(r[A].y)===0?(T[1]=r[w].add(r[A]),T[2]=r[w].toJ().mixedAdd(r[A].neg())):r[w].y.cmp(r[A].y.redNeg())===0?(T[1]=r[w].toJ().mixedAdd(r[A]),T[2]=r[w].add(r[A].neg())):(T[1]=r[w].toJ().mixedAdd(r[A]),T[2]=r[w].toJ().mixedAdd(r[A].neg()));var O=[-3,-1,-5,-7,0,7,5,1,3],P=ske(n[w],n[A]);for(l=Math.max(P[0].length,l),c[w]=new Array(l),c[A]=new Array(l),d=0;d=0;u--){for(var b=0;u>=0;){var N=!0;for(d=0;d=0&&b++,j=j.dblp(b),u<0)break;for(d=0;d0?p=s[d][V-1>>1]:V<0&&(p=s[d][-V-1>>1].neg()),p.type==="affine"?j=j.mixedAdd(p):j=j.add(p))}}for(u=0;u=Math.ceil((t.bitLength()+1)/r.step):!1};fi.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,i=0;i=0&&(m=l,w=u),d.negative&&(d=d.neg(),p=p.neg()),m.negative&&(m=m.neg(),w=w.neg()),[{a:d,b:p},{a:m,b:w}]};di.prototype._endoSplit=function(t){var r=this.endo.basis,n=r[0],o=r[1],i=o.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),c=a.mul(o.a),l=i.mul(n.b),u=a.mul(o.b),d=t.sub(s).sub(c),p=l.add(u).neg();return{k1:d,k2:p}};di.prototype.pointFromX=function(t,r){t=new vr(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=o.fromRed().isOdd();return(r&&!i||!r&&i)&&(o=o.redNeg()),this.point(t,o)};di.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,n=t.y,o=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};di.prototype._endoWnafMulAdd=function(t,r,n){for(var o=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""};Yr.prototype.isInfinity=function(){return this.inf};Yr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(t.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};Yr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};Yr.prototype.getX=function(){return this.x.fromRed()};Yr.prototype.getY=function(){return this.y.fromRed()};Yr.prototype.mul=function(t){return t=new vr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Yr.prototype.mulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i):this.curve._wnafMulAdd(1,o,i,2)};Yr.prototype.jmulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i,!0):this.curve._wnafMulAdd(1,o,i,2,!0)};Yr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Yr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,o=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};Yr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function _n(e,t,r,n){Md.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new vr(0)):(this.x=new vr(t,16),this.y=new vr(r,16),this.z=new vr(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}A8(_n,Md.BasePoint);di.prototype.jpoint=function(t,r,n){return new _n(this,t,r,n)};_n.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(t);return this.curve.point(n,o)};_n.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};_n.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),i=t.x.redMul(n),a=this.y.redMul(r.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),c=o.redSub(i),l=a.redSub(s);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=c.redSqr(),d=u.redMul(c),p=o.redMul(u),m=l.redSqr().redIAdd(d).redISub(p).redISub(p),w=l.redMul(p.redISub(m)).redISub(a.redMul(d)),A=this.z.redMul(t.z).redMul(c);return this.curve.jpoint(m,w,A)};_n.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=t.x.redMul(r),i=this.y,a=t.y.redMul(r).redMul(this.z),s=n.redSub(o),c=i.redSub(a);if(s.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=s.redSqr(),u=l.redMul(s),d=n.redMul(l),p=c.redSqr().redIAdd(u).redISub(d).redISub(d),m=c.redMul(d.redISub(p)).redISub(i.redMul(u)),w=this.z.redMul(s);return this.curve.jpoint(p,m,w)};_n.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)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(i),this.x.cmp(n)===0)return!0}};_n.prototype.inspect=function(){return this.isInfinity()?"":""};_n.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var pf=Cs,ZZ=v2,y2=m2,fke=jo;function kd(e){y2.call(this,"mont",e),this.a=new pf(e.a,16).toRed(this.red),this.b=new pf(e.b,16).toRed(this.red),this.i4=new pf(4).toRed(this.red).redInvm(),this.two=new pf(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}ZZ(kd,y2);var dke=kd;kd.prototype.validate=function(t){var r=t.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=o.redSqrt();return i.redSqr().cmp(o)===0};function qr(e,t,r){y2.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new pf(t,16),this.z=new pf(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}ZZ(qr,y2.BasePoint);kd.prototype.decodePoint=function(t,r){return this.point(fke.toArray(t,r),1)};kd.prototype.point=function(t,r){return new qr(this,t,r)};kd.prototype.pointFromJSON=function(t){return qr.fromJSON(this,t)};qr.prototype.precompute=function(){};qr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};qr.fromJSON=function(t,r){return new qr(t,r[0],r[1]||t.one)};qr.prototype.inspect=function(){return this.isInfinity()?"":""};qr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};qr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),i=r.redSub(o),a=r.redMul(o),s=i.redMul(o.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,s)};qr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};qr.prototype.diffAdd=function(t,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z),s=a.redMul(n),c=i.redMul(o),l=r.z.redMul(s.redAdd(c).redSqr()),u=r.x.redMul(s.redISub(c).redSqr());return this.curve.point(l,u)};qr.prototype.mul=function(t){for(var r=t.clone(),n=this,o=this.curve.point(null,null),i=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(o,i),o=o.dbl()):(o=n.diffAdd(o,i),n=n.dbl());return o};qr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};qr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};qr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};qr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};qr.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var hke=jo,Ja=Cs,XZ=v2,b2=m2,pke=hke.assert;function Ia(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,b2.call(this,"edwards",e),this.a=new Ja(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Ja(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Ja(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),pke(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}XZ(Ia,b2);var gke=Ia;Ia.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Ia.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Ia.prototype.jpoint=function(t,r,n,o){return this.point(t,r,n,o)};Ia.prototype.pointFromX=function(t,r){t=new Ja(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var c=s.fromRed().isOdd();return(r&&!c||!r&&c)&&(s=s.redNeg()),this.point(t,s)};Ia.prototype.pointFromY=function(t,r){t=new Ja(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,t)};Ia.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),n=t.y.redSqr(),o=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(i)===0};function Vt(e,t,r,n,o){b2.BasePoint.call(this,e,"projective"),t===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Ja(t,16),this.y=new Ja(r,16),this.z=n?new Ja(n,16):this.curve.one,this.t=o&&new Ja(o,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}XZ(Vt,b2.BasePoint);Ia.prototype.pointFromJSON=function(t){return Vt.fromJSON(this,t)};Ia.prototype.point=function(t,r,n,o){return new Vt(this,t,r,n,o)};Vt.fromJSON=function(t,r){return new Vt(t,r[0],r[1],r[2])};Vt.prototype.inspect=function(){return this.isInfinity()?"":""};Vt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Vt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),a=o.redAdd(r),s=a.redSub(n),c=o.redSub(r),l=i.redMul(s),u=a.redMul(c),d=i.redMul(c),p=s.redMul(a);return this.curve.point(l,u,p,d)};Vt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,i,a,s,c,l;if(this.curve.twisted){s=this.curve._mulA(r);var u=s.redAdd(n);this.zOne?(o=t.redSub(r).redSub(n).redMul(u.redSub(this.curve.two)),i=u.redMul(s.redSub(n)),a=u.redSqr().redSub(u).redSub(u)):(c=this.z.redSqr(),l=u.redSub(c).redISub(c),o=t.redSub(r).redISub(n).redMul(l),i=u.redMul(s.redSub(n)),a=u.redMul(l))}else s=r.redAdd(n),c=this.curve._mulC(this.z).redSqr(),l=s.redSub(c).redSub(c),o=this.curve._mulC(t.redISub(s)).redMul(l),i=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(l);return this.curve.point(o,i,a)};Vt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Vt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),o=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(r),s=i.redSub(o),c=i.redAdd(o),l=n.redAdd(r),u=a.redMul(s),d=c.redMul(l),p=a.redMul(l),m=s.redMul(c);return this.curve.point(u,d,m,p)};Vt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),i=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(i),s=n.redSub(a),c=n.redAdd(a),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(i),u=r.redMul(s).redMul(l),d,p;return this.curve.twisted?(d=r.redMul(c).redMul(i.redSub(this.curve._mulA(o))),p=s.redMul(c)):(d=r.redMul(c).redMul(i.redSub(o)),p=this.curve._mulC(s).redMul(c)),this.curve.point(u,d,p)};Vt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Vt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Vt.prototype.mulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!1)};Vt.prototype.jmulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!0)};Vt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Vt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Vt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Vt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Vt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Vt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};Vt.prototype.toP=Vt.prototype.normalize;Vt.prototype.mixedAdd=Vt.prototype.add;(function(e){var t=e;t.base=m2,t.short=uke,t.mont=dke,t.edwards=gke})(P8);var w2={},_2={},Pt={},mke=xu,vke=v2;Pt.inherits=vke;function yke(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function bke(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),o=0;o>6|192,r[n++]=i&63|128):yke(e,o)?(i=65536+((i&1023)<<10)+(e.charCodeAt(++o)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(o=0;o>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Pt.htonl=QZ;function _ke(e,t){for(var r="",n=0;n>>0}return i}Pt.join32=xke;function Ske(e,t){for(var r=new Array(e.length*4),n=0,o=0;n>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=i&255)}return r}Pt.split32=Ske;function Eke(e,t){return e>>>t|e<<32-t}Pt.rotr32=Eke;function Cke(e,t){return e<>>32-t}Pt.rotl32=Cke;function Pke(e,t){return e+t>>>0}Pt.sum32=Pke;function Ake(e,t,r){return e+t+r>>>0}Pt.sum32_3=Ake;function Oke(e,t,r,n){return e+t+r+n>>>0}Pt.sum32_4=Oke;function Ike(e,t,r,n,o){return e+t+r+n+o>>>0}Pt.sum32_5=Ike;function Tke(e,t,r,n){var o=e[t],i=e[t+1],a=n+i>>>0,s=(a>>0,e[t+1]=a}Pt.sum64=Tke;function Mke(e,t,r,n){var o=t+n>>>0,i=(o>>0}Pt.sum64_hi=Mke;function kke(e,t,r,n){var o=t+n;return o>>>0}Pt.sum64_lo=kke;function $ke(e,t,r,n,o,i,a,s){var c=0,l=t;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Pt.sum64_4_hi=$ke;function Dke(e,t,r,n,o,i,a,s){var c=t+n+i+s;return c>>>0}Pt.sum64_4_lo=Dke;function Rke(e,t,r,n,o,i,a,s,c,l){var u=0,d=t;d=d+n>>>0,u+=d>>0,u+=d>>0,u+=d>>0,u+=d>>0}Pt.sum64_5_hi=Rke;function Nke(e,t,r,n,o,i,a,s,c,l){var u=t+n+i+s+l;return u>>>0}Pt.sum64_5_lo=Nke;function Bke(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}Pt.rotr64_hi=Bke;function Fke(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Pt.rotr64_lo=Fke;function jke(e,t,r){return e>>>r}Pt.shr64_hi=jke;function Lke(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Pt.shr64_lo=Lke;var $d={},iD=Pt,Uke=xu;function x2(){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}$d.BlockHash=x2;x2.prototype.update=function(t,r){if(t=iD.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=iD.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,o[i++]=t>>>16&255,o[i++]=t>>>8&255,o[i++]=t&255}else for(o[i++]=t&255,o[i++]=t>>>8&255,o[i++]=t>>>16&255,o[i++]=t>>>24&255,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,a=8;a>>3}Ta.g0_256=Wke;function Gke(e){return ya(e,17)^ya(e,19)^e>>>10}Ta.g1_256=Gke;var ed=Pt,Kke=$d,Yke=Ta,X5=ed.rotl32,Oh=ed.sum32,Jke=ed.sum32_5,Zke=Yke.ft_1,iX=Kke.BlockHash,Xke=[1518500249,1859775393,2400959708,3395469782];function Sa(){if(!(this instanceof Sa))return new Sa;iX.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ed.inherits(Sa,iX);var Qke=Sa;Sa.blockSize=512;Sa.outSize=160;Sa.hmacStrength=80;Sa.padLength=64;Sa.prototype._update=function(t,r){for(var n=this.W,o=0;o<16;o++)n[o]=t[r+o];for(;othis.blockSize&&(t=new this.Hash().update(t).digest()),L$e(t.length<=this.blockSize);for(var r=t.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var V$e=Tc;Tc.prototype._init=function(t,r,n){var o=t.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1};Tc.prototype.generate=function(t,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=zl.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length"};var Ib=Cs,O8=jo,K$e=O8.assert;function S2(e,t){if(e instanceof S2)return e;this._importDER(e,t)||(K$e(e.r&&e.s,"Signature without r or s"),this.r=new Ib(e.r,16),this.s=new Ib(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var Y$e=S2;function J$e(){this.place=0}function r3(e,t){var r=e[t.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return o<=127?!1:(t.place=a,o)}function uD(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}S2.prototype.toDER=function(t){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=uD(r),n=uD(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];n3(o,r.length),o=o.concat(r),o.push(2),n3(o,n.length);var i=o.concat(n),a=[48];return n3(a,i.length),a=a.concat(i),O8.encode(a,t)};var Vl=Cs,vX=V$e,Z$e=jo,o3=w2,X$e=JZ,yX=Z$e.assert,I8=G$e,E2=Y$e;function ci(e){if(!(this instanceof ci))return new ci(e);typeof e=="string"&&(yX(Object.prototype.hasOwnProperty.call(o3,e),"Unknown curve "+e),e=o3[e]),e instanceof o3.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var Q$e=ci;ci.prototype.keyPair=function(t){return new I8(this,t)};ci.prototype.keyFromPrivate=function(t,r){return I8.fromPrivate(this,t,r)};ci.prototype.keyFromPublic=function(t,r){return I8.fromPublic(this,t,r)};ci.prototype.genKeyPair=function(t){t||(t={});for(var r=new vX({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||X$e(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new Vl(2));;){var i=new Vl(r.generate(n));if(!(i.cmp(o)>0))return i.iaddn(1),this.keyFromPrivate(i)}};ci.prototype._truncateToN=function(t,r){var n=t.byteLength()*8-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};ci.prototype.sign=function(t,r,n,o){typeof n=="object"&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),t=this._truncateToN(new Vl(t,16));for(var i=this.n.byteLength(),a=r.getPrivate().toArray("be",i),s=t.toArray("be",i),c=new vX({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new Vl(1)),u=0;;u++){var d=o.k?o.k(u):new Vl(c.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),w=m.umod(this.n);if(w.cmpn(0)!==0){var A=d.invm(this.n).mul(w.mul(r.getPrivate()).iadd(t));if(A=A.umod(this.n),A.cmpn(0)!==0){var T=(p.getY().isOdd()?1:0)|(m.cmp(w)!==0?2:0);return o.canonical&&A.cmp(this.nh)>0&&(A=this.n.sub(A),T^=1),new E2({r:w,s:A,recoveryParam:T})}}}}}};ci.prototype.verify=function(t,r,n,o){t=this._truncateToN(new Vl(t,16)),n=this.keyFromPublic(n,o),r=new E2(r,"hex");var i=r.r,a=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),c=s.mul(t).umod(this.n),l=s.mul(i).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.eqXToP(i)):(u=this.g.mulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.getX().umod(this.n).cmp(i)===0)};ci.prototype.recoverPubKey=function(e,t,r,n){yX((3&r)===r,"The recovery param is more than two bits"),t=new E2(t,n);var o=this.n,i=new Vl(e),a=t.r,s=t.s,c=r&1,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?a=this.curve.pointFromX(a.add(this.curve.n),c):a=this.curve.pointFromX(a,c);var u=t.r.invm(o),d=o.sub(i).mul(u).umod(o),p=s.mul(u).umod(o);return this.g.mulAdd(d,a,p)};ci.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new E2(t,n),t.recoveryParam!==null)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch{continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var ig=jo,bX=ig.assert,fD=ig.parseBytes,Nd=ig.cachedProperty;function zr(e,t){this.eddsa=e,this._secret=fD(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=fD(t.pub)}zr.fromPublic=function(t,r){return r instanceof zr?r:new zr(t,{pub:r})};zr.fromSecret=function(t,r){return r instanceof zr?r:new zr(t,{secret:r})};zr.prototype.secret=function(){return this._secret};Nd(zr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Nd(zr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Nd(zr,"privBytes",function(){var t=this.eddsa,r=this.hash(),n=t.encodingLength-1,o=r.slice(0,t.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});Nd(zr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Nd(zr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Nd(zr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});zr.prototype.sign=function(t){return bX(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};zr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};zr.prototype.getSecret=function(t){return bX(this._secret,"KeyPair is public only"),ig.encode(this.secret(),t)};zr.prototype.getPublic=function(t){return ig.encode(this.pubBytes(),t)};var eDe=zr,tDe=Cs,C2=jo,rDe=C2.assert,P2=C2.cachedProperty,nDe=C2.parseBytes;function Su(e,t){this.eddsa=e,typeof t!="object"&&(t=nDe(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),rDe(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof tDe&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}P2(Su,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});P2(Su,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});P2(Su,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});P2(Su,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Su.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Su.prototype.toHex=function(){return C2.encode(this.toBytes(),"hex").toUpperCase()};var oDe=Su,iDe=_2,aDe=w2,nd=jo,sDe=nd.assert,wX=nd.parseBytes,_X=eDe,dD=oDe;function fo(e){if(sDe(e==="ed25519","only tested with ed25519 so far"),!(this instanceof fo))return new fo(e);e=aDe[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=iDe.sha512}var cDe=fo;fo.prototype.sign=function(t,r){t=wX(t);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),t),i=this.g.mul(o),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),c=o.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:a})};fo.prototype.verify=function(t,r,n){t=wX(t),r=this.makeSignature(r);var o=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),o.pubBytes(),t),a=this.g.mul(r.S()),s=r.R().add(o.pub().mul(i));return s.eq(a)};fo.prototype.hashInt=function(){for(var t=this.hash(),r=0;r0?f:h},i.min=function(f,h){return f.cmp(h)<0?f:h},i.prototype._init=function(f,h,x){if(typeof f=="number")return this._initNumber(f,h,x);if(typeof f=="object")return this._initArray(f,h,x);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&(v++,this.negative=1),v=0;v-=3)k=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[S]|=k<>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);else if(x==="le")for(v=0,S=0;v>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);return this._strip()};function s(y,f){var h=y.charCodeAt(f);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+y)}function c(y,f,h){var x=s(y,h);return h-1>=f&&(x|=s(y,h-1)<<4),x}i.prototype._parseHex=function(f,h,x){this.length=Math.ceil((f.length-h)/6),this.words=new Array(this.length);for(var v=0;v=h;v-=2)E=c(f,h,v)<=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8;else{var C=f.length-h;for(v=C%2===0?h+1:h;v=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8}this._strip()};function l(y,f,h,x){for(var v=0,S=0,k=Math.min(y.length,h),E=f;E=49?S=C-49+10:C>=17?S=C-17+10:S=C,n(C>=0&&S1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var p=["","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"],m=[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],w=[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];i.prototype.toString=function(f,h){f=f||10,h=h|0||1;var x;if(f===16||f==="hex"){x="";for(var v=0,S=0,k=0;k>>24-v&16777215,v+=2,v>=26&&(v-=26,k--),S!==0||k!==this.length-1?x=p[6-C.length]+C+x:x=C+x}for(S!==0&&(x=S.toString(16)+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(f===(f|0)&&f>=2&&f<=36){var g=m[f],M=w[f];x="";var re=this.clone();for(re.negative=0;!re.isZero();){var W=re.modrn(M).toString(f);re=re.idivn(M),re.isZero()?x=W+x:x=p[g-W.length]+W+x}for(this.isZero()&&(x="0"+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(f,h){return this.toArrayLike(a,f,h)}),i.prototype.toArray=function(f,h){return this.toArrayLike(Array,f,h)};var A=function(f,h){return f.allocUnsafe?f.allocUnsafe(h):new f(h)};i.prototype.toArrayLike=function(f,h,x){this._strip();var v=this.byteLength(),S=x||Math.max(1,v);n(v<=S,"byte array longer than desired length"),n(S>0,"Requested array length <= 0");var k=A(f,S),E=h==="le"?"LE":"BE";return this["_toArrayLike"+E](k,v),k},i.prototype._toArrayLikeLE=function(f,h){for(var x=0,v=0,S=0,k=0;S>8&255),x>16&255),k===6?(x>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x=0&&(f[x--]=E>>8&255),x>=0&&(f[x--]=E>>16&255),k===6?(x>=0&&(f[x--]=E>>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x>=0)for(f[x--]=v;x>=0;)f[x--]=0},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var h=f,x=0;return h>=4096&&(x+=13,h>>>=13),h>=64&&(x+=7,h>>>=7),h>=8&&(x+=4,h>>>=4),h>=2&&(x+=2,h>>>=2),x+h},i.prototype._zeroBits=function(f){if(f===0)return 26;var h=f,x=0;return h&8191||(x+=13,h>>>=13),h&127||(x+=7,h>>>=7),h&15||(x+=4,h>>>=4),h&3||(x+=2,h>>>=2),h&1||x++,x},i.prototype.bitLength=function(){var f=this.words[this.length-1],h=this._countBits(f);return(this.length-1)*26+h};function T(y){for(var f=new Array(y.bitLength()),h=0;h>>v&1}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,h=0;hf.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var h;this.length>f.length?h=f:h=this;for(var x=0;xf.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var h,x;this.length>f.length?(h=this,x=f):(h=f,x=this);for(var v=0;vf.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var h=Math.ceil(f/26)|0,x=f%26;this._expand(h),x>0&&h--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-x),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,h){n(typeof f=="number"&&f>=0);var x=f/26|0,v=f%26;return this._expand(x+1),h?this.words[x]=this.words[x]|1<f.length?(x=this,v=f):(x=f,v=this);for(var S=0,k=0;k>>26;for(;S!==0&&k>>26;if(this.length=x.length,S!==0)this.words[this.length]=S,this.length++;else if(x!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var h=this.iadd(f);return f.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var x=this.cmp(f);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,S;x>0?(v=this,S=f):(v=f,S=this);for(var k=0,E=0;E>26,this.words[E]=h&67108863;for(;k!==0&&E>26,this.words[E]=h&67108863;if(k===0&&E>>26,re=C&67108863,W=Math.min(g,f.length-1),ee=Math.max(0,g-y.length+1);ee<=W;ee++){var ce=g-ee|0;v=y.words[ce]|0,S=f.words[ee]|0,k=v*S+re,M+=k/67108864|0,re=k&67108863}h.words[g]=re|0,C=M|0}return C!==0?h.words[g]=C|0:h.length--,h._strip()}var P=function(f,h,x){var v=f.words,S=h.words,k=x.words,E=0,C,g,M,re=v[0]|0,W=re&8191,ee=re>>>13,ce=v[1]|0,ie=ce&8191,le=ce>>>13,L=v[2]|0,te=L&8191,ae=L>>>13,ye=v[3]|0,ve=ye&8191,me=ye>>>13,Pe=v[4]|0,he=Pe&8191,be=Pe>>>13,Ie=v[5]|0,we=Ie&8191,Oe=Ie>>>13,Be=v[6]|0,ke=Be&8191,Me=Be>>>13,Ue=v[7]|0,je=Ue&8191,X=Ue>>>13,D=v[8]|0,H=D&8191,F=D>>>13,B=v[9]|0,U=B&8191,J=B>>>13,ne=S[0]|0,oe=ne&8191,de=ne>>>13,Te=S[1]|0,$e=Te&8191,De=Te>>>13,Xe=S[2]|0,ze=Xe&8191,He=Xe>>>13,Ge=S[3]|0,qe=Ge&8191,pe=Ge>>>13,ue=S[4]|0,ge=ue&8191,Q=ue>>>13,K=S[5]|0,Y=K&8191,se=K>>>13,_e=S[6]|0,Se=_e&8191,Ee=_e>>>13,Ve=S[7]|0,Le=Ve&8191,Fe=Ve>>>13,Qe=S[8]|0,Ne=Qe&8191,We=Qe>>>13,mt=S[9]|0,Je=mt&8191,it=mt>>>13;x.negative=f.negative^h.negative,x.length=19,C=Math.imul(W,oe),g=Math.imul(W,de),g=g+Math.imul(ee,oe)|0,M=Math.imul(ee,de);var hr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(hr>>>26)|0,hr&=67108863,C=Math.imul(ie,oe),g=Math.imul(ie,de),g=g+Math.imul(le,oe)|0,M=Math.imul(le,de),C=C+Math.imul(W,$e)|0,g=g+Math.imul(W,De)|0,g=g+Math.imul(ee,$e)|0,M=M+Math.imul(ee,De)|0;var br=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(br>>>26)|0,br&=67108863,C=Math.imul(te,oe),g=Math.imul(te,de),g=g+Math.imul(ae,oe)|0,M=Math.imul(ae,de),C=C+Math.imul(ie,$e)|0,g=g+Math.imul(ie,De)|0,g=g+Math.imul(le,$e)|0,M=M+Math.imul(le,De)|0,C=C+Math.imul(W,ze)|0,g=g+Math.imul(W,He)|0,g=g+Math.imul(ee,ze)|0,M=M+Math.imul(ee,He)|0;var ir=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ir>>>26)|0,ir&=67108863,C=Math.imul(ve,oe),g=Math.imul(ve,de),g=g+Math.imul(me,oe)|0,M=Math.imul(me,de),C=C+Math.imul(te,$e)|0,g=g+Math.imul(te,De)|0,g=g+Math.imul(ae,$e)|0,M=M+Math.imul(ae,De)|0,C=C+Math.imul(ie,ze)|0,g=g+Math.imul(ie,He)|0,g=g+Math.imul(le,ze)|0,M=M+Math.imul(le,He)|0,C=C+Math.imul(W,qe)|0,g=g+Math.imul(W,pe)|0,g=g+Math.imul(ee,qe)|0,M=M+Math.imul(ee,pe)|0;var Fr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(he,oe),g=Math.imul(he,de),g=g+Math.imul(be,oe)|0,M=Math.imul(be,de),C=C+Math.imul(ve,$e)|0,g=g+Math.imul(ve,De)|0,g=g+Math.imul(me,$e)|0,M=M+Math.imul(me,De)|0,C=C+Math.imul(te,ze)|0,g=g+Math.imul(te,He)|0,g=g+Math.imul(ae,ze)|0,M=M+Math.imul(ae,He)|0,C=C+Math.imul(ie,qe)|0,g=g+Math.imul(ie,pe)|0,g=g+Math.imul(le,qe)|0,M=M+Math.imul(le,pe)|0,C=C+Math.imul(W,ge)|0,g=g+Math.imul(W,Q)|0,g=g+Math.imul(ee,ge)|0,M=M+Math.imul(ee,Q)|0;var ar=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ar>>>26)|0,ar&=67108863,C=Math.imul(we,oe),g=Math.imul(we,de),g=g+Math.imul(Oe,oe)|0,M=Math.imul(Oe,de),C=C+Math.imul(he,$e)|0,g=g+Math.imul(he,De)|0,g=g+Math.imul(be,$e)|0,M=M+Math.imul(be,De)|0,C=C+Math.imul(ve,ze)|0,g=g+Math.imul(ve,He)|0,g=g+Math.imul(me,ze)|0,M=M+Math.imul(me,He)|0,C=C+Math.imul(te,qe)|0,g=g+Math.imul(te,pe)|0,g=g+Math.imul(ae,qe)|0,M=M+Math.imul(ae,pe)|0,C=C+Math.imul(ie,ge)|0,g=g+Math.imul(ie,Q)|0,g=g+Math.imul(le,ge)|0,M=M+Math.imul(le,Q)|0,C=C+Math.imul(W,Y)|0,g=g+Math.imul(W,se)|0,g=g+Math.imul(ee,Y)|0,M=M+Math.imul(ee,se)|0;var Jr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,C=Math.imul(ke,oe),g=Math.imul(ke,de),g=g+Math.imul(Me,oe)|0,M=Math.imul(Me,de),C=C+Math.imul(we,$e)|0,g=g+Math.imul(we,De)|0,g=g+Math.imul(Oe,$e)|0,M=M+Math.imul(Oe,De)|0,C=C+Math.imul(he,ze)|0,g=g+Math.imul(he,He)|0,g=g+Math.imul(be,ze)|0,M=M+Math.imul(be,He)|0,C=C+Math.imul(ve,qe)|0,g=g+Math.imul(ve,pe)|0,g=g+Math.imul(me,qe)|0,M=M+Math.imul(me,pe)|0,C=C+Math.imul(te,ge)|0,g=g+Math.imul(te,Q)|0,g=g+Math.imul(ae,ge)|0,M=M+Math.imul(ae,Q)|0,C=C+Math.imul(ie,Y)|0,g=g+Math.imul(ie,se)|0,g=g+Math.imul(le,Y)|0,M=M+Math.imul(le,se)|0,C=C+Math.imul(W,Se)|0,g=g+Math.imul(W,Ee)|0,g=g+Math.imul(ee,Se)|0,M=M+Math.imul(ee,Ee)|0;var Zr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,C=Math.imul(je,oe),g=Math.imul(je,de),g=g+Math.imul(X,oe)|0,M=Math.imul(X,de),C=C+Math.imul(ke,$e)|0,g=g+Math.imul(ke,De)|0,g=g+Math.imul(Me,$e)|0,M=M+Math.imul(Me,De)|0,C=C+Math.imul(we,ze)|0,g=g+Math.imul(we,He)|0,g=g+Math.imul(Oe,ze)|0,M=M+Math.imul(Oe,He)|0,C=C+Math.imul(he,qe)|0,g=g+Math.imul(he,pe)|0,g=g+Math.imul(be,qe)|0,M=M+Math.imul(be,pe)|0,C=C+Math.imul(ve,ge)|0,g=g+Math.imul(ve,Q)|0,g=g+Math.imul(me,ge)|0,M=M+Math.imul(me,Q)|0,C=C+Math.imul(te,Y)|0,g=g+Math.imul(te,se)|0,g=g+Math.imul(ae,Y)|0,M=M+Math.imul(ae,se)|0,C=C+Math.imul(ie,Se)|0,g=g+Math.imul(ie,Ee)|0,g=g+Math.imul(le,Se)|0,M=M+Math.imul(le,Ee)|0,C=C+Math.imul(W,Le)|0,g=g+Math.imul(W,Fe)|0,g=g+Math.imul(ee,Le)|0,M=M+Math.imul(ee,Fe)|0;var Xr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,C=Math.imul(H,oe),g=Math.imul(H,de),g=g+Math.imul(F,oe)|0,M=Math.imul(F,de),C=C+Math.imul(je,$e)|0,g=g+Math.imul(je,De)|0,g=g+Math.imul(X,$e)|0,M=M+Math.imul(X,De)|0,C=C+Math.imul(ke,ze)|0,g=g+Math.imul(ke,He)|0,g=g+Math.imul(Me,ze)|0,M=M+Math.imul(Me,He)|0,C=C+Math.imul(we,qe)|0,g=g+Math.imul(we,pe)|0,g=g+Math.imul(Oe,qe)|0,M=M+Math.imul(Oe,pe)|0,C=C+Math.imul(he,ge)|0,g=g+Math.imul(he,Q)|0,g=g+Math.imul(be,ge)|0,M=M+Math.imul(be,Q)|0,C=C+Math.imul(ve,Y)|0,g=g+Math.imul(ve,se)|0,g=g+Math.imul(me,Y)|0,M=M+Math.imul(me,se)|0,C=C+Math.imul(te,Se)|0,g=g+Math.imul(te,Ee)|0,g=g+Math.imul(ae,Se)|0,M=M+Math.imul(ae,Ee)|0,C=C+Math.imul(ie,Le)|0,g=g+Math.imul(ie,Fe)|0,g=g+Math.imul(le,Le)|0,M=M+Math.imul(le,Fe)|0,C=C+Math.imul(W,Ne)|0,g=g+Math.imul(W,We)|0,g=g+Math.imul(ee,Ne)|0,M=M+Math.imul(ee,We)|0;var Qr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,C=Math.imul(U,oe),g=Math.imul(U,de),g=g+Math.imul(J,oe)|0,M=Math.imul(J,de),C=C+Math.imul(H,$e)|0,g=g+Math.imul(H,De)|0,g=g+Math.imul(F,$e)|0,M=M+Math.imul(F,De)|0,C=C+Math.imul(je,ze)|0,g=g+Math.imul(je,He)|0,g=g+Math.imul(X,ze)|0,M=M+Math.imul(X,He)|0,C=C+Math.imul(ke,qe)|0,g=g+Math.imul(ke,pe)|0,g=g+Math.imul(Me,qe)|0,M=M+Math.imul(Me,pe)|0,C=C+Math.imul(we,ge)|0,g=g+Math.imul(we,Q)|0,g=g+Math.imul(Oe,ge)|0,M=M+Math.imul(Oe,Q)|0,C=C+Math.imul(he,Y)|0,g=g+Math.imul(he,se)|0,g=g+Math.imul(be,Y)|0,M=M+Math.imul(be,se)|0,C=C+Math.imul(ve,Se)|0,g=g+Math.imul(ve,Ee)|0,g=g+Math.imul(me,Se)|0,M=M+Math.imul(me,Ee)|0,C=C+Math.imul(te,Le)|0,g=g+Math.imul(te,Fe)|0,g=g+Math.imul(ae,Le)|0,M=M+Math.imul(ae,Fe)|0,C=C+Math.imul(ie,Ne)|0,g=g+Math.imul(ie,We)|0,g=g+Math.imul(le,Ne)|0,M=M+Math.imul(le,We)|0,C=C+Math.imul(W,Je)|0,g=g+Math.imul(W,it)|0,g=g+Math.imul(ee,Je)|0,M=M+Math.imul(ee,it)|0;var en=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(en>>>26)|0,en&=67108863,C=Math.imul(U,$e),g=Math.imul(U,De),g=g+Math.imul(J,$e)|0,M=Math.imul(J,De),C=C+Math.imul(H,ze)|0,g=g+Math.imul(H,He)|0,g=g+Math.imul(F,ze)|0,M=M+Math.imul(F,He)|0,C=C+Math.imul(je,qe)|0,g=g+Math.imul(je,pe)|0,g=g+Math.imul(X,qe)|0,M=M+Math.imul(X,pe)|0,C=C+Math.imul(ke,ge)|0,g=g+Math.imul(ke,Q)|0,g=g+Math.imul(Me,ge)|0,M=M+Math.imul(Me,Q)|0,C=C+Math.imul(we,Y)|0,g=g+Math.imul(we,se)|0,g=g+Math.imul(Oe,Y)|0,M=M+Math.imul(Oe,se)|0,C=C+Math.imul(he,Se)|0,g=g+Math.imul(he,Ee)|0,g=g+Math.imul(be,Se)|0,M=M+Math.imul(be,Ee)|0,C=C+Math.imul(ve,Le)|0,g=g+Math.imul(ve,Fe)|0,g=g+Math.imul(me,Le)|0,M=M+Math.imul(me,Fe)|0,C=C+Math.imul(te,Ne)|0,g=g+Math.imul(te,We)|0,g=g+Math.imul(ae,Ne)|0,M=M+Math.imul(ae,We)|0,C=C+Math.imul(ie,Je)|0,g=g+Math.imul(ie,it)|0,g=g+Math.imul(le,Je)|0,M=M+Math.imul(le,it)|0;var Pr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,C=Math.imul(U,ze),g=Math.imul(U,He),g=g+Math.imul(J,ze)|0,M=Math.imul(J,He),C=C+Math.imul(H,qe)|0,g=g+Math.imul(H,pe)|0,g=g+Math.imul(F,qe)|0,M=M+Math.imul(F,pe)|0,C=C+Math.imul(je,ge)|0,g=g+Math.imul(je,Q)|0,g=g+Math.imul(X,ge)|0,M=M+Math.imul(X,Q)|0,C=C+Math.imul(ke,Y)|0,g=g+Math.imul(ke,se)|0,g=g+Math.imul(Me,Y)|0,M=M+Math.imul(Me,se)|0,C=C+Math.imul(we,Se)|0,g=g+Math.imul(we,Ee)|0,g=g+Math.imul(Oe,Se)|0,M=M+Math.imul(Oe,Ee)|0,C=C+Math.imul(he,Le)|0,g=g+Math.imul(he,Fe)|0,g=g+Math.imul(be,Le)|0,M=M+Math.imul(be,Fe)|0,C=C+Math.imul(ve,Ne)|0,g=g+Math.imul(ve,We)|0,g=g+Math.imul(me,Ne)|0,M=M+Math.imul(me,We)|0,C=C+Math.imul(te,Je)|0,g=g+Math.imul(te,it)|0,g=g+Math.imul(ae,Je)|0,M=M+Math.imul(ae,it)|0;var tn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(U,qe),g=Math.imul(U,pe),g=g+Math.imul(J,qe)|0,M=Math.imul(J,pe),C=C+Math.imul(H,ge)|0,g=g+Math.imul(H,Q)|0,g=g+Math.imul(F,ge)|0,M=M+Math.imul(F,Q)|0,C=C+Math.imul(je,Y)|0,g=g+Math.imul(je,se)|0,g=g+Math.imul(X,Y)|0,M=M+Math.imul(X,se)|0,C=C+Math.imul(ke,Se)|0,g=g+Math.imul(ke,Ee)|0,g=g+Math.imul(Me,Se)|0,M=M+Math.imul(Me,Ee)|0,C=C+Math.imul(we,Le)|0,g=g+Math.imul(we,Fe)|0,g=g+Math.imul(Oe,Le)|0,M=M+Math.imul(Oe,Fe)|0,C=C+Math.imul(he,Ne)|0,g=g+Math.imul(he,We)|0,g=g+Math.imul(be,Ne)|0,M=M+Math.imul(be,We)|0,C=C+Math.imul(ve,Je)|0,g=g+Math.imul(ve,it)|0,g=g+Math.imul(me,Je)|0,M=M+Math.imul(me,it)|0;var rn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rn>>>26)|0,rn&=67108863,C=Math.imul(U,ge),g=Math.imul(U,Q),g=g+Math.imul(J,ge)|0,M=Math.imul(J,Q),C=C+Math.imul(H,Y)|0,g=g+Math.imul(H,se)|0,g=g+Math.imul(F,Y)|0,M=M+Math.imul(F,se)|0,C=C+Math.imul(je,Se)|0,g=g+Math.imul(je,Ee)|0,g=g+Math.imul(X,Se)|0,M=M+Math.imul(X,Ee)|0,C=C+Math.imul(ke,Le)|0,g=g+Math.imul(ke,Fe)|0,g=g+Math.imul(Me,Le)|0,M=M+Math.imul(Me,Fe)|0,C=C+Math.imul(we,Ne)|0,g=g+Math.imul(we,We)|0,g=g+Math.imul(Oe,Ne)|0,M=M+Math.imul(Oe,We)|0,C=C+Math.imul(he,Je)|0,g=g+Math.imul(he,it)|0,g=g+Math.imul(be,Je)|0,M=M+Math.imul(be,it)|0;var rr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rr>>>26)|0,rr&=67108863,C=Math.imul(U,Y),g=Math.imul(U,se),g=g+Math.imul(J,Y)|0,M=Math.imul(J,se),C=C+Math.imul(H,Se)|0,g=g+Math.imul(H,Ee)|0,g=g+Math.imul(F,Se)|0,M=M+Math.imul(F,Ee)|0,C=C+Math.imul(je,Le)|0,g=g+Math.imul(je,Fe)|0,g=g+Math.imul(X,Le)|0,M=M+Math.imul(X,Fe)|0,C=C+Math.imul(ke,Ne)|0,g=g+Math.imul(ke,We)|0,g=g+Math.imul(Me,Ne)|0,M=M+Math.imul(Me,We)|0,C=C+Math.imul(we,Je)|0,g=g+Math.imul(we,it)|0,g=g+Math.imul(Oe,Je)|0,M=M+Math.imul(Oe,it)|0;var nn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(U,Se),g=Math.imul(U,Ee),g=g+Math.imul(J,Se)|0,M=Math.imul(J,Ee),C=C+Math.imul(H,Le)|0,g=g+Math.imul(H,Fe)|0,g=g+Math.imul(F,Le)|0,M=M+Math.imul(F,Fe)|0,C=C+Math.imul(je,Ne)|0,g=g+Math.imul(je,We)|0,g=g+Math.imul(X,Ne)|0,M=M+Math.imul(X,We)|0,C=C+Math.imul(ke,Je)|0,g=g+Math.imul(ke,it)|0,g=g+Math.imul(Me,Je)|0,M=M+Math.imul(Me,it)|0;var on=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(on>>>26)|0,on&=67108863,C=Math.imul(U,Le),g=Math.imul(U,Fe),g=g+Math.imul(J,Le)|0,M=Math.imul(J,Fe),C=C+Math.imul(H,Ne)|0,g=g+Math.imul(H,We)|0,g=g+Math.imul(F,Ne)|0,M=M+Math.imul(F,We)|0,C=C+Math.imul(je,Je)|0,g=g+Math.imul(je,it)|0,g=g+Math.imul(X,Je)|0,M=M+Math.imul(X,it)|0;var an=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(U,Ne),g=Math.imul(U,We),g=g+Math.imul(J,Ne)|0,M=Math.imul(J,We),C=C+Math.imul(H,Je)|0,g=g+Math.imul(H,it)|0,g=g+Math.imul(F,Je)|0,M=M+Math.imul(F,it)|0;var ho=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ho>>>26)|0,ho&=67108863,C=Math.imul(U,Je),g=Math.imul(U,it),g=g+Math.imul(J,Je)|0,M=Math.imul(J,it);var po=(E+C|0)+((g&8191)<<13)|0;return E=(M+(g>>>13)|0)+(po>>>26)|0,po&=67108863,k[0]=hr,k[1]=br,k[2]=ir,k[3]=Fr,k[4]=ar,k[5]=Jr,k[6]=Zr,k[7]=Xr,k[8]=Qr,k[9]=en,k[10]=Pr,k[11]=tn,k[12]=rn,k[13]=rr,k[14]=nn,k[15]=on,k[16]=an,k[17]=ho,k[18]=po,E!==0&&(k[19]=E,x.length++),x};Math.imul||(P=O);function $(y,f,h){h.negative=f.negative^y.negative,h.length=y.length+f.length;for(var x=0,v=0,S=0;S>>26)|0,v+=k>>>26,k&=67108863}h.words[S]=E,x=k,k=v}return x!==0?h.words[S]=x:h.length--,h._strip()}function R(y,f,h){return $(y,f,h)}i.prototype.mulTo=function(f,h){var x,v=this.length+f.length;return this.length===10&&f.length===10?x=P(this,f,h):v<63?x=O(this,f,h):v<1024?x=$(this,f,h):x=R(this,f,h),x},i.prototype.mul=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),this.mulTo(f,h)},i.prototype.mulf=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),R(this,f,h)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var h=f<0;h&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var x=0,v=0;v>=26,x+=S/67108864|0,x+=k>>>26,this.words[v]=k&67108863}return x!==0&&(this.words[v]=x,this.length++),h?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var h=T(f);if(h.length===0)return new i(1);for(var x=this,v=0;v=0);var h=f%26,x=(f-h)/26,v=67108863>>>26-h<<26-h,S;if(h!==0){var k=0;for(S=0;S>>26-h}k&&(this.words[S]=k,this.length++)}if(x!==0){for(S=this.length-1;S>=0;S--)this.words[S+x]=this.words[S];for(S=0;S=0);var v;h?v=(h-h%26)/26:v=0;var S=f%26,k=Math.min((f-S)/26,this.length),E=67108863^67108863>>>S<k)for(this.length-=k,g=0;g=0&&(M!==0||g>=v);g--){var re=this.words[g]|0;this.words[g]=M<<26-S|re>>>S,M=re&E}return C&&M!==0&&(C.words[C.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,h,x){return n(this.negative===0),this.iushrn(f,h,x)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var h=f%26,x=(f-h)/26,v=1<=0);var h=f%26,x=(f-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(h!==0&&x++,this.length=Math.min(x,this.length),h!==0){var v=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},i.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(C/67108864|0),this.words[S+x]=k&67108863}for(;S>26,this.words[S+x]=k&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,S=0;S>26,this.words[S]=k&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,h){var x=this.length-f.length,v=this.clone(),S=f,k=S.words[S.length-1]|0,E=this._countBits(k);x=26-E,x!==0&&(S=S.ushln(x),v.iushln(x),k=S.words[S.length-1]|0);var C=v.length-S.length,g;if(h!=="mod"){g=new i(null),g.length=C+1,g.words=new Array(g.length);for(var M=0;M=0;W--){var ee=(v.words[S.length+W]|0)*67108864+(v.words[S.length+W-1]|0);for(ee=Math.min(ee/k|0,67108863),v._ishlnsubmul(S,ee,W);v.negative!==0;)ee--,v.negative=0,v._ishlnsubmul(S,1,W),v.isZero()||(v.negative^=1);g&&(g.words[W]=ee)}return g&&g._strip(),v._strip(),h!=="div"&&x!==0&&v.iushrn(x),{div:g||null,mod:v}},i.prototype.divmod=function(f,h,x){if(n(!f.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var v,S,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,h),h!=="mod"&&(v=k.div.neg()),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.iadd(f)),{div:v,mod:S}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),h),h!=="mod"&&(v=k.div.neg()),{div:v,mod:k.mod}):this.negative&f.negative?(k=this.neg().divmod(f.neg(),h),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.isub(f)),{div:k.div,mod:S}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?h==="div"?{div:this.divn(f.words[0]),mod:null}:h==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,h)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var h=this.divmod(f);if(h.mod.isZero())return h.div;var x=h.div.negative!==0?h.mod.isub(f):h.mod,v=f.ushrn(1),S=f.andln(1),k=x.cmp(v);return k<0||S===1&&k===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},i.prototype.modrn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=(1<<26)%f,v=0,S=this.length-1;S>=0;S--)v=(x*v+(this.words[S]|0))%f;return h?-v:v},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=0,v=this.length-1;v>=0;v--){var S=(this.words[v]|0)+x*67108864;this.words[v]=S/f|0,x=S%f}return this._strip(),h?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=new i(0),E=new i(1),C=0;h.isEven()&&x.isEven();)h.iushrn(1),x.iushrn(1),++C;for(var g=x.clone(),M=h.clone();!h.isZero();){for(var re=0,W=1;!(h.words[0]&W)&&re<26;++re,W<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(g),S.isub(M)),v.iushrn(1),S.iushrn(1);for(var ee=0,ce=1;!(x.words[0]&ce)&&ee<26;++ee,ce<<=1);if(ee>0)for(x.iushrn(ee);ee-- >0;)(k.isOdd()||E.isOdd())&&(k.iadd(g),E.isub(M)),k.iushrn(1),E.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(k),S.isub(E)):(x.isub(h),k.isub(v),E.isub(S))}return{a:k,b:E,gcd:x.iushln(C)}},i.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=x.clone();h.cmpn(1)>0&&x.cmpn(1)>0;){for(var E=0,C=1;!(h.words[0]&C)&&E<26;++E,C<<=1);if(E>0)for(h.iushrn(E);E-- >0;)v.isOdd()&&v.iadd(k),v.iushrn(1);for(var g=0,M=1;!(x.words[0]&M)&&g<26;++g,M<<=1);if(g>0)for(x.iushrn(g);g-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(S)):(x.isub(h),S.isub(v))}var re;return h.cmpn(1)===0?re=v:re=S,re.cmpn(0)<0&&re.iadd(f),re},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var h=this.clone(),x=f.clone();h.negative=0,x.negative=0;for(var v=0;h.isEven()&&x.isEven();v++)h.iushrn(1),x.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;x.isEven();)x.iushrn(1);var S=h.cmp(x);if(S<0){var k=h;h=x,x=k}else if(S===0||x.cmpn(1)===0)break;h.isub(x)}while(!0);return x.iushln(v)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){n(typeof f=="number");var h=f%26,x=(f-h)/26,v=1<>>26,E&=67108863,this.words[k]=E}return S!==0&&(this.words[k]=S,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var h=f<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var x;if(this.length>1)x=1;else{h&&(f=-f),n(f<=67108863,"Number is too big");var v=this.words[0]|0;x=v===f?0:vf.length)return 1;if(this.length=0;x--){var v=this.words[x]|0,S=f.words[x]|0;if(v!==S){vS&&(h=1);break}}return h},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new q(f)},i.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var j={k256:null,p224:null,p192:null,p25519:null};function I(y,f){this.name=y,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},I.prototype.ireduce=function(f){var h=f,x;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),x=h.bitLength();while(x>this.n);var v=x0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},I.prototype.split=function(f,h){f.iushrn(this.n,0,h)},I.prototype.imulK=function(f){return f.imul(this.k)};function b(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,I),b.prototype.split=function(f,h){for(var x=4194303,v=Math.min(f.length,9),S=0;S>>22,k=E}k>>>=22,f.words[S-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},b.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var h=0,x=0;x>>=26,f.words[x]=S,h=v}return h!==0&&(f.words[f.length++]=h),f},i._prime=function(f){if(j[f])return j[f];var h;if(f==="k256")h=new b;else if(f==="p224")h=new N;else if(f==="p192")h=new V;else if(f==="p25519")h=new Z;else throw new Error("Unknown prime "+f);return j[f]=h,h};function q(y){if(typeof y=="string"){var f=i._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}q.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},q.prototype._verify2=function(f,h){n((f.negative|h.negative)===0,"red works only with positives"),n(f.red&&f.red===h.red,"red works only with red numbers")},q.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(u(f,f.umod(this.m)._forceRed(this)),f)},q.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},q.prototype.add=function(f,h){this._verify2(f,h);var x=f.add(h);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(f,h){this._verify2(f,h);var x=f.iadd(h);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(f,h){this._verify2(f,h);var x=f.sub(h);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(f,h){this._verify2(f,h);var x=f.isub(h);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(f,h){return this._verify1(f),this.imod(f.ushln(h))},q.prototype.imul=function(f,h){return this._verify2(f,h),this.imod(f.imul(h))},q.prototype.mul=function(f,h){return this._verify2(f,h),this.imod(f.mul(h))},q.prototype.isqr=function(f){return this.imul(f,f.clone())},q.prototype.sqr=function(f){return this.mul(f,f)},q.prototype.sqrt=function(f){if(f.isZero())return f.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(f,x)}for(var v=this.m.subn(1),S=0;!v.isZero()&&v.andln(1)===0;)S++,v.iushrn(1);n(!v.isZero());var k=new i(1).toRed(this),E=k.redNeg(),C=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);this.pow(g,C).cmp(E)!==0;)g.redIAdd(E);for(var M=this.pow(g,v),re=this.pow(f,v.addn(1).iushrn(1)),W=this.pow(f,v),ee=S;W.cmp(k)!==0;){for(var ce=W,ie=0;ce.cmp(k)!==0;ie++)ce=ce.redSqr();n(ie=0;S--){for(var M=h.words[S],re=g-1;re>=0;re--){var W=M>>re&1;if(k!==v[0]&&(k=this.sqr(k)),W===0&&E===0){C=0;continue}E<<=1,E|=W,C++,!(C!==x&&(S!==0||re!==0))&&(k=this.mul(k,v[E]),C=0,E=0)}g=26}return k},q.prototype.convertTo=function(f){var h=f.umod(this.m);return h===f?h.clone():h},q.prototype.convertFrom=function(f){var h=f.clone();return h.red=null,h},i.mont=function(f){return new _(f)};function _(y){q.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(_,q),_.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},_.prototype.convertFrom=function(f){var h=this.imod(f.mul(this.rinv));return h.red=null,h},_.prototype.imul=function(f,h){if(f.isZero()||h.isZero())return f.words[0]=0,f.length=1,f;var x=f.imul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.mul=function(f,h){if(f.isZero()||h.isZero())return new i(0)._forceRed(this);var x=f.mul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.invm=function(f){var h=this.imod(f._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(e,Ae)}(Ov)),Ov.exports}const uDe="Input must be an string, Buffer or Uint8Array";function fDe(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e=="string")t=new TextEncoder().encode(e);else throw new Error(uDe);return t}function dDe(e){return Array.prototype.map.call(e,function(t){return(t<16?"0":"")+t.toString(16)}).join("")}function Rm(e){return(4294967296+e).toString(16).substring(1)}function hDe(e,t,r){let n=` +`+e+" = ";for(let o=0;o=4294967296&&o++,e[t]=n,e[t+1]=o}function pD(e,t,r,n){let o=e[t]+r;r<0&&(o+=4294967296);let i=e[t+1]+n;o>=4294967296&&i++,e[t]=o,e[t+1]=i}function SX(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Rs(e,t,r,n,o,i){const a=Qh[o],s=Qh[o+1],c=Qh[i],l=Qh[i+1];Nm(wt,e,t),pD(wt,e,a,s);let u=wt[n]^wt[e],d=wt[n+1]^wt[e+1];wt[n]=d,wt[n+1]=u,Nm(wt,r,n),u=wt[t]^wt[r],d=wt[t+1]^wt[r+1],wt[t]=u>>>24^d<<8,wt[t+1]=d>>>24^u<<8,Nm(wt,e,t),pD(wt,e,c,l),u=wt[n]^wt[e],d=wt[n+1]^wt[e+1],wt[n]=u>>>16^d<<16,wt[n+1]=d>>>16^u<<16,Nm(wt,r,n),u=wt[t]^wt[r],d=wt[t+1]^wt[r+1],wt[t]=d>>>31^u<<1,wt[t+1]=u>>>31^d<<1}const EX=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),gDe=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Pn=new Uint8Array(gDe.map(function(e){return e*2})),wt=new Uint32Array(32),Qh=new Uint32Array(32);function CX(e,t){let r=0;for(r=0;r<16;r++)wt[r]=e.h[r],wt[r+16]=EX[r];for(wt[24]=wt[24]^e.t,wt[25]=wt[25]^e.t/4294967296,t&&(wt[28]=~wt[28],wt[29]=~wt[29]),r=0;r<32;r++)Qh[r]=SX(e.b,4*r);for(r=0;r<12;r++)Rs(0,8,16,24,Pn[r*16+0],Pn[r*16+1]),Rs(2,10,18,26,Pn[r*16+2],Pn[r*16+3]),Rs(4,12,20,28,Pn[r*16+4],Pn[r*16+5]),Rs(6,14,22,30,Pn[r*16+6],Pn[r*16+7]),Rs(0,10,20,30,Pn[r*16+8],Pn[r*16+9]),Rs(2,12,22,24,Pn[r*16+10],Pn[r*16+11]),Rs(4,14,16,26,Pn[r*16+12],Pn[r*16+13]),Rs(6,8,18,28,Pn[r*16+14],Pn[r*16+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^wt[r]^wt[r+16]}const Ns=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function PX(e,t,r,n){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const o={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};Ns.fill(0),Ns[0]=e,t&&(Ns[1]=t.length),Ns[2]=1,Ns[3]=1,r&&Ns.set(r,32),n&&Ns.set(n,48);for(let i=0;i<16;i++)o.h[i]=EX[i]^SX(Ns,i*4);return t&&(T8(o,t),o.c=128),o}function T8(e,t){for(let r=0;r>2]>>8*(r&3);return t}function OX(e,t,r,n,o){r=r||64,e=Iv.normalizeInput(e),n&&(n=Iv.normalizeInput(n)),o&&(o=Iv.normalizeInput(o));const i=PX(r,t,n,o);return T8(i,e),AX(i)}function mDe(e,t,r,n,o){const i=OX(e,t,r,n,o);return Iv.toHex(i)}var vDe={blake2b:OX,blake2bHex:mDe,blake2bInit:PX,blake2bUpdate:T8,blake2bFinal:AX};const IX=xX;function yDe(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Bs(e,t,r,n,o,i){Mt[e]=Mt[e]+Mt[t]+o,Mt[n]=Bm(Mt[n]^Mt[e],16),Mt[r]=Mt[r]+Mt[n],Mt[t]=Bm(Mt[t]^Mt[r],12),Mt[e]=Mt[e]+Mt[t]+i,Mt[n]=Bm(Mt[n]^Mt[e],8),Mt[r]=Mt[r]+Mt[n],Mt[t]=Bm(Mt[t]^Mt[r],7)}function Bm(e,t){return e>>>t^e<<32-t}const TX=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),An=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),Mt=new Uint32Array(16),ln=new Uint32Array(16);function MX(e,t){let r=0;for(r=0;r<8;r++)Mt[r]=e.h[r],Mt[r+8]=TX[r];for(Mt[12]^=e.t,Mt[13]^=e.t/4294967296,t&&(Mt[14]=~Mt[14]),r=0;r<16;r++)ln[r]=yDe(e.b,4*r);for(r=0;r<10;r++)Bs(0,4,8,12,ln[An[r*16+0]],ln[An[r*16+1]]),Bs(1,5,9,13,ln[An[r*16+2]],ln[An[r*16+3]]),Bs(2,6,10,14,ln[An[r*16+4]],ln[An[r*16+5]]),Bs(3,7,11,15,ln[An[r*16+6]],ln[An[r*16+7]]),Bs(0,5,10,15,ln[An[r*16+8]],ln[An[r*16+9]]),Bs(1,6,11,12,ln[An[r*16+10]],ln[An[r*16+11]]),Bs(2,7,8,13,ln[An[r*16+12]],ln[An[r*16+13]]),Bs(3,4,9,14,ln[An[r*16+14]],ln[An[r*16+15]]);for(r=0;r<8;r++)e.h[r]^=Mt[r]^Mt[r+8]}function kX(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(TX),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(M8(n,t),n.c=64),n}function M8(e,t){for(let r=0;r>2]>>8*(r&3)&255;return t}function DX(e,t,r){r=r||32,e=IX.normalizeInput(e);const n=kX(r,t);return M8(n,e),$X(n)}function bDe(e,t,r){const n=DX(e,t,r);return IX.toHex(n)}var wDe={blake2s:DX,blake2sHex:bDe,blake2sInit:kX,blake2sUpdate:M8,blake2sFinal:$X};const Th=vDe,Mh=wDe;var qi={blake2b:Th.blake2b,blake2bHex:Th.blake2bHex,blake2bInit:Th.blake2bInit,blake2bUpdate:Th.blake2bUpdate,blake2bFinal:Th.blake2bFinal,blake2s:Mh.blake2s,blake2sHex:Mh.blake2sHex,blake2sInit:Mh.blake2sInit,blake2sUpdate:Mh.blake2sUpdate,blake2sFinal:Mh.blake2sFinal};const A2=Hi(qi);var gD;function _De(){return gD||(gD=1,function(e){var t=Ae&&Ae.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.assertType=e.isDevnet=e.sleep=e.hexToString=e.stringToHex=e.blockChainIndex=e.subContractId=e.contractIdFromTx=e.addressFromTokenId=e.addressFromContractId=e.addressFromScript=e.addressFromPublicKey=e.publicKeyFromPrivateKey=e.groupOfPrivateKey=e.binToHex=e.hexToBinUnsafe=e.tokenIdFromAddress=e.contractIdFromAddress=e.groupOfAddress=e.AddressType=e.toNonNegativeBigInt=e.isHexString=e.xorByte=e.signatureDecode=e.encodeHexSignature=e.encodeSignature=e.networkIds=void 0;const r=_u,n=t(lDe()),o=t(qi),i=t(_8()),a=jn,s=g2(),c=t(x8());e.networkIds=["mainnet","testnet","devnet"];const l=new r.ec("secp256k1");function u(W){let ee=W.s;l.n&&W.s.cmp(l.nh)===1&&(ee=l.n.sub(W.s));const ce=W.r.toString("hex",66).slice(2),ie=ee.toString("hex",66).slice(2);return ce+ie}e.encodeSignature=u;function d(W,ee){return u({r:new n.default(W,"hex"),s:new n.default(ee,"hex")})}e.encodeHexSignature=d;function p(W,ee){if(ee.length!==128)throw new Error("Invalid signature length");const ce=ee.slice(64,128),ie=new n.default(ce,"hex");if(W.n&&ie.cmp(W.nh)<1)return{r:ee.slice(0,64),s:ce};throw new Error("The signature is not normalized")}e.signatureDecode=p;function m(W){const ee=W>>24&255,ce=W>>16&255,ie=W>>8&255,le=W&255;return(ee^ce^ie^le)&255}e.xorByte=m;function w(W){return W.length%2===0&&/^[0-9a-fA-F]*$/.test(W)}e.isHexString=w;function A(W){try{const ee=BigInt(W);return ee<0n?void 0:ee}catch{return}}e.toNonNegativeBigInt=A;var T;(function(W){W[W.P2PKH=0]="P2PKH",W[W.P2MPKH=1]="P2MPKH",W[W.P2SH=2]="P2SH",W[W.P2C=3]="P2C"})(T=e.AddressType||(e.AddressType={}));function O(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2PKH)return $(ie);if(ce==T.P2MPKH)return R(ie);if(ce==T.P2SH)return j(ie);{const le=I(W);return le[`${le.length-1}`]}}e.groupOfAddress=O;function P(W){const ee=(0,c.default)(W)|1;return m(ee)%s.TOTAL_NUMBER_OF_GROUPS}function $(W){if(W.length!=32)throw new Error(`Invalid p2pkh address length: ${W.length}`);return P(W)}function R(W){if((W.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${W.length}`);return P(W.slice(1,33))}function j(W){return P(W)}function I(W){return N(W)}e.contractIdFromAddress=I;function b(W){return N(W)}e.tokenIdFromAddress=b;function N(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2C)return ie;throw new Error(`Invalid contract address type: ${ce}`)}function V(W){return a.Buffer.from(W,"hex")}e.hexToBinUnsafe=V;function Z(W){return a.Buffer.from(W).toString("hex")}e.binToHex=Z;function q(W,ee){return O(y(_(W,ee),ee))}e.groupOfPrivateKey=q;function _(W,ee){return(ee??"default")==="default"?l.keyFromPrivate(W).getPublic(!0,"hex"):l.g.mul(new n.default(W,16)).encode("hex",!0).slice(2)}e.publicKeyFromPrivateKey=_;function y(W,ee){if((ee??"default")==="default"){const ie=a.Buffer.from([T.P2PKH]),le=a.Buffer.from(o.default.blake2b(a.Buffer.from(W,"hex"),void 0,32)),L=a.Buffer.concat([ie,le]);return i.default.encode(L)}else{const ie=a.Buffer.from(`0101000000000458144020${W}8685`,"hex");return f(ie)}}e.addressFromPublicKey=y;function f(W){const ee=o.default.blake2b(W,void 0,32),ce=a.Buffer.from([T.P2SH]);return i.default.encode(a.Buffer.concat([ce,ee]))}e.addressFromScript=f;function h(W){const ee=a.Buffer.from([T.P2C]),ce=a.Buffer.from(V(W)),ie=a.Buffer.concat([ee,ce]);return i.default.encode(ie)}e.addressFromContractId=h;function x(W){return h(W)}e.addressFromTokenId=x;function v(W,ee){const ce=V(W),ie=a.Buffer.concat([ce,a.Buffer.from([ee])]),le=o.default.blake2b(ie,void 0,32);return Z(le)}e.contractIdFromTx=v;function S(W,ee,ce){if(ce<0||ce>=s.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${ce}`);const ie=a.Buffer.concat([V(W),V(ee)]),le=a.Buffer.concat([o.default.blake2b(o.default.blake2b(ie,void 0,32),void 0,32).slice(0,-1),a.Buffer.from([ce])]);return Z(le)}e.subContractId=S;function k(W){if(W.length!=64)throw Error(`Invalid block hash: ${W}`);const ee=+("0x"+W.slice(-4))%s.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(ee/s.TOTAL_NUMBER_OF_GROUPS),toGroup:ee%s.TOTAL_NUMBER_OF_GROUPS}}e.blockChainIndex=k;function E(W){let ee="";for(let ce=0;cesetTimeout(ee,W))}e.sleep=g;function M(W){return W!==0&&W!==1}e.isDevnet=M;function re(){}e.assertType=re}(J5)),J5}var kh={},mD;function xDe(){if(mD)return kh;mD=1;var e=Ae&&Ae.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kh,"__esModule",{value:!0}),kh.Subscription=void 0;const t=e(Kw());class r{constructor(o){this.pollingInterval=o.pollingInterval,this.messageCallback=o.messageCallback,this.errorCallback=o.errorCallback,this.task=void 0,this.cancelled=!1,this.eventEmitter=new t.default}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}}return kh.Subscription=r,kh}var il={},O2={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=Er,r=BigInt(0),n=BigInt(1),o=BigInt(2),i=BigInt(3),a=BigInt(8),s=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=s;const c=(pe,ue)=>(pe+ue/o)/ue,l={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(pe){const{n:ue}=s,ge=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),Q=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),K=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Y=ge,se=BigInt("0x100000000000000000000000000000000"),_e=c(Y*pe,ue),Se=c(-Q*pe,ue);let Ee=M(pe-_e*ge-Se*K,ue),Ve=M(-_e*Q-Se*Y,ue);const Le=Ee>se,Fe=Ve>se;if(Le&&(Ee=ue-Ee),Fe&&(Ve=ue-Ve),Ee>se||Ve>se)throw new Error("splitScalarEndo: Endomorphism failed, k="+pe);return{k1neg:Le,k1:Ee,k2neg:Fe,k2:Ve}}},u=32,d=32,p=32,m=u+1,w=2*u+1;function A(pe){const{a:ue,b:ge}=s,Q=M(pe*pe),K=M(Q*pe);return M(K+ue*pe+ge)}const T=s.a===r;class O extends Error{constructor(ue){super(ue)}}function P(pe){if(!(pe instanceof $))throw new TypeError("JacobianPoint expected")}class ${constructor(ue,ge,Q){this.x=ue,this.y=ge,this.z=Q}static fromAffine(ue){if(!(ue instanceof I))throw new TypeError("JacobianPoint#fromAffine: expected Point");return ue.equals(I.ZERO)?$.ZERO:new $(ue.x,ue.y,n)}static toAffineBatch(ue){const ge=ce(ue.map(Q=>Q.z));return ue.map((Q,K)=>Q.toAffine(ge[K]))}static normalizeZ(ue){return $.toAffineBatch(ue).map($.fromAffine)}equals(ue){P(ue);const{x:ge,y:Q,z:K}=this,{x:Y,y:se,z:_e}=ue,Se=M(K*K),Ee=M(_e*_e),Ve=M(ge*Ee),Le=M(Y*Se),Fe=M(M(Q*_e)*Ee),Qe=M(M(se*K)*Se);return Ve===Le&&Fe===Qe}negate(){return new $(this.x,M(-this.y),this.z)}double(){const{x:ue,y:ge,z:Q}=this,K=M(ue*ue),Y=M(ge*ge),se=M(Y*Y),_e=ue+Y,Se=M(o*(M(_e*_e)-K-se)),Ee=M(i*K),Ve=M(Ee*Ee),Le=M(Ve-o*Se),Fe=M(Ee*(Se-Le)-a*se),Qe=M(o*ge*Q);return new $(Le,Fe,Qe)}add(ue){P(ue);const{x:ge,y:Q,z:K}=this,{x:Y,y:se,z:_e}=ue;if(Y===r||se===r)return this;if(ge===r||Q===r)return ue;const Se=M(K*K),Ee=M(_e*_e),Ve=M(ge*Ee),Le=M(Y*Se),Fe=M(M(Q*_e)*Ee),Qe=M(M(se*K)*Se),Ne=M(Le-Ve),We=M(Qe-Fe);if(Ne===r)return We===r?this.double():$.ZERO;const mt=M(Ne*Ne),Je=M(Ne*mt),it=M(Ve*mt),hr=M(We*We-Je-o*it),br=M(We*(it-hr)-Fe*Je),ir=M(K*_e*Ne);return new $(hr,br,ir)}subtract(ue){return this.add(ue.negate())}multiplyUnsafe(ue){const ge=$.ZERO;if(typeof ue=="bigint"&&ue===r)return ge;let Q=g(ue);if(Q===n)return this;if(!T){let Le=ge,Fe=this;for(;Q>r;)Q&n&&(Le=Le.add(Fe)),Fe=Fe.double(),Q>>=n;return Le}let{k1neg:K,k1:Y,k2neg:se,k2:_e}=l.splitScalar(Q),Se=ge,Ee=ge,Ve=this;for(;Y>r||_e>r;)Y&n&&(Se=Se.add(Ve)),_e&n&&(Ee=Ee.add(Ve)),Ve=Ve.double(),Y>>=n,_e>>=n;return K&&(Se=Se.negate()),se&&(Ee=Ee.negate()),Ee=new $(M(Ee.x*l.beta),Ee.y,Ee.z),Se.add(Ee)}precomputeWindow(ue){const ge=T?128/ue+1:256/ue+1,Q=[];let K=this,Y=K;for(let se=0;se>=Le,Ne>Se&&(Ne-=Ve,ue+=n);const We=Qe,mt=Qe+Math.abs(Ne)-1,Je=Fe%2!==0,it=Ne<0;Ne===0?se=se.add(R(Je,K[We])):Y=Y.add(R(it,K[mt]))}return{p:Y,f:se}}multiply(ue,ge){let Q=g(ue),K,Y;if(T){const{k1neg:se,k1:_e,k2neg:Se,k2:Ee}=l.splitScalar(Q);let{p:Ve,f:Le}=this.wNAF(_e,ge),{p:Fe,f:Qe}=this.wNAF(Ee,ge);Ve=R(se,Ve),Fe=R(Se,Fe),Fe=new $(M(Fe.x*l.beta),Fe.y,Fe.z),K=Ve.add(Fe),Y=Le.add(Qe)}else{const{p:se,f:_e}=this.wNAF(Q,ge);K=se,Y=_e}return $.normalizeZ([K,Y])[0]}toAffine(ue){const{x:ge,y:Q,z:K}=this,Y=this.equals($.ZERO);ue==null&&(ue=Y?a:ee(K));const se=ue,_e=M(se*se),Se=M(_e*se),Ee=M(ge*_e),Ve=M(Q*Se),Le=M(K*se);if(Y)return I.ZERO;if(Le!==n)throw new Error("invZ was invalid");return new I(Ee,Ve)}}$.BASE=new $(s.Gx,s.Gy,n),$.ZERO=new $(r,n,r);function R(pe,ue){const ge=ue.negate();return pe?ge:ue}const j=new WeakMap;class I{constructor(ue,ge){this.x=ue,this.y=ge}_setWindowSize(ue){this._WINDOW_SIZE=ue,j.delete(this)}hasEvenY(){return this.y%o===r}static fromCompressedHex(ue){const ge=ue.length===32,Q=E(ge?ue:ue.subarray(1));if(!ve(Q))throw new Error("Point is not on curve");const K=A(Q);let Y=W(K);const se=(Y&n)===n;ge?se&&(Y=M(-Y)):(ue[0]&1)===1!==se&&(Y=M(-Y));const _e=new I(Q,Y);return _e.assertValidity(),_e}static fromUncompressedHex(ue){const ge=E(ue.subarray(1,u+1)),Q=E(ue.subarray(u+1,u*2+1)),K=new I(ge,Q);return K.assertValidity(),K}static fromHex(ue){const ge=C(ue),Q=ge.length,K=ge[0];if(Q===u)return this.fromCompressedHex(ge);if(Q===m&&(K===2||K===3))return this.fromCompressedHex(ge);if(Q===w&&K===4)return this.fromUncompressedHex(ge);throw new Error(`Point.fromHex: received invalid point. Expected 32-${m} compressed bytes or ${w} uncompressed bytes, not ${Q}`)}static fromPrivateKey(ue){return I.BASE.multiply(Pe(ue))}static fromSignature(ue,ge,Q){const{r:K,s:Y}=be(ge);if(![0,1,2,3].includes(Q))throw new Error("Cannot recover: invalid recovery bit");const se=le(C(ue)),{n:_e}=s,Se=Q===2||Q===3?K+_e:K,Ee=ee(Se,_e),Ve=M(-se*Ee,_e),Le=M(Y*Ee,_e),Fe=Q&1?"03":"02",Qe=I.fromHex(Fe+h(Se)),Ne=I.BASE.multiplyAndAddUnsafe(Qe,Ve,Le);if(!Ne)throw new Error("Cannot recover signature: point at infinify");return Ne.assertValidity(),Ne}toRawBytes(ue=!1){return k(this.toHex(ue))}toHex(ue=!1){const ge=h(this.x);return ue?`${this.hasEvenY()?"02":"03"}${ge}`:`04${ge}${h(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const ue="Point is not on elliptic curve",{x:ge,y:Q}=this;if(!ve(ge)||!ve(Q))throw new Error(ue);const K=M(Q*Q),Y=A(ge);if(M(K-Y)!==r)throw new Error(ue)}equals(ue){return this.x===ue.x&&this.y===ue.y}negate(){return new I(this.x,M(-this.y))}double(){return $.fromAffine(this).double().toAffine()}add(ue){return $.fromAffine(this).add($.fromAffine(ue)).toAffine()}subtract(ue){return this.add(ue.negate())}multiply(ue){return $.fromAffine(this).multiply(ue,this).toAffine()}multiplyAndAddUnsafe(ue,ge,Q){const K=$.fromAffine(this),Y=ge===r||ge===n||this!==I.BASE?K.multiplyUnsafe(ge):K.multiply(ge),se=$.fromAffine(ue).multiplyUnsafe(Q),_e=Y.add(se);return _e.equals($.ZERO)?void 0:_e.toAffine()}}e.Point=I,I.BASE=new I(s.Gx,s.Gy),I.ZERO=new I(r,r);function b(pe){return Number.parseInt(pe[0],16)>=8?"00"+pe:pe}function N(pe){if(pe.length<2||pe[0]!==2)throw new Error(`Invalid signature integer tag: ${y(pe)}`);const ue=pe[1],ge=pe.subarray(2,ue+2);if(!ue||ge.length!==ue)throw new Error("Invalid signature integer: wrong length");if(ge[0]===0&&ge[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:E(ge),left:pe.subarray(ue+2)}}function V(pe){if(pe.length<2||pe[0]!=48)throw new Error(`Invalid signature tag: ${y(pe)}`);if(pe[1]!==pe.length-2)throw new Error("Invalid signature: incorrect length");const{data:ue,left:ge}=N(pe.subarray(2)),{data:Q,left:K}=N(ge);if(K.length)throw new Error(`Invalid signature: left bytes after parsing: ${y(K)}`);return{r:ue,s:Q}}class Z{constructor(ue,ge){this.r=ue,this.s=ge,this.assertValidity()}static fromCompact(ue){const ge=ue instanceof Uint8Array,Q="Signature.fromCompact";if(typeof ue!="string"&&!ge)throw new TypeError(`${Q}: Expected string or Uint8Array`);const K=ge?y(ue):ue;if(K.length!==128)throw new Error(`${Q}: Expected 64-byte hex`);return new Z(S(K.slice(0,64)),S(K.slice(64,128)))}static fromDER(ue){const ge=ue instanceof Uint8Array;if(typeof ue!="string"&&!ge)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:Q,s:K}=V(ge?ue:k(ue));return new Z(Q,K)}static fromHex(ue){return this.fromDER(ue)}assertValidity(){const{r:ue,s:ge}=this;if(!ye(ue))throw new Error("Invalid Signature: r must be 0 < r < n");if(!ye(ge))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const ue=s.n>>n;return this.s>ue}normalizeS(){return this.hasHighS()?new Z(this.r,M(-this.s,s.n)):this}toDERRawBytes(){return k(this.toDERHex())}toDERHex(){const ue=b(v(this.s)),ge=b(v(this.r)),Q=ue.length/2,K=ge.length/2,Y=v(Q),se=v(K);return`30${v(K+Q+4)}02${se}${ge}02${Y}${ue}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return k(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}e.Signature=Z;function q(...pe){if(!pe.every(Q=>Q instanceof Uint8Array))throw new Error("Uint8Array list expected");if(pe.length===1)return pe[0];const ue=pe.reduce((Q,K)=>Q+K.length,0),ge=new Uint8Array(ue);for(let Q=0,K=0;Que.toString(16).padStart(2,"0"));function y(pe){if(!(pe instanceof Uint8Array))throw new Error("Expected Uint8Array");let ue="";for(let ge=0;ge0)return BigInt(pe);if(typeof pe=="bigint"&&ye(pe))return pe;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function M(pe,ue=s.P){const ge=pe%ue;return ge>=r?ge:ue+ge}function re(pe,ue){const{P:ge}=s;let Q=pe;for(;ue-- >r;)Q*=Q,Q%=ge;return Q}function W(pe){const{P:ue}=s,ge=BigInt(6),Q=BigInt(11),K=BigInt(22),Y=BigInt(23),se=BigInt(44),_e=BigInt(88),Se=pe*pe*pe%ue,Ee=Se*Se*pe%ue,Ve=re(Ee,i)*Ee%ue,Le=re(Ve,i)*Ee%ue,Fe=re(Le,o)*Se%ue,Qe=re(Fe,Q)*Fe%ue,Ne=re(Qe,K)*Qe%ue,We=re(Ne,se)*Ne%ue,mt=re(We,_e)*We%ue,Je=re(mt,se)*Ne%ue,it=re(Je,i)*Ee%ue,hr=re(it,Y)*Qe%ue,br=re(hr,ge)*Se%ue,ir=re(br,o);if(ir*ir%ue!==pe)throw new Error("Cannot find square root");return ir}function ee(pe,ue=s.P){if(pe===r||ue<=r)throw new Error(`invert: expected positive integers, got n=${pe} mod=${ue}`);let ge=M(pe,ue),Q=ue,K=r,Y=n;for(;ge!==r;){const _e=Q/ge,Se=Q%ge,Ee=K-Y*_e;Q=ge,ge=Se,K=Y,Y=Ee}if(Q!==n)throw new Error("invert: does not exist");return M(K,ue)}function ce(pe,ue=s.P){const ge=new Array(pe.length),Q=pe.reduce((Y,se,_e)=>se===r?Y:(ge[_e]=Y,M(Y*se,ue)),n),K=ee(Q,ue);return pe.reduceRight((Y,se,_e)=>se===r?Y:(ge[_e]=M(Y*ge[_e],ue),M(Y*se,ue)),K),ge}function ie(pe){const ue=pe.length*8-d*8,ge=E(pe);return ue>0?ge>>BigInt(ue):ge}function le(pe,ue=!1){const ge=ie(pe);if(ue)return ge;const{n:Q}=s;return ge>=Q?ge-Q:ge}let L,te;class ae{constructor(ue,ge){if(this.hashLen=ue,this.qByteLen=ge,typeof ue!="number"||ue<2)throw new Error("hashLen must be a number");if(typeof ge!="number"||ge<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(ue).fill(1),this.k=new Uint8Array(ue).fill(0),this.counter=0}hmac(...ue){return e.utils.hmacSha256(this.k,...ue)}hmacSync(...ue){return te(this.k,...ue)}checkSync(){if(typeof te!="function")throw new O("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(ue=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),ue),this.v=await this.hmac(this.v),ue.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),ue),this.v=await this.hmac(this.v))}reseedSync(ue=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),ue),this.v=this.hmacSync(this.v),ue.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),ue),this.v=this.hmacSync(this.v))}async generate(){this.incr();let ue=0;const ge=[];for(;ue0)ue=BigInt(pe);else if(typeof pe=="string"){if(pe.length!==2*d)throw new Error("Expected 32 bytes of private key");ue=S(pe)}else if(pe instanceof Uint8Array){if(pe.length!==d)throw new Error("Expected 32 bytes of private key");ue=E(pe)}else throw new TypeError("Expected valid private key");if(!ye(ue))throw new Error("Expected private key: 0 < key < n");return ue}function he(pe){return pe instanceof I?(pe.assertValidity(),pe):I.fromHex(pe)}function be(pe){if(pe instanceof Z)return pe.assertValidity(),pe;try{return Z.fromDER(pe)}catch{return Z.fromCompact(pe)}}function Ie(pe,ue=!1){return I.fromPrivateKey(pe).toRawBytes(ue)}e.getPublicKey=Ie;function we(pe,ue,ge,Q=!1){return I.fromSignature(pe,ue,ge).toRawBytes(Q)}e.recoverPublicKey=we;function Oe(pe){const ue=pe instanceof Uint8Array,ge=typeof pe=="string",Q=(ue||ge)&&pe.length;return ue?Q===m||Q===w:ge?Q===m*2||Q===w*2:pe instanceof I}function Be(pe,ue,ge=!1){if(Oe(pe))throw new TypeError("getSharedSecret: first arg must be private key");if(!Oe(ue))throw new TypeError("getSharedSecret: second arg must be public key");const Q=he(ue);return Q.assertValidity(),Q.multiply(Pe(pe)).toRawBytes(ge)}e.getSharedSecret=Be;function ke(pe){const ue=pe.length>u?pe.slice(0,u):pe;return E(ue)}function Me(pe){const ue=ke(pe),ge=M(ue,s.n);return Ue(ge{pe=C(pe);const ue=d+8;if(pe.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const ge=M(E(pe),s.n-n)+n;return x(ge)},randomBytes:(pe=32)=>{if(He.web)return He.web.getRandomValues(new Uint8Array(pe));if(He.node){const{randomBytes:ue}=He.node;return Uint8Array.from(ue(pe))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(d+8)),precompute(pe=8,ue=I.BASE){const ge=ue===I.BASE?ue:new I(ue.x,ue.y);return ge._setWindowSize(pe),ge.multiply(i),ge},sha256:async(...pe)=>{if(He.web){const ue=await He.web.subtle.digest("SHA-256",q(...pe));return new Uint8Array(ue)}else if(He.node){const{createHash:ue}=He.node,ge=ue("sha256");return pe.forEach(Q=>ge.update(Q)),Uint8Array.from(ge.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(pe,...ue)=>{if(He.web){const ge=await He.web.subtle.importKey("raw",pe,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),Q=q(...ue),K=await He.web.subtle.sign("HMAC",ge,Q);return new Uint8Array(K)}else if(He.node){const{createHmac:ge}=He.node,Q=ge("sha256",pe);return ue.forEach(K=>Q.update(K)),Uint8Array.from(Q.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(pe,...ue)=>{let ge=qe[pe];if(ge===void 0){const Q=await e.utils.sha256(Uint8Array.from(pe,K=>K.charCodeAt(0)));ge=q(Q,Q),qe[pe]=ge}return e.utils.sha256(ge,...ue)},taggedHashSync:(pe,...ue)=>{if(typeof L!="function")throw new O("sha256Sync is undefined, you need to set it");let ge=qe[pe];if(ge===void 0){const Q=L(Uint8Array.from(pe,K=>K.charCodeAt(0)));ge=q(Q,Q),qe[pe]=ge}return L(ge,...ue)},_JacobianPoint:$},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return L},set(pe){L||(L=pe)}},hmacSha256Sync:{configurable:!1,get(){return te},set(pe){te||(te=pe)}}})})(O2);var vD;function SDe(){if(vD)return il;vD=1;var e=Ae&&Ae.__createBinding||(Object.create?function(u,d,p,m){m===void 0&&(m=p);var w=Object.getOwnPropertyDescriptor(d,p);(!w||("get"in w?!d.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(u,m,w)}:function(u,d,p,m){m===void 0&&(m=p),u[m]=d[p]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(u,d){Object.defineProperty(u,"default",{enumerable:!0,value:d})}:function(u,d){u.default=d}),r=Ae&&Ae.__importStar||function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p in u)p!=="default"&&Object.prototype.hasOwnProperty.call(u,p)&&e(d,u,p);return t(d,u),d};Object.defineProperty(il,"__esModule",{value:!0}),il.verifySignature=il.sign=void 0;const n=_u,o=Eu(),i=r(O2),a=Er,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const d=(0,a.createHash)("sha256");for(const p of u)d.update(p);return d.digest()},i.utils.hmacSha256Sync=(u,...d)=>{const p=(0,a.createHmac)("sha256",Ze.from(u));return d.forEach(m=>p.update(m)),Uint8Array.from(p.digest())};function c(u,d,p){if((p??"default")==="default"){const A=s.keyFromPrivate(d).sign(u);return(0,o.encodeSignature)(A)}else{const w=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d));return(0,o.binToHex)(w)}}il.sign=c;function l(u,d,p,m){const w=m??"default";try{return w==="default"?s.keyFromPublic(d,"hex").verify(u,(0,o.signatureDecode)(s,p)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(p),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d))}catch{return!1}}return il.verifySignature=l,il}var i3={},RX={exports:{}};(function(e){(function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e7,m=1e9;function w(I){var b,N,V,Z=re.prototype={constructor:re,toString:null,valueOf:null},q=new re(1),_=20,y=4,f=-7,h=21,x=-1e7,v=1e7,S=!1,k=1,E=0,C={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},g="0123456789abcdefghijklmnopqrstuvwxyz",M=!0;function re(L,te){var ae,ye,ve,me,Pe,he,be,Ie,we=this;if(!(we instanceof re))return new re(L,te);if(te==null){if(L&&L._isBigNumber===!0){we.s=L.s,!L.c||L.e>v?we.c=we.e=null:L.e=10;Pe/=10,me++);me>v?we.c=we.e=null:(we.e=me,we.c=[L]);return}Ie=String(L)}else{if(!n.test(Ie=String(L)))return V(we,Ie,he);we.s=Ie.charCodeAt(0)==45?(Ie=Ie.slice(1),-1):1}(me=Ie.indexOf("."))>-1&&(Ie=Ie.replace(".","")),(Pe=Ie.search(/e/i))>0?(me<0&&(me=Pe),me+=+Ie.slice(Pe+1),Ie=Ie.substring(0,Pe)):me<0&&(me=Ie.length)}else{if(P(te,2,g.length,"Base"),te==10&&M)return we=new re(L),ie(we,_+we.e+1,y);if(Ie=String(L),he=typeof L=="number"){if(L*0!=0)return V(we,Ie,he,te);if(we.s=1/L<0?(Ie=Ie.slice(1),-1):1,re.DEBUG&&Ie.replace(/^0\.0*|\./,"").length>15)throw Error(s+L)}else we.s=Ie.charCodeAt(0)===45?(Ie=Ie.slice(1),-1):1;for(ae=g.slice(0,te),me=Pe=0,be=Ie.length;Peme){me=be;continue}}else if(!ve&&(Ie==Ie.toUpperCase()&&(Ie=Ie.toLowerCase())||Ie==Ie.toLowerCase()&&(Ie=Ie.toUpperCase()))){ve=!0,Pe=-1,me=0;continue}return V(we,String(L),he,te)}he=!1,Ie=N(Ie,te,10,we.s),(me=Ie.indexOf("."))>-1?Ie=Ie.replace(".",""):me=Ie.length}for(Pe=0;Ie.charCodeAt(Pe)===48;Pe++);for(be=Ie.length;Ie.charCodeAt(--be)===48;);if(Ie=Ie.slice(Pe,++be)){if(be-=Pe,he&&re.DEBUG&&be>15&&(L>u||L!==i(L)))throw Error(s+we.s*L);if((me=me-Pe-1)>v)we.c=we.e=null;else if(me=-m&&ve<=m&&ve===i(ve)){if(ye[0]===0){if(ve===0&&ye.length===1)return!0;break e}if(te=(ve+1)%l,te<1&&(te+=l),String(ye[0]).length==te){for(te=0;te=c||ae!==i(ae))break e;if(ae!==0)return!0}}}else if(ye===null&&ve===null&&(me===null||me===1||me===-1))return!0;throw Error(a+"Invalid BigNumber: "+L)},re.maximum=re.max=function(){return ee(arguments,Z.lt)},re.minimum=re.min=function(){return ee(arguments,Z.gt)},re.random=function(){var L=9007199254740992,te=Math.random()*L&2097151?function(){return i(Math.random()*L)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(ae){var ye,ve,me,Pe,he,be=0,Ie=[],we=new re(q);if(ae==null?ae=_:P(ae,0,m),Pe=o(ae/l),S)if(crypto.getRandomValues){for(ye=crypto.getRandomValues(new Uint32Array(Pe*=2));be>>11),he>=9e15?(ve=crypto.getRandomValues(new Uint32Array(2)),ye[be]=ve[0],ye[be+1]=ve[1]):(Ie.push(he%1e14),be+=2);be=Pe/2}else if(crypto.randomBytes){for(ye=crypto.randomBytes(Pe*=7);be=9e15?crypto.randomBytes(7).copy(ye,be):(Ie.push(he%1e14),be+=7);be=Pe/7}else throw S=!1,Error(a+"crypto unavailable");if(!S)for(;be=10;he/=10,be++);beve-1&&(he[Pe+1]==null&&(he[Pe+1]=0),he[Pe+1]+=he[Pe]/ve|0,he[Pe]%=ve)}return he.reverse()}return function(ae,ye,ve,me,Pe){var he,be,Ie,we,Oe,Be,ke,Me,Ue=ae.indexOf("."),je=_,X=y;for(Ue>=0&&(we=E,E=0,ae=ae.replace(".",""),Me=new re(ye),Be=Me.pow(ae.length-Ue),E=we,Me.c=te(j(T(Be.c),Be.e,"0"),10,ve,L),Me.e=Me.c.length),ke=te(ae,ye,ve,Pe?(he=g,L):(he=L,g)),Ie=we=ke.length;ke[--we]==0;ke.pop());if(!ke[0])return he.charAt(0);if(Ue<0?--Ie:(Be.c=ke,Be.e=Ie,Be.s=me,Be=b(Be,Me,je,X,ve),ke=Be.c,Oe=Be.r,Ie=Be.e),be=Ie+je+1,Ue=ke[be],we=ve/2,Oe=Oe||be<0||ke[be+1]!=null,Oe=X<4?(Ue!=null||Oe)&&(X==0||X==(Be.s<0?3:2)):Ue>we||Ue==we&&(X==4||Oe||X==6&&ke[be-1]&1||X==(Be.s<0?8:7)),be<1||!ke[0])ae=Oe?j(he.charAt(1),-je,he.charAt(0)):he.charAt(0);else{if(ke.length=be,Oe)for(--ve;++ke[--be]>ve;)ke[be]=0,be||(++Ie,ke=[1].concat(ke));for(we=ke.length;!ke[--we];);for(Ue=0,ae="";Ue<=we;ae+=he.charAt(ke[Ue++]));ae=j(ae,Ie,he.charAt(0))}return ae}}(),b=function(){function L(ye,ve,me){var Pe,he,be,Ie,we=0,Oe=ye.length,Be=ve%p,ke=ve/p|0;for(ye=ye.slice();Oe--;)be=ye[Oe]%p,Ie=ye[Oe]/p|0,Pe=ke*be+Ie*Be,he=Be*be+Pe%p*p+we,we=(he/me|0)+(Pe/p|0)+ke*Ie,ye[Oe]=he%me;return we&&(ye=[we].concat(ye)),ye}function te(ye,ve,me,Pe){var he,be;if(me!=Pe)be=me>Pe?1:-1;else for(he=be=0;heve[he]?1:-1;break}return be}function ae(ye,ve,me,Pe){for(var he=0;me--;)ye[me]-=he,he=ye[me]1;ye.splice(0,1));}return function(ye,ve,me,Pe,he){var be,Ie,we,Oe,Be,ke,Me,Ue,je,X,D,H,F,B,U,J,ne,oe=ye.s==ve.s?1:-1,de=ye.c,Te=ve.c;if(!de||!de[0]||!Te||!Te[0])return new re(!ye.s||!ve.s||(de?Te&&de[0]==Te[0]:!Te)?NaN:de&&de[0]==0||!Te?oe*0:oe/0);for(Ue=new re(oe),je=Ue.c=[],Ie=ye.e-ve.e,oe=me+Ie+1,he||(he=c,Ie=A(ye.e/l)-A(ve.e/l),oe=oe/l|0),we=0;Te[we]==(de[we]||0);we++);if(Te[we]>(de[we]||0)&&Ie--,oe<0)je.push(1),Oe=!0;else{for(B=de.length,J=Te.length,we=0,oe+=2,Be=i(he/(Te[0]+1)),Be>1&&(Te=L(Te,Be,he),de=L(de,Be,he),J=Te.length,B=de.length),F=J,X=de.slice(0,J),D=X.length;D=he/2&&U++;do{if(Be=0,be=te(Te,X,J,D),be<0){if(H=X[0],J!=D&&(H=H*he+(X[1]||0)),Be=i(H/U),Be>1)for(Be>=he&&(Be=he-1),ke=L(Te,Be,he),Me=ke.length,D=X.length;te(ke,X,Me,D)==1;)Be--,ae(ke,J=10;oe/=10,we++);ie(Ue,me+(Ue.e=we+Ie*l-1)+1,Pe,Oe)}else Ue.e=Ie,Ue.r=+Oe;return Ue}}();function W(L,te,ae,ye){var ve,me,Pe,he,be;if(ae==null?ae=y:P(ae,0,8),!L.c)return L.toString();if(ve=L.c[0],Pe=L.e,te==null)be=T(L.c),be=ye==1||ye==2&&(Pe<=f||Pe>=h)?R(be,Pe):j(be,Pe,"0");else if(L=ie(new re(L),te,ae),me=L.e,be=T(L.c),he=be.length,ye==1||ye==2&&(te<=me||me<=f)){for(;hehe){if(--te>0)for(be+=".";te--;be+="0");}else if(te+=me-he,te>0)for(me+1==he&&(be+=".");te--;be+="0");return L.s<0&&ve?"-"+be:be}function ee(L,te){for(var ae,ye=1,ve=new re(L[0]);ye=10;ve/=10,ye++);return(ae=ye+ae*l-1)>v?L.c=L.e=null:ae=10;he/=10,ve++);if(me=te-ve,me<0)me+=l,Pe=te,be=Oe[Ie=0],we=be/Be[ve-Pe-1]%10|0;else if(Ie=o((me+1)/l),Ie>=Oe.length)if(ye){for(;Oe.length<=Ie;Oe.push(0));be=we=0,ve=1,me%=l,Pe=me-l+1}else break e;else{for(be=he=Oe[Ie],ve=1;he>=10;he/=10,ve++);me%=l,Pe=me-l+ve,we=Pe<0?0:be/Be[ve-Pe-1]%10|0}if(ye=ye||te<0||Oe[Ie+1]!=null||(Pe<0?be:be%Be[ve-Pe-1]),ye=ae<4?(we||ye)&&(ae==0||ae==(L.s<0?3:2)):we>5||we==5&&(ae==4||ye||ae==6&&(me>0?Pe>0?be/Be[ve-Pe]:0:Oe[Ie-1])%10&1||ae==(L.s<0?8:7)),te<1||!Oe[0])return Oe.length=0,ye?(te-=L.e+1,Oe[0]=Be[(l-te%l)%l],L.e=-te||0):Oe[0]=L.e=0,L;if(me==0?(Oe.length=Ie,he=1,Ie--):(Oe.length=Ie+1,he=Be[l-me],Oe[Ie]=Pe>0?i(be/Be[ve-Pe]%Be[Pe])*he:0),ye)for(;;)if(Ie==0){for(me=1,Pe=Oe[0];Pe>=10;Pe/=10,me++);for(Pe=Oe[0]+=he,he=1;Pe>=10;Pe/=10,he++);me!=he&&(L.e++,Oe[0]==c&&(Oe[0]=1));break}else{if(Oe[Ie]+=he,Oe[Ie]!=c)break;Oe[Ie--]=0,he=1}for(me=Oe.length;Oe[--me]===0;Oe.pop());}L.e>v?L.c=L.e=null:L.e=h?R(te,ae):j(te,ae,"0"),L.s<0?"-"+te:te)}return Z.absoluteValue=Z.abs=function(){var L=new re(this);return L.s<0&&(L.s=1),L},Z.comparedTo=function(L,te){return O(this,new re(L,te))},Z.decimalPlaces=Z.dp=function(L,te){var ae,ye,ve,me=this;if(L!=null)return P(L,0,m),te==null?te=y:P(te,0,8),ie(new re(me),L+me.e+1,te);if(!(ae=me.c))return null;if(ye=((ve=ae.length-1)-A(this.e/l))*l,ve=ae[ve])for(;ve%10==0;ve/=10,ye--);return ye<0&&(ye=0),ye},Z.dividedBy=Z.div=function(L,te){return b(this,new re(L,te),_,y)},Z.dividedToIntegerBy=Z.idiv=function(L,te){return b(this,new re(L,te),0,1)},Z.exponentiatedBy=Z.pow=function(L,te){var ae,ye,ve,me,Pe,he,be,Ie,we,Oe=this;if(L=new re(L),L.c&&!L.isInteger())throw Error(a+"Exponent not an integer: "+le(L));if(te!=null&&(te=new re(te)),he=L.e>14,!Oe.c||!Oe.c[0]||Oe.c[0]==1&&!Oe.e&&Oe.c.length==1||!L.c||!L.c[0])return we=new re(Math.pow(+le(Oe),he?L.s*(2-$(L)):+le(L))),te?we.mod(te):we;if(be=L.s<0,te){if(te.c?!te.c[0]:!te.s)return new re(NaN);ye=!be&&Oe.isInteger()&&te.isInteger(),ye&&(Oe=Oe.mod(te))}else{if(L.e>9&&(Oe.e>0||Oe.e<-1||(Oe.e==0?Oe.c[0]>1||he&&Oe.c[1]>=24e7:Oe.c[0]<8e13||he&&Oe.c[0]<=9999975e7)))return me=Oe.s<0&&$(L)?-0:0,Oe.e>-1&&(me=1/me),new re(be?1/me:me);E&&(me=o(E/l+2))}for(he?(ae=new re(.5),be&&(L.s=1),Ie=$(L)):(ve=Math.abs(+le(L)),Ie=ve%2),we=new re(q);;){if(Ie){if(we=we.times(Oe),!we.c)break;me?we.c.length>me&&(we.c.length=me):ye&&(we=we.mod(te))}if(ve){if(ve=i(ve/2),ve===0)break;Ie=ve%2}else if(L=L.times(ae),ie(L,L.e+1,1),L.e>14)Ie=$(L);else{if(ve=+le(L),ve===0)break;Ie=ve%2}Oe=Oe.times(Oe),me?Oe.c&&Oe.c.length>me&&(Oe.c.length=me):ye&&(Oe=Oe.mod(te))}return ye?we:(be&&(we=q.div(we)),te?we.mod(te):me?ie(we,E,y,Pe):we)},Z.integerValue=function(L){var te=new re(this);return L==null?L=y:P(L,0,8),ie(te,te.e+1,L)},Z.isEqualTo=Z.eq=function(L,te){return O(this,new re(L,te))===0},Z.isFinite=function(){return!!this.c},Z.isGreaterThan=Z.gt=function(L,te){return O(this,new re(L,te))>0},Z.isGreaterThanOrEqualTo=Z.gte=function(L,te){return(te=O(this,new re(L,te)))===1||te===0},Z.isInteger=function(){return!!this.c&&A(this.e/l)>this.c.length-2},Z.isLessThan=Z.lt=function(L,te){return O(this,new re(L,te))<0},Z.isLessThanOrEqualTo=Z.lte=function(L,te){return(te=O(this,new re(L,te)))===-1||te===0},Z.isNaN=function(){return!this.s},Z.isNegative=function(){return this.s<0},Z.isPositive=function(){return this.s>0},Z.isZero=function(){return!!this.c&&this.c[0]==0},Z.minus=function(L,te){var ae,ye,ve,me,Pe=this,he=Pe.s;if(L=new re(L,te),te=L.s,!he||!te)return new re(NaN);if(he!=te)return L.s=-te,Pe.plus(L);var be=Pe.e/l,Ie=L.e/l,we=Pe.c,Oe=L.c;if(!be||!Ie){if(!we||!Oe)return we?(L.s=-te,L):new re(Oe?Pe:NaN);if(!we[0]||!Oe[0])return Oe[0]?(L.s=-te,L):new re(we[0]?Pe:y==3?-0:0)}if(be=A(be),Ie=A(Ie),we=we.slice(),he=be-Ie){for((me=he<0)?(he=-he,ve=we):(Ie=be,ve=Oe),ve.reverse(),te=he;te--;ve.push(0));ve.reverse()}else for(ye=(me=(he=we.length)<(te=Oe.length))?he:te,he=te=0;te0)for(;te--;we[ae++]=0);for(te=c-1;ye>he;){if(we[--ye]=0;){for(ae=0,Be=H[ve]%je,ke=H[ve]/je|0,Pe=be,me=ve+Pe;me>ve;)Ie=D[--Pe]%je,we=D[Pe]/je|0,he=ke*Ie+we*Be,Ie=Be*Ie+he%je*je+Me[me]+ae,ae=(Ie/Ue|0)+(he/je|0)+ke*we,Me[me--]=Ie%Ue;Me[me]=ae}return ae?++ye:Me.splice(0,1),ce(L,Me,ye)},Z.negated=function(){var L=new re(this);return L.s=-L.s||null,L},Z.plus=function(L,te){var ae,ye=this,ve=ye.s;if(L=new re(L,te),te=L.s,!ve||!te)return new re(NaN);if(ve!=te)return L.s=-te,ye.minus(L);var me=ye.e/l,Pe=L.e/l,he=ye.c,be=L.c;if(!me||!Pe){if(!he||!be)return new re(ve/0);if(!he[0]||!be[0])return be[0]?L:new re(he[0]?ye:ve*0)}if(me=A(me),Pe=A(Pe),he=he.slice(),ve=me-Pe){for(ve>0?(Pe=me,ae=be):(ve=-ve,ae=he),ae.reverse();ve--;ae.push(0));ae.reverse()}for(ve=he.length,te=be.length,ve-te<0&&(ae=be,be=he,he=ae,te=ve),ve=0;te;)ve=(he[--te]=he[te]+be[te]+ve)/c|0,he[te]=c===he[te]?0:he[te]%c;return ve&&(he=[ve].concat(he),++Pe),ce(L,he,Pe)},Z.precision=Z.sd=function(L,te){var ae,ye,ve,me=this;if(L!=null&&L!==!!L)return P(L,1,m),te==null?te=y:P(te,0,8),ie(new re(me),L,te);if(!(ae=me.c))return null;if(ve=ae.length-1,ye=ve*l+1,ve=ae[ve]){for(;ve%10==0;ve/=10,ye--);for(ve=ae[0];ve>=10;ve/=10,ye++);}return L&&me.e+1>ye&&(ye=me.e+1),ye},Z.shiftedBy=function(L){return P(L,-u,u),this.times("1e"+L)},Z.squareRoot=Z.sqrt=function(){var L,te,ae,ye,ve,me=this,Pe=me.c,he=me.s,be=me.e,Ie=_+4,we=new re("0.5");if(he!==1||!Pe||!Pe[0])return new re(!he||he<0&&(!Pe||Pe[0])?NaN:Pe?me:1/0);if(he=Math.sqrt(+le(me)),he==0||he==1/0?(te=T(Pe),(te.length+be)%2==0&&(te+="0"),he=Math.sqrt(+te),be=A((be+1)/2)-(be<0||be%2),he==1/0?te="5e"+be:(te=he.toExponential(),te=te.slice(0,te.indexOf("e")+1)+be),ae=new re(te)):ae=new re(he+""),ae.c[0]){for(be=ae.e,he=be+Ie,he<3&&(he=0);;)if(ve=ae,ae=we.times(ve.plus(b(me,ve,Ie,1))),T(ve.c).slice(0,he)===(te=T(ae.c)).slice(0,he))if(ae.e0&&Me>0){for(me=Me%he||he,we=ke.substr(0,me);me0&&(we+=Ie+ke.slice(me)),Be&&(we="-"+we)}ye=Oe?we+(ae.decimalSeparator||"")+((be=+ae.fractionGroupSize)?Oe.replace(new RegExp("\\d{"+be+"}\\B","g"),"$&"+(ae.fractionGroupSeparator||"")):Oe):we}return(ae.prefix||"")+ye+(ae.suffix||"")},Z.toFraction=function(L){var te,ae,ye,ve,me,Pe,he,be,Ie,we,Oe,Be,ke=this,Me=ke.c;if(L!=null&&(he=new re(L),!he.isInteger()&&(he.c||he.s!==1)||he.lt(q)))throw Error(a+"Argument "+(he.isInteger()?"out of range: ":"not an integer: ")+le(he));if(!Me)return new re(ke);for(te=new re(q),Ie=ae=new re(q),ye=be=new re(q),Be=T(Me),me=te.e=Be.length-ke.e-1,te.c[0]=d[(Pe=me%l)<0?l+Pe:Pe],L=!L||he.comparedTo(te)>0?me>0?te:Ie:he,Pe=v,v=1/0,he=new re(Be),be.c[0]=0;we=b(he,te,0,1),ve=ae.plus(we.times(ye)),ve.comparedTo(L)!=1;)ae=ye,ye=ve,Ie=be.plus(we.times(ve=Ie)),be=ve,te=he.minus(we.times(ve=te)),he=ve;return ve=b(L.minus(ae),ye,0,1),be=be.plus(ve.times(Ie)),ae=ae.plus(ve.times(ye)),be.s=Ie.s=ke.s,me=me*2,Oe=b(Ie,ye,me,y).minus(ke).abs().comparedTo(b(be,ae,me,y).minus(ke).abs())<1?[Ie,ye]:[be,ae],v=Pe,Oe},Z.toNumber=function(){return+le(this)},Z.toPrecision=function(L,te){return L!=null&&P(L,1,m),W(this,L,te,2)},Z.toString=function(L){var te,ae=this,ye=ae.s,ve=ae.e;return ve===null?ye?(te="Infinity",ye<0&&(te="-"+te)):te="NaN":(L==null?te=ve<=f||ve>=h?R(T(ae.c),ve):j(T(ae.c),ve,"0"):L===10&&M?(ae=ie(new re(ae),_+ve+1,y),te=j(T(ae.c),ae.e,"0")):(P(L,2,g.length,"Base"),te=N(j(T(ae.c),ve,"0"),10,L,ye,!0)),ye<0&&ae.c[0]&&(te="-"+te)),te},Z.valueOf=Z.toJSON=function(){return le(this)},Z._isBigNumber=!0,I!=null&&re.set(I),re}function A(I){var b=I|0;return I>0||I===b?b:b-1}function T(I){for(var b,N,V=1,Z=I.length,q=I[0]+"";Vh^N?1:-1;for(y=(f=Z.length)<(h=q.length)?f:h,_=0;_q[_]^N?1:-1;return f==h?0:f>h^N?1:-1}function P(I,b,N,V){if(IN||I!==i(I))throw Error(a+(V||"Argument")+(typeof I=="number"?IN?" out of range: ":" not an integer: ":" not a primitive number: ")+String(I))}function $(I){var b=I.c.length-1;return A(I.e/l)==b&&I.c[b]%2!=0}function R(I,b){return(I.length>1?I.charAt(0)+"."+I.slice(1):I)+(b<0?"e":"e+")+b}function j(I,b,N){var V,Z;if(b<0){for(Z=N+".";++b;Z+=N);I=Z+I}else if(V=I.length,++b>V){for(Z=N,b-=V;--b;Z+=N);I+=Z}else b!isNaN(parseFloat(T))&&isFinite(T);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(T){return s(T,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(T,O){return s(T,O,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(T,O){return s(T,O,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(T,O,P){const $=d(w(T),O);if(!(0,e.isNumeric)($))return;const R=new r.default($);let j;if(R.gte(1))j=R.toFormat(P.minDecimalPlaces);else{const V=R.toFormat(P.maxDecimalPlaces).split(".")[1],Z=V==null?void 0:V.match(/^0+/),q=Z&&Z.length?Z[0].length:0,_=Math.max(q+P.minDecimalSignificantDigits,P.minDecimalPlaces);j=R.toFormat(_)}let I=j.replace(/0+$/,"");const b=1+j.indexOf(".")+P.decimalPlacesWhenZero;return I.length{if(!u.includes(p.address)){const m=d.get(p.address);m===void 0?d.set(p.address,BigInt(p.attoAlphAmount)):d.set(p.address,BigInt(p.attoAlphAmount)+m)}}),Array.from(d.entries()).map(([p,m])=>({targetAddress:p,depositAmount:m}))}vo.getALPHDepositInfo=n;function o(l){return a(l.unsigned.inputs[0].unlockScript)}vo.getSenderAddress=o;var i;(function(l){l[l.P2PKH=0]="P2PKH",l[l.P2MPKH=1]="P2MPKH",l[l.P2SH=2]="P2SH"})(i||(i={}));function a(l){const u=(0,e.hexToBinUnsafe)(l);if(u.length===0)throw new Error("UnlockScript is empty");const d=u[0],p=u.slice(1);if(d===i.P2PKH)return(0,e.addressFromPublicKey)((0,e.binToHex)(p));if(d===i.P2MPKH)throw new Error("Naive multi-sig address is not supported for exchanges as it will be replaced by P2SH");if(d===i.P2SH){const m=p.slice(0,-1);return(0,e.addressFromScript)(m)}else throw new Error("Invalid unlock script type")}vo.getAddressFromUnlockScript=a;function s(l){return l.unsigned.fixedOutputs.every(d=>d.tokens.length===0)}function c(l){return!(l.contractInputs.length!==0||l.generatedOutputs.length!==0||l.unsigned.inputs.length===0||l.unsigned.scriptOpt!==void 0)}return vo}var wD;function ko(){return wD||(wD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(o,i,a,s){s===void 0&&(s=a);var c=Object.getOwnPropertyDescriptor(i,a);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(o,s,c)}:function(o,i,a,s){s===void 0&&(s=a),o[s]=i[a]}),r=Ae&&Ae.__exportStar||function(o,i){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,o,a)};Object.defineProperty(e,"__esModule",{value:!0}),e.getALPHDepositInfo=e.getSenderAddress=e.isALPHTransferTx=e.validateExchangeAddress=void 0,r(zMe(),e),r(qMe(),e),r(_8(),e),r(x8(),e),r(_De(),e),r(xDe(),e),r(SDe(),e),r(EDe(),e);var n=CDe();Object.defineProperty(e,"validateExchangeAddress",{enumerable:!0,get:function(){return n.validateExchangeAddress}}),Object.defineProperty(e,"isALPHTransferTx",{enumerable:!0,get:function(){return n.isALPHTransferTx}}),Object.defineProperty(e,"getSenderAddress",{enumerable:!0,get:function(){return n.getSenderAddress}}),Object.defineProperty(e,"getALPHDepositInfo",{enumerable:!0,get:function(){return n.getALPHDepositInfo}})}(K5)),K5}var _D;function $8(){return _D||(_D=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StdInterfaceIds=e.request=e.requestWithLog=e.forwardRequests=e.typeLength=e.getDefaultValue=e.fromApiVal=e.fromApiArray=e.fromApiVals=e.toApiVal=e.toApiArray=e.toApiAddress=e.toApiByteVec=e.fromApiNumber256=e.toApiNumber256Optional=e.toApiNumber256=e.toApiBoolean=e.fromApiTokens=e.fromApiToken=e.toApiTokens=e.toApiToken=void 0;const t=g2(),r=KZ(),n=ko();n.assertType;function o(_){return{id:_.id,amount:l(_.amount)}}e.toApiToken=o;function i(_){return _==null?void 0:_.map(o)}e.toApiTokens=i;function a(_){return{id:_.id,amount:d(_.amount)}}e.fromApiToken=a;function s(_){return _==null?void 0:_.map(a)}e.fromApiTokens=s;function c(_){if(typeof _=="boolean")return _;throw new Error(`Invalid boolean value: ${_}`)}e.toApiBoolean=c;function l(_){if(typeof _=="number"&&Number.isInteger(_)||typeof _=="bigint")return _.toString();if(typeof _=="string")try{if(BigInt(_).toString()===_)return _}catch{throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}e.toApiNumber256=l;function u(_){return _===void 0?void 0:l(_)}e.toApiNumber256Optional=u;function d(_){return BigInt(_)}e.fromApiNumber256=d;function p(_){if(typeof _!="string")throw new Error(`Invalid value: ${_}, expected a hex-string`);if((0,n.isHexString)(_))return _;if((0,n.isBase58)(_))try{const y=n.bs58.decode(_);if(y.length==33&&y[0]==3)return Ze.from(y.slice(1)).toString("hex")}catch{throw new Error(`Invalid hex-string: ${_}`)}throw new Error(`Invalid hex-string: ${_}`)}e.toApiByteVec=p;function m(_){if(typeof _=="string")try{return n.bs58.decode(_),_}catch{throw new Error(`Invalid base58 string: ${_}`)}else throw new Error(`Invalid value: ${_}, expected a base58 string`)}e.toApiAddress=m;function w(_,y){if(!Array.isArray(y))throw new Error(`Expected array, got ${y}`);const f=_.lastIndexOf(";");if(f==-1)throw new Error(`Invalid Val type: ${_}`);const h=_.slice(1,f),x=parseInt(_.slice(f+1,-1));if(y.length!=x)throw new Error(`Invalid val dimension: ${y}`);return{value:y.map(v=>A(v,h)),type:"Array"}}e.toApiArray=w;function A(_,y){return y==="Bool"?{value:c(_),type:y}:y==="U256"||y==="I256"?{value:l(_),type:y}:y==="ByteVec"?{value:p(_),type:y}:y==="Address"?{value:m(_),type:y}:w(y,_)}e.toApiVal=A;function T(_,y,f,h=!1){if(_.length===0)throw new Error("Not enough Vals");const x=_[`${y}`];if(f==="Bool"&&x.type===f)return[x.value,y+1];if((f==="U256"||f==="I256")&&x.type===f)return[d(x.value),y+1];if((f==="ByteVec"||f==="Address")&&(x.type===f||h))return[x.value,y+1];{const[v,S]=R(f),k=S.reduce((g,M)=>g*M),E=y+k,C=_.slice(y,E);if(C.length==k&&C.every(g=>g.type===v)){const g=C.map(M=>$(M,v));return[I(g,S),E]}else throw new Error(`Invalid array Val type: ${C}, ${f}`)}}function O(_,y,f,h=!1){let x=0;const v={};return f.forEach((S,k)=>{const E=y[`${k}`],[C,g]=T(_,x,S,h);x=g,v[`${E}`]=C}),v}e.fromApiVals=O;function P(_,y){let f=0;const h=[];for(const x of y){const[v,S]=T(_,f,x);h.push(v),f=S}return h}e.fromApiArray=P;function $(_,y){if(_.type==="Bool"&&_.type===y)return _.value;if((_.type==="U256"||_.type==="I256")&&_.type===y)return d(_.value);if((_.type==="ByteVec"||_.type==="Address")&&_.type===y)return _.value;throw new Error(`Invalid node.Val type: ${_}`)}e.fromApiVal=$;function R(_){const y=_.lastIndexOf(";");if(y===-1)throw new Error(`Invalid Val type: ${_}`);const f=_.slice(1,y),h=parseInt(_.slice(y+1,-1));if(f[0]=="["){const[x,v]=R(f);return[x,(v.unshift(h),v)]}else return[f,[h]]}function j(_){if(_==="U256"||_==="I256")return 0n;if(_==="Bool")return!1;if(_==="ByteVec")return"";if(_==="Address")return t.ZERO_ADDRESS;const[y,f]=R(_),h=j(y);return f.reduceRight((x,v)=>Array(v).fill(x),h)}e.getDefaultValue=j;function I(_,y){if(y.length==1)return _;{const f=[],h=_.length/y[0],x=y.slice(1);for(let v=0;v<_.length;v+=h){const S=_.slice(v,v+h);f.push(I(S,x))}return f}}function b(_){if(_==="U256"||_==="I256"||_==="Bool"||_==="ByteVec"||_==="Address")return 1;const[,y]=R(_);return y.reduce((f,h)=>f*h)}e.typeLength=b;async function N(_,y){const f=(0,r.isDebugModeEnabled)(),{path:h,method:x,params:v}=_;f&&console.log(`[REQUEST] ${h} ${x} ${JSON.stringify(v)}`);try{const S=await y(_);return f&&console.log(`[RESPONSE] ${h} ${x} ${JSON.stringify(S)}`),S}catch(S){throw f&&console.error(`[ERROR] ${h} ${x} `,S),S}}function V(_,y){for(const[f,h]of Object.entries(_))for(const x of Object.keys(h))h[`${x}`]=async(...v)=>N({path:f,method:x,params:v},y)}e.forwardRequests=V;function Z(_){for(const[y,f]of Object.entries(_))for(const[h,x]of Object.entries(f))f[`${h}`]=async(...v)=>N({path:y,method:h,params:v},()=>x(...v))}e.requestWithLog=Z;async function q(_,y){const f=_[`${y.path}`][`${y.method}`];return f(...y.params)}e.request=q,function(_){_.FungibleToken="0001",_.NFTCollection="0002",_.NFT="0003",_.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(W5)),W5}var a3={};(function(){(function(e){(function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};function n(V){return V&&DataView.prototype.isPrototypeOf(V)}if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(V){return V&&o.indexOf(Object.prototype.toString.call(V))>-1};function a(V){if(typeof V!="string"&&(V=String(V)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(V))throw new TypeError("Invalid character in header field name");return V.toLowerCase()}function s(V){return typeof V!="string"&&(V=String(V)),V}function c(V){var Z={next:function(){var q=V.shift();return{done:q===void 0,value:q}}};return r.iterable&&(Z[Symbol.iterator]=function(){return Z}),Z}function l(V){this.map={},V instanceof l?V.forEach(function(Z,q){this.append(q,Z)},this):Array.isArray(V)?V.forEach(function(Z){this.append(Z[0],Z[1])},this):V&&Object.getOwnPropertyNames(V).forEach(function(Z){this.append(Z,V[Z])},this)}l.prototype.append=function(V,Z){V=a(V),Z=s(Z);var q=this.map[V];this.map[V]=q?q+", "+Z:Z},l.prototype.delete=function(V){delete this.map[a(V)]},l.prototype.get=function(V){return V=a(V),this.has(V)?this.map[V]:null},l.prototype.has=function(V){return this.map.hasOwnProperty(a(V))},l.prototype.set=function(V,Z){this.map[a(V)]=s(Z)},l.prototype.forEach=function(V,Z){for(var q in this.map)this.map.hasOwnProperty(q)&&V.call(Z,this.map[q],q,this)},l.prototype.keys=function(){var V=[];return this.forEach(function(Z,q){V.push(q)}),c(V)},l.prototype.values=function(){var V=[];return this.forEach(function(Z){V.push(Z)}),c(V)},l.prototype.entries=function(){var V=[];return this.forEach(function(Z,q){V.push([q,Z])}),c(V)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function u(V){if(V.bodyUsed)return Promise.reject(new TypeError("Already read"));V.bodyUsed=!0}function d(V){return new Promise(function(Z,q){V.onload=function(){Z(V.result)},V.onerror=function(){q(V.error)}})}function p(V){var Z=new FileReader,q=d(Z);return Z.readAsArrayBuffer(V),q}function m(V){var Z=new FileReader,q=d(Z);return Z.readAsText(V),q}function w(V){for(var Z=new Uint8Array(V),q=new Array(Z.length),_=0;_-1?Z:V}function $(V,Z){Z=Z||{};var q=Z.body;if(V instanceof $){if(V.bodyUsed)throw new TypeError("Already read");this.url=V.url,this.credentials=V.credentials,Z.headers||(this.headers=new l(V.headers)),this.method=V.method,this.mode=V.mode,this.signal=V.signal,!q&&V._bodyInit!=null&&(q=V._bodyInit,V.bodyUsed=!0)}else this.url=String(V);if(this.credentials=Z.credentials||this.credentials||"same-origin",(Z.headers||!this.headers)&&(this.headers=new l(Z.headers)),this.method=P(Z.method||this.method||"GET"),this.mode=Z.mode||this.mode||null,this.signal=Z.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(q)}$.prototype.clone=function(){return new $(this,{body:this._bodyInit})};function R(V){var Z=new FormData;return V.trim().split("&").forEach(function(q){if(q){var _=q.split("="),y=_.shift().replace(/\+/g," "),f=_.join("=").replace(/\+/g," ");Z.append(decodeURIComponent(y),decodeURIComponent(f))}}),Z}function j(V){var Z=new l,q=V.replace(/\r?\n[\t ]+/g," ");return q.split(/\r?\n/).forEach(function(_){var y=_.split(":"),f=y.shift().trim();if(f){var h=y.join(":").trim();Z.append(f,h)}}),Z}T.call($.prototype);function I(V,Z){Z||(Z={}),this.type="default",this.status=Z.status===void 0?200:Z.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in Z?Z.statusText:"OK",this.headers=new l(Z.headers),this.url=Z.url||"",this._initBody(V)}T.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},I.error=function(){var V=new I(null,{status:0,statusText:""});return V.type="error",V};var b=[301,302,303,307,308];I.redirect=function(V,Z){if(b.indexOf(Z)===-1)throw new RangeError("Invalid status code");return new I(null,{status:Z,headers:{location:V}})},t.DOMException=e.DOMException;try{new t.DOMException}catch{t.DOMException=function(Z,q){this.message=Z,this.name=q;var _=Error(Z);this.stack=_.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function N(V,Z){return new Promise(function(q,_){var y=new $(V,Z);if(y.signal&&y.signal.aborted)return _(new t.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function h(){f.abort()}f.onload=function(){var x={status:f.status,statusText:f.statusText,headers:j(f.getAllResponseHeaders()||"")};x.url="responseURL"in f?f.responseURL:x.headers.get("X-Request-URL");var v="response"in f?f.response:f.responseText;q(new I(v,x))},f.onerror=function(){_(new TypeError("Network request failed"))},f.ontimeout=function(){_(new TypeError("Network request failed"))},f.onabort=function(){_(new t.DOMException("Aborted","AbortError"))},f.open(y.method,y.url,!0),y.credentials==="include"?f.withCredentials=!0:y.credentials==="omit"&&(f.withCredentials=!1),"responseType"in f&&r.blob&&(f.responseType="blob"),y.headers.forEach(function(x,v){f.setRequestHeader(v,x)}),y.signal&&(y.signal.addEventListener("abort",h),f.onreadystatechange=function(){f.readyState===4&&y.signal.removeEventListener("abort",h)}),f.send(typeof y._bodyInit>"u"?null:y._bodyInit)})}return N.polyfill=!0,e.fetch||(e.fetch=N,e.Headers=l,e.Request=$,e.Response=I),t.Headers=l,t.Request=$,t.Response=I,t.fetch=N,Object.defineProperty(t,"__esModule",{value:!0}),t})({})})(typeof self<"u"?self:Ae)})();var al={},xD;function D8(){if(xD)return al;xD=1,Object.defineProperty(al,"__esModule",{value:!0}),al.isBalanceEqual=al.convertHttpResponse=void 0;function e(r){if(r.error){const n=r.error.detail??`status code: ${r.status}`;throw new Error(`[API Error] - ${n}`)}else return r.data}al.convertHttpResponse=e;function t(r,n){const o=(a,s)=>{const c=(a==null?void 0:a.length)??0,l=(s==null?void 0:s.length)??0;if(c!==l)return!1;if(c===0)return!0;const u=s.map(d=>({...d,used:!1}));return a.every(d=>{const p=u.find(m=>!m.used&&d.id===m.id&&d.amount===m.amount);return p===void 0?!1:(p.used=!0,!0)})},i=r.balance===n.balance&&r.lockedBalance===n.lockedBalance;return r.utxoNum===n.utxoNum&&i&&o(r.tokenBalances,n.tokenBalances)&&o(r.lockedTokenBalances,n.lockedTokenBalances)}return al.isBalanceEqual=t,al}var SD;function NX(){return SD||(SD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=D8();var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,c={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...c}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,c={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,c={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,c={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,c={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsBuildMultiAddresses:(a,s={})=>this.request({path:"/transactions/build-multi-addresses",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,c={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,c={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSweep:(a,s={})=>this.request({path:"/multisig/sweep",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,c={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,c={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,c={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)}}}e.Api=o}(a3)),a3}var s3={},Wt={},ED;function BX(){if(ED)return Wt;ED=1;var e;Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.buildDebugBytecode=Wt.encodeContractField=Wt.buildContractByteCode=Wt.buildScriptByteCode=Wt.encodeScriptField=Wt.encodeScriptFieldAsString=Wt.encodeAddress=Wt.encodeByteVec=Wt.encodeU256=Wt.encodeI256=Wt.encodeBool=void 0;const t=jn,r=Bd(),n=ko(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?d(v):p(v)}Wt.encodeI256=l;function u(v,S,k){let E=v.toString(16);E.length%2===1?E="0"+E:S&&E[0]>="8"&&(E="00"+E);const C=E.length/2,g=new Uint8Array(C+1);for(let re=0;re>8)+s.twoBytePrefix,S&255])}else if(v>24)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v=-a.oneByteBound){const S=Number(v);return new Uint8Array([(S^s.oneByteNegPrefix)&255])}else if(v>=-a.twoByteBound){const S=Number(v);return new Uint8Array([(S>>8^s.twoByteNegPrefix)&255,S&255])}else if(v>=-a.fourByteBound){const S=Number(v);return new Uint8Array([(S>>24^s.fourByteNegPrefix)&255,S>>16&255,S>>8&255,S&255])}else{if(v>=a.i256LowerBound)return u(~v,!0,!0);throw Error(`Too small number for i256: ${v}`)}}function m(v){if(v>8&255)+s.twoBytePrefix,S&255])}else if(v>24&255)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v{const g=k.names[`${C}`],M=k.types[`${C}`];if(g in S){const re=S[`${g}`];return N(g,()=>R(M,re))}else throw new Error(`The value of field ${g} is not provided`)})}Wt.buildScriptByteCode=b;function N(v,S){try{return S()}catch(k){throw k instanceof Error?new Error(`Invalid ${v}, error: ${k.message}`):k}}function V(v,S,k){const C=S.isMutable.map((M,re)=>re).filter(M=>S.isMutable[`${M}`]===k).flatMap(M=>{const re=S.names[`${M}`],W=S.types[`${M}`];if(re in v){const ee=v[`${re}`];return N(re,()=>h(W,ee))}else throw new Error(`The value of field ${re} is not provided`)});return t.Buffer.from(l(BigInt(C.length))).toString("hex")+C.map(M=>t.Buffer.from(M).toString("hex")).join("")}function Z(v,S,k){const E=V(S,k,!1),C=V(S,k,!0);return v+E+C}Wt.buildContractByteCode=Z;var q;(function(v){v[v.Bool=0]="Bool",v[v.I256=1]="I256",v[v.U256=2]="U256",v[v.ByteVec=3]="ByteVec",v[v.Address=4]="Address"})(q||(q={}));function _(v){return new Uint8Array([q.I256,...l(v)])}function y(v){return new Uint8Array([q.U256,...m(v)])}function f(v,S){if(!Array.isArray(S))throw new Error(`Expected array, got ${S}`);const k=v.lastIndexOf(";");if(k==-1)throw new Error(`Invalid Array type: ${v}`);const E=v.slice(1,k),C=parseInt(v.slice(k+1,-1));if(S.length!=C)throw new Error(`Invalid val dimension: ${S}`);return S.flatMap(g=>h(E,g))}function h(v,S){switch(v){case"Bool":const k=(0,r.toApiBoolean)(S)?1:0;return[new Uint8Array([q.Bool,k])];case"I256":const E=(0,r.toApiNumber256)(S);return[_(BigInt(E))];case"U256":const C=(0,r.toApiNumber256)(S);return[y(BigInt(C))];case"ByteVec":const g=(0,r.toApiByteVec)(S);return[new Uint8Array([q.ByteVec,...w(g)])];case"Address":const M=(0,r.toApiAddress)(S);return[new Uint8Array([q.Address,...A(M)])];default:return f(v,S)}}Wt.encodeContractField=h;function x(v,S){if(S==="")return v;const k=/[=+-][0-9a-f]*/g;let E="",C=0;for(const g of S.matchAll(k)){const M=g[0],re=M[0];if(re==="="){const W=parseInt(M.substring(1));E=E+v.slice(C,C+W),C=C+W}else if(re==="+")E=E+M.substring(1);else{const W=parseInt(M.substring(1));C=C+W}}return E}return Wt.buildDebugBytecode=x,Wt}var c3={},vi={},CD;function FX(){if(CD)return vi;CD=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.getCurrentExplorerProvider=vi.setCurrentExplorerProvider=vi.getCurrentNodeProvider=vi.setCurrentNodeProvider=void 0;const e=Bd();let t;function r(s,c,l){typeof s=="string"?t=new e.NodeProvider(s,c,l):t=s}vi.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}vi.getCurrentNodeProvider=n;let o;function i(s,c,l){typeof s=="string"?o=new e.ExplorerProvider(s,c,l):o=s}vi.setCurrentExplorerProvider=i;function a(){return o}return vi.getCurrentExplorerProvider=a,vi}var sl={},PD;function jX(){if(PD)return sl;PD=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.subscribeToEvents=sl.EventSubscription=void 0;const e=Eu(),t=ko();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}sl.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return sl.subscribeToEvents=n,sl}var AD;function PDe(){return AD||(AD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(X,D,H,F){F===void 0&&(F=H);var B=Object.getOwnPropertyDescriptor(D,H);(!B||("get"in B?!D.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return D[H]}}),Object.defineProperty(X,F,B)}:function(X,D,H,F){F===void 0&&(F=H),X[F]=D[H]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(X,D){Object.defineProperty(X,"default",{enumerable:!0,value:D})}:function(X,D){X.default=D}),n=Ae&&Ae.__importStar||function(X){if(X&&X.__esModule)return X;var D={};if(X!=null)for(var H in X)H!=="default"&&Object.prototype.hasOwnProperty.call(X,H)&&t(D,X,H);return r(D,X),D},o=Ae&&Ae.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=jn,a=o(Er),s=Er,c=Bd(),l=n(BX()),u=ko(),d=FX(),p=n(Er),m=jX(),w=g2(),A=n(qi),T=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var O;(function(X){X[X.Contract=0]="Contract",X[X.Script=1]="Script",X[X.AbstractContract=2]="AbstractContract",X[X.Interface=3]="Interface"})(O||(O={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class P{constructor(D,H){this.matcher=new RegExp(D,"mg"),this.type=H}}function $(X){let D=0;for(let H=0;Hthis.compilerOptionsUsed[`${U}`]===J)||H.length!==this.infos.size)return!0;for(const U of H){const J=this.infos.get(U.name);if(typeof J>"u"||J.sourceCodeHash!==U.sourceCodeHash)return!0}return!1}static async from(D){const H=p.join(D,I.artifactFileName);if(a.default.existsSync(H))try{const F=await s.promises.readFile(H),B=JSON.parse(F.toString()),U=B.fullNodeVersion,J=B.compilerOptionsUsed,ne=new Map(Object.entries(B.infos));return new I(U,J,ne)}catch(F){console.log(`Failed to load project artifact, error: ${F}`);return}}}e.ProjectArtifact=I,I.artifactFileName=".project.json";class b{static buildProjectArtifact(D,H,F,B,U){const J=new Map;F.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:oe.artifact.codeHashDebug,warnings:oe.warnings})}),B.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:oe.warnings})});const ne=F.size+B.size;return H.slice(ne).forEach(oe=>{J.set(oe.name,{sourceFile:oe.contractRelativePath,sourceCodeHash:oe.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new I(D,U,J)}constructor(D,H,F,B,U,J,ne){this.contractsRootDir=D,this.artifactsRootDir=H,this.sourceInfos=F,this.contracts=B,this.scripts=U,this.projectArtifact=ne,J&&b.checkCompilerWarnings([...[...B.entries()].map(oe=>oe[1].warnings).flat(),...[...U.entries()].map(oe=>oe[1].warnings).flat()],J)}static checkCompilerWarnings(D,H){if(D.length!==0){const F=" - ",U=`Compilation warnings: +`+(F+D.join(` +`+F))+` +`;if(H)throw new Error(U);console.log(U)}}static contract(D){const H=b.currentProject.contracts.get(D);if(typeof H>"u")throw new Error(`Contract "${D}" does not exist`);return H.artifact}static script(D){const H=b.currentProject.scripts.get(D);if(typeof H>"u")throw new Error(`Script "${D}" does not exist`);return H.artifact}async saveArtifactsToFile(D){const H=this.artifactsRootDir,F=async function(B){const U=B.sourceInfo.getArtifactPath(H),J=p.dirname(U);return a.default.existsSync(J)||a.default.mkdirSync(J,{recursive:!0}),s.promises.writeFile(U,B.artifact.toString())};this.contracts.forEach(B=>F(B)),this.scripts.forEach(B=>F(B)),await this.projectArtifact.saveToFile(D)}contractByCodeHash(D){const H=[...this.contracts.values()].find(F=>F.artifact.codeHash===D||F.artifact.codeHashDebug==D);if(typeof H>"u")throw new Error(`Unknown code with code hash: ${D}`);return H.artifact}static async compile(D,H,F,B,U,J,ne,oe){const Te=F.reduce((Ge,qe)=>(Ge.find(pe=>pe.sourceCodeHash===qe.sourceCodeHash)===void 0&&Ge.push(qe),Ge),[]).map(Ge=>Ge.sourceCode).join(` +`),$e=await H.contracts.postContractsCompileProject({code:Te,compilerOptions:oe}),De=new Map,Xe=new Map;$e.contracts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Contract&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for contract ${Ge.name}`);const pe=V.fromCompileResult(Ge);De.set(pe.name,new j(qe,pe,Ge.warnings))}),$e.scripts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Script&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for script ${Ge.name}`);const pe=Z.fromCompileResult(Ge);Xe.set(pe.name,new j(qe,pe,Ge.warnings))});const ze=b.buildProjectArtifact(D,F,De,Xe,oe),He=new b(U,J,F,De,Xe,ne,ze);return await He.saveArtifactsToFile(B),He}static async loadArtifacts(D,H,F,B,U,J,ne,oe){try{const de=new Map,Te=new Map;for(const $e of H){const De=F.infos.get($e.name);if(typeof De>"u")throw Error(`Unable to find project info for ${$e.name}, please rebuild the project`);const Xe=De.warnings,ze=$e.getArtifactPath(J);if($e.type===O.Contract){const He=await V.fromArtifactFile(ze,De.bytecodeDebugPatch,De.codeHashDebug);de.set(He.name,new j($e,He,Xe))}else if($e.type===O.Script){const He=await Z.fromArtifactFile(ze,De.bytecodeDebugPatch);Te.set(He.name,new j($e,He,Xe))}}return new b(U,J,H,de,Te,ne,F)}catch(de){return console.log(`Failed to load artifacts, error: ${de}, try to re-compile contracts...`),b.compile(F.fullNodeVersion,D,H,B,U,J,ne,oe)}}static getImportSourcePath(D,H){const F=H.split("/");if(F.length>1&&F[0]==="std"){const U=p.dirname(__filename);return p.join(U,"..","..","..",H)}let B=D;for(;;){const U=p.join(B,"node_modules",H);if(a.default.existsSync(U))return U;const J=B;if(B=p.join(B,".."),J===B)throw new Error(`Specified import file does not exist: ${H}`)}}static async handleImports(D,H,F,B){const U=[],J=F.replace(b.importRegex,oe=>(U.push(oe),"")),ne=[];for(const oe of U){const de=oe.slice(8,-1),Te=de.endsWith(".ral")?de:de+".ral";if(!B.includes(Te)){B.push(Te);const $e=b.getImportSourcePath(D,Te),De=await b.loadSourceFile(D,H,$e,B,!0);ne.push(...De)}}return[J,ne]}static async loadSourceFile(D,H,F,B,U){const J=p.relative(H,F);if(!F.endsWith(".ral"))throw new Error(`Invalid filename: ${F}, smart contract file name should end with ".ral"`);const ne=await s.promises.readFile(F),[oe,de]=await b.handleImports(D,H,ne.toString(),B);if(oe.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${F}`);const Te=de;for(const $e of this.matchers){const De=oe.matchAll($e.matcher);for(const Xe of De){const ze=await R.from($e.type,Xe[1],oe,J,U);Te.push(ze)}}return Te}static async loadSourceFiles(D,H){const F=[],B=[],U=async function(ne){const oe=await s.promises.readdir(ne,{withFileTypes:!0});for(const de of oe)if(de.isFile()){const Te=p.join(ne,de.name),$e=await b.loadSourceFile(D,H,Te,F,!1);B.push(...$e)}else{const Te=p.join(ne,de.name);await U(Te)}};await U(H);const J=B.filter(ne=>ne.type===O.Contract||ne.type===O.Script).length;if(B.length===0||J===0)throw new Error("Project have no source files");return B.sort((ne,oe)=>ne.type-oe.type)}static async build(D={},H=".",F=b.DEFAULT_CONTRACTS_DIR,B=b.DEFAULT_ARTIFACTS_DIR,U=void 0){const J=(0,d.getCurrentNodeProvider)(),ne=U??(await J.infos.getInfosVersion()).version,oe=await b.loadSourceFiles(H,F),{errorOnWarnings:de,...Te}={...e.DEFAULT_COMPILER_OPTIONS,...D},$e=await I.from(H);$e===void 0||$e.needToReCompile(Te,oe,ne)?(console.log(`Compiling contracts in folder "${F}"`),b.currentProject=await b.compile(ne,J,oe,H,F,B,de,Te)):(console.log(`Contracts are compiled already. Loading them from folder "${B}"`),b.currentProject=await b.loadArtifacts(J,oe,$e,H,F,B,de,Te))}}e.Project=b,b.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),b.abstractContractMatcher=new P("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",O.AbstractContract),b.contractMatcher=new P("^Contract ([A-Z][a-zA-Z0-9]*)",O.Contract),b.interfaceMatcher=new P("^Interface ([A-Z][a-zA-Z0-9]*)",O.Interface),b.scriptMatcher=new P("^TxScript ([A-Z][a-zA-Z0-9]*)",O.Script),b.matchers=[b.abstractContractMatcher,b.contractMatcher,b.interfaceMatcher,b.scriptMatcher],b.DEFAULT_CONTRACTS_DIR="contracts",b.DEFAULT_ARTIFACTS_DIR="artifacts";class N{constructor(D,H,F){this.version=D,this.name=H,this.functions=F}publicFunctions(){return this.functions.filter(D=>D.isPublic).map(D=>D.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(D=>D.usePreapprovedAssets).map(D=>D.name)}usingAssetsInContractFunctions(){return this.functions.filter(D=>D.useAssetsInContract).map(D=>D.name)}async isDevnet(D){if(!D.nodeProvider)return!1;const H=await D.nodeProvider.infos.getInfosChainParams();return(0,u.isDevnet)(H.networkId)}}e.Artifact=N;class V extends N{constructor(D,H,F,B,U,J,ne,oe,de,Te,$e,De){super(D,H,de),this.bytecode=F,this.bytecodeDebugPatch=B,this.codeHash=U,this.fieldsSig=ne,this.eventsSig=oe,this.constants=Te,this.enums=$e,this.stdInterfaceId=De,this.bytecodeDebug=l.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=J}static fromJson(D,H="",F=""){if(D.version==null||D.name==null||D.bytecode==null||D.codeHash==null||D.fieldsSig==null||D.eventsSig==null||D.constants==null||D.enums==null||D.functions==null)throw Error("The artifact JSON for contract is incomplete");return new V(D.version,D.name,D.bytecode,H,D.codeHash,F||D.codeHash,D.fieldsSig,D.eventsSig,D.functions,D.constants,D.enums,D.stdInterfaceId===null?void 0:D.stdInterfaceId)}static fromCompileResult(D){return new V(D.version,D.name,D.bytecode,D.bytecodeDebugPatch,D.codeHash,D.codeHashDebug,D.fields,D.events,D.functions,D.constants,D.enums,D.stdInterfaceId)}static async fromArtifactFile(D,H,F){const B=await s.promises.readFile(D),U=JSON.parse(B.toString());return V.fromJson(U,H,F)}toString(){const D={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(D.stdInterfaceId=this.stdInterfaceId),JSON.stringify(D,null,2)}getInitialFieldsWithDefaultValues(){const D=this.stdInterfaceId===void 0?this.fieldsSig:{names:this.fieldsSig.names.slice(0,-1),types:this.fieldsSig.types.slice(0,-1),isMutable:this.fieldsSig.isMutable.slice(0,-1)};return D.names.reduce((H,F,B)=>(H[`${F}`]=(0,c.getDefaultValue)(D.types[`${B}`]),H),{})}toState(D,H,F){const B=typeof F<"u"?F:V.randomAddress();return{address:B,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(B)),bytecode:this.bytecode,codeHash:this.codeHash,fields:D,fieldsSig:this.fieldsSig,asset:H}}static randomAddress(){const D=new Uint8Array(33);return T.getRandomValues(D),D[0]=3,u.bs58.encode(D)}printDebugMessages(D,H){H.length!=0&&(console.log(`Testing ${this.name}.${D}:`),H.forEach(F=>console.log(`> Contract @ ${F.contractAddress} - ${F.message}`)))}toApiFields(D){return typeof D>"u"?[]:S(D,this.fieldsSig)}toApiArgs(D,H){if(H){const F=this.functions.find(B=>B.name==D);if(F==null)throw new Error(`Invalid function name: ${D}`);return k(H,F)}else return[]}getMethodIndex(D){return this.functions.findIndex(H=>H.name===D)}toApiContractStates(D){return typeof D<"u"?D.map(H=>v(H)):void 0}toApiTestContractParams(D,H){const F=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!1),B=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!0);return{group:H.group,blockHash:H.blockHash,blockTimeStamp:H.blockTimeStamp,txId:H.txId,address:H.address,callerAddress:H.callerAddress,bytecode:this.bytecodeDebug,initialImmFields:F,initialMutFields:B,initialAsset:typeof H.initialAsset<"u"?y(H.initialAsset):void 0,methodIndex:this.getMethodIndex(D),args:this.toApiArgs(D,H.testArgs),existingContracts:this.toApiContractStates(H.existingContracts),inputAssets:g(H.inputAssets)}}fromApiContractState(D){return{address:D.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(D.address)),bytecode:D.bytecode,initialStateHash:D.initialStateHash,codeHash:D.codeHash,fields:q(D.immFields,D.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:f(D.asset)}}static fromApiContractState(D,H){return(H?H(D.codeHash):b.currentProject.contractByCodeHash(D.codeHash)).fromApiContractState(D)}static fromApiEvent(D,H,F,B){let U,J;if(D.eventIndex==V.ContractCreatedEventIndex)U=le(_(D.fields,V.ContractCreatedEvent,!0)),J=V.ContractCreatedEvent.name;else if(D.eventIndex==V.ContractDestroyedEventIndex)U=_(D.fields,V.ContractDestroyedEvent,!0),J=V.ContractDestroyedEvent.name;else{const oe=(B?B(H):b.currentProject.contractByCodeHash(H)).eventsSig[D.eventIndex];U=_(D.fields,oe),J=oe.name}return{txId:F,blockHash:D.blockHash,contractAddress:D.contractAddress,name:J,eventIndex:D.eventIndex,fields:U}}fromApiTestContractResult(D,H,F){const B=this.functions.findIndex(de=>de.name===D),U=this.functions[`${B}`].returnTypes,J=(0,c.fromApiArray)(H.returns,U),ne=J.length===0?null:J.length===1?J[0]:J,oe=new Map;return oe.set(H.address,H.codeHash),H.contracts.forEach(de=>oe.set(de.address,de.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(H.address)),contractAddress:H.address,returns:ne,gasUsed:H.gasUsed,contracts:H.contracts.map(de=>V.fromApiContractState(de)),txOutputs:H.txOutputs.map(M),events:V.fromApiEvents(H.events,oe,F),debugMessages:H.debugMessages}}async txParamsForDeployment(D,H){const F=await this.isDevnet(D),B=H.initialFields??{},U=this.buildByteCodeToDeploy(ye(this,B),F),J=await D.getSelectedAccount();return{signerAddress:J.address,signerKeyType:J.keyType,bytecode:U,initialAttoAlphAmount:H==null?void 0:H.initialAttoAlphAmount,issueTokenAmount:H==null?void 0:H.issueTokenAmount,initialTokenAmounts:H==null?void 0:H.initialTokenAmounts,gasAmount:H==null?void 0:H.gasAmount,gasPrice:H==null?void 0:H.gasPrice}}buildByteCodeToDeploy(D,H){try{return l.buildContractByteCode(H?this.bytecodeDebug:this.bytecode,D,this.fieldsSig)}catch(F){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${F}`)}}static fromApiEvents(D,H,F,B){return D.map(U=>{const J=U.contractAddress,ne=H.get(J);if(typeof ne<"u"||U.eventIndex<0)return V.fromApiEvent(U,ne,F,B);throw Error(`Cannot find codeHash for the contract address: ${J}`)})}toApiCallContract(D,H,F,B){const U=this.functions[`${B}`],J=E(D.args??{},U.paramNames,U.paramTypes);return{...D,group:H,address:F,methodIndex:B,args:J}}fromApiCallContractResult(D,H,F,B){const U=this.functions[`${F}`].returnTypes,J=je(D),ne=(0,c.fromApiArray)(J.returns,U),oe=ne.length===0?null:ne.length===1?ne[0]:ne,de=new Map;return J.contracts.forEach(Te=>de.set(Te.address,Te.codeHash)),{returns:oe,gasUsed:J.gasUsed,contracts:J.contracts.map(Te=>V.fromApiContractState(Te,B)),txInputs:J.txInputs,txOutputs:J.txOutputs.map(Te=>M(Te)),events:V.fromApiEvents(J.events,de,H,B),debugMessages:J.debugMessages}}}e.Contract=V,V.ContractCreatedEventIndex=-1,V.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},V.ContractDestroyedEventIndex=-2,V.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class Z extends N{constructor(D,H,F,B,U,J){super(D,H,J),this.bytecodeTemplate=F,this.bytecodeDebugPatch=B,this.fieldsSig=U}static fromCompileResult(D){return new Z(D.version,D.name,D.bytecodeTemplate,D.bytecodeDebugPatch,D.fields,D.functions)}static fromJson(D,H=""){if(D.version==null||D.name==null||D.bytecodeTemplate==null||D.fieldsSig==null||D.functions==null)throw Error("The artifact JSON for script is incomplete");return new Z(D.version,D.name,D.bytecodeTemplate,H,D.fieldsSig,D.functions)}static async fromArtifactFile(D,H){const F=await s.promises.readFile(D),B=JSON.parse(F.toString());return this.fromJson(B,H)}toString(){const D={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(D,null,2)}async txParamsForExecution(D,H){const F=await D.getSelectedAccount();return{signerAddress:F.address,signerKeyType:F.keyType,bytecode:this.buildByteCodeToDeploy(H.initialFields??{}),attoAlphAmount:H.attoAlphAmount,tokens:H.tokens,gasAmount:H.gasAmount,gasPrice:H.gasPrice}}buildByteCodeToDeploy(D){try{return l.buildScriptByteCode(this.bytecodeTemplate,D,this.fieldsSig)}catch(H){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${H}`)}}}e.Script=Z;function q(X,D,H){const F=[];let B=0,U=0;return H.types.flatMap((ne,oe)=>Array((0,c.typeLength)(ne)).fill(H.isMutable[`${oe}`])).forEach(ne=>{ne?(F.push(D[`${U}`]),U+=1):(F.push(X[`${B}`]),B+=1)}),(0,c.fromApiVals)(F,H.names,H.types)}function _(X,D,H=!1){return(0,c.fromApiVals)(X,D.fieldNames,D.fieldTypes,H)}function y(X){return{attoAlphAmount:(0,c.toApiNumber256)(X.alphAmount),tokens:typeof X.tokens<"u"?X.tokens.map(c.toApiToken):[]}}function f(X){return{alphAmount:(0,c.fromApiNumber256)(X.attoAlphAmount),tokens:(0,c.fromApiTokens)(X.tokens)}}function h(X,D){if(D in X)return X[`${D}`];throw Error(`No Val exists for ${D}`)}function x(X,D,H){const F=D.names.map((J,ne)=>ne).filter(J=>D.isMutable[`${J}`]===H),B=F.map(J=>D.names[`${J}`]),U=F.map(J=>D.types[`${J}`]);return E(X,B,U)}function v(X){const D=X.fields??{};return{address:X.address,bytecode:X.bytecode,codeHash:X.codeHash,initialStateHash:X.initialStateHash,immFields:x(D,X.fieldsSig,!1),mutFields:x(D,X.fieldsSig,!0),asset:y(X.asset)}}function S(X,D){return E(X,D.names,D.types)}function k(X,D){return E(X,D.paramNames,D.paramTypes)}function E(X,D,H){return D.map((F,B)=>{const U=h(X,F),J=H[`${B}`];return(0,c.toApiVal)(U,J)})}e.toApiVals=E;function C(X){return{address:X.address,asset:y(X.asset)}}function g(X){return typeof X<"u"?X.map(C):void 0}function M(X){if(X.type==="AssetOutput"){const D=X;return{type:"AssetOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens),lockTime:D.lockTime,message:D.message}}else if(X.type==="ContractOutput"){const D=X;return{type:"ContractOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens)}}else throw new Error(`Unknown output type: ${X}`)}function re(){const X=new Uint8Array(32);return T.getRandomValues(X),(0,u.binToHex)(X)}e.randomTxId=re,u.assertType;class W{constructor(D){this.contract=D}async deploy(D,H){const F=await this.contract.txParamsForDeployment(D,{...H,initialFields:ye(this.contract,H.initialFields)}),B=await D.signAndSubmitDeployContractTx(F);return{...B,contractInstance:this.at(B.contractAddress)}}stateForTest(D,H,F){const B={alphAmount:(H==null?void 0:H.alphAmount)??w.ONE_ALPH,tokens:H==null?void 0:H.tokens};return this.contract.toState(ye(this.contract,D),B,F)}}e.ContractFactory=W;class ee{constructor(D){this.script=D}async execute(D,H){const F=await this.script.txParamsForExecution(D,H);return await D.signAndSubmitExecuteScriptTx(F)}}e.ExecutableScript=ee;function ce(X){const D=new Uint8Array(32).fill(0);return D[31]=X,(0,u.addressFromContractId)((0,u.binToHex)(D))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function ie(X,D,H){if(X.eventIndex!==H)throw new Error(`Invalid event index: ${X.eventIndex}, expected: ${H}`);return _(X.fields,D,!0)}function le(X){const D=X.parentAddress,H=X.stdInterfaceId;return{address:X.address,parentAddress:D===""?void 0:D,stdInterfaceIdGuessed:H===""?void 0:H}}function L(X){const D=ie(X,V.ContractCreatedEvent,V.ContractCreatedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractCreatedEvent.name,fields:le(D)}}e.decodeContractCreatedEvent=L;function te(X){const D=ie(X,V.ContractDestroyedEvent,V.ContractDestroyedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractDestroyedEvent.name,fields:{address:D.address}}}e.decodeContractDestroyedEvent=te;function ae(X,D,H,F,B){const U=oe=>oe.eventIndex!==H?Promise.resolve():X.messageCallback(F(oe)),J=(oe,de)=>X.errorCallback(oe,de),ne={pollingInterval:X.pollingInterval,messageCallback:U,errorCallback:J,onEventCountChanged:X.onEventCountChanged};return(0,m.subscribeToEvents)(ne,D,B)}e.subscribeEventsFromContract=ae;function ye(X,D){const H="414c5048";return X.stdInterfaceId===void 0?D:{...D,__stdInterfaceId:H+X.stdInterfaceId}}e.addStdIdToFields=ye;async function ve(X,D,H){const F=(H==null?void 0:H.txId)??re(),B=H.initialFields===void 0?{}:H.initialFields,U=X.contract.toApiTestContractParams(D,{...H,txId:F,initialFields:ye(X.contract,B),testArgs:H.testArgs===void 0?{}:H.testArgs}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsTestContract(U),ne=X.contract.fromApiTestContractResult(D,J,F);return X.contract.printDebugMessages(D,ne.debugMessages),ne}e.testMethod=ve;class me{constructor(D){this.address=D,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(D)),this.groupIndex=(0,u.groupOfAddress)(D)}}e.ContractInstance=me;async function Pe(X,D){const H=await(0,d.getCurrentNodeProvider)().contracts.getContractsAddressState(D.address,{group:D.groupIndex}),F=X.contract.fromApiContractState(H);return{...F,fields:F.fields}}e.fetchContractState=Pe;function he(X,D){return ae(X,e.CreateContractEventAddress,V.ContractCreatedEventIndex,H=>({...L(H),contractAddress:e.CreateContractEventAddress}),D)}e.subscribeContractCreatedEvent=he;function be(X,D){return ae(X,e.DestroyContractEventAddress,V.ContractDestroyedEventIndex,H=>({...te(H),contractAddress:e.DestroyContractEventAddress}),D)}e.subscribeContractDestroyedEvent=be;function Ie(X,D,H,F){if(H.eventIndex!==F&&!(F>=0&&FJ.name===F);return ae(H,D.address,U,J=>Ie(X,D,J,U),B)}e.subscribeContractEvent=we;function Oe(X,D,H,F){const B=ne=>H.messageCallback({...Ie(X,D,ne,ne.eventIndex),contractAddress:D.address}),U=(ne,oe)=>H.errorCallback(ne,oe),J={pollingInterval:H.pollingInterval,messageCallback:B,errorCallback:U,onEventCountChanged:H.onEventCountChanged};return(0,m.subscribeToEvents)(J,D.address,F)}e.subscribeContractEvents=Oe;async function Be(X,D,H,F,B){const U=X.contract.getMethodIndex(H),J=(F==null?void 0:F.txId)??re(),ne=X.contract.toApiCallContract({...F,txId:J,args:F.args===void 0?{}:F.args},D.groupIndex,D.address,U),oe=await(0,d.getCurrentNodeProvider)().contracts.postContractsCallContract(ne),de=X.contract.fromApiCallContractResult(oe,J,U,B);return X.contract.printDebugMessages(H,de.debugMessages),de}e.callMethod=Be;async function ke(X,D,H,F){const B=Object.entries(H),U=B.map(oe=>{const[de,Te]=oe,$e=X.contract.getMethodIndex(de),De=(Te==null?void 0:Te.txId)??re();return X.contract.toApiCallContract({...Te,txId:De,args:Te.args===void 0?{}:Te.args},D.groupIndex,D.address,$e)}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:U}),ne={};return U.forEach((oe,de)=>{const Te=oe.methodIndex,$e=J.results[`${Te}`],De=B[`${de}`][0];ne[`${De}`]=X.contract.fromApiCallContractResult($e,oe.txId,Te,F)}),ne}e.multicallMethods=ke;async function Me(X){return(0,d.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(X).catch(D=>{if(D instanceof Error&&D.message.includes(`${X} not found`))return 0;throw D})}e.getContractEventsCurrentCount=Me;const Ue=async(X,D)=>{const H=await X.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:D}),F=H.unsignedTx.fixedOutputs.length,B=H.unsignedTx.txId+F.toString(16).padStart(8,"0");return(0,u.binToHex)(A.blake2b((0,u.hexToBinUnsafe)(B),void 0,32)).slice(0,62)+H.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=Ue,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function je(X){if(X.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${X.error}`);return X}e.tryGetCallResult=je}(c3)),c3}var OD;function LX(){return OD||(OD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(BX(),e),r(PDe(),e),r(jX(),e)}(s3)),s3}var ID;function ADe(){if(ID)return Ch;ID=1,Object.defineProperty(Ch,"__esModule",{value:!0}),Ch.NodeProvider=void 0;const e=$8(),t=NX(),r=LX(),n=ko();function o(a,s,c){const l=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:c??((...u)=>fetch(...u))});return l.setSecurityData(s??null),l}class i{constructor(s,c,l){this.request=d=>(0,e.request)(this,d),this.fetchFungibleTokenMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1,2,3],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{symbol:T[0].returns[0].value,name:T[1].returns[0].value,decimals:Number(T[2].returns[0].value),totalSupply:BigInt(T[3].returns[0].value)}},this.fetchNFTMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],P=>({methodIndex:P,group:m,address:p})),A=await this.contracts.postContractsMulticallContract({calls:w}),T=(0,n.hexToString)((0,r.tryGetCallResult)(A.results[0]).returns[0].value);if(A.results[1].type==="CallContractSucceeded"){const P=A.results[1];if(P.returns[0]===void 0)throw new Error("Deprecated NFT contract");const R=P.returns[0].value;if(R===void 0||!(0,n.isHexString)(R)||R.length!==64)throw new Error("Deprecated NFT contract");const j=P.returns[1];if(j===void 0)throw new Error("Deprecated NFT contract");const I=(0,n.toNonNegativeBigInt)(j.value);if(I===void 0)throw new Error("Deprecated NFT contract");if(P.returns[2]!==void 0)throw new Error("Deprecated NFT contract");return{tokenUri:T,collectionId:R,nftIndex:I}}else{const P=A.results[1];throw P.error.startsWith("VM execution error: InvalidMethodIndex")?new Error("Deprecated NFT contract"):new Error(`Failed to call contract, error: ${P.error}`)}},this.fetchNFTCollectionMetaData=async d=>{const p=(0,n.addressFromContractId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{collectionUri:(0,n.hexToString)(T[0].returns[0].value),totalSupply:BigInt(T[1].returns[0].value)}},this.fetchNFTRoyaltyAmount=async(d,p,m)=>{const w=(0,n.addressFromContractId)(d),A=(0,n.groupOfAddress)(w),T=await this.contracts.postContractsCallContract({address:w,group:A,methodIndex:4,args:[{type:"ByteVec",value:p},{type:"U256",value:m.toString()}]}),O=(0,r.tryGetCallResult)(T);return BigInt(O.returns[0].value)},this.guessStdInterfaceId=async d=>{var O;const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),A=(O=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(d),{group:m})).immFields.slice(-1).pop())==null?void 0:O.value,T="414c5048";if(typeof A=="string"&&A.startsWith(T))return A.slice(8)},this.guessFollowsNFTCollectionStd=async d=>{const p=await this.guessStdInterfaceId(d);return!!p&&p.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessFollowsNFTCollectionWithRoyaltyStd=async d=>await this.guessStdInterfaceId(d)===e.StdInterfaceIds.NFTCollectionWithRoyalty,this.guessStdTokenType=async d=>{switch(await this.guessStdInterfaceId(d)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,c,l):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events},(0,e.requestWithLog)(this)}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return Ch.NodeProvider=i,Ch}var $h={},l3={},TD;function UX(){return TD||(TD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.MaxSizeAddresses=e.MaxSizeTokens=e.TokenStdInterfaceId=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly",i.Weekly="weekly"}(e.IntervalType||(e.IntervalType={})),function(i){i.Fungible="fungible",i.NonFungible="non-fungible",i.NonStandard="non-standard"}(e.TokenStdInterfaceId||(e.TokenStdInterfaceId={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeTokens||(e.MaxSizeTokens={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeAddresses||(e.MaxSizeAddresses={}));const t=D8();var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,c={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,c={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,c,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,c={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistoryDeprecated:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history-DEPRECATED`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),postTokens:(a,s={})=>this.request({path:"/tokens",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,c={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postTokensFungibleMetadata:(a,s={})=>this.request({path:"/tokens/fungible-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftMetadata:(a,s={})=>this.request({path:"/tokens/nft-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftCollectionMetadata:(a,s={})=>this.request({path:"/tokens/nft-collection-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,c={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,c,l={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse)},this.contracts={getContractsContractAddressParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractAddressSubContracts:(a,s,c={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.market={postMarketPrices:(a,s,c={})=>this.request({path:"/market/prices",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getMarketPricesSymbolCharts:(a,s,c={})=>this.request({path:`/market/prices/${a}/charts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o}(l3)),l3}var MD;function ODe(){if(MD)return $h;MD=1,Object.defineProperty($h,"__esModule",{value:!0}),$h.ExplorerProvider=void 0;const e=$8(),t=UX();function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:c=>c!==null?{headers:{"X-API-KEY":`${c}`}}:{},customFetch:a??((...c)=>fetch(...c))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=l=>(0,e.request)(this,l);let c;typeof i=="string"?c=r(i,a,s):typeof i=="function"?(c=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(c,i)):c=i,this.blocks={...c.blocks},this.transactions={...c.transactions},this.addresses={...c.addresses},this.infos={...c.infos},this.mempool={...c.mempool},this.tokens={...c.tokens},this.charts={...c.charts},this.utils={...c.utils},this.contracts={...c.contracts},this.market={...c.market},this.contractEvents={...c.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return $h.ExplorerProvider=n,$h}var kD;function Bd(){return kD||(kD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(i,a,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(a,s);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,c,l)}:function(i,a,s,c){c===void 0&&(c=s),i[c]=a[s]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Ae&&Ae.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Ae&&Ae.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(ADe(),e),n(ODe(),e),e.node=o(NX()),e.explorer=o(UX()),n($8(),e),n(D8(),e)}(q5)),q5}var u3={},Gt={},Dh={},$D;function HX(){if($D)return Dh;$D=1,Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.TransactionBuilder=void 0;const e=Eu(),t=Bd(),r=ko(),n=zX();class o{static from(a,s,c){const l=typeof a=="string"?new t.NodeProvider(a,s,c):a;return new class extends o{get nodeProvider(){return l}}}static validatePublicKey(a,s,c){if((0,r.addressFromPublicKey)(s,c)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:c,gasPrice:l,...u}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(c),gasPrice:(0,t.toApiNumber256Optional)(l),...u},p=await this.nodeProvider.transactions.postTransactionsBuild(d);return{...p,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:c,initialTokenAmounts:l,issueTokenAmount:u,gasPrice:d,...p}=a,m={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(c),initialTokenAmounts:(0,t.toApiTokens)(l),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(d),...p},w=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(m),A=e.utils.binToHex(e.utils.contractIdFromAddress(w.contractAddress));return{...w,groupIndex:w.fromGroup,contractId:A,gasPrice:(0,t.fromApiNumber256)(w.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:c,tokens:l,gasPrice:u,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(c),tokens:(0,t.toApiTokens)(l),gasPrice:(0,t.toApiNumber256Optional)(u),...d},m=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(p);return{...m,groupIndex:m.fromGroup,gasPrice:(0,t.fromApiNumber256)(m.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},c=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:c.fromGroup,toGroup:c.toGroup,unsignedTx:a.unsignedTx,txId:c.unsignedTx.txId,gasAmount:c.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(c.unsignedTx.gasPrice)}}}return Dh.TransactionBuilder=o,Dh}var DD;function zX(){if(DD)return Gt;DD=1;var e=Ae&&Ae.__createBinding||(Object.create?function(I,b,N,V){V===void 0&&(V=N);var Z=Object.getOwnPropertyDescriptor(b,N);(!Z||("get"in Z?!b.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return b[N]}}),Object.defineProperty(I,V,Z)}:function(I,b,N,V){V===void 0&&(V=N),I[V]=b[N]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(I,b){Object.defineProperty(I,"default",{enumerable:!0,value:b})}:function(I,b){I.default=b}),r=Ae&&Ae.__importStar||function(I){if(I&&I.__esModule)return I;var b={};if(I!=null)for(var N in I)N!=="default"&&Object.prototype.hasOwnProperty.call(I,N)&&e(b,I,N);return t(b,I),b},n=Ae&&Ae.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.fromApiDestination=Gt.toApiDestinations=Gt.toApiDestination=Gt.verifySignedMessage=Gt.hashMessage=Gt.extendMessage=Gt.SignerProviderWithCachedAccounts=Gt.SignerProviderWithMultipleAccounts=Gt.SignerProviderSimple=Gt.InteractiveSignerProvider=Gt.SignerProvider=void 0;const o=jn,i=Er,a=Bd(),s=r(ko()),c=n(qi),l=HX(),u=ko();class d{async getSelectedAccount(){const b=await this.unsafeGetSelectedAccount();return d.validateAccount(b),b}static validateAccount(b){const N=(0,u.addressFromPublicKey)(b.publicKey,b.keyType),V=(0,u.groupOfAddress)(N);if(N!==b.address||V!==b.group)throw Error(`Invalid accounot data: ${JSON.stringify(b)}`)}}Gt.SignerProvider=d;class p extends d{async enable(b){const N=await this.unsafeEnable(b);return d.validateAccount(N),N}}Gt.InteractiveSignerProvider=p;class m extends d{async submitTransaction(b){const N={unsignedTx:b.unsignedTx,signature:b.signature};return this.nodeProvider.transactions.postTransactionsSubmit(N)}async signAndSubmitTransferTx(b){const N=await this.signTransferTx(b);return await this.submitTransaction(N),N}async signAndSubmitDeployContractTx(b){const N=await this.signDeployContractTx(b);return await this.submitTransaction(N),N}async signAndSubmitExecuteScriptTx(b){const N=await this.signExecuteScriptTx(b);return await this.submitTransaction(N),N}async signAndSubmitUnsignedTx(b){const N=await this.signUnsignedTx(b);return await this.submitTransaction(N),N}async usePublicKey(b){const{signerAddress:N,...V}=b;return{fromPublicKey:await this.getPublicKey(N),...V}}async signTransferTx(b){const N=await this.buildTransferTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildTransferTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildTransferTx(b,await this.getPublicKey(b.signerAddress))}async signDeployContractTx(b){const N=await this.buildDeployContractTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildDeployContractTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(b,await this.getPublicKey(b.signerAddress))}async signExecuteScriptTx(b){const N=await this.buildExecuteScriptTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildExecuteScriptTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(b,await this.getPublicKey(b.signerAddress))}async signUnsignedTx(b){const N=await l.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async signMessage(b){const N=O(b.message,b.messageHasher);return{signature:await this.signRaw(b.signerAddress,N)}}}Gt.SignerProviderSimple=m;class w extends m{async getAccount(b){const V=(await this.getAccounts()).find(Z=>Z.address===b);if(typeof V>"u")throw new Error("Unmatched signerAddress");return V}async getPublicKey(b){return(await this.getAccount(b)).publicKey}}Gt.SignerProviderWithMultipleAccounts=w;class A extends w{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=N,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return Promise.resolve(N)}}Gt.SignerProviderWithCachedAccounts=A;function T(I){return"Alephium Signed Message: "+I}Gt.extendMessage=T;function O(I,b){switch(b){case"alephium":return s.binToHex(c.default.blake2b(T(I),void 0,32));case"sha256":const N=(0,i.createHash)("sha256");return N.update(o.Buffer.from(I)),s.binToHex(N.digest());case"blake2b":return s.binToHex(c.default.blake2b(I,void 0,32));case"identity":return I;default:throw Error(`Invalid message hasher: ${b}`)}}Gt.hashMessage=O;function P(I,b,N,V,Z){const q=O(I,b);return s.verifySignature(q,N,V,Z)}Gt.verifySignedMessage=P;function $(I){return{...I,attoAlphAmount:(0,a.toApiNumber256)(I.attoAlphAmount),tokens:(0,a.toApiTokens)(I.tokens)}}Gt.toApiDestination=$;function R(I){return I.map($)}Gt.toApiDestinations=R;function j(I){return{...I,attoAlphAmount:(0,a.fromApiNumber256)(I.attoAlphAmount),tokens:(0,a.fromApiTokens)(I.tokens)}}return Gt.fromApiDestination=j,Gt}var f3={},RD;function IDe(){if(RD)return f3;RD=1,Object.defineProperty(f3,"__esModule",{value:!0});const e=ko();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),f3}var ND;function TDe(){return ND||(ND=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zX(),e),r(IDe(),e),r(HX(),e)}(u3)),u3}var d3={},cl={},BD;function MDe(){if(BD)return cl;BD=1,Object.defineProperty(cl,"__esModule",{value:!0}),cl.subscribeToTxStatus=cl.TxStatusSubscription=void 0;const e=Eu(),t=ko();class r extends t.Subscription{constructor(i,a,s,c,l){super(i),this.txId=a,this.fromGroup=s,this.toGroup=c,this.confirmations=l??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}cl.TxStatusSubscription=r;function n(o,i,a,s,c){return new r(o,i,a,s,c)}return cl.subscribeToTxStatus=n,cl}var ll={},FD;function kDe(){if(FD)return ll;FD=1;var e=Ae&&Ae.__createBinding||(Object.create?function(a,s,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(s,c);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,l,u)}:function(a,s,c,l){l===void 0&&(l=c),a[l]=s[c]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Ae&&Ae.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var c in a)c!=="default"&&Object.prototype.hasOwnProperty.call(a,c)&&e(s,a,c);return t(s,a),s};Object.defineProperty(ll,"__esModule",{value:!0}),ll.transactionVerifySignature=ll.transactionSign=void 0;const n=r(ko());function o(a,s,c){return n.sign(a,s,c)}ll.transactionSign=o;function i(a,s,c,l){return n.verifySignature(a,s,c,l)}return ll.transactionVerifySignature=i,ll}var jD;function $De(){return jD||(jD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(MDe(),e),r(kDe(),e)}(d3)),d3}var h3={},p3={},LD;function DDe(){return LD||(LD=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(A=>{if(!e.validNFTTokenUriMetaDataFields.includes(A))throw new Error(`Invalid field ${A}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=a(u,"description"),m=i(u,"image"),w=o(u.attributes);return{name:d,description:p,image:m,attributes:w}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(w=>{if(!e.validNFTCollectionUriMetaDataFields.includes(w))throw new Error(`Invalid field ${w}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=i(u,"description"),m=i(u,"image");return{name:d,description:p,image:m}}e.validateNFTCollectionUriMetaData=r;async function n(u,d){if(l(d)&&d>0){const p=[];for(let m=0;m{if(typeof d!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(d).forEach(p=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(p))throw new Error(`Invalid field ${p} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(d,"trait_type"),s(d,"value")})}return u}function i(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function a(u,d){const p=u[`${d}`];if(p!==void 0&&!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function s(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return p}async function c(u,d){try{return await(await fetch(`${u}${d}`)).json()}catch(p){throw new Error(`Error fetching NFT metadata from ${u}${d}: ${p}`)}}function l(u){return u===parseInt(u.toString(),10)}}(p3)),p3}var UD;function RDe(){return UD||(UD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(DDe(),e)}(h3)),h3}var HD;function Eu(){return HD||(HD=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(i,a,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(a,s);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,c,l)}:function(i,a,s,c){c===void 0&&(c=s),i[c]=a[s]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Ae&&Ae.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Ae&&Ae.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.web3=void 0,BigInt.prototype.toJSON=function(){return this.toString()},n(Bd(),e),n(LX(),e),n(TDe(),e),n(ko(),e),n($De(),e),n(RDe(),e),n(g2(),e),e.web3=o(FX()),e.utils=o(ko()),n(KZ(),e)}(V5)),V5}var yo={},zD;function VX(){return zD||(zD=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.ALEPHIUM_DEEP_LINK=yo.RELAY_URL=yo.LOGGER=yo.RELAY_METHODS=yo.PROVIDER_NAMESPACE=void 0,yo.PROVIDER_NAMESPACE="alephium",yo.RELAY_METHODS=["alph_signAndSubmitTransferTx","alph_signAndSubmitDeployContractTx","alph_signAndSubmitExecuteScriptTx","alph_signAndSubmitUnsignedTx","alph_signUnsignedTx","alph_signMessage","alph_requestNodeApi","alph_requestExplorerApi"],yo.LOGGER="error",yo.RELAY_URL="wss://relay.walletconnect.com",yo.ALEPHIUM_DEEP_LINK="alephium://"),yo}var Rh={},VD;function NDe(){if(VD)return Rh;VD=1,Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.isMobile=void 0;function e(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)}function t(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)}function r(){return typeof navigator<"u"&&(/iPad/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)}function n(){return t()||r()}function o(){return e()||n()}return Rh.isMobile=o,Rh}const BDe=zi(CMe),FDe=zi(k9e);var qD;function jDe(){if(qD)return cn;qD=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.parseAccount=cn.formatAccount=cn.parseChain=cn.formatChain=cn.isCompatibleAddressGroup=cn.isCompatibleChain=cn.WalletConnectProvider=void 0;const e=ui,t=e.__importDefault(Kw()),r=e.__importDefault(J$),n=J$,o=Z$,i=Z$,a=Eu(),s=VX(),c=NDe(),l=BDe,u=FDe;class d extends a.SignerProvider{static async init(R){const j=new d(R);return await j.initialize(),j}constructor(R){super(),this.events=new t.default,this.account=void 0,this.requestNodeAPI=j=>this.typedRequest("alph_requestNodeApi",j),this.requestExplorerAPI=j=>this.typedRequest("alph_requestExplorerApi",j),this.providerOpts=R,this.networkId=R.networkId,this.addressGroup=R.addressGroup,this.permittedChain=w(this.networkId,this.addressGroup),this.methods=R.methods??[...s.RELAY_METHODS],this.methods.includes("alph_requestNodeApi")?this.nodeProvider=a.NodeProvider.Remote(this.requestNodeAPI):this.nodeProvider=void 0,this.methods.includes("alph_requestExplorerApi")?this.explorerProvider=a.ExplorerProvider.Remote(this.requestExplorerAPI):this.explorerProvider=void 0}async connect(){if(this.session)this.updateNamespace(this.session.namespaces);else{const{uri:R,approval:j}=await this.client.connect({requiredNamespaces:{alephium:{chains:[this.permittedChain],methods:this.methods,events:["accountChanged"]}}});R&&this.emitEvents("displayUri",R),this.session=await j(),this.updateNamespace(this.session.namespaces)}await this.cleanMessages()}async disconnect(){if(!this.client||!this.session)throw new Error("Sign Client not initialized");await this.providerOpts.onDisconnected();const R=(0,i.getSdkError)("USER_DISCONNECTED");try{await this.client.disconnect({topic:this.session.topic,reason:R})}catch{await this.client.session.delete(this.session.topic,R),await this.client.core.crypto.deleteSymKey(this.session.topic)}this.session=void 0,this.account=void 0}on(R,j){this.events.on(R,j)}once(R,j){this.events.once(R,j)}removeListener(R,j){this.events.removeListener(R,j)}off(R,j){this.events.off(R,j)}unsafeGetSelectedAccount(){if(this.account===void 0)throw Error("Account is not available");return Promise.resolve(this.account)}async signAndSubmitTransferTx(R){return this.typedRequest("alph_signAndSubmitTransferTx",R)}async signAndSubmitDeployContractTx(R){return this.typedRequest("alph_signAndSubmitDeployContractTx",R)}async signAndSubmitExecuteScriptTx(R){return this.typedRequest("alph_signAndSubmitExecuteScriptTx",R)}async signAndSubmitUnsignedTx(R){return this.typedRequest("alph_signAndSubmitUnsignedTx",R)}async signUnsignedTx(R){return this.typedRequest("alph_signUnsignedTx",R)}async signMessage(R){return this.typedRequest("alph_signMessage",R)}getWCStorageKey(R,j,I){return R+j+"//"+I}async getSessionTopics(R){const j=this.getWCStorageKey(n.SIGN_CLIENT_STORAGE_PREFIX,l.STORE_STORAGE_VERSION,n.SESSION_CONTEXT),I=await R.getItem(j);return I===void 0?[]:I.filter(b=>{const N=(0,i.getChainsFromNamespaces)(b.namespaces,[s.PROVIDER_NAMESPACE]);return N.length>0&&N.every(V=>V.startsWith(s.PROVIDER_NAMESPACE))}).map(b=>b.topic)}async cleanBeforeInit(){console.log("Clean storage before SignClient init");const R=new u.KeyValueStorage({...l.CORE_STORAGE_OPTIONS}),j=this.getWCStorageKey(l.CORE_STORAGE_PREFIX,l.HISTORY_STORAGE_VERSION,l.HISTORY_CONTEXT),I=await R.getItem(j);if(I!==void 0){const N=I.filter(V=>!this.needToDeleteHistory(V));await R.setItem(j,N)}const b=await this.getSessionTopics(R);if(b.length>0){const N=this.getWCStorageKey(l.CORE_STORAGE_PREFIX,l.MESSAGES_STORAGE_VERSION,l.MESSAGES_CONTEXT),V=await R.getItem(N);if(V===void 0)return;const Z=(0,i.objToMap)(V);b.forEach(q=>Z.delete(q)),await R.setItem(N,(0,i.mapToObj)(Z)),console.log(`Clean topics from messages storage: ${b.join(",")}`)}}needToDeleteHistory(R){var b,N;const j=R.request;if(j.method!=="wc_sessionRequest")return!1;const I=(N=(b=j.params)==null?void 0:b.request)==null?void 0:N.method;return I==="alph_requestNodeApi"||I==="alph_requestExplorerApi"}cleanHistory(R){try{const j=this.client.core.history.records;for(const[I,b]of j)R&&b.response===void 0||this.needToDeleteHistory(b)&&this.client.core.history.delete(b.topic,I)}catch(j){console.error(`Failed to clean history, error: ${j}`)}}async cleanMessages(){if(this.session!==void 0)try{await this.client.core.relayer.messages.del(this.session.topic)}catch(R){console.error(`Failed to clean messages, error: ${R}, topic: ${this.session.topic}`)}}async initialize(){try{await this.cleanBeforeInit()}catch(R){console.error(`Failed to clean storage, error: ${R}`)}await this.createClient(),this.cleanHistory(!1),this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await r.default.init({logger:this.providerOpts.logger||s.LOGGER,relayUrl:this.providerOpts.relayUrl||s.RELAY_URL,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata})}checkStorage(){const R=this.client.session.keys;for(let j=R.length-1;j>=0;j--){const I=this.client.session.get(R[`${j}`]),b=this.client.core.crypto.keychain.has(I.topic),N=(0,i.getChainsFromNamespaces)(I.namespaces,[s.PROVIDER_NAMESPACE]);if(this.sameChains(N,[this.permittedChain])&&b){this.session=I;return}}}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",R=>{var j;R.topic===((j=this.session)==null?void 0:j.topic)&&this.emitEvents("session_ping",R)}),this.client.on("session_event",R=>{var j;R.topic===((j=this.session)==null?void 0:j.topic)&&this.emitEvents("session_event",R)}),this.client.on("session_update",({topic:R,params:j})=>{var I,b;if(R===((I=this.session)==null?void 0:I.topic)){const{namespaces:N}=j,V=(b=this.client)==null?void 0:b.session.get(R);this.session={...V,namespaces:N},this.updateNamespace(this.session.namespaces),this.emitEvents("session_update",{topic:R,params:j})}}),this.client.on("session_delete",R=>{var j;R.topic===((j=this.session)==null?void 0:j.topic)&&this.emitEvents("session_delete")})}emitEvents(R,j){this.events.emit(R,j)}typedRequest(R,j){return this.request({method:R,params:j})}async request(R){var j,I;if(!this.session)throw new Error("Sign Client not initialized");if(!this.methods.includes(R.method))return Promise.reject(new Error(`Invalid method was passed: ${R.method}`));if(!R.method.startsWith("alph_request")){const b=(j=R.params)==null?void 0:j.signerAddress;if(typeof b>"u")throw new Error("Cannot request without signerAddress");const N=(await this.getSelectedAccount()).address;if(b!==N)throw new Error(`Invalid signer address: ${R.params.signerAddress}`)}try{const b=R.method.startsWith("alph_sign");b&&P();const N=await this.client.request({request:{method:R.method,params:R.params},chainId:this.permittedChain,topic:(I=this.session)==null?void 0:I.topic});return b||this.cleanHistory(!0),await this.cleanMessages(),N}catch(b){throw b.message?new Error(b.message):b}}updateNamespace(R){const j=(0,i.getChainsFromNamespaces)(R,[s.PROVIDER_NAMESPACE]);this.setChain(j);const I=(0,i.getAccountsFromNamespaces)(R,[s.PROVIDER_NAMESPACE]);this.setAccounts(I)}sameChains(R,j){return typeof j>"u"?!1:R.join()===j.join()}setChain(R){if(!this.sameChains(R,[this.permittedChain]))throw Error("Network or address group has changed")}sameAccounts(R,j){return typeof j>"u"?!1:R.map(I=>I.address).join()===j.map(I=>I.address).join()}isPreauthorized(){if(!this.session)return!1;const j=(0,i.getAccountsFromNamespaces)(this.session.namespaces,[s.PROVIDER_NAMESPACE]).map(O),{networkId:I,addressGroup:b,keyType:N}=this.providerOpts;return!!j.find(V=>I===V.networkId&&(b===void 0||V.group===b)&&(N===void 0||V.keyType===N))}setAccounts(R){const j=R.map(O);if(this.sameAccounts(j,this.lastSetAccounts))return;if(this.lastSetAccounts=j,j.length!==1)throw Error("The WC provider does not supports multiple accounts");const I=j[0];if(!m(I.group,this.addressGroup))throw Error("The new account belongs to an unexpected address group");this.account=I,this.emitEvents("accountChanged",I)}}cn.WalletConnectProvider=d;function p($){return $.startsWith(`${s.PROVIDER_NAMESPACE}:`)}cn.isCompatibleChain=p;function m($,R){return R===void 0||R===$}cn.isCompatibleAddressGroup=m;function w($,R){if(R!==void 0&&R<0)throw Error("Address group in provider needs to be either undefined or non-negative");const j=R!==void 0?R:-1;return`${s.PROVIDER_NAMESPACE}:${$}/${j}`}cn.formatChain=w;function A($){const[R,j,I]=$.replace(/\//g,":").split(":"),b=parseInt(I,10);if(b<-1)throw Error("Address group in protocol needs to be either -1 or non-negative");const N=a.networkIds;if(!N.includes(j))throw Error(`Invalid network id, expect one of ${N}`);return{networkId:j,addressGroup:b===-1?void 0:b}}cn.parseChain=A;function T($,R){return`${$}:${R.publicKey}/${R.keyType}`}cn.formatAccount=T;function O($){const[R,j,I,b,N]=$.replace(/\//g,":").split(":"),V=(0,a.addressFromPublicKey)(b),Z=(0,a.groupOfAddress)(V);if(N!=="default"&&N!=="bip340-schnorr")throw Error(`Invalid key type: ${N}`);return{address:V,group:Z,publicKey:b,keyType:N,networkId:j}}cn.parseAccount=O;function P(){(0,c.isMobile)()&&(0,o.isBrowser)()&&window.open(s.ALEPHIUM_DEEP_LINK,"_self","noreferrer noopener")}return cn}var g3={},WD;function LDe(){if(WD)return g3;WD=1,Object.defineProperty(g3,"__esModule",{value:!0});const e=Eu();return(0,e.assertType)(),(0,e.assertType)(),g3}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=ui;t.__exportStar(jDe(),e),t.__exportStar(VX(),e),t.__exportStar(LDe(),e)})(BC);var R8={};Object.defineProperty(R8,"__esModule",{value:!0});var qX=R8.getWindowMetadata=void 0;const GD=jt;function UDe(){let e,t;try{e=GD.getDocumentOrThrow(),t=GD.getLocationOrThrow()}catch{return null}function r(){const d=e.getElementsByTagName("link"),p=[];for(let m=0;m-1){const T=w.getAttribute("href");if(T)if(T.toLowerCase().indexOf("https:")===-1&&T.toLowerCase().indexOf("http:")===-1&&T.indexOf("//")!==0){let O=t.protocol+"//"+t.host;if(T.indexOf("/")===0)O+=T;else{const P=t.pathname.split("/");P.pop();const $=P.join("/");O+=$+"/"+T}p.push(O)}else if(T.indexOf("//")===0){const O=t.protocol+T;p.push(O)}else p.push(T)}}return p}function n(...d){const p=e.getElementsByTagName("meta");for(let m=0;mw.getAttribute(T)).filter(T=>T?d.includes(T):!1);if(A.length&&A){const T=w.getAttribute("content");if(T)return T}}return""}function o(){let d=n("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),c=t.origin,l=r();return{description:s,url:c,icons:l,name:a}}qX=R8.getWindowMetadata=UDe;var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});var WX=Qt.getLocalStorage=nQ=Qt.getLocalStorageOrThrow=rQ=Qt.getCrypto=tQ=Qt.getCryptoOrThrow=eQ=Qt.getLocation=QX=Qt.getLocationOrThrow=XX=Qt.getNavigator=ZX=Qt.getNavigatorOrThrow=JX=Qt.getDocument=YX=Qt.getDocumentOrThrow=KX=Qt.getFromWindowOrThrow=GX=Qt.getFromWindow=void 0;function Cu(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var GX=Qt.getFromWindow=Cu;function Fd(e){const t=Cu(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var KX=Qt.getFromWindowOrThrow=Fd;function HDe(){return Fd("document")}var YX=Qt.getDocumentOrThrow=HDe;function zDe(){return Cu("document")}var JX=Qt.getDocument=zDe;function VDe(){return Fd("navigator")}var ZX=Qt.getNavigatorOrThrow=VDe;function qDe(){return Cu("navigator")}var XX=Qt.getNavigator=qDe;function WDe(){return Fd("location")}var QX=Qt.getLocationOrThrow=WDe;function GDe(){return Cu("location")}var eQ=Qt.getLocation=GDe;function KDe(){return Fd("crypto")}var tQ=Qt.getCryptoOrThrow=KDe;function YDe(){return Cu("crypto")}var rQ=Qt.getCrypto=YDe;function JDe(){return Fd("localStorage")}var nQ=Qt.getLocalStorageOrThrow=JDe;function ZDe(){return Cu("localStorage")}WX=Qt.getLocalStorage=ZDe;var XDe=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new nRe:typeof navigator<"u"?JD(navigator.userAgent):uRe()}function cRe(e){return e!==""&&aRe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function JD(e){var t=cRe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new rRe;var o=n[1]&&n[1].split(/[._]/).slice(0,3);o?o.length1:!1}function dRe(){return I2()?oQ()||iQ():!1}function aQ(){const e=N8();return e&&e.name?e.name.toLowerCase()==="node":!1}function hRe(){return!aQ()&&!!sQ()}const pRe=GX,gRe=KX,mRe=YX,vRe=JX,yRe=ZX,sQ=XX,bRe=QX,wRe=eQ,_Re=tQ,xRe=rQ,SRe=nQ,T2=WX;function ERe(){return qX()}function CRe(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function PRe(e){return typeof e=="string"?e:JSON.stringify(e)}const cQ=CRe,lQ=PRe;function uQ(e,t){const r=lQ(t),n=T2();n&&n.setItem(e,r)}function ARe(e){let t=null,r=null;const n=T2();return n&&(r=n.getItem(e)),t=r&&cQ(r),t}function ORe(e){const t=T2();t&&t.removeItem(e)}const fQ="WALLETCONNECT_DEEPLINK_CHOICE";function IRe(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function TRe(e){const t=e.href.split("?")[0];uQ(fQ,Object.assign(Object.assign({},e),{href:t}))}function dQ(e,t){return e.filter(r=>r.name.toLowerCase().includes(t.toLowerCase()))[0]}function MRe(e,t){let r=e;return t&&(r=t.map(n=>dQ(e,n)).filter(Boolean)),r}const hQ="https://registry.walletconnect.com";function kRe(){return hQ+"/api/v2/wallets"}function $Re(){return hQ+"/api/v2/dapps"}function pQ(e,t="mobile"){var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(r=e.image_url.sm)!==null&&r!==void 0?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function DRe(e,t="mobile"){return Object.values(e).filter(r=>!!r[t].universal||!!r[t].native).map(r=>pQ(r,t))}const RRe=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:N8,detectOS:I2,formatIOSMobile:IRe,formatMobileRegistry:DRe,formatMobileRegistryEntry:pQ,getClientMeta:ERe,getCrypto:xRe,getCryptoOrThrow:_Re,getDappRegistryUrl:$Re,getDocument:vRe,getDocumentOrThrow:mRe,getFromWindow:pRe,getFromWindowOrThrow:gRe,getLocal:ARe,getLocalStorage:T2,getLocalStorageOrThrow:SRe,getLocation:wRe,getLocationOrThrow:bRe,getMobileLinkRegistry:MRe,getMobileRegistryEntry:dQ,getNavigator:sQ,getNavigatorOrThrow:yRe,getWalletRegistryUrl:kRe,isAndroid:oQ,isBrowser:hRe,isIOS:iQ,isMobile:dRe,isNode:aQ,mobileLinkChoiceKey:fQ,removeLocal:ORe,safeJsonParse:cQ,safeJsonStringify:lQ,saveMobileLinkInfo:TRe,setLocal:uQ},Symbol.toStringTag,{value:"Module"})),NRe=zi(RRe);var ag={},BRe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},gQ={},zc={},FRe={}.toString,B8=Array.isArray||function(e){return FRe.call(e)=="[object Array]"},jRe=B8;function LRe(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}Et.TYPED_ARRAY_SUPPORT=LRe();var ZD=Et.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function Et(e,t,r){return!Et.TYPED_ARRAY_SUPPORT&&!(this instanceof Et)?new Et(e,t,r):typeof e=="number"?mQ(this,e):GRe(this,e,t,r)}Et.TYPED_ARRAY_SUPPORT&&(Et.prototype.__proto__=Uint8Array.prototype,Et.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Et[Symbol.species]===Et&&Object.defineProperty(Et,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function F8(e){if(e>=ZD)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ZD.toString(16)+" bytes");return e|0}function URe(e){return e!==e}function od(e,t){var r;return Et.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=Et.prototype):(r=e,r===null&&(r=new Et(t)),r.length=t),r}function mQ(e,t){var r=od(e,t<0?0:F8(t)|0);if(!Et.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function yQ(e){if(Et.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:vQ(e).length}function qRe(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function WRe(e,t,r,n){return qRe(vQ(t,e.length-r),e,r,n)}function GRe(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?zRe(e,t,r,n):typeof t=="string"?HRe(e,t):VRe(e,t)}Et.prototype.write=function(t,r,n){r===void 0?(n=this.length,r=0):n===void 0&&typeof r=="string"?(n=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(n)?n=n|0:n=void 0);var o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return WRe(this,t,r,n)};Et.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else if(i<1e3||!Et.TYPED_ARRAY_SUPPORT)for(a=0;a>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var i;if(typeof t=="number")for(i=r;i40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Lo.getSymbolTotalCodewords=function(t){return KRe[t]};Lo.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};Lo.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');j8=t};Lo.isKanjiModeEnabled=function(){return typeof j8<"u"};Lo.toSJIS=function(t){return j8(t)};var M2={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");var n=r.toLowerCase();switch(n){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(M2);function bQ(){this.buffer=[],this.length=0}bQ.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var YRe=bQ,XD=zc;function sg(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=XD.alloc(e*e),this.reservedBit=XD.alloc(e*e)}sg.prototype.set=function(e,t,r,n){var o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)};sg.prototype.get=function(e,t){return this.data[e*this.size+t]};sg.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};sg.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var JRe=sg,wQ={};(function(e){var t=Lo.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];for(var o=Math.floor(n/7)+2,i=t(n),a=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],c=1;c=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var i=o.size,a=0,s=0,c=0,l=null,u=null,d=0;d=5&&(a+=t.N1+(s-5)),l=m,s=1),m=o.get(p,d),m===u?c++:(c>=5&&(a+=t.N1+(c-5)),u=m,c=1)}s>=5&&(a+=t.N1+(s-5)),c>=5&&(a+=t.N1+(c-5))}return a},e.getPenaltyN2=function(o){for(var i=o.size,a=0,s=0;s=10&&(s===1488||s===93)&&a++,c=c<<1&2047|o.get(u,l),u>=10&&(c===1488||c===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){for(var i=0,a=o.data.length,s=0;s=0;){for(var s=a[0],c=0;c0){var a=eR.alloc(this.degree);return o.copy(a,i),a}return o};var QRe=L8,PQ={},Vc={},U8={};U8.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Ma={},AQ="[0-9]+",eNe="[A-Z $%*+\\-./:]+",p0="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";p0=p0.replace(/u/g,"\\u");var tNe="(?:(?![A-Z0-9 $%*+\\-./:]|"+p0+`)(?:.|[\r +]))+`;Ma.KANJI=new RegExp(p0,"g");Ma.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ma.BYTE=new RegExp(tNe,"g");Ma.NUMERIC=new RegExp(AQ,"g");Ma.ALPHANUMERIC=new RegExp(eNe,"g");var rNe=new RegExp("^"+p0+"$"),nNe=new RegExp("^"+AQ+"$"),oNe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ma.testKanji=function(t){return rNe.test(t)};Ma.testNumeric=function(t){return nNe.test(t)};Ma.testAlphanumeric=function(t){return oNe.test(t)};(function(e){var t=U8,r=Ma;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,a){if(e.isValid(i))return i;try{return n(i)}catch{return a}}})(Vc);(function(e){var t=Lo,r=k2,n=M2,o=Vc,i=U8,a=B8,s=7973,c=t.getBCHDigit(s);function l(m,w,A){for(var T=1;T<=40;T++)if(w<=e.getCapacity(T,A,m))return T}function u(m,w){return o.getCharCountIndicator(m,w)+4}function d(m,w){var A=0;return m.forEach(function(T){var O=u(T.mode,w);A+=O+T.getBitsLength()}),A}function p(m,w){for(var A=1;A<=40;A++){var T=d(m,A);if(T<=e.getCapacity(A,w,o.MIXED))return A}}e.from=function(w,A){return i.isValid(w)?parseInt(w,10):A},e.getCapacity=function(w,A,T){if(!i.isValid(w))throw new Error("Invalid QR Code version");typeof T>"u"&&(T=o.BYTE);var O=t.getSymbolTotalCodewords(w),P=r.getTotalCodewordsCount(w,A),$=(O-P)*8;if(T===o.MIXED)return $;var R=$-u(T,w);switch(T){case o.NUMERIC:return Math.floor(R/10*3);case o.ALPHANUMERIC:return Math.floor(R/11*2);case o.KANJI:return Math.floor(R/13);case o.BYTE:default:return Math.floor(R/8)}},e.getBestVersionForData=function(w,A){var T,O=n.from(A,n.M);if(a(w)){if(w.length>1)return p(w,O);if(w.length===0)return 1;T=w[0]}else T=w;return l(T.mode,T.getLength(),O)},e.getEncodedBits=function(w){if(!i.isValid(w)||w<7)throw new Error("Invalid QR Code version");for(var A=w<<12;t.getBCHDigit(A)-c>=0;)A^=s<=0;)o^=IQ<0&&(n=this.data.substr(r),o=parseInt(n,10),t.put(o,i*3+1))};var sNe=id,cNe=Vc,m3=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ad(e){this.mode=cNe.ALPHANUMERIC,this.data=e}ad.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ad.prototype.getLength=function(){return this.data.length};ad.prototype.getBitsLength=function(){return ad.getBitsLength(this.data.length)};ad.prototype.write=function(t){var r;for(r=0;r+2<=this.data.length;r+=2){var n=m3.indexOf(this.data[r])*45;n+=m3.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put(m3.indexOf(this.data[r]),6)};var lNe=ad,uNe=zc,fNe=Vc;function sd(e){this.mode=fNe.BYTE,this.data=uNe.from(e)}sd.getBitsLength=function(t){return t*8};sd.prototype.getLength=function(){return this.data.length};sd.prototype.getBitsLength=function(){return sd.getBitsLength(this.data.length)};sd.prototype.write=function(e){for(var t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var gNe=cd,MQ={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},a={};a[n]=0;var s=t.PriorityQueue.make();s.push(n,0);for(var c,l,u,d,p,m,w,A,T;!s.empty();){c=s.pop(),l=c.value,d=c.cost,p=r[l]||{};for(u in p)p.hasOwnProperty(u)&&(m=p[u],w=d+m,A=a[u],T=typeof a[u]>"u",(T||A>w)&&(a[u]=w,s.push(u,w),i[u]=l))}if(typeof o<"u"&&typeof a[o]>"u"){var O=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(O)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(MQ);var mNe=MQ.exports;(function(e){var t=Vc,r=sNe,n=lNe,o=dNe,i=gNe,a=Ma,s=Lo,c=mNe;function l(O){return unescape(encodeURIComponent(O)).length}function u(O,P,$){for(var R=[],j;(j=O.exec($))!==null;)R.push({data:j[0],index:j.index,mode:P,length:j[0].length});return R}function d(O){var P=u(a.NUMERIC,t.NUMERIC,O),$=u(a.ALPHANUMERIC,t.ALPHANUMERIC,O),R,j;s.isKanjiModeEnabled()?(R=u(a.BYTE,t.BYTE,O),j=u(a.KANJI,t.KANJI,O)):(R=u(a.BYTE_KANJI,t.BYTE,O),j=[]);var I=P.concat($,R,j);return I.sort(function(b,N){return b.index-N.index}).map(function(b){return{data:b.data,mode:b.mode,length:b.length}})}function p(O,P){switch(P){case t.NUMERIC:return r.getBitsLength(O);case t.ALPHANUMERIC:return n.getBitsLength(O);case t.KANJI:return i.getBitsLength(O);case t.BYTE:return o.getBitsLength(O)}}function m(O){return O.reduce(function(P,$){var R=P.length-1>=0?P[P.length-1]:null;return R&&R.mode===$.mode?(P[P.length-1].data+=$.data,P):(P.push($),P)},[])}function w(O){for(var P=[],$=0;$=0&&s<=6&&(c===0||c===6)||c>=0&&c<=6&&(s===0||s===6)||s>=2&&s<=4&&c>=2&&c<=4?e.set(i+s,a+c,!0,!0):e.set(i+s,a+c,!1,!0))}function PNe(e){for(var t=e.size,r=8;r>s&1)===1,e.set(o,i,a,!0),e.set(i,o,a,!0)}function b3(e,t,r){var n=e.size,o=xNe.getEncodedBits(t,r),i,a;for(i=0;i<15;i++)a=(o>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function INe(e,t){for(var r=e.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2)for(s===6&&s--;;){for(var c=0;c<2;c++)if(!e.isReserved(o,s-c)){var l=!1;a>>i&1)===1),e.set(o,s-c,l),i--,i===-1&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function TNe(e,t,r){var n=new vNe;r.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),SNe.getCharCountIndicator(l.mode,e)),l.write(n)});var o=D2.getSymbolTotalCodewords(e),i=NS.getTotalCodewordsCount(e,t),a=(o-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);for(var s=(a-n.getLengthInBits())/8,c=0;c=7&&ONe(u,t),INe(u,c),isNaN(n)&&(n=RS.getBestMask(u,b3.bind(null,u,r))),RS.applyMask(n,u),b3(u,r,n),{modules:u,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}gQ.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");var n=v3.M,o,i;return typeof r<"u"&&(n=v3.from(r.errorCorrectionLevel,v3.M),o=Mb.from(r.version),i=RS.from(r.maskPattern),r.toSJISFunc&&D2.setToSJISFunction(r.toSJISFunc)),kNe(t,o,n,i)};var kQ={},H8={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");var n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");var o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});var o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:i,scale:i?4:a,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){var i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){for(var a=o.modules.size,s=o.modules.data,c=e.getScale(a,i),l=Math.floor((a+i.margin*2)*c),u=i.margin*c,d=[i.color.light,i.color.dark],p=0;p=u&&m>=u&&p"u"&&(!a||!a.getContext)&&(c=a,a=void 0),a||(l=n()),c=t.getOptions(c);var u=t.getImageWidth(i.modules.size,c),d=l.getContext("2d"),p=d.createImageData(u,u);return t.qrToImageData(p.data,i,c),r(d,l,u),d.putImageData(p,0,0),l},e.renderToDataURL=function(i,a,s){var c=s;typeof c>"u"&&(!a||!a.getContext)&&(c=a,a=void 0),c||(c={});var l=e.render(i,a,c),u=c.type||"image/png",d=c.rendererOpts||{};return l.toDataURL(u,d.quality)}})(kQ);var $Q={},$Ne=H8;function nR(e,t){var r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function w3(e,t,r){var n=e+t;return typeof r<"u"&&(n+=" "+r),n}function DNe(e,t,r){for(var n="",o=0,i=!1,a=0,s=0;s0&&c>0&&e[s-1]||(n+=i?w3("M",c+r,.5+l+r):w3("m",o,0),o=0,i=!1),c+1':"",l="',u='viewBox="0 0 '+s+" "+s+'"',d=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",p=''+c+l+` +`;return typeof n=="function"&&n(null,p),p};var RNe=BRe,BS=gQ,DQ=kQ,NNe=$Q;function z8(e,t,r,n,o){var i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!RNe())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=r,r=t,t=n=void 0):a===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=t,t=n=void 0):a===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(l,u){try{var d=BS.create(r,n);l(e(d,t,n))}catch(p){u(p)}})}try{var c=BS.create(r,n);o(null,e(c,t,n))}catch(l){o(l)}}ag.create=BS.create;ag.toCanvas=z8.bind(null,DQ.render);ag.toDataURL=z8.bind(null,DQ.renderToDataURL);ag.toString=z8.bind(null,function(e,t,r){return NNe.render(e,r)});var BNe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=oR[t.format]||oR.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){r&&console.error("unable to copy using clipboardData: ",d),r&&console.error("falling back to prompt"),n=LNe("message"in t?t.message:jNe),window.prompt(n,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return c}var HNe=UNe,yt,Cp,V8,RQ,iR,q8,NQ,es={},R2=[],zNe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function Za(e,t){for(var r in t)e[r]=t[r];return e}function BQ(e){var t=e.parentNode;t&&t.removeChild(e)}function Ps(e,t,r){var n,o=arguments,i={};for(n in t)n!=="key"&&n!=="ref"&&(i[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=R2.slice.call(arguments,2)),r={},t)n!=="key"&&n!=="ref"&&(r[n]=t[n]);return kb(e.type,r,t.key||e.key,t.ref||e.ref,null)}function VQ(e){var t={},r={__c:"__cC"+NQ++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[r.__c]=i,t},this.shouldComponentUpdate=function(a){i.props.value!==a.value&&o.some(function(s){s.context=a.value,Tv(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}yt={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&r.constructor.getDerivedStateFromError!=null&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),r.componentDidCatch!=null&&(n=!0,r.componentDidCatch(e)),n)return Tv(r.__E=r)}catch(o){e=o}throw e}},Bi.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=Za({},this.state),typeof e=="function"&&(e=e(r,this.props)),e&&Za(r,e),e!=null&&this.__v&&(t&&this.__h.push(t),Tv(this))},Bi.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Tv(this))},Bi.prototype.render=cg,Cp=[],V8=0,RQ=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q8=es,NQ=0;var Pu,io,cR,ld=0,FS=[],lR=yt.__r,uR=yt.diffed,fR=yt.__c,dR=yt.unmount;function jd(e,t){yt.__h&&yt.__h(io,e,ld||t),ld=0;var r=io.__H||(io.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function G8(e){return ld=1,K8(ZQ,e)}function K8(e,t,r){var n=jd(Pu++,2);return n.__c||(n.__c=io,n.__=[r?r(t):ZQ(void 0,t),function(o){var i=e(n.__[0],o);n.__[0]!==i&&(n.__[0]=i,n.__c.setState({}))}]),n.__}function qQ(e,t){var r=jd(Pu++,3);!yt.__s&&J8(r.__H,t)&&(r.__=e,r.__H=t,io.__H.__h.push(r))}function Y8(e,t){var r=jd(Pu++,4);!yt.__s&&J8(r.__H,t)&&(r.__=e,r.__H=t,io.__h.push(r))}function WQ(e){return ld=5,N2(function(){return{current:e}},[])}function GQ(e,t,r){ld=6,Y8(function(){typeof e=="function"?e(t()):e&&(e.current=t())},r==null?r:r.concat(e))}function N2(e,t){var r=jd(Pu++,7);return J8(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function KQ(e,t){return ld=8,N2(function(){return e},t)}function YQ(e){var t=io.context[e.__c],r=jd(Pu++,9);return r.__c=e,t?(r.__==null&&(r.__=!0,t.sub(io)),t.props.value):e.__}function JQ(e,t){yt.useDebugValue&&yt.useDebugValue(t?t(e):e)}function YNe(e){var t=jd(Pu++,10),r=G8();return t.__=e,io.componentDidCatch||(io.componentDidCatch=function(n){t.__&&t.__(n),r[1](n)}),[r[0],function(){r[1](void 0)}]}function JNe(){FS.some(function(e){if(e.__P)try{e.__H.__h.forEach(jS),e.__H.__h.forEach(LS),e.__H.__h=[]}catch(t){return e.__H.__h=[],yt.__e(t,e.__v),!0}}),FS=[]}function jS(e){e.t&&e.t()}function LS(e){var t=e.__();typeof t=="function"&&(e.t=t)}function J8(e,t){return!e||t.some(function(r,n){return r!==e[n]})}function ZQ(e,t){return typeof t=="function"?t(e):t}yt.__r=function(e){lR&&lR(e),Pu=0,(io=e.__c).__H&&(io.__H.__h.forEach(jS),io.__H.__h.forEach(LS),io.__H.__h=[])},yt.diffed=function(e){uR&&uR(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(FS.push(t)!==1&&cR===yt.requestAnimationFrame||((cR=yt.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(a),cancelAnimationFrame(o),setTimeout(n)},a=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(JNe))}},yt.__c=function(e,t){t.some(function(r){try{r.__h.forEach(jS),r.__h=r.__h.filter(function(n){return!n.__||LS(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],yt.__e(n,r.__v)}}),fR&&fR(e,t)},yt.unmount=function(e){dR&&dR(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach(function(n){return n.t&&n.t()})}catch(n){yt.__e(n,t.__v)}}};function Z8(e,t){for(var r in t)e[r]=t[r];return e}function US(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}var XQ=function(e){var t,r;function n(o){var i;return(i=e.call(this,o)||this).isPureReactComponent=!0,i}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(o,i){return US(this.props,o)||US(this.state,i)},n}(Bi);function QQ(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:US(this.props,o)}function n(o){return this.shouldComponentUpdate=r,Ps(e,Z8({},o))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var hR=yt.__b;function eee(e){function t(r){var n=Z8({},r);return delete n.ref,e(n,r.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}yt.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),hR&&hR(e)};var pR=function(e,t){return e?bc(e).reduce(function(r,n,o){return r.concat(t(n,o))},[]):null},tee={map:pR,forEach:pR,count:function(e){return e?bc(e).length:0},only:function(e){if((e=bc(e)).length!==1)throw new Error("Children.only() expects only one child.");return e[0]},toArray:bc},ZNe=yt.__e;function ree(e){return e&&((e=Z8({},e)).__c=null,e.__k=e.__k&&e.__k.map(ree)),e}function Db(){this.__u=0,this.o=null,this.__b=null}function nee(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function oee(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return Ps(r,i)}return o.displayName="Lazy",o.t=!0,o}function gf(){this.i=null,this.l=null}yt.__e=function(e,t,r){if(e.then){for(var n,o=t;o=o.__;)if((n=o.__c)&&n.__c)return n.__c(e,t.__c)}ZNe(e,t,r)},(Db.prototype=new Bi).__c=function(e,t){var r=this;r.o==null&&(r.o=[]),r.o.push(t);var n=nee(r.__v),o=!1,i=function(){o||(o=!0,n?n(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var a=function(){var s;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});s=r.o.pop();)s.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(i,i)},Db.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=ree(this.__b),this.__b=null),[Ps(Bi,null,t.u?null:e.children),t.u&&e.fallback]};var gR=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]8?2.5:2.7)+"vw":"inherit";return st.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},st.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),st.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}var wBe=5,x3=12;function _Be(e){var t=Qo.isAndroid(),r=st.useState(""),n=r[0],o=r[1],i=st.useState(""),a=i[0],s=i[1],c=st.useState(1),l=c[0],u=c[1],d=a?e.links.filter(function(R){return R.name.toLowerCase().includes(a.toLowerCase())}):e.links,p=e.errorMessage,m=a||d.length>wBe,w=Math.ceil(d.length/x3),A=[(l-1)*x3+1,l*x3],T=d.length?d.filter(function(R,j){return j+1>=A[0]&&j+1<=A[1]}):[],O=!t&&w>1,P=void 0;function $(R){o(R.target.value),clearTimeout(P),R.target.value?P=setTimeout(function(){s(R.target.value),u(1)},1e3):(o(""),s(""),u(1))}return st.createElement("div",null,st.createElement("p",{id:mee,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&st.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:$}),st.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":m&&d.length?"__wrap":"")},t?st.createElement(mBe,{name:e.text.connect,color:dBe,href:e.uri,onClick:st.useCallback(function(){},[])}):T.length?T.map(function(R){var j=R.color,I=R.name,b=R.shortName,N=R.logo,V=Qo.formatIOSMobile(e.uri,R),Z=st.useCallback(function(){},[]);return m?st.createElement(bBe,{color:j,href:V,name:b||I,logo:N,onClick:Z}):st.createElement(yBe,{color:j,href:V,name:I,logo:N,onClick:Z})}):st.createElement(st.Fragment,null,st.createElement("p",null,p.length?e.errorMessage:e.links.length&&!d.length?e.text.no_wallets_found:e.text.loading))),O&&st.createElement("div",{className:"walletconnect-modal__footer"},Array(w).fill(0).map(function(R,j){var I=j+1,b=l===I;return st.createElement("a",{style:{margin:"auto 10px",fontWeight:b?"bold":"normal"},onClick:function(){return u(I)}},I)})))}function xBe(e){var t=!!e.message.trim();return st.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var SBe=function(e){try{var t="";return Promise.resolve(hee.toString(e,{margin:0,type:"svg"})).then(function(r){return typeof r=="string"&&(t=r.replace("0||st.useEffect(function(){var _=function(){try{if(t)return Promise.resolve();a(!0);var y=cBe(function(){var f=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:Qo.getWalletRegistryUrl();return Promise.resolve(fetch(f)).then(function(h){return Promise.resolve(h.json()).then(function(x){var v=x.listings,S=r?"mobile":"desktop",k=Qo.getMobileLinkRegistry(Qo.formatMobileRegistry(v,S),n);a(!1),l(!0),V(k.length?"":e.text.no_supported_wallets),I(k);var E=k.length===1;E&&(T(Qo.formatIOSMobile(e.uri,k[0])),p(!0)),$(E)})})},function(f){a(!1),l(!0),V(e.text.something_went_wrong),console.error(f)});return Promise.resolve(y&&y.then?y.then(function(){}):void 0)}catch(f){return Promise.reject(f)}};_()})};Z();var q=r?d:!d;return st.createElement("div",{id:gee,className:"walletconnect-qrcode__base animated fadeIn"},st.createElement("div",{className:"walletconnect-modal__base"},st.createElement(gBe,{onClose:e.onClose}),P&&d?st.createElement("div",{className:"walletconnect-modal__single_wallet"},st.createElement("a",{href:A,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(P?j[0].name:"")+" ›")):t||i||!i&&j.length?st.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(q?" right__selected":"")},st.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?st.createElement(st.Fragment,null,st.createElement("a",{onClick:function(){return p(!1),Z()}},e.text.mobile),st.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode)):st.createElement(st.Fragment,null,st.createElement("a",{onClick:function(){return p(!0)}},e.text.qrcode),st.createElement("a",{onClick:function(){return p(!1),Z()}},e.text.desktop))):null,st.createElement("div",null,d||!t&&!i&&!j.length?st.createElement(EBe,Object.assign({},m)):st.createElement(_Be,Object.assign({},m,{links:j,errorMessage:N})))))}var PBe={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},ABe={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},OBe={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},IBe={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},TBe={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},MBe={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},kBe={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},$Be={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},_R={de:PBe,en:ABe,es:OBe,fr:IBe,ko:TBe,pt:MBe,zh:kBe,fa:$Be};function DBe(){var e=Qo.getDocumentOrThrow(),t=e.getElementById(wR);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",wR),r.innerText=sBe,e.head.appendChild(r)}function RBe(){var e=Qo.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",pee),e.body.appendChild(t),t}function vee(){var e=Qo.getDocumentOrThrow(),t=e.getElementById(gee);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout(function(){var r=e.getElementById(pee);r&&e.body.removeChild(r)},fBe))}function NBe(e){return function(){vee(),e&&e()}}function BBe(){var e=Qo.getNavigatorOrThrow().language.split("-")[0]||"en";return _R[e]||_R.en}function FBe(e,t,r){DBe();var n=RBe();st.render(st.createElement(CBe,{text:BBe(),uri:e,onClose:NBe(t),qrcodeModalOptions:r}),n)}function jBe(){vee()}var yee=function(){return typeof fr<"u"&&typeof fr.versions<"u"&&typeof fr.versions.node<"u"};function LBe(e,t,r){console.log(e),yee()?aBe(e):FBe(e,t,r)}function UBe(){yee()||jBe()}var HBe={open:LBe,close:UBe},zBe=HBe;const xR=Hi(zBe);var Si={},S3={},E3={},Nh={},C3={},lg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_GAS_ALPH_AMOUNT=e.DEFAULT_GAS_ATTOALPH_AMOUNT=e.DEFAULT_GAS_PRICE=e.DEFAULT_GAS_AMOUNT=e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",e.DEFAULT_GAS_AMOUNT=2e4,e.DEFAULT_GAS_PRICE=10n**11n,e.DEFAULT_GAS_ATTOALPH_AMOUNT=BigInt(e.DEFAULT_GAS_AMOUNT)*e.DEFAULT_GAS_PRICE,e.DEFAULT_GAS_ALPH_AMOUNT=.002})(lg);var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.disableDebugMode=ts.enableDebugMode=ts.isDebugModeEnabled=void 0;let Q8=!1;function VBe(){return Q8}ts.isDebugModeEnabled=VBe;function qBe(){Q8=!0}ts.enableDebugMode=qBe;function WBe(){Q8=!1}ts.disableDebugMode=WBe;var P3={},B2={};Object.defineProperty(B2,"__esModule",{value:!0});B2.WebCrypto=void 0;const GBe=jn,A3=Er,SR=typeof window<"u"&&typeof window.document<"u";let KBe=class{constructor(){this.subtle=SR?globalThis.crypto.subtle:A3.webcrypto?A3.webcrypto.subtle:crypto.subtle}getRandomValues(t){if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const r=GBe.Buffer.from(t.buffer,t.byteOffset,t.byteLength);return SR?globalThis.crypto.getRandomValues(r):(0,A3.randomFillSync)(r),t}};B2.WebCrypto=KBe;var F2={},j2={};(function(e){var t=Ae&&Ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(w8),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58})(j2);var ug={};Object.defineProperty(ug,"__esModule",{value:!0});function YBe(e){let t=5381;for(let r=0;r>24,r=e>>16,n=e>>8;return t^r^n^e}function eFe(e){return e&255}var wee={},eP={exports:{}};eP.exports;(function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function o(y,f){y.super_=f;var h=function(){};h.prototype=f.prototype,y.prototype=new h,y.prototype.constructor=y}function i(y,f,h){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(h=f,f=10),this._init(y||0,f||10,h||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ng.Buffer}catch{}i.isBN=function(f){return f instanceof i?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===i.wordSize&&Array.isArray(f.words)},i.max=function(f,h){return f.cmp(h)>0?f:h},i.min=function(f,h){return f.cmp(h)<0?f:h},i.prototype._init=function(f,h,x){if(typeof f=="number")return this._initNumber(f,h,x);if(typeof f=="object")return this._initArray(f,h,x);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&(v++,this.negative=1),v=0;v-=3)k=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[S]|=k<>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);else if(x==="le")for(v=0,S=0;v>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);return this._strip()};function s(y,f){var h=y.charCodeAt(f);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+y)}function c(y,f,h){var x=s(y,h);return h-1>=f&&(x|=s(y,h-1)<<4),x}i.prototype._parseHex=function(f,h,x){this.length=Math.ceil((f.length-h)/6),this.words=new Array(this.length);for(var v=0;v=h;v-=2)E=c(f,h,v)<=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8;else{var C=f.length-h;for(v=C%2===0?h+1:h;v=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8}this._strip()};function l(y,f,h,x){for(var v=0,S=0,k=Math.min(y.length,h),E=f;E=49?S=C-49+10:C>=17?S=C-17+10:S=C,n(C>=0&&S1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var p=["","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"],m=[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],w=[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];i.prototype.toString=function(f,h){f=f||10,h=h|0||1;var x;if(f===16||f==="hex"){x="";for(var v=0,S=0,k=0;k>>24-v&16777215,v+=2,v>=26&&(v-=26,k--),S!==0||k!==this.length-1?x=p[6-C.length]+C+x:x=C+x}for(S!==0&&(x=S.toString(16)+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(f===(f|0)&&f>=2&&f<=36){var g=m[f],M=w[f];x="";var re=this.clone();for(re.negative=0;!re.isZero();){var W=re.modrn(M).toString(f);re=re.idivn(M),re.isZero()?x=W+x:x=p[g-W.length]+W+x}for(this.isZero()&&(x="0"+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(f,h){return this.toArrayLike(a,f,h)}),i.prototype.toArray=function(f,h){return this.toArrayLike(Array,f,h)};var A=function(f,h){return f.allocUnsafe?f.allocUnsafe(h):new f(h)};i.prototype.toArrayLike=function(f,h,x){this._strip();var v=this.byteLength(),S=x||Math.max(1,v);n(v<=S,"byte array longer than desired length"),n(S>0,"Requested array length <= 0");var k=A(f,S),E=h==="le"?"LE":"BE";return this["_toArrayLike"+E](k,v),k},i.prototype._toArrayLikeLE=function(f,h){for(var x=0,v=0,S=0,k=0;S>8&255),x>16&255),k===6?(x>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x=0&&(f[x--]=E>>8&255),x>=0&&(f[x--]=E>>16&255),k===6?(x>=0&&(f[x--]=E>>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x>=0)for(f[x--]=v;x>=0;)f[x--]=0},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var h=f,x=0;return h>=4096&&(x+=13,h>>>=13),h>=64&&(x+=7,h>>>=7),h>=8&&(x+=4,h>>>=4),h>=2&&(x+=2,h>>>=2),x+h},i.prototype._zeroBits=function(f){if(f===0)return 26;var h=f,x=0;return h&8191||(x+=13,h>>>=13),h&127||(x+=7,h>>>=7),h&15||(x+=4,h>>>=4),h&3||(x+=2,h>>>=2),h&1||x++,x},i.prototype.bitLength=function(){var f=this.words[this.length-1],h=this._countBits(f);return(this.length-1)*26+h};function T(y){for(var f=new Array(y.bitLength()),h=0;h>>v&1}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,h=0;hf.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var h;this.length>f.length?h=f:h=this;for(var x=0;xf.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var h,x;this.length>f.length?(h=this,x=f):(h=f,x=this);for(var v=0;vf.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var h=Math.ceil(f/26)|0,x=f%26;this._expand(h),x>0&&h--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-x),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,h){n(typeof f=="number"&&f>=0);var x=f/26|0,v=f%26;return this._expand(x+1),h?this.words[x]=this.words[x]|1<f.length?(x=this,v=f):(x=f,v=this);for(var S=0,k=0;k>>26;for(;S!==0&&k>>26;if(this.length=x.length,S!==0)this.words[this.length]=S,this.length++;else if(x!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var h=this.iadd(f);return f.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var x=this.cmp(f);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,S;x>0?(v=this,S=f):(v=f,S=this);for(var k=0,E=0;E>26,this.words[E]=h&67108863;for(;k!==0&&E>26,this.words[E]=h&67108863;if(k===0&&E>>26,re=C&67108863,W=Math.min(g,f.length-1),ee=Math.max(0,g-y.length+1);ee<=W;ee++){var ce=g-ee|0;v=y.words[ce]|0,S=f.words[ee]|0,k=v*S+re,M+=k/67108864|0,re=k&67108863}h.words[g]=re|0,C=M|0}return C!==0?h.words[g]=C|0:h.length--,h._strip()}var P=function(f,h,x){var v=f.words,S=h.words,k=x.words,E=0,C,g,M,re=v[0]|0,W=re&8191,ee=re>>>13,ce=v[1]|0,ie=ce&8191,le=ce>>>13,L=v[2]|0,te=L&8191,ae=L>>>13,ye=v[3]|0,ve=ye&8191,me=ye>>>13,Pe=v[4]|0,he=Pe&8191,be=Pe>>>13,Ie=v[5]|0,we=Ie&8191,Oe=Ie>>>13,Be=v[6]|0,ke=Be&8191,Me=Be>>>13,Ue=v[7]|0,je=Ue&8191,X=Ue>>>13,D=v[8]|0,H=D&8191,F=D>>>13,B=v[9]|0,U=B&8191,J=B>>>13,ne=S[0]|0,oe=ne&8191,de=ne>>>13,Te=S[1]|0,$e=Te&8191,De=Te>>>13,Xe=S[2]|0,ze=Xe&8191,He=Xe>>>13,Ge=S[3]|0,qe=Ge&8191,pe=Ge>>>13,ue=S[4]|0,ge=ue&8191,Q=ue>>>13,K=S[5]|0,Y=K&8191,se=K>>>13,_e=S[6]|0,Se=_e&8191,Ee=_e>>>13,Ve=S[7]|0,Le=Ve&8191,Fe=Ve>>>13,Qe=S[8]|0,Ne=Qe&8191,We=Qe>>>13,mt=S[9]|0,Je=mt&8191,it=mt>>>13;x.negative=f.negative^h.negative,x.length=19,C=Math.imul(W,oe),g=Math.imul(W,de),g=g+Math.imul(ee,oe)|0,M=Math.imul(ee,de);var hr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(hr>>>26)|0,hr&=67108863,C=Math.imul(ie,oe),g=Math.imul(ie,de),g=g+Math.imul(le,oe)|0,M=Math.imul(le,de),C=C+Math.imul(W,$e)|0,g=g+Math.imul(W,De)|0,g=g+Math.imul(ee,$e)|0,M=M+Math.imul(ee,De)|0;var br=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(br>>>26)|0,br&=67108863,C=Math.imul(te,oe),g=Math.imul(te,de),g=g+Math.imul(ae,oe)|0,M=Math.imul(ae,de),C=C+Math.imul(ie,$e)|0,g=g+Math.imul(ie,De)|0,g=g+Math.imul(le,$e)|0,M=M+Math.imul(le,De)|0,C=C+Math.imul(W,ze)|0,g=g+Math.imul(W,He)|0,g=g+Math.imul(ee,ze)|0,M=M+Math.imul(ee,He)|0;var ir=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ir>>>26)|0,ir&=67108863,C=Math.imul(ve,oe),g=Math.imul(ve,de),g=g+Math.imul(me,oe)|0,M=Math.imul(me,de),C=C+Math.imul(te,$e)|0,g=g+Math.imul(te,De)|0,g=g+Math.imul(ae,$e)|0,M=M+Math.imul(ae,De)|0,C=C+Math.imul(ie,ze)|0,g=g+Math.imul(ie,He)|0,g=g+Math.imul(le,ze)|0,M=M+Math.imul(le,He)|0,C=C+Math.imul(W,qe)|0,g=g+Math.imul(W,pe)|0,g=g+Math.imul(ee,qe)|0,M=M+Math.imul(ee,pe)|0;var Fr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(he,oe),g=Math.imul(he,de),g=g+Math.imul(be,oe)|0,M=Math.imul(be,de),C=C+Math.imul(ve,$e)|0,g=g+Math.imul(ve,De)|0,g=g+Math.imul(me,$e)|0,M=M+Math.imul(me,De)|0,C=C+Math.imul(te,ze)|0,g=g+Math.imul(te,He)|0,g=g+Math.imul(ae,ze)|0,M=M+Math.imul(ae,He)|0,C=C+Math.imul(ie,qe)|0,g=g+Math.imul(ie,pe)|0,g=g+Math.imul(le,qe)|0,M=M+Math.imul(le,pe)|0,C=C+Math.imul(W,ge)|0,g=g+Math.imul(W,Q)|0,g=g+Math.imul(ee,ge)|0,M=M+Math.imul(ee,Q)|0;var ar=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ar>>>26)|0,ar&=67108863,C=Math.imul(we,oe),g=Math.imul(we,de),g=g+Math.imul(Oe,oe)|0,M=Math.imul(Oe,de),C=C+Math.imul(he,$e)|0,g=g+Math.imul(he,De)|0,g=g+Math.imul(be,$e)|0,M=M+Math.imul(be,De)|0,C=C+Math.imul(ve,ze)|0,g=g+Math.imul(ve,He)|0,g=g+Math.imul(me,ze)|0,M=M+Math.imul(me,He)|0,C=C+Math.imul(te,qe)|0,g=g+Math.imul(te,pe)|0,g=g+Math.imul(ae,qe)|0,M=M+Math.imul(ae,pe)|0,C=C+Math.imul(ie,ge)|0,g=g+Math.imul(ie,Q)|0,g=g+Math.imul(le,ge)|0,M=M+Math.imul(le,Q)|0,C=C+Math.imul(W,Y)|0,g=g+Math.imul(W,se)|0,g=g+Math.imul(ee,Y)|0,M=M+Math.imul(ee,se)|0;var Jr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,C=Math.imul(ke,oe),g=Math.imul(ke,de),g=g+Math.imul(Me,oe)|0,M=Math.imul(Me,de),C=C+Math.imul(we,$e)|0,g=g+Math.imul(we,De)|0,g=g+Math.imul(Oe,$e)|0,M=M+Math.imul(Oe,De)|0,C=C+Math.imul(he,ze)|0,g=g+Math.imul(he,He)|0,g=g+Math.imul(be,ze)|0,M=M+Math.imul(be,He)|0,C=C+Math.imul(ve,qe)|0,g=g+Math.imul(ve,pe)|0,g=g+Math.imul(me,qe)|0,M=M+Math.imul(me,pe)|0,C=C+Math.imul(te,ge)|0,g=g+Math.imul(te,Q)|0,g=g+Math.imul(ae,ge)|0,M=M+Math.imul(ae,Q)|0,C=C+Math.imul(ie,Y)|0,g=g+Math.imul(ie,se)|0,g=g+Math.imul(le,Y)|0,M=M+Math.imul(le,se)|0,C=C+Math.imul(W,Se)|0,g=g+Math.imul(W,Ee)|0,g=g+Math.imul(ee,Se)|0,M=M+Math.imul(ee,Ee)|0;var Zr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,C=Math.imul(je,oe),g=Math.imul(je,de),g=g+Math.imul(X,oe)|0,M=Math.imul(X,de),C=C+Math.imul(ke,$e)|0,g=g+Math.imul(ke,De)|0,g=g+Math.imul(Me,$e)|0,M=M+Math.imul(Me,De)|0,C=C+Math.imul(we,ze)|0,g=g+Math.imul(we,He)|0,g=g+Math.imul(Oe,ze)|0,M=M+Math.imul(Oe,He)|0,C=C+Math.imul(he,qe)|0,g=g+Math.imul(he,pe)|0,g=g+Math.imul(be,qe)|0,M=M+Math.imul(be,pe)|0,C=C+Math.imul(ve,ge)|0,g=g+Math.imul(ve,Q)|0,g=g+Math.imul(me,ge)|0,M=M+Math.imul(me,Q)|0,C=C+Math.imul(te,Y)|0,g=g+Math.imul(te,se)|0,g=g+Math.imul(ae,Y)|0,M=M+Math.imul(ae,se)|0,C=C+Math.imul(ie,Se)|0,g=g+Math.imul(ie,Ee)|0,g=g+Math.imul(le,Se)|0,M=M+Math.imul(le,Ee)|0,C=C+Math.imul(W,Le)|0,g=g+Math.imul(W,Fe)|0,g=g+Math.imul(ee,Le)|0,M=M+Math.imul(ee,Fe)|0;var Xr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,C=Math.imul(H,oe),g=Math.imul(H,de),g=g+Math.imul(F,oe)|0,M=Math.imul(F,de),C=C+Math.imul(je,$e)|0,g=g+Math.imul(je,De)|0,g=g+Math.imul(X,$e)|0,M=M+Math.imul(X,De)|0,C=C+Math.imul(ke,ze)|0,g=g+Math.imul(ke,He)|0,g=g+Math.imul(Me,ze)|0,M=M+Math.imul(Me,He)|0,C=C+Math.imul(we,qe)|0,g=g+Math.imul(we,pe)|0,g=g+Math.imul(Oe,qe)|0,M=M+Math.imul(Oe,pe)|0,C=C+Math.imul(he,ge)|0,g=g+Math.imul(he,Q)|0,g=g+Math.imul(be,ge)|0,M=M+Math.imul(be,Q)|0,C=C+Math.imul(ve,Y)|0,g=g+Math.imul(ve,se)|0,g=g+Math.imul(me,Y)|0,M=M+Math.imul(me,se)|0,C=C+Math.imul(te,Se)|0,g=g+Math.imul(te,Ee)|0,g=g+Math.imul(ae,Se)|0,M=M+Math.imul(ae,Ee)|0,C=C+Math.imul(ie,Le)|0,g=g+Math.imul(ie,Fe)|0,g=g+Math.imul(le,Le)|0,M=M+Math.imul(le,Fe)|0,C=C+Math.imul(W,Ne)|0,g=g+Math.imul(W,We)|0,g=g+Math.imul(ee,Ne)|0,M=M+Math.imul(ee,We)|0;var Qr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,C=Math.imul(U,oe),g=Math.imul(U,de),g=g+Math.imul(J,oe)|0,M=Math.imul(J,de),C=C+Math.imul(H,$e)|0,g=g+Math.imul(H,De)|0,g=g+Math.imul(F,$e)|0,M=M+Math.imul(F,De)|0,C=C+Math.imul(je,ze)|0,g=g+Math.imul(je,He)|0,g=g+Math.imul(X,ze)|0,M=M+Math.imul(X,He)|0,C=C+Math.imul(ke,qe)|0,g=g+Math.imul(ke,pe)|0,g=g+Math.imul(Me,qe)|0,M=M+Math.imul(Me,pe)|0,C=C+Math.imul(we,ge)|0,g=g+Math.imul(we,Q)|0,g=g+Math.imul(Oe,ge)|0,M=M+Math.imul(Oe,Q)|0,C=C+Math.imul(he,Y)|0,g=g+Math.imul(he,se)|0,g=g+Math.imul(be,Y)|0,M=M+Math.imul(be,se)|0,C=C+Math.imul(ve,Se)|0,g=g+Math.imul(ve,Ee)|0,g=g+Math.imul(me,Se)|0,M=M+Math.imul(me,Ee)|0,C=C+Math.imul(te,Le)|0,g=g+Math.imul(te,Fe)|0,g=g+Math.imul(ae,Le)|0,M=M+Math.imul(ae,Fe)|0,C=C+Math.imul(ie,Ne)|0,g=g+Math.imul(ie,We)|0,g=g+Math.imul(le,Ne)|0,M=M+Math.imul(le,We)|0,C=C+Math.imul(W,Je)|0,g=g+Math.imul(W,it)|0,g=g+Math.imul(ee,Je)|0,M=M+Math.imul(ee,it)|0;var en=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(en>>>26)|0,en&=67108863,C=Math.imul(U,$e),g=Math.imul(U,De),g=g+Math.imul(J,$e)|0,M=Math.imul(J,De),C=C+Math.imul(H,ze)|0,g=g+Math.imul(H,He)|0,g=g+Math.imul(F,ze)|0,M=M+Math.imul(F,He)|0,C=C+Math.imul(je,qe)|0,g=g+Math.imul(je,pe)|0,g=g+Math.imul(X,qe)|0,M=M+Math.imul(X,pe)|0,C=C+Math.imul(ke,ge)|0,g=g+Math.imul(ke,Q)|0,g=g+Math.imul(Me,ge)|0,M=M+Math.imul(Me,Q)|0,C=C+Math.imul(we,Y)|0,g=g+Math.imul(we,se)|0,g=g+Math.imul(Oe,Y)|0,M=M+Math.imul(Oe,se)|0,C=C+Math.imul(he,Se)|0,g=g+Math.imul(he,Ee)|0,g=g+Math.imul(be,Se)|0,M=M+Math.imul(be,Ee)|0,C=C+Math.imul(ve,Le)|0,g=g+Math.imul(ve,Fe)|0,g=g+Math.imul(me,Le)|0,M=M+Math.imul(me,Fe)|0,C=C+Math.imul(te,Ne)|0,g=g+Math.imul(te,We)|0,g=g+Math.imul(ae,Ne)|0,M=M+Math.imul(ae,We)|0,C=C+Math.imul(ie,Je)|0,g=g+Math.imul(ie,it)|0,g=g+Math.imul(le,Je)|0,M=M+Math.imul(le,it)|0;var Pr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,C=Math.imul(U,ze),g=Math.imul(U,He),g=g+Math.imul(J,ze)|0,M=Math.imul(J,He),C=C+Math.imul(H,qe)|0,g=g+Math.imul(H,pe)|0,g=g+Math.imul(F,qe)|0,M=M+Math.imul(F,pe)|0,C=C+Math.imul(je,ge)|0,g=g+Math.imul(je,Q)|0,g=g+Math.imul(X,ge)|0,M=M+Math.imul(X,Q)|0,C=C+Math.imul(ke,Y)|0,g=g+Math.imul(ke,se)|0,g=g+Math.imul(Me,Y)|0,M=M+Math.imul(Me,se)|0,C=C+Math.imul(we,Se)|0,g=g+Math.imul(we,Ee)|0,g=g+Math.imul(Oe,Se)|0,M=M+Math.imul(Oe,Ee)|0,C=C+Math.imul(he,Le)|0,g=g+Math.imul(he,Fe)|0,g=g+Math.imul(be,Le)|0,M=M+Math.imul(be,Fe)|0,C=C+Math.imul(ve,Ne)|0,g=g+Math.imul(ve,We)|0,g=g+Math.imul(me,Ne)|0,M=M+Math.imul(me,We)|0,C=C+Math.imul(te,Je)|0,g=g+Math.imul(te,it)|0,g=g+Math.imul(ae,Je)|0,M=M+Math.imul(ae,it)|0;var tn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(U,qe),g=Math.imul(U,pe),g=g+Math.imul(J,qe)|0,M=Math.imul(J,pe),C=C+Math.imul(H,ge)|0,g=g+Math.imul(H,Q)|0,g=g+Math.imul(F,ge)|0,M=M+Math.imul(F,Q)|0,C=C+Math.imul(je,Y)|0,g=g+Math.imul(je,se)|0,g=g+Math.imul(X,Y)|0,M=M+Math.imul(X,se)|0,C=C+Math.imul(ke,Se)|0,g=g+Math.imul(ke,Ee)|0,g=g+Math.imul(Me,Se)|0,M=M+Math.imul(Me,Ee)|0,C=C+Math.imul(we,Le)|0,g=g+Math.imul(we,Fe)|0,g=g+Math.imul(Oe,Le)|0,M=M+Math.imul(Oe,Fe)|0,C=C+Math.imul(he,Ne)|0,g=g+Math.imul(he,We)|0,g=g+Math.imul(be,Ne)|0,M=M+Math.imul(be,We)|0,C=C+Math.imul(ve,Je)|0,g=g+Math.imul(ve,it)|0,g=g+Math.imul(me,Je)|0,M=M+Math.imul(me,it)|0;var rn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rn>>>26)|0,rn&=67108863,C=Math.imul(U,ge),g=Math.imul(U,Q),g=g+Math.imul(J,ge)|0,M=Math.imul(J,Q),C=C+Math.imul(H,Y)|0,g=g+Math.imul(H,se)|0,g=g+Math.imul(F,Y)|0,M=M+Math.imul(F,se)|0,C=C+Math.imul(je,Se)|0,g=g+Math.imul(je,Ee)|0,g=g+Math.imul(X,Se)|0,M=M+Math.imul(X,Ee)|0,C=C+Math.imul(ke,Le)|0,g=g+Math.imul(ke,Fe)|0,g=g+Math.imul(Me,Le)|0,M=M+Math.imul(Me,Fe)|0,C=C+Math.imul(we,Ne)|0,g=g+Math.imul(we,We)|0,g=g+Math.imul(Oe,Ne)|0,M=M+Math.imul(Oe,We)|0,C=C+Math.imul(he,Je)|0,g=g+Math.imul(he,it)|0,g=g+Math.imul(be,Je)|0,M=M+Math.imul(be,it)|0;var rr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rr>>>26)|0,rr&=67108863,C=Math.imul(U,Y),g=Math.imul(U,se),g=g+Math.imul(J,Y)|0,M=Math.imul(J,se),C=C+Math.imul(H,Se)|0,g=g+Math.imul(H,Ee)|0,g=g+Math.imul(F,Se)|0,M=M+Math.imul(F,Ee)|0,C=C+Math.imul(je,Le)|0,g=g+Math.imul(je,Fe)|0,g=g+Math.imul(X,Le)|0,M=M+Math.imul(X,Fe)|0,C=C+Math.imul(ke,Ne)|0,g=g+Math.imul(ke,We)|0,g=g+Math.imul(Me,Ne)|0,M=M+Math.imul(Me,We)|0,C=C+Math.imul(we,Je)|0,g=g+Math.imul(we,it)|0,g=g+Math.imul(Oe,Je)|0,M=M+Math.imul(Oe,it)|0;var nn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(U,Se),g=Math.imul(U,Ee),g=g+Math.imul(J,Se)|0,M=Math.imul(J,Ee),C=C+Math.imul(H,Le)|0,g=g+Math.imul(H,Fe)|0,g=g+Math.imul(F,Le)|0,M=M+Math.imul(F,Fe)|0,C=C+Math.imul(je,Ne)|0,g=g+Math.imul(je,We)|0,g=g+Math.imul(X,Ne)|0,M=M+Math.imul(X,We)|0,C=C+Math.imul(ke,Je)|0,g=g+Math.imul(ke,it)|0,g=g+Math.imul(Me,Je)|0,M=M+Math.imul(Me,it)|0;var on=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(on>>>26)|0,on&=67108863,C=Math.imul(U,Le),g=Math.imul(U,Fe),g=g+Math.imul(J,Le)|0,M=Math.imul(J,Fe),C=C+Math.imul(H,Ne)|0,g=g+Math.imul(H,We)|0,g=g+Math.imul(F,Ne)|0,M=M+Math.imul(F,We)|0,C=C+Math.imul(je,Je)|0,g=g+Math.imul(je,it)|0,g=g+Math.imul(X,Je)|0,M=M+Math.imul(X,it)|0;var an=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(U,Ne),g=Math.imul(U,We),g=g+Math.imul(J,Ne)|0,M=Math.imul(J,We),C=C+Math.imul(H,Je)|0,g=g+Math.imul(H,it)|0,g=g+Math.imul(F,Je)|0,M=M+Math.imul(F,it)|0;var ho=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ho>>>26)|0,ho&=67108863,C=Math.imul(U,Je),g=Math.imul(U,it),g=g+Math.imul(J,Je)|0,M=Math.imul(J,it);var po=(E+C|0)+((g&8191)<<13)|0;return E=(M+(g>>>13)|0)+(po>>>26)|0,po&=67108863,k[0]=hr,k[1]=br,k[2]=ir,k[3]=Fr,k[4]=ar,k[5]=Jr,k[6]=Zr,k[7]=Xr,k[8]=Qr,k[9]=en,k[10]=Pr,k[11]=tn,k[12]=rn,k[13]=rr,k[14]=nn,k[15]=on,k[16]=an,k[17]=ho,k[18]=po,E!==0&&(k[19]=E,x.length++),x};Math.imul||(P=O);function $(y,f,h){h.negative=f.negative^y.negative,h.length=y.length+f.length;for(var x=0,v=0,S=0;S>>26)|0,v+=k>>>26,k&=67108863}h.words[S]=E,x=k,k=v}return x!==0?h.words[S]=x:h.length--,h._strip()}function R(y,f,h){return $(y,f,h)}i.prototype.mulTo=function(f,h){var x,v=this.length+f.length;return this.length===10&&f.length===10?x=P(this,f,h):v<63?x=O(this,f,h):v<1024?x=$(this,f,h):x=R(this,f,h),x},i.prototype.mul=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),this.mulTo(f,h)},i.prototype.mulf=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),R(this,f,h)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var h=f<0;h&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var x=0,v=0;v>=26,x+=S/67108864|0,x+=k>>>26,this.words[v]=k&67108863}return x!==0&&(this.words[v]=x,this.length++),h?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var h=T(f);if(h.length===0)return new i(1);for(var x=this,v=0;v=0);var h=f%26,x=(f-h)/26,v=67108863>>>26-h<<26-h,S;if(h!==0){var k=0;for(S=0;S>>26-h}k&&(this.words[S]=k,this.length++)}if(x!==0){for(S=this.length-1;S>=0;S--)this.words[S+x]=this.words[S];for(S=0;S=0);var v;h?v=(h-h%26)/26:v=0;var S=f%26,k=Math.min((f-S)/26,this.length),E=67108863^67108863>>>S<k)for(this.length-=k,g=0;g=0&&(M!==0||g>=v);g--){var re=this.words[g]|0;this.words[g]=M<<26-S|re>>>S,M=re&E}return C&&M!==0&&(C.words[C.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,h,x){return n(this.negative===0),this.iushrn(f,h,x)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var h=f%26,x=(f-h)/26,v=1<=0);var h=f%26,x=(f-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(h!==0&&x++,this.length=Math.min(x,this.length),h!==0){var v=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},i.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(C/67108864|0),this.words[S+x]=k&67108863}for(;S>26,this.words[S+x]=k&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,S=0;S>26,this.words[S]=k&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,h){var x=this.length-f.length,v=this.clone(),S=f,k=S.words[S.length-1]|0,E=this._countBits(k);x=26-E,x!==0&&(S=S.ushln(x),v.iushln(x),k=S.words[S.length-1]|0);var C=v.length-S.length,g;if(h!=="mod"){g=new i(null),g.length=C+1,g.words=new Array(g.length);for(var M=0;M=0;W--){var ee=(v.words[S.length+W]|0)*67108864+(v.words[S.length+W-1]|0);for(ee=Math.min(ee/k|0,67108863),v._ishlnsubmul(S,ee,W);v.negative!==0;)ee--,v.negative=0,v._ishlnsubmul(S,1,W),v.isZero()||(v.negative^=1);g&&(g.words[W]=ee)}return g&&g._strip(),v._strip(),h!=="div"&&x!==0&&v.iushrn(x),{div:g||null,mod:v}},i.prototype.divmod=function(f,h,x){if(n(!f.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var v,S,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,h),h!=="mod"&&(v=k.div.neg()),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.iadd(f)),{div:v,mod:S}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),h),h!=="mod"&&(v=k.div.neg()),{div:v,mod:k.mod}):this.negative&f.negative?(k=this.neg().divmod(f.neg(),h),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.isub(f)),{div:k.div,mod:S}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?h==="div"?{div:this.divn(f.words[0]),mod:null}:h==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,h)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var h=this.divmod(f);if(h.mod.isZero())return h.div;var x=h.div.negative!==0?h.mod.isub(f):h.mod,v=f.ushrn(1),S=f.andln(1),k=x.cmp(v);return k<0||S===1&&k===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},i.prototype.modrn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=(1<<26)%f,v=0,S=this.length-1;S>=0;S--)v=(x*v+(this.words[S]|0))%f;return h?-v:v},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=0,v=this.length-1;v>=0;v--){var S=(this.words[v]|0)+x*67108864;this.words[v]=S/f|0,x=S%f}return this._strip(),h?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=new i(0),E=new i(1),C=0;h.isEven()&&x.isEven();)h.iushrn(1),x.iushrn(1),++C;for(var g=x.clone(),M=h.clone();!h.isZero();){for(var re=0,W=1;!(h.words[0]&W)&&re<26;++re,W<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(g),S.isub(M)),v.iushrn(1),S.iushrn(1);for(var ee=0,ce=1;!(x.words[0]&ce)&&ee<26;++ee,ce<<=1);if(ee>0)for(x.iushrn(ee);ee-- >0;)(k.isOdd()||E.isOdd())&&(k.iadd(g),E.isub(M)),k.iushrn(1),E.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(k),S.isub(E)):(x.isub(h),k.isub(v),E.isub(S))}return{a:k,b:E,gcd:x.iushln(C)}},i.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=x.clone();h.cmpn(1)>0&&x.cmpn(1)>0;){for(var E=0,C=1;!(h.words[0]&C)&&E<26;++E,C<<=1);if(E>0)for(h.iushrn(E);E-- >0;)v.isOdd()&&v.iadd(k),v.iushrn(1);for(var g=0,M=1;!(x.words[0]&M)&&g<26;++g,M<<=1);if(g>0)for(x.iushrn(g);g-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(S)):(x.isub(h),S.isub(v))}var re;return h.cmpn(1)===0?re=v:re=S,re.cmpn(0)<0&&re.iadd(f),re},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var h=this.clone(),x=f.clone();h.negative=0,x.negative=0;for(var v=0;h.isEven()&&x.isEven();v++)h.iushrn(1),x.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;x.isEven();)x.iushrn(1);var S=h.cmp(x);if(S<0){var k=h;h=x,x=k}else if(S===0||x.cmpn(1)===0)break;h.isub(x)}while(!0);return x.iushln(v)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){n(typeof f=="number");var h=f%26,x=(f-h)/26,v=1<>>26,E&=67108863,this.words[k]=E}return S!==0&&(this.words[k]=S,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var h=f<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var x;if(this.length>1)x=1;else{h&&(f=-f),n(f<=67108863,"Number is too big");var v=this.words[0]|0;x=v===f?0:vf.length)return 1;if(this.length=0;x--){var v=this.words[x]|0,S=f.words[x]|0;if(v!==S){vS&&(h=1);break}}return h},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new q(f)},i.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var j={k256:null,p224:null,p192:null,p25519:null};function I(y,f){this.name=y,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},I.prototype.ireduce=function(f){var h=f,x;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),x=h.bitLength();while(x>this.n);var v=x0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},I.prototype.split=function(f,h){f.iushrn(this.n,0,h)},I.prototype.imulK=function(f){return f.imul(this.k)};function b(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,I),b.prototype.split=function(f,h){for(var x=4194303,v=Math.min(f.length,9),S=0;S>>22,k=E}k>>>=22,f.words[S-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},b.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var h=0,x=0;x>>=26,f.words[x]=S,h=v}return h!==0&&(f.words[f.length++]=h),f},i._prime=function(f){if(j[f])return j[f];var h;if(f==="k256")h=new b;else if(f==="p224")h=new N;else if(f==="p192")h=new V;else if(f==="p25519")h=new Z;else throw new Error("Unknown prime "+f);return j[f]=h,h};function q(y){if(typeof y=="string"){var f=i._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}q.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},q.prototype._verify2=function(f,h){n((f.negative|h.negative)===0,"red works only with positives"),n(f.red&&f.red===h.red,"red works only with red numbers")},q.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(u(f,f.umod(this.m)._forceRed(this)),f)},q.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},q.prototype.add=function(f,h){this._verify2(f,h);var x=f.add(h);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(f,h){this._verify2(f,h);var x=f.iadd(h);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(f,h){this._verify2(f,h);var x=f.sub(h);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(f,h){this._verify2(f,h);var x=f.isub(h);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(f,h){return this._verify1(f),this.imod(f.ushln(h))},q.prototype.imul=function(f,h){return this._verify2(f,h),this.imod(f.imul(h))},q.prototype.mul=function(f,h){return this._verify2(f,h),this.imod(f.mul(h))},q.prototype.isqr=function(f){return this.imul(f,f.clone())},q.prototype.sqr=function(f){return this.mul(f,f)},q.prototype.sqrt=function(f){if(f.isZero())return f.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(f,x)}for(var v=this.m.subn(1),S=0;!v.isZero()&&v.andln(1)===0;)S++,v.iushrn(1);n(!v.isZero());var k=new i(1).toRed(this),E=k.redNeg(),C=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);this.pow(g,C).cmp(E)!==0;)g.redIAdd(E);for(var M=this.pow(g,v),re=this.pow(f,v.addn(1).iushrn(1)),W=this.pow(f,v),ee=S;W.cmp(k)!==0;){for(var ce=W,ie=0;ce.cmp(k)!==0;ie++)ce=ce.redSqr();n(ie=0;S--){for(var M=h.words[S],re=g-1;re>=0;re--){var W=M>>re&1;if(k!==v[0]&&(k=this.sqr(k)),W===0&&E===0){C=0;continue}E<<=1,E|=W,C++,!(C!==x&&(S!==0||re!==0))&&(k=this.mul(k,v[E]),C=0,E=0)}g=26}return k},q.prototype.convertTo=function(f){var h=f.umod(this.m);return h===f?h.clone():h},q.prototype.convertFrom=function(f){var h=f.clone();return h.red=null,h},i.mont=function(f){return new _(f)};function _(y){q.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(_,q),_.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},_.prototype.convertFrom=function(f){var h=this.imod(f.mul(this.rinv));return h.red=null,h},_.prototype.imul=function(f,h){if(f.isZero()||h.isZero())return f.words[0]=0,f.length=1,f;var x=f.imul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.mul=function(f,h){if(f.isZero()||h.isZero())return new i(0)._forceRed(this);var x=f.mul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.invm=function(f){var h=this.imod(f._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(e,Ae)})(eP);var tFe=eP.exports;(function(e){var t=Ae&&Ae.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.assertType=e.isDevnet=e.sleep=e.hexToString=e.stringToHex=e.blockChainIndex=e.subContractId=e.contractIdFromTx=e.addressFromTokenId=e.addressFromContractId=e.addressFromScript=e.addressFromPublicKey=e.publicKeyFromPrivateKey=e.groupOfPrivateKey=e.binToHex=e.hexToBinUnsafe=e.tokenIdFromAddress=e.contractIdFromAddress=e.groupOfAddress=e.AddressType=e.toNonNegativeBigInt=e.isHexString=e.xorByte=e.signatureDecode=e.encodeHexSignature=e.encodeSignature=e.networkIds=void 0;const r=_u,n=t(tFe),o=t(qi),i=t(j2),a=jn,s=lg,c=t(ug);e.networkIds=["mainnet","testnet","devnet"];const l=new r.ec("secp256k1");function u(W){let ee=W.s;l.n&&W.s.cmp(l.nh)===1&&(ee=l.n.sub(W.s));const ce=W.r.toString("hex",66).slice(2),ie=ee.toString("hex",66).slice(2);return ce+ie}e.encodeSignature=u;function d(W,ee){return u({r:new n.default(W,"hex"),s:new n.default(ee,"hex")})}e.encodeHexSignature=d;function p(W,ee){if(ee.length!==128)throw new Error("Invalid signature length");const ce=ee.slice(64,128),ie=new n.default(ce,"hex");if(W.n&&ie.cmp(W.nh)<1)return{r:ee.slice(0,64),s:ce};throw new Error("The signature is not normalized")}e.signatureDecode=p;function m(W){const ee=W>>24&255,ce=W>>16&255,ie=W>>8&255,le=W&255;return(ee^ce^ie^le)&255}e.xorByte=m;function w(W){return W.length%2===0&&/^[0-9a-fA-F]*$/.test(W)}e.isHexString=w;function A(W){try{const ee=BigInt(W);return ee<0n?void 0:ee}catch{return}}e.toNonNegativeBigInt=A;var T;(function(W){W[W.P2PKH=0]="P2PKH",W[W.P2MPKH=1]="P2MPKH",W[W.P2SH=2]="P2SH",W[W.P2C=3]="P2C"})(T=e.AddressType||(e.AddressType={}));function O(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2PKH)return $(ie);if(ce==T.P2MPKH)return R(ie);if(ce==T.P2SH)return j(ie);{const le=I(W);return le[`${le.length-1}`]}}e.groupOfAddress=O;function P(W){const ee=(0,c.default)(W)|1;return m(ee)%s.TOTAL_NUMBER_OF_GROUPS}function $(W){if(W.length!=32)throw new Error(`Invalid p2pkh address length: ${W.length}`);return P(W)}function R(W){if((W.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${W.length}`);return P(W.slice(1,33))}function j(W){return P(W)}function I(W){return N(W)}e.contractIdFromAddress=I;function b(W){return N(W)}e.tokenIdFromAddress=b;function N(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2C)return ie;throw new Error(`Invalid contract address type: ${ce}`)}function V(W){return a.Buffer.from(W,"hex")}e.hexToBinUnsafe=V;function Z(W){return a.Buffer.from(W).toString("hex")}e.binToHex=Z;function q(W,ee){return O(y(_(W,ee),ee))}e.groupOfPrivateKey=q;function _(W,ee){return(ee??"default")==="default"?l.keyFromPrivate(W).getPublic(!0,"hex"):l.g.mul(new n.default(W,16)).encode("hex",!0).slice(2)}e.publicKeyFromPrivateKey=_;function y(W,ee){if((ee??"default")==="default"){const ie=a.Buffer.from([T.P2PKH]),le=a.Buffer.from(o.default.blake2b(a.Buffer.from(W,"hex"),void 0,32)),L=a.Buffer.concat([ie,le]);return i.default.encode(L)}else{const ie=a.Buffer.from(`0101000000000458144020${W}8685`,"hex");return f(ie)}}e.addressFromPublicKey=y;function f(W){const ee=o.default.blake2b(W,void 0,32),ce=a.Buffer.from([T.P2SH]);return i.default.encode(a.Buffer.concat([ce,ee]))}e.addressFromScript=f;function h(W){const ee=a.Buffer.from([T.P2C]),ce=a.Buffer.from(V(W)),ie=a.Buffer.concat([ee,ce]);return i.default.encode(ie)}e.addressFromContractId=h;function x(W){return h(W)}e.addressFromTokenId=x;function v(W,ee){const ce=V(W),ie=a.Buffer.concat([ce,a.Buffer.from([ee])]),le=o.default.blake2b(ie,void 0,32);return Z(le)}e.contractIdFromTx=v;function S(W,ee,ce){if(ce<0||ce>=s.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${ce}`);const ie=a.Buffer.concat([V(W),V(ee)]),le=a.Buffer.concat([o.default.blake2b(o.default.blake2b(ie,void 0,32),void 0,32).slice(0,-1),a.Buffer.from([ce])]);return Z(le)}e.subContractId=S;function k(W){if(W.length!=64)throw Error(`Invalid block hash: ${W}`);const ee=+("0x"+W.slice(-4))%s.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(ee/s.TOTAL_NUMBER_OF_GROUPS),toGroup:ee%s.TOTAL_NUMBER_OF_GROUPS}}e.blockChainIndex=k;function E(W){let ee="";for(let ce=0;cesetTimeout(ee,W))}e.sleep=g;function M(W){return W!==0&&W!==1}e.isDevnet=M;function re(){}e.assertType=re})(wee);var L2={},rFe=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(L2,"__esModule",{value:!0});L2.Subscription=void 0;const nFe=rFe(Kw());let oFe=class{constructor(t){this.pollingInterval=t.pollingInterval,this.messageCallback=t.messageCallback,this.errorCallback=t.errorCallback,this.task=void 0,this.cancelled=!1,this.eventEmitter=new nFe.default}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}};L2.Subscription=oFe;var ul={},ER;function iFe(){if(ER)return ul;ER=1;var e=Ae&&Ae.__createBinding||(Object.create?function(u,d,p,m){m===void 0&&(m=p);var w=Object.getOwnPropertyDescriptor(d,p);(!w||("get"in w?!d.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(u,m,w)}:function(u,d,p,m){m===void 0&&(m=p),u[m]=d[p]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(u,d){Object.defineProperty(u,"default",{enumerable:!0,value:d})}:function(u,d){u.default=d}),r=Ae&&Ae.__importStar||function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p in u)p!=="default"&&Object.prototype.hasOwnProperty.call(u,p)&&e(d,u,p);return t(d,u),d};Object.defineProperty(ul,"__esModule",{value:!0}),ul.verifySignature=ul.sign=void 0;const n=_u,o=Ud(),i=r(O2),a=Er,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const d=(0,a.createHash)("sha256");for(const p of u)d.update(p);return d.digest()},i.utils.hmacSha256Sync=(u,...d)=>{const p=(0,a.createHmac)("sha256",Ze.from(u));return d.forEach(m=>p.update(m)),Uint8Array.from(p.digest())};function c(u,d,p){if((p??"default")==="default"){const A=s.keyFromPrivate(d).sign(u);return(0,o.encodeSignature)(A)}else{const w=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d));return(0,o.binToHex)(w)}}ul.sign=c;function l(u,d,p,m){const w=m??"default";try{return w==="default"?s.keyFromPublic(d,"hex").verify(u,(0,o.signatureDecode)(s,p)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(p),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d))}catch{return!1}}return ul.verifySignature=l,ul}var _ee={};(function(e){var t=Ae&&Ae.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.number256ToNumber=e.number256ToBigint=e.convertAlphAmountWithDecimals=e.convertAmountWithDecimals=e.prettifyNumber=e.prettifyExactAmount=e.prettifyTokenAmount=e.prettifyAttoAlphAmount=e.prettifyNumberConfig=e.isNumeric=void 0;const r=t(k8),n=T=>!isNaN(parseFloat(T))&&isFinite(T);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(T){return s(T,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(T,O){return s(T,O,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(T,O){return s(T,O,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(T,O,P){const $=d(w(T),O);if(!(0,e.isNumeric)($))return;const R=new r.default($);let j;if(R.gte(1))j=R.toFormat(P.minDecimalPlaces);else{const V=R.toFormat(P.maxDecimalPlaces).split(".")[1],Z=V==null?void 0:V.match(/^0+/),q=Z&&Z.length?Z[0].length:0,_=Math.max(q+P.minDecimalSignificantDigits,P.minDecimalPlaces);j=R.toFormat(_)}let I=j.replace(/0+$/,"");const b=1+j.indexOf(".")+P.decimalPlacesWhenZero;return I.length{if(!u.includes(p.address)){const m=d.get(p.address);m===void 0?d.set(p.address,BigInt(p.attoAlphAmount)):d.set(p.address,BigInt(p.attoAlphAmount)+m)}}),Array.from(d.entries()).map(([p,m])=>({targetAddress:p,depositAmount:m}))}bo.getALPHDepositInfo=n;function o(l){return a(l.unsigned.inputs[0].unlockScript)}bo.getSenderAddress=o;var i;(function(l){l[l.P2PKH=0]="P2PKH",l[l.P2MPKH=1]="P2MPKH",l[l.P2SH=2]="P2SH"})(i||(i={}));function a(l){const u=(0,e.hexToBinUnsafe)(l);if(u.length===0)throw new Error("UnlockScript is empty");const d=u[0],p=u.slice(1);if(d===i.P2PKH)return(0,e.addressFromPublicKey)((0,e.binToHex)(p));if(d===i.P2MPKH)throw new Error("Naive multi-sig address is not supported for exchanges as it will be replaced by P2SH");if(d===i.P2SH){const m=p.slice(0,-1);return(0,e.addressFromScript)(m)}else throw new Error("Invalid unlock script type")}bo.getAddressFromUnlockScript=a;function s(l){return l.unsigned.fixedOutputs.every(d=>d.tokens.length===0)}function c(l){return!(l.contractInputs.length!==0||l.generatedOutputs.length!==0||l.unsigned.inputs.length===0||l.unsigned.scriptOpt!==void 0)}return bo}var PR;function $o(){return PR||(PR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(o,i,a,s){s===void 0&&(s=a);var c=Object.getOwnPropertyDescriptor(i,a);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(o,s,c)}:function(o,i,a,s){s===void 0&&(s=a),o[s]=i[a]}),r=Ae&&Ae.__exportStar||function(o,i){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,o,a)};Object.defineProperty(e,"__esModule",{value:!0}),e.getALPHDepositInfo=e.getSenderAddress=e.isALPHTransferTx=e.validateExchangeAddress=void 0,r(B2,e),r(F2,e),r(j2,e),r(ug,e),r(wee,e),r(L2,e),r(iFe(),e),r(_ee,e);var n=aFe();Object.defineProperty(e,"validateExchangeAddress",{enumerable:!0,get:function(){return n.validateExchangeAddress}}),Object.defineProperty(e,"isALPHTransferTx",{enumerable:!0,get:function(){return n.isALPHTransferTx}}),Object.defineProperty(e,"getSenderAddress",{enumerable:!0,get:function(){return n.getSenderAddress}}),Object.defineProperty(e,"getALPHDepositInfo",{enumerable:!0,get:function(){return n.getALPHDepositInfo}})}(P3)),P3}var AR;function tP(){return AR||(AR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StdInterfaceIds=e.request=e.requestWithLog=e.forwardRequests=e.typeLength=e.getDefaultValue=e.fromApiVal=e.fromApiArray=e.fromApiVals=e.toApiVal=e.toApiArray=e.toApiAddress=e.toApiByteVec=e.fromApiNumber256=e.toApiNumber256Optional=e.toApiNumber256=e.toApiBoolean=e.fromApiTokens=e.fromApiToken=e.toApiTokens=e.toApiToken=void 0;const t=lg,r=ts,n=$o();n.assertType;function o(_){return{id:_.id,amount:l(_.amount)}}e.toApiToken=o;function i(_){return _==null?void 0:_.map(o)}e.toApiTokens=i;function a(_){return{id:_.id,amount:d(_.amount)}}e.fromApiToken=a;function s(_){return _==null?void 0:_.map(a)}e.fromApiTokens=s;function c(_){if(typeof _=="boolean")return _;throw new Error(`Invalid boolean value: ${_}`)}e.toApiBoolean=c;function l(_){if(typeof _=="number"&&Number.isInteger(_)||typeof _=="bigint")return _.toString();if(typeof _=="string")try{if(BigInt(_).toString()===_)return _}catch{throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}e.toApiNumber256=l;function u(_){return _===void 0?void 0:l(_)}e.toApiNumber256Optional=u;function d(_){return BigInt(_)}e.fromApiNumber256=d;function p(_){if(typeof _!="string")throw new Error(`Invalid value: ${_}, expected a hex-string`);if((0,n.isHexString)(_))return _;if((0,n.isBase58)(_))try{const y=n.bs58.decode(_);if(y.length==33&&y[0]==3)return Ze.from(y.slice(1)).toString("hex")}catch{throw new Error(`Invalid hex-string: ${_}`)}throw new Error(`Invalid hex-string: ${_}`)}e.toApiByteVec=p;function m(_){if(typeof _=="string")try{return n.bs58.decode(_),_}catch{throw new Error(`Invalid base58 string: ${_}`)}else throw new Error(`Invalid value: ${_}, expected a base58 string`)}e.toApiAddress=m;function w(_,y){if(!Array.isArray(y))throw new Error(`Expected array, got ${y}`);const f=_.lastIndexOf(";");if(f==-1)throw new Error(`Invalid Val type: ${_}`);const h=_.slice(1,f),x=parseInt(_.slice(f+1,-1));if(y.length!=x)throw new Error(`Invalid val dimension: ${y}`);return{value:y.map(v=>A(v,h)),type:"Array"}}e.toApiArray=w;function A(_,y){return y==="Bool"?{value:c(_),type:y}:y==="U256"||y==="I256"?{value:l(_),type:y}:y==="ByteVec"?{value:p(_),type:y}:y==="Address"?{value:m(_),type:y}:w(y,_)}e.toApiVal=A;function T(_,y,f,h=!1){if(_.length===0)throw new Error("Not enough Vals");const x=_[`${y}`];if(f==="Bool"&&x.type===f)return[x.value,y+1];if((f==="U256"||f==="I256")&&x.type===f)return[d(x.value),y+1];if((f==="ByteVec"||f==="Address")&&(x.type===f||h))return[x.value,y+1];{const[v,S]=R(f),k=S.reduce((g,M)=>g*M),E=y+k,C=_.slice(y,E);if(C.length==k&&C.every(g=>g.type===v)){const g=C.map(M=>$(M,v));return[I(g,S),E]}else throw new Error(`Invalid array Val type: ${C}, ${f}`)}}function O(_,y,f,h=!1){let x=0;const v={};return f.forEach((S,k)=>{const E=y[`${k}`],[C,g]=T(_,x,S,h);x=g,v[`${E}`]=C}),v}e.fromApiVals=O;function P(_,y){let f=0;const h=[];for(const x of y){const[v,S]=T(_,f,x);h.push(v),f=S}return h}e.fromApiArray=P;function $(_,y){if(_.type==="Bool"&&_.type===y)return _.value;if((_.type==="U256"||_.type==="I256")&&_.type===y)return d(_.value);if((_.type==="ByteVec"||_.type==="Address")&&_.type===y)return _.value;throw new Error(`Invalid node.Val type: ${_}`)}e.fromApiVal=$;function R(_){const y=_.lastIndexOf(";");if(y===-1)throw new Error(`Invalid Val type: ${_}`);const f=_.slice(1,y),h=parseInt(_.slice(y+1,-1));if(f[0]=="["){const[x,v]=R(f);return[x,(v.unshift(h),v)]}else return[f,[h]]}function j(_){if(_==="U256"||_==="I256")return 0n;if(_==="Bool")return!1;if(_==="ByteVec")return"";if(_==="Address")return t.ZERO_ADDRESS;const[y,f]=R(_),h=j(y);return f.reduceRight((x,v)=>Array(v).fill(x),h)}e.getDefaultValue=j;function I(_,y){if(y.length==1)return _;{const f=[],h=_.length/y[0],x=y.slice(1);for(let v=0;v<_.length;v+=h){const S=_.slice(v,v+h);f.push(I(S,x))}return f}}function b(_){if(_==="U256"||_==="I256"||_==="Bool"||_==="ByteVec"||_==="Address")return 1;const[,y]=R(_);return y.reduce((f,h)=>f*h)}e.typeLength=b;async function N(_,y){const f=(0,r.isDebugModeEnabled)(),{path:h,method:x,params:v}=_;f&&console.log(`[REQUEST] ${h} ${x} ${JSON.stringify(v)}`);try{const S=await y(_);return f&&console.log(`[RESPONSE] ${h} ${x} ${JSON.stringify(S)}`),S}catch(S){throw f&&console.error(`[ERROR] ${h} ${x} `,S),S}}function V(_,y){for(const[f,h]of Object.entries(_))for(const x of Object.keys(h))h[`${x}`]=async(...v)=>N({path:f,method:x,params:v},y)}e.forwardRequests=V;function Z(_){for(const[y,f]of Object.entries(_))for(const[h,x]of Object.entries(f))f[`${h}`]=async(...v)=>N({path:y,method:h,params:v},()=>x(...v))}e.requestWithLog=Z;async function q(_,y){const f=_[`${y.path}`][`${y.method}`];return f(...y.params)}e.request=q,function(_){_.FungibleToken="0001",_.NFTCollection="0002",_.NFT="0003",_.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(C3)),C3}var rP={},Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});Mc.isBalanceEqual=Mc.convertHttpResponse=void 0;function sFe(e){if(e.error){const t=e.error.detail??`status code: ${e.status}`;throw new Error(`[API Error] - ${t}`)}else return e.data}Mc.convertHttpResponse=sFe;function cFe(e,t){const r=(o,i)=>{const a=(o==null?void 0:o.length)??0,s=(i==null?void 0:i.length)??0;if(a!==s)return!1;if(a===0)return!0;const c=i.map(l=>({...l,used:!1}));return o.every(l=>{const u=c.find(d=>!d.used&&l.id===d.id&&l.amount===d.amount);return u===void 0?!1:(u.used=!0,!0)})},n=e.balance===t.balance&&e.lockedBalance===t.lockedBalance;return e.utxoNum===t.utxoNum&&n&&r(e.tokenBalances,t.tokenBalances)&&r(e.lockedTokenBalances,t.lockedTokenBalances)}Mc.isBalanceEqual=cFe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=Mc;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,c={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...c}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,c={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,c={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,c={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,c={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsBuildMultiAddresses:(a,s={})=>this.request({path:"/transactions/build-multi-addresses",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,c={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,c={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSweep:(a,s={})=>this.request({path:"/multisig/sweep",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,c={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,c={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,c={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)}}}e.Api=o})(rP);var O3={},Kt={},OR;function xee(){if(OR)return Kt;OR=1;var e;Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.buildDebugBytecode=Kt.encodeContractField=Kt.buildContractByteCode=Kt.buildScriptByteCode=Kt.encodeScriptField=Kt.encodeScriptFieldAsString=Kt.encodeAddress=Kt.encodeByteVec=Kt.encodeU256=Kt.encodeI256=Kt.encodeBool=void 0;const t=jn,r=Ld(),n=$o(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?d(v):p(v)}Kt.encodeI256=l;function u(v,S,k){let E=v.toString(16);E.length%2===1?E="0"+E:S&&E[0]>="8"&&(E="00"+E);const C=E.length/2,g=new Uint8Array(C+1);for(let re=0;re>8)+s.twoBytePrefix,S&255])}else if(v>24)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v=-a.oneByteBound){const S=Number(v);return new Uint8Array([(S^s.oneByteNegPrefix)&255])}else if(v>=-a.twoByteBound){const S=Number(v);return new Uint8Array([(S>>8^s.twoByteNegPrefix)&255,S&255])}else if(v>=-a.fourByteBound){const S=Number(v);return new Uint8Array([(S>>24^s.fourByteNegPrefix)&255,S>>16&255,S>>8&255,S&255])}else{if(v>=a.i256LowerBound)return u(~v,!0,!0);throw Error(`Too small number for i256: ${v}`)}}function m(v){if(v>8&255)+s.twoBytePrefix,S&255])}else if(v>24&255)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v{const g=k.names[`${C}`],M=k.types[`${C}`];if(g in S){const re=S[`${g}`];return N(g,()=>R(M,re))}else throw new Error(`The value of field ${g} is not provided`)})}Kt.buildScriptByteCode=b;function N(v,S){try{return S()}catch(k){throw k instanceof Error?new Error(`Invalid ${v}, error: ${k.message}`):k}}function V(v,S,k){const C=S.isMutable.map((M,re)=>re).filter(M=>S.isMutable[`${M}`]===k).flatMap(M=>{const re=S.names[`${M}`],W=S.types[`${M}`];if(re in v){const ee=v[`${re}`];return N(re,()=>h(W,ee))}else throw new Error(`The value of field ${re} is not provided`)});return t.Buffer.from(l(BigInt(C.length))).toString("hex")+C.map(M=>t.Buffer.from(M).toString("hex")).join("")}function Z(v,S,k){const E=V(S,k,!1),C=V(S,k,!0);return v+E+C}Kt.buildContractByteCode=Z;var q;(function(v){v[v.Bool=0]="Bool",v[v.I256=1]="I256",v[v.U256=2]="U256",v[v.ByteVec=3]="ByteVec",v[v.Address=4]="Address"})(q||(q={}));function _(v){return new Uint8Array([q.I256,...l(v)])}function y(v){return new Uint8Array([q.U256,...m(v)])}function f(v,S){if(!Array.isArray(S))throw new Error(`Expected array, got ${S}`);const k=v.lastIndexOf(";");if(k==-1)throw new Error(`Invalid Array type: ${v}`);const E=v.slice(1,k),C=parseInt(v.slice(k+1,-1));if(S.length!=C)throw new Error(`Invalid val dimension: ${S}`);return S.flatMap(g=>h(E,g))}function h(v,S){switch(v){case"Bool":const k=(0,r.toApiBoolean)(S)?1:0;return[new Uint8Array([q.Bool,k])];case"I256":const E=(0,r.toApiNumber256)(S);return[_(BigInt(E))];case"U256":const C=(0,r.toApiNumber256)(S);return[y(BigInt(C))];case"ByteVec":const g=(0,r.toApiByteVec)(S);return[new Uint8Array([q.ByteVec,...w(g)])];case"Address":const M=(0,r.toApiAddress)(S);return[new Uint8Array([q.Address,...A(M)])];default:return f(v,S)}}Kt.encodeContractField=h;function x(v,S){if(S==="")return v;const k=/[=+-][0-9a-f]*/g;let E="",C=0;for(const g of S.matchAll(k)){const M=g[0],re=M[0];if(re==="="){const W=parseInt(M.substring(1));E=E+v.slice(C,C+W),C=C+W}else if(re==="+")E=E+M.substring(1);else{const W=parseInt(M.substring(1));C=C+W}}return E}return Kt.buildDebugBytecode=x,Kt}var I3={},yi={},IR;function See(){if(IR)return yi;IR=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.getCurrentExplorerProvider=yi.setCurrentExplorerProvider=yi.getCurrentNodeProvider=yi.setCurrentNodeProvider=void 0;const e=Ld();let t;function r(s,c,l){typeof s=="string"?t=new e.NodeProvider(s,c,l):t=s}yi.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}yi.getCurrentNodeProvider=n;let o;function i(s,c,l){typeof s=="string"?o=new e.ExplorerProvider(s,c,l):o=s}yi.setCurrentExplorerProvider=i;function a(){return o}return yi.getCurrentExplorerProvider=a,yi}var fl={},TR;function Eee(){if(TR)return fl;TR=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.subscribeToEvents=fl.EventSubscription=void 0;const e=Ud(),t=$o();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}fl.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return fl.subscribeToEvents=n,fl}var MR;function lFe(){return MR||(MR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(X,D,H,F){F===void 0&&(F=H);var B=Object.getOwnPropertyDescriptor(D,H);(!B||("get"in B?!D.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return D[H]}}),Object.defineProperty(X,F,B)}:function(X,D,H,F){F===void 0&&(F=H),X[F]=D[H]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(X,D){Object.defineProperty(X,"default",{enumerable:!0,value:D})}:function(X,D){X.default=D}),n=Ae&&Ae.__importStar||function(X){if(X&&X.__esModule)return X;var D={};if(X!=null)for(var H in X)H!=="default"&&Object.prototype.hasOwnProperty.call(X,H)&&t(D,X,H);return r(D,X),D},o=Ae&&Ae.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=jn,a=o(Er),s=Er,c=Ld(),l=n(xee()),u=$o(),d=See(),p=n(Er),m=Eee(),w=lg,A=n(qi),T=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var O;(function(X){X[X.Contract=0]="Contract",X[X.Script=1]="Script",X[X.AbstractContract=2]="AbstractContract",X[X.Interface=3]="Interface"})(O||(O={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class P{constructor(D,H){this.matcher=new RegExp(D,"mg"),this.type=H}}function $(X){let D=0;for(let H=0;Hthis.compilerOptionsUsed[`${U}`]===J)||H.length!==this.infos.size)return!0;for(const U of H){const J=this.infos.get(U.name);if(typeof J>"u"||J.sourceCodeHash!==U.sourceCodeHash)return!0}return!1}static async from(D){const H=p.join(D,I.artifactFileName);if(a.default.existsSync(H))try{const F=await s.promises.readFile(H),B=JSON.parse(F.toString()),U=B.fullNodeVersion,J=B.compilerOptionsUsed,ne=new Map(Object.entries(B.infos));return new I(U,J,ne)}catch(F){console.log(`Failed to load project artifact, error: ${F}`);return}}}e.ProjectArtifact=I,I.artifactFileName=".project.json";class b{static buildProjectArtifact(D,H,F,B,U){const J=new Map;F.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:oe.artifact.codeHashDebug,warnings:oe.warnings})}),B.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:oe.warnings})});const ne=F.size+B.size;return H.slice(ne).forEach(oe=>{J.set(oe.name,{sourceFile:oe.contractRelativePath,sourceCodeHash:oe.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new I(D,U,J)}constructor(D,H,F,B,U,J,ne){this.contractsRootDir=D,this.artifactsRootDir=H,this.sourceInfos=F,this.contracts=B,this.scripts=U,this.projectArtifact=ne,J&&b.checkCompilerWarnings([...[...B.entries()].map(oe=>oe[1].warnings).flat(),...[...U.entries()].map(oe=>oe[1].warnings).flat()],J)}static checkCompilerWarnings(D,H){if(D.length!==0){const F=" - ",U=`Compilation warnings: +`+(F+D.join(` +`+F))+` +`;if(H)throw new Error(U);console.log(U)}}static contract(D){const H=b.currentProject.contracts.get(D);if(typeof H>"u")throw new Error(`Contract "${D}" does not exist`);return H.artifact}static script(D){const H=b.currentProject.scripts.get(D);if(typeof H>"u")throw new Error(`Script "${D}" does not exist`);return H.artifact}async saveArtifactsToFile(D){const H=this.artifactsRootDir,F=async function(B){const U=B.sourceInfo.getArtifactPath(H),J=p.dirname(U);return a.default.existsSync(J)||a.default.mkdirSync(J,{recursive:!0}),s.promises.writeFile(U,B.artifact.toString())};this.contracts.forEach(B=>F(B)),this.scripts.forEach(B=>F(B)),await this.projectArtifact.saveToFile(D)}contractByCodeHash(D){const H=[...this.contracts.values()].find(F=>F.artifact.codeHash===D||F.artifact.codeHashDebug==D);if(typeof H>"u")throw new Error(`Unknown code with code hash: ${D}`);return H.artifact}static async compile(D,H,F,B,U,J,ne,oe){const Te=F.reduce((Ge,qe)=>(Ge.find(pe=>pe.sourceCodeHash===qe.sourceCodeHash)===void 0&&Ge.push(qe),Ge),[]).map(Ge=>Ge.sourceCode).join(` +`),$e=await H.contracts.postContractsCompileProject({code:Te,compilerOptions:oe}),De=new Map,Xe=new Map;$e.contracts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Contract&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for contract ${Ge.name}`);const pe=V.fromCompileResult(Ge);De.set(pe.name,new j(qe,pe,Ge.warnings))}),$e.scripts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Script&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for script ${Ge.name}`);const pe=Z.fromCompileResult(Ge);Xe.set(pe.name,new j(qe,pe,Ge.warnings))});const ze=b.buildProjectArtifact(D,F,De,Xe,oe),He=new b(U,J,F,De,Xe,ne,ze);return await He.saveArtifactsToFile(B),He}static async loadArtifacts(D,H,F,B,U,J,ne,oe){try{const de=new Map,Te=new Map;for(const $e of H){const De=F.infos.get($e.name);if(typeof De>"u")throw Error(`Unable to find project info for ${$e.name}, please rebuild the project`);const Xe=De.warnings,ze=$e.getArtifactPath(J);if($e.type===O.Contract){const He=await V.fromArtifactFile(ze,De.bytecodeDebugPatch,De.codeHashDebug);de.set(He.name,new j($e,He,Xe))}else if($e.type===O.Script){const He=await Z.fromArtifactFile(ze,De.bytecodeDebugPatch);Te.set(He.name,new j($e,He,Xe))}}return new b(U,J,H,de,Te,ne,F)}catch(de){return console.log(`Failed to load artifacts, error: ${de}, try to re-compile contracts...`),b.compile(F.fullNodeVersion,D,H,B,U,J,ne,oe)}}static getImportSourcePath(D,H){const F=H.split("/");if(F.length>1&&F[0]==="std"){const U=p.dirname(__filename);return p.join(U,"..","..","..",H)}let B=D;for(;;){const U=p.join(B,"node_modules",H);if(a.default.existsSync(U))return U;const J=B;if(B=p.join(B,".."),J===B)throw new Error(`Specified import file does not exist: ${H}`)}}static async handleImports(D,H,F,B){const U=[],J=F.replace(b.importRegex,oe=>(U.push(oe),"")),ne=[];for(const oe of U){const de=oe.slice(8,-1),Te=de.endsWith(".ral")?de:de+".ral";if(!B.includes(Te)){B.push(Te);const $e=b.getImportSourcePath(D,Te),De=await b.loadSourceFile(D,H,$e,B,!0);ne.push(...De)}}return[J,ne]}static async loadSourceFile(D,H,F,B,U){const J=p.relative(H,F);if(!F.endsWith(".ral"))throw new Error(`Invalid filename: ${F}, smart contract file name should end with ".ral"`);const ne=await s.promises.readFile(F),[oe,de]=await b.handleImports(D,H,ne.toString(),B);if(oe.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${F}`);const Te=de;for(const $e of this.matchers){const De=oe.matchAll($e.matcher);for(const Xe of De){const ze=await R.from($e.type,Xe[1],oe,J,U);Te.push(ze)}}return Te}static async loadSourceFiles(D,H){const F=[],B=[],U=async function(ne){const oe=await s.promises.readdir(ne,{withFileTypes:!0});for(const de of oe)if(de.isFile()){const Te=p.join(ne,de.name),$e=await b.loadSourceFile(D,H,Te,F,!1);B.push(...$e)}else{const Te=p.join(ne,de.name);await U(Te)}};await U(H);const J=B.filter(ne=>ne.type===O.Contract||ne.type===O.Script).length;if(B.length===0||J===0)throw new Error("Project have no source files");return B.sort((ne,oe)=>ne.type-oe.type)}static async build(D={},H=".",F=b.DEFAULT_CONTRACTS_DIR,B=b.DEFAULT_ARTIFACTS_DIR,U=void 0){const J=(0,d.getCurrentNodeProvider)(),ne=U??(await J.infos.getInfosVersion()).version,oe=await b.loadSourceFiles(H,F),{errorOnWarnings:de,...Te}={...e.DEFAULT_COMPILER_OPTIONS,...D},$e=await I.from(H);$e===void 0||$e.needToReCompile(Te,oe,ne)?(console.log(`Compiling contracts in folder "${F}"`),b.currentProject=await b.compile(ne,J,oe,H,F,B,de,Te)):(console.log(`Contracts are compiled already. Loading them from folder "${B}"`),b.currentProject=await b.loadArtifacts(J,oe,$e,H,F,B,de,Te))}}e.Project=b,b.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),b.abstractContractMatcher=new P("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",O.AbstractContract),b.contractMatcher=new P("^Contract ([A-Z][a-zA-Z0-9]*)",O.Contract),b.interfaceMatcher=new P("^Interface ([A-Z][a-zA-Z0-9]*)",O.Interface),b.scriptMatcher=new P("^TxScript ([A-Z][a-zA-Z0-9]*)",O.Script),b.matchers=[b.abstractContractMatcher,b.contractMatcher,b.interfaceMatcher,b.scriptMatcher],b.DEFAULT_CONTRACTS_DIR="contracts",b.DEFAULT_ARTIFACTS_DIR="artifacts";class N{constructor(D,H,F){this.version=D,this.name=H,this.functions=F}publicFunctions(){return this.functions.filter(D=>D.isPublic).map(D=>D.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(D=>D.usePreapprovedAssets).map(D=>D.name)}usingAssetsInContractFunctions(){return this.functions.filter(D=>D.useAssetsInContract).map(D=>D.name)}async isDevnet(D){if(!D.nodeProvider)return!1;const H=await D.nodeProvider.infos.getInfosChainParams();return(0,u.isDevnet)(H.networkId)}}e.Artifact=N;class V extends N{constructor(D,H,F,B,U,J,ne,oe,de,Te,$e,De){super(D,H,de),this.bytecode=F,this.bytecodeDebugPatch=B,this.codeHash=U,this.fieldsSig=ne,this.eventsSig=oe,this.constants=Te,this.enums=$e,this.stdInterfaceId=De,this.bytecodeDebug=l.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=J}static fromJson(D,H="",F=""){if(D.version==null||D.name==null||D.bytecode==null||D.codeHash==null||D.fieldsSig==null||D.eventsSig==null||D.constants==null||D.enums==null||D.functions==null)throw Error("The artifact JSON for contract is incomplete");return new V(D.version,D.name,D.bytecode,H,D.codeHash,F||D.codeHash,D.fieldsSig,D.eventsSig,D.functions,D.constants,D.enums,D.stdInterfaceId===null?void 0:D.stdInterfaceId)}static fromCompileResult(D){return new V(D.version,D.name,D.bytecode,D.bytecodeDebugPatch,D.codeHash,D.codeHashDebug,D.fields,D.events,D.functions,D.constants,D.enums,D.stdInterfaceId)}static async fromArtifactFile(D,H,F){const B=await s.promises.readFile(D),U=JSON.parse(B.toString());return V.fromJson(U,H,F)}toString(){const D={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(D.stdInterfaceId=this.stdInterfaceId),JSON.stringify(D,null,2)}getInitialFieldsWithDefaultValues(){const D=this.stdInterfaceId===void 0?this.fieldsSig:{names:this.fieldsSig.names.slice(0,-1),types:this.fieldsSig.types.slice(0,-1),isMutable:this.fieldsSig.isMutable.slice(0,-1)};return D.names.reduce((H,F,B)=>(H[`${F}`]=(0,c.getDefaultValue)(D.types[`${B}`]),H),{})}toState(D,H,F){const B=typeof F<"u"?F:V.randomAddress();return{address:B,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(B)),bytecode:this.bytecode,codeHash:this.codeHash,fields:D,fieldsSig:this.fieldsSig,asset:H}}static randomAddress(){const D=new Uint8Array(33);return T.getRandomValues(D),D[0]=3,u.bs58.encode(D)}printDebugMessages(D,H){H.length!=0&&(console.log(`Testing ${this.name}.${D}:`),H.forEach(F=>console.log(`> Contract @ ${F.contractAddress} - ${F.message}`)))}toApiFields(D){return typeof D>"u"?[]:S(D,this.fieldsSig)}toApiArgs(D,H){if(H){const F=this.functions.find(B=>B.name==D);if(F==null)throw new Error(`Invalid function name: ${D}`);return k(H,F)}else return[]}getMethodIndex(D){return this.functions.findIndex(H=>H.name===D)}toApiContractStates(D){return typeof D<"u"?D.map(H=>v(H)):void 0}toApiTestContractParams(D,H){const F=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!1),B=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!0);return{group:H.group,blockHash:H.blockHash,blockTimeStamp:H.blockTimeStamp,txId:H.txId,address:H.address,callerAddress:H.callerAddress,bytecode:this.bytecodeDebug,initialImmFields:F,initialMutFields:B,initialAsset:typeof H.initialAsset<"u"?y(H.initialAsset):void 0,methodIndex:this.getMethodIndex(D),args:this.toApiArgs(D,H.testArgs),existingContracts:this.toApiContractStates(H.existingContracts),inputAssets:g(H.inputAssets)}}fromApiContractState(D){return{address:D.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(D.address)),bytecode:D.bytecode,initialStateHash:D.initialStateHash,codeHash:D.codeHash,fields:q(D.immFields,D.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:f(D.asset)}}static fromApiContractState(D,H){return(H?H(D.codeHash):b.currentProject.contractByCodeHash(D.codeHash)).fromApiContractState(D)}static fromApiEvent(D,H,F,B){let U,J;if(D.eventIndex==V.ContractCreatedEventIndex)U=le(_(D.fields,V.ContractCreatedEvent,!0)),J=V.ContractCreatedEvent.name;else if(D.eventIndex==V.ContractDestroyedEventIndex)U=_(D.fields,V.ContractDestroyedEvent,!0),J=V.ContractDestroyedEvent.name;else{const oe=(B?B(H):b.currentProject.contractByCodeHash(H)).eventsSig[D.eventIndex];U=_(D.fields,oe),J=oe.name}return{txId:F,blockHash:D.blockHash,contractAddress:D.contractAddress,name:J,eventIndex:D.eventIndex,fields:U}}fromApiTestContractResult(D,H,F){const B=this.functions.findIndex(de=>de.name===D),U=this.functions[`${B}`].returnTypes,J=(0,c.fromApiArray)(H.returns,U),ne=J.length===0?null:J.length===1?J[0]:J,oe=new Map;return oe.set(H.address,H.codeHash),H.contracts.forEach(de=>oe.set(de.address,de.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(H.address)),contractAddress:H.address,returns:ne,gasUsed:H.gasUsed,contracts:H.contracts.map(de=>V.fromApiContractState(de)),txOutputs:H.txOutputs.map(M),events:V.fromApiEvents(H.events,oe,F),debugMessages:H.debugMessages}}async txParamsForDeployment(D,H){const F=await this.isDevnet(D),B=H.initialFields??{},U=this.buildByteCodeToDeploy(ye(this,B),F),J=await D.getSelectedAccount();return{signerAddress:J.address,signerKeyType:J.keyType,bytecode:U,initialAttoAlphAmount:H==null?void 0:H.initialAttoAlphAmount,issueTokenAmount:H==null?void 0:H.issueTokenAmount,initialTokenAmounts:H==null?void 0:H.initialTokenAmounts,gasAmount:H==null?void 0:H.gasAmount,gasPrice:H==null?void 0:H.gasPrice}}buildByteCodeToDeploy(D,H){try{return l.buildContractByteCode(H?this.bytecodeDebug:this.bytecode,D,this.fieldsSig)}catch(F){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${F}`)}}static fromApiEvents(D,H,F,B){return D.map(U=>{const J=U.contractAddress,ne=H.get(J);if(typeof ne<"u"||U.eventIndex<0)return V.fromApiEvent(U,ne,F,B);throw Error(`Cannot find codeHash for the contract address: ${J}`)})}toApiCallContract(D,H,F,B){const U=this.functions[`${B}`],J=E(D.args??{},U.paramNames,U.paramTypes);return{...D,group:H,address:F,methodIndex:B,args:J}}fromApiCallContractResult(D,H,F,B){const U=this.functions[`${F}`].returnTypes,J=je(D),ne=(0,c.fromApiArray)(J.returns,U),oe=ne.length===0?null:ne.length===1?ne[0]:ne,de=new Map;return J.contracts.forEach(Te=>de.set(Te.address,Te.codeHash)),{returns:oe,gasUsed:J.gasUsed,contracts:J.contracts.map(Te=>V.fromApiContractState(Te,B)),txInputs:J.txInputs,txOutputs:J.txOutputs.map(Te=>M(Te)),events:V.fromApiEvents(J.events,de,H,B),debugMessages:J.debugMessages}}}e.Contract=V,V.ContractCreatedEventIndex=-1,V.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},V.ContractDestroyedEventIndex=-2,V.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class Z extends N{constructor(D,H,F,B,U,J){super(D,H,J),this.bytecodeTemplate=F,this.bytecodeDebugPatch=B,this.fieldsSig=U}static fromCompileResult(D){return new Z(D.version,D.name,D.bytecodeTemplate,D.bytecodeDebugPatch,D.fields,D.functions)}static fromJson(D,H=""){if(D.version==null||D.name==null||D.bytecodeTemplate==null||D.fieldsSig==null||D.functions==null)throw Error("The artifact JSON for script is incomplete");return new Z(D.version,D.name,D.bytecodeTemplate,H,D.fieldsSig,D.functions)}static async fromArtifactFile(D,H){const F=await s.promises.readFile(D),B=JSON.parse(F.toString());return this.fromJson(B,H)}toString(){const D={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(D,null,2)}async txParamsForExecution(D,H){const F=await D.getSelectedAccount();return{signerAddress:F.address,signerKeyType:F.keyType,bytecode:this.buildByteCodeToDeploy(H.initialFields??{}),attoAlphAmount:H.attoAlphAmount,tokens:H.tokens,gasAmount:H.gasAmount,gasPrice:H.gasPrice}}buildByteCodeToDeploy(D){try{return l.buildScriptByteCode(this.bytecodeTemplate,D,this.fieldsSig)}catch(H){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${H}`)}}}e.Script=Z;function q(X,D,H){const F=[];let B=0,U=0;return H.types.flatMap((ne,oe)=>Array((0,c.typeLength)(ne)).fill(H.isMutable[`${oe}`])).forEach(ne=>{ne?(F.push(D[`${U}`]),U+=1):(F.push(X[`${B}`]),B+=1)}),(0,c.fromApiVals)(F,H.names,H.types)}function _(X,D,H=!1){return(0,c.fromApiVals)(X,D.fieldNames,D.fieldTypes,H)}function y(X){return{attoAlphAmount:(0,c.toApiNumber256)(X.alphAmount),tokens:typeof X.tokens<"u"?X.tokens.map(c.toApiToken):[]}}function f(X){return{alphAmount:(0,c.fromApiNumber256)(X.attoAlphAmount),tokens:(0,c.fromApiTokens)(X.tokens)}}function h(X,D){if(D in X)return X[`${D}`];throw Error(`No Val exists for ${D}`)}function x(X,D,H){const F=D.names.map((J,ne)=>ne).filter(J=>D.isMutable[`${J}`]===H),B=F.map(J=>D.names[`${J}`]),U=F.map(J=>D.types[`${J}`]);return E(X,B,U)}function v(X){const D=X.fields??{};return{address:X.address,bytecode:X.bytecode,codeHash:X.codeHash,initialStateHash:X.initialStateHash,immFields:x(D,X.fieldsSig,!1),mutFields:x(D,X.fieldsSig,!0),asset:y(X.asset)}}function S(X,D){return E(X,D.names,D.types)}function k(X,D){return E(X,D.paramNames,D.paramTypes)}function E(X,D,H){return D.map((F,B)=>{const U=h(X,F),J=H[`${B}`];return(0,c.toApiVal)(U,J)})}e.toApiVals=E;function C(X){return{address:X.address,asset:y(X.asset)}}function g(X){return typeof X<"u"?X.map(C):void 0}function M(X){if(X.type==="AssetOutput"){const D=X;return{type:"AssetOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens),lockTime:D.lockTime,message:D.message}}else if(X.type==="ContractOutput"){const D=X;return{type:"ContractOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens)}}else throw new Error(`Unknown output type: ${X}`)}function re(){const X=new Uint8Array(32);return T.getRandomValues(X),(0,u.binToHex)(X)}e.randomTxId=re,u.assertType;class W{constructor(D){this.contract=D}async deploy(D,H){const F=await this.contract.txParamsForDeployment(D,{...H,initialFields:ye(this.contract,H.initialFields)}),B=await D.signAndSubmitDeployContractTx(F);return{...B,contractInstance:this.at(B.contractAddress)}}stateForTest(D,H,F){const B={alphAmount:(H==null?void 0:H.alphAmount)??w.ONE_ALPH,tokens:H==null?void 0:H.tokens};return this.contract.toState(ye(this.contract,D),B,F)}}e.ContractFactory=W;class ee{constructor(D){this.script=D}async execute(D,H){const F=await this.script.txParamsForExecution(D,H);return await D.signAndSubmitExecuteScriptTx(F)}}e.ExecutableScript=ee;function ce(X){const D=new Uint8Array(32).fill(0);return D[31]=X,(0,u.addressFromContractId)((0,u.binToHex)(D))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function ie(X,D,H){if(X.eventIndex!==H)throw new Error(`Invalid event index: ${X.eventIndex}, expected: ${H}`);return _(X.fields,D,!0)}function le(X){const D=X.parentAddress,H=X.stdInterfaceId;return{address:X.address,parentAddress:D===""?void 0:D,stdInterfaceIdGuessed:H===""?void 0:H}}function L(X){const D=ie(X,V.ContractCreatedEvent,V.ContractCreatedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractCreatedEvent.name,fields:le(D)}}e.decodeContractCreatedEvent=L;function te(X){const D=ie(X,V.ContractDestroyedEvent,V.ContractDestroyedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractDestroyedEvent.name,fields:{address:D.address}}}e.decodeContractDestroyedEvent=te;function ae(X,D,H,F,B){const U=oe=>oe.eventIndex!==H?Promise.resolve():X.messageCallback(F(oe)),J=(oe,de)=>X.errorCallback(oe,de),ne={pollingInterval:X.pollingInterval,messageCallback:U,errorCallback:J,onEventCountChanged:X.onEventCountChanged};return(0,m.subscribeToEvents)(ne,D,B)}e.subscribeEventsFromContract=ae;function ye(X,D){const H="414c5048";return X.stdInterfaceId===void 0?D:{...D,__stdInterfaceId:H+X.stdInterfaceId}}e.addStdIdToFields=ye;async function ve(X,D,H){const F=(H==null?void 0:H.txId)??re(),B=H.initialFields===void 0?{}:H.initialFields,U=X.contract.toApiTestContractParams(D,{...H,txId:F,initialFields:ye(X.contract,B),testArgs:H.testArgs===void 0?{}:H.testArgs}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsTestContract(U),ne=X.contract.fromApiTestContractResult(D,J,F);return X.contract.printDebugMessages(D,ne.debugMessages),ne}e.testMethod=ve;class me{constructor(D){this.address=D,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(D)),this.groupIndex=(0,u.groupOfAddress)(D)}}e.ContractInstance=me;async function Pe(X,D){const H=await(0,d.getCurrentNodeProvider)().contracts.getContractsAddressState(D.address,{group:D.groupIndex}),F=X.contract.fromApiContractState(H);return{...F,fields:F.fields}}e.fetchContractState=Pe;function he(X,D){return ae(X,e.CreateContractEventAddress,V.ContractCreatedEventIndex,H=>({...L(H),contractAddress:e.CreateContractEventAddress}),D)}e.subscribeContractCreatedEvent=he;function be(X,D){return ae(X,e.DestroyContractEventAddress,V.ContractDestroyedEventIndex,H=>({...te(H),contractAddress:e.DestroyContractEventAddress}),D)}e.subscribeContractDestroyedEvent=be;function Ie(X,D,H,F){if(H.eventIndex!==F&&!(F>=0&&FJ.name===F);return ae(H,D.address,U,J=>Ie(X,D,J,U),B)}e.subscribeContractEvent=we;function Oe(X,D,H,F){const B=ne=>H.messageCallback({...Ie(X,D,ne,ne.eventIndex),contractAddress:D.address}),U=(ne,oe)=>H.errorCallback(ne,oe),J={pollingInterval:H.pollingInterval,messageCallback:B,errorCallback:U,onEventCountChanged:H.onEventCountChanged};return(0,m.subscribeToEvents)(J,D.address,F)}e.subscribeContractEvents=Oe;async function Be(X,D,H,F,B){const U=X.contract.getMethodIndex(H),J=(F==null?void 0:F.txId)??re(),ne=X.contract.toApiCallContract({...F,txId:J,args:F.args===void 0?{}:F.args},D.groupIndex,D.address,U),oe=await(0,d.getCurrentNodeProvider)().contracts.postContractsCallContract(ne),de=X.contract.fromApiCallContractResult(oe,J,U,B);return X.contract.printDebugMessages(H,de.debugMessages),de}e.callMethod=Be;async function ke(X,D,H,F){const B=Object.entries(H),U=B.map(oe=>{const[de,Te]=oe,$e=X.contract.getMethodIndex(de),De=(Te==null?void 0:Te.txId)??re();return X.contract.toApiCallContract({...Te,txId:De,args:Te.args===void 0?{}:Te.args},D.groupIndex,D.address,$e)}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:U}),ne={};return U.forEach((oe,de)=>{const Te=oe.methodIndex,$e=J.results[`${Te}`],De=B[`${de}`][0];ne[`${De}`]=X.contract.fromApiCallContractResult($e,oe.txId,Te,F)}),ne}e.multicallMethods=ke;async function Me(X){return(0,d.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(X).catch(D=>{if(D instanceof Error&&D.message.includes(`${X} not found`))return 0;throw D})}e.getContractEventsCurrentCount=Me;const Ue=async(X,D)=>{const H=await X.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:D}),F=H.unsignedTx.fixedOutputs.length,B=H.unsignedTx.txId+F.toString(16).padStart(8,"0");return(0,u.binToHex)(A.blake2b((0,u.hexToBinUnsafe)(B),void 0,32)).slice(0,62)+H.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=Ue,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function je(X){if(X.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${X.error}`);return X}e.tryGetCallResult=je}(I3)),I3}var kR;function Cee(){return kR||(kR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(xee(),e),r(lFe(),e),r(Eee(),e)}(O3)),O3}var $R;function uFe(){if($R)return Nh;$R=1,Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.NodeProvider=void 0;const e=tP(),t=rP,r=Cee(),n=$o();function o(a,s,c){const l=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:c??((...u)=>fetch(...u))});return l.setSecurityData(s??null),l}class i{constructor(s,c,l){this.request=d=>(0,e.request)(this,d),this.fetchFungibleTokenMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1,2,3],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{symbol:T[0].returns[0].value,name:T[1].returns[0].value,decimals:Number(T[2].returns[0].value),totalSupply:BigInt(T[3].returns[0].value)}},this.fetchNFTMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],P=>({methodIndex:P,group:m,address:p})),A=await this.contracts.postContractsMulticallContract({calls:w}),T=(0,n.hexToString)((0,r.tryGetCallResult)(A.results[0]).returns[0].value);if(A.results[1].type==="CallContractSucceeded"){const P=A.results[1];if(P.returns[0]===void 0)throw new Error("Deprecated NFT contract");const R=P.returns[0].value;if(R===void 0||!(0,n.isHexString)(R)||R.length!==64)throw new Error("Deprecated NFT contract");const j=P.returns[1];if(j===void 0)throw new Error("Deprecated NFT contract");const I=(0,n.toNonNegativeBigInt)(j.value);if(I===void 0)throw new Error("Deprecated NFT contract");if(P.returns[2]!==void 0)throw new Error("Deprecated NFT contract");return{tokenUri:T,collectionId:R,nftIndex:I}}else{const P=A.results[1];throw P.error.startsWith("VM execution error: InvalidMethodIndex")?new Error("Deprecated NFT contract"):new Error(`Failed to call contract, error: ${P.error}`)}},this.fetchNFTCollectionMetaData=async d=>{const p=(0,n.addressFromContractId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{collectionUri:(0,n.hexToString)(T[0].returns[0].value),totalSupply:BigInt(T[1].returns[0].value)}},this.fetchNFTRoyaltyAmount=async(d,p,m)=>{const w=(0,n.addressFromContractId)(d),A=(0,n.groupOfAddress)(w),T=await this.contracts.postContractsCallContract({address:w,group:A,methodIndex:4,args:[{type:"ByteVec",value:p},{type:"U256",value:m.toString()}]}),O=(0,r.tryGetCallResult)(T);return BigInt(O.returns[0].value)},this.guessStdInterfaceId=async d=>{var O;const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),A=(O=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(d),{group:m})).immFields.slice(-1).pop())==null?void 0:O.value,T="414c5048";if(typeof A=="string"&&A.startsWith(T))return A.slice(8)},this.guessFollowsNFTCollectionStd=async d=>{const p=await this.guessStdInterfaceId(d);return!!p&&p.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessFollowsNFTCollectionWithRoyaltyStd=async d=>await this.guessStdInterfaceId(d)===e.StdInterfaceIds.NFTCollectionWithRoyalty,this.guessStdTokenType=async d=>{switch(await this.guessStdInterfaceId(d)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,c,l):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events},(0,e.requestWithLog)(this)}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return Nh.NodeProvider=i,Nh}var Bh={},nP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.MaxSizeAddresses=e.MaxSizeTokens=e.TokenStdInterfaceId=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly",i.Weekly="weekly"}(e.IntervalType||(e.IntervalType={})),function(i){i.Fungible="fungible",i.NonFungible="non-fungible",i.NonStandard="non-standard"}(e.TokenStdInterfaceId||(e.TokenStdInterfaceId={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeTokens||(e.MaxSizeTokens={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeAddresses||(e.MaxSizeAddresses={}));const t=Mc;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,c={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,c={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,c,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,c={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistoryDeprecated:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history-DEPRECATED`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),postTokens:(a,s={})=>this.request({path:"/tokens",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,c={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postTokensFungibleMetadata:(a,s={})=>this.request({path:"/tokens/fungible-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftMetadata:(a,s={})=>this.request({path:"/tokens/nft-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftCollectionMetadata:(a,s={})=>this.request({path:"/tokens/nft-collection-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,c={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,c,l={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse)},this.contracts={getContractsContractAddressParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractAddressSubContracts:(a,s,c={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.market={postMarketPrices:(a,s,c={})=>this.request({path:"/market/prices",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getMarketPricesSymbolCharts:(a,s,c={})=>this.request({path:`/market/prices/${a}/charts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o})(nP);var DR;function fFe(){if(DR)return Bh;DR=1,Object.defineProperty(Bh,"__esModule",{value:!0}),Bh.ExplorerProvider=void 0;const e=tP(),t=nP;function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:c=>c!==null?{headers:{"X-API-KEY":`${c}`}}:{},customFetch:a??((...c)=>fetch(...c))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=l=>(0,e.request)(this,l);let c;typeof i=="string"?c=r(i,a,s):typeof i=="function"?(c=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(c,i)):c=i,this.blocks={...c.blocks},this.transactions={...c.transactions},this.addresses={...c.addresses},this.infos={...c.infos},this.mempool={...c.mempool},this.tokens={...c.tokens},this.charts={...c.charts},this.utils={...c.utils},this.contracts={...c.contracts},this.market={...c.market},this.contractEvents={...c.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return Bh.ExplorerProvider=n,Bh}var RR;function Ld(){return RR||(RR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(i,a,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(a,s);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,c,l)}:function(i,a,s,c){c===void 0&&(c=s),i[c]=a[s]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Ae&&Ae.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Ae&&Ae.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(uFe(),e),n(fFe(),e),e.node=o(rP),e.explorer=o(nP),n(tP(),e),n(Mc,e)}(E3)),E3}var T3={},Yt={},Fh={},NR;function Pee(){if(NR)return Fh;NR=1,Object.defineProperty(Fh,"__esModule",{value:!0}),Fh.TransactionBuilder=void 0;const e=Ud(),t=Ld(),r=$o(),n=Aee();class o{static from(a,s,c){const l=typeof a=="string"?new t.NodeProvider(a,s,c):a;return new class extends o{get nodeProvider(){return l}}}static validatePublicKey(a,s,c){if((0,r.addressFromPublicKey)(s,c)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:c,gasPrice:l,...u}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(c),gasPrice:(0,t.toApiNumber256Optional)(l),...u},p=await this.nodeProvider.transactions.postTransactionsBuild(d);return{...p,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:c,initialTokenAmounts:l,issueTokenAmount:u,gasPrice:d,...p}=a,m={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(c),initialTokenAmounts:(0,t.toApiTokens)(l),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(d),...p},w=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(m),A=e.utils.binToHex(e.utils.contractIdFromAddress(w.contractAddress));return{...w,groupIndex:w.fromGroup,contractId:A,gasPrice:(0,t.fromApiNumber256)(w.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:c,tokens:l,gasPrice:u,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(c),tokens:(0,t.toApiTokens)(l),gasPrice:(0,t.toApiNumber256Optional)(u),...d},m=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(p);return{...m,groupIndex:m.fromGroup,gasPrice:(0,t.fromApiNumber256)(m.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},c=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:c.fromGroup,toGroup:c.toGroup,unsignedTx:a.unsignedTx,txId:c.unsignedTx.txId,gasAmount:c.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(c.unsignedTx.gasPrice)}}}return Fh.TransactionBuilder=o,Fh}var BR;function Aee(){if(BR)return Yt;BR=1;var e=Ae&&Ae.__createBinding||(Object.create?function(I,b,N,V){V===void 0&&(V=N);var Z=Object.getOwnPropertyDescriptor(b,N);(!Z||("get"in Z?!b.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return b[N]}}),Object.defineProperty(I,V,Z)}:function(I,b,N,V){V===void 0&&(V=N),I[V]=b[N]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(I,b){Object.defineProperty(I,"default",{enumerable:!0,value:b})}:function(I,b){I.default=b}),r=Ae&&Ae.__importStar||function(I){if(I&&I.__esModule)return I;var b={};if(I!=null)for(var N in I)N!=="default"&&Object.prototype.hasOwnProperty.call(I,N)&&e(b,I,N);return t(b,I),b},n=Ae&&Ae.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.fromApiDestination=Yt.toApiDestinations=Yt.toApiDestination=Yt.verifySignedMessage=Yt.hashMessage=Yt.extendMessage=Yt.SignerProviderWithCachedAccounts=Yt.SignerProviderWithMultipleAccounts=Yt.SignerProviderSimple=Yt.InteractiveSignerProvider=Yt.SignerProvider=void 0;const o=jn,i=Er,a=Ld(),s=r($o()),c=n(qi),l=Pee(),u=$o();class d{async getSelectedAccount(){const b=await this.unsafeGetSelectedAccount();return d.validateAccount(b),b}static validateAccount(b){const N=(0,u.addressFromPublicKey)(b.publicKey,b.keyType),V=(0,u.groupOfAddress)(N);if(N!==b.address||V!==b.group)throw Error(`Invalid accounot data: ${JSON.stringify(b)}`)}}Yt.SignerProvider=d;class p extends d{async enable(b){const N=await this.unsafeEnable(b);return d.validateAccount(N),N}}Yt.InteractiveSignerProvider=p;class m extends d{async submitTransaction(b){const N={unsignedTx:b.unsignedTx,signature:b.signature};return this.nodeProvider.transactions.postTransactionsSubmit(N)}async signAndSubmitTransferTx(b){const N=await this.signTransferTx(b);return await this.submitTransaction(N),N}async signAndSubmitDeployContractTx(b){const N=await this.signDeployContractTx(b);return await this.submitTransaction(N),N}async signAndSubmitExecuteScriptTx(b){const N=await this.signExecuteScriptTx(b);return await this.submitTransaction(N),N}async signAndSubmitUnsignedTx(b){const N=await this.signUnsignedTx(b);return await this.submitTransaction(N),N}async usePublicKey(b){const{signerAddress:N,...V}=b;return{fromPublicKey:await this.getPublicKey(N),...V}}async signTransferTx(b){const N=await this.buildTransferTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildTransferTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildTransferTx(b,await this.getPublicKey(b.signerAddress))}async signDeployContractTx(b){const N=await this.buildDeployContractTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildDeployContractTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(b,await this.getPublicKey(b.signerAddress))}async signExecuteScriptTx(b){const N=await this.buildExecuteScriptTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildExecuteScriptTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(b,await this.getPublicKey(b.signerAddress))}async signUnsignedTx(b){const N=await l.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async signMessage(b){const N=O(b.message,b.messageHasher);return{signature:await this.signRaw(b.signerAddress,N)}}}Yt.SignerProviderSimple=m;class w extends m{async getAccount(b){const V=(await this.getAccounts()).find(Z=>Z.address===b);if(typeof V>"u")throw new Error("Unmatched signerAddress");return V}async getPublicKey(b){return(await this.getAccount(b)).publicKey}}Yt.SignerProviderWithMultipleAccounts=w;class A extends w{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=N,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return Promise.resolve(N)}}Yt.SignerProviderWithCachedAccounts=A;function T(I){return"Alephium Signed Message: "+I}Yt.extendMessage=T;function O(I,b){switch(b){case"alephium":return s.binToHex(c.default.blake2b(T(I),void 0,32));case"sha256":const N=(0,i.createHash)("sha256");return N.update(o.Buffer.from(I)),s.binToHex(N.digest());case"blake2b":return s.binToHex(c.default.blake2b(I,void 0,32));case"identity":return I;default:throw Error(`Invalid message hasher: ${b}`)}}Yt.hashMessage=O;function P(I,b,N,V,Z){const q=O(I,b);return s.verifySignature(q,N,V,Z)}Yt.verifySignedMessage=P;function $(I){return{...I,attoAlphAmount:(0,a.toApiNumber256)(I.attoAlphAmount),tokens:(0,a.toApiTokens)(I.tokens)}}Yt.toApiDestination=$;function R(I){return I.map($)}Yt.toApiDestinations=R;function j(I){return{...I,attoAlphAmount:(0,a.fromApiNumber256)(I.attoAlphAmount),tokens:(0,a.fromApiTokens)(I.tokens)}}return Yt.fromApiDestination=j,Yt}var M3={},FR;function dFe(){if(FR)return M3;FR=1,Object.defineProperty(M3,"__esModule",{value:!0});const e=$o();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),M3}var jR;function hFe(){return jR||(jR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Aee(),e),r(dFe(),e),r(Pee(),e)}(T3)),T3}var k3={},dl={},LR;function pFe(){if(LR)return dl;LR=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.subscribeToTxStatus=dl.TxStatusSubscription=void 0;const e=Ud(),t=$o();class r extends t.Subscription{constructor(i,a,s,c,l){super(i),this.txId=a,this.fromGroup=s,this.toGroup=c,this.confirmations=l??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}dl.TxStatusSubscription=r;function n(o,i,a,s,c){return new r(o,i,a,s,c)}return dl.subscribeToTxStatus=n,dl}var hl={},UR;function gFe(){if(UR)return hl;UR=1;var e=Ae&&Ae.__createBinding||(Object.create?function(a,s,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(s,c);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,l,u)}:function(a,s,c,l){l===void 0&&(l=c),a[l]=s[c]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Ae&&Ae.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var c in a)c!=="default"&&Object.prototype.hasOwnProperty.call(a,c)&&e(s,a,c);return t(s,a),s};Object.defineProperty(hl,"__esModule",{value:!0}),hl.transactionVerifySignature=hl.transactionSign=void 0;const n=r($o());function o(a,s,c){return n.sign(a,s,c)}hl.transactionSign=o;function i(a,s,c,l){return n.verifySignature(a,s,c,l)}return hl.transactionVerifySignature=i,hl}var HR;function mFe(){return HR||(HR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(pFe(),e),r(gFe(),e)}(k3)),k3}var Oee={},Iee={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(A=>{if(!e.validNFTTokenUriMetaDataFields.includes(A))throw new Error(`Invalid field ${A}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=a(u,"description"),m=i(u,"image"),w=o(u.attributes);return{name:d,description:p,image:m,attributes:w}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(w=>{if(!e.validNFTCollectionUriMetaDataFields.includes(w))throw new Error(`Invalid field ${w}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=i(u,"description"),m=i(u,"image");return{name:d,description:p,image:m}}e.validateNFTCollectionUriMetaData=r;async function n(u,d){if(l(d)&&d>0){const p=[];for(let m=0;m{if(typeof d!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(d).forEach(p=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(p))throw new Error(`Invalid field ${p} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(d,"trait_type"),s(d,"value")})}return u}function i(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function a(u,d){const p=u[`${d}`];if(p!==void 0&&!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function s(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return p}async function c(u,d){try{return await(await fetch(`${u}${d}`)).json()}catch(p){throw new Error(`Error fetching NFT metadata from ${u}${d}: ${p}`)}}function l(u){return u===parseInt(u.toString(),10)}})(Iee);(function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Iee,e)})(Oee);var zR;function Ud(){return zR||(zR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(i,a,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(a,s);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,c,l)}:function(i,a,s,c){c===void 0&&(c=s),i[c]=a[s]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Ae&&Ae.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Ae&&Ae.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.web3=void 0,BigInt.prototype.toJSON=function(){return this.toString()},n(Ld(),e),n(Cee(),e),n(hFe(),e),n($o(),e),n(mFe(),e),n(Oee,e),n(lg,e),e.web3=o(See()),e.utils=o($o()),n(ts,e)}(S3)),S3}var oP;Object.defineProperty(Si,"__esModule",{value:!0});var vFe=Ud();let yFe=class extends vFe.InteractiveSignerProvider{constructor(){super(...arguments),this.enableIfConnected=async t=>{if(await this.isPreauthorized(t))return await super.enable(t)}}};function Tee(e){return`alephiumProviders/${e}#initialized`}const zS={id:"alephium",name:"Alephium",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgd2lkdGg9IjEwMCUiCiAgIGhlaWdodD0iMTAwJSIKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyIKICAgaWQ9InN2Zzk4ODQiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnMKICAgaWQ9ImRlZnMxMCIgLz4KICAgIDxnCiAgIGlkPSJnMTAwNyI+PHJlY3QKICAgICB4PSIwIgogICAgIHk9IjAiCiAgICAgd2lkdGg9IjUxMi4wMDA2MSIKICAgICBoZWlnaHQ9IjUxMS45OTk5MSIKICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZS13aWR0aDowLjM1NTU1NiIKICAgICBpZD0icmVjdDk4NjUiIC8+PHBhdGgKICAgICBkPSJtIDIyMi44MjMyLDMwOS43OTQxMSBjIDAsLTQuMzYxMjQgLTMuNDQ2NzgsLTcuMjk4MzIgLTcuNzA0NTgsLTYuNTQ3NjYgbCAtNTAuODkwNzksOC45NzIwOSBjIC00LjI1Nzc5LDAuNzUwNjUgLTcuNzA0NTgsNC45MDMwOCAtNy43MDQ1OCw5LjI2NDMxIHYgOTYuMjM1OTggYyAwLDQuMzcxMTkgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MSBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY1IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NjciIC8+PHBhdGgKICAgICBkPSJtIDM1NS4zODYyLDk0LjMwNTMwNCBjIDAsLTQuMzYxMjM3IC0zLjQ0Njc4LC03LjI5ODMxNSAtNy43MDQ1OCwtNi41NDc2NjIgbCAtNTAuODkwNzksOC45NzIwOTUgYyAtNC4yNTc3OSwwLjc1MDY1MyAtNy43MDQ1OCw0LjkwMzA3MyAtNy43MDQ1OCw5LjI2NDMxMyB2IDk2LjIzNTk3IGMgMCw0LjM3MTIgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MiBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY2IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiNmZjVkNTE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NzEiIC8+PHBhdGgKICAgICBkPSJtIDIzMS4wODk3OSwxMTYuNzY3NDEgYyAtMS45NjU1NSwtNC4zMjkwNSAtNy4yNDkxNiwtNy4xODEyNiAtMTEuODExMDgsLTYuMzc2OTkgbCAtNTQuNTI1NzgsOS42MTI5NiBjIC00LjU2MTkyLDAuODA0MjcgLTYuNjY0MjgsNC45NTg2MyAtNC42OTg3Miw5LjI4NzY4IGwgMTIwLjczOTcxLDI2NS45MjQxMiBjIDEuOTY1NTYsNC4zMjkwNiA3LjI2MDUzLDcuMjA2MjggMTEuODIyNDQsNi40MDIwMSBsIDU0LjUyNTc5LC05LjYxMjk1IGMgNC41NjE5MiwtMC44MDQyNyA2LjY1MjkxLC00Ljk4MzY1IDQuNjg3MzYsLTkuMzEyNzEgeiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjcxMzM0IgogICAgIGlkPSJwYXRoOTg3NSIgLz48L2c+Cjwvc3ZnPgo=",downloads:{chrome:"https://chrome.google.com/webstore/detail/alephium-extension-wallet",firefox:"https://addons.mozilla.org/en-US/firefox/addon/alephium-extension-wallet"}},VR=[zS];function Mee(e,t){return e.id===t.id&&e.name===t.name}function $3(e){return new Promise(t=>{const r=()=>{const n=kee(e.id);n&&Mee(n,e)&&t(n)};window.addEventListener(Tee(e.id),r),r(),setTimeout(()=>t(void 0),5e3)})}function kee(e){try{const t=window.alephiumProviders;if(!t)return;const r=t[e];return $ee(r)?r:void 0}catch{}}function $ee(e){try{return e&&["id","name","icon","unsafeEnable","isPreauthorized","nodeProvider","explorerProvider","signAndSubmitTransferTx","signAndSubmitDeployContractTx","signAndSubmitExecuteScriptTx","signAndSubmitUnsignedTx","signUnsignedTx","signMessage"].every(t=>t in e)}catch{}return!1}Si.AlephiumWindowObject=yFe,Si.alephiumProvider=zS,Si.checkProviderMetadata=Mee,oP=Si.getDefaultAlephiumWallet=function(){return $3(zS)},Si.getKnownWallet=$3,Si.getWalletObject=kee,Si.isWalletObj=$ee,Si.knownProviders=VR,Si.providerInitializedEvent=Tee,Si.scanKnownWallets=async function(){const e=[];for(const t of VR){const r=await $3(t);r!==void 0&&e.push(r)}return e};var D3={},R3={},jh={},N3={},fg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_GAS_ALPH_AMOUNT=e.DEFAULT_GAS_ATTOALPH_AMOUNT=e.DEFAULT_GAS_PRICE=e.DEFAULT_GAS_AMOUNT=e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq",e.DEFAULT_GAS_AMOUNT=2e4,e.DEFAULT_GAS_PRICE=10n**11n,e.DEFAULT_GAS_ATTOALPH_AMOUNT=BigInt(e.DEFAULT_GAS_AMOUNT)*e.DEFAULT_GAS_PRICE,e.DEFAULT_GAS_ALPH_AMOUNT=.002})(fg);var rs={};Object.defineProperty(rs,"__esModule",{value:!0});rs.disableDebugMode=rs.enableDebugMode=rs.isDebugModeEnabled=void 0;let iP=!1;function bFe(){return iP}rs.isDebugModeEnabled=bFe;function wFe(){iP=!0}rs.enableDebugMode=wFe;function _Fe(){iP=!1}rs.disableDebugMode=_Fe;var B3={},U2={};Object.defineProperty(U2,"__esModule",{value:!0});U2.WebCrypto=void 0;const xFe=jn,F3=Er,qR=typeof window<"u"&&typeof window.document<"u";class SFe{constructor(){this.subtle=qR?globalThis.crypto.subtle:F3.webcrypto?F3.webcrypto.subtle:crypto.subtle}getRandomValues(t){if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const r=xFe.Buffer.from(t.buffer,t.byteOffset,t.byteLength);return qR?globalThis.crypto.getRandomValues(r):(0,F3.randomFillSync)(r),t}}U2.WebCrypto=SFe;var H2={},z2={};(function(e){var t=Ae&&Ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(w8),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58})(z2);var dg={};Object.defineProperty(dg,"__esModule",{value:!0});function EFe(e){let t=5381;for(let r=0;r>24,r=e>>16,n=e>>8;return t^r^n^e}function IFe(e){return e&255}var Ree={},aP={exports:{}};aP.exports;(function(e){(function(t,r){function n(y,f){if(!y)throw new Error(f||"Assertion failed")}function o(y,f){y.super_=f;var h=function(){};h.prototype=f.prototype,y.prototype=new h,y.prototype.constructor=y}function i(y,f,h){if(i.isBN(y))return y;this.negative=0,this.words=null,this.length=0,this.red=null,y!==null&&((f==="le"||f==="be")&&(h=f,f=10),this._init(y||0,f||10,h||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ng.Buffer}catch{}i.isBN=function(f){return f instanceof i?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===i.wordSize&&Array.isArray(f.words)},i.max=function(f,h){return f.cmp(h)>0?f:h},i.min=function(f,h){return f.cmp(h)<0?f:h},i.prototype._init=function(f,h,x){if(typeof f=="number")return this._initNumber(f,h,x);if(typeof f=="object")return this._initArray(f,h,x);h==="hex"&&(h=16),n(h===(h|0)&&h>=2&&h<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&(v++,this.negative=1),v=0;v-=3)k=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[S]|=k<>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);else if(x==="le")for(v=0,S=0;v>>26-E&67108863,E+=24,E>=26&&(E-=26,S++);return this._strip()};function s(y,f){var h=y.charCodeAt(f);if(h>=48&&h<=57)return h-48;if(h>=65&&h<=70)return h-55;if(h>=97&&h<=102)return h-87;n(!1,"Invalid character in "+y)}function c(y,f,h){var x=s(y,h);return h-1>=f&&(x|=s(y,h-1)<<4),x}i.prototype._parseHex=function(f,h,x){this.length=Math.ceil((f.length-h)/6),this.words=new Array(this.length);for(var v=0;v=h;v-=2)E=c(f,h,v)<=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8;else{var C=f.length-h;for(v=C%2===0?h+1:h;v=18?(S-=18,k+=1,this.words[k]|=E>>>26):S+=8}this._strip()};function l(y,f,h,x){for(var v=0,S=0,k=Math.min(y.length,h),E=f;E=49?S=C-49+10:C>=17?S=C-17+10:S=C,n(C>=0&&S1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{i.prototype.inspect=d}else i.prototype.inspect=d;function d(){return(this.red?""}var p=["","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"],m=[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],w=[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];i.prototype.toString=function(f,h){f=f||10,h=h|0||1;var x;if(f===16||f==="hex"){x="";for(var v=0,S=0,k=0;k>>24-v&16777215,v+=2,v>=26&&(v-=26,k--),S!==0||k!==this.length-1?x=p[6-C.length]+C+x:x=C+x}for(S!==0&&(x=S.toString(16)+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(f===(f|0)&&f>=2&&f<=36){var g=m[f],M=w[f];x="";var re=this.clone();for(re.negative=0;!re.isZero();){var W=re.modrn(M).toString(f);re=re.idivn(M),re.isZero()?x=W+x:x=p[g-W.length]+W+x}for(this.isZero()&&(x="0"+x);x.length%h!==0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(f,h){return this.toArrayLike(a,f,h)}),i.prototype.toArray=function(f,h){return this.toArrayLike(Array,f,h)};var A=function(f,h){return f.allocUnsafe?f.allocUnsafe(h):new f(h)};i.prototype.toArrayLike=function(f,h,x){this._strip();var v=this.byteLength(),S=x||Math.max(1,v);n(v<=S,"byte array longer than desired length"),n(S>0,"Requested array length <= 0");var k=A(f,S),E=h==="le"?"LE":"BE";return this["_toArrayLike"+E](k,v),k},i.prototype._toArrayLikeLE=function(f,h){for(var x=0,v=0,S=0,k=0;S>8&255),x>16&255),k===6?(x>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x=0&&(f[x--]=E>>8&255),x>=0&&(f[x--]=E>>16&255),k===6?(x>=0&&(f[x--]=E>>24&255),v=0,k=0):(v=E>>>24,k+=2)}if(x>=0)for(f[x--]=v;x>=0;)f[x--]=0},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var h=f,x=0;return h>=4096&&(x+=13,h>>>=13),h>=64&&(x+=7,h>>>=7),h>=8&&(x+=4,h>>>=4),h>=2&&(x+=2,h>>>=2),x+h},i.prototype._zeroBits=function(f){if(f===0)return 26;var h=f,x=0;return h&8191||(x+=13,h>>>=13),h&127||(x+=7,h>>>=7),h&15||(x+=4,h>>>=4),h&3||(x+=2,h>>>=2),h&1||x++,x},i.prototype.bitLength=function(){var f=this.words[this.length-1],h=this._countBits(f);return(this.length-1)*26+h};function T(y){for(var f=new Array(y.bitLength()),h=0;h>>v&1}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,h=0;hf.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var h;this.length>f.length?h=f:h=this;for(var x=0;xf.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var h,x;this.length>f.length?(h=this,x=f):(h=f,x=this);for(var v=0;vf.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){n(typeof f=="number"&&f>=0);var h=Math.ceil(f/26)|0,x=f%26;this._expand(h),x>0&&h--;for(var v=0;v0&&(this.words[v]=~this.words[v]&67108863>>26-x),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,h){n(typeof f=="number"&&f>=0);var x=f/26|0,v=f%26;return this._expand(x+1),h?this.words[x]=this.words[x]|1<f.length?(x=this,v=f):(x=f,v=this);for(var S=0,k=0;k>>26;for(;S!==0&&k>>26;if(this.length=x.length,S!==0)this.words[this.length]=S,this.length++;else if(x!==this)for(;kf.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var h=this.iadd(f);return f.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var x=this.cmp(f);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,S;x>0?(v=this,S=f):(v=f,S=this);for(var k=0,E=0;E>26,this.words[E]=h&67108863;for(;k!==0&&E>26,this.words[E]=h&67108863;if(k===0&&E>>26,re=C&67108863,W=Math.min(g,f.length-1),ee=Math.max(0,g-y.length+1);ee<=W;ee++){var ce=g-ee|0;v=y.words[ce]|0,S=f.words[ee]|0,k=v*S+re,M+=k/67108864|0,re=k&67108863}h.words[g]=re|0,C=M|0}return C!==0?h.words[g]=C|0:h.length--,h._strip()}var P=function(f,h,x){var v=f.words,S=h.words,k=x.words,E=0,C,g,M,re=v[0]|0,W=re&8191,ee=re>>>13,ce=v[1]|0,ie=ce&8191,le=ce>>>13,L=v[2]|0,te=L&8191,ae=L>>>13,ye=v[3]|0,ve=ye&8191,me=ye>>>13,Pe=v[4]|0,he=Pe&8191,be=Pe>>>13,Ie=v[5]|0,we=Ie&8191,Oe=Ie>>>13,Be=v[6]|0,ke=Be&8191,Me=Be>>>13,Ue=v[7]|0,je=Ue&8191,X=Ue>>>13,D=v[8]|0,H=D&8191,F=D>>>13,B=v[9]|0,U=B&8191,J=B>>>13,ne=S[0]|0,oe=ne&8191,de=ne>>>13,Te=S[1]|0,$e=Te&8191,De=Te>>>13,Xe=S[2]|0,ze=Xe&8191,He=Xe>>>13,Ge=S[3]|0,qe=Ge&8191,pe=Ge>>>13,ue=S[4]|0,ge=ue&8191,Q=ue>>>13,K=S[5]|0,Y=K&8191,se=K>>>13,_e=S[6]|0,Se=_e&8191,Ee=_e>>>13,Ve=S[7]|0,Le=Ve&8191,Fe=Ve>>>13,Qe=S[8]|0,Ne=Qe&8191,We=Qe>>>13,mt=S[9]|0,Je=mt&8191,it=mt>>>13;x.negative=f.negative^h.negative,x.length=19,C=Math.imul(W,oe),g=Math.imul(W,de),g=g+Math.imul(ee,oe)|0,M=Math.imul(ee,de);var hr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(hr>>>26)|0,hr&=67108863,C=Math.imul(ie,oe),g=Math.imul(ie,de),g=g+Math.imul(le,oe)|0,M=Math.imul(le,de),C=C+Math.imul(W,$e)|0,g=g+Math.imul(W,De)|0,g=g+Math.imul(ee,$e)|0,M=M+Math.imul(ee,De)|0;var br=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(br>>>26)|0,br&=67108863,C=Math.imul(te,oe),g=Math.imul(te,de),g=g+Math.imul(ae,oe)|0,M=Math.imul(ae,de),C=C+Math.imul(ie,$e)|0,g=g+Math.imul(ie,De)|0,g=g+Math.imul(le,$e)|0,M=M+Math.imul(le,De)|0,C=C+Math.imul(W,ze)|0,g=g+Math.imul(W,He)|0,g=g+Math.imul(ee,ze)|0,M=M+Math.imul(ee,He)|0;var ir=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ir>>>26)|0,ir&=67108863,C=Math.imul(ve,oe),g=Math.imul(ve,de),g=g+Math.imul(me,oe)|0,M=Math.imul(me,de),C=C+Math.imul(te,$e)|0,g=g+Math.imul(te,De)|0,g=g+Math.imul(ae,$e)|0,M=M+Math.imul(ae,De)|0,C=C+Math.imul(ie,ze)|0,g=g+Math.imul(ie,He)|0,g=g+Math.imul(le,ze)|0,M=M+Math.imul(le,He)|0,C=C+Math.imul(W,qe)|0,g=g+Math.imul(W,pe)|0,g=g+Math.imul(ee,qe)|0,M=M+Math.imul(ee,pe)|0;var Fr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Fr>>>26)|0,Fr&=67108863,C=Math.imul(he,oe),g=Math.imul(he,de),g=g+Math.imul(be,oe)|0,M=Math.imul(be,de),C=C+Math.imul(ve,$e)|0,g=g+Math.imul(ve,De)|0,g=g+Math.imul(me,$e)|0,M=M+Math.imul(me,De)|0,C=C+Math.imul(te,ze)|0,g=g+Math.imul(te,He)|0,g=g+Math.imul(ae,ze)|0,M=M+Math.imul(ae,He)|0,C=C+Math.imul(ie,qe)|0,g=g+Math.imul(ie,pe)|0,g=g+Math.imul(le,qe)|0,M=M+Math.imul(le,pe)|0,C=C+Math.imul(W,ge)|0,g=g+Math.imul(W,Q)|0,g=g+Math.imul(ee,ge)|0,M=M+Math.imul(ee,Q)|0;var ar=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ar>>>26)|0,ar&=67108863,C=Math.imul(we,oe),g=Math.imul(we,de),g=g+Math.imul(Oe,oe)|0,M=Math.imul(Oe,de),C=C+Math.imul(he,$e)|0,g=g+Math.imul(he,De)|0,g=g+Math.imul(be,$e)|0,M=M+Math.imul(be,De)|0,C=C+Math.imul(ve,ze)|0,g=g+Math.imul(ve,He)|0,g=g+Math.imul(me,ze)|0,M=M+Math.imul(me,He)|0,C=C+Math.imul(te,qe)|0,g=g+Math.imul(te,pe)|0,g=g+Math.imul(ae,qe)|0,M=M+Math.imul(ae,pe)|0,C=C+Math.imul(ie,ge)|0,g=g+Math.imul(ie,Q)|0,g=g+Math.imul(le,ge)|0,M=M+Math.imul(le,Q)|0,C=C+Math.imul(W,Y)|0,g=g+Math.imul(W,se)|0,g=g+Math.imul(ee,Y)|0,M=M+Math.imul(ee,se)|0;var Jr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,C=Math.imul(ke,oe),g=Math.imul(ke,de),g=g+Math.imul(Me,oe)|0,M=Math.imul(Me,de),C=C+Math.imul(we,$e)|0,g=g+Math.imul(we,De)|0,g=g+Math.imul(Oe,$e)|0,M=M+Math.imul(Oe,De)|0,C=C+Math.imul(he,ze)|0,g=g+Math.imul(he,He)|0,g=g+Math.imul(be,ze)|0,M=M+Math.imul(be,He)|0,C=C+Math.imul(ve,qe)|0,g=g+Math.imul(ve,pe)|0,g=g+Math.imul(me,qe)|0,M=M+Math.imul(me,pe)|0,C=C+Math.imul(te,ge)|0,g=g+Math.imul(te,Q)|0,g=g+Math.imul(ae,ge)|0,M=M+Math.imul(ae,Q)|0,C=C+Math.imul(ie,Y)|0,g=g+Math.imul(ie,se)|0,g=g+Math.imul(le,Y)|0,M=M+Math.imul(le,se)|0,C=C+Math.imul(W,Se)|0,g=g+Math.imul(W,Ee)|0,g=g+Math.imul(ee,Se)|0,M=M+Math.imul(ee,Ee)|0;var Zr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,C=Math.imul(je,oe),g=Math.imul(je,de),g=g+Math.imul(X,oe)|0,M=Math.imul(X,de),C=C+Math.imul(ke,$e)|0,g=g+Math.imul(ke,De)|0,g=g+Math.imul(Me,$e)|0,M=M+Math.imul(Me,De)|0,C=C+Math.imul(we,ze)|0,g=g+Math.imul(we,He)|0,g=g+Math.imul(Oe,ze)|0,M=M+Math.imul(Oe,He)|0,C=C+Math.imul(he,qe)|0,g=g+Math.imul(he,pe)|0,g=g+Math.imul(be,qe)|0,M=M+Math.imul(be,pe)|0,C=C+Math.imul(ve,ge)|0,g=g+Math.imul(ve,Q)|0,g=g+Math.imul(me,ge)|0,M=M+Math.imul(me,Q)|0,C=C+Math.imul(te,Y)|0,g=g+Math.imul(te,se)|0,g=g+Math.imul(ae,Y)|0,M=M+Math.imul(ae,se)|0,C=C+Math.imul(ie,Se)|0,g=g+Math.imul(ie,Ee)|0,g=g+Math.imul(le,Se)|0,M=M+Math.imul(le,Ee)|0,C=C+Math.imul(W,Le)|0,g=g+Math.imul(W,Fe)|0,g=g+Math.imul(ee,Le)|0,M=M+Math.imul(ee,Fe)|0;var Xr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,C=Math.imul(H,oe),g=Math.imul(H,de),g=g+Math.imul(F,oe)|0,M=Math.imul(F,de),C=C+Math.imul(je,$e)|0,g=g+Math.imul(je,De)|0,g=g+Math.imul(X,$e)|0,M=M+Math.imul(X,De)|0,C=C+Math.imul(ke,ze)|0,g=g+Math.imul(ke,He)|0,g=g+Math.imul(Me,ze)|0,M=M+Math.imul(Me,He)|0,C=C+Math.imul(we,qe)|0,g=g+Math.imul(we,pe)|0,g=g+Math.imul(Oe,qe)|0,M=M+Math.imul(Oe,pe)|0,C=C+Math.imul(he,ge)|0,g=g+Math.imul(he,Q)|0,g=g+Math.imul(be,ge)|0,M=M+Math.imul(be,Q)|0,C=C+Math.imul(ve,Y)|0,g=g+Math.imul(ve,se)|0,g=g+Math.imul(me,Y)|0,M=M+Math.imul(me,se)|0,C=C+Math.imul(te,Se)|0,g=g+Math.imul(te,Ee)|0,g=g+Math.imul(ae,Se)|0,M=M+Math.imul(ae,Ee)|0,C=C+Math.imul(ie,Le)|0,g=g+Math.imul(ie,Fe)|0,g=g+Math.imul(le,Le)|0,M=M+Math.imul(le,Fe)|0,C=C+Math.imul(W,Ne)|0,g=g+Math.imul(W,We)|0,g=g+Math.imul(ee,Ne)|0,M=M+Math.imul(ee,We)|0;var Qr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,C=Math.imul(U,oe),g=Math.imul(U,de),g=g+Math.imul(J,oe)|0,M=Math.imul(J,de),C=C+Math.imul(H,$e)|0,g=g+Math.imul(H,De)|0,g=g+Math.imul(F,$e)|0,M=M+Math.imul(F,De)|0,C=C+Math.imul(je,ze)|0,g=g+Math.imul(je,He)|0,g=g+Math.imul(X,ze)|0,M=M+Math.imul(X,He)|0,C=C+Math.imul(ke,qe)|0,g=g+Math.imul(ke,pe)|0,g=g+Math.imul(Me,qe)|0,M=M+Math.imul(Me,pe)|0,C=C+Math.imul(we,ge)|0,g=g+Math.imul(we,Q)|0,g=g+Math.imul(Oe,ge)|0,M=M+Math.imul(Oe,Q)|0,C=C+Math.imul(he,Y)|0,g=g+Math.imul(he,se)|0,g=g+Math.imul(be,Y)|0,M=M+Math.imul(be,se)|0,C=C+Math.imul(ve,Se)|0,g=g+Math.imul(ve,Ee)|0,g=g+Math.imul(me,Se)|0,M=M+Math.imul(me,Ee)|0,C=C+Math.imul(te,Le)|0,g=g+Math.imul(te,Fe)|0,g=g+Math.imul(ae,Le)|0,M=M+Math.imul(ae,Fe)|0,C=C+Math.imul(ie,Ne)|0,g=g+Math.imul(ie,We)|0,g=g+Math.imul(le,Ne)|0,M=M+Math.imul(le,We)|0,C=C+Math.imul(W,Je)|0,g=g+Math.imul(W,it)|0,g=g+Math.imul(ee,Je)|0,M=M+Math.imul(ee,it)|0;var en=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(en>>>26)|0,en&=67108863,C=Math.imul(U,$e),g=Math.imul(U,De),g=g+Math.imul(J,$e)|0,M=Math.imul(J,De),C=C+Math.imul(H,ze)|0,g=g+Math.imul(H,He)|0,g=g+Math.imul(F,ze)|0,M=M+Math.imul(F,He)|0,C=C+Math.imul(je,qe)|0,g=g+Math.imul(je,pe)|0,g=g+Math.imul(X,qe)|0,M=M+Math.imul(X,pe)|0,C=C+Math.imul(ke,ge)|0,g=g+Math.imul(ke,Q)|0,g=g+Math.imul(Me,ge)|0,M=M+Math.imul(Me,Q)|0,C=C+Math.imul(we,Y)|0,g=g+Math.imul(we,se)|0,g=g+Math.imul(Oe,Y)|0,M=M+Math.imul(Oe,se)|0,C=C+Math.imul(he,Se)|0,g=g+Math.imul(he,Ee)|0,g=g+Math.imul(be,Se)|0,M=M+Math.imul(be,Ee)|0,C=C+Math.imul(ve,Le)|0,g=g+Math.imul(ve,Fe)|0,g=g+Math.imul(me,Le)|0,M=M+Math.imul(me,Fe)|0,C=C+Math.imul(te,Ne)|0,g=g+Math.imul(te,We)|0,g=g+Math.imul(ae,Ne)|0,M=M+Math.imul(ae,We)|0,C=C+Math.imul(ie,Je)|0,g=g+Math.imul(ie,it)|0,g=g+Math.imul(le,Je)|0,M=M+Math.imul(le,it)|0;var Pr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(Pr>>>26)|0,Pr&=67108863,C=Math.imul(U,ze),g=Math.imul(U,He),g=g+Math.imul(J,ze)|0,M=Math.imul(J,He),C=C+Math.imul(H,qe)|0,g=g+Math.imul(H,pe)|0,g=g+Math.imul(F,qe)|0,M=M+Math.imul(F,pe)|0,C=C+Math.imul(je,ge)|0,g=g+Math.imul(je,Q)|0,g=g+Math.imul(X,ge)|0,M=M+Math.imul(X,Q)|0,C=C+Math.imul(ke,Y)|0,g=g+Math.imul(ke,se)|0,g=g+Math.imul(Me,Y)|0,M=M+Math.imul(Me,se)|0,C=C+Math.imul(we,Se)|0,g=g+Math.imul(we,Ee)|0,g=g+Math.imul(Oe,Se)|0,M=M+Math.imul(Oe,Ee)|0,C=C+Math.imul(he,Le)|0,g=g+Math.imul(he,Fe)|0,g=g+Math.imul(be,Le)|0,M=M+Math.imul(be,Fe)|0,C=C+Math.imul(ve,Ne)|0,g=g+Math.imul(ve,We)|0,g=g+Math.imul(me,Ne)|0,M=M+Math.imul(me,We)|0,C=C+Math.imul(te,Je)|0,g=g+Math.imul(te,it)|0,g=g+Math.imul(ae,Je)|0,M=M+Math.imul(ae,it)|0;var tn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(tn>>>26)|0,tn&=67108863,C=Math.imul(U,qe),g=Math.imul(U,pe),g=g+Math.imul(J,qe)|0,M=Math.imul(J,pe),C=C+Math.imul(H,ge)|0,g=g+Math.imul(H,Q)|0,g=g+Math.imul(F,ge)|0,M=M+Math.imul(F,Q)|0,C=C+Math.imul(je,Y)|0,g=g+Math.imul(je,se)|0,g=g+Math.imul(X,Y)|0,M=M+Math.imul(X,se)|0,C=C+Math.imul(ke,Se)|0,g=g+Math.imul(ke,Ee)|0,g=g+Math.imul(Me,Se)|0,M=M+Math.imul(Me,Ee)|0,C=C+Math.imul(we,Le)|0,g=g+Math.imul(we,Fe)|0,g=g+Math.imul(Oe,Le)|0,M=M+Math.imul(Oe,Fe)|0,C=C+Math.imul(he,Ne)|0,g=g+Math.imul(he,We)|0,g=g+Math.imul(be,Ne)|0,M=M+Math.imul(be,We)|0,C=C+Math.imul(ve,Je)|0,g=g+Math.imul(ve,it)|0,g=g+Math.imul(me,Je)|0,M=M+Math.imul(me,it)|0;var rn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rn>>>26)|0,rn&=67108863,C=Math.imul(U,ge),g=Math.imul(U,Q),g=g+Math.imul(J,ge)|0,M=Math.imul(J,Q),C=C+Math.imul(H,Y)|0,g=g+Math.imul(H,se)|0,g=g+Math.imul(F,Y)|0,M=M+Math.imul(F,se)|0,C=C+Math.imul(je,Se)|0,g=g+Math.imul(je,Ee)|0,g=g+Math.imul(X,Se)|0,M=M+Math.imul(X,Ee)|0,C=C+Math.imul(ke,Le)|0,g=g+Math.imul(ke,Fe)|0,g=g+Math.imul(Me,Le)|0,M=M+Math.imul(Me,Fe)|0,C=C+Math.imul(we,Ne)|0,g=g+Math.imul(we,We)|0,g=g+Math.imul(Oe,Ne)|0,M=M+Math.imul(Oe,We)|0,C=C+Math.imul(he,Je)|0,g=g+Math.imul(he,it)|0,g=g+Math.imul(be,Je)|0,M=M+Math.imul(be,it)|0;var rr=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(rr>>>26)|0,rr&=67108863,C=Math.imul(U,Y),g=Math.imul(U,se),g=g+Math.imul(J,Y)|0,M=Math.imul(J,se),C=C+Math.imul(H,Se)|0,g=g+Math.imul(H,Ee)|0,g=g+Math.imul(F,Se)|0,M=M+Math.imul(F,Ee)|0,C=C+Math.imul(je,Le)|0,g=g+Math.imul(je,Fe)|0,g=g+Math.imul(X,Le)|0,M=M+Math.imul(X,Fe)|0,C=C+Math.imul(ke,Ne)|0,g=g+Math.imul(ke,We)|0,g=g+Math.imul(Me,Ne)|0,M=M+Math.imul(Me,We)|0,C=C+Math.imul(we,Je)|0,g=g+Math.imul(we,it)|0,g=g+Math.imul(Oe,Je)|0,M=M+Math.imul(Oe,it)|0;var nn=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(nn>>>26)|0,nn&=67108863,C=Math.imul(U,Se),g=Math.imul(U,Ee),g=g+Math.imul(J,Se)|0,M=Math.imul(J,Ee),C=C+Math.imul(H,Le)|0,g=g+Math.imul(H,Fe)|0,g=g+Math.imul(F,Le)|0,M=M+Math.imul(F,Fe)|0,C=C+Math.imul(je,Ne)|0,g=g+Math.imul(je,We)|0,g=g+Math.imul(X,Ne)|0,M=M+Math.imul(X,We)|0,C=C+Math.imul(ke,Je)|0,g=g+Math.imul(ke,it)|0,g=g+Math.imul(Me,Je)|0,M=M+Math.imul(Me,it)|0;var on=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(on>>>26)|0,on&=67108863,C=Math.imul(U,Le),g=Math.imul(U,Fe),g=g+Math.imul(J,Le)|0,M=Math.imul(J,Fe),C=C+Math.imul(H,Ne)|0,g=g+Math.imul(H,We)|0,g=g+Math.imul(F,Ne)|0,M=M+Math.imul(F,We)|0,C=C+Math.imul(je,Je)|0,g=g+Math.imul(je,it)|0,g=g+Math.imul(X,Je)|0,M=M+Math.imul(X,it)|0;var an=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(an>>>26)|0,an&=67108863,C=Math.imul(U,Ne),g=Math.imul(U,We),g=g+Math.imul(J,Ne)|0,M=Math.imul(J,We),C=C+Math.imul(H,Je)|0,g=g+Math.imul(H,it)|0,g=g+Math.imul(F,Je)|0,M=M+Math.imul(F,it)|0;var ho=(E+C|0)+((g&8191)<<13)|0;E=(M+(g>>>13)|0)+(ho>>>26)|0,ho&=67108863,C=Math.imul(U,Je),g=Math.imul(U,it),g=g+Math.imul(J,Je)|0,M=Math.imul(J,it);var po=(E+C|0)+((g&8191)<<13)|0;return E=(M+(g>>>13)|0)+(po>>>26)|0,po&=67108863,k[0]=hr,k[1]=br,k[2]=ir,k[3]=Fr,k[4]=ar,k[5]=Jr,k[6]=Zr,k[7]=Xr,k[8]=Qr,k[9]=en,k[10]=Pr,k[11]=tn,k[12]=rn,k[13]=rr,k[14]=nn,k[15]=on,k[16]=an,k[17]=ho,k[18]=po,E!==0&&(k[19]=E,x.length++),x};Math.imul||(P=O);function $(y,f,h){h.negative=f.negative^y.negative,h.length=y.length+f.length;for(var x=0,v=0,S=0;S>>26)|0,v+=k>>>26,k&=67108863}h.words[S]=E,x=k,k=v}return x!==0?h.words[S]=x:h.length--,h._strip()}function R(y,f,h){return $(y,f,h)}i.prototype.mulTo=function(f,h){var x,v=this.length+f.length;return this.length===10&&f.length===10?x=P(this,f,h):v<63?x=O(this,f,h):v<1024?x=$(this,f,h):x=R(this,f,h),x},i.prototype.mul=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),this.mulTo(f,h)},i.prototype.mulf=function(f){var h=new i(null);return h.words=new Array(this.length+f.length),R(this,f,h)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var h=f<0;h&&(f=-f),n(typeof f=="number"),n(f<67108864);for(var x=0,v=0;v>=26,x+=S/67108864|0,x+=k>>>26,this.words[v]=k&67108863}return x!==0&&(this.words[v]=x,this.length++),h?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var h=T(f);if(h.length===0)return new i(1);for(var x=this,v=0;v=0);var h=f%26,x=(f-h)/26,v=67108863>>>26-h<<26-h,S;if(h!==0){var k=0;for(S=0;S>>26-h}k&&(this.words[S]=k,this.length++)}if(x!==0){for(S=this.length-1;S>=0;S--)this.words[S+x]=this.words[S];for(S=0;S=0);var v;h?v=(h-h%26)/26:v=0;var S=f%26,k=Math.min((f-S)/26,this.length),E=67108863^67108863>>>S<k)for(this.length-=k,g=0;g=0&&(M!==0||g>=v);g--){var re=this.words[g]|0;this.words[g]=M<<26-S|re>>>S,M=re&E}return C&&M!==0&&(C.words[C.length++]=M),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,h,x){return n(this.negative===0),this.iushrn(f,h,x)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){n(typeof f=="number"&&f>=0);var h=f%26,x=(f-h)/26,v=1<=0);var h=f%26,x=(f-h)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(h!==0&&x++,this.length=Math.min(x,this.length),h!==0){var v=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},i.prototype.isubn=function(f){if(n(typeof f=="number"),n(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(C/67108864|0),this.words[S+x]=k&67108863}for(;S>26,this.words[S+x]=k&67108863;if(E===0)return this._strip();for(n(E===-1),E=0,S=0;S>26,this.words[S]=k&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,h){var x=this.length-f.length,v=this.clone(),S=f,k=S.words[S.length-1]|0,E=this._countBits(k);x=26-E,x!==0&&(S=S.ushln(x),v.iushln(x),k=S.words[S.length-1]|0);var C=v.length-S.length,g;if(h!=="mod"){g=new i(null),g.length=C+1,g.words=new Array(g.length);for(var M=0;M=0;W--){var ee=(v.words[S.length+W]|0)*67108864+(v.words[S.length+W-1]|0);for(ee=Math.min(ee/k|0,67108863),v._ishlnsubmul(S,ee,W);v.negative!==0;)ee--,v.negative=0,v._ishlnsubmul(S,1,W),v.isZero()||(v.negative^=1);g&&(g.words[W]=ee)}return g&&g._strip(),v._strip(),h!=="div"&&x!==0&&v.iushrn(x),{div:g||null,mod:v}},i.prototype.divmod=function(f,h,x){if(n(!f.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var v,S,k;return this.negative!==0&&f.negative===0?(k=this.neg().divmod(f,h),h!=="mod"&&(v=k.div.neg()),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.iadd(f)),{div:v,mod:S}):this.negative===0&&f.negative!==0?(k=this.divmod(f.neg(),h),h!=="mod"&&(v=k.div.neg()),{div:v,mod:k.mod}):this.negative&f.negative?(k=this.neg().divmod(f.neg(),h),h!=="div"&&(S=k.mod.neg(),x&&S.negative!==0&&S.isub(f)),{div:k.div,mod:S}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?h==="div"?{div:this.divn(f.words[0]),mod:null}:h==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,h)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var h=this.divmod(f);if(h.mod.isZero())return h.div;var x=h.div.negative!==0?h.mod.isub(f):h.mod,v=f.ushrn(1),S=f.andln(1),k=x.cmp(v);return k<0||S===1&&k===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},i.prototype.modrn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=(1<<26)%f,v=0,S=this.length-1;S>=0;S--)v=(x*v+(this.words[S]|0))%f;return h?-v:v},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var h=f<0;h&&(f=-f),n(f<=67108863);for(var x=0,v=this.length-1;v>=0;v--){var S=(this.words[v]|0)+x*67108864;this.words[v]=S/f|0,x=S%f}return this._strip(),h?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=new i(0),E=new i(1),C=0;h.isEven()&&x.isEven();)h.iushrn(1),x.iushrn(1),++C;for(var g=x.clone(),M=h.clone();!h.isZero();){for(var re=0,W=1;!(h.words[0]&W)&&re<26;++re,W<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(v.isOdd()||S.isOdd())&&(v.iadd(g),S.isub(M)),v.iushrn(1),S.iushrn(1);for(var ee=0,ce=1;!(x.words[0]&ce)&&ee<26;++ee,ce<<=1);if(ee>0)for(x.iushrn(ee);ee-- >0;)(k.isOdd()||E.isOdd())&&(k.iadd(g),E.isub(M)),k.iushrn(1),E.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(k),S.isub(E)):(x.isub(h),k.isub(v),E.isub(S))}return{a:k,b:E,gcd:x.iushln(C)}},i.prototype._invmp=function(f){n(f.negative===0),n(!f.isZero());var h=this,x=f.clone();h.negative!==0?h=h.umod(f):h=h.clone();for(var v=new i(1),S=new i(0),k=x.clone();h.cmpn(1)>0&&x.cmpn(1)>0;){for(var E=0,C=1;!(h.words[0]&C)&&E<26;++E,C<<=1);if(E>0)for(h.iushrn(E);E-- >0;)v.isOdd()&&v.iadd(k),v.iushrn(1);for(var g=0,M=1;!(x.words[0]&M)&&g<26;++g,M<<=1);if(g>0)for(x.iushrn(g);g-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);h.cmp(x)>=0?(h.isub(x),v.isub(S)):(x.isub(h),S.isub(v))}var re;return h.cmpn(1)===0?re=v:re=S,re.cmpn(0)<0&&re.iadd(f),re},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var h=this.clone(),x=f.clone();h.negative=0,x.negative=0;for(var v=0;h.isEven()&&x.isEven();v++)h.iushrn(1),x.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;x.isEven();)x.iushrn(1);var S=h.cmp(x);if(S<0){var k=h;h=x,x=k}else if(S===0||x.cmpn(1)===0)break;h.isub(x)}while(!0);return x.iushln(v)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){n(typeof f=="number");var h=f%26,x=(f-h)/26,v=1<>>26,E&=67108863,this.words[k]=E}return S!==0&&(this.words[k]=S,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var h=f<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this._strip();var x;if(this.length>1)x=1;else{h&&(f=-f),n(f<=67108863,"Number is too big");var v=this.words[0]|0;x=v===f?0:vf.length)return 1;if(this.length=0;x--){var v=this.words[x]|0,S=f.words[x]|0;if(v!==S){vS&&(h=1);break}}return h},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new q(f)},i.prototype.toRed=function(f){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return n(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return n(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var j={k256:null,p224:null,p192:null,p25519:null};function I(y,f){this.name=y,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}I.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},I.prototype.ireduce=function(f){var h=f,x;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),x=h.bitLength();while(x>this.n);var v=x0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},I.prototype.split=function(f,h){f.iushrn(this.n,0,h)},I.prototype.imulK=function(f){return f.imul(this.k)};function b(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,I),b.prototype.split=function(f,h){for(var x=4194303,v=Math.min(f.length,9),S=0;S>>22,k=E}k>>>=22,f.words[S-10]=k,k===0&&f.length>10?f.length-=10:f.length-=9},b.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var h=0,x=0;x>>=26,f.words[x]=S,h=v}return h!==0&&(f.words[f.length++]=h),f},i._prime=function(f){if(j[f])return j[f];var h;if(f==="k256")h=new b;else if(f==="p224")h=new N;else if(f==="p192")h=new V;else if(f==="p25519")h=new Z;else throw new Error("Unknown prime "+f);return j[f]=h,h};function q(y){if(typeof y=="string"){var f=i._prime(y);this.m=f.p,this.prime=f}else n(y.gtn(1),"modulus must be greater than 1"),this.m=y,this.prime=null}q.prototype._verify1=function(f){n(f.negative===0,"red works only with positives"),n(f.red,"red works only with red numbers")},q.prototype._verify2=function(f,h){n((f.negative|h.negative)===0,"red works only with positives"),n(f.red&&f.red===h.red,"red works only with red numbers")},q.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(u(f,f.umod(this.m)._forceRed(this)),f)},q.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},q.prototype.add=function(f,h){this._verify2(f,h);var x=f.add(h);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},q.prototype.iadd=function(f,h){this._verify2(f,h);var x=f.iadd(h);return x.cmp(this.m)>=0&&x.isub(this.m),x},q.prototype.sub=function(f,h){this._verify2(f,h);var x=f.sub(h);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},q.prototype.isub=function(f,h){this._verify2(f,h);var x=f.isub(h);return x.cmpn(0)<0&&x.iadd(this.m),x},q.prototype.shl=function(f,h){return this._verify1(f),this.imod(f.ushln(h))},q.prototype.imul=function(f,h){return this._verify2(f,h),this.imod(f.imul(h))},q.prototype.mul=function(f,h){return this._verify2(f,h),this.imod(f.mul(h))},q.prototype.isqr=function(f){return this.imul(f,f.clone())},q.prototype.sqr=function(f){return this.mul(f,f)},q.prototype.sqrt=function(f){if(f.isZero())return f.clone();var h=this.m.andln(3);if(n(h%2===1),h===3){var x=this.m.add(new i(1)).iushrn(2);return this.pow(f,x)}for(var v=this.m.subn(1),S=0;!v.isZero()&&v.andln(1)===0;)S++,v.iushrn(1);n(!v.isZero());var k=new i(1).toRed(this),E=k.redNeg(),C=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);this.pow(g,C).cmp(E)!==0;)g.redIAdd(E);for(var M=this.pow(g,v),re=this.pow(f,v.addn(1).iushrn(1)),W=this.pow(f,v),ee=S;W.cmp(k)!==0;){for(var ce=W,ie=0;ce.cmp(k)!==0;ie++)ce=ce.redSqr();n(ie=0;S--){for(var M=h.words[S],re=g-1;re>=0;re--){var W=M>>re&1;if(k!==v[0]&&(k=this.sqr(k)),W===0&&E===0){C=0;continue}E<<=1,E|=W,C++,!(C!==x&&(S!==0||re!==0))&&(k=this.mul(k,v[E]),C=0,E=0)}g=26}return k},q.prototype.convertTo=function(f){var h=f.umod(this.m);return h===f?h.clone():h},q.prototype.convertFrom=function(f){var h=f.clone();return h.red=null,h},i.mont=function(f){return new _(f)};function _(y){q.call(this,y),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(_,q),_.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},_.prototype.convertFrom=function(f){var h=this.imod(f.mul(this.rinv));return h.red=null,h},_.prototype.imul=function(f,h){if(f.isZero()||h.isZero())return f.words[0]=0,f.length=1,f;var x=f.imul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.mul=function(f,h){if(f.isZero()||h.isZero())return new i(0)._forceRed(this);var x=f.mul(h),v=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(v).iushrn(this.shift),k=S;return S.cmp(this.m)>=0?k=S.isub(this.m):S.cmpn(0)<0&&(k=S.iadd(this.m)),k._forceRed(this)},_.prototype.invm=function(f){var h=this.imod(f._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(e,Ae)})(aP);var TFe=aP.exports;(function(e){var t=Ae&&Ae.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.assertType=e.isDevnet=e.sleep=e.hexToString=e.stringToHex=e.blockChainIndex=e.subContractId=e.contractIdFromTx=e.addressFromTokenId=e.addressFromContractId=e.addressFromScript=e.addressFromPublicKey=e.publicKeyFromPrivateKey=e.groupOfPrivateKey=e.binToHex=e.hexToBinUnsafe=e.tokenIdFromAddress=e.contractIdFromAddress=e.groupOfAddress=e.AddressType=e.toNonNegativeBigInt=e.isHexString=e.xorByte=e.signatureDecode=e.encodeHexSignature=e.encodeSignature=e.networkIds=void 0;const r=_u,n=t(TFe),o=t(qi),i=t(z2),a=jn,s=fg,c=t(dg);e.networkIds=["mainnet","testnet","devnet"];const l=new r.ec("secp256k1");function u(W){let ee=W.s;l.n&&W.s.cmp(l.nh)===1&&(ee=l.n.sub(W.s));const ce=W.r.toString("hex",66).slice(2),ie=ee.toString("hex",66).slice(2);return ce+ie}e.encodeSignature=u;function d(W,ee){return u({r:new n.default(W,"hex"),s:new n.default(ee,"hex")})}e.encodeHexSignature=d;function p(W,ee){if(ee.length!==128)throw new Error("Invalid signature length");const ce=ee.slice(64,128),ie=new n.default(ce,"hex");if(W.n&&ie.cmp(W.nh)<1)return{r:ee.slice(0,64),s:ce};throw new Error("The signature is not normalized")}e.signatureDecode=p;function m(W){const ee=W>>24&255,ce=W>>16&255,ie=W>>8&255,le=W&255;return(ee^ce^ie^le)&255}e.xorByte=m;function w(W){return W.length%2===0&&/^[0-9a-fA-F]*$/.test(W)}e.isHexString=w;function A(W){try{const ee=BigInt(W);return ee<0n?void 0:ee}catch{return}}e.toNonNegativeBigInt=A;var T;(function(W){W[W.P2PKH=0]="P2PKH",W[W.P2MPKH=1]="P2MPKH",W[W.P2SH=2]="P2SH",W[W.P2C=3]="P2C"})(T=e.AddressType||(e.AddressType={}));function O(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2PKH)return $(ie);if(ce==T.P2MPKH)return R(ie);if(ce==T.P2SH)return j(ie);{const le=I(W);return le[`${le.length-1}`]}}e.groupOfAddress=O;function P(W){const ee=(0,c.default)(W)|1;return m(ee)%s.TOTAL_NUMBER_OF_GROUPS}function $(W){if(W.length!=32)throw new Error(`Invalid p2pkh address length: ${W.length}`);return P(W)}function R(W){if((W.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${W.length}`);return P(W.slice(1,33))}function j(W){return P(W)}function I(W){return N(W)}e.contractIdFromAddress=I;function b(W){return N(W)}e.tokenIdFromAddress=b;function N(W){const ee=i.default.decode(W);if(ee.length==0)throw new Error("Address string is empty");const ce=ee[0],ie=ee.slice(1);if(ce==T.P2C)return ie;throw new Error(`Invalid contract address type: ${ce}`)}function V(W){return a.Buffer.from(W,"hex")}e.hexToBinUnsafe=V;function Z(W){return a.Buffer.from(W).toString("hex")}e.binToHex=Z;function q(W,ee){return O(y(_(W,ee),ee))}e.groupOfPrivateKey=q;function _(W,ee){return(ee??"default")==="default"?l.keyFromPrivate(W).getPublic(!0,"hex"):l.g.mul(new n.default(W,16)).encode("hex",!0).slice(2)}e.publicKeyFromPrivateKey=_;function y(W,ee){if((ee??"default")==="default"){const ie=a.Buffer.from([T.P2PKH]),le=a.Buffer.from(o.default.blake2b(a.Buffer.from(W,"hex"),void 0,32)),L=a.Buffer.concat([ie,le]);return i.default.encode(L)}else{const ie=a.Buffer.from(`0101000000000458144020${W}8685`,"hex");return f(ie)}}e.addressFromPublicKey=y;function f(W){const ee=o.default.blake2b(W,void 0,32),ce=a.Buffer.from([T.P2SH]);return i.default.encode(a.Buffer.concat([ce,ee]))}e.addressFromScript=f;function h(W){const ee=a.Buffer.from([T.P2C]),ce=a.Buffer.from(V(W)),ie=a.Buffer.concat([ee,ce]);return i.default.encode(ie)}e.addressFromContractId=h;function x(W){return h(W)}e.addressFromTokenId=x;function v(W,ee){const ce=V(W),ie=a.Buffer.concat([ce,a.Buffer.from([ee])]),le=o.default.blake2b(ie,void 0,32);return Z(le)}e.contractIdFromTx=v;function S(W,ee,ce){if(ce<0||ce>=s.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${ce}`);const ie=a.Buffer.concat([V(W),V(ee)]),le=a.Buffer.concat([o.default.blake2b(o.default.blake2b(ie,void 0,32),void 0,32).slice(0,-1),a.Buffer.from([ce])]);return Z(le)}e.subContractId=S;function k(W){if(W.length!=64)throw Error(`Invalid block hash: ${W}`);const ee=+("0x"+W.slice(-4))%s.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(ee/s.TOTAL_NUMBER_OF_GROUPS),toGroup:ee%s.TOTAL_NUMBER_OF_GROUPS}}e.blockChainIndex=k;function E(W){let ee="";for(let ce=0;cesetTimeout(ee,W))}e.sleep=g;function M(W){return W!==0&&W!==1}e.isDevnet=M;function re(){}e.assertType=re})(Ree);var V2={},MFe=Ae&&Ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(V2,"__esModule",{value:!0});V2.Subscription=void 0;const kFe=MFe(Kw());class $Fe{constructor(t){this.pollingInterval=t.pollingInterval,this.messageCallback=t.messageCallback,this.errorCallback=t.errorCallback,this.task=void 0,this.cancelled=!1,this.eventEmitter=new kFe.default}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}}V2.Subscription=$Fe;var pl={},WR;function DFe(){if(WR)return pl;WR=1;var e=Ae&&Ae.__createBinding||(Object.create?function(u,d,p,m){m===void 0&&(m=p);var w=Object.getOwnPropertyDescriptor(d,p);(!w||("get"in w?!d.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(u,m,w)}:function(u,d,p,m){m===void 0&&(m=p),u[m]=d[p]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(u,d){Object.defineProperty(u,"default",{enumerable:!0,value:d})}:function(u,d){u.default=d}),r=Ae&&Ae.__importStar||function(u){if(u&&u.__esModule)return u;var d={};if(u!=null)for(var p in u)p!=="default"&&Object.prototype.hasOwnProperty.call(u,p)&&e(d,u,p);return t(d,u),d};Object.defineProperty(pl,"__esModule",{value:!0}),pl.verifySignature=pl.sign=void 0;const n=_u,o=qc(),i=r(O2),a=Er,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const d=(0,a.createHash)("sha256");for(const p of u)d.update(p);return d.digest()},i.utils.hmacSha256Sync=(u,...d)=>{const p=(0,a.createHmac)("sha256",Ze.from(u));return d.forEach(m=>p.update(m)),Uint8Array.from(p.digest())};function c(u,d,p){if((p??"default")==="default"){const A=s.keyFromPrivate(d).sign(u);return(0,o.encodeSignature)(A)}else{const w=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d));return(0,o.binToHex)(w)}}pl.sign=c;function l(u,d,p,m){const w=m??"default";try{return w==="default"?s.keyFromPublic(d,"hex").verify(u,(0,o.signatureDecode)(s,p)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(p),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(d))}catch{return!1}}return pl.verifySignature=l,pl}var Nee={};(function(e){var t=Ae&&Ae.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.number256ToNumber=e.number256ToBigint=e.convertAlphAmountWithDecimals=e.convertAmountWithDecimals=e.prettifyNumber=e.prettifyExactAmount=e.prettifyTokenAmount=e.prettifyAttoAlphAmount=e.prettifyNumberConfig=e.isNumeric=void 0;const r=t(k8),n=T=>!isNaN(parseFloat(T))&&isFinite(T);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(T){return s(T,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(T,O){return s(T,O,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(T,O){return s(T,O,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(T,O,P){const $=d(w(T),O);if(!(0,e.isNumeric)($))return;const R=new r.default($);let j;if(R.gte(1))j=R.toFormat(P.minDecimalPlaces);else{const V=R.toFormat(P.maxDecimalPlaces).split(".")[1],Z=V==null?void 0:V.match(/^0+/),q=Z&&Z.length?Z[0].length:0,_=Math.max(q+P.minDecimalSignificantDigits,P.minDecimalPlaces);j=R.toFormat(_)}let I=j.replace(/0+$/,"");const b=1+j.indexOf(".")+P.decimalPlacesWhenZero;return I.length{if(!u.includes(p.address)){const m=d.get(p.address);m===void 0?d.set(p.address,BigInt(p.attoAlphAmount)):d.set(p.address,BigInt(p.attoAlphAmount)+m)}}),Array.from(d.entries()).map(([p,m])=>({targetAddress:p,depositAmount:m}))}wo.getALPHDepositInfo=n;function o(l){return a(l.unsigned.inputs[0].unlockScript)}wo.getSenderAddress=o;var i;(function(l){l[l.P2PKH=0]="P2PKH",l[l.P2MPKH=1]="P2MPKH",l[l.P2SH=2]="P2SH"})(i||(i={}));function a(l){const u=(0,e.hexToBinUnsafe)(l);if(u.length===0)throw new Error("UnlockScript is empty");const d=u[0],p=u.slice(1);if(d===i.P2PKH)return(0,e.addressFromPublicKey)((0,e.binToHex)(p));if(d===i.P2MPKH)throw new Error("Naive multi-sig address is not supported for exchanges as it will be replaced by P2SH");if(d===i.P2SH){const m=p.slice(0,-1);return(0,e.addressFromScript)(m)}else throw new Error("Invalid unlock script type")}wo.getAddressFromUnlockScript=a;function s(l){return l.unsigned.fixedOutputs.every(d=>d.tokens.length===0)}function c(l){return!(l.contractInputs.length!==0||l.generatedOutputs.length!==0||l.unsigned.inputs.length===0||l.unsigned.scriptOpt!==void 0)}return wo}var KR;function Fn(){return KR||(KR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(o,i,a,s){s===void 0&&(s=a);var c=Object.getOwnPropertyDescriptor(i,a);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(o,s,c)}:function(o,i,a,s){s===void 0&&(s=a),o[s]=i[a]}),r=Ae&&Ae.__exportStar||function(o,i){for(var a in o)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,o,a)};Object.defineProperty(e,"__esModule",{value:!0}),e.getALPHDepositInfo=e.getSenderAddress=e.isALPHTransferTx=e.validateExchangeAddress=void 0,r(U2,e),r(H2,e),r(z2,e),r(dg,e),r(Ree,e),r(V2,e),r(DFe(),e),r(Nee,e);var n=RFe();Object.defineProperty(e,"validateExchangeAddress",{enumerable:!0,get:function(){return n.validateExchangeAddress}}),Object.defineProperty(e,"isALPHTransferTx",{enumerable:!0,get:function(){return n.isALPHTransferTx}}),Object.defineProperty(e,"getSenderAddress",{enumerable:!0,get:function(){return n.getSenderAddress}}),Object.defineProperty(e,"getALPHDepositInfo",{enumerable:!0,get:function(){return n.getALPHDepositInfo}})}(B3)),B3}var YR;function sP(){return YR||(YR=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StdInterfaceIds=e.request=e.requestWithLog=e.forwardRequests=e.typeLength=e.getDefaultValue=e.fromApiVal=e.fromApiArray=e.fromApiVals=e.toApiVal=e.toApiArray=e.toApiAddress=e.toApiByteVec=e.fromApiNumber256=e.toApiNumber256Optional=e.toApiNumber256=e.toApiBoolean=e.fromApiTokens=e.fromApiToken=e.toApiTokens=e.toApiToken=void 0;const t=fg,r=rs,n=Fn();n.assertType;function o(_){return{id:_.id,amount:l(_.amount)}}e.toApiToken=o;function i(_){return _==null?void 0:_.map(o)}e.toApiTokens=i;function a(_){return{id:_.id,amount:d(_.amount)}}e.fromApiToken=a;function s(_){return _==null?void 0:_.map(a)}e.fromApiTokens=s;function c(_){if(typeof _=="boolean")return _;throw new Error(`Invalid boolean value: ${_}`)}e.toApiBoolean=c;function l(_){if(typeof _=="number"&&Number.isInteger(_)||typeof _=="bigint")return _.toString();if(typeof _=="string")try{if(BigInt(_).toString()===_)return _}catch{throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}throw new Error(`Invalid value: ${_}, expected a 256 bit number`)}e.toApiNumber256=l;function u(_){return _===void 0?void 0:l(_)}e.toApiNumber256Optional=u;function d(_){return BigInt(_)}e.fromApiNumber256=d;function p(_){if(typeof _!="string")throw new Error(`Invalid value: ${_}, expected a hex-string`);if((0,n.isHexString)(_))return _;if((0,n.isBase58)(_))try{const y=n.bs58.decode(_);if(y.length==33&&y[0]==3)return Ze.from(y.slice(1)).toString("hex")}catch{throw new Error(`Invalid hex-string: ${_}`)}throw new Error(`Invalid hex-string: ${_}`)}e.toApiByteVec=p;function m(_){if(typeof _=="string")try{return n.bs58.decode(_),_}catch{throw new Error(`Invalid base58 string: ${_}`)}else throw new Error(`Invalid value: ${_}, expected a base58 string`)}e.toApiAddress=m;function w(_,y){if(!Array.isArray(y))throw new Error(`Expected array, got ${y}`);const f=_.lastIndexOf(";");if(f==-1)throw new Error(`Invalid Val type: ${_}`);const h=_.slice(1,f),x=parseInt(_.slice(f+1,-1));if(y.length!=x)throw new Error(`Invalid val dimension: ${y}`);return{value:y.map(v=>A(v,h)),type:"Array"}}e.toApiArray=w;function A(_,y){return y==="Bool"?{value:c(_),type:y}:y==="U256"||y==="I256"?{value:l(_),type:y}:y==="ByteVec"?{value:p(_),type:y}:y==="Address"?{value:m(_),type:y}:w(y,_)}e.toApiVal=A;function T(_,y,f,h=!1){if(_.length===0)throw new Error("Not enough Vals");const x=_[`${y}`];if(f==="Bool"&&x.type===f)return[x.value,y+1];if((f==="U256"||f==="I256")&&x.type===f)return[d(x.value),y+1];if((f==="ByteVec"||f==="Address")&&(x.type===f||h))return[x.value,y+1];{const[v,S]=R(f),k=S.reduce((g,M)=>g*M),E=y+k,C=_.slice(y,E);if(C.length==k&&C.every(g=>g.type===v)){const g=C.map(M=>$(M,v));return[I(g,S),E]}else throw new Error(`Invalid array Val type: ${C}, ${f}`)}}function O(_,y,f,h=!1){let x=0;const v={};return f.forEach((S,k)=>{const E=y[`${k}`],[C,g]=T(_,x,S,h);x=g,v[`${E}`]=C}),v}e.fromApiVals=O;function P(_,y){let f=0;const h=[];for(const x of y){const[v,S]=T(_,f,x);h.push(v),f=S}return h}e.fromApiArray=P;function $(_,y){if(_.type==="Bool"&&_.type===y)return _.value;if((_.type==="U256"||_.type==="I256")&&_.type===y)return d(_.value);if((_.type==="ByteVec"||_.type==="Address")&&_.type===y)return _.value;throw new Error(`Invalid node.Val type: ${_}`)}e.fromApiVal=$;function R(_){const y=_.lastIndexOf(";");if(y===-1)throw new Error(`Invalid Val type: ${_}`);const f=_.slice(1,y),h=parseInt(_.slice(y+1,-1));if(f[0]=="["){const[x,v]=R(f);return[x,(v.unshift(h),v)]}else return[f,[h]]}function j(_){if(_==="U256"||_==="I256")return 0n;if(_==="Bool")return!1;if(_==="ByteVec")return"";if(_==="Address")return t.ZERO_ADDRESS;const[y,f]=R(_),h=j(y);return f.reduceRight((x,v)=>Array(v).fill(x),h)}e.getDefaultValue=j;function I(_,y){if(y.length==1)return _;{const f=[],h=_.length/y[0],x=y.slice(1);for(let v=0;v<_.length;v+=h){const S=_.slice(v,v+h);f.push(I(S,x))}return f}}function b(_){if(_==="U256"||_==="I256"||_==="Bool"||_==="ByteVec"||_==="Address")return 1;const[,y]=R(_);return y.reduce((f,h)=>f*h)}e.typeLength=b;async function N(_,y){const f=(0,r.isDebugModeEnabled)(),{path:h,method:x,params:v}=_;f&&console.log(`[REQUEST] ${h} ${x} ${JSON.stringify(v)}`);try{const S=await y(_);return f&&console.log(`[RESPONSE] ${h} ${x} ${JSON.stringify(S)}`),S}catch(S){throw f&&console.error(`[ERROR] ${h} ${x} `,S),S}}function V(_,y){for(const[f,h]of Object.entries(_))for(const x of Object.keys(h))h[`${x}`]=async(...v)=>N({path:f,method:x,params:v},y)}e.forwardRequests=V;function Z(_){for(const[y,f]of Object.entries(_))for(const[h,x]of Object.entries(f))f[`${h}`]=async(...v)=>N({path:y,method:h,params:v},()=>x(...v))}e.requestWithLog=Z;async function q(_,y){const f=_[`${y.path}`][`${y.method}`];return f(...y.params)}e.request=q,function(_){_.FungibleToken="0001",_.NFTCollection="0002",_.NFT="0003",_.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(N3)),N3}var cP={},kc={};Object.defineProperty(kc,"__esModule",{value:!0});kc.isBalanceEqual=kc.convertHttpResponse=void 0;function NFe(e){if(e.error){const t=e.error.detail??`status code: ${e.status}`;throw new Error(`[API Error] - ${t}`)}else return e.data}kc.convertHttpResponse=NFe;function BFe(e,t){const r=(o,i)=>{const a=(o==null?void 0:o.length)??0,s=(i==null?void 0:i.length)??0;if(a!==s)return!1;if(a===0)return!0;const c=i.map(l=>({...l,used:!1}));return o.every(l=>{const u=c.find(d=>!d.used&&l.id===d.id&&l.amount===d.amount);return u===void 0?!1:(u.used=!0,!0)})},n=e.balance===t.balance&&e.lockedBalance===t.lockedBalance;return e.utxoNum===t.utxoNum&&n&&r(e.tokenBalances,t.tokenBalances)&&r(e.lockedTokenBalances,t.lockedTokenBalances)}kc.isBalanceEqual=BFe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=kc;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,c={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...c}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,c={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,c={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,c={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,c={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,c={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...c}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,c={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...c}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsBuildMultiAddresses:(a,s={})=>this.request({path:"/transactions/build-multi-addresses",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,c={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,c={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSweep:(a,s={})=>this.request({path:"/multisig/sweep",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,c={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,c={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,c={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)}}}e.Api=o})(cP);var j3={},Jt={},JR;function Bee(){if(JR)return Jt;JR=1;var e;Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.buildDebugBytecode=Jt.encodeContractField=Jt.buildContractByteCode=Jt.buildScriptByteCode=Jt.encodeScriptField=Jt.encodeScriptFieldAsString=Jt.encodeAddress=Jt.encodeByteVec=Jt.encodeU256=Jt.encodeI256=Jt.encodeBool=void 0;const t=jn,r=Hd(),n=Fn(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?d(v):p(v)}Jt.encodeI256=l;function u(v,S,k){let E=v.toString(16);E.length%2===1?E="0"+E:S&&E[0]>="8"&&(E="00"+E);const C=E.length/2,g=new Uint8Array(C+1);for(let re=0;re>8)+s.twoBytePrefix,S&255])}else if(v>24)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v=-a.oneByteBound){const S=Number(v);return new Uint8Array([(S^s.oneByteNegPrefix)&255])}else if(v>=-a.twoByteBound){const S=Number(v);return new Uint8Array([(S>>8^s.twoByteNegPrefix)&255,S&255])}else if(v>=-a.fourByteBound){const S=Number(v);return new Uint8Array([(S>>24^s.fourByteNegPrefix)&255,S>>16&255,S>>8&255,S&255])}else{if(v>=a.i256LowerBound)return u(~v,!0,!0);throw Error(`Too small number for i256: ${v}`)}}function m(v){if(v>8&255)+s.twoBytePrefix,S&255])}else if(v>24&255)+s.fourBytePrefix,S>>16&255,S>>8&255,S&255])}else{if(v{const g=k.names[`${C}`],M=k.types[`${C}`];if(g in S){const re=S[`${g}`];return N(g,()=>R(M,re))}else throw new Error(`The value of field ${g} is not provided`)})}Jt.buildScriptByteCode=b;function N(v,S){try{return S()}catch(k){throw k instanceof Error?new Error(`Invalid ${v}, error: ${k.message}`):k}}function V(v,S,k){const C=S.isMutable.map((M,re)=>re).filter(M=>S.isMutable[`${M}`]===k).flatMap(M=>{const re=S.names[`${M}`],W=S.types[`${M}`];if(re in v){const ee=v[`${re}`];return N(re,()=>h(W,ee))}else throw new Error(`The value of field ${re} is not provided`)});return t.Buffer.from(l(BigInt(C.length))).toString("hex")+C.map(M=>t.Buffer.from(M).toString("hex")).join("")}function Z(v,S,k){const E=V(S,k,!1),C=V(S,k,!0);return v+E+C}Jt.buildContractByteCode=Z;var q;(function(v){v[v.Bool=0]="Bool",v[v.I256=1]="I256",v[v.U256=2]="U256",v[v.ByteVec=3]="ByteVec",v[v.Address=4]="Address"})(q||(q={}));function _(v){return new Uint8Array([q.I256,...l(v)])}function y(v){return new Uint8Array([q.U256,...m(v)])}function f(v,S){if(!Array.isArray(S))throw new Error(`Expected array, got ${S}`);const k=v.lastIndexOf(";");if(k==-1)throw new Error(`Invalid Array type: ${v}`);const E=v.slice(1,k),C=parseInt(v.slice(k+1,-1));if(S.length!=C)throw new Error(`Invalid val dimension: ${S}`);return S.flatMap(g=>h(E,g))}function h(v,S){switch(v){case"Bool":const k=(0,r.toApiBoolean)(S)?1:0;return[new Uint8Array([q.Bool,k])];case"I256":const E=(0,r.toApiNumber256)(S);return[_(BigInt(E))];case"U256":const C=(0,r.toApiNumber256)(S);return[y(BigInt(C))];case"ByteVec":const g=(0,r.toApiByteVec)(S);return[new Uint8Array([q.ByteVec,...w(g)])];case"Address":const M=(0,r.toApiAddress)(S);return[new Uint8Array([q.Address,...A(M)])];default:return f(v,S)}}Jt.encodeContractField=h;function x(v,S){if(S==="")return v;const k=/[=+-][0-9a-f]*/g;let E="",C=0;for(const g of S.matchAll(k)){const M=g[0],re=M[0];if(re==="="){const W=parseInt(M.substring(1));E=E+v.slice(C,C+W),C=C+W}else if(re==="+")E=E+M.substring(1);else{const W=parseInt(M.substring(1));C=C+W}}return E}return Jt.buildDebugBytecode=x,Jt}var L3={},bi={},ZR;function Fee(){if(ZR)return bi;ZR=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.getCurrentExplorerProvider=bi.setCurrentExplorerProvider=bi.getCurrentNodeProvider=bi.setCurrentNodeProvider=void 0;const e=Hd();let t;function r(s,c,l){typeof s=="string"?t=new e.NodeProvider(s,c,l):t=s}bi.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}bi.getCurrentNodeProvider=n;let o;function i(s,c,l){typeof s=="string"?o=new e.ExplorerProvider(s,c,l):o=s}bi.setCurrentExplorerProvider=i;function a(){return o}return bi.getCurrentExplorerProvider=a,bi}var gl={},XR;function jee(){if(XR)return gl;XR=1,Object.defineProperty(gl,"__esModule",{value:!0}),gl.subscribeToEvents=gl.EventSubscription=void 0;const e=qc(),t=Fn();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}gl.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return gl.subscribeToEvents=n,gl}var QR;function FFe(){return QR||(QR=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(X,D,H,F){F===void 0&&(F=H);var B=Object.getOwnPropertyDescriptor(D,H);(!B||("get"in B?!D.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return D[H]}}),Object.defineProperty(X,F,B)}:function(X,D,H,F){F===void 0&&(F=H),X[F]=D[H]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(X,D){Object.defineProperty(X,"default",{enumerable:!0,value:D})}:function(X,D){X.default=D}),n=Ae&&Ae.__importStar||function(X){if(X&&X.__esModule)return X;var D={};if(X!=null)for(var H in X)H!=="default"&&Object.prototype.hasOwnProperty.call(X,H)&&t(D,X,H);return r(D,X),D},o=Ae&&Ae.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=jn,a=o(Er),s=Er,c=Hd(),l=n(Bee()),u=Fn(),d=Fee(),p=n(Er),m=jee(),w=fg,A=n(qi),T=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var O;(function(X){X[X.Contract=0]="Contract",X[X.Script=1]="Script",X[X.AbstractContract=2]="AbstractContract",X[X.Interface=3]="Interface"})(O||(O={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class P{constructor(D,H){this.matcher=new RegExp(D,"mg"),this.type=H}}function $(X){let D=0;for(let H=0;Hthis.compilerOptionsUsed[`${U}`]===J)||H.length!==this.infos.size)return!0;for(const U of H){const J=this.infos.get(U.name);if(typeof J>"u"||J.sourceCodeHash!==U.sourceCodeHash)return!0}return!1}static async from(D){const H=p.join(D,I.artifactFileName);if(a.default.existsSync(H))try{const F=await s.promises.readFile(H),B=JSON.parse(F.toString()),U=B.fullNodeVersion,J=B.compilerOptionsUsed,ne=new Map(Object.entries(B.infos));return new I(U,J,ne)}catch(F){console.log(`Failed to load project artifact, error: ${F}`);return}}}e.ProjectArtifact=I,I.artifactFileName=".project.json";class b{static buildProjectArtifact(D,H,F,B,U){const J=new Map;F.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:oe.artifact.codeHashDebug,warnings:oe.warnings})}),B.forEach(oe=>{J.set(oe.artifact.name,{sourceFile:oe.sourceInfo.contractRelativePath,sourceCodeHash:oe.sourceInfo.sourceCodeHash,bytecodeDebugPatch:oe.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:oe.warnings})});const ne=F.size+B.size;return H.slice(ne).forEach(oe=>{J.set(oe.name,{sourceFile:oe.contractRelativePath,sourceCodeHash:oe.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new I(D,U,J)}constructor(D,H,F,B,U,J,ne){this.contractsRootDir=D,this.artifactsRootDir=H,this.sourceInfos=F,this.contracts=B,this.scripts=U,this.projectArtifact=ne,J&&b.checkCompilerWarnings([...[...B.entries()].map(oe=>oe[1].warnings).flat(),...[...U.entries()].map(oe=>oe[1].warnings).flat()],J)}static checkCompilerWarnings(D,H){if(D.length!==0){const F=" - ",U=`Compilation warnings: +`+(F+D.join(` +`+F))+` +`;if(H)throw new Error(U);console.log(U)}}static contract(D){const H=b.currentProject.contracts.get(D);if(typeof H>"u")throw new Error(`Contract "${D}" does not exist`);return H.artifact}static script(D){const H=b.currentProject.scripts.get(D);if(typeof H>"u")throw new Error(`Script "${D}" does not exist`);return H.artifact}async saveArtifactsToFile(D){const H=this.artifactsRootDir,F=async function(B){const U=B.sourceInfo.getArtifactPath(H),J=p.dirname(U);return a.default.existsSync(J)||a.default.mkdirSync(J,{recursive:!0}),s.promises.writeFile(U,B.artifact.toString())};this.contracts.forEach(B=>F(B)),this.scripts.forEach(B=>F(B)),await this.projectArtifact.saveToFile(D)}contractByCodeHash(D){const H=[...this.contracts.values()].find(F=>F.artifact.codeHash===D||F.artifact.codeHashDebug==D);if(typeof H>"u")throw new Error(`Unknown code with code hash: ${D}`);return H.artifact}static async compile(D,H,F,B,U,J,ne,oe){const Te=F.reduce((Ge,qe)=>(Ge.find(pe=>pe.sourceCodeHash===qe.sourceCodeHash)===void 0&&Ge.push(qe),Ge),[]).map(Ge=>Ge.sourceCode).join(` +`),$e=await H.contracts.postContractsCompileProject({code:Te,compilerOptions:oe}),De=new Map,Xe=new Map;$e.contracts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Contract&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for contract ${Ge.name}`);const pe=V.fromCompileResult(Ge);De.set(pe.name,new j(qe,pe,Ge.warnings))}),$e.scripts.forEach(Ge=>{const qe=F.find(ue=>ue.type===O.Script&&ue.name===Ge.name);if(qe===void 0)throw new Error(`SourceInfo does not exist for script ${Ge.name}`);const pe=Z.fromCompileResult(Ge);Xe.set(pe.name,new j(qe,pe,Ge.warnings))});const ze=b.buildProjectArtifact(D,F,De,Xe,oe),He=new b(U,J,F,De,Xe,ne,ze);return await He.saveArtifactsToFile(B),He}static async loadArtifacts(D,H,F,B,U,J,ne,oe){try{const de=new Map,Te=new Map;for(const $e of H){const De=F.infos.get($e.name);if(typeof De>"u")throw Error(`Unable to find project info for ${$e.name}, please rebuild the project`);const Xe=De.warnings,ze=$e.getArtifactPath(J);if($e.type===O.Contract){const He=await V.fromArtifactFile(ze,De.bytecodeDebugPatch,De.codeHashDebug);de.set(He.name,new j($e,He,Xe))}else if($e.type===O.Script){const He=await Z.fromArtifactFile(ze,De.bytecodeDebugPatch);Te.set(He.name,new j($e,He,Xe))}}return new b(U,J,H,de,Te,ne,F)}catch(de){return console.log(`Failed to load artifacts, error: ${de}, try to re-compile contracts...`),b.compile(F.fullNodeVersion,D,H,B,U,J,ne,oe)}}static getImportSourcePath(D,H){const F=H.split("/");if(F.length>1&&F[0]==="std"){const U=p.dirname(__filename);return p.join(U,"..","..","..",H)}let B=D;for(;;){const U=p.join(B,"node_modules",H);if(a.default.existsSync(U))return U;const J=B;if(B=p.join(B,".."),J===B)throw new Error(`Specified import file does not exist: ${H}`)}}static async handleImports(D,H,F,B){const U=[],J=F.replace(b.importRegex,oe=>(U.push(oe),"")),ne=[];for(const oe of U){const de=oe.slice(8,-1),Te=de.endsWith(".ral")?de:de+".ral";if(!B.includes(Te)){B.push(Te);const $e=b.getImportSourcePath(D,Te),De=await b.loadSourceFile(D,H,$e,B,!0);ne.push(...De)}}return[J,ne]}static async loadSourceFile(D,H,F,B,U){const J=p.relative(H,F);if(!F.endsWith(".ral"))throw new Error(`Invalid filename: ${F}, smart contract file name should end with ".ral"`);const ne=await s.promises.readFile(F),[oe,de]=await b.handleImports(D,H,ne.toString(),B);if(oe.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${F}`);const Te=de;for(const $e of this.matchers){const De=oe.matchAll($e.matcher);for(const Xe of De){const ze=await R.from($e.type,Xe[1],oe,J,U);Te.push(ze)}}return Te}static async loadSourceFiles(D,H){const F=[],B=[],U=async function(ne){const oe=await s.promises.readdir(ne,{withFileTypes:!0});for(const de of oe)if(de.isFile()){const Te=p.join(ne,de.name),$e=await b.loadSourceFile(D,H,Te,F,!1);B.push(...$e)}else{const Te=p.join(ne,de.name);await U(Te)}};await U(H);const J=B.filter(ne=>ne.type===O.Contract||ne.type===O.Script).length;if(B.length===0||J===0)throw new Error("Project have no source files");return B.sort((ne,oe)=>ne.type-oe.type)}static async build(D={},H=".",F=b.DEFAULT_CONTRACTS_DIR,B=b.DEFAULT_ARTIFACTS_DIR,U=void 0){const J=(0,d.getCurrentNodeProvider)(),ne=U??(await J.infos.getInfosVersion()).version,oe=await b.loadSourceFiles(H,F),{errorOnWarnings:de,...Te}={...e.DEFAULT_COMPILER_OPTIONS,...D},$e=await I.from(H);$e===void 0||$e.needToReCompile(Te,oe,ne)?(console.log(`Compiling contracts in folder "${F}"`),b.currentProject=await b.compile(ne,J,oe,H,F,B,de,Te)):(console.log(`Contracts are compiled already. Loading them from folder "${B}"`),b.currentProject=await b.loadArtifacts(J,oe,$e,H,F,B,de,Te))}}e.Project=b,b.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),b.abstractContractMatcher=new P("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",O.AbstractContract),b.contractMatcher=new P("^Contract ([A-Z][a-zA-Z0-9]*)",O.Contract),b.interfaceMatcher=new P("^Interface ([A-Z][a-zA-Z0-9]*)",O.Interface),b.scriptMatcher=new P("^TxScript ([A-Z][a-zA-Z0-9]*)",O.Script),b.matchers=[b.abstractContractMatcher,b.contractMatcher,b.interfaceMatcher,b.scriptMatcher],b.DEFAULT_CONTRACTS_DIR="contracts",b.DEFAULT_ARTIFACTS_DIR="artifacts";class N{constructor(D,H,F){this.version=D,this.name=H,this.functions=F}publicFunctions(){return this.functions.filter(D=>D.isPublic).map(D=>D.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(D=>D.usePreapprovedAssets).map(D=>D.name)}usingAssetsInContractFunctions(){return this.functions.filter(D=>D.useAssetsInContract).map(D=>D.name)}async isDevnet(D){if(!D.nodeProvider)return!1;const H=await D.nodeProvider.infos.getInfosChainParams();return(0,u.isDevnet)(H.networkId)}}e.Artifact=N;class V extends N{constructor(D,H,F,B,U,J,ne,oe,de,Te,$e,De){super(D,H,de),this.bytecode=F,this.bytecodeDebugPatch=B,this.codeHash=U,this.fieldsSig=ne,this.eventsSig=oe,this.constants=Te,this.enums=$e,this.stdInterfaceId=De,this.bytecodeDebug=l.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=J}static fromJson(D,H="",F=""){if(D.version==null||D.name==null||D.bytecode==null||D.codeHash==null||D.fieldsSig==null||D.eventsSig==null||D.constants==null||D.enums==null||D.functions==null)throw Error("The artifact JSON for contract is incomplete");return new V(D.version,D.name,D.bytecode,H,D.codeHash,F||D.codeHash,D.fieldsSig,D.eventsSig,D.functions,D.constants,D.enums,D.stdInterfaceId===null?void 0:D.stdInterfaceId)}static fromCompileResult(D){return new V(D.version,D.name,D.bytecode,D.bytecodeDebugPatch,D.codeHash,D.codeHashDebug,D.fields,D.events,D.functions,D.constants,D.enums,D.stdInterfaceId)}static async fromArtifactFile(D,H,F){const B=await s.promises.readFile(D),U=JSON.parse(B.toString());return V.fromJson(U,H,F)}toString(){const D={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(D.stdInterfaceId=this.stdInterfaceId),JSON.stringify(D,null,2)}getInitialFieldsWithDefaultValues(){const D=this.stdInterfaceId===void 0?this.fieldsSig:{names:this.fieldsSig.names.slice(0,-1),types:this.fieldsSig.types.slice(0,-1),isMutable:this.fieldsSig.isMutable.slice(0,-1)};return D.names.reduce((H,F,B)=>(H[`${F}`]=(0,c.getDefaultValue)(D.types[`${B}`]),H),{})}toState(D,H,F){const B=typeof F<"u"?F:V.randomAddress();return{address:B,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(B)),bytecode:this.bytecode,codeHash:this.codeHash,fields:D,fieldsSig:this.fieldsSig,asset:H}}static randomAddress(){const D=new Uint8Array(33);return T.getRandomValues(D),D[0]=3,u.bs58.encode(D)}printDebugMessages(D,H){H.length!=0&&(console.log(`Testing ${this.name}.${D}:`),H.forEach(F=>console.log(`> Contract @ ${F.contractAddress} - ${F.message}`)))}toApiFields(D){return typeof D>"u"?[]:S(D,this.fieldsSig)}toApiArgs(D,H){if(H){const F=this.functions.find(B=>B.name==D);if(F==null)throw new Error(`Invalid function name: ${D}`);return k(H,F)}else return[]}getMethodIndex(D){return this.functions.findIndex(H=>H.name===D)}toApiContractStates(D){return typeof D<"u"?D.map(H=>v(H)):void 0}toApiTestContractParams(D,H){const F=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!1),B=H.initialFields===void 0?[]:x(H.initialFields,this.fieldsSig,!0);return{group:H.group,blockHash:H.blockHash,blockTimeStamp:H.blockTimeStamp,txId:H.txId,address:H.address,bytecode:this.bytecodeDebug,initialImmFields:F,initialMutFields:B,initialAsset:typeof H.initialAsset<"u"?y(H.initialAsset):void 0,methodIndex:this.getMethodIndex(D),args:this.toApiArgs(D,H.testArgs),existingContracts:this.toApiContractStates(H.existingContracts),inputAssets:g(H.inputAssets)}}fromApiContractState(D){return{address:D.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(D.address)),bytecode:D.bytecode,initialStateHash:D.initialStateHash,codeHash:D.codeHash,fields:q(D.immFields,D.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:f(D.asset)}}static fromApiContractState(D,H){return(H?H(D.codeHash):b.currentProject.contractByCodeHash(D.codeHash)).fromApiContractState(D)}static fromApiEvent(D,H,F,B){let U,J;if(D.eventIndex==V.ContractCreatedEventIndex)U=le(_(D.fields,V.ContractCreatedEvent,!0)),J=V.ContractCreatedEvent.name;else if(D.eventIndex==V.ContractDestroyedEventIndex)U=_(D.fields,V.ContractDestroyedEvent,!0),J=V.ContractDestroyedEvent.name;else{const oe=(B?B(H):b.currentProject.contractByCodeHash(H)).eventsSig[D.eventIndex];U=_(D.fields,oe),J=oe.name}return{txId:F,blockHash:D.blockHash,contractAddress:D.contractAddress,name:J,eventIndex:D.eventIndex,fields:U}}fromApiTestContractResult(D,H,F){const B=this.functions.findIndex(de=>de.name===D),U=this.functions[`${B}`].returnTypes,J=(0,c.fromApiArray)(H.returns,U),ne=J.length===0?null:J.length===1?J[0]:J,oe=new Map;return oe.set(H.address,H.codeHash),H.contracts.forEach(de=>oe.set(de.address,de.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(H.address)),contractAddress:H.address,returns:ne,gasUsed:H.gasUsed,contracts:H.contracts.map(de=>V.fromApiContractState(de)),txOutputs:H.txOutputs.map(M),events:V.fromApiEvents(H.events,oe,F),debugMessages:H.debugMessages}}async txParamsForDeployment(D,H){const F=await this.isDevnet(D),B=H.initialFields??{},U=this.buildByteCodeToDeploy(ye(this,B),F),J=await D.getSelectedAccount();return{signerAddress:J.address,signerKeyType:J.keyType,bytecode:U,initialAttoAlphAmount:H==null?void 0:H.initialAttoAlphAmount,issueTokenAmount:H==null?void 0:H.issueTokenAmount,initialTokenAmounts:H==null?void 0:H.initialTokenAmounts,gasAmount:H==null?void 0:H.gasAmount,gasPrice:H==null?void 0:H.gasPrice}}buildByteCodeToDeploy(D,H){try{return l.buildContractByteCode(H?this.bytecodeDebug:this.bytecode,D,this.fieldsSig)}catch(F){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${F}`)}}static fromApiEvents(D,H,F,B){return D.map(U=>{const J=U.contractAddress,ne=H.get(J);if(typeof ne<"u"||U.eventIndex<0)return V.fromApiEvent(U,ne,F,B);throw Error(`Cannot find codeHash for the contract address: ${J}`)})}toApiCallContract(D,H,F,B){const U=this.functions[`${B}`],J=E(D.args??{},U.paramNames,U.paramTypes);return{...D,group:H,address:F,methodIndex:B,args:J}}fromApiCallContractResult(D,H,F,B){const U=this.functions[`${F}`].returnTypes,J=je(D),ne=(0,c.fromApiArray)(J.returns,U),oe=ne.length===0?null:ne.length===1?ne[0]:ne,de=new Map;return J.contracts.forEach(Te=>de.set(Te.address,Te.codeHash)),{returns:oe,gasUsed:J.gasUsed,contracts:J.contracts.map(Te=>V.fromApiContractState(Te,B)),txInputs:J.txInputs,txOutputs:J.txOutputs.map(Te=>M(Te)),events:V.fromApiEvents(J.events,de,H,B),debugMessages:J.debugMessages}}}e.Contract=V,V.ContractCreatedEventIndex=-1,V.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},V.ContractDestroyedEventIndex=-2,V.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class Z extends N{constructor(D,H,F,B,U,J){super(D,H,J),this.bytecodeTemplate=F,this.bytecodeDebugPatch=B,this.fieldsSig=U}static fromCompileResult(D){return new Z(D.version,D.name,D.bytecodeTemplate,D.bytecodeDebugPatch,D.fields,D.functions)}static fromJson(D,H=""){if(D.version==null||D.name==null||D.bytecodeTemplate==null||D.fieldsSig==null||D.functions==null)throw Error("The artifact JSON for script is incomplete");return new Z(D.version,D.name,D.bytecodeTemplate,H,D.fieldsSig,D.functions)}static async fromArtifactFile(D,H){const F=await s.promises.readFile(D),B=JSON.parse(F.toString());return this.fromJson(B,H)}toString(){const D={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(D,null,2)}async txParamsForExecution(D,H){const F=await D.getSelectedAccount();return{signerAddress:F.address,signerKeyType:F.keyType,bytecode:this.buildByteCodeToDeploy(H.initialFields??{}),attoAlphAmount:H.attoAlphAmount,tokens:H.tokens,gasAmount:H.gasAmount,gasPrice:H.gasPrice}}buildByteCodeToDeploy(D){try{return l.buildScriptByteCode(this.bytecodeTemplate,D,this.fieldsSig)}catch(H){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${H}`)}}}e.Script=Z;function q(X,D,H){const F=[];let B=0,U=0;return H.types.flatMap((ne,oe)=>Array((0,c.typeLength)(ne)).fill(H.isMutable[`${oe}`])).forEach(ne=>{ne?(F.push(D[`${U}`]),U+=1):(F.push(X[`${B}`]),B+=1)}),(0,c.fromApiVals)(F,H.names,H.types)}function _(X,D,H=!1){return(0,c.fromApiVals)(X,D.fieldNames,D.fieldTypes,H)}function y(X){return{attoAlphAmount:(0,c.toApiNumber256)(X.alphAmount),tokens:typeof X.tokens<"u"?X.tokens.map(c.toApiToken):[]}}function f(X){return{alphAmount:(0,c.fromApiNumber256)(X.attoAlphAmount),tokens:(0,c.fromApiTokens)(X.tokens)}}function h(X,D){if(D in X)return X[`${D}`];throw Error(`No Val exists for ${D}`)}function x(X,D,H){const F=D.names.map((J,ne)=>ne).filter(J=>D.isMutable[`${J}`]===H),B=F.map(J=>D.names[`${J}`]),U=F.map(J=>D.types[`${J}`]);return E(X,B,U)}function v(X){const D=X.fields??{};return{address:X.address,bytecode:X.bytecode,codeHash:X.codeHash,initialStateHash:X.initialStateHash,immFields:x(D,X.fieldsSig,!1),mutFields:x(D,X.fieldsSig,!0),asset:y(X.asset)}}function S(X,D){return E(X,D.names,D.types)}function k(X,D){return E(X,D.paramNames,D.paramTypes)}function E(X,D,H){return D.map((F,B)=>{const U=h(X,F),J=H[`${B}`];return(0,c.toApiVal)(U,J)})}e.toApiVals=E;function C(X){return{address:X.address,asset:y(X.asset)}}function g(X){return typeof X<"u"?X.map(C):void 0}function M(X){if(X.type==="AssetOutput"){const D=X;return{type:"AssetOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens),lockTime:D.lockTime,message:D.message}}else if(X.type==="ContractOutput"){const D=X;return{type:"ContractOutput",address:D.address,alphAmount:(0,c.fromApiNumber256)(D.attoAlphAmount),tokens:(0,c.fromApiTokens)(D.tokens)}}else throw new Error(`Unknown output type: ${X}`)}function re(){const X=new Uint8Array(32);return T.getRandomValues(X),(0,u.binToHex)(X)}e.randomTxId=re,u.assertType;class W{constructor(D){this.contract=D}async deploy(D,H){const F=await this.contract.txParamsForDeployment(D,{...H,initialFields:ye(this.contract,H.initialFields)}),B=await D.signAndSubmitDeployContractTx(F);return{...B,contractInstance:this.at(B.contractAddress)}}stateForTest(D,H,F){const B={alphAmount:(H==null?void 0:H.alphAmount)??w.ONE_ALPH,tokens:H==null?void 0:H.tokens};return this.contract.toState(ye(this.contract,D),B,F)}}e.ContractFactory=W;class ee{constructor(D){this.script=D}async execute(D,H){const F=await this.script.txParamsForExecution(D,H);return await D.signAndSubmitExecuteScriptTx(F)}}e.ExecutableScript=ee;function ce(X){const D=new Uint8Array(32).fill(0);return D[31]=X,(0,u.addressFromContractId)((0,u.binToHex)(D))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function ie(X,D,H){if(X.eventIndex!==H)throw new Error(`Invalid event index: ${X.eventIndex}, expected: ${H}`);return _(X.fields,D,!0)}function le(X){const D=X.parentAddress,H=X.stdInterfaceId;return{address:X.address,parentAddress:D===""?void 0:D,stdInterfaceIdGuessed:H===""?void 0:H}}function L(X){const D=ie(X,V.ContractCreatedEvent,V.ContractCreatedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractCreatedEvent.name,fields:le(D)}}e.decodeContractCreatedEvent=L;function te(X){const D=ie(X,V.ContractDestroyedEvent,V.ContractDestroyedEventIndex);return{blockHash:X.blockHash,txId:X.txId,eventIndex:X.eventIndex,name:V.ContractDestroyedEvent.name,fields:{address:D.address}}}e.decodeContractDestroyedEvent=te;function ae(X,D,H,F,B){const U=oe=>oe.eventIndex!==H?Promise.resolve():X.messageCallback(F(oe)),J=(oe,de)=>X.errorCallback(oe,de),ne={pollingInterval:X.pollingInterval,messageCallback:U,errorCallback:J,onEventCountChanged:X.onEventCountChanged};return(0,m.subscribeToEvents)(ne,D,B)}e.subscribeEventsFromContract=ae;function ye(X,D){const H="414c5048";return X.stdInterfaceId===void 0?D:{...D,__stdInterfaceId:H+X.stdInterfaceId}}e.addStdIdToFields=ye;async function ve(X,D,H){const F=(H==null?void 0:H.txId)??re(),B=H.initialFields===void 0?{}:H.initialFields,U=X.contract.toApiTestContractParams(D,{...H,txId:F,initialFields:ye(X.contract,B),testArgs:H.testArgs===void 0?{}:H.testArgs}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsTestContract(U),ne=X.contract.fromApiTestContractResult(D,J,F);return X.contract.printDebugMessages(D,ne.debugMessages),ne}e.testMethod=ve;class me{constructor(D){this.address=D,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(D)),this.groupIndex=(0,u.groupOfAddress)(D)}}e.ContractInstance=me;async function Pe(X,D){const H=await(0,d.getCurrentNodeProvider)().contracts.getContractsAddressState(D.address,{group:D.groupIndex}),F=X.contract.fromApiContractState(H);return{...F,fields:F.fields}}e.fetchContractState=Pe;function he(X,D){return ae(X,e.CreateContractEventAddress,V.ContractCreatedEventIndex,H=>({...L(H),contractAddress:e.CreateContractEventAddress}),D)}e.subscribeContractCreatedEvent=he;function be(X,D){return ae(X,e.DestroyContractEventAddress,V.ContractDestroyedEventIndex,H=>({...te(H),contractAddress:e.DestroyContractEventAddress}),D)}e.subscribeContractDestroyedEvent=be;function Ie(X,D,H,F){if(H.eventIndex!==F&&!(F>=0&&FJ.name===F);return ae(H,D.address,U,J=>Ie(X,D,J,U),B)}e.subscribeContractEvent=we;function Oe(X,D,H,F){const B=ne=>H.messageCallback({...Ie(X,D,ne,ne.eventIndex),contractAddress:D.address}),U=(ne,oe)=>H.errorCallback(ne,oe),J={pollingInterval:H.pollingInterval,messageCallback:B,errorCallback:U,onEventCountChanged:H.onEventCountChanged};return(0,m.subscribeToEvents)(J,D.address,F)}e.subscribeContractEvents=Oe;async function Be(X,D,H,F,B){const U=X.contract.getMethodIndex(H),J=(F==null?void 0:F.txId)??re(),ne=X.contract.toApiCallContract({...F,txId:J,args:F.args===void 0?{}:F.args},D.groupIndex,D.address,U),oe=await(0,d.getCurrentNodeProvider)().contracts.postContractsCallContract(ne),de=X.contract.fromApiCallContractResult(oe,J,U,B);return X.contract.printDebugMessages(H,de.debugMessages),de}e.callMethod=Be;async function ke(X,D,H,F){const B=Object.entries(H),U=B.map(oe=>{const[de,Te]=oe,$e=X.contract.getMethodIndex(de),De=(Te==null?void 0:Te.txId)??re();return X.contract.toApiCallContract({...Te,txId:De,args:Te.args===void 0?{}:Te.args},D.groupIndex,D.address,$e)}),J=await(0,d.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:U}),ne={};return U.forEach((oe,de)=>{const Te=oe.methodIndex,$e=J.results[`${Te}`],De=B[`${de}`][0];ne[`${De}`]=X.contract.fromApiCallContractResult($e,oe.txId,Te,F)}),ne}e.multicallMethods=ke;async function Me(X){return(0,d.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(X).catch(D=>{if(D instanceof Error&&D.message.includes(`${X} not found`))return 0;throw D})}e.getContractEventsCurrentCount=Me;const Ue=async(X,D)=>{const H=await X.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:D}),F=H.unsignedTx.fixedOutputs.length,B=H.unsignedTx.txId+F.toString(16).padStart(8,"0");return(0,u.binToHex)(A.blake2b((0,u.hexToBinUnsafe)(B),void 0,32)).slice(0,62)+H.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=Ue,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function je(X){if(X.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${X.error}`);return X}e.tryGetCallResult=je}(L3)),L3}var eN;function Lee(){return eN||(eN=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Bee(),e),r(FFe(),e),r(jee(),e)}(j3)),j3}var tN;function jFe(){if(tN)return jh;tN=1,Object.defineProperty(jh,"__esModule",{value:!0}),jh.NodeProvider=void 0;const e=sP(),t=cP,r=Lee(),n=Fn();function o(a,s,c){const l=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:c??((...u)=>fetch(...u))});return l.setSecurityData(s??null),l}class i{constructor(s,c,l){this.request=d=>(0,e.request)(this,d),this.fetchFungibleTokenMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1,2,3],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{symbol:T[0].returns[0].value,name:T[1].returns[0].value,decimals:Number(T[2].returns[0].value),totalSupply:BigInt(T[3].returns[0].value)}},this.fetchNFTMetaData=async d=>{const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],P=>({methodIndex:P,group:m,address:p})),A=await this.contracts.postContractsMulticallContract({calls:w}),T=(0,n.hexToString)((0,r.tryGetCallResult)(A.results[0]).returns[0].value);if(A.results[1].type==="CallContractSucceeded"){const P=A.results[1];if(P.returns[0]===void 0)throw new Error("Deprecated NFT contract");const R=P.returns[0].value;if(R===void 0||!(0,n.isHexString)(R)||R.length!==64)throw new Error("Deprecated NFT contract");const j=P.returns[1];if(j===void 0)throw new Error("Deprecated NFT contract");const I=(0,n.toNonNegativeBigInt)(j.value);if(I===void 0)throw new Error("Deprecated NFT contract");if(P.returns[2]!==void 0)throw new Error("Deprecated NFT contract");return{tokenUri:T,collectionId:R,nftIndex:I}}else{const P=A.results[1];throw P.error.startsWith("VM execution error: InvalidMethodIndex")?new Error("Deprecated NFT contract"):new Error(`Failed to call contract, error: ${P.error}`)}},this.fetchNFTCollectionMetaData=async d=>{const p=(0,n.addressFromContractId)(d),m=(0,n.groupOfAddress)(p),w=Array.from([0,1],O=>({methodIndex:O,group:m,address:p})),T=(await this.contracts.postContractsMulticallContract({calls:w})).results.map(O=>(0,r.tryGetCallResult)(O));return{collectionUri:(0,n.hexToString)(T[0].returns[0].value),totalSupply:BigInt(T[1].returns[0].value)}},this.guessStdInterfaceId=async d=>{var O;const p=(0,n.addressFromTokenId)(d),m=(0,n.groupOfAddress)(p),A=(O=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(d),{group:m})).immFields.slice(-1).pop())==null?void 0:O.value,T="414c5048";if(typeof A=="string"&&A.startsWith(T))return A.slice(8)},this.guessFollowsNFTCollectionStd=async d=>{const p=await this.guessStdInterfaceId(d);return!!p&&p.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessStdTokenType=async d=>{switch(await this.guessStdInterfaceId(d)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,c,l):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events},(0,e.requestWithLog)(this)}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return jh.NodeProvider=i,jh}var Lh={},lP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.MaxSizeAddresses=e.MaxSizeTokens=e.TokenStdInterfaceId=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly",i.Weekly="weekly"}(e.IntervalType||(e.IntervalType={})),function(i){i.Fungible="fungible",i.NonFungible="non-fungible",i.NonStandard="non-standard"}(e.TokenStdInterfaceId||(e.TokenStdInterfaceId={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeTokens||(e.MaxSizeTokens={})),function(i){i[i.Value80=80]="Value80"}(e.MaxSizeAddresses||(e.MaxSizeAddresses={}));const t=kc;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((c,l)=>{const u=s[l];return c.append(l,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),c},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const l=this.abortControllers.get(s);return l?l.signal:void 0}const c=new AbortController;return this.abortControllers.set(s,c),c.signal},this.abortRequest=s=>{const c=this.abortControllers.get(s);c&&(c.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:c,path:l,type:u,query:d,format:p,baseUrl:m,cancelToken:w,...A})=>{const T=(typeof c=="boolean"?c:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},O=this.mergeRequestParams(A,T),P=d&&this.toQueryString(d),$=this.contentFormatters[u||r.Json],R=p||O.format;return this.customFetch(`${m||this.baseUrl||""}${l}${P?`?${P}`:""}`,{...O,headers:{...O.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:w?this.createAbortSignal(w):O.signal,body:typeof s>"u"||s===null?null:$(s)}).then(async j=>{const I=j;I.data=null,I.error=null;const b=R?await j[R]().then(N=>(I.ok?I.data=N:I.error=N,I)).catch(N=>(I.error=N,I)):I;return w&&this.abortControllers.delete(w),b})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(l=>this.encodeQueryParam(s,l)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(l=>typeof s[l]<"u").map(l=>Array.isArray(s[l])?this.addArrayQueryParam(s,l):this.addQueryParam(s,l)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,c={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,c={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,c={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,c,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,c={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,c={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistoryDeprecated:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history-DEPRECATED`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,c={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),postTokens:(a,s={})=>this.request({path:"/tokens",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,c={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),postTokensFungibleMetadata:(a,s={})=>this.request({path:"/tokens/fungible-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftMetadata:(a,s={})=>this.request({path:"/tokens/nft-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTokensNftCollectionMetadata:(a,s={})=>this.request({path:"/tokens/nft-collection-metadata",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,c={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,c,l={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:c,format:"json",...l}).then(t.convertHttpResponse)},this.contracts={getContractsContractAddressParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractAddressSubContracts:(a,s,c={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.market={postMarketPrices:(a,s,c={})=>this.request({path:"/market/prices",method:"POST",query:a,body:s,type:r.Json,format:"json",...c}).then(t.convertHttpResponse),getMarketPricesSymbolCharts:(a,s,c={})=>this.request({path:`/market/prices/${a}/charts`,method:"GET",query:s,format:"json",...c}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o})(lP);var rN;function LFe(){if(rN)return Lh;rN=1,Object.defineProperty(Lh,"__esModule",{value:!0}),Lh.ExplorerProvider=void 0;const e=sP(),t=lP;function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:c=>c!==null?{headers:{"X-API-KEY":`${c}`}}:{},customFetch:a??((...c)=>fetch(...c))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=l=>(0,e.request)(this,l);let c;typeof i=="string"?c=r(i,a,s):typeof i=="function"?(c=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(c,i)):c=i,this.blocks={...c.blocks},this.transactions={...c.transactions},this.addresses={...c.addresses},this.infos={...c.infos},this.mempool={...c.mempool},this.tokens={...c.tokens},this.charts={...c.charts},this.utils={...c.utils},this.contracts={...c.contracts},this.market={...c.market},this.contractEvents={...c.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return Lh.ExplorerProvider=n,Lh}var nN;function Hd(){return nN||(nN=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(i,a,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(a,s);(!l||("get"in l?!a.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,c,l)}:function(i,a,s,c){c===void 0&&(c=s),i[c]=a[s]}),r=Ae&&Ae.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Ae&&Ae.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Ae&&Ae.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(jFe(),e),n(LFe(),e),e.node=o(cP),e.explorer=o(lP),n(sP(),e),n(kc,e)}(R3)),R3}var U3={},Zt={},Uh={},oN;function Uee(){if(oN)return Uh;oN=1,Object.defineProperty(Uh,"__esModule",{value:!0}),Uh.TransactionBuilder=void 0;const e=qc(),t=Hd(),r=Fn(),n=Hee();class o{static from(a,s,c){const l=typeof a=="string"?new t.NodeProvider(a,s,c):a;return new class extends o{get nodeProvider(){return l}}}static validatePublicKey(a,s,c){if((0,r.addressFromPublicKey)(s,c)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:c,gasPrice:l,...u}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(c),gasPrice:(0,t.toApiNumber256Optional)(l),...u},p=await this.nodeProvider.transactions.postTransactionsBuild(d);return{...p,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:c,initialTokenAmounts:l,issueTokenAmount:u,gasPrice:d,...p}=a,m={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(c),initialTokenAmounts:(0,t.toApiTokens)(l),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(d),...p},w=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(m),A=e.utils.binToHex(e.utils.contractIdFromAddress(w.contractAddress));return{...w,groupIndex:w.fromGroup,contractId:A,gasPrice:(0,t.fromApiNumber256)(w.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:c,tokens:l,gasPrice:u,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(c),tokens:(0,t.toApiTokens)(l),gasPrice:(0,t.toApiNumber256Optional)(u),...d},m=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(p);return{...m,groupIndex:m.fromGroup,gasPrice:(0,t.fromApiNumber256)(m.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},c=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:c.fromGroup,toGroup:c.toGroup,unsignedTx:a.unsignedTx,txId:c.unsignedTx.txId,gasAmount:c.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(c.unsignedTx.gasPrice)}}}return Uh.TransactionBuilder=o,Uh}var iN;function Hee(){if(iN)return Zt;iN=1;var e=Ae&&Ae.__createBinding||(Object.create?function(I,b,N,V){V===void 0&&(V=N);var Z=Object.getOwnPropertyDescriptor(b,N);(!Z||("get"in Z?!b.__esModule:Z.writable||Z.configurable))&&(Z={enumerable:!0,get:function(){return b[N]}}),Object.defineProperty(I,V,Z)}:function(I,b,N,V){V===void 0&&(V=N),I[V]=b[N]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(I,b){Object.defineProperty(I,"default",{enumerable:!0,value:b})}:function(I,b){I.default=b}),r=Ae&&Ae.__importStar||function(I){if(I&&I.__esModule)return I;var b={};if(I!=null)for(var N in I)N!=="default"&&Object.prototype.hasOwnProperty.call(I,N)&&e(b,I,N);return t(b,I),b},n=Ae&&Ae.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.fromApiDestination=Zt.toApiDestinations=Zt.toApiDestination=Zt.verifySignedMessage=Zt.hashMessage=Zt.extendMessage=Zt.SignerProviderWithCachedAccounts=Zt.SignerProviderWithMultipleAccounts=Zt.SignerProviderSimple=Zt.InteractiveSignerProvider=Zt.SignerProvider=void 0;const o=jn,i=Er,a=Hd(),s=r(Fn()),c=n(qi),l=Uee(),u=Fn();class d{async getSelectedAccount(){const b=await this.unsafeGetSelectedAccount();return d.validateAccount(b),b}static validateAccount(b){const N=(0,u.addressFromPublicKey)(b.publicKey,b.keyType),V=(0,u.groupOfAddress)(N);if(N!==b.address||V!==b.group)throw Error(`Invalid accounot data: ${JSON.stringify(b)}`)}}Zt.SignerProvider=d;class p extends d{async enable(b){const N=await this.unsafeEnable(b);return d.validateAccount(N),N}}Zt.InteractiveSignerProvider=p;class m extends d{async submitTransaction(b){const N={unsignedTx:b.unsignedTx,signature:b.signature};return this.nodeProvider.transactions.postTransactionsSubmit(N)}async signAndSubmitTransferTx(b){const N=await this.signTransferTx(b);return await this.submitTransaction(N),N}async signAndSubmitDeployContractTx(b){const N=await this.signDeployContractTx(b);return await this.submitTransaction(N),N}async signAndSubmitExecuteScriptTx(b){const N=await this.signExecuteScriptTx(b);return await this.submitTransaction(N),N}async signAndSubmitUnsignedTx(b){const N=await this.signUnsignedTx(b);return await this.submitTransaction(N),N}async usePublicKey(b){const{signerAddress:N,...V}=b;return{fromPublicKey:await this.getPublicKey(N),...V}}async signTransferTx(b){const N=await this.buildTransferTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildTransferTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildTransferTx(b,await this.getPublicKey(b.signerAddress))}async signDeployContractTx(b){const N=await this.buildDeployContractTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildDeployContractTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(b,await this.getPublicKey(b.signerAddress))}async signExecuteScriptTx(b){const N=await this.buildExecuteScriptTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async buildExecuteScriptTx(b){return l.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(b,await this.getPublicKey(b.signerAddress))}async signUnsignedTx(b){const N=await l.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(b);return{signature:await this.signRaw(b.signerAddress,N.txId),...N}}async signMessage(b){const N=O(b.message,b.messageHasher);return{signature:await this.signRaw(b.signerAddress,N)}}}Zt.SignerProviderSimple=m;class w extends m{async getAccount(b){const V=(await this.getAccounts()).find(Z=>Z.address===b);if(typeof V>"u")throw new Error("Unmatched signerAddress");return V}async getPublicKey(b){return(await this.getAccount(b)).publicKey}}Zt.SignerProviderWithMultipleAccounts=w;class A extends w{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=N,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(b){const N=this._accounts.get(b);if(N===void 0)throw Error("The address is not in the accounts");return Promise.resolve(N)}}Zt.SignerProviderWithCachedAccounts=A;function T(I){return"Alephium Signed Message: "+I}Zt.extendMessage=T;function O(I,b){switch(b){case"alephium":return s.binToHex(c.default.blake2b(T(I),void 0,32));case"sha256":const N=(0,i.createHash)("sha256");return N.update(o.Buffer.from(I)),s.binToHex(N.digest());case"blake2b":return s.binToHex(c.default.blake2b(I,void 0,32));case"identity":return I;default:throw Error(`Invalid message hasher: ${b}`)}}Zt.hashMessage=O;function P(I,b,N,V,Z){const q=O(I,b);return s.verifySignature(q,N,V,Z)}Zt.verifySignedMessage=P;function $(I){return{...I,attoAlphAmount:(0,a.toApiNumber256)(I.attoAlphAmount),tokens:(0,a.toApiTokens)(I.tokens)}}Zt.toApiDestination=$;function R(I){return I.map($)}Zt.toApiDestinations=R;function j(I){return{...I,attoAlphAmount:(0,a.fromApiNumber256)(I.attoAlphAmount),tokens:(0,a.fromApiTokens)(I.tokens)}}return Zt.fromApiDestination=j,Zt}var H3={},aN;function UFe(){if(aN)return H3;aN=1,Object.defineProperty(H3,"__esModule",{value:!0});const e=Fn();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),H3}var sN;function HFe(){return sN||(sN=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Hee(),e),r(UFe(),e),r(Uee(),e)}(U3)),U3}var z3={},ml={},cN;function zFe(){if(cN)return ml;cN=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.subscribeToTxStatus=ml.TxStatusSubscription=void 0;const e=qc(),t=Fn();class r extends t.Subscription{constructor(i,a,s,c,l){super(i),this.txId=a,this.fromGroup=s,this.toGroup=c,this.confirmations=l??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}ml.TxStatusSubscription=r;function n(o,i,a,s,c){return new r(o,i,a,s,c)}return ml.subscribeToTxStatus=n,ml}var vl={},lN;function VFe(){if(lN)return vl;lN=1;var e=Ae&&Ae.__createBinding||(Object.create?function(a,s,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(s,c);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,l,u)}:function(a,s,c,l){l===void 0&&(l=c),a[l]=s[c]}),t=Ae&&Ae.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Ae&&Ae.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var c in a)c!=="default"&&Object.prototype.hasOwnProperty.call(a,c)&&e(s,a,c);return t(s,a),s};Object.defineProperty(vl,"__esModule",{value:!0}),vl.transactionVerifySignature=vl.transactionSign=void 0;const n=r(Fn());function o(a,s,c){return n.sign(a,s,c)}vl.transactionSign=o;function i(a,s,c,l){return n.verifySignature(a,s,c,l)}return vl.transactionVerifySignature=i,vl}var uN;function qFe(){return uN||(uN=1,function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zFe(),e),r(VFe(),e)}(z3)),z3}var zee={},Vee={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(A=>{if(!e.validNFTTokenUriMetaDataFields.includes(A))throw new Error(`Invalid field ${A}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=a(u,"description"),m=i(u,"image"),w=o(u.attributes);return{name:d,description:p,image:m,attributes:w}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(w=>{if(!e.validNFTCollectionUriMetaDataFields.includes(w))throw new Error(`Invalid field ${w}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const d=i(u,"name"),p=i(u,"description"),m=i(u,"image");return{name:d,description:p,image:m}}e.validateNFTCollectionUriMetaData=r;async function n(u,d){if(l(d)&&d>0){const p=[];for(let m=0;m{if(typeof d!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(d).forEach(p=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(p))throw new Error(`Invalid field ${p} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(d,"trait_type"),s(d,"value")})}return u}function i(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function a(u,d){const p=u[`${d}`];if(p!==void 0&&!(typeof p=="string"&&p!==""))throw new Error(`JSON field '${d}' is not a non empty string`);return p}function s(u,d){const p=u[`${d}`];if(!(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return p}async function c(u,d){try{return await(await fetch(`${u}${d}`)).json()}catch(p){throw new Error(`Error fetching NFT metadata from ${u}${d}: ${p}`)}}function l(u){return u===parseInt(u.toString(),10)}})(Vee);(function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Ae&&Ae.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Vee,e)})(zee);var V3={},Xn={},or={};Object.defineProperty(or,"__esModule",{value:!0});or.Parser=void 0;class WFe{constructor(t,r){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=t,this.useContextVariables=r}generateVariable(t){const r=[...this.scopes[this.scopes.length-1]];return t&&r.push(t),r.join(".")}generateOption(t){switch(typeof t){case"number":return t.toString();case"string":return this.generateVariable(t);case"function":return`${this.addImport(t)}.call(${this.generateVariable()}, vars)`}}generateError(t){this.pushCode(`throw new Error(${t});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(t){this.code+=t+` +`}pushPath(t){t&&this.scopes[this.scopes.length-1].push(t)}popPath(t){t&&this.scopes[this.scopes.length-1].pop()}pushScope(t){this.scopes.push([t])}popScope(){this.scopes.pop()}addImport(t){if(!this.importPath)return`(${t})`;let r=this.reverseImports.get(t);return r||(r=this.imports.push(t)-1,this.reverseImports.set(t,r)),`${this.importPath}[${r}]`}addReference(t){this.references.has(t)||this.references.set(t,{resolved:!1,requested:!1})}markResolved(t){const r=this.references.get(t);r&&(r.resolved=!0)}markRequested(t){t.forEach(r=>{const n=this.references.get(r);n&&(n.requested=!0)})}getUnresolvedReferences(){return Array.from(this.references).filter(([t,r])=>!r.resolved&&!r.requested).map(([t,r])=>t)}}const wi=new Map,yl="___parser_",_i={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},Lm={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},Um={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};class qo{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new qo}primitiveGenerateN(t,r){const n=Lm[t],o=Um[t];r.pushCode(`${r.generateVariable(this.varName)} = dataView.get${n}(offset, ${o});`),r.pushCode(`offset += ${_i[t]};`)}primitiveN(t,r,n){return this.setNextParser(t,r,n)}useThisEndian(t){return t+this.endian.toLowerCase()}uint8(t,r={}){return this.primitiveN("uint8",t,r)}uint16(t,r={}){return this.primitiveN(this.useThisEndian("uint16"),t,r)}uint16le(t,r={}){return this.primitiveN("uint16le",t,r)}uint16be(t,r={}){return this.primitiveN("uint16be",t,r)}uint32(t,r={}){return this.primitiveN(this.useThisEndian("uint32"),t,r)}uint32le(t,r={}){return this.primitiveN("uint32le",t,r)}uint32be(t,r={}){return this.primitiveN("uint32be",t,r)}int8(t,r={}){return this.primitiveN("int8",t,r)}int16(t,r={}){return this.primitiveN(this.useThisEndian("int16"),t,r)}int16le(t,r={}){return this.primitiveN("int16le",t,r)}int16be(t,r={}){return this.primitiveN("int16be",t,r)}int32(t,r={}){return this.primitiveN(this.useThisEndian("int32"),t,r)}int32le(t,r={}){return this.primitiveN("int32le",t,r)}int32be(t,r={}){return this.primitiveN("int32be",t,r)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(t,r={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),t,r)}int64be(t,r={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",t,r)}int64le(t,r={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",t,r)}uint64(t,r={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),t,r)}uint64be(t,r={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",t,r)}uint64le(t,r={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",t,r)}floatle(t,r={}){return this.primitiveN("floatle",t,r)}floatbe(t,r={}){return this.primitiveN("floatbe",t,r)}doublele(t,r={}){return this.primitiveN("doublele",t,r)}doublebe(t,r={}){return this.primitiveN("doublebe",t,r)}bitN(t,r,n){return n.length=t,this.setNextParser("bit",r,n)}bit1(t,r={}){return this.bitN(1,t,r)}bit2(t,r={}){return this.bitN(2,t,r)}bit3(t,r={}){return this.bitN(3,t,r)}bit4(t,r={}){return this.bitN(4,t,r)}bit5(t,r={}){return this.bitN(5,t,r)}bit6(t,r={}){return this.bitN(6,t,r)}bit7(t,r={}){return this.bitN(7,t,r)}bit8(t,r={}){return this.bitN(8,t,r)}bit9(t,r={}){return this.bitN(9,t,r)}bit10(t,r={}){return this.bitN(10,t,r)}bit11(t,r={}){return this.bitN(11,t,r)}bit12(t,r={}){return this.bitN(12,t,r)}bit13(t,r={}){return this.bitN(13,t,r)}bit14(t,r={}){return this.bitN(14,t,r)}bit15(t,r={}){return this.bitN(15,t,r)}bit16(t,r={}){return this.bitN(16,t,r)}bit17(t,r={}){return this.bitN(17,t,r)}bit18(t,r={}){return this.bitN(18,t,r)}bit19(t,r={}){return this.bitN(19,t,r)}bit20(t,r={}){return this.bitN(20,t,r)}bit21(t,r={}){return this.bitN(21,t,r)}bit22(t,r={}){return this.bitN(22,t,r)}bit23(t,r={}){return this.bitN(23,t,r)}bit24(t,r={}){return this.bitN(24,t,r)}bit25(t,r={}){return this.bitN(25,t,r)}bit26(t,r={}){return this.bitN(26,t,r)}bit27(t,r={}){return this.bitN(27,t,r)}bit28(t,r={}){return this.bitN(28,t,r)}bit29(t,r={}){return this.bitN(29,t,r)}bit30(t,r={}){return this.bitN(30,t,r)}bit31(t,r={}){return this.bitN(31,t,r)}bit32(t,r={}){return this.bitN(32,t,r)}namely(t){return wi.set(t,this),this.alias=t,this}skip(t,r={}){return this.seek(t,r)}seek(t,r={}){if(r.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:t})}string(t,r){if(!r.zeroTerminated&&!r.length&&!r.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((r.zeroTerminated||r.length)&&r.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(r.stripNull&&!(r.length||r.greedy))throw new Error("length or greedy must be defined if stripNull is enabled.");return r.encoding=r.encoding||"utf8",this.setNextParser("string",t,r)}buffer(t,r){if(!r.length&&!r.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",t,r)}wrapped(t,r){if(typeof r!="object"&&typeof t=="object"&&(r=t,t=""),!r||!r.wrapper||!r.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!r.length&&!r.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",t,r)}array(t,r){if(!r.readUntil&&!r.length&&!r.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!r.type)throw new Error("type is required for array.");if(typeof r.type=="string"&&!wi.has(r.type)&&!(r.type in _i))throw new Error(`Array element type "${r.type}" is unkown.`);return this.setNextParser("array",t,r)}choice(t,r){if(typeof r!="object"&&typeof t=="object"&&(r=t,t=""),!r)throw new Error("tag and choices are are required for choice.");if(!r.tag)throw new Error("tag is requird for choice.");if(!r.choices)throw new Error("choices is required for choice.");for(const n in r.choices){const o=parseInt(n,10),i=r.choices[o];if(isNaN(o))throw new Error(`Choice key "${n}" is not a number.`);if(typeof i=="string"&&!wi.has(i)&&!(i in _i))throw new Error(`Choice type "${i}" is unkown.`)}return this.setNextParser("choice",t,r)}nest(t,r){if(typeof r!="object"&&typeof t=="object"&&(r=t,t=""),!r||!r.type)throw new Error("type is required for nest.");if(!(r.type instanceof qo)&&!wi.has(r.type))throw new Error("type must be a known parser name or a Parser object.");if(!(r.type instanceof qo)&&!t)throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",t,r)}pointer(t,r){if(!r.offset)throw new Error("offset is required for pointer.");if(!r.type)throw new Error("type is required for pointer.");if(typeof r.type=="string"&&!(r.type in _i)&&!wi.has(r.type))throw new Error(`Pointer type "${r.type}" is unkown.`);return this.setNextParser("pointer",t,r)}saveOffset(t,r={}){return this.setNextParser("saveOffset",t,r)}endianness(t){switch(t.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(t){return this.endianness(t)}useContextVars(t=!0){return this.useContextVariables=t,this}create(t){if(!(t instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=t,this}getContext(t){const r=new WFe(t,this.useContextVariables);return r.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(r),r.pushCode(`return ${yl+this.alias}(0).result;`)):this.addRawCode(r),r}getCode(){const t="imports";return this.getContext(t).code}addRawCode(t){t.pushCode("var offset = 0;"),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("vars.$parent = null;"),t.pushCode("vars.$root = vars;"),this.generate(t),this.resolveReferences(t),t.pushCode("delete vars.$parent;"),t.pushCode("delete vars.$root;"),t.pushCode("return vars;")}addAliasedCode(t){return t.pushCode(`function ${yl+this.alias}(offset, context) {`),t.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),t.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),t.pushCode("vars = Object.assign(vars, ctx);"),this.generate(t),t.markResolved(this.alias),this.resolveReferences(t),t.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),t.pushCode("return { offset: offset, result: vars };"),t.pushCode("}"),t}resolveReferences(t){const r=t.getUnresolvedReferences();t.markRequested(r),r.forEach(n=>{var o;(o=wi.get(n))===null||o===void 0||o.addAliasedCode(t)})}compile(){const t="imports",r=this.getContext(t);this.compiled=new Function(t,"TextDecoder",`return function (buffer, constructorFn) { ${r.code} };`)(r.imports,TextDecoder)}sizeOf(){let t=NaN;if(Object.keys(_i).indexOf(this.type)>=0)t=_i[this.type];else if(this.type==="string"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="buffer"&&typeof this.options.length=="number")t=this.options.length;else if(this.type==="array"&&typeof this.options.length=="number"){let r=NaN;typeof this.options.type=="string"?r=_i[this.options.type]:this.options.type instanceof qo&&(r=this.options.type.sizeOf()),t=this.options.length*r}else this.type==="seek"?t=this.options.length:this.type==="nest"?t=this.options.type.sizeOf():this.type||(t=0);return this.next&&(t+=this.next.sizeOf()),t}parse(t){return this.compiled||this.compile(),this.compiled(t,this.constructorFn)}setNextParser(t,r,n){const o=new qo;return o.type=t,o.varName=r,o.options=n,o.endian=this.endian,this.head?this.head.next=o:this.next=o,this.head=o,this}generate(t){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,t);break;case"bit":this.generateBit(t);break;case"string":this.generateString(t);break;case"buffer":this.generateBuffer(t);break;case"seek":this.generateSeek(t);break;case"nest":this.generateNest(t);break;case"array":this.generateArray(t);break;case"choice":this.generateChoice(t);break;case"pointer":this.generatePointer(t);break;case"saveOffset":this.generateSaveOffset(t);break;case"wrapper":this.generateWrapper(t);break}this.type!=="bit"&&this.generateAssert(t)}const r=t.generateVariable(this.varName);return this.options.formatter&&this.type!=="bit"&&this.generateFormatter(t,r,this.options.formatter),this.generateNext(t)}generateAssert(t){if(!this.options.assert)return;const r=t.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const n=t.addImport(this.options.assert);t.pushCode(`if (!${n}.call(vars, ${r})) {`)}break;case"number":t.pushCode(`if (${this.options.assert} !== ${r}) {`);break;case"string":t.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${r}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}t.generateError(`"Assertion error: ${r} is " + ${JSON.stringify(this.options.assert.toString())}`),t.pushCode("}")}generateNext(t){return this.next&&(t=this.next.generate(t)),t}generateBit(t){const r=JSON.parse(JSON.stringify(this));if(r.options=this.options,r.generateAssert=this.generateAssert.bind(this),r.generateFormatter=this.generateFormatter.bind(this),r.varName=t.generateVariable(r.varName),t.bitFields.push(r),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const n=t.generateTmpVariable();t.pushCode(`var ${n} = 0;`);const o=(u=0)=>{let d=0;for(let p=u;p32)break;d+=m}return d},i=u=>(u<=8?(t.pushCode(`${n} = dataView.getUint8(offset);`),u=8):u<=16?(t.pushCode(`${n} = dataView.getUint16(offset);`),u=16):u<=24?(t.pushCode(`${n} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),u=24):(t.pushCode(`${n} = dataView.getUint32(offset);`),u=32),t.pushCode(`offset += ${u/8};`),u);let a=0;const s=this.endian==="be";let c=0,l=0;t.bitFields.forEach((u,d)=>{let p=u.options.length;if(p>l){if(l){const A=-1>>>32-l;t.pushCode(`${u.varName} = (${n} & 0x${A.toString(16)}) << ${p-l};`),p-=l}a=0,l=c=i(o(d)-l)}const m=s?c-a-p:a,w=-1>>>32-p;t.pushCode(`${u.varName} ${p> ${m} & 0x${w.toString(16)};`),u.options.length===32&&t.pushCode(`${u.varName} >>>= 0`),u.options.assert&&u.generateAssert(t),u.options.formatter&&u.generateFormatter(t,u.varName,u.options.formatter),a+=p,l-=p}),t.bitFields=[]}}generateSeek(t){const r=t.generateOption(this.options.length);t.pushCode(`offset += ${r};`)}generateString(t){const r=t.generateVariable(this.varName),n=t.generateTmpVariable(),o=this.options.encoding,i=o.toLowerCase()==="hex",a='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const s=this.options.length;t.pushCode(`var ${n} = offset;`),t.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${n} < ${s});`);const c=`offset - ${n} < ${s} ? offset - 1 : offset`;t.pushCode(i?`${r} = Array.from(buffer.subarray(${n}, ${c}), ${a}).join('');`:`${r} = new TextDecoder('${o}').decode(buffer.subarray(${n}, ${c}));`)}else if(this.options.length){const s=t.generateOption(this.options.length);t.pushCode(i?`${r} = Array.from(buffer.subarray(offset, offset + ${s}), ${a}).join('');`:`${r} = new TextDecoder('${o}').decode(buffer.subarray(offset, offset + ${s}));`),t.pushCode(`offset += ${s};`)}else this.options.zeroTerminated?(t.pushCode(`var ${n} = offset;`),t.pushCode("while(dataView.getUint8(offset++) !== 0);"),t.pushCode(i?`${r} = Array.from(buffer.subarray(${n}, offset - 1), ${a}).join('');`:`${r} = new TextDecoder('${o}').decode(buffer.subarray(${n}, offset - 1));`)):this.options.greedy&&(t.pushCode(`var ${n} = offset;`),t.pushCode("while(buffer.length > offset++);"),t.pushCode(i?`${r} = Array.from(buffer.subarray(${n}, offset), ${a}).join('');`:`${r} = new TextDecoder('${o}').decode(buffer.subarray(${n}, offset));`));this.options.stripNull&&t.pushCode(`${r} = ${r}.replace(/\\x00+$/g, '')`)}generateBuffer(t){const r=t.generateVariable(this.varName);if(typeof this.options.readUntil=="function"){const n=this.options.readUntil,o=t.generateTmpVariable(),i=t.generateTmpVariable();t.pushCode(`var ${o} = offset;`),t.pushCode(`var ${i} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${i} = dataView.getUint8(offset);`);const a=t.addImport(n);t.pushCode(`if (${a}.call(${t.generateVariable()}, ${i}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${r} = buffer.subarray(${o}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${r} = buffer.subarray(offset);`);else{const n=t.generateOption(this.options.length);t.pushCode(`${r} = buffer.subarray(offset, offset + ${n});`),t.pushCode(`offset += ${n};`)}this.options.clone&&t.pushCode(`${r} = buffer.constructor.from(${r});`)}generateArray(t){const r=t.generateOption(this.options.length),n=t.generateOption(this.options.lengthInBytes),o=this.options.type,i=t.generateTmpVariable(),a=t.generateVariable(this.varName),s=t.generateTmpVariable(),c=this.options.key,l=typeof c=="string";if(l?t.pushCode(`${a} = {};`):t.pushCode(`${a} = [];`),typeof this.options.readUntil=="function"?t.pushCode("do {"):this.options.readUntil==="eof"?t.pushCode(`for (var ${i} = 0; offset < buffer.length; ${i}++) {`):n!==void 0?t.pushCode(`for (var ${i} = offset + ${n}; offset < ${i}; ) {`):t.pushCode(`for (var ${i} = ${r}; ${i} > 0; ${i}--) {`),typeof o=="string")if(wi.get(o)){const u=t.generateTmpVariable();if(t.pushCode(`var ${u} = ${yl+o}(offset, {`),t.useContextVariables){const d=t.generateVariable();t.pushCode(`$parent: ${d},`),t.pushCode(`$root: ${d}.$root,`),!this.options.readUntil&&n===void 0&&t.pushCode(`$index: ${r} - ${i},`)}t.pushCode("});"),t.pushCode(`var ${s} = ${u}.result; offset = ${u}.offset;`),o!==this.alias&&t.addReference(o)}else{const u=Lm[o],d=Um[o];t.pushCode(`var ${s} = dataView.get${u}(offset, ${d});`),t.pushCode(`offset += ${_i[o]};`)}else if(o instanceof qo){t.pushCode(`var ${s} = {};`);const u=t.generateVariable();t.pushScope(s),t.useContextVariables&&(t.pushCode(`${s}.$parent = ${u};`),t.pushCode(`${s}.$root = ${u}.$root;`),!this.options.readUntil&&n===void 0&&t.pushCode(`${s}.$index = ${r} - ${i};`)),o.generate(t),t.useContextVariables&&(t.pushCode(`delete ${s}.$parent;`),t.pushCode(`delete ${s}.$root;`),t.pushCode(`delete ${s}.$index;`)),t.popScope()}if(l?t.pushCode(`${a}[${s}.${c}] = ${s};`):t.pushCode(`${a}.push(${s});`),t.pushCode("}"),typeof this.options.readUntil=="function"){const u=this.options.readUntil,d=t.addImport(u);t.pushCode(`while (!${d}.call(${t.generateVariable()}, ${s}, buffer.subarray(offset)));`)}}generateChoiceCase(t,r,n){if(typeof n=="string"){const o=t.generateVariable(this.varName);if(wi.has(n)){const i=t.generateTmpVariable();t.pushCode(`var ${i} = ${yl+n}(offset, {`),t.useContextVariables&&(t.pushCode(`$parent: ${o}.$parent,`),t.pushCode(`$root: ${o}.$root,`)),t.pushCode("});"),t.pushCode(`${o} = ${i}.result; offset = ${i}.offset;`),n!==this.alias&&t.addReference(n)}else{const i=Lm[n],a=Um[n];t.pushCode(`${o} = dataView.get${i}(offset, ${a});`),t.pushCode(`offset += ${_i[n]}`)}}else n instanceof qo&&(t.pushPath(r),n.generate(t),t.popPath(r))}generateChoice(t){const r=t.generateOption(this.options.tag),n=t.generateVariable(this.varName);if(this.varName&&(t.pushCode(`${n} = {};`),t.useContextVariables)){const o=t.generateVariable();t.pushCode(`${n}.$parent = ${o};`),t.pushCode(`${n}.$root = ${o}.$root;`)}t.pushCode(`switch(${r}) {`);for(const o in this.options.choices){const i=parseInt(o,10),a=this.options.choices[i];t.pushCode(`case ${i}:`),this.generateChoiceCase(t,this.varName,a),t.pushCode("break;")}t.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(t,this.varName,this.options.defaultChoice):t.generateError(`"Met undefined tag value " + ${r} + " at choice"`),t.pushCode("}"),this.varName&&t.useContextVariables&&(t.pushCode(`delete ${n}.$parent;`),t.pushCode(`delete ${n}.$root;`))}generateNest(t){const r=t.generateVariable(this.varName);if(this.options.type instanceof qo){if(this.varName&&(t.pushCode(`${r} = {};`),t.useContextVariables)){const n=t.generateVariable();t.pushCode(`${r}.$parent = ${n};`),t.pushCode(`${r}.$root = ${n}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),this.varName&&t.useContextVariables&&t.useContextVariables&&(t.pushCode(`delete ${r}.$parent;`),t.pushCode(`delete ${r}.$root;`))}else if(wi.has(this.options.type)){const n=t.generateTmpVariable();if(t.pushCode(`var ${n} = ${yl+this.options.type}(offset, {`),t.useContextVariables){const o=t.generateVariable();t.pushCode(`$parent: ${o},`),t.pushCode(`$root: ${o}.$root,`)}t.pushCode("});"),t.pushCode(`${r} = ${n}.result; offset = ${n}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}}generateWrapper(t){const r=t.generateVariable(this.varName),n=t.generateTmpVariable();if(typeof this.options.readUntil=="function"){const c=this.options.readUntil,l=t.generateTmpVariable(),u=t.generateTmpVariable();t.pushCode(`var ${l} = offset;`),t.pushCode(`var ${u} = 0;`),t.pushCode("while (offset < buffer.length) {"),t.pushCode(`${u} = dataView.getUint8(offset);`);const d=t.addImport(c);t.pushCode(`if (${d}.call(${t.generateVariable()}, ${u}, buffer.subarray(offset))) break;`),t.pushCode("offset += 1;"),t.pushCode("}"),t.pushCode(`${n} = buffer.subarray(${l}, offset);`)}else if(this.options.readUntil==="eof")t.pushCode(`${n} = buffer.subarray(offset);`);else{const c=t.generateOption(this.options.length);t.pushCode(`${n} = buffer.subarray(offset, offset + ${c});`),t.pushCode(`offset += ${c};`)}this.options.clone&&t.pushCode(`${n} = buffer.constructor.from(${n});`);const o=t.generateTmpVariable(),i=t.generateTmpVariable(),a=t.generateTmpVariable(),s=t.addImport(this.options.wrapper);if(t.pushCode(`${n} = ${s}.call(this, ${n}).subarray(0);`),t.pushCode(`var ${o} = buffer;`),t.pushCode(`var ${i} = offset;`),t.pushCode(`var ${a} = dataView;`),t.pushCode(`buffer = ${n};`),t.pushCode("offset = 0;"),t.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof qo)this.varName&&t.pushCode(`${r} = {};`),t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName);else if(wi.has(this.options.type)){const c=t.generateTmpVariable();t.pushCode(`var ${c} = ${yl+this.options.type}(0);`),t.pushCode(`${r} = ${c}.result;`),this.options.type!==this.alias&&t.addReference(this.options.type)}t.pushCode(`buffer = ${o};`),t.pushCode(`dataView = ${a};`),t.pushCode(`offset = ${i};`)}generateFormatter(t,r,n){if(typeof n=="function"){const o=t.addImport(n);t.pushCode(`${r} = ${o}.call(${t.generateVariable()}, ${r});`)}}generatePointer(t){const r=this.options.type,n=t.generateOption(this.options.offset),o=t.generateTmpVariable(),i=t.generateVariable(this.varName);if(t.pushCode(`var ${o} = offset;`),t.pushCode(`offset = ${n};`),this.options.type instanceof qo){if(t.pushCode(`${i} = {};`),t.useContextVariables){const a=t.generateVariable();t.pushCode(`${i}.$parent = ${a};`),t.pushCode(`${i}.$root = ${a}.$root;`)}t.pushPath(this.varName),this.options.type.generate(t),t.popPath(this.varName),t.useContextVariables&&(t.pushCode(`delete ${i}.$parent;`),t.pushCode(`delete ${i}.$root;`))}else if(wi.has(this.options.type)){const a=t.generateTmpVariable();if(t.pushCode(`var ${a} = ${yl+this.options.type}(offset, {`),t.useContextVariables){const s=t.generateVariable();t.pushCode(`$parent: ${s},`),t.pushCode(`$root: ${s}.$root,`)}t.pushCode("});"),t.pushCode(`${i} = ${a}.result; offset = ${a}.offset;`),this.options.type!==this.alias&&t.addReference(this.options.type)}else if(Object.keys(_i).indexOf(this.options.type)>=0){const a=Lm[r],s=Um[r];t.pushCode(`${i} = dataView.get${a}(offset, ${s});`),t.pushCode(`offset += ${_i[r]};`)}t.pushCode(`offset = ${o};`)}generateSaveOffset(t){const r=t.generateVariable(this.varName);t.pushCode(`${r} = offset`)}}or.Parser=qo;var lr={},Au={};Object.defineProperty(Au,"__esModule",{value:!0});Au.assert=void 0;function GFe(e,t){if(!e)throw new Error(t)}Au.assert=GFe;var hg={};Object.defineProperty(hg,"__esModule",{value:!0});hg.BigIntCodec=void 0;class KFe{static encode(t){if(t===0n)return Ze.from([0]);const r=t<0n;let n=r?-t:t;const o=[];for(;n>0n;)o.push(Number(n&0xffn)),n>>=8n;if(!r&&o[o.length-1]&128&&o.push(0),r){let i=!0;for(let a=0;a>8)&255,t&255]):t>24)&255,t>>16&255,t>>8&255,t&255]):Ze.from([At.multiBytePrefix,t>>24&255,t>>16&255,t>>8&255,t&255])}encodeU256(t){if((0,wc.assert)(t>=0n,"Value should be positive"),t=0?t>8)&255,t&255]):t>24)&255,t>>16&255,t>>8&255,t&255]):Ze.from([At.multiBytePrefix,t>>24&255,t>>16&255,t>>8&255,t&255]):t>=-this.oneByteBound?Ze.from([(t^At.oneByteNegPrefix)&255]):t>=-this.twoByteBound?Ze.from([(t>>8^At.twoByteNegPrefix)&255,t&255]):t>=-this.fourByteBound?Ze.from([(t>>24^At.fourByteNegPrefix)&255,t>>16&255,t>>8&255,t&255]):Ze.from([At.multiBytePrefix,t>>24&255,t>>16&255,t>>8&255,t&255])}encodeI256(t){if(t>=-536870912&&t<536870912)return this.encodeI32(Number(t));{const r=Rb.BigIntCodec.encode(t),n=r.length-4+At.multiBytePrefix&255;return Ze.concat([Ze.from([n]),r])}}decodeI256(t){const r=this.decode(t);return this.toI256(r)}toI32(t){const r=Ze.from([t.mode,...t.rest]),n=t.mode&ud;if(qS(n))return(t.mode&JFe)==0?Kee(t.mode,r):ZFe(t.mode,r);if(r.length===5)return(r[1]&255)<<24|(r[2]&255)<<16|(r[3]&255)<<8|r[4]&255;throw new Error(`Expect 4 bytes int, but get ${r.length-1} bytes int`)}toI256(t){const r=t.mode&ud;return qS(r)?BigInt(this.toI32(t)):((0,wc.assert)(t.rest.length<=32,"Expect <= 32 bytes for I256"),Rb.BigIntCodec.decode(Ze.from(t.rest),!0))}}lr.CompactSignedIntCodec=Gee;lr.compactSignedIntCodec=new Gee;function Kee(e,t){switch(e&ud){case At.oneBytePrefix:return e;case At.twoBytePrefix:return(0,wc.assert)(t.length===2,"Length should be 2"),(t[0]&VS)<<8|t[1]&255;case At.fourBytePrefix:return(0,wc.assert)(t.length===4,"Length should be 4"),(t[0]&VS)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255;default:if(t.length===5)return Number(BigInt("0x"+t.slice(1).toString("hex")));throw new Error(`decodePositiveInt: Expect 4 bytes int, but get ${t.length-1} bytes int`)}}function ZFe(e,t){switch(e&ud){case At.oneBytePrefix:return e|q3;case At.twoBytePrefix:return(0,wc.assert)(t.length===2,"Length should be 2"),(t[0]|q3)<<8|t[1]&255;case At.fourBytePrefix:return(0,wc.assert)(t.length===4,"Length should be 4"),(t[0]|q3)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255;default:throw new Error(`decodeNegativeInt: Expect 4 bytes int, but get ${t.length-1} bytes int`)}}function qS(e){return e===At.oneBytePrefix||e===At.twoBytePrefix||e===At.fourBytePrefix}Object.defineProperty(Xn,"__esModule",{value:!0});Xn.ArrayCodec=void 0;const XFe=or,Hh=lr;class uP{constructor(t,r=uP.arrayParser(t.parser)){this.childCodec=t,this.parser=r}encode(t){const r=[...Hh.compactSignedIntCodec.encodeI256(BigInt(t.length))];for(const n of t)r.push(...this.childCodec.encode(n));return Ze.from(r)}decode(t){return this.parser.parse(t).value.map(n=>this.childCodec.decode(n.value))}static arrayParser(t){return new XFe.Parser().nest("length",{type:Hh.compactSignedIntCodec.parser}).array("value",{length:function(r){return Hh.compactSignedIntCodec.toI32(this.length)},type:t})}fromArray(t){return{length:Hh.compactUnsignedIntCodec.decode(Hh.compactUnsignedIntCodec.encodeU32(t.length)),value:t}}}Xn.ArrayCodec=uP;var W3={},Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.signedIntCodec=Pa.SignedIntCodec=void 0;const QFe=or,eje=Au;class Yee{constructor(){this.parser=QFe.Parser.start().buffer("value",{length:4})}encode(t){return Ze.from([t>>24&255,t>>16&255,t>>8&255,t&255])}decode(t){return(0,eje.assert)(t.length===4,"Length should be 4"),(t[0]&255)<<24|(t[1]&255)<<16|(t[2]&255)<<8|t[3]&255}}Pa.SignedIntCodec=Yee;Pa.signedIntCodec=new Yee;var tu={};Object.defineProperty(tu,"__esModule",{value:!0});tu.longCodec=tu.LongCodec=void 0;const tje=or,fN=Au;class Jee{constructor(){this.parser=tje.Parser.start().buffer("value",{length:8})}encode(t){const r=new Uint8Array(8);(0,fN.assert)(r.length<=8,"Length should be less than or equal to 8");for(let n=0;n>=BigInt(8)}return Ze.from(r)}decode(t){(0,fN.assert)(t.length==8,"Length should be 8");let r=BigInt(0),n=BigInt(1);for(let o=t.length-1;o>=0;o--)r+=BigInt(t[o])*n,n*=BigInt(256);return t[0]&128&&(r-=BigInt(1)<{t=(t<<5)+t+(r&255)}),t}_a.djbIntHash=rte;function lje(e){return rte(e)|1}_a.createHint=lje;var q2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.tokensCodec=e.tokenCodec=e.TokenCodec=void 0;const t=or,r=lr,n=Xn;class o{constructor(){this.parser=t.Parser.start().buffer("tokenId",{length:32}).nest("amount",{type:r.compactUnsignedIntCodec.parser})}encode(a){const s=a.tokenId,c=Ze.from(r.compactUnsignedIntCodec.encode(a.amount));return Ze.concat([s,c])}decode(a){return this.parser.parse(a)}}e.TokenCodec=o,e.tokenCodec=new o,e.tokensCodec=new n.ArrayCodec(e.tokenCodec)})(q2);var dN;function W2(){return dN||(dN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.assetOutputsCodec=e.assetOutputCodec=e.AssetOutputCodec=void 0;const t=or,r=Xn,n=lr,o=Pa,i=tu,a=ms,s=Aa,c=_a,l=Fn(),u=q2;class d{constructor(){this.parser=t.Parser.start().nest("amount",{type:n.compactUnsignedIntCodec.parser}).nest("lockupScript",{type:s.lockupScriptCodec.parser}).buffer("lockTime",{length:8}).nest("tokens",{type:u.tokensCodec.parser}).nest("additionalData",{type:a.byteStringCodec.parser})}encode(m){const w=Ze.from(n.compactUnsignedIntCodec.encode(m.amount)),A=s.lockupScriptCodec.encode(m.lockupScript),T=Ze.from(m.lockTime),O=Ze.from(u.tokensCodec.encode(m.tokens.value)),P=Ze.from(a.byteStringCodec.encode(m.additionalData));return Ze.concat([w,A,T,O,P])}decode(m){return this.parser.parse(m)}static toFixedAssetOutputs(m,w){return w.map((A,T)=>d.toFixedAssetOutput(m,A,T))}static toFixedAssetOutput(m,w,A){const T=n.compactUnsignedIntCodec.toU256(w.amount).toString(),O=Number(i.longCodec.decode(w.lockTime)),P=w.tokens.value.map(V=>({id:V.tokenId.toString("hex"),amount:n.compactUnsignedIntCodec.toU256(V.amount).toString()})),$=w.additionalData.value.toString("hex"),R=w.lockupScript.scriptType,j=(0,l.binToHex)((0,c.blakeHash)(Ze.concat([m,o.signedIntCodec.encode(A)]))),I=w.lockupScript.script,b=l.bs58.encode(s.lockupScriptCodec.encode(w.lockupScript));let N;if(R===0)N=(0,c.createHint)(I.publicKeyHash);else if(R===1)N=(0,c.createHint)(I.publicKeyHashes.value[0].publicKeyHash);else if(R===2)N=(0,c.createHint)(I.scriptHash);else if(R===3)N=(0,c.createHint)(I.contractId);else throw new Error(`TODO: decode output script type: ${R}`);return{hint:N,key:j,attoAlphAmount:T,lockTime:O,tokens:P,address:b,message:$}}static fromFixedAssetOutputs(m){return m.map(w=>d.fromFixedAssetOutput(w))}static fromFixedAssetOutput(m){const w=n.compactUnsignedIntCodec.decode(n.compactUnsignedIntCodec.encodeU256(BigInt(m.attoAlphAmount))),A=i.longCodec.encode(BigInt(m.lockTime)),T=s.lockupScriptCodec.decode(Ze.from(l.bs58.decode(m.address))),O=m.tokens.map(j=>({tokenId:Ze.from(j.id,"hex"),amount:n.compactUnsignedIntCodec.decode(n.compactUnsignedIntCodec.encodeU256(BigInt(j.amount)))})),P={length:n.compactUnsignedIntCodec.decode(n.compactUnsignedIntCodec.encodeU32(O.length)),value:O},$=Ze.from(m.message,"hex"),R={length:n.compactUnsignedIntCodec.decode(n.compactUnsignedIntCodec.encodeU32($.length)),value:$};return{amount:w,lockupScript:T,lockTime:A,tokens:P,additionalData:R}}}e.AssetOutputCodec=d,e.assetOutputCodec=new d,e.assetOutputsCodec=new r.ArrayCodec(e.assetOutputCodec)}(W3)),W3}var bl={},hN;function fP(){if(hN)return bl;hN=1,Object.defineProperty(bl,"__esModule",{value:!0}),bl.contractOutputCodec=bl.ContractOutputCodec=void 0;const e=or,t=lr,r=q2,n=_a,o=qc(),i=Pa,a=Aa;class s{constructor(){this.parser=e.Parser.start().nest("amount",{type:t.compactUnsignedIntCodec.parser}).nest("lockupScript",{type:e.Parser.start().buffer("contractId",{length:32})}).nest("tokens",{type:r.tokensCodec.parser})}encode(l){const u=Ze.from(t.compactUnsignedIntCodec.encode(l.amount)),d=l.lockupScript.contractId,p=Ze.from(r.tokensCodec.encode(l.tokens.value));return Ze.concat([u,d,p])}decode(l){return this.parser.parse(l)}static convertToApiContractOutput(l,u,d){const p=(0,n.createHint)(u.lockupScript.contractId),m=(0,o.binToHex)((0,n.blakeHash)(Ze.concat([l,i.signedIntCodec.encode(d)]))),w=t.compactUnsignedIntCodec.toU256(u.amount).toString(),A=o.bs58.encode(Ze.concat([Ze.from([3]),u.lockupScript.contractId])),T=u.tokens.value.map(O=>({id:O.tokenId.toString("hex"),amount:t.compactUnsignedIntCodec.toU256(O.amount).toString()}));return{hint:p,key:m,attoAlphAmount:w,address:A,tokens:T,type:"ContractOutput"}}static convertToOutput(l){const u=t.compactUnsignedIntCodec.decode(t.compactUnsignedIntCodec.encodeU256(BigInt(l.attoAlphAmount))),d=a.lockupScriptCodec.decode(Ze.from(o.bs58.decode(l.address))).script,p=l.tokens.map(w=>({tokenId:Ze.from(w.id,"hex"),amount:t.compactUnsignedIntCodec.decode(t.compactUnsignedIntCodec.encodeU256(BigInt(w.amount)))})),m={length:t.compactUnsignedIntCodec.decode(t.compactUnsignedIntCodec.encodeU32(p.length)),value:p};return{amount:u,lockupScript:d,tokens:m}}}return bl.ContractOutputCodec=s,bl.contractOutputCodec=new s,bl}var dP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.contractOutputRefsCodec=e.contractOutputRefCodec=e.ContractOutputRefCodec=void 0;const t=or,r=Xn,n=Pa;class o{constructor(){this.parser=t.Parser.start().int32("hint").buffer("key",{length:32})}encode(a){return Ze.concat([Ze.from([...n.signedIntCodec.encode(a.hint),...a.key])])}decode(a){return this.parser.parse(a)}}e.ContractOutputRefCodec=o,e.contractOutputRefCodec=new o,e.contractOutputRefsCodec=new r.ArrayCodec(e.contractOutputRefCodec)})(dP);var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.EitherCodec=void 0;const uje=or;class fje{constructor(t,r,n=uje.Parser.start().uint8("either").choice("value",{tag:"either",choices:{0:t.parser,1:r.parser}})){this.leftCodec=t,this.rightCodec=r,this.parser=n}encode(t){const r=[t.either];return t.either===0?r.push(...this.leftCodec.encode(t.value)):r.push(...this.rightCodec.encode(t.value)),Ze.from(r)}decode(t){const r=this.parser.parse(t);return{...r,value:r.either===0?this.leftCodec.decode(r.value.value):this.rightCodec.decode(r.value.value)}}fromLeft(t){return{either:0,value:t}}fromRight(t){return{either:1,value:t}}}pg.EitherCodec=fje;var G3={},ns={},G2={},K2={},hP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.U256Lt=e.U256Neq=e.U256Eq=e.U256Mod=e.U256Div=e.U256Mul=e.U256Sub=e.U256Add=e.I256Ge=e.I256Gt=e.I256Le=e.I256Lt=e.I256Neq=e.I256Eq=e.I256Mod=e.I256Div=e.I256Mul=e.I256Sub=e.I256Add=e.BoolToByteVec=e.BoolNeq=e.BoolEq=e.BoolOr=e.BoolAnd=e.BoolNot=e.Pop=e.StoreLocal=e.LoadLocal=e.AddressConst=e.ByteConst=e.U256Const=e.I256Const=e.U256Const5=e.U256Const4=e.U256Const3=e.U256Const2=e.U256Const1=e.U256Const0=e.I256ConstN1=e.I256Const5=e.I256Const4=e.I256Const3=e.I256Const2=e.I256Const1=e.I256Const0=e.ConstFalse=e.ConstTrue=e.Return=e.CallExternal=e.CallLocal=void 0,e.ByteVecToAddress=e.ByteVecSlice=e.Log5=e.Log4=e.Log3=e.Log2=e.Log1=e.VerifyRelativeLocktime=e.VerifyAbsoluteLocktime=e.TxInputsSize=e.TxInputAddressAt=e.TxId=e.BlockTarget=e.BlockTimeStamp=e.NetworkId=e.VerifyED25519=e.VerifySecP256K1=e.VerifyTxSignature=e.Sha3=e.Sha256=e.Keccak256=e.Blake2b=e.Assert=e.IfFalse=e.IfTrue=e.Jump=e.IsContractAddress=e.IsAssetAddress=e.AddressToByteVec=e.AddressNeq=e.AddressEq=e.ByteVecConcat=e.ByteVecSize=e.ByteVecNeq=e.ByteVecEq=e.U256ToByteVec=e.U256ToI256=e.I256ToByteVec=e.I256ToU256=e.U256SHR=e.U256SHL=e.U256Xor=e.U256BitOr=e.U256BitAnd=e.U256ModMul=e.U256ModSub=e.U256ModAdd=e.U256Ge=e.U256Gt=e.U256Le=void 0,e.TransferAlphToSelf=e.TransferAlphFromSelf=e.TransferAlph=e.IsPaying=e.TokenRemaining=e.AlphRemaining=e.ApproveToken=e.ApproveAlph=e.StoreMutField=e.LoadMutField=e.BoolToString=e.I256ToString=e.U256ToString=e.AddModN=e.MulModN=e.GetSegragatedSignature=e.VerifyBIP340Schnorr=e.U256ModExp=e.U256Exp=e.I256Exp=e.TxGasFee=e.TxGasAmount=e.TxGasPrice=e.DEBUG=e.BlockHash=e.Swap=e.AssertWithErrorCode=e.Dup=e.StoreLocalByIndex=e.LoadLocalByIndex=e.ContractIdToAddress=e.Log9=e.Log8=e.Log7=e.Log6=e.EthEcRecover=e.U256From32Byte=e.U256From16Byte=e.U256From8Byte=e.U256From4Byte=e.U256From2Byte=e.U256From1Byte=e.U256To32Byte=e.U256To16Byte=e.U256To8Byte=e.U256To4Byte=e.U256To2Byte=e.U256To1Byte=e.Zeros=e.Encode=void 0,e.instrsCodec=e.instrCodec=e.InstrCodec=e.LoadImmFieldByIndex=e.LoadImmField=e.AlphTokenId=e.SubContractIdOf=e.SubContractId=e.NullContractAddress=e.CopyCreateSubContractAndTransferToken=e.CreateSubContractAndTransferToken=e.CopyCreateContractAndTransferToken=e.CreateContractAndTransferToken=e.ContractExists=e.StoreMutFieldByIndex=e.LoadMutFieldByIndex=e.CopyCreateSubContractWithToken=e.CopyCreateSubContract=e.CreateSubContractWithToken=e.CreateSubContract=e.LockApprovedAssets=e.BurnToken=e.CopyCreateContractWithToken=e.MigrateWithFields=e.MigrateSimple=e.ContractInitialCodeHash=e.ContractInitialStateHash=e.CallerCodeHash=e.CallerInitialStateHash=e.IsCallerFromTxScript=e.CallerAddress=e.CallerContractId=e.SelfAddress=e.SelfContractId=e.DestroySelf=e.CopyCreateContract=e.CreateContractWithToken=e.CreateContract=e.TransferTokenToSelf=e.TransferTokenFromSelf=e.TransferToken=void 0;const t=or,r=Xn,n=lr,o=ms,i=Aa,a=new r.ArrayCodec(o.byteStringCodec),s=b=>({code:0,value:{index:b}});e.CallLocal=s;const c=b=>({code:1,value:{index:b}});e.CallExternal=c,e.Return={code:2,value:{}},e.ConstTrue={code:3,value:{}},e.ConstFalse={code:4,value:{}},e.I256Const0={code:5,value:{}},e.I256Const1={code:6,value:{}},e.I256Const2={code:7,value:{}},e.I256Const3={code:8,value:{}},e.I256Const4={code:9,value:{}},e.I256Const5={code:10,value:{}},e.I256ConstN1={code:11,value:{}},e.U256Const0={code:12,value:{}},e.U256Const1={code:13,value:{}},e.U256Const2={code:14,value:{}},e.U256Const3={code:15,value:{}},e.U256Const4={code:16,value:{}},e.U256Const5={code:17,value:{}};const l=b=>({code:18,value:{value:b}});e.I256Const=l;const u=b=>({code:19,value:{value:b}});e.U256Const=u;const d=b=>({code:20,value:{value:b}});e.ByteConst=d;const p=b=>({code:21,value:{value:b}});e.AddressConst=p;const m=b=>({code:22,value:{index:b}});e.LoadLocal=m;const w=b=>({code:23,value:{index:b}});e.StoreLocal=w,e.Pop={code:24,value:{}},e.BoolNot={code:25,value:{}},e.BoolAnd={code:26,value:{}},e.BoolOr={code:27,value:{}},e.BoolEq={code:28,value:{}},e.BoolNeq={code:29,value:{}},e.BoolToByteVec={code:30,value:{}},e.I256Add={code:31,value:{}},e.I256Sub={code:32,value:{}},e.I256Mul={code:33,value:{}},e.I256Div={code:34,value:{}},e.I256Mod={code:35,value:{}},e.I256Eq={code:36,value:{}},e.I256Neq={code:37,value:{}},e.I256Lt={code:38,value:{}},e.I256Le={code:39,value:{}},e.I256Gt={code:40,value:{}},e.I256Ge={code:41,value:{}},e.U256Add={code:42,value:{}},e.U256Sub={code:43,value:{}},e.U256Mul={code:44,value:{}},e.U256Div={code:45,value:{}},e.U256Mod={code:46,value:{}},e.U256Eq={code:47,value:{}},e.U256Neq={code:48,value:{}},e.U256Lt={code:49,value:{}},e.U256Le={code:50,value:{}},e.U256Gt={code:51,value:{}},e.U256Ge={code:52,value:{}},e.U256ModAdd={code:53,value:{}},e.U256ModSub={code:54,value:{}},e.U256ModMul={code:55,value:{}},e.U256BitAnd={code:56,value:{}},e.U256BitOr={code:57,value:{}},e.U256Xor={code:58,value:{}},e.U256SHL={code:59,value:{}},e.U256SHR={code:60,value:{}},e.I256ToU256={code:61,value:{}},e.I256ToByteVec={code:62,value:{}},e.U256ToI256={code:63,value:{}},e.U256ToByteVec={code:64,value:{}},e.ByteVecEq={code:65,value:{}},e.ByteVecNeq={code:66,value:{}},e.ByteVecSize={code:67,value:{}},e.ByteVecConcat={code:68,value:{}},e.AddressEq={code:69,value:{}},e.AddressNeq={code:70,value:{}},e.AddressToByteVec={code:71,value:{}},e.IsAssetAddress={code:72,value:{}},e.IsContractAddress={code:73,value:{}};const A=b=>({code:74,value:b});e.Jump=A;const T=b=>({code:75,value:b});e.IfTrue=T;const O=b=>({code:76,value:{value:b}});e.IfFalse=O,e.Assert={code:77,value:{}},e.Blake2b={code:78,value:{}},e.Keccak256={code:79,value:{}},e.Sha256={code:80,value:{}},e.Sha3={code:81,value:{}},e.VerifyTxSignature={code:82,value:{}},e.VerifySecP256K1={code:83,value:{}},e.VerifyED25519={code:84,value:{}},e.NetworkId={code:85,value:{}},e.BlockTimeStamp={code:86,value:{}},e.BlockTarget={code:87,value:{}},e.TxId={code:88,value:{}},e.TxInputAddressAt={code:89,value:{}},e.TxInputsSize={code:90,value:{}},e.VerifyAbsoluteLocktime={code:91,value:{}},e.VerifyRelativeLocktime={code:92,value:{}},e.Log1={code:93,value:{}},e.Log2={code:94,value:{}},e.Log3={code:95,value:{}},e.Log4={code:96,value:{}},e.Log5={code:97,value:{}},e.ByteVecSlice={code:98,value:{}},e.ByteVecToAddress={code:99,value:{}},e.Encode={code:100,value:{}},e.Zeros={code:101,value:{}},e.U256To1Byte={code:102,value:{}},e.U256To2Byte={code:103,value:{}},e.U256To4Byte={code:104,value:{}},e.U256To8Byte={code:105,value:{}},e.U256To16Byte={code:106,value:{}},e.U256To32Byte={code:107,value:{}},e.U256From1Byte={code:108,value:{}},e.U256From2Byte={code:109,value:{}},e.U256From4Byte={code:110,value:{}},e.U256From8Byte={code:111,value:{}},e.U256From16Byte={code:112,value:{}},e.U256From32Byte={code:113,value:{}},e.EthEcRecover={code:114,value:{}},e.Log6={code:115,value:{}},e.Log7={code:116,value:{}},e.Log8={code:117,value:{}},e.Log9={code:118,value:{}},e.ContractIdToAddress={code:119,value:{}},e.LoadLocalByIndex={code:120,value:{}},e.StoreLocalByIndex={code:121,value:{}},e.Dup={code:122,value:{}},e.AssertWithErrorCode={code:123,value:{}},e.Swap={code:124,value:{}},e.BlockHash={code:125,value:{}};const P=b=>({code:126,value:{stringParts:b}});e.DEBUG=P,e.TxGasPrice={code:127,value:{}},e.TxGasAmount={code:128,value:{}},e.TxGasFee={code:129,value:{}},e.I256Exp={code:130,value:{}},e.U256Exp={code:131,value:{}},e.U256ModExp={code:132,value:{}},e.VerifyBIP340Schnorr={code:133,value:{}},e.GetSegragatedSignature={code:134,value:{}},e.MulModN={code:135,value:{}},e.AddModN={code:136,value:{}},e.U256ToString={code:137,value:{}},e.I256ToString={code:138,value:{}},e.BoolToString={code:139,value:{}};const $=b=>({code:160,value:{index:b}});e.LoadMutField=$;const R=b=>({code:161,value:{index:b}});e.StoreMutField=R,e.ApproveAlph={code:162,value:{}},e.ApproveToken={code:163,value:{}},e.AlphRemaining={code:164,value:{}},e.TokenRemaining={code:165,value:{}},e.IsPaying={code:166,value:{}},e.TransferAlph={code:167,value:{}},e.TransferAlphFromSelf={code:168,value:{}},e.TransferAlphToSelf={code:169,value:{}},e.TransferToken={code:170,value:{}},e.TransferTokenFromSelf={code:171,value:{}},e.TransferTokenToSelf={code:172,value:{}},e.CreateContract={code:173,value:{}},e.CreateContractWithToken={code:174,value:{}},e.CopyCreateContract={code:175,value:{}},e.DestroySelf={code:176,value:{}},e.SelfContractId={code:177,value:{}},e.SelfAddress={code:178,value:{}},e.CallerContractId={code:179,value:{}},e.CallerAddress={code:180,value:{}},e.IsCallerFromTxScript={code:181,value:{}},e.CallerInitialStateHash={code:182,value:{}},e.CallerCodeHash={code:183,value:{}},e.ContractInitialStateHash={code:184,value:{}},e.ContractInitialCodeHash={code:185,value:{}},e.MigrateSimple={code:186,value:{}},e.MigrateWithFields={code:187,value:{}},e.CopyCreateContractWithToken={code:188,value:{}},e.BurnToken={code:189,value:{}},e.LockApprovedAssets={code:190,value:{}},e.CreateSubContract={code:191,value:{}},e.CreateSubContractWithToken={code:192,value:{}},e.CopyCreateSubContract={code:193,value:{}},e.CopyCreateSubContractWithToken={code:194,value:{}},e.LoadMutFieldByIndex={code:195,value:{}},e.StoreMutFieldByIndex={code:196,value:{}},e.ContractExists={code:197,value:{}},e.CreateContractAndTransferToken={code:198,value:{}},e.CopyCreateContractAndTransferToken={code:199,value:{}},e.CreateSubContractAndTransferToken={code:200,value:{}},e.CopyCreateSubContractAndTransferToken={code:201,value:{}},e.NullContractAddress={code:202,value:{}},e.SubContractId={code:203,value:{}},e.SubContractIdOf={code:204,value:{}},e.AlphTokenId={code:205,value:{}};const j=b=>({code:206,value:{index:b}});e.LoadImmField=j,e.LoadImmFieldByIndex={code:207,value:{}};class I{constructor(){this.parser=t.Parser.start().uint8("code").choice("value",{tag:"code",choices:{0:t.Parser.start().uint8("index"),1:t.Parser.start().uint8("index"),[e.Return.code]:t.Parser.start(),[e.ConstTrue.code]:t.Parser.start(),[e.ConstFalse.code]:t.Parser.start(),[e.I256Const0.code]:t.Parser.start(),[e.I256Const1.code]:t.Parser.start(),[e.I256Const2.code]:t.Parser.start(),[e.I256Const3.code]:t.Parser.start(),[e.I256Const4.code]:t.Parser.start(),[e.I256Const5.code]:t.Parser.start(),[e.I256ConstN1.code]:t.Parser.start(),[e.U256Const0.code]:t.Parser.start(),[e.U256Const1.code]:t.Parser.start(),[e.U256Const2.code]:t.Parser.start(),[e.U256Const3.code]:t.Parser.start(),[e.U256Const4.code]:t.Parser.start(),[e.U256Const5.code]:t.Parser.start(),18:t.Parser.start().nest("value",{type:n.compactSignedIntCodec.parser}),19:t.Parser.start().nest("value",{type:n.compactUnsignedIntCodec.parser}),20:t.Parser.start().nest("value",{type:o.byteStringCodec.parser}),21:t.Parser.start().nest("value",{type:i.lockupScriptCodec.parser}),22:t.Parser.start().uint8("index"),23:t.Parser.start().uint8("index"),[e.Pop.code]:t.Parser.start(),[e.BoolNot.code]:t.Parser.start(),[e.BoolAnd.code]:t.Parser.start(),[e.BoolOr.code]:t.Parser.start(),[e.BoolEq.code]:t.Parser.start(),[e.BoolNeq.code]:t.Parser.start(),[e.BoolToByteVec.code]:t.Parser.start(),[e.I256Add.code]:t.Parser.start(),[e.I256Sub.code]:t.Parser.start(),[e.I256Mul.code]:t.Parser.start(),[e.I256Div.code]:t.Parser.start(),[e.I256Mod.code]:t.Parser.start(),[e.I256Eq.code]:t.Parser.start(),[e.I256Neq.code]:t.Parser.start(),[e.I256Lt.code]:t.Parser.start(),[e.I256Le.code]:t.Parser.start(),[e.I256Gt.code]:t.Parser.start(),[e.I256Ge.code]:t.Parser.start(),[e.U256Add.code]:t.Parser.start(),[e.U256Sub.code]:t.Parser.start(),[e.U256Mul.code]:t.Parser.start(),[e.U256Div.code]:t.Parser.start(),[e.U256Mod.code]:t.Parser.start(),[e.U256Eq.code]:t.Parser.start(),[e.U256Neq.code]:t.Parser.start(),[e.U256Lt.code]:t.Parser.start(),[e.U256Le.code]:t.Parser.start(),[e.U256Gt.code]:t.Parser.start(),[e.U256Ge.code]:t.Parser.start(),[e.U256ModAdd.code]:t.Parser.start(),[e.U256ModSub.code]:t.Parser.start(),[e.U256ModMul.code]:t.Parser.start(),[e.U256BitAnd.code]:t.Parser.start(),[e.U256BitOr.code]:t.Parser.start(),[e.U256Xor.code]:t.Parser.start(),[e.U256SHL.code]:t.Parser.start(),[e.U256SHR.code]:t.Parser.start(),[e.I256ToU256.code]:t.Parser.start(),[e.I256ToByteVec.code]:t.Parser.start(),[e.U256ToI256.code]:t.Parser.start(),[e.U256ToByteVec.code]:t.Parser.start(),[e.ByteVecEq.code]:t.Parser.start(),[e.ByteVecNeq.code]:t.Parser.start(),[e.ByteVecSize.code]:t.Parser.start(),[e.ByteVecConcat.code]:t.Parser.start(),[e.AddressEq.code]:t.Parser.start(),[e.AddressNeq.code]:t.Parser.start(),[e.AddressToByteVec.code]:t.Parser.start(),[e.IsAssetAddress.code]:t.Parser.start(),[e.IsContractAddress.code]:t.Parser.start(),74:t.Parser.start().nest("value",{type:n.compactUnsignedIntCodec.parser}),75:t.Parser.start().nest("value",{type:n.compactUnsignedIntCodec.parser}),76:t.Parser.start().nest("value",{type:n.compactUnsignedIntCodec.parser}),[e.Assert.code]:t.Parser.start(),[e.Blake2b.code]:t.Parser.start(),[e.Keccak256.code]:t.Parser.start(),[e.Sha256.code]:t.Parser.start(),[e.Sha3.code]:t.Parser.start(),[e.VerifyTxSignature.code]:t.Parser.start(),[e.VerifySecP256K1.code]:t.Parser.start(),[e.VerifyED25519.code]:t.Parser.start(),[e.NetworkId.code]:t.Parser.start(),[e.BlockTimeStamp.code]:t.Parser.start(),[e.BlockTarget.code]:t.Parser.start(),[e.TxId.code]:t.Parser.start(),[e.TxInputAddressAt.code]:t.Parser.start(),[e.TxInputsSize.code]:t.Parser.start(),[e.VerifyAbsoluteLocktime.code]:t.Parser.start(),[e.VerifyRelativeLocktime.code]:t.Parser.start(),[e.Log1.code]:t.Parser.start(),[e.Log2.code]:t.Parser.start(),[e.Log3.code]:t.Parser.start(),[e.Log4.code]:t.Parser.start(),[e.Log5.code]:t.Parser.start(),[e.ByteVecSlice.code]:t.Parser.start(),[e.ByteVecToAddress.code]:t.Parser.start(),[e.Encode.code]:t.Parser.start(),[e.Zeros.code]:t.Parser.start(),[e.U256To1Byte.code]:t.Parser.start(),[e.U256To2Byte.code]:t.Parser.start(),[e.U256To4Byte.code]:t.Parser.start(),[e.U256To8Byte.code]:t.Parser.start(),[e.U256To16Byte.code]:t.Parser.start(),[e.U256To32Byte.code]:t.Parser.start(),[e.U256From1Byte.code]:t.Parser.start(),[e.U256From2Byte.code]:t.Parser.start(),[e.U256From4Byte.code]:t.Parser.start(),[e.U256From8Byte.code]:t.Parser.start(),[e.U256From16Byte.code]:t.Parser.start(),[e.U256From32Byte.code]:t.Parser.start(),[e.EthEcRecover.code]:t.Parser.start(),[e.Log6.code]:t.Parser.start(),[e.Log7.code]:t.Parser.start(),[e.Log8.code]:t.Parser.start(),[e.Log9.code]:t.Parser.start(),[e.ContractIdToAddress.code]:t.Parser.start(),[e.LoadLocalByIndex.code]:t.Parser.start(),[e.StoreLocalByIndex.code]:t.Parser.start(),[e.Dup.code]:t.Parser.start(),[e.AssertWithErrorCode.code]:t.Parser.start(),[e.Swap.code]:t.Parser.start(),[e.BlockHash.code]:t.Parser.start(),126:t.Parser.start().nest("stringParts",{type:a.parser}),[e.TxGasPrice.code]:t.Parser.start(),[e.TxGasAmount.code]:t.Parser.start(),[e.TxGasFee.code]:t.Parser.start(),[e.I256Exp.code]:t.Parser.start(),[e.U256Exp.code]:t.Parser.start(),[e.U256ModExp.code]:t.Parser.start(),[e.VerifyBIP340Schnorr.code]:t.Parser.start(),[e.GetSegragatedSignature.code]:t.Parser.start(),[e.MulModN.code]:t.Parser.start(),[e.AddModN.code]:t.Parser.start(),[e.U256ToString.code]:t.Parser.start(),[e.I256ToString.code]:t.Parser.start(),[e.BoolToString.code]:t.Parser.start(),160:t.Parser.start().uint8("index"),161:t.Parser.start().uint8("index"),[e.ApproveAlph.code]:t.Parser.start(),[e.ApproveToken.code]:t.Parser.start(),[e.AlphRemaining.code]:t.Parser.start(),[e.TokenRemaining.code]:t.Parser.start(),[e.IsPaying.code]:t.Parser.start(),[e.TransferAlph.code]:t.Parser.start(),[e.TransferAlphFromSelf.code]:t.Parser.start(),[e.TransferAlphToSelf.code]:t.Parser.start(),[e.TransferToken.code]:t.Parser.start(),[e.TransferTokenFromSelf.code]:t.Parser.start(),[e.TransferTokenToSelf.code]:t.Parser.start(),[e.CreateContract.code]:t.Parser.start(),[e.CreateContractWithToken.code]:t.Parser.start(),[e.CopyCreateContract.code]:t.Parser.start(),[e.DestroySelf.code]:t.Parser.start(),[e.SelfContractId.code]:t.Parser.start(),[e.SelfAddress.code]:t.Parser.start(),[e.CallerContractId.code]:t.Parser.start(),[e.CallerAddress.code]:t.Parser.start(),[e.IsCallerFromTxScript.code]:t.Parser.start(),[e.CallerInitialStateHash.code]:t.Parser.start(),[e.CallerCodeHash.code]:t.Parser.start(),[e.ContractInitialStateHash.code]:t.Parser.start(),[e.ContractInitialCodeHash.code]:t.Parser.start(),[e.MigrateSimple.code]:t.Parser.start(),[e.MigrateWithFields.code]:t.Parser.start(),[e.CopyCreateContractWithToken.code]:t.Parser.start(),[e.BurnToken.code]:t.Parser.start(),[e.LockApprovedAssets.code]:t.Parser.start(),[e.CreateSubContract.code]:t.Parser.start(),[e.CreateSubContractWithToken.code]:t.Parser.start(),[e.CopyCreateSubContract.code]:t.Parser.start(),[e.CopyCreateSubContractWithToken.code]:t.Parser.start(),[e.LoadMutFieldByIndex.code]:t.Parser.start(),[e.StoreMutFieldByIndex.code]:t.Parser.start(),[e.ContractExists.code]:t.Parser.start(),[e.CreateContractAndTransferToken.code]:t.Parser.start(),[e.CopyCreateContractAndTransferToken.code]:t.Parser.start(),[e.CreateSubContractAndTransferToken.code]:t.Parser.start(),[e.CopyCreateSubContractAndTransferToken.code]:t.Parser.start(),[e.NullContractAddress.code]:t.Parser.start(),[e.SubContractId.code]:t.Parser.start(),[e.SubContractIdOf.code]:t.Parser.start(),[e.AlphTokenId.code]:t.Parser.start(),206:t.Parser.start().uint8("index"),[e.LoadImmFieldByIndex.code]:t.Parser.start()}})}encode(N){const V=N.value,Z=[N.code],q=[0,1,22,23,160,161,206],_=[18,19,74,75,76];return N.code===20?Z.push(...o.byteStringCodec.encode(V.value)):N.code===21?Z.push(...i.lockupScriptCodec.encode(V.value)):N.code===126?Z.push(...a.encode(V.stringParts.value)):_.includes(N.code)?Z.push(...n.compactUnsignedIntCodec.encode(V.value)):q.includes(N.code)&&Z.push(V.index),Ze.from(Z)}decode(N){return this.parser.parse(N)}}e.InstrCodec=I,e.instrCodec=new I,e.instrsCodec=new r.ArrayCodec(e.instrCodec)})(hP);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.methodsCodec=e.methodCodec=e.MethodCodec=void 0;const t=or,r=Xn,n=lr,o=hP;class i{constructor(){this.parser=t.Parser.start().uint8("isPublic").uint8("assetModifier").nest("argsLength",{type:n.compactUnsignedIntCodec.parser}).nest("localsLength",{type:n.compactUnsignedIntCodec.parser}).nest("returnLength",{type:n.compactUnsignedIntCodec.parser}).nest("instrs",{type:o.instrsCodec.parser})}encode(s){const c=[s.isPublic,s.assetModifier];return c.push(...n.compactUnsignedIntCodec.encode(s.argsLength)),c.push(...n.compactUnsignedIntCodec.encode(s.localsLength)),c.push(...n.compactUnsignedIntCodec.encode(s.returnLength)),c.push(...o.instrsCodec.encode(s.instrs.value)),Ze.from(c)}decode(s){return this.parser.parse(s)}static toMethod(s){return{isPublic:s.isPublic===1,assetModifier:s.assetModifier,argsLength:n.compactUnsignedIntCodec.toU32(s.argsLength),localsLength:n.compactUnsignedIntCodec.toU32(s.localsLength),returnLength:n.compactUnsignedIntCodec.toU32(s.returnLength),instrs:s.instrs.value}}}e.MethodCodec=i,e.methodCodec=new i,e.methodsCodec=new r.ArrayCodec(e.methodCodec)})(K2);var gg={};Object.defineProperty(gg,"__esModule",{value:!0});gg.OptionCodec=void 0;const pN=or;class dje{constructor(t,r=new pN.Parser().uint8("option").choice("value",{tag:"option",choices:{0:new pN.Parser,1:t.parser}})){this.childCodec=t,this.parser=r}encode(t){const r=[t.option];return t.option===1&&r.push(...this.childCodec.encode(t.value)),Ze.from(r)}decode(t){const r=this.parser.parse(t);return{...r,value:r.option?this.childCodec.decode(r.value.value):void 0}}fromBuffer(t){return{option:t?1:0,value:t?this.childCodec.decode(t):void 0}}}gg.OptionCodec=dje;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.statefulScriptCodecOpt=e.scriptCodec=e.ScriptCodec=void 0;const t=or,r=K2,n=gg;class o{constructor(){this.parser=t.Parser.start().nest("methods",{type:r.methodsCodec.parser})}encode(a){const s=r.methodsCodec.encode(a.methods.value);return Ze.from(s)}decode(a){return this.parser.parse(a)}}e.ScriptCodec=o,e.scriptCodec=new o,e.statefulScriptCodecOpt=new n.OptionCodec(e.scriptCodec)})(G2);Object.defineProperty(ns,"__esModule",{value:!0});ns.unlockScriptCodec=ns.UnlockScriptCodec=ns.P2SHCodec=void 0;const $c=or,nte=Xn,Rl=lr,gN=G2,mN=ms,vN=Aa;class hje{constructor(){this.parser=$c.Parser.start().buffer("publicKey",{length:33})}encode(t){return t.publicKey}decode(t){return this.parser.parse(t)}}const WS=new hje;class pje{constructor(){this.parser=$c.Parser.start().nest("publicKeys",{type:nte.ArrayCodec.arrayParser($c.Parser.start().nest("publicKey",{type:WS.parser}).nest("index",{type:Rl.compactUnsignedIntCodec.parser}))})}encode(t){return Ze.concat([Ze.from(Rl.compactUnsignedIntCodec.encode(t.publicKeys.length)),...t.publicKeys.value.map(r=>Ze.concat([r.publicKey.publicKey,Ze.from(Rl.compactUnsignedIntCodec.encode(r.index))]))])}decode(t){return this.parser.parse(t)}}const yN=new pje;class gje{constructor(){this.parser=$c.Parser.start().int8("type").choice("val",{tag:"type",choices:{0:new $c.Parser().uint8("value"),1:Rl.compactSignedIntCodec.parser,2:Rl.compactUnsignedIntCodec.parser,3:mN.byteStringCodec.parser,4:vN.lockupScriptCodec.parser}})}encode(t){const r=t.type;if(r===0)return Ze.from([r,t.val]);if(r===1)return Ze.from([r,...Rl.compactUnsignedIntCodec.encode(t.val)]);if(r===2)return Ze.from([r,...Rl.compactUnsignedIntCodec.encode(t.val)]);if(r===3)return Ze.from([r,...mN.byteStringCodec.encode(t.val)]);if(r===4)return Ze.from([r,...vN.lockupScriptCodec.encode(t.val)]);throw new Error(`ValCodec: unsupported val type: ${r}`)}decode(t){return this.parser.parse(t)}}const mje=new gje,bN=new nte.ArrayCodec(mje);class ote{constructor(){this.parser=$c.Parser.start().nest("script",{type:gN.scriptCodec.parser}).nest("params",{type:bN.parser})}encode(t){return Ze.concat([gN.scriptCodec.encode(t.script),bN.encode(t.params.value)])}decode(t){return this.parser.parse(t)}}ns.P2SHCodec=ote;const wN=new ote;class ite{constructor(){this.parser=$c.Parser.start().uint8("scriptType").choice("script",{tag:"scriptType",choices:{0:WS.parser,1:yN.parser,2:wN.parser,3:$c.Parser.start()}})}encode(t){const r=t.scriptType,n=t.script,o=Ze.from([r]);if(r===0)return Ze.concat([o,WS.encode(n)]);if(r===1)return Ze.concat([o,yN.encode(n)]);if(r===2)return Ze.concat([o,wN.encode(t.script)]);if(r===3)return o;throw new Error(`TODO: encode unlock script: ${r}`)}decode(t){return this.parser.parse(t)}}ns.UnlockScriptCodec=ite;ns.unlockScriptCodec=new ite;var _N;function ate(){return _N||(_N=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.inputsCodec=e.inputCodec=e.InputCodec=void 0;const t=or,r=Fn(),n=ns,o=Pa,i=Xn;class a{constructor(){this.parser=t.Parser.start().nest("outputRef",{type:t.Parser.start().int32("hint").buffer("key",{length:32})}).nest("unlockScript",{type:n.unlockScriptCodec.parser})}encode(c){return Ze.concat([Ze.from([...o.signedIntCodec.encode(c.outputRef.hint),...c.outputRef.key]),n.unlockScriptCodec.encode(c.unlockScript)])}decode(c){return this.parser.parse(c)}static toAssetInputs(c){return c.map(l=>{const u=l.outputRef.hint,d=(0,r.binToHex)(l.outputRef.key),p=n.unlockScriptCodec.encode(l.unlockScript);return{outputRef:{hint:u,key:d},unlockScript:p.toString("hex")}})}static fromAssetInputs(c){return c.map(l=>{const u=l.outputRef.hint,d=Ze.from(l.outputRef.key,"hex"),p=n.unlockScriptCodec.decode(Ze.from(l.unlockScript,"hex"));return{outputRef:{hint:u,key:d},unlockScript:p}})}}e.InputCodec=a,e.inputCodec=new a,e.inputsCodec=new i.ArrayCodec(e.inputCodec)}(G3)),G3}var pP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.signaturesCodec=e.signatureCodec=e.SignatureCodec=void 0;const t=or,r=Xn;class n{constructor(){this.parser=t.Parser.start().buffer("value",{length:64})}encode(i){return i.value}decode(i){return this.parser.parse(i)}}e.SignatureCodec=n,e.signatureCodec=new n,e.signaturesCodec=new r.ArrayCodec(e.signatureCodec)})(pP);var wl={},K3={},xN;function ste(){return xN||(xN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.unsignedTxCodec=e.UnsignedTxCodec=void 0;const t=or,r=Fn(),n=G2,o=lr,i=ate(),a=W2(),s=_a;class c{constructor(){this.parser=new t.Parser().uint8("version").uint8("networkId").nest("statefulScript",{type:n.statefulScriptCodecOpt.parser}).nest("gasAmount",{type:o.compactSignedIntCodec.parser}).nest("gasPrice",{type:o.compactUnsignedIntCodec.parser}).nest("inputs",{type:i.inputsCodec.parser}).nest("fixedOutputs",{type:a.assetOutputsCodec.parser})}encode(u){return Ze.concat([Ze.from([u.version,u.networkId]),n.statefulScriptCodecOpt.encode(u.statefulScript),o.compactSignedIntCodec.encode(u.gasAmount),o.compactUnsignedIntCodec.encode(u.gasPrice),i.inputsCodec.encode(u.inputs.value),a.assetOutputsCodec.encode(u.fixedOutputs.value)])}decode(u){return this.parser.parse(u)}encodeApiUnsignedTx(u){const d=c.fromApiUnsignedTx(u);return this.encode(d)}decodeApiUnsignedTx(u){const d=this.parser.parse(u);return c.toApiUnsignedTx(d)}static txId(u){return(0,r.binToHex)((0,s.blakeHash)(e.unsignedTxCodec.encode(u)))}static toApiUnsignedTx(u){const d=c.txId(u),p=(0,r.hexToBinUnsafe)(d),m=u.version,w=u.networkId,A=o.compactSignedIntCodec.toI32(u.gasAmount),T=o.compactUnsignedIntCodec.toU256(u.gasPrice).toString(),O=i.InputCodec.toAssetInputs(u.inputs.value),P=a.AssetOutputCodec.toFixedAssetOutputs(p,u.fixedOutputs.value);let $;return u.statefulScript.option===1&&($=n.scriptCodec.encode(u.statefulScript.value).toString("hex")),{txId:d,version:m,networkId:w,gasAmount:A,scriptOpt:$,gasPrice:T,inputs:O,fixedOutputs:P}}static fromApiUnsignedTx(u){const d=u.version,p=u.networkId,m=o.compactSignedIntCodec.decode(o.compactSignedIntCodec.encodeI32(u.gasAmount)),w=o.compactUnsignedIntCodec.decode(o.compactUnsignedIntCodec.encodeU256(BigInt(u.gasPrice))),A=i.InputCodec.fromAssetInputs(u.inputs),T=i.inputsCodec.fromArray(A),O=a.AssetOutputCodec.fromFixedAssetOutputs(u.fixedOutputs),P=a.assetOutputsCodec.fromArray(O),$=n.statefulScriptCodecOpt.fromBuffer(u.scriptOpt?Ze.from(u.scriptOpt,"hex"):void 0);return{version:d,networkId:p,gasAmount:m,gasPrice:w,inputs:T,fixedOutputs:P,statefulScript:$}}}e.UnsignedTxCodec=c,e.unsignedTxCodec=new c}(K3)),K3}var Y3={},SN;function vje(){return SN||(SN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.outputsCodec=e.outputCodec=void 0;const t=Xn,r=pg,n=W2(),o=fP();e.outputCodec=new r.EitherCodec(n.assetOutputCodec,o.contractOutputCodec),e.outputsCodec=new t.ArrayCodec(e.outputCodec)}(Y3)),Y3}var EN;function yje(){if(EN)return wl;EN=1,Object.defineProperty(wl,"__esModule",{value:!0}),wl.transactionCodec=wl.TransactionCodec=void 0;const e=or,t=ste(),r=pP,n=dP,o=W2(),i=fP(),a=qc(),s=vje();class c{constructor(){this.parser=new e.Parser().nest("unsigned",{type:t.unsignedTxCodec.parser}).uint8("scriptExecutionOk").nest("contractInputs",{type:n.contractOutputRefsCodec.parser}).nest("generatedOutputs",{type:s.outputsCodec.parser}).nest("inputSignatures",{type:r.signaturesCodec.parser}).nest("scriptSignatures",{type:r.signaturesCodec.parser})}encode(u){return Ze.concat([t.unsignedTxCodec.encode(u.unsigned),Ze.from([u.scriptExecutionOk]),Ze.from([...n.contractOutputRefsCodec.encode(u.contractInputs.value)]),Ze.from([...s.outputsCodec.encode(u.generatedOutputs.value)]),Ze.from([...r.signaturesCodec.encode(u.inputSignatures.value)]),Ze.from([...r.signaturesCodec.encode(u.scriptSignatures.value)])])}decode(u){return this.parser.parse(u)}encodeApiTransaction(u){const d=c.fromApiTransaction(u);return this.encode(d)}decodeApiTransaction(u){const d=this.parser.parse(u);return c.toApiTransaction(d)}static toApiTransaction(u){const d=t.UnsignedTxCodec.txId(u.unsigned),p=t.UnsignedTxCodec.toApiUnsignedTx(u.unsigned),m=!!u.scriptExecutionOk,w=u.contractInputs.value.map($=>{const R=$.hint,j=$.key.toString("hex");return{hint:R,key:j}}),A=(0,a.hexToBinUnsafe)(d),T=u.generatedOutputs.value.map(($,R)=>$.either===0?{...o.AssetOutputCodec.toFixedAssetOutput(A,$.value,R),type:"AssetOutput"}:i.ContractOutputCodec.convertToApiContractOutput(A,$.value,R)),O=u.inputSignatures.value.map($=>$.value.toString("hex")),P=u.scriptSignatures.value.map($=>$.value.toString("hex"));return{unsigned:p,scriptExecutionOk:m,contractInputs:w,generatedOutputs:T,inputSignatures:O,scriptSignatures:P}}static fromApiTransaction(u){const d=t.UnsignedTxCodec.fromApiUnsignedTx(u.unsigned),p=u.scriptExecutionOk?1:0,m=u.contractInputs.map(O=>({hint:O.hint,key:Ze.from(O.key,"hex")})),w=u.generatedOutputs.map(O=>{if(O.type==="AssetOutput")return s.outputCodec.fromLeft(o.AssetOutputCodec.fromFixedAssetOutput(O));if(O.type==="ContractOutput")return s.outputCodec.fromRight(i.ContractOutputCodec.convertToOutput(O));throw new Error("Invalid output type")}),A=u.inputSignatures.map(O=>({value:Ze.from(O,"hex")})),T=u.scriptSignatures.map(O=>({value:Ze.from(O,"hex")}));return{unsigned:d,scriptExecutionOk:p,contractInputs:n.contractOutputRefsCodec.fromArray(m),generatedOutputs:s.outputsCodec.fromArray(w),inputSignatures:r.signaturesCodec.fromArray(A),scriptSignatures:r.signaturesCodec.fromArray(T)}}}return wl.TransactionCodec=c,wl.transactionCodec=new c,wl}var fd={};Object.defineProperty(fd,"__esModule",{value:!0});fd.contractCodec=fd.ContractCodec=void 0;const bje=or,wje=Xn,ep=lr,CN=K2,PN=new wje.ArrayCodec(ep.compactSignedIntCodec);class cte{constructor(){this.parser=bje.Parser.start().nest("fieldLength",{type:ep.compactSignedIntCodec.parser}).nest("methodIndexes",{type:PN.parser}).buffer("methods",{readUntil:"eof"})}encode(t){return Ze.from([...ep.compactSignedIntCodec.encode(t.fieldLength),...PN.encode(t.methodIndexes.value),...t.methods])}decode(t){return this.parser.parse(t)}decodeContract(t){const r=this.decode(t),n=ep.compactUnsignedIntCodec.toU32(r.fieldLength),o=r.methodIndexes.value.map(a=>ep.compactUnsignedIntCodec.toU32(a)),i=[];for(let a=0,s=0;ae,xje=()=>typeof window>"u"?!1:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;xje();const Sje={connectKit:{options:{iconStyle:"light"},theme:{preferred:"dark",light:TN(IN),dark:TN(IN)}}},GS=z.createContext(null),ka=()=>{const e=z.useContext(GS);if(!e)throw Error("ConnectSetting Hook must be inside a Provider.");return e},KS=z.createContext(null),As=()=>{const e=z.useContext(KS);if(!e)throw Error("AlephiumConnect Hook must be inside a Provider.");return e},MN=z.createContext(null),lte=e=>{e={selector:"__ALEPHIUMCONNECT__",...e};const{selector:t,children:r}=e,n=z.useRef(null),[o,i]=z.useState(!1);return z.useEffect(()=>{const a="#"+t.replace(/^#/,"");if(n.current=document.querySelector(a),!n.current){const s=document.createElement("div");s.setAttribute("id",t),document.body.appendChild(s),n.current=s}i(!0)},[t]),n.current&&o?Fc.createPortal(r,n.current):null},ute=()=>{var e;const t=DC();return(e=t==null?void 0:t.name)!==null&&e!==void 0?e:""},fte=()=>{var e;const t=DC();return(e=t==null?void 0:t.os)!==null&&e!==void 0?e:""},Eje=()=>fte().toLowerCase().includes("ios"),Cje=()=>fte().toLowerCase().includes("android"),gP=()=>Cje()||Eje();function YS(e){return fe.Children.toArray(e).reduce((r,n)=>n.type===fe.Fragment?r.concat(YS(n.props.children)):(r.push(n),r),[])}const mP=e=>{const t=e.slice(0,6),r=e.slice(-6);return`${t} ... ${r}`};var ht=typeof x5.div=="function"?x5:x5.default,vs={mobileWidth:560};const Pje=ht(gt.div)` + z-index: -1; + pointer-events: auto; + position: absolute; + left: 50%; + transform: translateX(-50%); + width: var(--width); + top: 64px; + color: #fff; + font-size: 14px; + line-height: 20px; + font-weight: 500; + background: var(--ck-body-color-danger); + border-radius: 20px; + padding: 24px 46px 82px 24px; + transition: width var(--duration) var(--ease); + a { + font-weight: 700; + text-decoration: underline; + } + code { + font-size: 0.9em; + display: inline-block; + font-family: monospace; + margin: 1px; + padding: 0 4px; + border-radius: 8px; + font-weight: bold; + background: rgba(255, 255, 255, 0.1); + } +`,JS=Bo` +from { opacity: 0; } + to { opacity: 1; } +`,Aje=Bo` +from { opacity: 0; transform: scale(0.85); } + to { opacity: 1; transform: scale(1); } +`,Oje=Bo` +from { opacity: 0; transform: scale(1.1); } + to { opacity: 1; transform: scale(1); } +`,ZS=Bo` +from { opacity: 1; } + to { opacity: 0; } +`,Ije=Bo` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(1.1); } +`,Tje=Bo` +from { opacity: 1; transform: scale(1); } + to { opacity: 0; transform: scale(0.85); } +`,_c=ht(gt.div)` + max-width: 100%; + width: 295px; + padding-top: 48px; +`,Mje=ht(gt.div)` + user-select: none; + position: relative; + display: block; + text-align: center; + color: var(--ck-body-color-muted); + font-size: 15px; + font-weight: 400; + line-height: 21px; + span { + z-index: 2; + position: relative; + display: inline-block; + user-select: none; + pointer-events: none; + padding: 0 14px; + background: var(--ck-body-background); + transition: background-color 200ms ease; + } + &:before { + z-index: 2; + content: ''; + position: absolute; + top: 50%; + left: 0; + right: 0; + height: 1px; + transform: translateY(-1px); + background: var(--ck-body-divider); + box-shadow: var(--ck-body-divider-box-shadow); + } +`,Nb=ht(gt.div)` + z-index: 3; + pointer-events: none; + user-select: none; + position: absolute; + top: 25px; + left: 50%; + display: flex; + align-items: center; + justify-content: center; + height: 26px; + transform: translateX(-50%); + width: var(--width); + text-align: center; + font-size: 17px; + line-height: 20px; + font-weight: var(--ck-modal-heading-font-weight, 600); + color: var(--ck-body-color); + span { + display: inline-block; + } +`,kje=ht(gt.div)` + position: relative; + padding: 0; +`,Go=ht(gt.div)` + left: 0; + right: 0; + text-align: center; + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; + + @media only screen and (max-width: ${vs.mobileWidth}px) { + display: block; + } +`,Hs=ht(gt.h1)` + margin: 0; + padding: 0; + line-height: ${e=>e.$small?20:22}px; + font-size: ${e=>e.$small?17:19}px; + font-weight: var(--ck-modal-h1-font-weight, 600); + color: ${e=>e.$error?"var(--ck-body-color-danger)":e.$valid?"var(--ck-body-color-valid)":"var(--ck-body-color)"}; + > svg { + position: relative; + top: -2px; + display: inline-block; + vertical-align: middle; + margin-right: 6px; + } + @media only screen and (max-width: ${vs.mobileWidth}px) { + margin-bottom: 6px; + font-size: 17px; + } +`,XS=ht.div` + font-size: 16px; + font-weight: 400; + line-height: 21px; + color: var(--ck-body-color-muted); + strong { + font-weight: 500; + color: var(--ck-body-color); + } +`,$je=ht(gt.div)` + z-index: 1; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: var(--ck-overlay-background, rgba(71, 88, 107, 0.24)); + backdrop-filter: var(--ck-overlay-backdrop-filter, none); + opacity: 0; + animation: ${e=>e.$active?JS:ZS} 150ms ease-out both; +`,Dje=Bo` + from{ opacity: 0; transform: scale(0.97); } + to{ opacity: 1; transform: scale(1); } +`,Rje=Bo` + from{ opacity: 1; transform: scale(1); } + to{ opacity: 0; transform: scale(0.97); } +`,Nje=Bo` + from { transform: translate3d(0, 100%, 0); } + to { transform: translate3d(0, 0%, 0); } +`,Bje=Bo` + from { opacity: 1; } + to { opacity: 0; } +`,dte=ht(gt.div)` + z-index: 2; + position: relative; + color: var(--ck-body-color); + + animation: 150ms ease both; + animation-name: ${Rje}; + &.active { + animation-name: ${Dje}; + } + + &:before { + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 50%; + width: var(--width); + height: var(--height); + transform: translateX(-50%); + backface-visibility: hidden; + transition: all 200ms ease; + border-radius: var(--ck-border-radius, 20px); + background: var(--ck-body-background); + box-shadow: var(--ck-modal-box-shadow); + } + + @media only screen and (max-width: ${vs.mobileWidth}px) { + animation-name: ${Bje}; + animation-duration: 130ms; + animation-timing-function: ease; + + &.active { + animation-name: ${Nje}; + animation-duration: 300ms; + animation-delay: 32ms; + animation-timing-function: cubic-bezier(0.15, 1.15, 0.6, 1); + } + + &:before { + width: 100%; + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + will-change: height; + } + } +`,hte=ht(gt.div)` + z-index: 3; + position: absolute; + top: 0; + left: 50%; + height: 64px; + transform: translateX(-50%); + backface-visibility: hidden; + width: var(--width); + transition: 0.2s ease width; + pointer-events: auto; + //border-bottom: 1px solid var(--ck-body-divider); +`,Fje=ht(gt.div)` + position: relative; + overflow: hidden; + height: var(--height); + transition: 0.2s ease height; + @media only screen and (max-width: ${vs.mobileWidth}px) { + transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); + /* animation-delay: 34ms; */ + } +`,pte=ht(gt.div)` + z-index: 2; + position: relative; + top: 0; + left: 50%; + margin-left: calc(var(--width) / -2); + width: var(--width); + /* left: 0; */ + /* width: 100%; */ + display: flex; + justify-content: center; + align-items: center; + transform-origin: center center; + animation: 200ms ease both; + + &.active { + animation-name: ${Oje}; + } + &.active-scale-up { + animation-name: ${Aje}; + } + &.exit-scale-down { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + animation-name: ${Tje}; + } + &.exit { + z-index: 1; + pointer-events: none; + position: absolute; + /* top: 0; */ + /* left: 0; */ + /* left: 50%; */ + /* transform: translateX(-50%); */ + animation-name: ${Ije}; + animation-delay: 16.6667ms; + } + @media only screen and (max-width: ${vs.mobileWidth}px) { + /* animation: 0ms ease both; */ + /* animation-delay: 35ms; */ + animation: 0ms cubic-bezier(0.15, 1.15, 0.6, 1) both; + + &.active { + animation-name: ${JS}; + } + &.active-scale-up { + animation-name: ${JS}; + } + &.exit-scale-down { + z-index: 3; + animation-name: ${ZS}; + } + &.exit { + z-index: 3; + animation-name: ${ZS}; + animation-delay: 0ms; + } + } +`,gte=ht(gt.div)` + margin: 0 auto; + width: fit-content; + padding: 29px 24px 24px; + backface-visibility: hidden; +`,jje=ht.div` + z-index: 2147483646; // z-index set one below max (2147483647) for if we wish to layer things ontop of the modal in a seperate Portal + position: fixed; + inset: 0; +`,QS=ht(gt.button)` + z-index: 3; + cursor: pointer; + position: absolute; + top: 22px; + right: 17px; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + } + + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } +`,eE=ht(gt.button)` + z-index: 3; + position: absolute; + inset: 0; + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + left: -1px; + } + + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,tE=ht(gt.button)` + z-index: 3; + position: absolute; + inset: 0; + transform: translateX(-1px); + display: flex; + align-items: center; + justify-content: center; + border-radius: 16px; + padding: 0; + margin: 0; + color: var(--ck-body-action-color); + background: var(--ck-body-background); + transition: background-color 200ms ease, transform 100ms ease; + /* will-change: transform; */ + svg { + display: block; + position: relative; + } + &:enabled { + cursor: pointer; + &:hover { + background: var(--ck-body-background-secondary); + } + &:active { + transform: scale(0.9); + } + } +`,Lje=ht(gt.div)` + --ease: cubic-bezier(0.25, 0.1, 0.25, 1); + --duration: 200ms; + --transition: height var(--duration) var(--ease), width var(--duration) var(--ease); + z-index: 3; + display: block; + pointer-events: none; + position: absolute; + left: 50%; + top: 50%; + width: 100%; + transform: translate3d(-50%, -50%, 0); + backface-visibility: hidden; + @media only screen and (max-width: ${vs.mobileWidth}px) { + pointer-events: auto; + left: 0; + top: auto; + bottom: -5px; + transform: none; + ${dte} { + max-width: 448px; + margin: 0 auto; + &:before { + width: 100%; + border-radius: var(--ck-border-radius, 30px) var(--ck-border-radius, 30px) 0 0; + } + } + ${pte} { + left: 0; + right: 0; + margin: 0 auto; + width: auto; + } + ${_c} { + margin: 0 auto; + width: 100% !important; + } + ${Nb} { + top: 29px; + } + ${Go} { + gap: 12px; + } + ${XS} { + margin: 0 auto; + max-width: 295px; + } + ${gte} { + width: 100%; + padding: 31px 24px; + } + ${hte} { + width: 100%; + top: 4px; + border-bottom: 0; + } + ${QS} { + right: 22px; + } + ${eE} { + top: -1px; + left: -3px; + } + ${tE} { + top: -1px; + left: -3px; + svg { + width: 65%; + height: auto; + } + } + ${QS}, + ${eE}, + ${tE} { + // Quick hack for bigger tappable area on mobile + transform: scale(1.4) !important; + background: transparent !important; + svg { + transform: scale(0.8) !important; + } + } + } +`,Uje=9;function Hje(){const e=z.useRef(null);function t(r){if(!e.current)return;const n=e.current.querySelectorAll(` + a[href]:not(:disabled), + button:not(:disabled), + textarea:not(:disabled), + input[type="text"]:not(:disabled), + input[type="radio"]:not(:disabled), + input[type="checkbox"]:not(:disabled), + select:not(:disabled) + `),o=n[0],i=n[n.length-1];(r.key==="Tab"||r.keyCode===Uje)&&(r.shiftKey?document.activeElement===o&&(i.focus(),r.preventDefault()):document.activeElement===i&&(o.focus(),r.preventDefault()))}return z.useEffect(()=>{e.current&&(e.current.addEventListener("keydown",t),e.current.focus({preventScroll:!0}));const r=e.current;return()=>{r&&r.removeEventListener("keydown",t)}},[e]),e}function zje(e){const t=Hje();return z.useEffect(()=>{t.current&&t.current.focus({preventScroll:!0})},[t]),G.jsx("div",{ref:t,tabIndex:0,children:e.children})}function Vje(e,t){const r=z.useRef({target:e,previous:t});return r.current.target!==e&&(r.current.previous=r.current.target,r.current.target=e),r.current.previous}const kN={debug:10,info:20,warn:30,error:40,none:100},qje=typeof window<"u"&&window.document&&window.document.createElement!==void 0?z.useLayoutEffect:z.useEffect,Wje=({logLevel:e="info",maxFontSize:t=100,minFontSize:r=20,onFinish:n,onStart:o,resolution:i=5}={})=>{const a=kN[e],s=z.useCallback(()=>({calcKey:0,fontSize:t,fontSizePrev:r,fontSizeMax:t,fontSizeMin:r}),[t,r]),c=z.useRef(null),l=z.useRef(),u=z.useRef(!1),[d,p]=z.useState(s),{calcKey:m,fontSize:w,fontSizeMax:A,fontSizeMin:T,fontSizePrev:O}=d;let P=null;const[$]=z.useState(()=>new X8e(()=>{P=window.requestAnimationFrame(()=>{u.current||(o&&o(),u.current=!0,p({...s(),calcKey:m+1}))})}));z.useEffect(()=>(c.current&&$.observe(c.current),()=>{P&&window.cancelAnimationFrame(P),$.disconnect()}),[P,$]);const R=c.current&&c.current.innerHTML;return z.useEffect(()=>{m===0||u.current||(R!==l.current&&(o&&o(),p({...s(),calcKey:m+1})),l.current=R)},[m,s,R,o]),qje(()=>{if(m===0)return;const j=Math.abs(w-O)<=i,I=!!c.current&&(c.current.scrollHeight>c.current.offsetHeight||c.current.scrollWidth>c.current.offsetWidth),b=I&&w===O,N=w>O;if(j){b?(u.current=!1,a<=kN.info&&console.info(`[use-fit-text] reached \`minFontSize = ${r}\` without fitting text`)):I?p({fontSize:N?O:T,fontSizeMax:A,fontSizeMin:T,fontSizePrev:O,calcKey:m}):(u.current=!1,n&&n(w));return}let V,Z=A,q=T;I?(V=N?O-w:T-w,Z=Math.min(A,w)):(V=N?A-w:O-w,q=Math.max(T,w)),p({calcKey:m,fontSize:w+V/2,fontSizeMax:Z,fontSizeMin:q,fontSizePrev:w})},[m,w,A,T,O,n,c,i]),{fontSize:w,ref:c}},vP=fe.forwardRef(({children:e},t)=>{const[r,n]=fe.useState(!1),{fontSize:o,ref:i}=Wje({logLevel:"none",maxFontSize:100,minFontSize:70,onStart:()=>n(!0),onFinish:()=>n(!0)});return G.jsx("div",{ref:i,style:{visibility:r?"visible":"hidden",fontSize:`${o}%`,maxHeight:"100%",maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e})});vP.displayName="FitText";var Gje={light:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"#F6F7F9","--ck-connectbutton-background-secondary":"#FFFFFF","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"#F0F2F5","--ck-connectbutton-active-color":"#373737","--ck-connectbutton-active-background":"#EAECF1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#F6F7F9","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#F0F2F5","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#F6F7F9","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-color":"#373737","--ck-primary-button-hover-background":"#F0F2F5","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#F6F7F9","--ck-tertiary-button-background":"#FFFFFF","--ck-secondary-button-hover-background":"#e0e4eb","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(71, 88, 107, 0.24)","--ck-body-color":"#373737","--ck-body-color-muted":"#999999","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F3F4F7","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-siwe-border":"#F0F0F0","--ck-body-disclaimer-color":"#AAAAAB","--ck-body-disclaimer-link-color":"#838485","--ck-body-disclaimer-link-hover-color":"#000000","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0,0,0,0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#f7f6f8","--ck-focus-color":"#1A88F8","--ck-spinner-color":"var(--ck-focus-color)","--ck-copytoclipboard-stroke":"#CCCCCC"},dark:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#383838","--ck-connectbutton-background-secondary":"#282828","--ck-connectbutton-hover-background":"#404040","--ck-connectbutton-active-background":"#4D4D4D","--ck-connectbutton-balance-color":"#fff","--ck-connectbutton-balance-background":"#282828","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#383838","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#404040","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"#383838","--ck-primary-button-border-radius":"16px","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-background":"#404040","--ck-primary-button-active-border-radius":"16px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#333333","--ck-secondary-button-hover-background":"#4D4D4D","--ck-tertiary-button-background":"#424242","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-body-color":"#ffffff","--ck-body-color-muted":"rgba(255, 255, 255, 0.4)","--ck-body-color-muted-hover":"rgba(255, 255, 255, 0.8)","--ck-body-background":"#2B2B2B","--ck-body-background-transparent":"rgba(0,0,0,0)","--ck-body-background-secondary":"#333333","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#ffffff","--ck-body-background-tertiary":"#333333","--ck-body-action-color":"#808080","--ck-body-divider":"#383838","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-color":"#858585","--ck-body-disclaimer-link-color":"#ADADAD","--ck-body-disclaimer-link-hover-color":"#FFFFFF","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-background":"#2B2B2B","--ck-tooltip-background-secondary":"#333333","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#6C7381","--ck-spinner-color":"var(--ck-focus-color)","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"#3d3d3d"}},Kje={"--ck-font-family":"Lato","--ck-border-radius":"0px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-box-shadow":" 0 0 0 1px #003C74, 2px 2px 0px rgba(255, 255, 255, 0.75), -2px -2px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-connectbutton-border-radius":"4.5px","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 0% / 200% 200%, #F5F5F1","--ck-connectbutton-active-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"0 0 0 1px #E4E7E7","--ck-connectbutton-balance-hover-box-shadow":"0 0 0 1px #d7dbdb","--ck-connectbutton-balance-active-box-shadow":"0 0 0 1px #bbc0c0","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0, 127, 128, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"#808080","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#F0EDE2","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary-hover-background":"#FAFAFA","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-action-color":"#373737","--ck-body-color-danger":"#FC6464","--ck-body-color-valid":"#32D74B","--ck-body-divider":"#919B9C","--ck-body-divider-box-shadow":"0px 1px 0px #FBFBF8","--ck-primary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-primary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-border-radius":"6px","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 5px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-hover-border-radius":"6px","--ck-modal-heading-font-weight":400,"--ck-modal-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 0px 2px 0px #044FD1, + inset 4px 0px 0px #4283EB, + inset 0px 4px 0px #4283EB + `,"--ck-modal-h1-font-weight":400,"--ck-secondary-button-color":"#373737","--ck-secondary-button-border-radius":"6px","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-secondary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 4px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-body-background-secondary":"rgba(0, 0, 0, 0.1)","--ck-body-background-tertiary":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-body-button-text-align":"left","--ck-body-button-box-shadow":"0 2px 4px rgba(0, 0, 0, 0.05 )","--ck-body-disclaimer-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-body-disclaimer-box-shadow":` + inset 0px -3px 0px #0F37A9, + inset -2px 0px 0px #0F37A9, + inset 0px -4px 0px #0D5DDF, + inset -4px 0px 0px #0D5DDF, + inset 2px 0px 0px #0453DD, + inset 4px 0px 0px #4283EB, + inset 0 1px 0 0 #919B9C`,"--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-color":"#959594","--ck-body-disclaimer-link-color":"#626262","--ck-body-disclaimer-link-hover-color":"#000000","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#919B9C","--ck-qr-border-radius":"0","--ck-qr-background":"#FFFFFF","--ck-copytoclipboard-stroke":"rgba(55, 55, 55, 0.4)","--ck-tooltip-background":"linear-gradient(270deg, #F7F3E6 7.69%, #F5F7DA 100%)","--ck-tooltip-background-secondary":"#f6f7f9","--ck-tooltip-color":"#000000","--ck-tooltip-shadow":" 0 0 0 1.5px #2b2622, 0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px #A0A0A0, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-dropdown-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-button-hover-background":"linear-gradient(0deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-pending-color":"#ACA899","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"#ACA899","--ck-dropdown-active-background":"#3F69BF","--ck-dropdown-active-border-radius":"0","--ck-dropdown-active-inset":"-12px","--ck-dropdown-color":"#ACA899","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"inset 0 0 0 1px #ACA899, 2px 2px 7px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"#ACA899","--ck-alert-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-alert-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-alert-border-radius":"0","--ck-graphic-primary-color":"#333333","--ck-graphic-primary-background":"#FFFFFF","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#919B9C"},Yje={"--ck-font-family":'"SF Pro Rounded",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"8px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-hover-background":"#F3EDE8","--ck-connectbutton-active-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-color":"#000000","--ck-connectbutton-balance-background":"#F3EDE8","--ck-connectbutton-balance-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-hover-background":"#eee5dd","--ck-connectbutton-balance-connectbutton-box-shadow":"-4px 8px 0px -4px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-connectbutton-border-radius":"0px 8px 8px 0","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #000000, -4px 4px 0 0 #000000","--ck-primary-button-border-radius":"8px","--ck-primary-button-hover-background":"#F3EDE8","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #000000, -0px 0px 0 0 #000000","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-secondary-button-hover-background":"#F3EDE8","--ck-secondary-button-hover-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-focus-color":"#3B99FC","--ck-overlay-background":"rgba(133, 120, 122, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"rgba(0, 0, 0, 0.5)","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#EBE1D8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"rgba(0,0,0,0.1)","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#373737","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"8px","--ck-tertiary-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-body-action-color":"#373737","--ck-body-divider":"#373737","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-background":"#E3D6C9","--ck-body-disclaimer-box-shadow":"-4px 4px 0 0 #000000, inset 2px 0 0 0 #000000, inset -2px 0 0 0 #000000, inset 0 -2px 0 0 #000000","--ck-body-disclaimer-font-weight":"500","--ck-body-disclaimer-color":"#888079","--ck-body-disclaimer-link-color":"#5B5650","--ck-body-disclaimer-link-hover-color":"#000000","--ck-modal-box-shadow":"-10px 10px 0px #000000, inset 0 0 0 2px #000000","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-border-radius":"8px","--ck-tooltip-color":"#373737","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#EBE1D8","--ck-tooltip-shadow":"-6px 6px 0 0 #000000, 0 0 0 2px #000000","--ck-spinner-color":"#1A88F8","--ck-dropdown-button-color":"#000","--ck-dropdown-button-box-shadow":"-2px 2px 0 2px #000000, 0 0 0 2px #000000","--ck-dropdown-button-background":"#ffffff","--ck-dropdown-button-hover-background":"#F3EDE8","--ck-dropdown-button-hover-box-shadow":"-2px 2px 0 0 #000000, 0 0 0 2px #000000","--ck-dropdown-pending-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-background":"#3B99FC","--ck-dropdown-active-box-shadow":"inset 0 0 0 2px #000000","--ck-dropdown-active-border-radius":"8px","--ck-dropdown-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-dropdown-border-radius":"8px","--ck-alert-color":"rgba(0, 0, 0, 0.5)","--ck-alert-background":" #F5F5F5","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"8px","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#000000","--ck-qr-background":"#ffffff","--ck-graphic-primary-color":"#000000","--ck-graphic-primary-background":"#ffffff","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#8E8985"},Jje={"--ck-border-radius":"12px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"12px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F6F7F9","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"12px","--ck-primary-button-color":"#414451","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F6F7F9","--ck-primary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"12px","--ck-secondary-button-color":"#414451","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F6F7F9","--ck-secondary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#414451","--ck-body-color-muted":"#9196A1","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F6F8FA","--ck-tertiary-border-radius":"13px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-dropdown-color":"rgba(55, 55, 55, 0.4)","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#2E3138","--ck-qr-border-color":"#E9EAEC","--ck-siwe-border":"#EAEBED"},Zje={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"10px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#313235","--ck-connectbutton-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-connectbutton-hover-background":"#414144","--ck-connectbutton-active-background":"#4C4D4F","--ck-connectbutton-balance-color":"#ffffff","--ck-connectbutton-balance-background":"#1F2023","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #313235","--ck-connectbutton-balance-hover-background":"#313235","--ck-connectbutton-balance-active-background":"#414144","--ck-primary-button-border-radius":"8px","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"rgba(255, 255, 255, 0.08)","--ck-primary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-primary-button-hover-background":"rgba(255, 255, 255, 0.2)","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#363638","--ck-secondary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-secondary-button-hover-background":"#3c3c3e","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-modal-box-shadow":"inset 0 0 0 1px #38393C, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-body-color":"#ffffff","--ck-body-color-muted":"#8B8F97","--ck-body-color-muted-hover":"#ffffff","--ck-body-background":"#1F2023","--ck-body-background-transparent":"rgba(31, 32, 35, 0)","--ck-body-background-secondary":"#313235","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"rgba(255, 255, 255, 0.02)","--ck-body-background-tertiary":"#313235","--ck-tertiary-border-radius":"12px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-body-action-color":"#8B8F97","--ck-body-divider":"rgba(255,255,255,0.1)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#2B2D31","--ck-body-disclaimer-box-shadow":"none","--ck-body-disclaimer-color":"#808183","--ck-body-disclaimer-link-color":"#AAABAD","--ck-body-disclaimer-link-hover-color":"#ffffff","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#1F2023","--ck-tooltip-background-secondary":"#1F2023","--ck-tooltip-color":"#ffffff","--ck-tooltip-shadow":" 0 0 0 1px rgba(255, 255, 255, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#6C7381","--ck-dropdown-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-dropdown-button-background":"#313235","--ck-dropdown-pending-color":"#8B8F97","--ck-dropdown-active-color":"#FFF","--ck-dropdown-active-static-color":"#FFF","--ck-dropdown-active-background":"rgba(255, 255, 255, 0.07)","--ck-dropdown-color":"#8B8F97","--ck-dropdown-background":"#313235","--ck-dropdown-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.03)","--ck-dropdown-border-radius":"8px","--ck-alert-color":"#8B8F97","--ck-alert-background":"#404145","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"rgba(255,255,255,0.1)"},Xje={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"0px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"0px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-connectbutton-hover-color":"#111","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #111","--ck-connectbutton-balance-color":"#111111","--ck-connectbutton-balance-background":"#F7F7F7","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #F7F7F7","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px #111","--ck-primary-button-border-radius":"0px","--ck-primary-button-color":"#111111","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-secondary-button-border-radius":"0px","--ck-secondary-button-color":"#111111","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#111111","--ck-body-color-muted":"#A0A0A0","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#A0A0A0","--ck-body-divider":"#EBEBEB","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#FAFAFA","--ck-body-disclaimer-box-shadow":"inset 0 1px 0 0 #ECECEC","--ck-body-disclaimer-color":"#9D9D9D","--ck-body-disclaimer-link-color":"#6E6E6E","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-border-radius":"0px","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-active-border-radius":"0","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"rgba(17, 17, 17, 0.4)","--ck-alert-background":"#fff","--ck-alert-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-alert-border-radius":"0","--ck-qr-border-radius":"0px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#EBEBEB","--ck-modal-h1-font-weight":"400","--ck-modal-heading-font-weight":"400","--ck-primary-button-font-weight":"400","--ck-siwe-border":"#EBEBEB"},Qje={"--ck-font-family":'"Nunito",ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"14px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 2px #DFE4EC, 0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F9FAFB","--ck-connectbutton-balance-color":"#414451","--ck-connectbutton-balance-background":"#F9FAFB","--ck-connectbutton-balance-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-hover-background":"#F5F7F9","--ck-connectbutton-balance-hover-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-active-box-shadow":"0 0 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-active-background":"#F5F7F9","--ck-connectbutton-active-box-shadow":"inset 0 0 0 2px #CFD7E2, 0 0px 0 0 #CFD7E2, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-border-radius":"18px","--ck-primary-button-color":"#000000","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F5F7F9","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#000000","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F5F7F9","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#000000","--ck-body-color-muted":"#93989F","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"22px","--ck-tertiary-box-shadow":"inset 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-body-action-color":"#93989F","--ck-body-divider":"#DFE4EC","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFB","--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-font-weight":"700","--ck-body-disclaimer-color":"#959697","--ck-body-disclaimer-link-color":"#646464","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":" 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 2px #DFE4EC, 0 2px 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-dropdown-pending-color":"#848D9A","--ck-dropdown-active-color":"#000000","--ck-dropdown-active-static-color":"#848D9A","--ck-dropdown-active-background":"#F5F7F9","--ck-dropdown-color":"#848D9A","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"16px","--ck-alert-color":"#848D9A","--ck-alert-background":"#F5F7F9","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#DFE4EC","--ck-modal-h1-font-weight":"700","--ck-modal-heading-font-weight":"700","--ck-primary-button-font-weight":"700","--ck-siwe-border":"#DFE4EC"},eLe={"--ck-font-family":'"PT Root UI",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"16px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"10px","--ck-connectbutton-color":"#151C3B","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #D6D8E1","--ck-connectbutton-hover-background":"#E9EBF3","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-active-background":"#D4D8E8","--ck-connectbutton-active-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#151C3B","--ck-primary-button-background":"#ffffff","--ck-primary-button-font-weight":"700","--ck-primary-button-hover-background":"#DEE1ED","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#151C3B","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-font-weight":"700","--ck-secondary-button-hover-background":"#DEE1ED","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(213, 215, 225, 0.8)","--ck-overlay-backdrop-filter":"blur(6px)","--ck-body-color":"#151C3B","--ck-body-color-muted":"#757A8E","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#F4F4F8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#E9E9F1","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-tertiary":"#E9E9F1","--ck-tertiary-border-radius":"24px","--ck-body-action-color":"#79809C","--ck-body-divider":"#D9DBE3","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#79809C","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#DEE1ED","--ck-dropdown-button-hover-box-shadow":"0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-color":"#757A8E","--ck-dropdown-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#000000","--ck-qr-background":"#ffffff","--ck-siwe-border":"#DFE4EC","--ck-graphic-primary-background":"#fff","--ck-graphic-compass-background":"#fff","--ck-graphic-primary-box-shadow":"0px 2.94737px 14.7368px rgba(0, 0, 0, 0.1)","--ck-graphic-compass-box-shadow":"0px 2px 9px rgba(0, 0, 0, 0.15)"},Fa={base:Gje,web95:Kje,retro:Yje,soft:Jje,midnight:Zje,minimal:Xje,rounded:Qje,nouns:eLe};const Ku={default:{"--ck-font-family":`-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, + 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', + 'Segoe UI Symbol'`,"--ck-border-radius":"20px","--ck-secondary-button-border-radius":"16px"},graphics:{light:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#4E4E4E","--ck-graphic-scaniconwithlogos-02":"#272727","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#F6F7F9","--ck-chain-ethereum-01":"#25292E","--ck-chain-ethereum-02":"#fff","--ck-chain-ethereum-03":"#DFE0E0"},dark:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#AFAFAF","--ck-graphic-scaniconwithlogos-02":"#696969","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#3D3D3D"}},ens:{light:{"--ck-ens-01-start":"#FF3B30","--ck-ens-01-stop":"#FF9500","--ck-ens-02-start":"#FF9500","--ck-ens-02-stop":"#FFCC00","--ck-ens-03-start":"#FFCC00","--ck-ens-03-stop":"#34C759","--ck-ens-04-start":"#5856D6","--ck-ens-04-stop":"#AF52DE","--ck-ens-05-start":"#5AC8FA","--ck-ens-05-stop":"#007AFF","--ck-ens-06-start":"#007AFF","--ck-ens-06-stop":"#5856D6","--ck-ens-07-start":"#5856D6","--ck-ens-07-stop":"#AF52DE","--ck-ens-08-start":"#AF52DE","--ck-ens-08-stop":"#FF2D55"},dark:{"--ck-ens-01-start":"#FF453A","--ck-ens-01-stop":"#FF9F0A","--ck-ens-02-start":"#FF9F0A","--ck-ens-02-stop":"#FFD60A","--ck-ens-03-start":"#FFD60A","--ck-ens-03-stop":"#32D74B","--ck-ens-04-start":"#32D74B","--ck-ens-04-stop":"#64D2FF","--ck-ens-05-start":"#64D2FF","--ck-ens-05-stop":"#0A84FF","--ck-ens-06-start":"#0A84FF","--ck-ens-06-stop":"#5E5CE6","--ck-ens-07-start":"#5E5CE6","--ck-ens-07-stop":"#BF5AF2","--ck-ens-08-start":"#BF5AF2","--ck-ens-08-stop":"#FF2D55"}},brand:{"--ck-family-brand":"#1A88F8","--ck-brand-walletConnect":"#3B99FC","--ck-brand-coinbaseWallet":"#0052FF","--ck-brand-metamask":"#f6851b","--ck-brand-metamask-01":"#F6851B","--ck-brand-metamask-02":"#E2761B","--ck-brand-metamask-03":"#CD6116","--ck-brand-metamask-04":"#161616","--ck-brand-metamask-05":"#763D16","--ck-brand-metamask-06":"#D7C1B3","--ck-brand-metamask-07":"#C0AD9E","--ck-brand-metamask-08":"#E4761B","--ck-brand-metamask-09":"#233447","--ck-brand-metamask-10":"#E4751F","--ck-brand-metamask-11":"#FEF5E7","--ck-brand-metamask-12":"#E3C8AB","--ck-brand-trust-01":"#3375BB","--ck-brand-trust-02":"#ffffff","--ck-brand-trust-01b":"#ffffff","--ck-brand-trust-02b":"#3375BB","--ck-brand-argent":"#f36a3d","--ck-brand-imtoken-01":"#11C4D1","--ck-brand-imtoken-02":"#0062AD"}},tLe=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t==null)return e;const r={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};return`color(display-p3 ${r.r/255} ${r.g/255} ${r.b/255})`},Yu=(e,t)=>Tr` + ${Object.keys(e).map(r=>{const n=e[r];return n&&`${r}:${n};`})} + `,ja={light:Fa.base.light,dark:Fa.base.dark,web95:Fa.web95,retro:Fa.retro,soft:Fa.soft,midnight:Fa.midnight,minimal:Fa.minimal,rounded:Fa.rounded,nouns:Fa.nouns},ea=(e,t)=>{const r=t?" !important":"";return Tr` + ${Object.keys(e).map(n=>{const o=e[n];return o&&`${n}:${o}${r};`})} + @supports (color: color(display-p3 1 1 1)) { + ${Object.keys(e).map(n=>{const o=e[n];return`${n}:${tLe(o)}${r};`})} + } + `},zo={default:Yu(Ku.default),light:ea(ja.light),dark:ea(ja.dark),web95:ea(ja.web95),retro:ea(ja.retro),soft:ea(ja.soft),midnight:ea(ja.midnight),minimal:ea(ja.minimal),rounded:ea(ja.rounded),nouns:ea(ja.nouns)},kf={brand:Yu(Ku.brand),ensLight:Yu(Ku.ens.light),ensDark:Yu(Ku.ens.dark),graphicsLight:Yu(Ku.graphics.light),graphicsDark:Yu(Ku.graphics.dark)},$N=Tr` + ${kf.brand} + ${kf.ensLight} + ${kf.graphicsLight} +`,DN=Tr` + ${kf.brand} + ${kf.ensDark} + ${kf.graphicsDark} +`;let Ji="auto";const yP=ht(gt.div)` + ${zo.default} + + ${e=>{switch(e.$useTheme){case"web95":return Ji="light",zo.web95;case"retro":return Ji="light",zo.retro;case"soft":return Ji="light",zo.soft;case"midnight":return Ji="dark",zo.midnight;case"minimal":return Ji="light",zo.minimal;case"rounded":return Ji="light",zo.rounded;case"nouns":return Ji="light",zo.nouns;default:return e.$useMode==="light"?(Ji="light",zo.light):e.$useMode==="dark"?(Ji="dark",zo.dark):Tr` + @media (prefers-color-scheme: light) { + ${zo.light} + } + @media (prefers-color-scheme: dark) { + ${zo.dark} + } + `}}} + + ${e=>{switch(Ji){case"light":return $N;case"dark":return DN;default:return Tr` + ${$N} + @media (prefers-color-scheme: dark) { + ${DN} + } + `}}} + + + ${e=>{if(e.$customTheme)return ea(e.$customTheme,!0)}} + + all: initial; + text-align: left; + text-direction: ltr; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + text-size-adjust: none; + font-size: 16px; + + button { + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 0.001px transparent; + } + + &, + * { + font-family: var(--ck-font-family); + box-sizing: border-box; + outline: none; + border: none; + } + /* + @media (prefers-reduced-motion) { + * { + animation-duration: 60ms !important; + transition-duration: 60ms !important; + } + } + */ + img, + svg { + max-width: 100%; + } + strong { + font-weight: 600; + } + a:focus-visible, + button:focus, + button:focus-visible { + outline: none; + } +`,rLe=({...e})=>G.jsx("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11C20 15.9706 15.9706 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2C15.9706 2 20 6.02944 20 11ZM22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM11.6445 12.7051C11.6445 13.1348 11.3223 13.4678 10.7744 13.4678C10.2266 13.4678 9.92578 13.1885 9.92578 12.6191V12.4795C9.92578 11.4268 10.4951 10.8574 11.2686 10.3203C12.2031 9.67578 12.665 9.32129 12.665 8.59082C12.665 7.76367 12.0205 7.21582 11.043 7.21582C10.3232 7.21582 9.80762 7.57031 9.45312 8.16113C9.38282 8.24242 9.32286 8.32101 9.2667 8.39461C9.04826 8.68087 8.88747 8.8916 8.40039 8.8916C8.0459 8.8916 7.66992 8.62305 7.66992 8.15039C7.66992 7.96777 7.70215 7.7959 7.75586 7.61328C8.05664 6.625 9.27051 5.75488 11.1182 5.75488C12.9336 5.75488 14.5234 6.71094 14.5234 8.50488C14.5234 9.7832 13.7822 10.417 12.7402 11.1045C11.999 11.5986 11.6445 11.9746 11.6445 12.5762V12.7051ZM11.9131 15.5625C11.9131 16.1855 11.376 16.6797 10.7529 16.6797C10.1299 16.6797 9.59277 16.1748 9.59277 15.5625C9.59277 14.9395 10.1191 14.4453 10.7529 14.4453C11.3867 14.4453 11.9131 14.9287 11.9131 15.5625Z",fill:"currentColor"})}),RN=({...e})=>G.jsxs(gt.svg,{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[G.jsx("path",{d:"M1 13L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),G.jsx("path",{d:"M1 0.999999L13 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),nLe=({...e})=>G.jsx(gt.svg,{width:9,height:16,viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:G.jsx("path",{d:"M8 1L1 8L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),J3=.22,oLe={initial:{zIndex:2,opacity:0},animate:{opacity:1,scale:1,transition:{duration:J3*.75,delay:J3*.25,ease:[.26,.08,.25,1]}},exit:{zIndex:1,opacity:0,pointerEvents:"none",position:"absolute",left:["50%","50%"],x:["-50%","-50%"],transition:{duration:J3,ease:[.26,.08,.25,1]}}},Dn={CONNECTORS:"CONNECTORS",PROFILE:"PROFILE",CONNECT:"CONNECT"},iLe=({open:e,pages:t,pageId:r,positionInside:n,inline:o,onClose:i,onBack:a,onInfo:s})=>{const c=ka(),l=gP(),[u,d]=EK({timeout:160,preEnter:!0,mountOnEnter:!0,unmountOnExit:!0}),p=!(u==="exited"||u==="unmounted"),m=u==="preEnter"||u!=="exiting",w=c.route===Dn.CONNECTORS?0:1,A=Vje(w,w);z.useEffect(()=>{d(e),e&&$(void 0)},[e]);const[T,O]=z.useState({width:void 0,height:void 0}),[P,$]=z.useState(void 0),R=q=>{const _={width:q==null?void 0:q.offsetWidth,height:q==null?void 0:q.offsetHeight};O({width:`${_==null?void 0:_.width}px`,height:`${_==null?void 0:_.height}px`})},j=z.useRef(null),I=z.useRef(),b=z.useCallback(q=>{q&&(j.current=q,$(P!==void 0),clearTimeout(I.current),I.current=setTimeout(()=>$(!1),360),R(q))},[P,I,j]);z.useEffect(()=>{j.current&&R(j.current)},[l]),z.useEffect(()=>{if(!p){O({width:void 0,height:void 0});return}const q=_=>{_.key==="Escape"&&i&&i()};return document.addEventListener("keydown",q),()=>{document.removeEventListener("keydown",q)}},[p,i]);const N={"--height":T.height,"--width":T.width};function V(){switch(c.route){case Dn.CONNECTORS:return"Connectors";case Dn.PROFILE:return"Profile";default:return""}}const Z=G.jsx(yP,{$useTheme:c.theme,$useMode:c.mode,$customTheme:c.customTheme,children:G.jsxs(jje,{role:"dialog",style:{pointerEvents:m?"auto":"none",position:n?"absolute":void 0},children:[!o&&G.jsx($je,{$active:m,onClick:i}),G.jsxs(Lje,{style:N,initial:!1,children:[G.jsx("div",{style:{pointerEvents:P?"all":"none",position:"absolute",top:0,bottom:0,left:"50%",transform:"translateX(-50%)",width:"var(--width)",zIndex:9,transition:"width 200ms ease"}}),G.jsxs(dte,{className:`${m&&"active"}`,children:[G.jsx(Ni,{initial:!1,children:c.errorMessage&&G.jsxs(Pje,{initial:{y:"10%",x:"-50%"},animate:{y:"-100%"},exit:{y:"100%"},transition:{duration:.2,ease:"easeInOut"},children:[G.jsx("span",{children:c.errorMessage}),G.jsx("div",{onClick:()=>console.log("click"),style:{position:"absolute",right:24,top:24},children:G.jsx(RN,{})})]})}),G.jsxs(hte,{children:[i&&G.jsx(QS,{"aria-label":"close",onClick:i,children:G.jsx(RN,{})}),G.jsx("div",{style:{position:"absolute",top:23,left:20,width:32,height:32},children:G.jsx(Ni,{children:a?G.jsx(eE,{disabled:P,"aria-label":"back",onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:l?0:.1,delay:l?.01:0},children:G.jsx(nLe,{})},"backButton"):c.route===Dn.PROFILE&&s&&G.jsx(tE,{disabled:P,"aria-label":"more info",onClick:s,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:l?0:.1,delay:l?.01:0},children:G.jsx(rLe,{})},"infoButton")})})]}),G.jsx(Nb,{children:G.jsx(Ni,{children:G.jsx(gt.div,{style:{position:"absolute",top:0,bottom:0,left:52,right:52,display:"flex",justifyContent:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:l?0:.17,delay:l?.01:0},children:G.jsx(vP,{children:V()})},`${c.route}-''}`)})}),G.jsx(Fje,{children:t.map(({id:q,content:_})=>G.jsx(aLe,{open:q===r,initial:!n&&u!=="entered",enterAnim:q===r?w>A?"active-scale-up":"active":"",exitAnim:q!==r?w{const[i,a]=EK({timeout:400,preEnter:!0,initialEntered:t,mountOnEnter:!0,unmountOnExit:!0}),s=!(i==="exited"||i==="unmounted"),c=i==="preEnter"||i!=="exiting";return z.useEffect(()=>{a(t)},[t]),s?G.jsx(pte,{className:`${c?n:o}`,style:{animationDuration:r?"0ms":void 0,animationDelay:r?"0ms":void 0},children:e}):null},NN=({children:e})=>G.jsx(Mje,{children:G.jsx("span",{children:e??"or"})}),sLe=({background:e=!1,...t})=>G.jsx("svg",{...t,"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"var(--ck-brand-walletConnect)"}:void 0,children:G.jsx("path",{d:"M9.58818 11.8556C13.1293 8.31442 18.8706 8.31442 22.4117 11.8556L22.8379 12.2818C23.015 12.4588 23.015 12.7459 22.8379 12.9229L21.3801 14.3808C21.2915 14.4693 21.148 14.4693 21.0595 14.3808L20.473 13.7943C18.0026 11.3239 13.9973 11.3239 11.5269 13.7943L10.8989 14.4223C10.8104 14.5109 10.6668 14.5109 10.5783 14.4223L9.12041 12.9645C8.94336 12.7875 8.94336 12.5004 9.12041 12.3234L9.58818 11.8556ZM25.4268 14.8706L26.7243 16.1682C26.9013 16.3452 26.9013 16.6323 26.7243 16.8093L20.8737 22.6599C20.6966 22.8371 20.4096 22.8371 20.2325 22.6599L16.0802 18.5076C16.0359 18.4634 15.9641 18.4634 15.9199 18.5076L11.7675 22.6599C11.5905 22.8371 11.3034 22.8371 11.1264 22.66C11.1264 22.66 11.1264 22.6599 11.1264 22.6599L5.27561 16.8092C5.09856 16.6322 5.09856 16.3451 5.27561 16.168L6.57313 14.8706C6.75019 14.6934 7.03726 14.6934 7.21431 14.8706L11.3668 19.023C11.411 19.0672 11.4828 19.0672 11.5271 19.023L15.6793 14.8706C15.8563 14.6934 16.1434 14.6934 16.3205 14.8706L20.473 19.023C20.5172 19.0672 20.589 19.0672 20.6332 19.023L24.7856 14.8706C24.9627 14.6935 25.2498 14.6935 25.4268 14.8706Z",fill:e?"white":"var(--ck-brand-walletConnect)"})}),cLe=({...e})=>G.jsx("svg",{...e,"aria-hidden":"true",width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2106 16H16V29.4577H19.2182V19.2182L37.2106 19.1011V16ZM37.3568 33.4073V54.6179H50.8146V51.3997H40.575L40.458 33.4073H37.3568ZM16 72.1714H37.2106V69.0703L19.2182 68.9533V58.7137H16V72.1714ZM50.9609 16H72.1714V29.4577H68.9533V19.2182L50.9609 19.1011V16ZM72.1714 72.1714H50.9609V69.0703L68.9533 68.9533V58.7137H72.1714V72.1714Z",fill:"white"})}),lLe=({...e})=>G.jsx("svg",{...e,version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"36.000000pt",height:"36.000000pt",viewBox:"0 0 108.000000 108.000000",preserveAspectRatio:"xMidYMid meet",children:G.jsxs("g",{transform:"translate(0.000000,108.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none",children:[G.jsx("path",{d:`M655 871 l-30 -6 -3 -108 -3 -109 31 6 c16 3 44 9 60 12 l30 6 0 104 +0 104 -27 -1 c-16 -1 -41 -4 -58 -8z`}),G.jsx("path",{d:`M381 831 c-19 -3 -36 -10 -37 -16 -2 -5 54 -136 124 -290 l128 -280 +64 3 c35 1 68 6 73 11 5 5 -48 133 -120 292 l-129 284 -34 1 c-19 1 -50 -1 +-69 -5z`}),G.jsx("path",{d:`M390 426 l-55 -11 -3 -114 -3 -114 52 7 c90 12 90 12 87 133 -2 60 +-7 107 -13 109 -5 1 -35 -3 -65 -10z`})]})});var dn={AlephiumIcon:lLe,WalletConnect:sLe,Ledger:cLe};let mte=[];typeof window<"u"&&(mte=[{id:"injected",name:"Extension Wallet",shortName:"Browser",logos:{default:G.jsx(dn.AlephiumIcon,{}),mobile:G.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:G.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:G.jsx(dn.AlephiumIcon,{})})}),transparent:G.jsx(dn.AlephiumIcon,{})},scannable:!1,extensionIsInstalled:()=>!!window.alephiumProviders},{id:"desktopWallet",name:"Desktop wallet",shortName:"Desktop wallet",logos:{default:G.jsx(dn.AlephiumIcon,{}),mobile:G.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:G.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:G.jsx(dn.AlephiumIcon,{})})}),transparent:G.jsx(dn.AlephiumIcon,{})},scannable:!1},{id:"walletConnect",name:"WalletConnect",shortName:"WalletConnect",logos:{default:G.jsx(dn.WalletConnect,{}),mobile:G.jsx("div",{style:{padding:5,background:"var(--ck-body-background-secondary)",borderRadius:"21%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:G.jsx(dn.WalletConnect,{})}),transparent:G.jsx(dn.WalletConnect,{background:!1}),connectorButton:G.jsx(dn.WalletConnect,{}),qrCode:G.jsx(dn.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}]);var Nl=mte;const uLe=ht(gt.div)` + display: flex; + flex-direction: column; + gap: 12px; + padding: 0 0 16px; +`,fLe=ht(gt.button)` + cursor: pointer; + user-select: none; + position: relative; + display: flex; + align-items: center; + padding: 0 20px; + width: 100%; + height: 64px; + font-size: 17px; + font-weight: var(--ck-primary-button-font-weight, 500); + line-height: 20px; + text-align: var(--ck-body-button-text-align, left); + transition: 180ms ease; + transition-property: background, color, box-shadow, transform; + will-change: transform, box-shadow, background-color, color; + + --fallback-color: var(--ck-primary-button-color); + --fallback-background: var(--ck-primary-button-background); + --fallback-box-shadow: var(--ck-primary-button-box-shadow); + --fallback-border-radius: var(--ck-primary-button-border-radius); + + --color: var(--ck-primary-button-color, var(--fallback-color)); + --background: var(--ck-primary-button-background, var(--fallback-background)); + --box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow)); + --border-radius: var(--ck-primary-button-border-radius, var(--fallback-border-radius)); + + --hover-color: var(--ck-primary-button-hover-color, var(--color)); + --hover-background: var(--ck-primary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-primary-button-active-color, var(--hover-color)); + --active-background: var(--ck-primary-button-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-primary-button-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-primary-button-active-border-radius, var(--hover-border-radius)); + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &:disabled { + transition: 180ms ease; + } + + &:not(:disabled) { + &:hover { + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + } + &:focus-visible { + transition-duration: 100ms; + color: var(--hover-color); + background: var(--hover-background); + box-shadow: var(--hover-box-shadow); + border-radius: var(--hover-border-radius); + } + &:active { + color: var(--active-color); + background: var(--active-background); + box-shadow: var(--active-box-shadow); + border-radius: var(--active-border-radius); + } + } +`,dLe=ht(gt.span)` + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-right: 38px; +`,hLe=ht(gt.div)` + position: absolute; + right: 20px; + width: 32px; + height: 32px; + overflow: hidden; + svg { + display: block; + width: 100%; + height: 100%; + } +`,pLe=ht(gt.div)` + display: flex; + flex-direction: row; + align-items: flex-start; + justify-content: space-between; + padding: 14px 0 28px; + margin: 0 0; +`,gLe=ht(gt.button)` + --background: var(--ck-body-background-secondary); + cursor: pointer; + user-select: none; + position: relative; + padding: 0; + width: 100%; + min-width: 25%; + font-size: 13px; + font-weight: 500; + line-height: 13px; + text-align: center; + transition: transform 100ms ease; + + background: none; + + &:disabled { + cursor: not-allowed; + opacity: 0.4; + } + + &:not(:disabled) { + &:active { + transform: scale(0.97); + } + } +`,mLe=ht(gt.span)` + display: block; + padding: 10px 0 0; + color: var(--ck-body-color); + opacity: 0.75; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +`,vLe=ht(gt.div)` + margin: 0 auto; + width: 60px; + height: 60px; + overflow: hidden; + svg { + border-radius: inherit; + display: block; + position: relative; + transform: translate3d(0, 0, 0); + width: 100%; + height: 100%; + } +`,yLe=()=>{const e=Nl.find(t=>t.id==="desktopWallet");if(!e)throw new Error("Desktop wallet connector configuration not found");return e},bLe=e=>{const t=typeof window<"u",r=gP()&&!t;return{id:"injected",name:"Extension Wallet",shortName:"browser",scannable:!1,logos:{default:G.jsx(dn.AlephiumIcon,{})},installed:!!(!r&&t)}},wLe=e=>({id:"walletConnect",name:"Other Wallets",logos:{default:G.jsx(dn.WalletConnect,{}),mobile:G.jsx(dn.WalletConnect,{}),transparent:G.jsx(dn.WalletConnect,{background:!1}),connectorButton:G.jsx(dn.WalletConnect,{}),qrCode:G.jsx(dn.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}),_Le=({})=>[bLe(),wLe(),yLe()];function xLe(){return _Le({})}const SLe=()=>{const e=ka(),t=gP(),r=xLe();return G.jsx(_c,{style:{width:312},children:t?G.jsx(G.Fragment,{children:G.jsx(pLe,{children:Nl.map(n=>{var o,i,a,s,c;const l=Nl.filter(p=>p.id===n.id)[0];if(!l)return null;let u=l.logos,d=(i=(o=l.shortName)!==null&&o!==void 0?o:l.name)!==null&&i!==void 0?i:n.name;if(l.id==="injected"&&n.name){const p=BN(n.name,r);p&&(u=p.logos,d=p.name.replace(" Wallet",""))}return l.id==="walletConnect"?d="Wallet Connect":l.id==="desktopWallet"&&(d="Desktop wallet"),G.jsxs(gLe,{onClick:()=>{e.setRoute(Dn.CONNECT),e.setConnectorId(n.id)},children:[G.jsx(vLe,{children:(c=(s=(a=u.mobile)!==null&&a!==void 0?a:u.appIcon)!==null&&s!==void 0?s:u.connectorButton)!==null&&c!==void 0?c:u.default}),G.jsx(mLe,{children:d})]},`m-${n.id}`)})})}):G.jsx(G.Fragment,{children:G.jsx(uLe,{children:Nl.map(n=>{var o,i;const a=Nl.filter(u=>u.id===n.id)[0];if(!a)return null;let s=a.logos,c=(o=a.name)!==null&&o!==void 0?o:n.name;if(a.id==="walletConnect"?c="WalletConnect":a.id==="desktopWallet"&&(c="Desktop wallet"),a.id==="injected"&&n.name){const u=BN(n.name,r);u&&(s=u.logos,c=u.name)}let l=(i=s.connectorButton)!==null&&i!==void 0?i:s.default;return a.extensionIsInstalled&&s.appIcon&&a.extensionIsInstalled()&&(l=s.appIcon),G.jsxs(fLe,{disabled:e.route!==Dn.CONNECTORS,onClick:()=>{e.setRoute(Dn.CONNECT),e.setConnectorId(n.id)},children:[G.jsx(hLe,{children:l}),G.jsx(dLe,{children:c})]},n.id)})})})})},BN=(e,t)=>{let r=e.split(/[(),]+/);r.shift(),r=r.map(i=>i.trim());const n=r.filter(i=>t.map(s=>s.name).includes(i)?i:null);return n.length===0?null:t.filter(i=>i.installed&&i.name===n[0])[0]},ju=ht(gt.div)` + display: flex; + flex-direction: column; + gap: 6px; + position: relative; + left: 0; + right: 0; + ${Go} { + padding: 0 8px 32px; + gap: 12px; + } +`,Z3=2,ELe=Bo` + 0%{ transform:none; } + 25%{ transform:translateX(${Z3}px); } + 50%{ transform:translateX(-${Z3}px); } + 75%{ transform:translateX(${Z3}px); } + 100%{ transform:none; } +`,CLe=Bo` + 0%{ opacity:1; } + 100%{ opacity:0; } +`,Op=ht(gt.div)` + /* + background: var( + --ck-body-background + ); // To stop the overlay issue during transition for the squircle spinner + */ +`,PLe=ht(gt.div)` + display: flex; + align-items: center; + justify-content: center; + margin: 10px auto 16px; + height: 120px; + //transform: scale(1.001); // fixes shifting issue between states +`,ALe=ht(gt.div)` + user-select: none; + position: relative; + --spinner-error-opacity: 0; + &:before { + content: ''; + position: absolute; + inset: -5px; + opacity: 0; + background: var(--ck-body-color-danger); + ${e=>e.$circle&&Tr` + border-radius: 50%; + background: none; + box-shadow: inset 0 0 0 3.5px var(--ck-body-color-danger); + `} + } + ${e=>e.$shake&&Tr` + animation: ${ELe} 220ms ease-out both; + &:before { + animation: ${CLe} 220ms ease-out 750ms both; + } + `} +`,OLe=ht(gt.button)` + z-index: 5; + appearance: none; + position: absolute; + right: 2px; + bottom: 2px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + border-radius: 16px; + cursor: pointer; + overflow: hidden; + background: none; + + color: var(--ck-body-background); + transition: color 200ms ease; + box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); + + &:before { + z-index: 3; + content: ''; + position: absolute; + inset: 0; + opacity: 0; + transition: opacity 200ms ease; + background: var(--ck-body-color); + } + + &:hover:before { + opacity: 0.1; + } +`,ILe=ht(gt.div)` + position: absolute; + inset: 0; + + &:before { + z-index: 1; + content: ''; + position: absolute; + inset: 3px; + border-radius: 16px; + background: conic-gradient(from 90deg, currentColor 10%, var(--ck-body-color) 80%); + } + + svg { + z-index: 2; + display: block; + position: relative; + width: 100%; + height: 100%; + } +`,FN=Bo` + 0%{ transform: rotate(0deg); } + 100%{ transform: rotate(360deg); } +`,TLe=ht(gt.div)` + position: absolute; + right: 16px; + top: 0; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + animation: ${FN} 1s linear infinite; + svg { + display: block; + position: relative; + animation: ${FN} 1s ease-in-out infinite; + } +`,$f=ht.svg` + --x: -3px; + --stroke-width: 2; + position: relative; + top: 1px; + left: -0.5px; + display: inline-block; + vertical-align: middle; + margin-left: 9px; + margin-right: 1px; + transition: all 100ms ease; + transform: translateX(var(--x, -3px)); + color: var(--ck-secondary-button-color, var(--ck-body-color)); + opacity: 0.4; +`,Ip=ht.path``,Tp=ht.line` + transition: inherit; + transition-property: transform; + transform-origin: 90% 50%; + transform: scaleX(0.1); +`,rE=ht.div` + display: inline-block; + vertical-align: middle; + position: relative; + margin-right: 6px; + color: var(--ck-secondary-button-color, var(--ck-body-color)); +`,MLe=ht.div` + transform: rotate(90deg); + ${$f} { + margin: 0 auto; + } +`,kLe=ht(gt.div)` + display: flex; + align-items: center; + justify-content: center; + inset: 0; + height: 100%; +`,$Le=ht.button` + + ${({disabled:e})=>e&&Tr` + cursor: not-allowed; + pointer-events: none; + `} + + ${({$variant:e})=>{if(e==="primary")return Tr` + --color: var(--ck-primary-button-color, var(--ck-body-color)); + --background: var(--ck-primary-button-background, var(--ck-body-background-primary)); + --box-shadow: var(--ck-primary-button-box-shadow); + --border-radius: var(--ck-primary-button-border-radius); + --font-weight: var(--ck-primary-button-font-weight, 500); + + --hover-color: var(--ck-button-primary-hover-color, var(--color)); + --hover-background: var(--ck-primary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); + --hover-font-weight: var(--ck-primary-button-font-weight, var(--font-weight)); + `;if(e==="secondary")return Tr` + --color: var(--ck-secondary-button-color, var(--ck-body-color)); + --background: var(--ck-secondary-button-background, var(--ck-body-background-secondary)); + --box-shadow: var(--ck-secondary-button-box-shadow); + --border-radius: var(--ck-secondary-button-border-radius); + --font-weight: var(--ck-secondary-button-font-weight, 500); + + --hover-color: var(--ck-secondary-button-hover-color, var(--color)); + --hover-background: var(--ck-secondary-button-hover-background, var(--background)); + --hover-box-shadow: var(--ck-secondary-button-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-secondary-button-hover-border-radius, var(--border-radius)); + --hover-font-weight: var(--ck-secondary-button-font-weight, var(--font-weight)); + `;if(e==="tertiary")return Tr` + --color: var(--ck-tertiary-button-color, var(--ck-secondary-button-color)); + --background: var(--ck-tertiary-button-background, var(--ck-secondary-button-background)); + --box-shadow: var(--ck-tertiary-button-box-shadow, var(--ck-secondary-button-box-shadow)); + --border-radius: var(--ck-tertiary-button-border-radius, var(--ck-secondary-button-border-radius)); + --font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); + + --hover-color: var(--button-tertiary-hover-color, var(--ck-tertiary-button-color)); + --hover-background: var(--ck-tertiary-button-hover-background, var(--ck-tertiary-button-background)); + --hover-box-shadow: var(--ck-tertiary-button-hover-box-shadow, var(--ck-tertiary-button-box-shadow)); + --hover-border-radius: var( + --ck-tertiary-button-hover-border-radius, + var(--ck-tertiary-button-border-radius, var(--border-radius)) + ); + --hover-font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); + `}} + + appearance: none; + cursor: pointer; + user-select: none; + min-width: fit-content; + width: 100%; + display:block; + text-align: center; + height: 48px; + margin: 12px 0 0; + line-height: 48px; + padding: 0 4px; + font-size: 16px; + font-weight: var(--font-weight,500); + text-decoration: none; + white-space: nowrap; + transition: 100ms ease; + transition-property: box-shadow, background-color; + color: var(--color); + background: var(--background); + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); + will-change: transform, box-shadow, background-color, color; + + ${rE} { + ${$f} { + transform: translateX(0); + ${Tp} { + transform: none; + } + ${Ip} { + } + } + } +} + + @media only screen and (min-width: ${vs.mobileWidth+1}px) { + &:hover, + &:focus-visible { + color: var(--ck-accent-text-color, var(--hover-color)); + background: var(--ck-accent-color, var(--hover-background)); + border-radius: var(--hover-border-radius); + box-shadow: var(--hover-box-shadow); + + ${$f} { + transform: translateX(0); + ${Tp} { + transform: none; + } + ${Ip} { + } + } + ${rE} { + ${$f} { + transform: translateX(var(--x)); + ${Tp} { + transform: scaleX(0.1); + } + ${Ip} { + } + } + } + } + &:active { + box-shadow: var(--ck-secondary-button-active-box-shadow, var(--hover-box-shadow)); + } + } + @media only screen and (max-width: ${vs.mobileWidth}px) { + transition: transform 100ms ease; + transform: scale(1); + font-size: 17px; + &:active { + } + } +`,DLe=ht.div` + transform: translateZ(0); // Shifting fix + position: relative; + display: inline-block; + vertical-align: middle; + max-width: calc(100% - 42px); + /* + overflow: hidden; + text-overflow: ellipsis; + */ +`,jN=ht(gt.div)` + position: relative; + display: inline-block; + vertical-align: middle; + max-width: 20px; + max-height: 20px; + margin: 0 10px; + &:first-child { + margin-left: 0; + } + &:last-child { + margin-right: 0; + } + ${e=>e.$rounded&&Tr` + overflow: hidden; + border-radius: 5px; + `} + svg { + display: block; + position: relative; + max-width: 100%; + height: auto; + } +`,Bb={duration:.4,ease:[.175,.885,.32,.98]},RLe=()=>G.jsx(TLe,{initial:{opacity:0,rotate:180},animate:{opacity:1,rotate:0},exit:{position:"absolute",opacity:0,rotate:-180,transition:{...Bb}},transition:{...Bb,delay:.2},children:G.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx("circle",{cx:"9",cy:"9",r:"7",stroke:"currentColor",strokeOpacity:"0.1",strokeWidth:"2.5"}),G.jsx("path",{d:"M16 9C16 5.13401 12.866 2 9 2",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})}),mf=({children:e,variant:t="secondary",disabled:r,icon:n,iconPosition:o="left",roundedIcon:i,waiting:a,arrow:s,download:c,href:l,style:u,onClick:d})=>{const p=typeof e=="string"?e:YS(e).join(""),m=typeof l=="string"?l:YS(l).join("");return G.jsx($Le,{as:l?"a":void 0,onClick:w=>{!r&&d&&d(w)},href:m,target:l&&"_blank",rel:l&&"noopener noreferrer",disabled:r,$variant:t,style:u,children:G.jsxs(Ni,{initial:!1,children:[G.jsxs(kLe,{initial:{opacity:0,y:-10},animate:{opacity:1,y:-1},exit:{position:"absolute",opacity:0,y:10,transition:{...Bb}},transition:{...Bb,delay:.2},children:[n&&o==="left"&&G.jsx(jN,{$rounded:i,children:n}),c&&G.jsx(rE,{children:G.jsx(MLe,{children:G.jsxs($f,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx(Tp,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"}),G.jsx(Ip,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"})]})})}),G.jsx(DLe,{style:{paddingLeft:s?6:0},children:G.jsx(vP,{children:e})}),n&&o==="right"&&G.jsx(jN,{$rounded:i,children:n}),s&&G.jsxs($f,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx(Tp,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"2",strokeLinecap:"round"}),G.jsx(Ip,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"2",strokeLinecap:"round"})]})]},p),a&&G.jsx(RLe,{})]})})},NLe=ht(gt.div)` + z-index: 2147483647; + position: fixed; + inset: 0; + pointer-events: none; +`,BLe=ht(gt.div)` + --shadow: var(--ck-tooltip-shadow); + z-index: 2147483647; + position: absolute; + top: 0; + left: 0; + display: flex; + gap: 8px; + width: fit-content; + align-items: center; + justify-content: center; + border-radius: var(--ck-tooltip-border-radius, ${e=>e.$size==="small"?11:14}px); + border-radius: ; + padding: 10px 16px 10px 12px; + font-size: 14px; + line-height: 19px; + font-weight: 500; + letter-spacing: -0.1px; + color: var(--ck-tooltip-color); + background: var(--ck-tooltip-background); + box-shadow: var(--shadow); + > span { + z-index: 3; + position: relative; + } + > div { + margin: -4px 0; // offset for icon + } + strong { + color: var(--ck-spinner-color); + } + + .ck-tt-logo { + display: inline-block; + vertical-align: text-bottom; + height: 1em; + width: 1.25em; + svg { + display: block; + height: 100%; + transform: translate(0.5px, -1px) scale(1.75); + } + } +`,FLe=ht(gt.div)` + z-index: 2; + position: absolute; + display: flex; + align-items: center; + justify-content: center; + width: ${e=>e.$size==="small"?14:18}px; + right: 100%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + content: ''; + position: absolute; + box-shadow: var(--shadow); + width: ${e=>e.$size==="small"?14:18}px; + height: ${e=>e.$size==="small"?14:18}px; + transform: translate(75%, 0) rotate(45deg); + background: var(--ck-tooltip-background); + border-radius: ${e=>e.$size==="small"?2:3}px 0 0 0; + } +`,jLe=({children:e,message:t,open:r,xOffset:n=0,yOffset:o=0,delay:i})=>{const a=ka(),[s,c]=z.useState(!1),[l,u]=z.useState(!1),[d,p]=z.useState("small"),[m,w]=z.useState(!1),[A]=z.useState(a.route),T=z.useRef(null),[O,P]=TK({debounce:m?0:220,offsetSize:!0,scroll:!0}),$=()=>{let I=!1;const b=n+P.left+P.width,N=o+P.top+P.height*.5;return(b>window.innerWidth||b<0||N>window.innerHeight||N<0)&&(I=!0),I};return(typeof window<"u"?z.useLayoutEffect:z.useEffect)(()=>{if(!T.current||P.top+P.bottom+P.left+P.right+P.height+P.width===0)return;const I=n+P.left+P.width,b=o+P.top+P.height*.5;!m&&I!==0&&b!==0&&w(!0),T.current.style.left=`${I}px`,T.current.style.top=`${b}px`,p(T.current.offsetHeight<=40?"small":"large"),u($())},[P,r,s]),z.useEffect(()=>{a.open||c(!1)},[a.open]),z.useEffect(()=>{c(!!r)},[r]),G.jsxs(G.Fragment,{children:[G.jsx(gt.div,{ref:O,style:r===void 0?{cursor:"help"}:{},onHoverStart:()=>c(!0),onHoverEnd:()=>c(!1),onClick:()=>c(!1),children:e}),G.jsx(lte,{children:G.jsx(Ni,{children:A===a.route&&!l&&s&&G.jsx(yP,{$useTheme:a.theme,$useMode:a.mode,$customTheme:a.customTheme,children:G.jsx(NLe,{children:G.jsxs(BLe,{role:"tooltip",$size:d,ref:T,initial:"collapsed",animate:m?"open":{},exit:"collapsed",variants:{collapsed:{transformOrigin:"20px 50%",opacity:0,scale:.9,z:.01,y:"-50%",x:20,transition:{duration:.1}},open:{willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:"-50%",x:20,transition:{ease:[.76,0,.24,1],duration:.15,delay:i||.5}}},children:[t,G.jsx(FLe,{$size:d})]})})})})})]})},LLe=ht(gt.div)` + display: flex; + gap: 8px; + position: relative; + border-radius: 9px; + margin: 0 auto; + padding: 10px; + text-align: left; + font-size: 14px; + line-height: 17px; + font-weight: 400; + max-width: 260px; + min-width: 100%; + + border-radius: var(--ck-alert-border-radius, 12px); + color: var(--ck-alert-color, var(--ck-body-color-muted)); + background: var(--ck-alert-background, var(--ck-body-background-secondary)); + box-shadow: var(--ck-alert-box-shadow, var(--ck-body-box-shadow)); + + @media only screen and (max-width: ${vs.mobileWidth}px) { + padding: 16px; + font-size: 16px; + line-height: 21px; + border-radius: 24px; + text-align: center; + } +`,ULe=ht(gt.div)` + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + svg { + display: block; + width: 100%; + height: auto; + } +`,Fb=fe.forwardRef(({children:e,icon:t},r)=>G.jsxs(LLe,{children:[t&&G.jsx(ULe,{children:t}),G.jsx("div",{children:e})]}));Fb.displayName="Alert";const HLe=ht(gt.div)` + z-index: 4; + position: relative; + width: 100px; + height: 100px; + svg { + z-index: 3; + position: relative; + display: block; + } +`,zLe=ht(gt.div)` + z-index: 2; + position: absolute; + //overflow: hidden; + inset: 6px; + border-radius: 50px; + background: var(--ck-body-background); + display: flex; + align-items: center; + justify-content: center; + svg, + img { + pointer-events: none; + display: block; + margin: 0 auto; + width: 100%; + height: 100%; + ${e=>e.$small&&Tr` + width: 60%; + height: 60%; + `} + } +`,VLe=ht(gt.div)` + position: absolute; + inset: -5px; +`,qLe=ht(gt.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: -25%; + background: var(--ck-body-background); + div:first-child { + position: absolute; + left: 50%; + right: 0; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 0% 50%; + animation: rotateExpiringSpinner 5000ms ease-in both; + } + } + div:last-child { + position: absolute; + left: 0; + right: 50%; + top: 0; + bottom: 0; + overflow: hidden; + &:before { + position: absolute; + content: ''; + inset: 0; + background: var(--ck-spinner-color); + transform-origin: 100% 50%; + animation: rotateExpiringSpinner 5000ms ease-out 5000ms both; + } + } + @keyframes rotateExpiringSpinner { + 0% { + transform: rotate(-180deg); + } + 100% { + transform: rotate(0deg); + } + } +`,WLe=ht(gt.div)` + pointer-events: none; + user-select: none; + z-index: 1; + position: absolute; + inset: 0; + svg { + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + animation: rotateSpinner 1200ms linear infinite; + } + @keyframes rotateSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } + } +`,GLe=({logo:e,smallLogo:t,connecting:r=!0,unavailable:n=!1,countdown:o=!1})=>G.jsxs(HLe,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[G.jsx(zLe,{$small:!n&&t,style:n?{borderRadius:0}:void 0,children:e}),G.jsx(VLe,{children:G.jsxs(Ni,{children:[r&&G.jsx(WLe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:o?1:0}},children:G.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx("path",{d:"M52 100C24.3858 100 2 77.6142 2 50",stroke:"url(#paint0_linear_1943_4139)",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),G.jsx("defs",{children:G.jsxs("linearGradient",{id:"paint0_linear_1943_4139",x1:"2",y1:"48.5",x2:"53",y2:"100",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),G.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]})},"Spinner"),o&&G.jsxs(qLe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[G.jsx("div",{}),G.jsx("div",{})]},"ExpiringSpinner")]})})]}),LN=({...e})=>G.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 2.82561C0 1.26507 1.26507 0 2.82561 0H4.59161C6.15215 0 7.41722 1.26507 7.41722 2.82561V4.59161C7.41722 6.15215 6.15215 7.41722 4.59161 7.41722H2.82561C1.26507 7.41722 0 6.15215 0 4.59161V2.82561ZM2.82561 1.69536C2.20139 1.69536 1.69536 2.20139 1.69536 2.82561V4.59161C1.69536 5.21583 2.20139 5.72185 2.82561 5.72185H4.59161C5.21583 5.72185 5.72185 5.21583 5.72185 4.59161V2.82561C5.72185 2.20139 5.21583 1.69536 4.59161 1.69536H2.82561ZM0 11.4084C0 9.84791 1.26507 8.58284 2.82561 8.58284H4.59161C6.15215 8.58284 7.41722 9.8479 7.41722 11.4084V13.1744C7.41722 14.735 6.15215 16.0001 4.59161 16.0001H2.82561C1.26507 16.0001 0 14.735 0 13.1744V11.4084ZM2.82561 10.2782C2.20139 10.2782 1.69536 10.7842 1.69536 11.4084V13.1744C1.69536 13.7987 2.20139 14.3047 2.82561 14.3047H4.59161C5.21583 14.3047 5.72185 13.7987 5.72185 13.1744V11.4084C5.72185 10.7842 5.21583 10.2782 4.59161 10.2782H2.82561ZM11.4083 0C9.84779 0 8.58272 1.26507 8.58272 2.82561V4.59161C8.58272 6.15215 9.84779 7.41722 11.4083 7.41722H13.1743C14.7349 7.41722 15.9999 6.15215 15.9999 4.59161V2.82561C15.9999 1.26507 14.7349 0 13.1743 0H11.4083ZM10.2781 2.82561C10.2781 2.20139 10.7841 1.69536 11.4083 1.69536H13.1743C13.7985 1.69536 14.3046 2.20139 14.3046 2.82561V4.59161C14.3046 5.21583 13.7985 5.72185 13.1743 5.72185H11.4083C10.7841 5.72185 10.2781 5.21583 10.2781 4.59161V2.82561ZM15.7351 9.96026C15.7351 10.7795 15.0709 11.4437 14.2516 11.4437C13.4323 11.4437 12.7682 10.7795 12.7682 9.96026C12.7682 9.14098 13.4323 8.47682 14.2516 8.47682C15.0709 8.47682 15.7351 9.14098 15.7351 9.96026ZM9.96026 11.4437C10.7795 11.4437 11.4437 10.7795 11.4437 9.96026C11.4437 9.14098 10.7795 8.47682 9.96026 8.47682C9.14098 8.47682 8.47682 9.14098 8.47682 9.96026C8.47682 10.7795 9.14098 11.4437 9.96026 11.4437ZM15.7351 14.2517C15.7351 15.071 15.0709 15.7352 14.2516 15.7352C13.4323 15.7352 12.7682 15.071 12.7682 14.2517C12.7682 13.4325 13.4323 12.7683 14.2516 12.7683C15.0709 12.7683 15.7351 13.4325 15.7351 14.2517ZM9.96026 15.7352C10.7795 15.7352 11.4437 15.071 11.4437 14.2517C11.4437 13.4325 10.7795 12.7683 9.96026 12.7683C9.14098 12.7683 8.47682 13.4325 8.47682 14.2517C8.47682 15.071 9.14098 15.7352 9.96026 15.7352Z",fill:"currentColor",fillOpacity:"0.3"})}),KLe=({...e})=>G.jsxs("svg",{"aria-hidden":"true",width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z",fill:"currentColor"}),G.jsx("path",{d:"M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z",fill:"currentColor"})]}),YLe=({...e})=>G.jsx("svg",{"aria-hidden":"true",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H6C6.55228 14 7 13.5523 7 13C7 12.4477 6.55228 12 6 12H4C2.89543 12 2 11.1046 2 10V4C2 2.89543 2.89543 2 4 2H6C6.55228 2 7 1.55228 7 1C7 0.447715 6.55228 0 6 0H4ZM11.7071 3.29289C11.3166 2.90237 10.6834 2.90237 10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L11.5858 6H9.5H6C5.44772 6 5 6.44772 5 7C5 7.55228 5.44772 8 6 8H9.5H11.5858L10.2929 9.29289C9.90237 9.68342 9.90237 10.3166 10.2929 10.7071C10.6834 11.0976 11.3166 11.0976 11.7071 10.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289L11.7071 3.29289Z",fill:"currentColor",fillOpacity:"0.4"})}),JLe=({...e})=>G.jsx("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.274 7.13324C13.6237 6.70579 13.5607 6.07577 13.1332 5.72604C12.7058 5.37632 12.0758 5.43932 11.726 5.86676L7.92576 10.5115L6.20711 8.79289C5.81658 8.40237 5.18342 8.40237 4.79289 8.79289C4.40237 9.18342 4.40237 9.81658 4.79289 10.2071L7.29289 12.7071C7.49267 12.9069 7.76764 13.0128 8.04981 12.9988C8.33199 12.9847 8.59505 12.8519 8.77396 12.6332L13.274 7.13324Z",fill:"currentColor"})}),ZLe=({...e})=>G.jsx("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:G.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM24.5001 8.74263C25.0834 8.74263 25.5563 9.21551 25.5563 9.79883V14.5997C25.5563 15.183 25.0834 15.6559 24.5001 15.6559H19.6992C19.1159 15.6559 18.643 15.183 18.643 14.5997C18.643 14.0164 19.1159 13.5435 19.6992 13.5435H21.8378L20.071 11.8798C20.0632 11.8724 20.0555 11.865 20.048 11.8574C19.1061 10.915 17.8835 10.3042 16.5643 10.1171C15.2452 9.92999 13.9009 10.1767 12.7341 10.82C11.5674 11.4634 10.6413 12.4685 10.0955 13.684C9.54968 14.8994 9.41368 16.2593 9.70801 17.5588C10.0023 18.8583 10.711 20.0269 11.7273 20.8885C12.7436 21.7502 14.0124 22.2582 15.3425 22.336C16.6726 22.4138 17.9919 22.0572 19.1017 21.3199C19.5088 21.0495 19.8795 20.7333 20.2078 20.3793C20.6043 19.9515 21.2726 19.9262 21.7004 20.3228C22.1282 20.7194 22.1534 21.3876 21.7569 21.8154C21.3158 22.2912 20.8176 22.7161 20.2706 23.0795C18.7793 24.0702 17.0064 24.5493 15.2191 24.4448C13.4318 24.3402 11.7268 23.6576 10.3612 22.4998C8.9956 21.3419 8.0433 19.7716 7.6478 18.0254C7.2523 16.2793 7.43504 14.4519 8.16848 12.8186C8.90192 11.1854 10.1463 9.83471 11.7142 8.97021C13.282 8.10572 15.0884 7.77421 16.861 8.02565C18.6282 8.27631 20.2664 9.09278 21.5304 10.3525L23.4439 12.1544V9.79883C23.4439 9.21551 23.9168 8.74263 24.5001 8.74263Z",fill:"currentColor"})}),XLe=({...e})=>G.jsxs("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[G.jsx("path",{d:"M14 9.5V7C14 5.89543 13.1046 5 12 5H7C5.89543 5 5 5.89543 5 7V12C5 13.1046 5.89543 14 7 14H9.5",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),G.jsx("rect",{x:"10",y:"10",width:"9",height:"9",rx:"2",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),G.jsx("path",{d:"M1 3L3 5L7 1",stroke:"var(--ck-body-color)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),QLe=ht(gt.div)` + display: flex; + align-items: center; + justify-content: center; + max-width: 32px; + max-height: 32px; + width: 100%; + height: 100%; + svg { + display: block; + width: 100%; + height: 100%; + } +`,eUe=G.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx("g",{filter:"url(#filter0_ii_927_5781)",children:G.jsxs("g",{clipPath:"url(#clip0_927_5781)",children:[G.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"#DB4437"}),G.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"url(#paint0_linear_927_5781)"}),G.jsx("path",{d:"M6.17038 12.2272L1.64538 4.46582L1.57947 4.57946L6.07265 12.284L6.17038 12.2272Z",fill:"black",fillOpacity:"0.15"}),G.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"#0F9D58"}),G.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"url(#paint1_linear_927_5781)"}),G.jsx("path",{d:"M13.8412 12.4208L13.7469 12.3662L9.38324 19.9969H9.51392L13.8435 12.4242L13.8412 12.4208Z",fill:"#263238",fillOpacity:"0.15"}),G.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"#FFCD40"}),G.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"url(#paint2_linear_927_5781)"}),G.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"#FFCD40"}),G.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"url(#paint3_linear_927_5781)"}),G.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"#DB4437"}),G.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"url(#paint4_linear_927_5781)"}),G.jsx("path",{d:"M10 5.45459V7.83527L18.9091 5.45459H10Z",fill:"url(#paint5_radial_927_5781)"}),G.jsx("path",{d:"M0 19.9998H9.51932L11.9318 15.9089L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"#0F9D58"}),G.jsx("path",{d:"M0 19.9998H9.51932L12.1023 15.5112L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"url(#paint6_linear_927_5781)"}),G.jsx("path",{d:"M1.58771 4.59668L8.09339 11.1012L6.06384 12.2728L1.58771 4.59668Z",fill:"url(#paint7_radial_927_5781)"}),G.jsx("path",{d:"M9.52661 19.9884L11.9084 11.1021L13.938 12.2725L9.52661 19.9884Z",fill:"url(#paint8_radial_927_5781)"}),G.jsx("path",{d:"M10.0003 14.5455C12.5107 14.5455 14.5458 12.5104 14.5458 10C14.5458 7.48966 12.5107 5.45459 10.0003 5.45459C7.48996 5.45459 5.4549 7.48966 5.4549 10C5.4549 12.5104 7.48996 14.5455 10.0003 14.5455Z",fill:"#F1F1F1"}),G.jsx("path",{d:"M9.99995 13.6365C12.0083 13.6365 13.6363 12.0084 13.6363 10.0001C13.6363 7.99183 12.0083 6.36377 9.99995 6.36377C7.99164 6.36377 6.36359 7.99183 6.36359 10.0001C6.36359 12.0084 7.99164 13.6365 9.99995 13.6365Z",fill:"#4285F4"}),G.jsx("path",{d:"M10.0003 5.34082C7.48899 5.34082 5.4549 7.37491 5.4549 9.88628V9.99991C5.4549 7.48855 7.48899 5.45446 10.0003 5.45446H20.0003V5.34082H10.0003Z",fill:"black",fillOpacity:"0.2"}),G.jsx("path",{d:"M13.9318 12.273C13.1455 13.6299 11.6818 14.5458 10 14.5458C8.31818 14.5458 6.85227 13.6299 6.06818 12.273H6.06364L0 1.87305V1.98668L6.06818 12.3867C6.85455 13.7435 8.31818 14.6594 10 14.6594C11.6818 14.6594 13.1455 13.7446 13.9318 12.3867H13.9375V12.273H13.9307H13.9318Z",fill:"white",fillOpacity:"0.1"}),G.jsx("path",{opacity:"0.1",d:"M10.1133 5.45459C10.094 5.45459 10.0758 5.45686 10.0565 5.458C12.5406 5.48868 14.5452 7.50913 14.5452 10C14.5452 12.491 12.5406 14.5114 10.0565 14.5421C10.0758 14.5421 10.094 14.5455 10.1133 14.5455C12.6247 14.5455 14.6588 12.5114 14.6588 10C14.6588 7.48868 12.6247 5.45459 10.1133 5.45459Z",fill:"black"}),G.jsx("path",{d:"M13.9769 12.4204C14.3632 11.7522 14.5871 10.9795 14.5871 10.1522C14.5874 9.68602 14.5157 9.22262 14.3746 8.77832C14.4826 9.16696 14.5451 9.57377 14.5451 9.99764C14.5451 10.8249 14.3212 11.5976 13.9348 12.2658L13.9371 12.2704L9.51892 19.9976H9.65074L13.9769 12.4204Z",fill:"white",fillOpacity:"0.2"}),G.jsx("path",{d:"M10 0.113636C15.5034 0.113636 19.9682 4.56023 20 10.0568C20 10.0375 20.0011 10.0193 20.0011 10C20.0011 4.47727 15.5239 0 10.0011 0C4.47841 0 0 4.47727 0 10C0 10.0193 0.00113639 10.0375 0.00113639 10.0568C0.0318182 4.56023 4.49659 0.113636 10 0.113636Z",fill:"white",fillOpacity:"0.2"}),G.jsx("path",{d:"M10 19.8865C15.5034 19.8865 19.9682 15.4399 20 9.94336C20 9.96268 20.0011 9.98086 20.0011 10.0002C20.0011 15.5229 15.5239 20.0002 10.0011 20.0002C4.47841 20.0002 0 15.5229 0 10.0002C0 9.98086 0.00113639 9.96268 0.00113639 9.94336C0.0318182 15.4399 4.49659 19.8865 10.0011 19.8865H10Z",fill:"black",fillOpacity:"0.15"})]})}),G.jsxs("defs",{children:[G.jsxs("filter",{id:"filter0_ii_927_5781",x:0,y:"-0.235294",width:20,height:"20.4706",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[G.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),G.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),G.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),G.jsx("feOffset",{dy:"0.235294"}),G.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),G.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),G.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),G.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_927_5781"}),G.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),G.jsx("feOffset",{dy:"-0.235294"}),G.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),G.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),G.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),G.jsx("feBlend",{mode:"normal",in2:"effect1_innerShadow_927_5781",result:"effect2_innerShadow_927_5781"})]}),G.jsxs("linearGradient",{id:"paint0_linear_927_5781",x1:"2.42521",y1:"7.61591",x2:"8.39112",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),G.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),G.jsxs("linearGradient",{id:"paint1_linear_927_5781",x1:"11.6932",y1:"17.7844",x2:"5.06136",y2:"13.8981",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),G.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),G.jsxs("linearGradient",{id:"paint2_linear_927_5781",x1:"12.9438",y1:"4.75004",x2:"14.6143",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),G.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),G.jsxs("linearGradient",{id:"paint3_linear_927_5781",x1:"12.9428",y1:"4.75004",x2:"14.6132",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),G.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),G.jsxs("linearGradient",{id:"paint4_linear_927_5781",x1:"2.42441",y1:"7.61591",x2:"8.39032",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),G.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),G.jsxs("radialGradient",{id:"paint5_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.56818 5.44891) scale(9.55455)",children:[G.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),G.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),G.jsxs("linearGradient",{id:"paint6_linear_927_5781",x1:"11.6932",y1:"17.7839",x2:"5.06136",y2:"13.8976",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),G.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),G.jsxs("radialGradient",{id:"paint7_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.57975 4.60463) scale(8.86818)",children:[G.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),G.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),G.jsxs("radialGradient",{id:"paint8_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.97775 10.0157) scale(9.98523)",children:[G.jsx("stop",{stopColor:"#263238",stopOpacity:"0.2"}),G.jsx("stop",{offset:1,stopColor:"#263238",stopOpacity:0})]}),G.jsx("clipPath",{id:"clip0_927_5781",children:G.jsx("rect",{width:20,height:20,rx:10,fill:"white"})})]})]}),tUe=G.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsxs("g",{clipPath:"url(#clip0_927_5847)",children:[G.jsx("path",{d:"M19.011 6.71023C18.5898 5.69685 17.7355 4.60269 17.0665 4.25681C17.5436 5.18063 17.8747 6.17276 18.0481 7.19792L18.0499 7.21417C16.954 4.48315 15.0963 3.38023 13.5782 0.981835C13.5014 0.860539 13.4246 0.738994 13.3498 0.610696C13.3071 0.537418 13.2728 0.471393 13.2431 0.410621C13.1801 0.288713 13.1316 0.159878 13.0985 0.0267267C13.0985 0.0205825 13.0963 0.0146369 13.0923 0.0100242C13.0882 0.00541151 13.0826 0.00245454 13.0765 0.00171737C13.0705 7.85858e-05 13.0642 7.85858e-05 13.0582 0.00171737C13.057 0.00171737 13.055 0.00396821 13.0535 0.0044684C13.052 0.00496859 13.0487 0.00721943 13.0465 0.00821981L13.0502 0.00171737C10.6156 1.42725 9.78901 4.06574 9.71399 5.38624C8.74136 5.45292 7.81141 5.81121 7.04549 6.41437C6.96561 6.34671 6.88212 6.28343 6.79539 6.2248C6.57456 5.45174 6.56514 4.6336 6.76813 3.85566C5.87401 4.28877 5.07954 4.90279 4.43501 5.65884H4.43051C4.04636 5.17191 4.07337 3.5663 4.09538 3.23093C3.98174 3.2766 3.87326 3.33419 3.77176 3.40274C3.43264 3.64477 3.11562 3.91635 2.8244 4.2143C2.49255 4.55075 2.18946 4.91441 1.91831 5.30146V5.30296V5.3012C1.29521 6.18444 0.853213 7.18234 0.617826 8.23731L0.604821 8.30133C0.586564 8.38661 0.52079 8.81377 0.509535 8.90656C0.509535 8.91381 0.508035 8.92056 0.507285 8.92781C0.42244 9.36882 0.369864 9.81542 0.349976 10.2641V10.3141C0.354259 12.7396 1.26772 15.0754 2.91002 16.8604C4.55233 18.6454 6.80415 19.7498 9.22094 19.9556C11.6377 20.1615 14.0439 19.4538 15.9644 17.9723C17.8849 16.4908 19.1803 14.3431 19.5947 11.9532C19.6109 11.8282 19.6242 11.7044 19.6387 11.5781C19.8384 9.92791 19.6222 8.25404 19.01 6.70873L19.011 6.71023ZM7.83928 14.2981C7.88455 14.3198 7.92707 14.3433 7.97358 14.3641L7.98034 14.3684C7.93332 14.3458 7.8863 14.3224 7.83928 14.2981ZM18.0501 7.21692V7.20767L18.0519 7.21792L18.0501 7.21692Z",fill:"url(#paint0_linear_927_5847)"}),G.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint1_radial_927_5847)"}),G.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint2_radial_927_5847)"}),G.jsx("path",{d:"M14.2993 7.84794C14.3203 7.8627 14.3398 7.87745 14.3595 7.89221C14.1161 7.46047 13.813 7.06519 13.4592 6.71802C10.4456 3.70439 12.6696 0.18557 13.0445 0.00550206L13.0483 0C10.6136 1.42553 9.78706 4.06402 9.71204 5.38452C9.82508 5.37677 9.93712 5.36726 10.0527 5.36726C10.9164 5.36893 11.7644 5.59929 12.5103 6.03492C13.2562 6.47055 13.8734 7.09592 14.2993 7.84744V7.84794Z",fill:"url(#paint3_radial_927_5847)"}),G.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint4_radial_927_5847)"}),G.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint5_radial_927_5847)"}),G.jsx("path",{d:"M6.59134 6.0923C6.66987 6.14231 6.73464 6.18583 6.79141 6.2251C6.57058 5.45204 6.56117 4.63389 6.76415 3.85596C5.87003 4.28907 5.07556 4.90308 4.43103 5.65913C4.4783 5.65788 5.88432 5.63262 6.59134 6.0923Z",fill:"url(#paint6_radial_927_5847)"}),G.jsx("path",{d:"M0.437567 10.5439C1.1856 14.963 5.19185 18.3393 9.73855 18.4668C13.9476 18.5859 16.6361 16.1425 17.7466 13.7601C18.6873 11.6998 18.7954 9.35569 18.0482 7.21762V7.20837C18.0482 7.20111 18.0467 7.19686 18.0482 7.19911L18.0499 7.21537C18.3938 9.46046 17.2519 11.6345 15.4665 13.1076L15.4609 13.1201C11.9821 15.9536 8.6534 14.8292 7.98064 14.3706C7.93363 14.348 7.88661 14.3246 7.83959 14.3003C5.81158 13.3309 4.97352 11.4842 5.15358 9.89862C4.67218 9.90573 4.19905 9.77307 3.79151 9.51672C3.38397 9.26038 3.05952 8.89134 2.85747 8.45433C3.38987 8.1282 3.99692 7.94382 4.62077 7.91878C5.24461 7.89374 5.86448 8.02887 6.42131 8.31128C7.56906 8.83225 8.87507 8.8836 10.0602 8.45433C10.0564 8.37555 8.36954 7.70405 7.71179 7.05631C7.36041 6.70993 7.1936 6.54312 7.04579 6.41782C6.96591 6.35016 6.88243 6.28688 6.7957 6.22825C6.73818 6.18898 6.6734 6.14647 6.59562 6.09545C5.88861 5.63578 4.48258 5.66104 4.43607 5.66229H4.43156C4.04742 5.17535 4.07443 3.56975 4.09644 3.23438C3.9828 3.28005 3.87431 3.33764 3.77282 3.40619C3.4337 3.64822 3.11667 3.91979 2.82546 4.21774C2.49242 4.55325 2.18808 4.91607 1.91562 5.3024V5.3039V5.30215C1.29252 6.18539 0.850521 7.18329 0.615133 8.23825C0.610381 8.25801 0.266002 9.76357 0.435816 10.5444L0.437567 10.5439Z",fill:"url(#paint7_radial_927_5847)"}),G.jsx("path",{d:"M13.459 6.71761C13.8128 7.06516 14.1159 7.46087 14.3593 7.89305C14.4126 7.93331 14.4624 7.97333 14.5046 8.01209C16.7022 10.0378 15.5508 12.9014 15.465 13.104C17.2502 11.6332 18.3911 9.45763 18.0485 7.21179C16.952 4.47826 15.0923 3.37535 13.5768 0.976952C13.5 0.855657 13.4232 0.734111 13.3484 0.605813C13.3057 0.532535 13.2714 0.466511 13.2417 0.405738C13.1787 0.283831 13.1302 0.154995 13.0971 0.0218439C13.0971 0.0156997 13.0949 0.0097541 13.0909 0.0051414C13.0868 0.000528701 13.0812 -0.00242828 13.0751 -0.00316545C13.0691 -0.00480423 13.0628 -0.00480423 13.0568 -0.00316545C13.0556 -0.00316545 13.0536 -0.000914601 13.0521 -0.000414413C13.0506 8.57743e-05 13.0473 0.00233662 13.0451 0.00333699C12.6702 0.181154 10.4466 3.70222 13.4602 6.71335L13.459 6.71761Z",fill:"url(#paint8_radial_927_5847)"}),G.jsx("path",{d:"M14.5043 8.01315C14.462 7.97439 14.4122 7.93437 14.359 7.8941C14.3392 7.87935 14.3197 7.86459 14.2987 7.84984C13.6169 7.37759 12.784 7.17536 11.9616 7.28238C15.4479 9.02553 14.5125 15.0278 9.68095 14.8027C9.25075 14.785 8.82562 14.703 8.41973 14.5594C8.32486 14.5238 8.22999 14.485 8.13512 14.4428C8.08035 14.4178 8.02558 14.3928 7.97156 14.3648L7.97831 14.369C8.65206 14.829 11.9798 15.9526 15.4586 13.1186L15.4641 13.1061C15.5509 12.9035 16.7023 10.0399 14.5038 8.01415L14.5043 8.01315Z",fill:"url(#paint9_radial_927_5847)"}),G.jsx("path",{d:"M5.68842 11.1892C5.68842 11.1892 6.13583 9.52179 8.89212 9.52179C9.18998 9.52179 10.0425 8.69023 10.0578 8.44914C8.8727 8.8784 7.56669 8.82706 6.41894 8.30608C5.86211 8.02367 5.24224 7.88855 4.61839 7.91359C3.99455 7.93863 3.3875 8.123 2.8551 8.44914C3.05715 8.88615 3.3816 9.25518 3.78914 9.51153C4.19668 9.76787 4.66981 9.90053 5.15121 9.89343C4.97165 11.4783 5.80946 13.3247 7.83722 14.2951C7.88249 14.3168 7.925 14.3403 7.97152 14.3611C6.78783 13.7496 5.81046 12.5932 5.68842 11.1899V11.1892Z",fill:"url(#paint10_radial_927_5847)"}),G.jsx("path",{d:"M19.0112 6.71023C18.59 5.69685 17.7357 4.60269 17.0667 4.25681C17.5438 5.18063 17.8749 6.17276 18.0483 7.19792L18.0501 7.21417C16.9542 4.48315 15.0965 3.38023 13.5784 0.981835C13.5016 0.860539 13.4249 0.738994 13.3501 0.610696C13.3073 0.537418 13.2731 0.471393 13.2433 0.410621C13.1803 0.288713 13.1318 0.159878 13.0987 0.0267267C13.0988 0.0205825 13.0966 0.0146369 13.0925 0.0100242C13.0884 0.00541151 13.0828 0.00245454 13.0767 0.00171737C13.0708 7.85859e-05 13.0644 7.85859e-05 13.0585 0.00171737C13.0572 0.00171737 13.0552 0.00396821 13.0537 0.0044684C13.0522 0.00496859 13.049 0.00721943 13.0467 0.00821981L13.0505 0.00171737C10.6158 1.42725 9.78925 4.06574 9.71422 5.38624C9.82726 5.37848 9.9393 5.36898 10.0548 5.36898C10.9186 5.37065 11.7666 5.60101 12.5125 6.03664C13.2584 6.47227 13.8756 7.09764 14.3014 7.84916C13.6196 7.37691 12.7868 7.17468 11.9643 7.2817C15.4506 9.02485 14.5153 15.0271 9.68371 14.802C9.25351 14.7843 8.82838 14.7023 8.42248 14.5587C8.32761 14.5232 8.23275 14.4843 8.13788 14.4421C8.08311 14.4171 8.02834 14.3921 7.97432 14.3641L7.98107 14.3684C7.93405 14.3458 7.88703 14.3224 7.84002 14.2981C7.88528 14.3198 7.9278 14.3433 7.97432 14.3641C6.79062 13.7524 5.81326 12.5959 5.69121 11.1929C5.69121 11.1929 6.13863 9.52554 8.89491 9.52554C9.19277 9.52554 10.0453 8.69398 10.0606 8.45289C10.0568 8.37411 8.36996 7.7026 7.71222 7.05486C7.36084 6.70848 7.19402 6.54167 7.04622 6.41637C6.96634 6.34871 6.88285 6.28543 6.79612 6.2268C6.57529 5.45374 6.56588 4.6356 6.76886 3.85766C5.87474 4.29077 5.08027 4.90479 4.43574 5.66084H4.43124C4.04709 5.17391 4.0741 3.5683 4.09611 3.23293C3.98247 3.2786 3.87399 3.33619 3.77249 3.40474C3.43337 3.64677 3.11635 3.91835 2.82514 4.2163C2.49328 4.55275 2.19019 4.91641 1.91905 5.30345V5.30496V5.30321C1.29595 6.18644 0.853946 7.18434 0.618558 8.23931L0.605554 8.30333C0.587297 8.38861 0.505516 8.82177 0.493762 8.91481C0.418959 9.36194 0.371188 9.81318 0.350708 10.2661V10.3161C0.354992 12.7416 1.26845 15.0774 2.91076 16.8624C4.55307 18.6474 6.80488 19.7518 9.22168 19.9576C11.6385 20.1635 14.0446 19.4558 15.9652 17.9743C17.8857 16.4928 19.181 14.3451 19.5954 11.9552C19.6117 11.8302 19.6249 11.7064 19.6394 11.5801C19.8391 9.92991 19.623 8.25604 19.0107 6.71073L19.0112 6.71023ZM18.0496 7.20817L18.0513 7.21842L18.0496 7.20817Z",fill:"url(#paint11_linear_927_5847)"})]}),G.jsxs("defs",{children:[G.jsxs("linearGradient",{id:"paint0_linear_927_5847",x1:"17.728",y1:"3.09786",x2:"1.63621",y2:"18.6237",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{offset:"0.048",stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.111",stopColor:"#FFE847"}),G.jsx("stop",{offset:"0.225",stopColor:"#FFC830"}),G.jsx("stop",{offset:"0.368",stopColor:"#FF980E"}),G.jsx("stop",{offset:"0.401",stopColor:"#FF8B16"}),G.jsx("stop",{offset:"0.462",stopColor:"#FF672A"}),G.jsx("stop",{offset:"0.534",stopColor:"#FF3647"}),G.jsx("stop",{offset:"0.705",stopColor:"#E31587"})]}),G.jsxs("radialGradient",{id:"paint1_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(17.1052 2.25108) scale(20.2076)",children:[G.jsx("stop",{offset:"0.129",stopColor:"#FFBD4F"}),G.jsx("stop",{offset:"0.186",stopColor:"#FFAC31"}),G.jsx("stop",{offset:"0.247",stopColor:"#FF9D17"}),G.jsx("stop",{offset:"0.283",stopColor:"#FF980E"}),G.jsx("stop",{offset:"0.403",stopColor:"#FF563B"}),G.jsx("stop",{offset:"0.467",stopColor:"#FF3750"}),G.jsx("stop",{offset:"0.71",stopColor:"#F5156C"}),G.jsx("stop",{offset:"0.782",stopColor:"#EB0878"}),G.jsx("stop",{offset:"0.86",stopColor:"#E50080"})]}),G.jsxs("radialGradient",{id:"paint2_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.6024 10.5042) scale(20.2076)",children:[G.jsx("stop",{offset:"0.3",stopColor:"#960E18"}),G.jsx("stop",{offset:"0.351",stopColor:"#B11927",stopOpacity:"0.74"}),G.jsx("stop",{offset:"0.435",stopColor:"#DB293D",stopOpacity:"0.343"}),G.jsx("stop",{offset:"0.497",stopColor:"#F5334B",stopOpacity:"0.094"}),G.jsx("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:0})]}),G.jsxs("radialGradient",{id:"paint3_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.1034 -2.25084) scale(14.638)",children:[G.jsx("stop",{offset:"0.132",stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.252",stopColor:"#FFDC3E"}),G.jsx("stop",{offset:"0.506",stopColor:"#FF9D12"}),G.jsx("stop",{offset:"0.526",stopColor:"#FF980E"})]}),G.jsxs("radialGradient",{id:"paint4_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.35173 15.7558) scale(9.62111)",children:[G.jsx("stop",{offset:"0.353",stopColor:"#3A8EE6"}),G.jsx("stop",{offset:"0.472",stopColor:"#5C79F0"}),G.jsx("stop",{offset:"0.669",stopColor:"#9059FF"}),G.jsx("stop",{offset:1,stopColor:"#C139E6"})]}),G.jsxs("radialGradient",{id:"paint5_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.5799 8.76923) rotate(-13.5916) scale(5.10194 5.97309)",children:[G.jsx("stop",{offset:"0.206",stopColor:"#9059FF",stopOpacity:0}),G.jsx("stop",{offset:"0.278",stopColor:"#8C4FF3",stopOpacity:"0.064"}),G.jsx("stop",{offset:"0.747",stopColor:"#7716A8",stopOpacity:"0.45"}),G.jsx("stop",{offset:"0.975",stopColor:"#6E008B",stopOpacity:"0.6"})]}),G.jsxs("radialGradient",{id:"paint6_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35238 1.50057) scale(6.9226)",children:[G.jsx("stop",{stopColor:"#FFE226"}),G.jsx("stop",{offset:"0.121",stopColor:"#FFDB27"}),G.jsx("stop",{offset:"0.295",stopColor:"#FFC82A"}),G.jsx("stop",{offset:"0.502",stopColor:"#FFA930"}),G.jsx("stop",{offset:"0.732",stopColor:"#FF7E37"}),G.jsx("stop",{offset:"0.792",stopColor:"#FF7139"})]}),G.jsxs("radialGradient",{id:"paint7_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.8545 -3.00121) scale(29.5361)",children:[G.jsx("stop",{offset:"0.113",stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.456",stopColor:"#FF980E"}),G.jsx("stop",{offset:"0.622",stopColor:"#FF5634"}),G.jsx("stop",{offset:"0.716",stopColor:"#FF3647"}),G.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),G.jsxs("radialGradient",{id:"paint8_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3996 -1.36343) rotate(83.976) scale(21.6445 14.2051)",children:[G.jsx("stop",{stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.06",stopColor:"#FFE847"}),G.jsx("stop",{offset:"0.168",stopColor:"#FFC830"}),G.jsx("stop",{offset:"0.304",stopColor:"#FF980E"}),G.jsx("stop",{offset:"0.356",stopColor:"#FF8B16"}),G.jsx("stop",{offset:"0.455",stopColor:"#FF672A"}),G.jsx("stop",{offset:"0.57",stopColor:"#FF3647"}),G.jsx("stop",{offset:"0.737",stopColor:"#E31587"})]}),G.jsxs("radialGradient",{id:"paint9_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35233 4.00165) scale(18.4369)",children:[G.jsx("stop",{offset:"0.137",stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.48",stopColor:"#FF980E"}),G.jsx("stop",{offset:"0.592",stopColor:"#FF5634"}),G.jsx("stop",{offset:"0.655",stopColor:"#FF3647"}),G.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),G.jsxs("radialGradient",{id:"paint10_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.1041 5.00184) scale(20.1801)",children:[G.jsx("stop",{offset:"0.094",stopColor:"#FFF44F"}),G.jsx("stop",{offset:"0.231",stopColor:"#FFE141"}),G.jsx("stop",{offset:"0.509",stopColor:"#FFAF1E"}),G.jsx("stop",{offset:"0.626",stopColor:"#FF980E"})]}),G.jsxs("linearGradient",{id:"paint11_linear_927_5847",x1:"17.5331",y1:"3.01533",x2:"3.84302",y2:"16.708",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{offset:"0.167",stopColor:"#FFF44F",stopOpacity:"0.8"}),G.jsx("stop",{offset:"0.266",stopColor:"#FFF44F",stopOpacity:"0.634"}),G.jsx("stop",{offset:"0.489",stopColor:"#FFF44F",stopOpacity:"0.217"}),G.jsx("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:0})]}),G.jsx("clipPath",{id:"clip0_927_5847",children:G.jsx("rect",{width:20,height:20,fill:"white"})})]})]}),rUe=G.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsx("path",{d:"M17.2924 5.22043L17.7256 4.15905L16.4982 2.8883C15.8339 2.22404 14.4187 2.61393 14.4187 2.61393L12.8158 0.794434H7.16242L5.55231 2.62115C5.55231 2.62115 4.13715 2.23848 3.47289 2.8883L2.24545 4.15183L2.67866 5.21321L2.13715 6.78721L3.9422 13.6681C4.31765 15.141 4.57036 15.7114 5.63173 16.4623L8.93137 18.7006C9.24906 18.8955 9.63895 19.2349 9.99274 19.2349C10.3465 19.2349 10.7364 18.8955 11.0541 18.7006L14.3538 16.4623C15.4151 15.7114 15.6678 15.141 16.0433 13.6681L17.8483 6.78721L17.2924 5.22043Z",fill:"url(#paint0_linear_927_5861)"}),G.jsx("path",{d:"M13.9711 3.78343C13.9711 3.78343 16.0433 6.28884 16.0433 6.81592C16.0433 7.35744 15.7834 7.49462 15.5234 7.77621L13.9711 9.43686C13.8267 9.58126 13.5162 9.82675 13.6967 10.2527C13.8772 10.686 14.1299 11.2203 13.8411 11.769C13.5523 12.3249 13.0469 12.6932 12.722 12.6354C12.2387 12.4786 11.7777 12.2602 11.3502 11.9856C11.0758 11.8051 10.1949 11.0758 10.1949 10.7943C10.1949 10.5127 11.1047 10 11.278 9.89895C11.444 9.78343 12.2166 9.33577 12.231 9.16249C12.2455 8.9892 12.2455 8.94588 12.0144 8.51267C11.7834 8.07946 11.379 7.50184 11.4368 7.12639C11.509 6.75094 12.1588 6.54877 12.6426 6.36827L14.1372 5.80509C14.2527 5.74733 14.2238 5.69679 13.8772 5.66068C13.5307 5.6318 12.5559 5.50184 12.1155 5.62458C11.6751 5.74733 10.9386 5.93505 10.8664 6.03614C10.8086 6.13722 10.7509 6.13722 10.8159 6.48379L11.2346 8.75816C11.2635 9.04697 11.3213 9.24191 11.018 9.31411C10.7003 9.38632 10.1733 9.50906 9.99276 9.50906C9.81225 9.50906 9.27796 9.38632 8.96749 9.31411C8.65702 9.24191 8.71478 9.04697 8.75088 8.75816C8.77976 8.46935 9.09745 6.82314 9.16243 6.48379C9.23464 6.13722 9.16965 6.13722 9.11189 6.03614C9.03969 5.93505 8.29601 5.74733 7.85558 5.62458C7.42236 5.50184 6.44041 5.6318 6.09384 5.66791C5.74727 5.69679 5.71839 5.74011 5.83391 5.81231L7.3285 6.36827C7.80503 6.54877 8.46929 6.75094 8.53428 7.12639C8.60648 7.50906 8.19493 8.07946 7.95666 8.51267C7.71839 8.94588 7.72561 8.9892 7.74005 9.16249C7.75449 9.33577 8.53428 9.78343 8.69312 9.89895C8.86641 10.0073 9.77615 10.5127 9.77615 10.7943C9.77615 11.0758 8.91695 11.8051 8.62814 11.9856C8.20063 12.2602 7.73957 12.4786 7.2563 12.6354C6.93139 12.6932 6.42597 12.3249 6.12994 11.769C5.84113 11.2203 6.10106 10.686 6.27435 10.2527C6.45485 9.81953 6.1516 9.58848 5.99998 9.43686L4.44763 7.77621C4.19493 7.50906 3.935 7.36466 3.935 6.83036C3.935 6.29606 6.0072 3.79787 6.0072 3.79787L7.97832 4.11556C8.20937 4.11556 8.722 3.92061 9.19132 3.75455C9.66063 3.61014 9.98554 3.5957 9.98554 3.5957C9.98554 3.5957 10.3032 3.5957 10.7798 3.75455C11.2563 3.91339 11.7617 4.11556 11.9928 4.11556C12.231 4.11556 13.9783 3.77621 13.9783 3.77621L13.9711 3.78343ZM12.4188 13.3719C12.5487 13.4441 12.4693 13.6029 12.3465 13.6896L10.5126 15.1192C10.3682 15.2636 10.1372 15.4802 9.98554 15.4802C9.83391 15.4802 9.61009 15.2636 9.45846 15.1192C8.8506 14.6351 8.23683 14.1586 7.61731 13.6896C7.50178 13.6029 7.42236 13.4513 7.54511 13.3719L8.62814 12.7943C9.05864 12.5665 9.51417 12.3897 9.98554 12.2672C10.0938 12.2672 10.7798 12.5127 11.3357 12.7943L12.4188 13.3719Z",fill:"white"}),G.jsx("path",{d:"M14.4332 2.62115L12.8159 0.794434H7.16243L5.55232 2.62115C5.55232 2.62115 4.13716 2.23848 3.4729 2.8883C3.4729 2.8883 5.35016 2.72223 5.99998 3.77638L7.99276 4.11573C8.2238 4.11573 8.73644 3.92079 9.20575 3.75472C9.67507 3.61032 9.99998 3.59588 9.99998 3.59588C9.99998 3.59588 10.3177 3.59588 10.7942 3.75472C11.2707 3.91357 11.7761 4.11573 12.0072 4.11573C12.2455 4.11573 13.9928 3.77638 13.9928 3.77638C14.6426 2.72223 16.5198 2.8883 16.5198 2.8883C15.8556 2.22404 14.4404 2.61393 14.4404 2.61393",fill:"url(#paint1_linear_927_5861)"}),G.jsxs("defs",{children:[G.jsxs("linearGradient",{id:"paint0_linear_927_5861",x1:"2.13715",y1:"10.1991",x2:"17.8483",y2:"10.1991",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),G.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),G.jsxs("linearGradient",{id:"paint1_linear_927_5861",x1:"3.73384",y1:"2.4883",x2:"16.5198",y2:"2.4883",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#FF452A"}),G.jsx("stop",{offset:1,stopColor:"#FF2000"})]})]})]}),nUe=G.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[G.jsxs("g",{clipPath:"url(#clip0_927_5865)",children:[G.jsx("path",{d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint0_linear_927_5865)"}),G.jsx("path",{opacity:"0.35",d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint1_radial_927_5865)"}),G.jsx("path",{d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint2_linear_927_5865)"}),G.jsx("path",{opacity:"0.41",d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint3_radial_927_5865)"}),G.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint4_radial_927_5865)"}),G.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint5_radial_927_5865)"})]}),G.jsxs("defs",{children:[G.jsxs("linearGradient",{id:"paint0_linear_927_5865",x1:"4.58594",y1:"13.8281",x2:"18.5234",y2:"13.8281",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#0C59A4"}),G.jsx("stop",{offset:1,stopColor:"#114A8B"})]}),G.jsxs("radialGradient",{id:"paint1_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.2813 13.9332) scale(7.45313 7.08047)",children:[G.jsx("stop",{offset:"0.7",stopOpacity:0}),G.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),G.jsx("stop",{offset:1})]}),G.jsxs("linearGradient",{id:"paint2_linear_927_5865",x1:"11.9297",y1:"7.78125",x2:"3.23436",y2:"17.2578",gradientUnits:"userSpaceOnUse",children:[G.jsx("stop",{stopColor:"#1B9DE2"}),G.jsx("stop",{offset:"0.2",stopColor:"#1595DF"}),G.jsx("stop",{offset:"0.7",stopColor:"#0680D7"}),G.jsx("stop",{offset:1,stopColor:"#0078D4"})]}),G.jsxs("radialGradient",{id:"paint3_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5.51209 15.5419) rotate(-81.3844) scale(11.202 9.05011)",children:[G.jsx("stop",{offset:"0.8",stopOpacity:0}),G.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),G.jsx("stop",{offset:1})]}),G.jsxs("radialGradient",{id:"paint4_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.02266 3.69656) rotate(92.2906) scale(15.8251 33.7043)",children:[G.jsx("stop",{stopColor:"#35C1F1"}),G.jsx("stop",{offset:"0.1",stopColor:"#34C1ED"}),G.jsx("stop",{offset:"0.2",stopColor:"#2FC2DF"}),G.jsx("stop",{offset:"0.3",stopColor:"#2BC3D2"}),G.jsx("stop",{offset:"0.7",stopColor:"#36C752"})]}),G.jsxs("radialGradient",{id:"paint5_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(18.7547 6.03906) rotate(73.7398) scale(7.60156 6.18159)",children:[G.jsx("stop",{stopColor:"#66EB6E"}),G.jsx("stop",{offset:1,stopColor:"#66EB6E",stopOpacity:0})]}),G.jsx("clipPath",{id:"clip0_927_5865",children:G.jsx("rect",{width:20,height:20,fill:"white"})})]})]});var X3={Chrome:eUe,FireFox:tUe,Brave:rUe,Edge:nUe};const nE=fe.forwardRef(({browser:e},t)=>{const r=e??ute();let n;switch(r){case"chrome":n=X3.Chrome;break;case"firefox":n=X3.FireFox;break;case"edge":n=X3.Edge;break}return n?G.jsx(QLe,{children:n}):G.jsx(G.Fragment,{})});nE.displayName="BrowserIcon";const bP="alph:lastConnectedAccount";function wP(){var e;return(e=globalThis.window)===null||e===void 0?void 0:e.localStorage}function oUe(){const e=wP();if(e===void 0)return;const t=e.getItem(bP);return t===null?void 0:JSON.parse(t)}function Y2(e,t,r){const n=wP();if(n!==void 0){const o={connectorId:e,account:t,network:r};n.setItem(bP,JSON.stringify(o))}}function vte(){const e=wP();e!==void 0&&e.removeItem(bP)}const yte="6e2562e43678dd68a9070a62b6d52207";async function bte(e,t,r){const n=await BC.WalletConnectProvider.init({projectId:yte,networkId:t.network,addressGroup:t.addressGroup,onDisconnected:t.onDisconnected});n.on("displayUri",e),n.on("session_delete",t.onDisconnected);try{if(await n.connect(),n.account)return await t.onConnected({account:n.account,signerProvider:n}),Y2(r,n.account,t.network),n.account}catch(o){console.error("Wallet connect error:",o),t.onDisconnected()}}const UN=async(e,t)=>{try{const r=await BC.WalletConnectProvider.init({projectId:yte,networkId:e.network,addressGroup:e.addressGroup,onDisconnected:e.onDisconnected});if(r.on("session_delete",e.onDisconnected),!r.isPreauthorized())return;if(await r.connect(),r.account)return await e.onConnected({account:r.account,signerProvider:r}),Y2(t,r.account,e.network),r.account}catch(r){console.error(`Wallet connect auto-connect error: ${r}`),e.onDisconnected()}},iUe=async e=>{const t=await bte(r=>xR.open(r,()=>console.log("qr closed")),e,"walletConnect");return xR.close(),t},aUe=async e=>await bte(t=>window.open(`alephium://wc?uri=${t}`),e,"desktopWallet"),HN=async e=>{await e.disconnect()},sUe=async e=>{try{const t=await oP(),r=await(t==null?void 0:t.enable({...e,networkId:e.network}));if(t&&r)return await e.onConnected({account:r,signerProvider:t}),Y2("injected",r,e.network),r}catch(t){console.error("Wallet connect error:",t),e.onDisconnected()}},cUe=async e=>await e.disconnect(),lUe=async e=>{try{const t=await oP(),r=await(t==null?void 0:t.enableIfConnected({...e,networkId:e.network}));return t&&r&&(await e.onConnected({account:r,signerProvider:t}),Y2("injected",r,e.network)),r}catch(t){console.error("Wallet auto-connect error:",t),e.onDisconnected()}},uUe={injected:{connect:sUe,disconnect:cUe,autoConnect:lUe},walletConnect:{connect:iUe,disconnect:HN,autoConnect:e=>UN(e,"walletConnect")},desktopWallet:{connect:aUe,disconnect:HN,autoConnect:e=>UN(e,"desktopWallet")}};function wte(e){return uUe[`${e}`]}function zd(){const{connectorId:e}=ka(),{signerProvider:t,setSignerProvider:r,setConnectionStatus:n,setAccount:o,addressGroup:i,network:a,keyType:s}=As(),c=z.useCallback(()=>{vte(),r(void 0),o(void 0)},[r,o]),l=z.useCallback(w=>{o(w.account),r(w.signerProvider)},[o,r]),u=z.useMemo(()=>({network:a,addressGroup:i,keyType:s,onDisconnected:c,onConnected:l}),[c,l,a,i,s]),d=z.useMemo(()=>wte(e),[e]),p=z.useMemo(()=>async()=>(n("connecting"),await d.connect(u)),[d,u,n]),m=z.useMemo(()=>async()=>{t&&await d.disconnect(t)},[d,t]);return z.useMemo(()=>({connect:p,disconnect:m}),[p,m])}const Ft={CONNECTED:"connected",CONNECTING:"connecting",EXPIRING:"expiring",FAILED:"failed",REJECTED:"rejected",NOTCONNECTED:"notconnected",UNAVAILABLE:"unavailable"},Lu={initial:{willChange:"transform,opacity",position:"relative",opacity:0,scale:.95},animate:{position:"relative",opacity:1,scale:1,transition:{ease:[.16,1,.3,1],duration:.4,delay:.05,position:{delay:0}}},exit:{position:"absolute",opacity:0,scale:.95,transition:{ease:[.16,1,.3,1],duration:.3}}},fUe=({connectorId:e,switchConnectMethod:t,forceState:r})=>{var n,o;const{setOpen:i}=ka(),{connect:a}=zd(),[s,c]=z.useState(e),[l,u]=z.useState(!1),d=Nl.filter(j=>j.id===s)[0],p=9;z.useState(p);const m=d.extensionIsInstalled&&d.extensionIsInstalled(),w=ute(),A=d.extensions?d.extensions[w]:void 0,T=d.extensions?{name:Object.keys(d.extensions)[0],label:Object.keys(d.extensions)[0].charAt(0).toUpperCase()+Object.keys(d.extensions)[0].slice(1),url:d.extensions[Object.keys(d.extensions)[0]]}:void 0,[O,P]=z.useState(r||(m?Ft.CONNECTING:Ft.UNAVAILABLE)),$=z.useCallback(()=>{m&&a().then(j=>{j&&P(Ft.CONNECTED),i(!1)})},[m,i,a]),R=z.useRef();return z.useEffect(()=>{if(O!==Ft.UNAVAILABLE)return R.current=setTimeout($,600),()=>{clearTimeout(R.current)}},[O,$]),d?d.id==="walletConnect"?G.jsx(_c,{children:G.jsxs(Op,{children:[G.jsx(Nb,{children:"Invalid State"}),G.jsx(Go,{children:G.jsx(Fb,{children:"WalletConnect does not have an injection flow. This state should never happen."})})]})}):G.jsx(_c,{children:G.jsxs(Op,{children:[G.jsx(PLe,{children:G.jsxs(ALe,{$shake:O===Ft.FAILED||O===Ft.REJECTED,$circle:!0,children:[G.jsx(Ni,{children:(O===Ft.FAILED||O===Ft.REJECTED)&&G.jsx(OLe,{"aria-label":"Retry",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileTap:{scale:.9},transition:{duration:.1},onClick:$,children:G.jsx(ILe,{children:G.jsx(jLe,{open:l&&(O===Ft.FAILED||O===Ft.REJECTED),message:"try again",xOffset:-6,children:G.jsx(ZLe,{})})})})}),G.jsx(GLe,{logo:O===Ft.UNAVAILABLE?G.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:(n=d.logos.transparent)!==null&&n!==void 0?n:d.logos.default}):G.jsx(G.Fragment,{children:(o=d.logos.transparent)!==null&&o!==void 0?o:d.logos.default}),smallLogo:d.id==="injected",connecting:O===Ft.CONNECTING,unavailable:O===Ft.UNAVAILABLE,countdown:O===Ft.EXPIRING})]})}),G.jsx(kje,{children:G.jsxs(Ni,{initial:!1,children:[O===Ft.FAILED&&G.jsxs(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:[G.jsxs(Go,{children:[G.jsxs(Hs,{$error:!0,children:[G.jsx(KLe,{}),"failed"]}),G.jsx(XS,{children:"failed"})]}),d.scannable&&G.jsxs(G.Fragment,{children:[G.jsx(NN,{}),G.jsx(mf,{icon:G.jsx(LN,{}),onClick:()=>t(s),children:"scan qr code"})]})]},Ft.FAILED),O===Ft.REJECTED&&G.jsxs(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:[G.jsxs(Go,{style:{paddingBottom:28},children:[G.jsx(Hs,{children:"rejected"}),G.jsx(XS,{children:"rejected"})]}),d.scannable&&G.jsxs(G.Fragment,{children:[G.jsx(NN,{}),G.jsx(mf,{icon:G.jsx(LN,{}),onClick:()=>t(s),children:"scan the qr code"})]})]},Ft.REJECTED),(O===Ft.CONNECTING||O===Ft.EXPIRING)&&G.jsx(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:G.jsx(Go,{style:{paddingBottom:28},children:G.jsx(Hs,{children:d.id==="injected"?"connecting":"rejected"})})},Ft.CONNECTING),O===Ft.CONNECTED&&G.jsx(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:G.jsx(Go,{children:G.jsxs(Hs,{$valid:!0,children:[G.jsx(JLe,{})," ","Connected"]})})},Ft.CONNECTED),O===Ft.NOTCONNECTED&&G.jsx(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:G.jsx(Go,{children:G.jsx(Hs,{children:"Not Connected"})})},Ft.NOTCONNECTED),O===Ft.UNAVAILABLE&&G.jsx(ju,{initial:"initial",animate:"animate",exit:"exit",variants:Lu,children:A?G.jsxs(G.Fragment,{children:[G.jsx(Go,{style:{paddingBottom:18},children:G.jsx(Hs,{children:"Install"})}),!m&&A&&G.jsx(mf,{href:A,icon:G.jsx(nE,{}),children:"Install the extension"})]}):G.jsxs(G.Fragment,{children:[G.jsx(Go,{style:{paddingBottom:12},children:G.jsx(Hs,{children:"Not Available"})}),!m&&T&&G.jsxs(mf,{href:T==null?void 0:T.url,icon:G.jsx(nE,{browser:T==null?void 0:T.name}),children:["Install on ",T==null?void 0:T.label]})]})},Ft.UNAVAILABLE)]})})]})}):G.jsx(_c,{children:G.jsxs(Op,{children:[G.jsx(Nb,{children:"Invalid State"}),G.jsx(Go,{children:G.jsx(Fb,{children:"No connectors match the id given. This state should never happen."})})]})})};let zN=!1;const dUe=()=>{const{setOpen:e}=ka(),[t,r]=z.useState(),{connect:n}=zd();return z.useEffect(()=>{zN||n().then(()=>{zN=!0,e(!1),r(void 0)}).catch(o=>r(`${o}`))},[n,e]),G.jsx(_c,{children:G.jsx(Op,{children:t!==void 0?t:"Connecting to wallet connect"})})},hUe=()=>{const[e,t]=z.useState(),{connect:r}=zd();return z.useEffect(()=>{r().catch(n=>t(`${n}`))},[r]),G.jsx(_c,{children:G.jsx(Op,{children:e!==void 0?e:"Opening desktop wallet..."})})},Fs={QRCODE:"QRCODE",INJECTOR:"INJECTOR",DESKTOPWALLET:"DESKTOPWALLET"},pUe=({connectorId:e})=>{const[t,r]=z.useState(e),n=Nl.filter(c=>c.id===t)[0],o=n.extensionIsInstalled&&n.extensionIsInstalled(),i=(!n.scannable||o)&&e!=="desktopWallet",[a,s]=z.useState(i?Fs.INJECTOR:e==="desktopWallet"?Fs.DESKTOPWALLET:Fs.QRCODE);return n?a===Fs.QRCODE?G.jsx(dUe,{}):a===Fs.DESKTOPWALLET?G.jsx(hUe,{}):G.jsx(Ni,{children:a===Fs.INJECTOR&&G.jsx(gt.div,{initial:"initial",animate:"animate",exit:"exit",variants:oLe,children:G.jsx(fUe,{connectorId:t,switchConnectMethod:c=>{c&&r(c),s(Fs.QRCODE)}})},Fs.INJECTOR)}):G.jsx(Fb,{children:"Connector not found"})},gUe=ht(gt.div)` + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + display: flex; + align-items: center; + justify-content: center; + width: 16px; + svg { + display: block; + } + svg, + svg path, + svg rect { + transition: inherit; + } + svg path:first-child { + transform-origin: 50% 50%; + fill: var(--bg); + stroke: var(--color); + } + svg rect { + transform-origin: 53% 63%; + fill: var(--bg); + stroke: var(--color); + } + svg path:last-child { + opacity: 0; + stroke: var(--bg); + transform: translate(11.75px, 10px) rotate(90deg) scale(0.6); + } + ${e=>e.$clipboard?Tr` + --color: var(--ck-focus-color) !important; + --bg: var(--ck-body-background); + svg { + transition-delay: 0ms; + path:first-child { + opacity: 0; + transform: rotate(-90deg) scale(0.2); + } + rect { + rx: 10px; + fill: var(--color); + transform: rotate(-90deg) scale(1.45); + } + path:last-child { + transition-delay: 100ms; + opacity: 1; + transform: translate(7.75px, 9.5px); + } + } + `:Tr` + &:hover { + } + &:hover:active { + } + `} +`,VN=({copied:e,small:t})=>G.jsx(gUe,{$clipboard:e,children:G.jsx(XLe,{style:{transform:t?"scale(1)":"translateX(3px) scale(1.5)",opacity:t||e?1:.3}})}),mUe=ht.div` + --color: var(--ck-copytoclipboard-stroke); + --bg: var(--ck-body-background); + transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); + + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + + ${e=>e.$disabled?Tr` + cursor: not-allowed; + opacity: 0.4; + `:Tr` + &:hover { + --color: var(--ck-body-color-muted); + } + `} +`,vUe=ht.div` + display: block; + position: relative; + transition: inherit; + svg { + position: absolute; + left: 100%; + display: block; + top: -1px; + margin: 0; + margin-left: 4px; + } +`,yUe=({string:e,children:t,variant:r})=>{const[n,o]=z.useState(!1);let i;const a=()=>{if(!e)return;const s=e.trim();navigator.clipboard&&navigator.clipboard.writeText(s),o(!0),clearTimeout(i),i=setTimeout(()=>o(!1),1e3)};return r==="button"?G.jsx(mf,{disabled:!e,onClick:a,icon:G.jsx(VN,{copied:n}),children:t}):G.jsx(mUe,{onClick:a,$disabled:!e,children:G.jsxs(vUe,{children:[t,G.jsx(VN,{copied:n,small:!0})]})})},bUe=({closeModal:e})=>{const{displayAccount:t,setOpen:r}=ka(),{account:n}=As(),{disconnect:o}=zd(),[i,a]=z.useState(!1),s=n?t?t(n):n.address:void 0;return z.useEffect(()=>{if(i)return e?e():r(!1),()=>{o(),r(!1)}},[i,o,e,r]),G.jsxs(_c,{children:[G.jsx(Go,{style:{paddingBottom:22,gap:6},children:G.jsx(Hs,{children:G.jsx(yUe,{string:s,children:s&&mP(s)})})}),G.jsx(mf,{onClick:()=>a(!0),icon:G.jsx(YLe,{}),children:"Disconnect"})]})},wUe={},_Ue=({mode:e="auto",theme:t="auto",customTheme:r=wUe})=>{const{route:n,setRoute:o,open:i,setOpen:a,connectorId:s,setMode:c,setTheme:l,setCustomTheme:u}=ka(),{account:d,network:p,addressGroup:m,keyType:w}=As(),A=z.useRef(p),T=z.useRef(m),O=z.useRef(w),P=!!d,{disconnect:$}=zd();z.useEffect(()=>{P&&A.current!==p&&$(),A.current=p},[p,A,$,P]),z.useEffect(()=>{P&&m!==void 0&&T.current!==m&&$(),T.current=m},[m,T,$,P]),z.useEffect(()=>{P&&O.current!==w&&$(),O.current=w},[w,O,$,P]);const R=n!==Dn.CONNECTORS&&n!==Dn.PROFILE,j=()=>{o(Dn.CONNECTORS)},I=[{id:"CONNECTORS",content:G.jsx(SLe,{})},{id:"CONNECT",content:G.jsx(pUe,{connectorId:s})},{id:"PROFILE",content:G.jsx(bUe,{})}],b=z.useCallback(()=>{a(!1)},[a]);return z.useEffect(()=>{P&&n!==Dn.PROFILE&&b()},[P,n,b]),z.useEffect(()=>c(e),[c,e]),z.useEffect(()=>l(t),[l,t]),z.useEffect(()=>u(r),[u,r]),z.useEffect(()=>{const N="alephium";if(!i)return;const V=document.createElement("meta");return V.setAttribute("property","og:title"),V.setAttribute("content",N),document.head.prepend(V),()=>{document.head.removeChild(V)}},[i]),G.jsx(iLe,{open:i,pages:I,pageId:n,onClose:b,onInfo:void 0,onBack:R?j:void 0})},xUe=["injected","walletConnect","desktopWallet"],SUe=({theme:e="auto",mode:t="auto",customTheme:r,csrModeOnly:n,children:o})=>{if(z.useContext(GS))throw new Error("Multiple, nested usages of ConnectSettingContext detected. Please use only one.");const[a,s]=z.useState(e),[c,l]=z.useState(t),[u,d]=z.useState(r??{}),[p,m]=z.useState(!1),[w,A]=z.useState("injected"),[T,O]=z.useState(Dn.CONNECTORS),[P,$]=z.useState("");z.useEffect(()=>s(e),[e]),z.useEffect(()=>l(t),[t]),z.useEffect(()=>d(r??{}),[r]);const R={open:p,setOpen:m,route:T,setRoute:O,connectorId:w,setConnectorId:A,theme:a,setTheme:s,mode:c,setMode:l,customTheme:u,setCustomTheme:d,csrModeOnly:n??!1,errorMessage:P};return G.jsx(GS.Provider,{value:R,children:G.jsxs(k8e,{theme:Sje,children:[o,G.jsx(_Ue,{theme:a,mode:c,customTheme:u})]})})};function EUe(){try{return ot.web3.getCurrentNodeProvider()}catch{return}}const CUe=({network:e,addressGroup:t,keyType:r,children:n})=>{if(z.useContext(KS))throw new Error("Multiple, nested usages of AlephiumConnectProvider detected. Please use only one.");const[i,a]=z.useState(e),[s,c]=z.useState(t),[l,u]=z.useState(r??"default");z.useEffect(()=>a(e),[e]),z.useEffect(()=>c(t),[t]),z.useEffect(()=>u(r??"default"),[r]);const d=z.useMemo(()=>{const j=oUe();if(j!==void 0&&j.network===i&&(s===void 0||j.account.group===s)&&(l===void 0||j.account.keyType===l))return j},[i,s,l]),[p,m]=z.useState(d!==void 0?"connecting":"disconnected"),[w,A]=z.useState(d==null?void 0:d.account),[T,O]=z.useState(),P=z.useCallback(j=>{O(j),m(j===void 0?"disconnected":"connected")},[O,m]),$=z.useCallback(j=>{A(I=>(I==null?void 0:I.address)===(j==null?void 0:j.address)?I:j)},[A]);z.useEffect(()=>{(async()=>{const I=()=>{vte(),$(void 0),P(void 0)},b=N=>{$(N.account),P(N.signerProvider)};try{const N=d==null?void 0:d.connectorId,V=Array.from(xUe),Z=N===void 0?V:[N].concat(V.filter(q=>q!==N));for(const q of Z){const _=wte(q);if(_.autoConnect!==void 0&&await _.autoConnect({network:e,addressGroup:t,keyType:r,onDisconnected:I,onConnected:b})!==void 0)return}}catch(N){console.error(N)}I()})()},[]);const R={network:i,setNetwork:a,addressGroup:s,setAddressGroup:c,keyType:l??"default",setKeyType:u,account:w,connectionStatus:p,setConnectionStatus:m,setAccount:$,signerProvider:T,setSignerProvider:P};return G.jsx(KS.Provider,{value:R,children:n})},PUe=({children:e})=>{if(z.useContext(MN))throw new Error("Multiple, nested usages of AlephiumBalanceProvider detected. Please use only one.");const{account:r,signerProvider:n,network:o}=As(),[i,a]=z.useState(),s=z.useCallback(async()=>{var u;const d=(u=EUe())!==null&&u!==void 0?u:n==null?void 0:n.nodeProvider;if(d&&r){const p=await d.addresses.getAddressesAddressBalance(r.address);a(m=>m!==void 0&&ot.isBalanceEqual(m,p)?m:p)}else r===void 0&&a(void 0)},[r,n]),c=z.useCallback((u,d)=>{if(r===void 0)throw new Error("Wallet is not connected");const p=d??1,T={pollingInterval:o==="devnet"?1e3:4e3,messageCallback:async O=>{O.type==="Confirmed"&&O.chainConfirmations>=p&&await s()},errorCallback:(O,P)=>(P.unsubscribe(),console.error(`tx status subscription error: ${O}`),Promise.resolve())};ot.subscribeToTxStatus(T,u,void 0,void 0,p)},[s,r,o]);z.useEffect(()=>{r===void 0&&a(void 0)},[r]);const l={balance:i,updateBalance:s,updateBalanceForTx:c};return G.jsx(MN.Provider,{value:l,children:e})},AUe=({theme:e,customTheme:t,network:r,addressGroup:n,keyType:o,csrModeOnly:i,children:a})=>G.jsx(CUe,{network:r,addressGroup:n,keyType:o,children:G.jsx(SUe,{theme:e==="simple-light"||e==="simple-dark"?"auto":e,mode:e==="simple-light"?"light":e==="simple-dark"?"dark":"auto",customTheme:t,csrModeOnly:i,children:G.jsx(PUe,{children:a})})});function _te(){const[e,t]=z.useState(!1);return z.useEffect(()=>t(!0),[]),e}const Q3=ht(gt.div)` + top: 0; + bottom: 0; + left: 0; + display: inline-flex; + align-items: center; + justify-content: center; + white-space: nowrap; +`,oE=ht(gt.div)` + display: flex; + align-items: center; + justify-content: flex-start; + position: relative; + height: 40px; + padding: 0; + line-height: 0; + letter-spacing: -0.2px; + font-size: var(--ck-connectbutton-font-size, 16px); + font-weight: var(--ck-connectbutton-font-weight, 500); + text-align: center; + transition: 100ms ease; + transition-property: color, background, box-shadow, border-radius; + + color: var(--color); + background: var(--background); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius); + + &.primary { + --color: var(--ck-connectbutton-color); + --background: var(--ck-connectbutton-background); + --box-shadow: var(--ck-connectbutton-box-shadow); + --border-radius: var(--ck-connectbutton-border-radius, 12px); + + --hover-color: var(--ck-connectbutton-hover-color, var(--color)); + --hover-background: var(--ck-connectbutton-hover-background, var(--background)); + --hover-box-shadow: var(--ck-connectbutton-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-connectbutton-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-connectbutton-active-color, var(--hover-color)); + --active-background: var(--ck-connectbutton-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-connectbutton-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-connectbutton-active-border-radius, var(--hover-border-radius)); + } + &.secondary { + --color: var(--ck-connectbutton-balance-color); + --background: var(--ck-connectbutton-balance-background); + --box-shadow: var(--ck-connectbutton-balance-box-shadow); + --border-radius: var(--ck-connectbutton-balance-border-radius, var(--ck-connectbutton-border-radius, 12px)); + + --hover-color: var(--ck-connectbutton-balance-hover-color, var(--color)); + --hover-background: var(--ck-connectbutton-balance-hover-background, var(--background)); + --hover-box-shadow: var(--ck-connectbutton-balance-hover-box-shadow, var(--box-shadow)); + --hover-border-radius: var(--ck-connectbutton-balance-hover-border-radius, var(--border-radius)); + + --active-color: var(--ck-connectbutton-balance-active-color, var(--hover-color)); + --active-background: var(--ck-connectbutton-balance-active-background, var(--hover-background)); + --active-box-shadow: var(--ck-connectbutton-balance-active-box-shadow, var(--hover-box-shadow)); + --active-border-radius: var(--ck-connectbutton-balance-active-border-radius, var(--hover-border-radius)); + } +`,OUe=ht.button` + all: initial; + appearance: none; + user-select: none; + position: relative; + padding: 0; + margin: 0; + background: none; + border-radius: var(--ck-border-radius); + + &:disabled { + pointer-events: none; + opacity: 0.3; + } + + display: flex; + flex-wrap: nowrap; + background: none; + cursor: pointer; + * { + cursor: pointer; + } + &:hover { + ${oE} { + color: var(--hover-color, var(--color)); + background: var(--hover-background, var(--background)); + box-shadow: var(--hover-box-shadow, var(--box-shadow)); + border-radius: var(--hover-border-radius, var(--border-radius)); + } + } + &:active { + ${oE} { + color: var(--active-color, var(--hover-color, var(--color))); + background: var(--active-background, var(--hover-background, var(--background))); + box-shadow: var(--active-box-shadow, var(--hover-box-shadow, var(--box-shadow))); + border-radius: var(--active-border-radius, var(--hover-border-radius, var(--border-radius))); + } + } + &:focus-visible, + &:focus { + outline: none; + } +`,IUe=({children:e,variant:t="primary",autoSize:r=!0,duration:n=.3,style:o})=>{const[i,a]=TK();return G.jsx(oE,{className:t,initial:!1,animate:r?{width:a.width>10?a.width:"auto"}:void 0,transition:{duration:n,ease:[.25,1,.5,1],delay:.01},style:o,children:G.jsx("div",{ref:i,style:{whiteSpace:"nowrap",width:"fit-content",position:"relative",padding:"0 12px"},children:e})})},TUe={initial:{zIndex:2,opacity:0,x:"-100%"},animate:{opacity:1,x:.1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,opacity:0,x:"-100%",pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},MUe={initial:{zIndex:2,opacity:0,x:"100%"},animate:{x:.2,opacity:1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,x:"100%",opacity:0,pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},kUe={initial:{opacity:0},animate:{opacity:1,transition:{duration:.3,ease:[.25,1,.5,1]}},exit:{position:"absolute",opacity:0,transition:{duration:.3,ease:[.25,1,.5,1]}}},$Ue=e=>e.address,xte=({displayAccount:e,children:t})=>{const r=_te(),n=ka(),{account:o}=As(),{disconnect:i}=zd();function a(){n.setOpen(!1)}function s(){n.setOpen(!0),n.setRoute(o?Dn.PROFILE:Dn.CONNECTORS)}if(!t||!r)return null;const c=o?(e??$Ue)(o):void 0;return G.jsx(G.Fragment,{children:t({show:s,hide:a,isConnected:!!o,isConnecting:n.open,disconnect:i,account:o,truncatedAddress:c?mP(c):void 0})})};xte.displayName="AlephiumConnectButton.Custom";function DUe({label:e,displayAccount:t}){const{account:r}=As();return G.jsx(Ni,{initial:!1,children:r?G.jsx(Q3,{initial:"initial",animate:"animate",exit:"exit",variants:MUe,style:{height:40},children:G.jsx("div",{style:{position:"relative",paddingRight:0},children:G.jsx(Ni,{initial:!1,children:G.jsx(Q3,{initial:"initial",animate:"animate",exit:"exit",variants:kUe,style:{position:"relative"},children:mP(t(r))},"ckTruncatedAddress")})})},"connectedText"):G.jsx(Q3,{initial:"initial",animate:"animate",exit:"exit",variants:TUe,style:{height:40},children:e||"Connect Alephium"},"connectWalletText")})}function Ste({label:e,onClick:t,displayAccount:r}){const n=_te(),o=ka(),{account:i}=As(),a=!!i;function s(){o.setOpen(!0),o.setRoute(a?Dn.PROFILE:Dn.CONNECTORS)}return!o.csrModeOnly&&!n?null:G.jsx(yP,{$useTheme:o.theme,$useMode:o.mode,$customTheme:o.customTheme,children:G.jsx(OUe,{onClick:()=>{t?t(s):s()},children:G.jsx(IUe,{theme:o.theme,mode:o.mode,customTheme:o.customTheme,style:{overflow:"hidden"},children:G.jsx(DUe,{label:e,displayAccount:r??(c=>c.address)})})})})}Ste.Custom=xte;function J2(){const{account:e,signerProvider:t,connectionStatus:r,network:n}=As();return z.useMemo(()=>r==="connected"?{connectionStatus:r,signer:t,account:{...e,network:n},nodeProvider:t==null?void 0:t.nodeProvider,explorerProvider:t==null?void 0:t.explorerProvider}:r==="disconnected"?{connectionStatus:r,signer:void 0,account:void 0,nodeProvider:void 0,explorerProvider:void 0}:{connectionStatus:r,signer:void 0,account:e===void 0?void 0:{...e,network:n},nodeProvider:void 0,explorerProvider:void 0},[t,e,n,r])}function Ete(){const{network:e,setNetwork:t,addressGroup:r,setAddressGroup:n,keyType:o,setKeyType:i}=As();return z.useMemo(()=>({network:e,setNetwork:t,addressGroup:r,setAddressGroup:n,keyType:o,setKeyType:i}),[e,t,r,n,o,i])}var dd={};const RUe=0,NUe=[{id:"66da610efb5129c062e88e5fd65fe810f31efd1597021b2edf887a4360fa0800",name:"Alf",symbol:"ALF",decimals:9,description:"Alf, first token deployed on the mainnet",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/ALF.png"},{id:"b2d71c116408ae47b931482a440f675dc9ea64453db24ee931dacd578cae9002",name:"ALPHpaca",symbol:"PACA",decimals:0,description:"Part Alpaca, part ecosystem, part coin and part meme. ALPHpaca is rapidly trying to expand it's uses across the Alephium ecosystem.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/PACA.png"},{id:"b522184377a33e376e997a950288fa76c1f48e97bc29cd10779adc7cfb673200",name:"Berry",symbol:"BERRY",decimals:0,description:"Mr Berry's coin",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/BERRY.png"},{id:"1516c410b54470d667e1315ce2faa81870c76c5c7a491e3e86eeec8366495502",name:"Montycoin",symbol:"TAIL",decimals:0,description:"Montycoin is an incentivization token made for fun and immersion into MontaiL's DJ'ing career. With widely growing uses.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TAIL.png"},{id:"1a281053ba8601a658368594da034c2e99a0fb951b86498d05e76aedfe666800",name:"AYIN",symbol:"AYIN",decimals:18,description:"$AYIN is a DEX token, that incentivises users through fees and other mechanisms to participate in trading on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/AYIN.png"},{id:"5bf2f559ae714dab83ff36bed4d9e634dfda3ca9ed755d60f00be89e2a20bd00",name:"Staked Ayin",symbol:"XAYIN",decimals:18,description:"xAyin is single-staked Ayin accumulating trading fees and additional Ayins from the DEX",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/XAYIN.png"},{id:"7da28936499f56ffed497fe7eba856aa85eeb943bab2478e36f7020d89cd2400",name:"Vlad",symbol:"VLAD",decimals:9,description:"Enough $VLAD entitles you to some VLAD time, at VLAD's discretion, to talk about VLAD, with VLAD in a VLAD setup of his choosing. This is the way of the VLAD. $VLAD is a valueless memexperimentcoin. NFA applies.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/VLAD.png"},{id:"2bc4b844502d6c27b57dfe064f95353647a606b3d92150786ecacb56c885c800",name:"Jekyll",symbol:"JKL",decimals:18,description:"Jekyll comes to life as the sun rises...",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/JKL.png"},{id:"19246e8c2899bc258a1156e08466e3cdd3323da756d8a543c7fc911847b96f00",name:"Wrapped Ether (AlphBridge)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WETH.png"},{id:"383bc735a4de6722af80546ec9eeb3cff508f2f68e97da19489ce69f3e703200",name:"Wrapped BTC (AlphBridge)",symbol:"WBTC",decimals:8,description:"wBTC Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WBTC.png"},{id:"556d9582463fe44fbd108aedc9f409f69086dc78d994b88ea6c9e65f8bf98e00",name:"Tether USD (AlphBridge)",symbol:"USDT",decimals:6,description:"USDT Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/USDT.png"},{id:"722954d9067c5a5ad532746a024f2a9d7a18ed9b90e27d0a3a504962160b5600",name:"USD Coin (AlphBridge)",symbol:"USDC",decimals:6,description:"USDC Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/USDC.png"},{id:"3d0a1895108782acfa875c2829b0bf76cb586d95ffa4ea9855982667cc73b700",name:"Dai Stablecoin (AlphBridge)",symbol:"DAI",decimals:18,description:"DAI Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/DAI.png"},{id:"df3008f43a7cc1d4a37eef71bf581fc4b9c3be4e2d58ed6d1df483bbb83bd200",name:"NUMBER GO UP",symbol:"NGU",decimals:7,description:"Number Go Up",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/NGU.png"},{id:"11379064c747f89753d493b562130a63caf1a1fc448fcb161e507d2e542c0b00",name:"VIRAL",symbol:"VIRL",decimals:4,description:"The most contagious token on the Alephium Blockchain.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/VIRL.png"},{id:"130f008dcc71ad5138bdae00d918acef3b78ddbe95e627215a36a47b6b151100",name:"BUBBLE",symbol:"BUBBLE",decimals:9,description:"Governance token for the AlphDolphins NFT Collections",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/BUBBLE.png"},{id:"7dd0c01b2c835ed659c85c1ae64c7c10b916c06f13cf5b91f1369a5a3feda000",name:"CYXE",symbol:"CYXE",decimals:4,description:"Your Memory. Your Eyes. Your Life.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/CYXE.png"},{id:"c1aeea313e36454f35beaf40130c9219faa40ba645aff93e16429146039f8202",name:"Wang",symbol:"WANG",decimals:5,description:"The first mystical coin, endowing its holders with the spirit of Alephium.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WANG.png"},{id:"4e0eb20afb173cd534ae29acd013861115482c1e3d8ed626294bbe1008a3f900",name:"KleoMixer",symbol:"MIX",decimals:8,description:"$MIX is the native token of the KleoMixer platform",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/MIX.png"},{id:"93cc555d3dfc0a81aa6f3127c0108e529a32c87c595c1b89f1855e698c2bc700",name:"SUCC",symbol:"SUCC",decimals:10,description:"Tribute to Sir Moist. 1 alph = 1 SUCC",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/SUCC.png"},{id:"3f0139e1b0aa2cf0a9400ccdb73d00750bcfc8c7be0e858052d794491c8a5900",name:"Shin Inu",symbol:"SHIN",decimals:5,description:"Fun collectible coin and first dog token on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/SHIN.png"},{id:"06bc1a82909c566eb6b00a3dc2dfca0d0564f43f3e8357114a0a59b182792a00",name:"LOVE",symbol:"LOVE",decimals:7,description:"NGU LOVE. NUMBER GO UP",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/LOVE.png"}],BUe={networkId:RUe,tokens:NUe},FUe=1,jUe=[{id:"bed35ce97166170f91a8cdb35948b8696aa67dbd573ee0c5cc572bb8c44ddb01",name:"Test BTC",symbol:"TBTC",decimals:8,description:"Testing BTC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TBTC.png"},{id:"4d765e05a5f08c39ab441c10fea45310cbd7b8c7bc7b4cd4e93d4531fdf2b601",name:"Test ETH",symbol:"TETH",decimals:18,description:"Testing ETH on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TETH.png"},{id:"9a8cda8bc3423347b7fe2932ef7981ed67e8825dba3a5ee36011f578d1d70f00",name:"Wrapped Ether (Wormhole)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WETH.png"},{id:"4db93c3e58ca4c3392b9d47be17b62fcbabccba61a7d7c1fa1c3baa40181f700",name:"Wrapped BNB (Wormhole)",symbol:"WBNB",decimals:18,description:"BNB Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WBNB.png"},{id:"92982a9d35b38ff1d0b43dec536631b523cdccde0cf2fc1d5c349790c59d2701",name:"Test DAI",symbol:"TDAI",decimals:18,description:"Testing DAI on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TDAI.png"},{id:"416800f4e2a7326ef2c129d38e4db35de11cec2d4aff98972558ca2c6f976e01",name:"Test USDT",symbol:"TUSDT",decimals:6,description:"Testing USDT on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TUSDT.png"},{id:"ecc6dd103bbb3cfad3ada8d6a22d73a599a9d39a43b81a734bc9784acc261b01",name:"Test USDC",symbol:"TUSDC",decimals:6,description:"Testing USDC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TUSDC.png"},{id:"f393e2366ee780141240e840aa32f26eade79559864d103b453f0d595425af00",name:"Fetatoken",symbol:"FETA",decimals:18,description:"DJ Fetamin fanclub token",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/FETA.png"}],LUe={networkId:FUe,tokens:jUe};var Cte={};Object.defineProperty(Cte,"__esModule",{value:!0});(function(e){var t=Ae&&Ae.__createBinding||(Object.create?function(a,s,c,l){l===void 0&&(l=c);var u=Object.getOwnPropertyDescriptor(s,c);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,l,u)}:function(a,s,c,l){l===void 0&&(l=c),a[l]=s[c]}),r=Ae&&Ae.__exportStar||function(a,s){for(var c in a)c!=="default"&&!Object.prototype.hasOwnProperty.call(s,c)&&t(s,a,c)},n=Ae&&Ae.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.ALPH=e.testnetTokensMetadata=e.mainnetTokensMetadata=void 0;const o=n(BUe),i=n(LUe);r(Cte,e),e.mainnetTokensMetadata=o.default,e.testnetTokensMetadata=i.default,e.default={mainnet:{tokens:e.mainnetTokensMetadata},testnet:{tokens:e.testnetTokensMetadata}},e.ALPH={id:"".padStart(64,"0"),name:"Alephium",symbol:"ALPH",decimals:18}})(dd);const UUe="https://wallet-v20.mainnet.alephium.org",HUe="https://wallet-v20.testnet.alephium.org",zUe="http://127.0.0.1:22973",VUe="https://backend-v113.mainnet.alephium.org",qUe="https://backend-v113.testnet.alephium.org",WUe="http://127.0.0.1:9090",GUe="https://explorer.alephium.org",KUe="https://testnet.alephium.org",YUe="http://localhost:23000",Pte="alephium-network";function JUe(){const e=localStorage.getItem(Pte);return e==="mainnet"||e==="testnet"||e==="devnet"?e:"mainnet"}function ZUe(e){localStorage.setItem(Pte,e)}function Ou(){const{network:e,setNetwork:t}=Ete();return z.useEffect(()=>{ZUe(e)},[e]),[e,t]}function Z2(){const[e]=Ou(),t=z.useMemo(()=>new ot.NodeProvider(e==="mainnet"?UUe:e==="testnet"?HUe:zUe),[e]);return z.useEffect(()=>{ot.web3.setCurrentNodeProvider(t)},[t]),t}function Ate(){const[e]=Ou(),t=z.useMemo(()=>new ot.ExplorerProvider(e==="mainnet"?VUe:e==="testnet"?qUe:WUe),[e]);return z.useEffect(()=>{ot.web3.setCurrentExplorerProvider(t)},[ot.ExplorerProvider]),t}function Ote(){const[e]=Ou();return e==="mainnet"?GUe:e==="testnet"?KUe:YUe}function XUe(){const[e]=Ou();return e==="mainnet"?dd.mainnetTokensMetadata.tokens:e==="testnet"?dd.testnetTokensMetadata.tokens:[]}function QUe(e){return e==="mainnet"?dd.mainnetTokensMetadata:dd.testnetTokensMetadata}const eHe="/alephium-toolkit/assets/alephium-light-28918105.png",tHe="/alephium-toolkit/assets/alephium-dark-50aa73c9.png",rHe=ft(e=>({link:{display:"flex",alignItems:"center",height:"100%",paddingLeft:e.spacing.md,paddingRight:e.spacing.md,textDecoration:"none",color:e.colorScheme==="dark"?e.white:e.black,fontWeight:500,fontSize:e.fontSizes.sm,[e.fn.smallerThan("sm")]:{height:xe(42),display:"flex",alignItems:"center",width:"100%"},...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})},subLink:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radius.md,...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}),"&:active":e.activeStyles},dropdownFooter:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],margin:`calc(${e.spacing.md} * -1)`,marginTop:e.spacing.sm,padding:`${e.spacing.md} calc(${e.spacing.md} * 2)`,paddingBottom:e.spacing.xl,borderTop:`${xe(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`},hiddenMobile:{[e.fn.smallerThan("sm")]:{display:"none"}},hiddenDesktop:{[e.fn.largerThan("sm")]:{display:"none"}}}));function nHe(){const[e,{toggle:t}]=lU(!1),{classes:r}=rHe(),n=Kr(),[o,i]=Ou();return G.jsx(aH,{height:60,px:"md",children:G.jsxs(Ut,{position:"apart",sx:{height:"100%"},children:[G.jsx(LV,{src:n.colorScheme==="dark"?tHe:eHe,height:55,width:"auto",ml:"sm"}),G.jsxs(Ut,{className:r.hiddenMobile,children:[G.jsx(Q6e,{}),G.jsxs(Xo,{children:[G.jsx(Xo.Target,{children:G.jsx(_r,{size:"md",w:"5.25rem",tt:"capitalize",radius:"md",compact:!0,variant:"outline",children:o})}),G.jsxs(Xo.Dropdown,{children:[G.jsx(Xo.Item,{onClick:()=>i("mainnet"),children:"Mainnet"}),G.jsx(Xo.Item,{onClick:()=>i("testnet"),children:"Testnet"}),G.jsx(Xo.Item,{onClick:()=>i("devnet"),children:"Devnet"})]})]}),G.jsx(Ste,{})]}),G.jsx(Nz,{opened:e,onClick:t,className:r.hiddenDesktop})]})})}function Df({children:e,...t}){return G.jsx(at,{mx:"auto",px:"lg",py:"lg",sx:r=>({backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:"white",borderRadius:r.radius.md,boxShadow:r.shadows.sm}),...t,children:e})}function oHe({caption:e}){const t=Kr();return G.jsx(St,{fw:"bold",c:t.colorScheme==="dark"?t.colors.gray[0]:t.colors.dark[8],children:e})}function X2({w:e,px:t,py:r,data:n,horizontalSpacing:o,verticalSpacing:i}){const a=Object.entries(n).map(([s,c])=>G.jsxs("tr",{children:[G.jsx("td",{width:"30%",children:G.jsx(oHe,{caption:s})}),G.jsx("td",{width:"70%",children:c})]},s));return G.jsx(Df,{w:e,mx:"auto",px:t??"lg",py:r??"lg",ta:"center",children:G.jsx(mW,{horizontalSpacing:o??"xs",verticalSpacing:i??"xl",fontSize:"md",withColumnBorders:!0,children:G.jsx("tbody",{children:a})})})}const iHe=ft(e=>({root:{paddingTop:xe(80),paddingBottom:xe(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:xe(150),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:xe(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:xe(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:xe(32)}},description:{maxWidth:xe(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function aHe(){const{classes:e}=iHe();return G.jsx(at,{maw:xe("70%"),mx:"auto",mt:xe("15%"),children:G.jsx("div",{className:e.root,children:G.jsxs(Q4,{children:[G.jsx("div",{className:e.label,children:"No Wallet"}),G.jsx(Bw,{className:e.title,children:"Please connect your wallet"})]})})})}function xc({value:e,color:t,variant:r}){return G.jsx(Rw,{value:e,timeout:1e3,children:({copied:n,copy:o})=>G.jsx(U0.Floating,{label:n?"Copied":"Copy",position:"right",children:G.jsx(_r,{variant:r||"subtle",color:t,onClick:o,styles:{root:{height:"auto",padding:"0.5rem"},label:{whiteSpace:"normal",wordBreak:"break-all",lineHeight:"1.5rem"}},children:e})})})}function sHe(){const{account:e,connectionStatus:t}=J2(),{network:r,addressGroup:n,keyType:o}=Ete();return console.log("WalletInfo:",t,r,n,o,e),t==="connecting"&&!e?null:t==="disconnected"?G.jsx(aHe,{}):G.jsx(j0,{mt:"10%",children:G.jsx(X2,{w:900,data:{"Network Type":G.jsx(St,{tt:"capitalize",children:e==null?void 0:e.network}),"Address Group":e==null?void 0:e.group,Address:G.jsx(xc,{value:(e==null?void 0:e.address)??"???"}),"Public Key":G.jsx(xc,{value:(e==null?void 0:e.publicKey)??"???"})}})})}const cHe=ft(e=>({root:{paddingTop:"5rem",paddingBottom:xe(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:xe(220),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:xe(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:xe(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:xe(32)}},description:{maxWidth:xe(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function Zi(){const{classes:e}=cHe();return G.jsx(at,{maw:xe("70%"),mx:"auto",mt:xe("15%"),children:G.jsx("div",{className:e.root,children:G.jsxs(Q4,{children:[G.jsx("div",{className:e.label,children:"WIP"}),G.jsx(Bw,{className:e.title,children:"We are working on it..."})]})})})}function qN({value:e,label:t}){return G.jsx(Rw,{value:e,timeout:1e3,children:({copied:r,copy:n})=>G.jsx(U0,{label:r?"Copied":"Copy",withArrow:!0,position:"right",color:"indigo",children:G.jsx(_r,{variant:"subtle",onClick:n,children:t??e})})})}function lHe(e){return e.methods.some(t=>t.instrs.some(r=>r.code===ot.codec.MigrateSimple.code||r.code===ot.codec.MigrateWithFields.code))}async function uHe(e,t,r){return(await e.contracts.getContractsContractAddressParent(r)).parent!==void 0&&t.methods.some(o=>o.instrs.some(i=>i.code===ot.codec.DestroySelf.code))}function fHe(){const[e,t]=z.useState(""),[r,n]=z.useState(),o=Z2(),i=Ate(),[a]=Ou(),s=z.useCallback(async c=>{if(t(c),c){const l=await o.fetchFungibleTokenMetaData(c),u=a=="devnet"?!1:QUe(a).tokens.find(O=>O.id===c)!==void 0,d=ot.addressFromTokenId(c),p=ot.groupOfAddress(d),m=await o.contracts.getContractsAddressState(d,{group:p}),w=ot.codec.contract.contractCodec.decodeContract(mb.from(m.bytecode,"hex")),A=lHe(w),T=await uHe(i,w,d);n({...l,verified:u,tokenId:c,tokenAddress:d,upgradable:A,additionalIssuanceAllowed:T})}else n(void 0)},[]);return G.jsx(j0,{h:xe("80%"),children:G.jsxs(H0,{children:[G.jsx(ma,{w:xe("40rem"),mx:"auto",size:"md",value:e,onChange:c=>s(c.currentTarget.value),placeholder:"Search token address or token id",radius:"xl",withAsterisk:!0}),G.jsx(at,{mt:"xl",w:xe("55rem"),children:G.jsx(X2,{data:{Verified:`${r==null?void 0:r.verified}`,Name:`${r?ot.hexToString(r.name):void 0}`,Symbol:`${r?ot.hexToString(r.symbol):void 0}`,Decimals:`${r==null?void 0:r.decimals}`,"Total Supply":`${r?ot.prettifyTokenAmount(r.totalSupply,r.decimals):void 0}`,"Token ID":r?G.jsx(qN,{value:`${r.tokenId}`}):"undefined","Token Address":r?G.jsx(qN,{value:`${r.tokenAddress}`}):"undefined","Token Contract Upgradable":`${r==null?void 0:r.upgradable}`,"Additional Issuance Allowed":`${r==null?void 0:r.additionalIssuanceAllowed}`}})})]})})}var dHe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const WN=Hi(dHe);function iE(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}var hHe=Object.defineProperty,GN=Object.getOwnPropertySymbols,pHe=Object.prototype.hasOwnProperty,gHe=Object.prototype.propertyIsEnumerable,KN=(e,t,r)=>t in e?hHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mHe=(e,t)=>{for(var r in t||(t={}))pHe.call(t,r)&&KN(e,r,t[r]);if(GN)for(var r of GN(t))gHe.call(t,r)&&KN(e,r,t[r]);return e};function Ite(e,t){if(t===null||typeof t!="object")return{};const r=mHe({},t);return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}const vf="__MANTINE_FORM_INDEX__";function YN(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${vf}`)):!1:!1}function JN(e,t,r){typeof r.value=="object"&&(r.value=yf(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function yf(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(yf(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(yf(s),yf(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(yf(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t0,errors:t}}function aE(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{const a=e[i],s=`${r===""?"":`${r}.`}${i}`,c=qa(s,t);let l=!1;return typeof a=="function"&&(o[s]=a(c,t,s)),typeof a=="object"&&Array.isArray(c)&&(l=!0,c.forEach((u,d)=>aE(a,t,`${s}.${d}`,o))),typeof a=="object"&&typeof c=="object"&&c!==null&&(l||aE(a,t,s,o)),o},n)}function sE(e,t){return ZN(typeof e=="function"?e(t):aE(e,t))}function zm(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=sE(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}function vHe(e,{from:t,to:r},n){const o=qa(e,n);if(!Array.isArray(o))return n;const i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),Q2(e,i,n)}var yHe=Object.defineProperty,XN=Object.getOwnPropertySymbols,bHe=Object.prototype.hasOwnProperty,wHe=Object.prototype.propertyIsEnumerable,QN=(e,t,r)=>t in e?yHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_He=(e,t)=>{for(var r in t||(t={}))bHe.call(t,r)&&QN(e,r,t[r]);if(XN)for(var r of XN(t))wHe.call(t,r)&&QN(e,r,t[r]);return e};function xHe(e,{from:t,to:r},n){const o=`${e}.${t}`,i=`${e}.${r}`,a=_He({},n);return Object.keys(n).every(s=>{let c,l;if(s.startsWith(o)&&(c=s,l=s.replace(o,i)),s.startsWith(i)&&(c=s.replace(i,o),l=s),c&&l){const u=a[c],d=a[l];return d===void 0?delete a[c]:a[c]=d,u===void 0?delete a[l]:a[l]=u,!1}return!0}),a}function SHe(e,t,r){const n=qa(e,r);return Array.isArray(n)?Q2(e,n.filter((o,i)=>i!==t),r):r}var EHe=Object.defineProperty,eB=Object.getOwnPropertySymbols,CHe=Object.prototype.hasOwnProperty,PHe=Object.prototype.propertyIsEnumerable,tB=(e,t,r)=>t in e?EHe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AHe=(e,t)=>{for(var r in t||(t={}))CHe.call(t,r)&&tB(e,r,t[r]);if(eB)for(var r of eB(t))PHe.call(t,r)&&tB(e,r,t[r]);return e};function rB(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function nB(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let i=r;n===-1&&(i=Ite(`${o}.${t}`,i));const a=AHe({},i),s=new Set;return Object.entries(i).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const l=rB(c,o);return Number.isNaN(l)?!1:l>=t}).forEach(([c,l])=>{const u=rB(c,o),d=c.replace(`${o}.${u}`,`${o}.${u+n}`);a[d]=l,s.add(d),s.has(c)||delete a[c]}),a}function OHe(e,t,r,n){const o=qa(e,n);if(!Array.isArray(o))return n;const i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),Q2(e,i,n)}function oB(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function IHe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var THe=Object.defineProperty,MHe=Object.defineProperties,kHe=Object.getOwnPropertyDescriptors,iB=Object.getOwnPropertySymbols,$He=Object.prototype.hasOwnProperty,DHe=Object.prototype.propertyIsEnumerable,aB=(e,t,r)=>t in e?THe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,js=(e,t)=>{for(var r in t||(t={}))$He.call(t,r)&&aB(e,r,t[r]);if(iB)for(var r of iB(t))DHe.call(t,r)&&aB(e,r,t[r]);return e},e6=(e,t)=>MHe(e,kHe(t));function _P({initialValues:e={},initialErrors:t={},initialDirty:r={},initialTouched:n={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:a=!1,transformValues:s=l=>l,validate:c}={}){const[l,u]=z.useState(n),[d,p]=z.useState(r),[m,w]=z.useState(e),[A,T]=z.useState(iE(t)),O=z.useRef(e),P=W=>{O.current=W},$=z.useCallback(()=>u({}),[]),R=W=>{const ee=W?js(js({},m),W):m;P(ee),p({})},j=z.useCallback(W=>T(ee=>iE(typeof W=="function"?W(ee):W)),[]),I=z.useCallback(()=>T({}),[]),b=z.useCallback(()=>{w(e),I(),P(e),p({}),$()},[]),N=z.useCallback((W,ee)=>j(ce=>e6(js({},ce),{[W]:ee})),[]),V=z.useCallback(W=>j(ee=>{if(typeof W!="string")return ee;const ce=js({},ee);return delete ce[W],ce}),[]),Z=z.useCallback(W=>p(ee=>{if(typeof W!="string")return ee;const ce=Ite(W,ee);return delete ce[W],ce}),[]),q=z.useCallback((W,ee)=>{const ce=YN(W,i);Z(W),u(ie=>e6(js({},ie),{[W]:!0})),w(ie=>{const le=Q2(W,ee,ie);if(ce){const L=zm(W,c,le);L.hasError?N(W,L.error):V(W)}return le}),!ce&&o&&N(W,null)},[]),_=z.useCallback(W=>{w(ee=>{const ce=typeof W=="function"?W(ee):W;return js(js({},ee),ce)}),o&&I()},[]),y=z.useCallback((W,ee)=>{Z(W),w(ce=>vHe(W,ee,ce)),T(ce=>xHe(W,ee,ce))},[]),f=z.useCallback((W,ee)=>{Z(W),w(ce=>SHe(W,ee,ce)),T(ce=>nB(W,ee,ce,-1))},[]),h=z.useCallback((W,ee,ce)=>{Z(W),w(ie=>OHe(W,ee,ce,ie)),T(ie=>nB(W,ce,ie,1))},[]),x=z.useCallback(()=>{const W=sE(c,m);return T(W.errors),W},[m,c]),v=z.useCallback(W=>{const ee=zm(W,c,m);return ee.hasError?N(W,ee.error):V(W),ee},[m,c]),S=(W,{type:ee="input",withError:ce=!0,withFocus:ie=!0}={})=>{const L={onChange:IHe(te=>q(W,te))};return ce&&(L.error=A[W]),ee==="checkbox"?L.checked=qa(W,m):L.value=qa(W,m),ie&&(L.onFocus=()=>u(te=>e6(js({},te),{[W]:!0})),L.onBlur=()=>{if(YN(W,a)){const te=zm(W,c,m);te.hasError?N(W,te.error):V(W)}}),L},k=(W,ee)=>ce=>{ce==null||ce.preventDefault();const ie=x();ie.hasErrors?ee==null||ee(ie.errors,m,ce):W==null||W(s(m),ce)},E=W=>s(W||m),C=z.useCallback(W=>{W.preventDefault(),b()},[]),g=W=>{if(W){const ce=qa(W,d);if(typeof ce=="boolean")return ce;const ie=qa(W,m),le=qa(W,O.current);return!WN(ie,le)}return Object.keys(d).length>0?oB(d):!WN(m,O.current)},M=z.useCallback(W=>oB(l,W),[l]),re=z.useCallback(W=>W?!zm(W,c,m).hasError:!sE(c,m).hasErrors,[m,c]);return{values:m,errors:A,setValues:_,setErrors:j,setFieldValue:q,setFieldError:N,clearFieldError:V,clearErrors:I,reset:b,validate:x,validateField:v,reorderListItem:y,removeListItem:f,insertListItem:h,getInputProps:S,onSubmit:k,onReset:C,isDirty:g,isTouched:M,setTouched:u,setDirty:p,resetTouched:$,resetDirty:R,isValid:re,getTransformedValues:E}}function sB(e,t){if(typeof e=="number")return t.length===e;const{max:r,min:n}=e;let o=!0;return typeof r=="number"&&t.length>r&&(o=!1),typeof n=="number"&&t.lengthtypeof n=="string"?sB(e,n.trim())?null:r:typeof n=="object"&&n!==null&&"length"in n&&sB(e,n)?null:r}function cB({min:e,max:t},r){const n=r||!0;return o=>{if(typeof o!="number")return n;let i=!0;return typeof e=="number"&&ot&&(i=!1),i?null:n}}function cE(e,t){return cE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cE(e,t)}function Mte(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cE(e,t)}function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(to(1));return r(kte)(e,t)}if(typeof e!="function")throw new Error(to(2));var o=e,i=t,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error(to(3));return i}function d(A){if(typeof A!="function")throw new Error(to(4));if(c)throw new Error(to(5));var T=!0;return l(),s.push(A),function(){if(T){if(c)throw new Error(to(6));T=!1,l();var P=s.indexOf(A);s.splice(P,1),a=null}}}function p(A){if(!jHe(A))throw new Error(to(7));if(typeof A.type>"u")throw new Error(to(8));if(c)throw new Error(to(9));try{c=!0,i=o(i,A)}finally{c=!1}for(var T=a=s,O=0;O=0)&&(r[o]=e[o]);return r}var Fte={exports:{}},Lt={};/** @license React v17.0.2 + * react-is.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 e_=60103,t_=60106,mg=60107,vg=60108,yg=60114,bg=60109,wg=60110,_g=60112,xg=60113,xP=60120,Sg=60115,Eg=60116,jte=60121,Lte=60122,Ute=60117,Hte=60129,zte=60131;if(typeof Symbol=="function"&&Symbol.for){var un=Symbol.for;e_=un("react.element"),t_=un("react.portal"),mg=un("react.fragment"),vg=un("react.strict_mode"),yg=un("react.profiler"),bg=un("react.provider"),wg=un("react.context"),_g=un("react.forward_ref"),xg=un("react.suspense"),xP=un("react.suspense_list"),Sg=un("react.memo"),Eg=un("react.lazy"),jte=un("react.block"),Lte=un("react.server.block"),Ute=un("react.fundamental"),Hte=un("react.debug_trace_mode"),zte=un("react.legacy_hidden")}function Wi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case e_:switch(e=e.type,e){case mg:case yg:case vg:case xg:case xP:return e;default:switch(e=e&&e.$$typeof,e){case wg:case _g:case Eg:case Sg:case bg:return e;default:return t}}case t_:return t}}}var WHe=bg,GHe=e_,KHe=_g,YHe=mg,JHe=Eg,ZHe=Sg,XHe=t_,QHe=yg,eze=vg,tze=xg;Lt.ContextConsumer=wg;Lt.ContextProvider=WHe;Lt.Element=GHe;Lt.ForwardRef=KHe;Lt.Fragment=YHe;Lt.Lazy=JHe;Lt.Memo=ZHe;Lt.Portal=XHe;Lt.Profiler=QHe;Lt.StrictMode=eze;Lt.Suspense=tze;Lt.isAsyncMode=function(){return!1};Lt.isConcurrentMode=function(){return!1};Lt.isContextConsumer=function(e){return Wi(e)===wg};Lt.isContextProvider=function(e){return Wi(e)===bg};Lt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===e_};Lt.isForwardRef=function(e){return Wi(e)===_g};Lt.isFragment=function(e){return Wi(e)===mg};Lt.isLazy=function(e){return Wi(e)===Eg};Lt.isMemo=function(e){return Wi(e)===Sg};Lt.isPortal=function(e){return Wi(e)===t_};Lt.isProfiler=function(e){return Wi(e)===yg};Lt.isStrictMode=function(e){return Wi(e)===vg};Lt.isSuspense=function(e){return Wi(e)===xg};Lt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===mg||e===yg||e===Hte||e===vg||e===xg||e===xP||e===zte||typeof e=="object"&&e!==null&&(e.$$typeof===Eg||e.$$typeof===Sg||e.$$typeof===bg||e.$$typeof===wg||e.$$typeof===_g||e.$$typeof===Ute||e.$$typeof===jte||e[0]===Lte)};Lt.typeOf=Wi;Fte.exports=Lt;var rze=Fte.exports,nze=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],oze=["reactReduxForwardedRef"],ize=[],aze=[null,null];function sze(e,t){var r=e[1];return[t.payload,r+1]}function mB(e,t,r){Bte(function(){return e.apply(void 0,t)},r)}function cze(e,t,r,n,o,i,a){e.current=n,t.current=o,r.current=!1,i.current&&(i.current=null,a())}function lze(e,t,r,n,o,i,a,s,c,l){if(e){var u=!1,d=null,p=function(){if(!u){var A=t.getState(),T,O;try{T=n(A,o.current)}catch(P){O=P,d=P}O||(d=null),T===i.current?a.current||c():(i.current=T,s.current=T,a.current=!0,l({type:"STORE_UPDATED",payload:{error:O}}))}};r.onStateChange=p,r.trySubscribe(),p();var m=function(){if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d};return m}}var uze=function(){return[null,0]};function fze(e,t){t===void 0&&(t={});var r=t,n=r.getDisplayName,o=n===void 0?function($){return"ConnectAdvanced("+$+")"}:n,i=r.methodName,a=i===void 0?"connectAdvanced":i,s=r.renderCountProp,c=s===void 0?void 0:s,l=r.shouldHandleStateChanges,u=l===void 0?!0:l,d=r.storeKey,p=d===void 0?"store":d;r.withRef;var m=r.forwardRef,w=m===void 0?!1:m,A=r.context,T=A===void 0?Dte:A,O=jb(r,nze),P=T;return function(R){var j=R.displayName||R.name||"Component",I=o(j),b=ac({},O,{getDisplayName:o,methodName:a,renderCountProp:c,shouldHandleStateChanges:u,storeKey:p,displayName:I,wrappedComponentName:j,WrappedComponent:R}),N=O.pure;function V(f){return e(f.dispatch,b)}var Z=N?z.useMemo:function(f){return f()};function q(f){var h=z.useMemo(function(){var Ie=f.reactReduxForwardedRef,we=jb(f,oze);return[f.context,Ie,we]},[f]),x=h[0],v=h[1],S=h[2],k=z.useMemo(function(){return x&&x.Consumer&&rze.isContextConsumer(fe.createElement(x.Consumer,null))?x:P},[x,P]),E=z.useContext(k),C=!!f.store&&!!f.store.getState&&!!f.store.dispatch;E&&E.store;var g=C?f.store:E.store,M=z.useMemo(function(){return V(g)},[g]),re=z.useMemo(function(){if(!u)return aze;var Ie=Nte(g,C?null:E.subscription),we=Ie.notifyNestedSubs.bind(Ie);return[Ie,we]},[g,C,E]),W=re[0],ee=re[1],ce=z.useMemo(function(){return C?E:ac({},E,{subscription:W})},[C,E,W]),ie=z.useReducer(sze,ize,uze),le=ie[0],L=le[0],te=ie[1];if(L&&L.error)throw L.error;var ae=z.useRef(),ye=z.useRef(S),ve=z.useRef(),me=z.useRef(!1),Pe=Z(function(){return ve.current&&S===ye.current?ve.current:M(g.getState(),S)},[g,L,S]);mB(cze,[ye,ae,me,S,Pe,ve,ee]),mB(lze,[u,g,W,M,ye,ae,me,ve,ee,te],[g,W,M]);var he=z.useMemo(function(){return fe.createElement(R,ac({},Pe,{ref:v}))},[v,R,Pe]),be=z.useMemo(function(){return u?fe.createElement(k.Provider,{value:ce},he):he},[k,he,ce]);return be}var _=N?fe.memo(q):q;if(_.WrappedComponent=R,_.displayName=q.displayName=I,w){var y=fe.forwardRef(function(h,x){return fe.createElement(_,ac({},h,{reactReduxForwardedRef:x}))});return y.displayName=I,y.WrappedComponent=R,hx(y,R)}return hx(_,R)}}function vB(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function r6(e,t){if(vB(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0;o=0;n--){var o=t[n](e);if(o)return o}return function(i,a){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+a.wrappedComponentName+".")}}function Tze(e,t){return e===t}function Mze(e){var t=e===void 0?{}:e,r=t.connectHOC,n=r===void 0?fze:r,o=t.mapStateToPropsFactories,i=o===void 0?bze:o,a=t.mapDispatchToPropsFactories,s=a===void 0?mze:a,c=t.mergePropsFactories,l=c===void 0?Eze:c,u=t.selectorFactory,d=u===void 0?Oze:u;return function(m,w,A,T){T===void 0&&(T={});var O=T,P=O.pure,$=P===void 0?!0:P,R=O.areStatesEqual,j=R===void 0?Tze:R,I=O.areOwnPropsEqual,b=I===void 0?r6:I,N=O.areStatePropsEqual,V=N===void 0?r6:N,Z=O.areMergedPropsEqual,q=Z===void 0?r6:Z,_=jb(O,Ize),y=n6(m,i,"mapStateToProps"),f=n6(w,s,"mapDispatchToProps"),h=n6(A,l,"mergeProps");return n(d,ac({methodName:"connect",getDisplayName:function(v){return"Connect("+v+")"},shouldHandleStateChanges:!!m,initMapStateToProps:y,initMapDispatchToProps:f,initMergeProps:h,pure:$,areStatesEqual:j,areOwnPropsEqual:b,areStatePropsEqual:V,areMergedPropsEqual:q},_))}}const qte=Mze();HHe(Fc.unstable_batchedUpdates);function kze(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(s){n.callbacks=s},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=ti(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(o){if(o instanceof Hb){this.setState({});return}throw o},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(fe.Component),Vze=` + Press space bar to start a drag. + When dragging you can use the arrow keys to move the item around and escape to cancel. + Some screen readers may require you to be in focus mode or to use your pass through key +`,zb=function(t){return t+1},qze=function(t){return` + You have lifted an item in position `+zb(t.source.index)+` +`},Jte=function(t,r){var n=t.droppableId===r.droppableId,o=zb(t.index),i=zb(r.index);return n?` + You have moved the item from position `+o+` + to position `+i+` + `:` + You have moved the item from position `+o+` + in list `+t.droppableId+` + to list `+r.droppableId+` + in position `+i+` + `},Zte=function(t,r,n){var o=r.droppableId===n.droppableId;return o?` + The item `+t+` + has been combined with `+n.draggableId:` + The item `+t+` + in list `+r.droppableId+` + has been combined with `+n.draggableId+` + in list `+n.droppableId+` + `},Wze=function(t){var r=t.destination;if(r)return Jte(t.source,r);var n=t.combine;return n?Zte(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},_B=function(t){return` + The item has returned to its starting position + of `+zb(t.index)+` +`},Gze=function(t){if(t.reason==="CANCEL")return` + Movement cancelled. + `+_B(t.source)+` + `;var r=t.destination,n=t.combine;return r?` + You have dropped the item. + `+Jte(t.source,r)+` + `:n?` + You have dropped the item. + `+Zte(t.draggableId,t.source,n)+` + `:` + The item has been dropped while not over a drop area. + `+_B(t.source)+` + `},Mv={dragHandleUsageInstructions:Vze,onDragStart:qze,onDragUpdate:Wze,onDragEnd:Gze},Wr={x:0,y:0},gn=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},Eo=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Ec=function(t,r){return t.x===r.x&&t.y===r.y},Vd=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},ru=function(t,r,n){var o;return n===void 0&&(n=0),o={},o[t]=r,o[t==="x"?"y":"x"]=n,o},b0=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},xB=function(t,r){return Math.min.apply(Math,r.map(function(n){return b0(t,n)}))},Xte=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},Kze=function(e,t){var r=Mi({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},Cg=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},SB=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},Yze={top:0,right:0,bottom:0,left:0},Jze=function(t,r){return r?Cg(t,r.scroll.diff.displacement):t},Zze=function(t,r,n){if(n&&n.increasedBy){var o;return bt({},t,(o={},o[r.end]=t[r.end]+n.increasedBy[r.line],o))}return t},Xze=function(t,r){return r&&r.shouldClipSubject?Kze(r.pageMarginBox,t):Mi(t)},hd=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,o=e.frame,i=Jze(t.marginBox,o),a=Zze(i,n,r),s=Xze(a,o);return{page:t,withPlaceholder:r,active:s}},PP=function(e,t){e.frame||rt(!1);var r=e.frame,n=Eo(t,r.scroll.initial),o=Vd(n),i=bt({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}}),a=hd({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),s=bt({},e,{frame:i,subject:a});return s};function Vb(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function AP(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,l=n.lefte.right,u=c&&l;if(u)return!0;var d=c&&a||l&&i;return d}},rVe=function(e){var t=ni(e.top,e.bottom),r=ni(e.left,e.right);return function(n){var o=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return o}},IP={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},ore={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},nVe=function(e){return function(t){var r=ni(t.top,t.bottom),n=ni(t.left,t.right);return function(o){return e===IP?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)}}},oVe=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:Wr;return Cg(t,n)},iVe=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},aVe=function(t,r,n){return n(r)(t)},TP=function(t){var r=t.target,n=t.destination,o=t.viewport,i=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,s=i?oVe(r,n):r;return iVe(s,n,a)&&aVe(s,o,a)},sVe=function(t){return TP(bt({},t,{isVisibleThroughFrameFn:nre}))},ire=function(t){return TP(bt({},t,{isVisibleThroughFrameFn:rVe}))},cVe=function(t){return TP(bt({},t,{isVisibleThroughFrameFn:nVe(t.destination.axis)}))},lVe=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var o=r.invisible,i=r.visible;if(o[t])return!1;var a=i[t];return a?a.shouldAnimate:!0};function uVe(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Mi(EP(r,n))}function _0(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce(function(c,l){var u=uVe(l,n),d=l.descriptor.id;c.all.push(d);var p=sVe({target:u,destination:r,viewport:o,withDroppableDisplacement:!0});if(!p)return c.invisible[l.descriptor.id]=!0,c;var m=lVe(d,a,i),w={draggableId:d,shouldAnimate:m};return c.visible[d]=w,c},{all:[],visible:{},invisible:{}})}function fVe(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function EB(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,o=e.destination,i=fVe(t,{inHomeList:r});return{displaced:w0,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function qb(e){var t=e.draggable,r=e.insideDestination,n=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,c=e.forceShouldAnimate,l=Wd(t,n);if(s==null)return EB({insideDestination:r,inHomeList:l,displacedBy:i,destination:n});var u=Wc(r,function(A){return A.descriptor.index===s});if(!u)return EB({insideDestination:r,inHomeList:l,displacedBy:i,destination:n});var d=o_(t,r),p=r.indexOf(u),m=d.slice(p),w=_0({afterDragging:m,destination:n,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:c});return{displaced:w,displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function Dc(e,t){return!!t.effected[e]}var dVe=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,o=e.combine,i=e.afterCritical;if(!r.isCombineEnabled)return null;var a=o.draggableId,s=n[a],c=s.descriptor.index,l=Dc(a,i);return l?t?c:c-1:t?c+1:c},hVe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,o=e.location;if(!n.length)return null;var i=o.index,a=t?i+1:i-1,s=n[0].descriptor.index,c=n[n.length-1].descriptor.index,l=r?c:c+1;return al?null:a},pVe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,c=e.viewport,l=e.afterCritical,u=s.at;if(u||rt(!1),u.type==="REORDER"){var d=hVe({isMovingForward:t,isInHomeList:r,location:u.destination,insideDestination:a});return d==null?null:qb({draggable:n,insideDestination:a,destination:i,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:d})}var p=dVe({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:l});return p==null?null:qb({draggable:n,insideDestination:a,destination:i,viewport:c,last:s.displaced,displacedBy:s.displacedBy,index:p})},gVe=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,o=e.displacedBy,i=!!(t.visible[n]||t.invisible[n]);return Dc(n,r)?i?Wr:Vd(o.point):i?o.point:Wr},mVe=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,o=n_(r);o||rt(!1);var i=o.draggableId,a=n[i].page.borderBox.center,s=gVe({displaced:r.displaced,afterCritical:t,combineWith:i,displacedBy:r.displacedBy});return gn(a,s)},are=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},vVe=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},MP=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},CB=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return ru(r.line,n.marginBox[r.end]+are(r,o),MP(r,n.marginBox,o))},PB=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return ru(r.line,n.marginBox[r.start]-vVe(r,o),MP(r,n.marginBox,o))},yVe=function(t){var r=t.axis,n=t.moveInto,o=t.isMoving;return ru(r.line,n.contentBox[r.start]+are(r,o),MP(r,n.contentBox,o))},bVe=function(e){var t=e.impact,r=e.draggable,n=e.draggables,o=e.droppable,i=e.afterCritical,a=qd(o.descriptor.id,n),s=r.page,c=o.axis;if(!a.length)return yVe({axis:c,moveInto:o.page,isMoving:s});var l=t.displaced,u=t.displacedBy,d=l.all[0];if(d){var p=n[d];if(Dc(d,i))return PB({axis:c,moveRelativeTo:p.page,isMoving:s});var m=Lb(p.page,u.point);return PB({axis:c,moveRelativeTo:m,isMoving:s})}var w=a[a.length-1];if(w.descriptor.id===r.descriptor.id)return s.borderBox.center;if(Dc(w.descriptor.id,i)){var A=Lb(w.page,Vd(i.displacedBy.point));return CB({axis:c,moveRelativeTo:A,isMoving:s})}return CB({axis:c,moveRelativeTo:w.page,isMoving:s})},lE=function(e,t){var r=e.frame;return r?gn(t,r.scroll.diff.displacement):t},wVe=function(t){var r=t.impact,n=t.draggable,o=t.droppable,i=t.draggables,a=t.afterCritical,s=n.page.borderBox.center,c=r.at;return!o||!c?s:c.type==="REORDER"?bVe({impact:r,draggable:n,draggables:i,droppable:o,afterCritical:a}):mVe({impact:r,draggables:i,afterCritical:a})},i_=function(e){var t=wVe(e),r=e.droppable,n=r?lE(r,t):t;return n},sre=function(e,t){var r=Eo(t,e.scroll.initial),n=Vd(r),o=Mi({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return i};function AB(e,t){return e.map(function(r){return t[r]})}function _Ve(e,t){for(var r=0;r1?u.sort(function(d,p){return Un(d)[s.start]-Un(p)[s.start]})[0]:l.sort(function(d,p){var m=xB(r,SB(Un(d))),w=xB(r,SB(Un(p)));return m!==w?m-w:Un(d)[s.start]-Un(p)[s.start]})[0]},OB=function(t,r){var n=t.page.borderBox.center;return Dc(t.descriptor.id,r)?Eo(n,r.displacedBy.point):n},PVe=function(t,r){var n=t.page.borderBox;return Dc(t.descriptor.id,r)?Cg(n,Vd(r.displacedBy.point)):n},AVe=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter(function(s){return ire({target:PVe(s,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(s,c){var l=b0(t,lE(n,OB(s,i))),u=b0(t,lE(n,OB(c,i)));return lt.left&&e.topt.top}function RVe(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,o=r.page.borderBox.center,i=n.map(function(a){var s=a.axis,c=ru(a.axis.line,t.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:b0(o,c)}}).sort(function(a,s){return s.distance-a.distance});return i[0]?i[0].id:null}function NVe(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,o=r_(n).filter(function(i){if(!i.isEnabled)return!1;var a=i.subject.active;if(!a||!DVe(t,a))return!1;if(fre(a)(t.center))return!0;var s=i.axis,c=a.center[s.crossAxisLine],l=t[s.crossAxisStart],u=t[s.crossAxisEnd],d=ni(a[s.crossAxisStart],a[s.crossAxisEnd]),p=d(l),m=d(u);return!p&&!m?!0:p?lc});return o.length?o.length===1?o[0].descriptor.id:RVe({pageBorderBox:t,draggable:r,candidates:o}):null}var dre=function(t,r){return Mi(Cg(t,r))},BVe=function(e,t){var r=e.frame;return r?dre(t,r.scroll.diff.value):t};function hre(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function FVe(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var jVe=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,c=n.axis,l=Pg(n.axis,r.displaceBy),u=l.value,d=t[c.start],p=t[c.end],m=o_(r,o),w=Wc(m,function(T){var O=T.descriptor.id,P=T.page.borderBox.center[c.line],$=Dc(O,s),R=hre({displaced:i,id:O});return $?R?p<=P:dO[s.start]+$&&dO[s.start]-l+$&&uO[s.start]+l+$&&dO[s.start]+$&&u=MB)return xre;var i=o/MB,a=dE+mqe*i,s=n==="CANCEL"?a*vqe:a;return Number(s.toFixed(2))},bqe=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,o=e.viewport,i=e.afterCritical,a=n.draggables,s=n.droppables,c=Oo(t),l=c?s[c]:null,u=s[r.descriptor.droppableId],d=mre({impact:t,draggable:r,draggables:a,afterCritical:i,droppable:l||u,viewport:o}),p=Eo(d,r.client.borderBox.center);return p},wqe=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;if(!n.at||r!=="DROP"){var s=gre({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var c=bt({},n,{displaced:w0});return{impact:c,didDropInsideDroppable:!0}},_qe=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(o){if(o.type!=="DROP"){n(o);return}var i=t(),a=o.payload.reason;if(i.phase==="COLLECTING"){r(hqe({reason:a}));return}if(i.phase!=="IDLE"){var s=i.phase==="DROP_PENDING"&&i.isWaiting;s&&rt(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||rt(!1);var c=i.critical,l=i.dimensions,u=l.draggables[i.critical.draggable.id],d=wqe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=d.impact,m=d.didDropInsideDroppable,w=m?OP(p):null,A=m?n_(p):null,T={index:c.draggable.index,droppableId:c.droppable.id},O={draggableId:u.descriptor.id,type:u.descriptor.type,source:T,reason:a,mode:i.movementMode,destination:w,combine:A},P=bqe({impact:p,draggable:u,dimensions:l,viewport:i.viewport,afterCritical:i.afterCritical}),$={critical:i.critical,afterCritical:i.afterCritical,result:O,impact:p},R=!Ec(i.current.client.offset,P)||!!O.combine;if(!R){r(RP({completed:$}));return}var j=yqe({current:i.current.client.offset,destination:P,reason:a}),I={newHomeClientOffset:P,dropDuration:j,completed:$};r(dqe(I))}}}},Sre=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function xqe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function Sqe(e){var t=e.onWindowScroll;function r(){t(Sre())}var n=y0(r),o=xqe(n),i=Sc;function a(){return i!==Sc}function s(){a()&&rt(!1),i=ti(window,[o])}function c(){a()||rt(!1),n.cancel(),i(),i=Sc}return{start:s,stop:c,isActive:a}}var Eqe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Cqe=function(e){var t=Sqe({onWindowScroll:function(n){e.dispatch(aqe({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Eqe(n)&&t.stop(),r(n)}}},Pqe=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),o=function(a){t||r||(t=!0,e(a),clearTimeout(n))};return o.wasCalled=function(){return t},o},Aqe=function(){var e=[],t=function(i){var a=AP(e,function(l){return l.timerId===i});a===-1&&rt(!1);var s=e.splice(a,1),c=s[0];c.callback()},r=function(i){var a=setTimeout(function(){return t(a)}),s={timerId:a,callback:i};e.push(s)},n=function(){if(e.length){var i=[].concat(e);e.length=0,i.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:r,flush:n}},Oqe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},Iqe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},Tqe=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,o=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&o},zh=function(t,r){r()},Vm=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},c6=function(t,r,n,o){if(!t){n(o(r));return}var i=Pqe(n),a={announce:i};t(r,a),i.wasCalled()||n(o(r))},Mqe=function(e,t){var r=Aqe(),n=null,o=function(p,m){n&&rt(!1),zh("onBeforeCapture",function(){var w=e().onBeforeCapture;if(w){var A={draggableId:p,mode:m};w(A)}})},i=function(p,m){n&&rt(!1),zh("onBeforeDragStart",function(){var w=e().onBeforeDragStart;w&&w(Vm(p,m))})},a=function(p,m){n&&rt(!1);var w=Vm(p,m);n={mode:m,lastCritical:p,lastLocation:w.source,lastCombine:null},r.add(function(){zh("onDragStart",function(){return c6(e().onDragStart,w,t,Mv.onDragStart)})})},s=function(p,m){var w=OP(m),A=n_(m);n||rt(!1);var T=!Tqe(p,n.lastCritical);T&&(n.lastCritical=p);var O=!Oqe(n.lastLocation,w);O&&(n.lastLocation=w);var P=!Iqe(n.lastCombine,A);if(P&&(n.lastCombine=A),!(!T&&!O&&!P)){var $=bt({},Vm(p,n.mode),{combine:A,destination:w});r.add(function(){zh("onDragUpdate",function(){return c6(e().onDragUpdate,$,t,Mv.onDragUpdate)})})}},c=function(){n||rt(!1),r.flush()},l=function(p){n||rt(!1),n=null,zh("onDragEnd",function(){return c6(e().onDragEnd,p,t,Mv.onDragEnd)})},u=function(){if(n){var p=bt({},Vm(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});l(p)}};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:c,drop:l,abort:u}},kqe=function(e,t){var r=Mqe(e,t);return function(n){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var a=i.payload.critical;r.beforeStart(a,i.payload.movementMode),o(i),r.start(a,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var s=i.payload.completed.result;r.flush(),o(i),r.drop(s);return}if(o(i),i.type==="FLUSH"){r.abort();return}var c=n.getState();c.phase==="DRAGGING"&&r.update(c.critical,c.impact)}}}},$qe=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&rt(!1),e.dispatch(RP({completed:n.completed}))}}},Dqe=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&n(),o(i),i.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(_re())}};r=requestAnimationFrame(function(){r=null,t=ti(window,[a])})}}}},Rqe=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},Nqe=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},Bqe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Fqe=function(e){return function(t){return function(r){return function(n){if(Bqe(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var o=t.getState();o.phase!=="DRAGGING"&&rt(!1),e.start(o);return}r(n),e.scroll(t.getState())}}}},jqe=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(wre({reason:n.reason})))}}}},Lqe=$te,Uqe=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return kte(ZVe,Lqe(LHe(gqe(n),Rqe(t),pqe(t),_qe,$qe,Dqe,jqe,Fqe(a),Cqe,Nqe(r),kqe(o,i))))},l6=function(){return{additions:{},removals:{},modified:{}}};function Hqe(e){var t=e.registry,r=e.callbacks,n=l6(),o=null,i=function(){o||(r.collectionStarting(),o=requestAnimationFrame(function(){o=null;var u=n,d=u.additions,p=u.removals,m=u.modified,w=Object.keys(d).map(function(O){return t.draggable.getById(O).getDimension(Wr)}).sort(function(O,P){return O.descriptor.index-P.descriptor.index}),A=Object.keys(m).map(function(O){var P=t.droppable.getById(O),$=P.callbacks.getScrollWhileDragging();return{droppableId:O,scroll:$}}),T={additions:w,removals:Object.keys(p),modified:A};n=l6(),r.publish(T)}))},a=function(u){var d=u.descriptor.id;n.additions[d]=u,n.modified[u.descriptor.droppableId]=!0,n.removals[d]&&delete n.removals[d],i()},s=function(u){var d=u.descriptor;n.removals[d.id]=!0,n.modified[d.droppableId]=!0,n.additions[d.id]&&delete n.additions[d.id],i()},c=function(){o&&(cancelAnimationFrame(o),o=null,n=l6())};return{add:a,remove:s,stop:c}}var Ere=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,o=e.width,i=Eo({x:r,y:t},{x:o,y:n}),a={x:Math.max(0,i.x),y:Math.max(0,i.y)};return a},Cre=function(){var e=document.documentElement;return e||rt(!1),e},Pre=function(){var e=Cre(),t=Ere({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},zqe=function(){var e=Sre(),t=Pre(),r=e.y,n=e.x,o=Cre(),i=o.clientWidth,a=o.clientHeight,s=n+i,c=r+a,l=Mi({top:r,left:n,right:s,bottom:c}),u={frame:l,scroll:{initial:e,current:e,max:t,diff:{value:Wr,displacement:Wr}}};return u},Vqe=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,o=zqe(),i=o.scroll.current,a=t.droppable,s=n.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(i,r)}),c=n.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(i)}),l={draggables:tre(c),droppables:ere(s)},u={dimensions:l,critical:t,viewport:o};return u};function kB(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var qqe=function(e,t){var r=null,n=Hqe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(m,w){e.droppable.exists(m)||rt(!1),r&&t.updateDroppableIsEnabled({id:m,isEnabled:w})},i=function(m,w){r&&(e.droppable.exists(m)||rt(!1),t.updateDroppableIsCombineEnabled({id:m,isCombineEnabled:w}))},a=function(m,w){r&&(e.droppable.exists(m)||rt(!1),t.updateDroppableScroll({id:m,newScroll:w}))},s=function(m,w){r&&e.droppable.getById(m).callbacks.scroll(w)},c=function(){if(r){n.stop();var m=r.critical.droppable;e.droppable.getAllByType(m.type).forEach(function(w){return w.callbacks.dragStopped()}),r.unsubscribe(),r=null}},l=function(m){r||rt(!1);var w=r.critical.draggable;m.type==="ADDITION"&&kB(e,w,m.value)&&n.add(m.value),m.type==="REMOVAL"&&kB(e,w,m.value)&&n.remove(m.value)},u=function(m){r&&rt(!1);var w=e.draggable.getById(m.draggableId),A=e.droppable.getById(w.descriptor.droppableId),T={draggable:w.descriptor,droppable:A.descriptor},O=e.subscribe(l);return r={critical:T,unsubscribe:O},Vqe({critical:T,registry:e,scrollOptions:m.scrollOptions})},d={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:c};return d},Are=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},Wqe=function(e){window.scrollBy(e.x,e.y)},Gqe=Vr(function(e){return r_(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),Kqe=function(t,r){var n=Wc(Gqe(r),function(o){return o.frame||rt(!1),fre(o.frame.pageMarginBox)(t)});return n},Yqe=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var o=n[r];return o.frame?o:null}var i=Kqe(t,n);return i},Cc={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Jqe=function(e,t){var r=e[t.size]*Cc.startFromPercentage,n=e[t.size]*Cc.maxScrollAtPercentage,o={startScrollingFrom:r,maxScrollValueAt:n};return o},Ore=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,o=r-t;if(o===0)return 0;var i=n-t,a=i/o;return a},FP=1,Zqe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Cc.maxPixelScroll;if(e===t.startScrollingFrom)return FP;var r=Ore({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,o=Cc.maxPixelScroll*Cc.ease(n);return Math.ceil(o)},$B=Cc.durationDampening.accelerateAt,DB=Cc.durationDampening.stopDampeningAt,Xqe=function(e,t){var r=t,n=DB,o=Date.now(),i=o-r;if(i>=DB)return e;if(i<$B)return FP;var a=Ore({startOfRange:$B,endOfRange:n,current:i}),s=e*Cc.ease(a);return Math.ceil(s)},RB=function(e){var t=e.distanceToEdge,r=e.thresholds,n=e.dragStartTime,o=e.shouldUseTimeDampening,i=Zqe(t,r);return i===0?0:o?Math.max(Xqe(i,n),FP):i},NB=function(e){var t=e.container,r=e.distanceToEdges,n=e.dragStartTime,o=e.axis,i=e.shouldUseTimeDampening,a=Jqe(t,o),s=r[o.end]t.height,i=r.width>t.width;return!i&&!o?n:i&&o?null:{x:i?0:n.x,y:o?0:n.y}},eWe=Xte(function(e){return e===0?0:e}),Ire=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},s=NB({container:r,distanceToEdges:a,dragStartTime:t,axis:IP,shouldUseTimeDampening:i}),c=NB({container:r,distanceToEdges:a,dragStartTime:t,axis:ore,shouldUseTimeDampening:i}),l=eWe({x:c,y:s});if(Ec(l,Wr))return null;var u=Qqe({container:r,subject:n,proposedScroll:l});return u?Ec(u,Wr)?null:u:null},tWe=Xte(function(e){return e===0?0:e>0?1:-1}),jP=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,o=t.change,i=gn(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return Ec(a,Wr)?null:a}}(),Tre=function(t){var r=t.max,n=t.current,o=t.change,i={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},a=tWe(o),s=jP({max:i,current:n,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},LP=function(t,r){return Tre({current:t.scroll.current,max:t.scroll.max,change:r})},rWe=function(t,r){if(!LP(t,r))return null;var n=t.scroll.max,o=t.scroll.current;return jP({current:o,max:n,change:r})},UP=function(t,r){var n=t.frame;return n?Tre({current:n.scroll.current,max:n.scroll.max,change:r}):!1},nWe=function(t,r){var n=t.frame;return!n||!UP(t,r)?null:jP({current:n.scroll.current,max:n.scroll.max,change:r})},oWe=function(e){var t=e.viewport,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=Ire({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i});return a&&LP(t,a)?a:null},iWe=function(e){var t=e.droppable,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=Ire({dragStartTime:o,container:a.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i});return s&&UP(t,s)?s:null},BB=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id],c=s.page.marginBox;if(t.isWindowScrollAllowed){var l=t.viewport,u=oWe({dragStartTime:r,viewport:l,subject:c,center:a,shouldUseTimeDampening:n});if(u){o(u);return}}var d=Yqe({center:a,destination:Oo(t.impact),droppables:t.dimensions.droppables});if(d){var p=iWe({dragStartTime:r,droppable:d,subject:c,center:a,shouldUseTimeDampening:n});p&&i(d.descriptor.id,p)}},aWe=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=y0(t),o=y0(r),i=null,a=function(u){i||rt(!1);var d=i,p=d.shouldUseTimeDampening,m=d.dragStartTime;BB({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:m,shouldUseTimeDampening:p})},s=function(u){i&&rt(!1);var d=Date.now(),p=!1,m=function(){p=!0};BB({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:m,scrollDroppable:m}),i={dragStartTime:d,shouldUseTimeDampening:p},p&&a(u)},c=function(){i&&(n.cancel(),o.cancel(),i=null)};return{start:s,stop:c,scroll:a}},sWe=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,o=function(l,u){var d=gn(l.current.client.selection,u);t({client:d})},i=function(l,u){if(!UP(l,u))return u;var d=nWe(l,u);if(!d)return r(l.descriptor.id,u),null;var p=Eo(u,d);r(l.descriptor.id,p);var m=Eo(u,p);return m},a=function(l,u,d){if(!l||!LP(u,d))return d;var p=rWe(u,d);if(!p)return n(d),null;var m=Eo(d,p);n(m);var w=Eo(d,m);return w},s=function(l){var u=l.scrollJumpRequest;if(u){var d=Oo(l.impact);d||rt(!1);var p=i(l.dimensions.droppables[d],u);if(p){var m=l.viewport,w=a(l.isWindowScrollAllowed,m,p);w&&o(l,w)}}};return s},cWe=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,o=aWe({scrollWindow:r,scrollDroppable:t}),i=sWe({move:n,scrollWindow:r,scrollDroppable:t}),a=function(l){if(l.phase==="DRAGGING"){if(l.movementMode==="FLUID"){o.scroll(l);return}l.scrollJumpRequest&&i(l)}},s={scroll:a,start:o.start,stop:o.stop};return s},pd="data-rbd",gd=function(){var e=pd+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),hE=function(){var e=pd+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),lWe=function(){var e=pd+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),FB={contextId:pd+"-scroll-container-context-id"},uWe=function(t){return function(r){return"["+r+'="'+t+'"]'}},Vh=function(t,r){return t.map(function(n){var o=n.styles[r];return o?n.selector+" { "+o+" }":""}).join(" ")},fWe="pointer-events: none;",dWe=function(e){var t=uWe(e),r=function(){var s=` + cursor: -webkit-grab; + cursor: grab; + `;return{selector:t(gd.contextId),styles:{always:` + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + touch-action: manipulation; + `,resting:s,dragging:fWe,dropAnimating:s}}}(),n=function(){var s=` + transition: `+kp.outOfTheWay+`; + `;return{selector:t(hE.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),o={selector:t(lWe.contextId),styles:{always:"overflow-anchor: none;"}},i={selector:"body",styles:{dragging:` + cursor: grabbing; + cursor: -webkit-grabbing; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + overflow-anchor: none; + `}},a=[n,r,o,i];return{always:Vh(a,"always"),resting:Vh(a,"resting"),dragging:Vh(a,"dragging"),dropAnimating:Vh(a,"dropAnimating"),userCancel:Vh(a,"userCancel")}},Io=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?z.useLayoutEffect:z.useEffect,u6=function(){var t=document.querySelector("head");return t||rt(!1),t},jB=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function hWe(e,t){var r=It(function(){return dWe(e)},[e]),n=z.useRef(null),o=z.useRef(null),i=pt(Vr(function(d){var p=o.current;p||rt(!1),p.textContent=d}),[]),a=pt(function(d){var p=n.current;p||rt(!1),p.textContent=d},[]);Io(function(){!n.current&&!o.current||rt(!1);var d=jB(t),p=jB(t);return n.current=d,o.current=p,d.setAttribute(pd+"-always",e),p.setAttribute(pd+"-dynamic",e),u6().appendChild(d),u6().appendChild(p),a(r.always),i(r.resting),function(){var m=function(A){var T=A.current;T||rt(!1),u6().removeChild(T),A.current=null};m(n),m(o)}},[t,a,i,r.always,r.resting,e]);var s=pt(function(){return i(r.dragging)},[i,r.dragging]),c=pt(function(d){if(d==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),l=pt(function(){o.current&&i(r.resting)},[i,r.resting]),u=It(function(){return{dragging:s,dropping:c,resting:l}},[s,c,l]);return u}var Mre=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function a_(e){return e instanceof Mre(e).HTMLElement}function pWe(e,t){var r="["+gd.contextId+'="'+e+'"]',n=Qte(document.querySelectorAll(r));if(!n.length)return null;var o=Wc(n,function(i){return i.getAttribute(gd.draggableId)===t});return!o||!a_(o)?null:o}function gWe(e){var t=z.useRef({}),r=z.useRef(null),n=z.useRef(null),o=z.useRef(!1),i=pt(function(p,m){var w={id:p,focus:m};return t.current[p]=w,function(){var T=t.current,O=T[p];O!==w&&delete T[p]}},[]),a=pt(function(p){var m=pWe(e,p);m&&m!==document.activeElement&&m.focus()},[e]),s=pt(function(p,m){r.current===p&&(r.current=m)},[]),c=pt(function(){n.current||o.current&&(n.current=requestAnimationFrame(function(){n.current=null;var p=r.current;p&&a(p)}))},[a]),l=pt(function(p){r.current=null;var m=document.activeElement;m&&m.getAttribute(gd.draggableId)===p&&(r.current=p)},[]);Io(function(){return o.current=!0,function(){o.current=!1;var p=n.current;p&&cancelAnimationFrame(p)}},[]);var u=It(function(){return{register:i,tryRecordFocus:l,tryRestoreFocusRecorded:c,tryShiftRecord:s}},[i,l,c,s]);return u}function mWe(){var e={draggables:{},droppables:{}},t=[];function r(d){return t.push(d),function(){var m=t.indexOf(d);m!==-1&&t.splice(m,1)}}function n(d){t.length&&t.forEach(function(p){return p(d)})}function o(d){return e.draggables[d]||null}function i(d){var p=o(d);return p||rt(!1),p}var a={register:function(p){e.draggables[p.descriptor.id]=p,n({type:"ADDITION",value:p})},update:function(p,m){var w=e.draggables[m.descriptor.id];w&&w.uniqueId===p.uniqueId&&(delete e.draggables[m.descriptor.id],e.draggables[p.descriptor.id]=p)},unregister:function(p){var m=p.descriptor.id,w=o(m);w&&p.uniqueId===w.uniqueId&&(delete e.draggables[m],n({type:"REMOVAL",value:p}))},getById:i,findById:o,exists:function(p){return!!o(p)},getAllByType:function(p){return Vb(e.draggables).filter(function(m){return m.descriptor.type===p})}};function s(d){return e.droppables[d]||null}function c(d){var p=s(d);return p||rt(!1),p}var l={register:function(p){e.droppables[p.descriptor.id]=p},unregister:function(p){var m=s(p.descriptor.id);m&&p.uniqueId===m.uniqueId&&delete e.droppables[p.descriptor.id]},getById:c,findById:s,exists:function(p){return!!s(p)},getAllByType:function(p){return Vb(e.droppables).filter(function(m){return m.descriptor.type===p})}};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:l,subscribe:r,clean:u}}function vWe(){var e=It(mWe,[]);return z.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var HP=fe.createContext(null),Wb=function(){var e=document.body;return e||rt(!1),e},yWe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},bWe=function(t){return"rbd-announcement-"+t};function wWe(e){var t=It(function(){return bWe(e)},[e]),r=z.useRef(null);z.useEffect(function(){var i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),bt(i.style,yWe),Wb().appendChild(i),function(){setTimeout(function(){var c=Wb();c.contains(i)&&c.removeChild(i),i===r.current&&(r.current=null)})}},[t]);var n=pt(function(o){var i=r.current;if(i){i.textContent=o;return}},[]);return n}var _We=0,xWe={separator:"::"};function zP(e,t){return t===void 0&&(t=xWe),It(function(){return""+e+t.separator+_We++},[t.separator,e])}function SWe(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function EWe(e){var t=e.contextId,r=e.text,n=zP("hidden-text",{separator:"-"}),o=It(function(){return SWe({contextId:t,uniqueId:n})},[n,t]);return z.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=r,a.style.display="none",Wb().appendChild(a),function(){var c=Wb();c.contains(a)&&c.removeChild(a)}},[o,r]),o}var s_=fe.createContext(null);function kre(e){var t=z.useRef(e);return z.useEffect(function(){t.current=e}),t}function CWe(){var e=null;function t(){return!!e}function r(a){return a===e}function n(a){e&&rt(!1);var s={abandon:a};return e=s,s}function o(){e||rt(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}var PWe=9,AWe=13,VP=27,$re=32,OWe=33,IWe=34,TWe=35,MWe=36,kWe=37,$We=38,DWe=39,RWe=40,qm,NWe=(qm={},qm[AWe]=!0,qm[PWe]=!0,qm),Dre=function(e){NWe[e.keyCode]&&e.preventDefault()},c_=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=Wc(t,function(n){return"on"+n in document});return r||e}(),Rre=0,LB=5;function BWe(e,t){return Math.abs(t.x-e.x)>=LB||Math.abs(t.y-e.y)>=LB}var UB={type:"IDLE"};function FWe(e){var t=e.cancel,r=e.completed,n=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,c=a.clientX,l=a.clientY;if(s===Rre){var u={x:c,y:l},d=n();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(u);return}d.type!=="PENDING"&&rt(!1);var p=d.point;if(BWe(p,u)){a.preventDefault();var m=d.actions.fluidLift(u);o({type:"DRAGGING",actions:m})}}}},{eventName:"mouseup",fn:function(a){var s=n();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(a){n().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var s=n();if(s.type==="PENDING"){t();return}if(a.keyCode===VP){a.preventDefault(),t();return}Dre(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=n();if(s.type==="IDLE"&&rt(!1),s.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:c_,fn:t}]}function jWe(e){var t=z.useRef(UB),r=z.useRef(Sc),n=It(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===Rre&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var p=e.findClosestDraggableId(d);if(p){var m=e.tryGetLock(p,a,{sourceEvent:d});if(m){d.preventDefault();var w={x:d.clientX,y:d.clientY};r.current(),l(m,w)}}}}}},[e]),o=It(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var p=e.findClosestDraggableId(d);if(p){var m=e.findOptionsForDraggable(p);m&&(m.shouldRespectForcePress||e.canGetLock(p)&&d.preventDefault())}}}}},[e]),i=pt(function(){var d={passive:!1,capture:!0};r.current=ti(window,[o,n],d)},[o,n]),a=pt(function(){var u=t.current;u.type!=="IDLE"&&(t.current=UB,r.current(),i())},[i]),s=pt(function(){var u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),c=pt(function(){var d={capture:!0,passive:!1},p=FWe({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(w){t.current=w}});r.current=ti(window,p,d)},[s,a]),l=pt(function(d,p){t.current.type!=="IDLE"&&rt(!1),t.current={type:"PENDING",point:p,actions:d},c()},[c]);Io(function(){return i(),function(){r.current()}},[i])}var Uu;function LWe(){}var UWe=(Uu={},Uu[IWe]=!0,Uu[OWe]=!0,Uu[MWe]=!0,Uu[TWe]=!0,Uu);function HWe(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===VP){i.preventDefault(),r();return}if(i.keyCode===$re){i.preventDefault(),n();return}if(i.keyCode===RWe){i.preventDefault(),e.moveDown();return}if(i.keyCode===$We){i.preventDefault(),e.moveUp();return}if(i.keyCode===DWe){i.preventDefault(),e.moveRight();return}if(i.keyCode===kWe){i.preventDefault(),e.moveLeft();return}if(UWe[i.keyCode]){i.preventDefault();return}Dre(i)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:c_,fn:r}]}function zWe(e){var t=z.useRef(LWe),r=It(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==$re)return;var a=e.findClosestDraggableId(i);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();var c=!0,l=s.snapLift();t.current();function u(){c||rt(!1),c=!1,t.current(),n()}t.current=ti(window,HWe(l,u),{capture:!0,passive:!1})}}},[e]),n=pt(function(){var i={passive:!1,capture:!0};t.current=ti(window,[r],i)},[r]);Io(function(){return n(),function(){t.current()}},[n])}var f6={type:"IDLE"},VWe=120,qWe=.15;function WWe(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.keyCode===VP&&o.preventDefault(),t()}},{eventName:c_,fn:t}]}function GWe(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var s=i.touches[0],c=s.clientX,l=s.clientY,u={x:c,y:l};i.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=n();a.type==="IDLE"&&rt(!1);var s=i.touches[0];if(s){var c=s.force>=qWe;if(c){var l=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){l&&t();return}if(l){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:c_,fn:t}]}function KWe(e){var t=z.useRef(f6),r=z.useRef(Sc),n=pt(function(){return t.current},[]),o=pt(function(m){t.current=m},[]),i=It(function(){return{eventName:"touchstart",fn:function(m){if(!m.defaultPrevented){var w=e.findClosestDraggableId(m);if(w){var A=e.tryGetLock(w,s,{sourceEvent:m});if(A){var T=m.touches[0],O=T.clientX,P=T.clientY,$={x:O,y:P};r.current(),d(A,$)}}}}}},[e]),a=pt(function(){var m={capture:!0,passive:!1};r.current=ti(window,[i],m)},[i]),s=pt(function(){var p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),o(f6),r.current(),a())},[a,o]),c=pt(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),l=pt(function(){var m={capture:!0,passive:!1},w={cancel:c,completed:s,getPhase:n},A=ti(window,GWe(w),m),T=ti(window,WWe(w),m);r.current=function(){A(),T()}},[c,n,s]),u=pt(function(){var m=n();m.type!=="PENDING"&&rt(!1);var w=m.actions.fluidLift(m.point);o({type:"DRAGGING",actions:w,hasMoved:!1})},[n,o]),d=pt(function(m,w){n().type!=="IDLE"&&rt(!1);var A=setTimeout(u,VWe);o({type:"PENDING",point:w,actions:m,longPressTimerId:A}),l()},[l,n,o,u]);Io(function(){return a(),function(){r.current();var w=n();w.type==="PENDING"&&(clearTimeout(w.longPressTimerId),o(f6))}},[n,a,o]),Io(function(){var m=ti(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return m},[])}var YWe={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Nre(e,t){if(t==null)return!1;var r=!!YWe[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:Nre(e,t.parentElement)}function JWe(e,t){var r=t.target;return a_(r)?Nre(e,r):!1}var ZWe=function(e){return Mi(e.getBoundingClientRect()).center};function XWe(e){return e instanceof Mre(e).Element}var QWe=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=Wc(t,function(n){return n in Element.prototype});return r||e}();function Bre(e,t){return e==null?null:e[QWe](t)?e:Bre(e.parentElement,t)}function eGe(e,t){return e.closest?e.closest(t):Bre(e,t)}function tGe(e){return"["+gd.contextId+'="'+e+'"]'}function rGe(e,t){var r=t.target;if(!XWe(r))return null;var n=tGe(e),o=eGe(r,n);return!o||!a_(o)?null:o}function nGe(e,t){var r=rGe(e,t);return r?r.getAttribute(gd.draggableId):null}function oGe(e,t){var r="["+hE.contextId+'="'+e+'"]',n=Qte(document.querySelectorAll(r)),o=Wc(n,function(i){return i.getAttribute(hE.id)===t});return!o||!a_(o)?null:o}function iGe(e){e.preventDefault()}function Wm(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function Fre(e){var t=e.lockAPI,r=e.store,n=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=n.draggable.findById(o);return!(!i||!i.options.isEnabled||!Are(r.getState(),o))}function aGe(e){var t=e.lockAPI,r=e.contextId,n=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,c=Fre({lockAPI:t,store:n,registry:o,draggableId:i});if(!c)return null;var l=o.draggable.getById(i),u=oGe(r,l.descriptor.id);if(!u||s&&!l.options.canDragInteractiveElements&&JWe(u,s))return null;var d=t.claim(a||Sc),p="PRE_DRAG";function m(){return l.options.shouldRespectForcePress}function w(){return t.isActive(d)}function A(I,b){Wm({expected:I,phase:p,isLockActive:w,shouldWarn:!0})&&n.dispatch(b())}var T=A.bind(null,"DRAGGING");function O(I){function b(){t.release(),p="COMPLETED"}p!=="PRE_DRAG"&&(b(),p!=="PRE_DRAG"&&rt(!1)),n.dispatch(QVe(I.liftActionArgs)),p="DRAGGING";function N(V,Z){if(Z===void 0&&(Z={shouldBlockNextClick:!1}),I.cleanup(),Z.shouldBlockNextClick){var q=ti(window,[{eventName:"click",fn:iGe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(q)}b(),n.dispatch(wre({reason:V}))}return bt({isActive:function(){return Wm({expected:"DRAGGING",phase:p,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:m,drop:function(Z){return N("DROP",Z)},cancel:function(Z){return N("CANCEL",Z)}},I.actions)}function P(I){var b=y0(function(V){T(function(){return bre({client:V})})}),N=O({liftActionArgs:{id:i,clientSelection:I,movementMode:"FLUID"},cleanup:function(){return b.cancel()},actions:{move:b}});return bt({},N,{move:b})}function $(){var I={moveUp:function(){return T(cqe)},moveRight:function(){return T(uqe)},moveDown:function(){return T(lqe)},moveLeft:function(){return T(fqe)}};return O({liftActionArgs:{id:i,clientSelection:ZWe(u),movementMode:"SNAP"},cleanup:Sc,actions:I})}function R(){var I=Wm({expected:"PRE_DRAG",phase:p,isLockActive:w,shouldWarn:!0});I&&t.release()}var j={isActive:function(){return Wm({expected:"PRE_DRAG",phase:p,isLockActive:w,shouldWarn:!1})},shouldRespectForcePress:m,fluidLift:P,snapLift:$,abort:R};return j}var sGe=[jWe,zWe,KWe];function cGe(e){var t=e.contextId,r=e.store,n=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?sGe:[],o||[]),s=z.useState(function(){return CWe()})[0],c=pt(function(P,$){P.isDragging&&!$.isDragging&&s.tryAbandon()},[s]);Io(function(){var P=r.getState(),$=r.subscribe(function(){var R=r.getState();c(P,R),P=R});return $},[s,r,c]),Io(function(){return s.tryAbandon},[s.tryAbandon]);for(var l=pt(function(O){return Fre({lockAPI:s,registry:n,store:r,draggableId:O})},[s,n,r]),u=pt(function(O,P,$){return aGe({lockAPI:s,registry:n,contextId:t,store:r,draggableId:O,forceSensorStop:P,sourceEvent:$&&$.sourceEvent?$.sourceEvent:null})},[t,s,n,r]),d=pt(function(O){return nGe(t,O)},[t]),p=pt(function(O){var P=n.draggable.findById(O);return P?P.options:null},[n.draggable]),m=pt(function(){s.isClaimed()&&(s.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch(DP()))},[s,r]),w=pt(s.isClaimed,[s]),A=It(function(){return{canGetLock:l,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:p,tryReleaseLock:m,isLockClaimed:w}},[l,u,d,p,m,w]),T=0;Tr.name!==e)))}function Wre(e){return Gd().find(r=>r.name===e)!==void 0}function Gre(e){return ot.isHexString(e)&&e.length===66}function iKe(e){return ot.isHexString(e)&&e.length===128}function l_(e){const t=e.pubkeys.map(i=>{const a=ot.hexToBinUnsafe(i.pubkey);return A2.blake2b(a,void 0,32)}),r=e.pubkeys.length,n=[Uint8Array.from([1]),ot.encodeI256(BigInt(r))].concat(t).concat([ot.encodeI256(BigInt(e.mOfN))]),o=Uint8Array.from(n.reduce((i,a)=>Uint8Array.from([...i,...a]),new Uint8Array));return ot.bs58.encode(o)}function Kre(){return Gd()}function GP(e){const t=Gd().find(r=>r.name===e);if(t===void 0)throw new Error(`The multisig ${e} does not exist`);return t}function aKe(e){const t=Z2(),[r,n]=z.useState();return z.useEffect(()=>{e!==void 0&&t.addresses.getAddressesAddressBalance(e).then(n).catch(o=>{console.error(`Get balance error: ${o}`)})},[e]),r}function sKe(e,t){var n,o;if(e===void 0||t===void 0)return"";const r=t.id===ot.ALPH_TOKEN_ID?e.balance:(o=(n=e.tokenBalances)==null?void 0:n.find(i=>i.id===t.id))==null?void 0:o.amount;return r===void 0?"":ot.prettifyTokenAmount(r,t.decimals)}function cKe(e){return e.length===64&&ot.isHexString(e)}async function lKe(e,t,r,n){const o=await e.addresses.getAddressesAddressBalance(t);r.forEach((i,a)=>{var d,p,m,w;const s=a===ot.ALPH_TOKEN_ID?o.lockedBalance:((p=(d=o.lockedTokenBalances)==null?void 0:d.find(A=>A.id===a))==null?void 0:p.amount)??0n,c=a===ot.ALPH_TOKEN_ID?o.balance:((w=(m=o.tokenBalances)==null?void 0:m.find(A=>A.id===a))==null?void 0:w.amount)??0n,l=BigInt(c)-BigInt(s),u=n.find(A=>A.id===a);if(li.pubkeys.find(u=>u.name===l).pubkey),s=new Map,c=n.map(l=>{if(l.tokenId===""||l.tokenAmount===void 0)throw new Error("Please input the amount");const u=o.find(m=>m.id===l.tokenId),d=ot.convertAmountWithDecimals(l.tokenAmount,u.decimals),p=s.get(l.tokenId);if(p===void 0?s.set(l.tokenId,d):s.set(l.tokenId,d+p),l.tokenId!==ot.ALPH_TOKEN_ID){const m=s.get(ot.ALPH_TOKEN_ID);return m===void 0?s.set(ot.ALPH_TOKEN_ID,ot.DUST_AMOUNT):s.set(ot.ALPH_TOKEN_ID,m+ot.DUST_AMOUNT),{address:l.address,attoAlphAmount:ot.DUST_AMOUNT.toString(),tokens:[{id:l.tokenId,amount:d.toString()}]}}else return{address:l.address,attoAlphAmount:d.toString()}});return await lKe(e,i.address,s,o),await e.multisig.postMultisigBuild({fromAddress:i.address,fromPublicKeys:a,destinations:c})}async function fKe(e,t,r,n){const o=GP(t);if(r.length!==o.mOfN)throw new Error(`Please select ${o.mOfN} signers`);const i=r.map(l=>o.pubkeys.find(u=>u.name===l).pubkey),s=(await e.multisig.postMultisigSweep({fromAddress:o.address,fromPublicKeys:i,toAddress:n})).unsignedTxs[0].unsignedTx,c=await e.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:s});return[s,c]}async function dKe(e,t){const r=await e.getSelectedAccount(),{signature:n}=await e.signUnsignedTx({signerAddress:r.address,signerKeyType:r.keyType,unsignedTx:t});return{signer:r.publicKey,signature:n}}async function hKe(e,t,r,n,o){const i=GP(t);if(o.length!==i.mOfN)throw new Error(`Expect ${i.mOfN} signatures`);const a=ot.binToHex(A2.blake2b(ot.hexToBinUnsafe(n),void 0,32)),s=o.map(l=>{const u=i.pubkeys.find(d=>d.name===l.name).pubkey;return{name:l.name,pubkey:u,signature:l.signature}}),c=Array(i.pubkeys.length).fill("");return s.forEach(l=>{const u=i.pubkeys.findIndex(d=>d.pubkey===l.pubkey);if(u===-1)throw new Error(`Unknown signer: ${l.name}`);if(pKe(i,r,a,l,l.signature),c[u]!=="")throw new Error(`Duplicate signature from signer ${l.name}`);c[u]=l.signature}),await e.multisig.postMultisigSubmit({unsignedTx:n,signatures:c.filter(l=>l!=="")})}function pKe(e,t,r,n,o){if(ot.verifySignature(r,n.pubkey,o))return;throw t.map(a=>e.pubkeys.find(s=>s.name===a)).forEach(a=>{if(a.pubkey!==n.pubkey&&ot.verifySignature(r,a.pubkey,o))throw new Error(`The signature ${GB(o)} is from ${a.name}, not ${n.name}`)}),new Error(`Invalid signature ${GB(o)}`)}function GB(e){return`${e.slice(0,6)}...${e.slice(-6)}`}async function Yre(e,t,r=30){try{await e.transactions.getTransactionsTransactionHash(t);return}catch(n){if(console.error(`Get transaction status error: ${n}`),r===0)throw n}await new Promise(n=>setTimeout(n,4e3)),await Yre(e,t,r-1)}function gKe(e){const t={...e};delete t.address;const r=JSON.stringify(t),n=ot.binToHex(A2.blake2b(r,void 0,32));return btoa(r+n)}function mKe(e){const t=atob(e);if(t.length<=64)throw new Error("Invalid config");const r=t.length-64,n=t.slice(r),o=t.slice(0,r),i=ot.binToHex(A2.blake2b(o,void 0,32));if(n!==i)throw new Error("Invalid config hash");return vKe(JSON.parse(o))}function vKe(e){const t=e.name;if(t===void 0||t==="")throw new Error("Invalid config name");if(Wre(t))throw new Error("The multisig already exists");const r=e.pubkeys;if(r===void 0||!Array.isArray(r))throw new Error("Expected a non-empty pubkey array");const n=r.length;if(n===0)throw new Error("The pubkey list is empty");r.forEach((i,a)=>{const s=i.name;if(s===void 0||s==="")throw new Error(`Invalid name in the pubkeys list, index: ${a}`);const c=i.pubkey;if(c===void 0||!Gre(c))throw new Error(`Invalid pubkey in the pubkeys list, index: ${a}`)});const o=e.mOfN;if(o===void 0||typeof o!="number")throw new Error("Invalid mOfN");if(o<1||o>n)throw new Error("Invalid value of mOfN");return e}function KB(e){const t=e.indexOf("."),r=e.lastIndexOf(".");return parseInt(e.slice(t+1,r))}function yKe(){const e=z.useMemo(()=>{const a=window.localStorage.getItem(kv);if(a)try{return JSON.parse(a)}catch{console.log("Failed to parse stored value")}return mE},[]),t=_P({validateInputOnChange:[`pubkeys.${vf}.pubkey`],initialValues:e,validate:{name:a=>a===""?"Empty name":Wre(a)?"The multisig already exists":null,pubkeys:{pubkey:(a,s,c)=>{if(a==="")return"Empty public key";if(!Gre(a))return"Invalid public key";const l=s.pubkeys.findIndex(u=>u.pubkey===a);return KB(c)!==l?"Duplicate public key":null},name:(a,s,c)=>{if(a==="")return"Empty name";const l=s.pubkeys.findIndex(u=>u.name===a);return KB(c)!==l?"Duplicate name":null}}}}),r=z.useRef(),n=V0();z.useEffect(()=>{window.localStorage.setItem(kv,JSON.stringify(t.values))},[t.values]),z.useEffect(()=>{t.values.pubkeys.lengtht.onSubmit(a=>{const s={...a,address:l_(a)};window.localStorage.setItem(kv,JSON.stringify(s)),qre(s),rKe(),n("/multisig/show?name="+a.name)}),[t,n]);console.log("form.values",t.values);const i=t.values.pubkeys.map((a,s)=>G.jsx(JGe,{index:s,draggableId:s.toString(),children:c=>G.jsxs(Ut,{position:"apart",spacing:"xl",ref:c.innerRef,mt:"xs",...c.draggableProps,children:[G.jsx(j0,{...c.dragHandleProps,children:G.jsx(L6e,{size:"1.2rem"})}),G.jsx(ma,{radius:"md",placeholder:"Name",ta:"left",...t.getInputProps(`pubkeys.${s}.name`)}),G.jsx(ma,{radius:"md",placeholder:"Public Key",w:"32rem",ta:"left",...t.getInputProps(`pubkeys.${s}.pubkey`)}),G.jsx(U0,{label:"Remove Signer",disabled:t.values.pubkeys.length===1,children:G.jsx(q6e,{size:"1.2rem",onClick:()=>t.values.pubkeys.length!==1&&t.removeListItem("pubkeys",s)})})]})},s));return G.jsx(at,{maw:900,mx:"auto",mt:"5rem",children:G.jsxs("form",{onSubmit:o,children:[G.jsxs(Ut,{position:"center",children:[G.jsx(St,{fw:"700",size:"xl",children:"Choose a Name"}),G.jsx(ma,{placeholder:"Multisig Name",ta:"left",size:"md",...t.getInputProps("name")})]}),G.jsxs(Df,{mt:"2rem",px:"2rem",py:"1.5rem",children:[G.jsx(St,{ta:"left",fw:"700",children:"Signers"}),G.jsx(hGe,{onDragEnd:({destination:a,source:s})=>t.reorderListItem("pubkeys",{from:s.index,to:a.index}),children:G.jsx(Vre,{droppableId:"dnd-list",direction:"vertical",children:a=>G.jsxs("div",{...a.droppableProps,ref:a.innerRef,children:[i,a.placeholder]})})}),G.jsxs(Ut,{position:"apart",mt:"lg",children:[G.jsx(_r,{variant:"light",radius:"md",onClick:()=>t.setValues(mE),children:"Reset Signers"}),G.jsx(_r,{variant:"light",radius:"md",onClick:()=>t.insertListItem("pubkeys",{name:"",pubkey:""}),children:"Add Signer"})]})]}),G.jsxs(Df,{mt:"xl",px:"2rem",py:"1.5rem",children:[G.jsx(St,{weight:700,ta:"left",children:"Signatures Required"}),G.jsxs(Ut,{position:"apart",children:[G.jsx(nW,{mt:xe("2.5rem"),w:"70%",pb:"md",px:"md",min:0,max:t.values.pubkeys.length,step:1,value:t.values.mOfN,label:a=>`${a} of ${t.values.pubkeys.length}`,labelAlwaysOn:!0,thumbSize:1,styles:a=>({label:{backgroundColor:a.colorScheme==="dark"?a.colors.dark[3]:a.colors.blue[3]}})}),G.jsxs(Ut,{spacing:5,mt:"md",children:[G.jsx(m1,{size:36,variant:"default",onClick:()=>r.current.decrement(),children:"–"}),G.jsx(t0,{hideControls:!0,value:t.values.mOfN,size:"xs",onChange:a=>t.setValues({mOfN:a!==""?a:1}),handlersRef:r,max:t.values.pubkeys.length,min:1,step:1,styles:{input:{width:xe(54),textAlign:"center"}}}),G.jsx(m1,{size:36,variant:"default",onClick:()=>r.current.increment(),children:"+"})]})]})]}),G.jsx(Ut,{position:"right",mt:"xl",mx:"lg",children:G.jsx(_r,{type:"submit",children:"Create Multisig"})})]})})}function bKe(){const[e,t]=z.useState(),[r,n]=z.useState(),o=V0(),i=z.useCallback(()=>{r!==void 0&&(qre({...r,address:l_(r)}),o("/multisig/show?name="+r.name))},[r,o]),a=z.useCallback(s=>{if(t(void 0),s===""){t("Please input the configuration");return}try{n(mKe(s))}catch(c){t(`${c}`)}},[n,t]);return G.jsxs(at,{maw:800,mx:"auto",mt:"5rem",children:[G.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Multisig Configuration"}),G.jsx(ga.Description,{ta:"left",size:"md",children:"You can import the multisig configuration shared by the creator of the multisig address."}),G.jsx(oC,{placeholder:"Paste the configuration here",minRows:8,mt:"lg",onChange:s=>a(s.target.value)}),e?G.jsx(St,{color:"red",mt:"md",ta:"right",children:e}):null,G.jsxs(Ut,{position:"right",mt:"lg",children:[G.jsx("div",{style:{flex:1}}),G.jsx(_r,{onClick:i,disabled:e!==void 0||r===void 0,children:"Import Multisig"})]})]})}function wKe(){const e=Kre(),t=Ed(),r=new URLSearchParams(t.search),n=r.get("name");if(console.log(t.search,r,n),n){const o=e.find(i=>i.name===n);return o===void 0?[e,n,void 0]:[e,n,o]}else return[e,void 0,void 0]}function _Ke(){const[e,t,r]=wKe(),[n,{open:o,close:i}]=lU(!1),{account:a}=J2(),s=V0();return G.jsxs(at,{maw:850,mx:"auto",mt:"5rem",ta:"left",children:[G.jsxs(Ut,{position:"center",children:[G.jsx(St,{fw:"700",size:"xl",children:"Select Multisig"}),G.jsx(jy,{size:"md",placeholder:"Pick one",data:e.map(c=>({value:c.name,label:c.name})),value:t,onChange:c=>s("/multisig/show?name="+c)})]}),G.jsxs(Ss,{opened:n,onClose:i,withCloseButton:!1,styles:{inner:{right:0}},children:[G.jsxs(T4,{icon:G.jsx(k6e,{size:"1rem"}),title:"Attention!",color:"red",mt:"lg",children:["This action will remove multisig ",G.jsx(rC,{children:t})," from your browser. You will need to re-import the configuration to use it again."]}),G.jsx(Ut,{position:"center",mt:"lg",children:G.jsx(_r,{color:"red",onClick:()=>{i(),t&&(oKe(t),s("/multisig/show"))},children:"Confirm"})})]}),t&&r&&G.jsxs(at,{mx:"auto",mt:"2rem",w:"100%",children:[G.jsx(X2,{data:{Address:G.jsx(Ut,{position:"center",mx:"auto",children:G.jsx(xc,{value:l_(r)})}),"Number of Signers":r.pubkeys.length,"Required Signers":r.mOfN,Signers:G.jsx(mc,{children:r.pubkeys.map(({name:c,pubkey:l})=>{const u=ot.addressFromPublicKey(l);return[G.jsx(mc.Col,{span:2,children:G.jsx(H0,{h:"100%",children:G.jsxs(St,{fw:"450",my:"auto",ta:"right",children:[c,":"]})})},c),G.jsx(mc.Col,{span:10,children:G.jsx(xc,{value:u,color:(a==null?void 0:a.address)===u?"yellow":void 0})},l)]})})}}),G.jsxs(Ut,{position:"apart",mt:"2rem",mx:"lg",children:[G.jsx(_r,{onClick:o,children:"Remove"}),G.jsx(Rw,{value:gKe(r),timeout:1e3,children:({copied:c,copy:l})=>G.jsx(U0,{label:c?"Copied":null,opened:c,withArrow:!0,children:G.jsx(_r,{onClick:l,children:"Export"})})})]})]})]})}function xKe(){const[e,t]=z.useState(),[r,n]=z.useState(),[o,i]=z.useState(!1),[a,s]=z.useState(),[c,l]=z.useState(),[u,d]=z.useState(),{account:p,signer:m,connectionStatus:w}=J2(),[A,T]=z.useState(),O=Z2(),P=z.useCallback(async b=>{try{if(i(!0),!ot.isHexString(b))throw new Error("Invalid unsigned tx");const N=await CKe(O,b),V=EKe(N.unsignedTx.inputs[0].unlockScript),Z=N.unsignedTx.fixedOutputs[0],q=SKe(V);l(V),s(q),d({recipient:Z.address,amount:ot.prettifyAttoAlphAmount(BigInt(Z.attoAlphAmount)),fee:ot.prettifyAttoAlphAmount(BigInt(N.unsignedTx.gasPrice)*BigInt(N.unsignedTx.gasAmount)),txId:N.unsignedTx.txId}),i(!1),T(void 0)}catch(N){i(!1),T(`Error: ${N}`),console.error(N)}},[s,i]),[$,R]=z.useState();z.useEffect(()=>{R(void 0)},[p]);const j=z.useCallback(async()=>{try{if(r===void 0||!ot.isHexString(r))throw new Error("Invalid unsigned tx");if(w!=="connected")throw new Error("Wallet is not connected");if(c!==void 0&&c.find(N=>N.pubkey===p.publicKey)===void 0)throw new Error("The currently connected account is not the expected signer");const b=await dKe(m,r);t(b)}catch(b){R(`Error: ${b}`),console.error(b)}},[r,t,c,m,p,w]),I=z.useCallback(()=>{i(!1),t(void 0),s(void 0),d(void 0),T(void 0),R(void 0),l(void 0)},[i,t,s]);return G.jsxs(at,{maw:900,mx:"auto",mt:"5rem",children:[G.jsx(St,{ta:"left",fw:"700",size:"xl",children:"Transaction to sign"}),G.jsx(ga.Description,{ta:"left",size:"md",children:"The transaction must be created by the multisig address."}),G.jsx(oC,{placeholder:"Paste your multisig transaction here",minRows:6,mt:"md",value:r??"",onChange:b=>{I(),b.target.value===""?n(void 0):(n(b.target.value),P(b.target.value))},styles:{input:{color:"gray",opacity:.9}}}),A?G.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:A}):o||!r?null:G.jsxs(at,{mt:"xl",children:[G.jsx(St,{ta:"left",fw:"700",mb:"lg",children:"Transaction Details"}),G.jsx(X2,{px:0,py:0,verticalSpacing:"sm",data:{Multisig:a?G.jsx(yx,{href:`/alephium-toolkit/#/multisig/show?name=${a.name}`,target:"_blank",children:a.name}):G.jsx(rC,{color:"red",children:"unknown"}),Recipient:G.jsx(xc,{value:(u==null?void 0:u.recipient)??""}),"ALPH Amount":(u==null?void 0:u.amount)+" ALPH","Transaction Fee":(u==null?void 0:u.fee)+" ALPH","Transaction Hash":G.jsx(xc,{value:(u==null?void 0:u.txId)??""})}})]}),$&&G.jsx(St,{color:"red",mt:"md",mx:"lg",ta:"left",children:$}),e?G.jsxs(at,{children:[G.jsx(St,{ta:"left",fw:"700",mt:"xl",children:"Copy and share the signature:"}),G.jsx(Ut,{position:"apart",mt:"md",children:G.jsx(xc,{value:e.signature})})]}):G.jsxs(Ut,{position:"apart",mt:"xl",mx:"md",children:[G.jsx(_r,{disabled:o||!!A||!r,onClick:()=>n(void 0),children:"Reset"}),G.jsx(_r,{disabled:o||!!A||!r,onClick:j,children:"Sign Transaction"})]})]})}function SKe(e){const t=e[e.length-1].index;return Gd().find(n=>n.mOfN!==e.length||n.pubkeys.lengthn.pubkeys[i].pubkey===o))}function EKe(e){if(!e.startsWith("01"))throw new Error("Invalid p2mpk unlock script");const t=[],r=parseInt(e.slice(2,4),16);let n=4;for(let o=0;oi.unlockScript===n))throw new Error("Invalid unsigned tx, the input from different address");return r}function PKe(){const e=z.useMemo(()=>{const q=window.localStorage.getItem(gE);if(q)try{return JSON.parse(q)}catch{console.log("Failed to parse stored value")}return vE},[]),t=_P({validateInputOnChange:[`destinations.${vf}.address`,`destinations.${vf}.tokenId`,`destinations.${vf}.tokenAmount`,`signatures.${vf}.signature`],initialValues:e,validate:{multisig:q=>q===""?"Please select multisig":null,destinations:{address:q=>q===""?"Empty address":ot.isBase58(q)?null:"Invalid address",tokenId:q=>cKe(q)?null:"Invalid token id",tokenAmount:(q,_)=>{if(q===void 0)return"Token amount is empty";const y=u.find(f=>f.id===_.destinations[0].tokenId);if(y!==void 0){const f=ot.convertAmountWithDecimals(q,y.decimals);return f===void 0||f<=0n?"Invalid token amount":null}}},signatures:{signature:q=>iKe(q)?null:"Invalid signature"}}}),r=Kre(),[n,o]=z.useState(),i=Z2(),a=Ate(),s=XUe(),[c,l]=z.useState(),[u,d]=z.useState([]),p=aKe(c);z.useEffect(()=>{if(p===void 0)return;const q=[];for(const _ of p.tokenBalances??[]){const y=s.find(f=>f.id===_.id);y&&q.push({...y})}q.push(dd.ALPH),d(q)},[p]),z.useEffect(()=>{if(t.values.multisig==="")l(void 0);else{const q=r.find(_=>_.name===t.values.multisig);q!==void 0&&l(l_(q))}},[t.values.multisig,r]);const[m,w]=z.useState(),A=z.useCallback(q=>{const _=t.getInputProps(q);return{..._,onChange:f=>{_.onChange(f),w(void 0)}}},[t,w]),T=z.useCallback(async()=>{try{if(t.values.sweep){t.setValues({step:1});return}if(t.values.destinations.some((y,f)=>{const h=t.validateField(`destinations.${f}.address`),x=t.validateField(`destinations.${f}.tokenId`),v=t.validateField(`destinations.${f}.tokenAmount`),S=y.tokenId===""||y.tokenAmount===void 0,k=h.hasError||x.hasError||v.hasError;return S||k}))throw new Error("Invalid destinations");const _=await uKe(i,t.values.multisig,t.values.signers,t.values.destinations,u);w(void 0),console.log(`Build multisig tx result: ${JSON.stringify(_)}`),t.setValues({unsignedTx:_.unsignedTx,step:1})}catch(q){w(`Error in build multisig tx: ${q}`),console.error(q)}},[t,u]),O=z.useCallback(async()=>{try{if(t.values.destinations.some((_,y)=>t.validateField(`destinations.${y}.address`).error))throw new Error("Invalid destinations");if(t.validateField("signers").hasError)throw new Error("Please select signers");if(t.values.destinations[0].tokenId==="")throw new Error("Please select token");if(t.values.destinations[0].tokenId===ot.ALPH_TOKEN_ID){const[_,y]=await fKe(i,t.values.multisig,t.values.signers,t.values.destinations[0].address);console.log("Build multisig tx result:",y);const f=BigInt(y.unsignedTx.fixedOutputs[0].attoAlphAmount),h=ot.number256ToNumber(f,18);console.log(f,h),w(void 0),t.setValues({sweep:!0,unsignedTx:_,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:t.values.destinations[0].tokenId,tokenAmount:h}]})}else if(p!==void 0){const _=t.values.destinations[0].tokenId,y=u.find(h=>h.id===_),f=p.tokenBalances.find(h=>h.id===_).amount;t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:_,tokenAmount:ot.number256ToNumber(f,y.decimals)}]})}}catch(q){w(`Error in build multisig tx: ${q}`),console.error(q)}},[t,p,u]),P=z.useCallback(()=>{const q=t.values.destinations[0];if(q.tokenId===""||p===void 0)return;const _=u.find(y=>y.id===q.tokenId);return sKe(p,_)},[t,p,u]),[$,R]=z.useState(!1),[j,I]=z.useState(),b=z.useCallback(async()=>{try{if(t.values.unsignedTx===void 0)throw new Error("There is no unsigned tx");if(t.values.signatures.some((y,f)=>t.validateField(`signatures.${f}.signature`).hasError))throw new Error("Invalid signatures");const _=await hKe(i,t.values.multisig,t.values.signers,t.values.unsignedTx,t.values.signatures);console.log(`Submit multisig tx result: ${JSON.stringify(_)}`),o(_),t.setValues({step:3}),await Yre(a,_.txId),R(!0),I(void 0),nKe()}catch(q){I(`Error in tx submission: ${q}`),console.error(q)}},[t,o]),N=Ote(),V=z.useMemo(()=>{if(t.values.multisig!=="")return r.find(q=>q.name===t.values.multisig)},[t.values.multisig,r]);z.useEffect(()=>{window.localStorage.setItem(gE,JSON.stringify(t.values))},[t.values]);const Z=z.useCallback(()=>{t.setValues(vE),w(void 0)},[t,w]);return G.jsx(at,{maw:1200,mx:"auto",mt:"5rem",children:G.jsxs(mc,{columns:13,children:[G.jsx(mc.Col,{span:9,children:t.values.step===0?G.jsxs(at,{mx:"auto",mt:"xl",ta:"left",children:[G.jsx(jy,{w:"20rem",mx:"auto",size:"md",placeholder:"Select Multisig",data:r.map(q=>({value:q.name,label:q.name})),value:t.values.multisig,onChange:q=>{Z(),t.setValues({multisig:q??""})}}),V&&G.jsxs(G.Fragment,{children:[G.jsxs(Df,{mx:"xl",mt:"xl",children:[G.jsxs(St,{ta:"left",fw:"700",children:["Select ",V.mOfN,"-of-",V.pubkeys.length," Signers"]}),G.jsx(ry.Group,{multiple:!0,onChange:q=>{const _=q.sort((f,h)=>{const x=V.pubkeys.findIndex(S=>S.name===f),v=V.pubkeys.findIndex(S=>S.name===h);return console.log(x,v),x-v}),y=_.map(f=>({name:f,signature:""}));t.setValues({signers:_,signatures:y})},children:G.jsxs(Ut,{position:"center",mt:"lg",children:[...V.pubkeys.map(q=>G.jsx(ry,{value:q.name,variant:"light",radius:"xl",checked:t.values.signers.includes(q.name),disabled:t.values.signers.length>=V.mOfN&&!t.values.signers.includes(q.name),style:{marginRight:"0.5rem",marginBottom:"0.5rem"},children:q.name}))]})})]}),G.jsxs(Df,{mx:"xl",mt:"xl",children:[G.jsx(St,{ta:"left",fw:"700",children:"Send Assets"}),G.jsxs(Ut,{mt:"lg",position:"apart",mx:"0.5rem",children:[G.jsx(ma,{label:"Recipient",ta:"left",placeholder:"Address",icon:G.jsx($6e,{size:"1.25rem"}),...t.getInputProps("destinations.0.address"),w:"26rem"}),G.jsx(t0,{label:G.jsxs(Ut,{position:"apart",w:"95%",mx:"auto",children:[G.jsxs(St,{children:["Balance: ",P()]}),G.jsx(_r,{size:xe(13),m:2,p:3,variant:"light",color:"indigo",compact:!0,onClick:O,children:"Max"})]}),ta:"left",precision:6,placeholder:"Amount",hideControls:!0,rightSection:G.jsx(jy,{label:"",value:t.values.destinations[0].symbol,placeholder:"Token",data:u.map(q=>q.symbol),onChange:q=>{t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:u.find(_=>_.symbol===q).symbol,tokenId:u.find(_=>_.symbol===q).id,tokenAmount:t.values.destinations[0].tokenAmount}]})}}),rightSectionWidth:"6rem",...A("destinations.0.tokenAmount"),onChange:q=>{t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:t.values.destinations[0].tokenId,tokenAmount:Number(q)}]})},styles:{label:{width:"100%"}}})]})]}),m&&G.jsx(St,{color:"red",mt:"lg",mx:"lg",children:m}),G.jsxs(Ut,{mt:"lg",position:"apart",mx:"2rem",children:[G.jsx(_r,{onClick:Z,children:"Reset"}),G.jsx(_r,{onClick:T,children:"Build Transaction"})]})]})]}):t.values.step===1?G.jsxs(at,{maw:800,mx:"lg",mt:"xl",ta:"left",children:[G.jsx(St,{fw:"700",size:"lg",children:"Copy and share the transaction to signers"}),G.jsxs(ga.Description,{ta:"left",size:"md",children:["Signers should paste the transaction on the page"," ",G.jsx(yx,{href:"/alephium-toolkit/#/multisig/sign-tx",target:"_blank",children:"sign-tx"})]}),G.jsx(iC,{h:"lg"}),G.jsx(xc,{value:t.values.unsignedTx??"",variant:"outline"}),G.jsxs(Ut,{mt:"xl",position:"apart",mx:"lg",children:[G.jsx(_r,{onClick:()=>{t.setValues({step:0})},children:"Back"}),G.jsx(_r,{onClick:()=>{t.setValues({step:2})},children:"Next"})]})]}):t.values.step===2?G.jsxs(at,{mx:"auto",mt:"xl",ta:"left",children:[G.jsxs(Df,{mx:"lg",children:[G.jsx(St,{ta:"left",fw:"700",children:"Signatures"}),t.values.signers.map((q,_)=>G.jsxs(Ut,{position:"apart",mt:"md",mx:"5rem",children:[G.jsxs(St,{children:[q,":"]}),G.jsx(ma,{w:"32rem",placeholder:"Signature",...t.getInputProps(`signatures.${_}.signature`)})]},q))]}),j&&G.jsx(St,{color:"red",mt:"lg",mx:"lg",children:j}),G.jsxs(Ut,{mt:"xl",position:"apart",mx:"2rem",children:[G.jsx(_r,{onClick:()=>{t.setValues({step:1})},children:"Back"}),G.jsx(_r,{onClick:b,children:"Submit"})]})]}):G.jsxs(at,{maw:900,mx:"auto",mt:"xl",ta:"left",children:[G.jsx(Ut,{position:"center",mt:"lg",children:$?G.jsx(zq,{sections:[{value:100,color:"teal"}],size:16*20,thickness:16*2,label:G.jsx(j0,{children:G.jsx(aC,{color:"teal",variant:"light",radius:"xl",size:"xl",children:G.jsx(RW,{size:42})})})}):G.jsx(Zl,{color:"teal",size:"16rem"})}),$&&G.jsxs(H0,{mt:"lg",mx:"2rem",children:[G.jsx(St,{fw:400,fz:"1.5rem",ta:"center",children:"Transaction Submitted"}),G.jsx(yx,{href:`${N}/transactions/${n==null?void 0:n.txId}`,target:"_blank",mx:"auto",children:"View on Explorer"}),G.jsx(_r,{mx:"auto",onClick:()=>{Z(),t.setValues({step:0})},children:"Create more transactions"})]})]})}),G.jsx(mc.Col,{offset:1,span:3,children:G.jsx(at,{maw:400,mx:"auto",mt:"2.5rem",ta:"left",children:G.jsxs(Ys,{active:t.values.step,onStepClick:q=>t.setValues({step:q}),orientation:"vertical",allowNextStepsSelect:!1,styles:q=>({stepIcon:{backgroundColor:q.fn.variant({variant:"light",color:q.primaryColor}).background}}),children:[G.jsx(Ys.Step,{label:"Create",description:"Create a new transaction",allowStepSelect:t.values.step!==3&&t.values.step>0}),G.jsx(Ys.Step,{label:"Sign",description:"Share the transaction to all signers for signatures",allowStepSelect:t.values.step!==3&&t.values.step>1}),G.jsx(Ys.Step,{label:"Submit",description:"Aggregate all signatures and submit the transaction",allowStepSelect:t.values.step!==3&&t.values.step>2}),G.jsx(Ys.Step,{label:"Transaction",description:"Available on the explorer"})]})})})]})})}const AKe="v2.3.5",OKe="SimpleToken",IKe="070609121b4024402d4050010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302010000000102a00002010201010015ce04b4450c7ba0001600340d7bb4b11600aba00016002ba1000516005e",TKe="baf828fcd7be3dca1f72793e385762d18e8de775dbaa4a1508e6c66b5ad2b4a0",MKe={names:["symbol","name","decimals","supply","balance","owner","__stdInterfaceId"],types:["ByteVec","ByteVec","U256","U256","U256","Address","ByteVec"],isMutable:[!1,!1,!1,!1,!0,!1,!1]},kKe=[{name:"Withdraw",fieldNames:["amount"],fieldTypes:["U256"]}],$Ke=[{name:"getSymbol",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["ByteVec"]},{name:"getName",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["ByteVec"]},{name:"getDecimals",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"getTotalSupply",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"balance",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"withdraw",usePreapprovedAssets:!1,useAssetsInContract:!0,isPublic:!0,paramNames:["amount"],paramTypes:["U256"],paramIsMutable:[!1],returnTypes:[]}],DKe=[],RKe=[{name:"ErrorCodes",fields:[{name:"InvalidOwner",value:{type:"U256",value:"0"}},{name:"InvalidWithdrawAmount",value:{type:"U256",value:"1"}}]}],NKe="0001",BKe={version:AKe,name:OKe,bytecode:IKe,codeHash:TKe,fieldsSig:MKe,eventsSig:kKe,functions:$Ke,constants:DKe,enums:RKe,stdInterfaceId:NKe};let p6;function Hu(e){p6===void 0&&(p6=[na]);const t=p6.find(r=>r.contract.codeHash===e||r.contract.codeHashDebug===e);if(t===void 0)throw new Error("Unknown code with code hash: "+e);return t.contract}class FKe extends ot.ContractFactory{constructor(){super(...arguments);$g(this,"consts",{ErrorCodes:{InvalidOwner:BigInt(0),InvalidWithdrawAmount:BigInt(1)}});$g(this,"tests",{getSymbol:async r=>ot.testMethod(this,"getSymbol",r),getName:async r=>ot.testMethod(this,"getName",r),getDecimals:async r=>ot.testMethod(this,"getDecimals",r),getTotalSupply:async r=>ot.testMethod(this,"getTotalSupply",r),balance:async r=>ot.testMethod(this,"balance",r),withdraw:async r=>ot.testMethod(this,"withdraw",r)})}at(r){return new jKe(r)}}const na=new FKe(ot.Contract.fromJson(BKe,"","baf828fcd7be3dca1f72793e385762d18e8de775dbaa4a1508e6c66b5ad2b4a0"));class jKe extends ot.ContractInstance{constructor(r){super(r);$g(this,"methods",{getSymbol:async r=>ot.callMethod(na,this,"getSymbol",r===void 0?{}:r,Hu),getName:async r=>ot.callMethod(na,this,"getName",r===void 0?{}:r,Hu),getDecimals:async r=>ot.callMethod(na,this,"getDecimals",r===void 0?{}:r,Hu),getTotalSupply:async r=>ot.callMethod(na,this,"getTotalSupply",r===void 0?{}:r,Hu),balance:async r=>ot.callMethod(na,this,"balance",r===void 0?{}:r,Hu)})}async fetchState(){return ot.fetchContractState(na,this)}async getContractEventsCurrentCount(){return ot.getContractEventsCurrentCount(this.address)}subscribeWithdrawEvent(r,n){return ot.subscribeContractEvent(na.contract,this,r,"Withdraw",n)}async multicall(r){return await ot.multicallMethods(na,this,r,Hu)}}const LKe="v2.3.5",UKe="Withdraw",HKe="01010300000005{1}0d0c{0}0105",zKe={names:["token","amount"],types:["ByteVec","U256"],isMutable:[!1,!1]},VKe=[{name:"main",usePreapprovedAssets:!0,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:[]}],qKe={version:LKe,name:UKe,bytecodeTemplate:HKe,fieldsSig:zKe,functions:VKe},WKe="v2.3.5",GKe="DeployNewToken",KKe="01010300030018b41700{2}{1}{3}{4}16001406414c504800011306640c13016417021701160013c40de0b6b3a7640000a2{0}16011602{4}bc18",YKe={names:["templateId","name","symbol","decimals","initialSupply"],types:["ByteVec","ByteVec","ByteVec","U256","U256"],isMutable:[!1,!1,!1,!1,!1]},JKe=[{name:"main",usePreapprovedAssets:!0,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:[]}],ZKe={version:WKe,name:GKe,bytecodeTemplate:KKe,fieldsSig:YKe,functions:JKe};new ot.ExecutableScript(ot.Script.fromJson(qKe));const XKe=new ot.ExecutableScript(ot.Script.fromJson(ZKe)),QKe="1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH",eYe={SimpleToken:{txId:"36175eefc917ad84dd7a4f4dda4bb6d52d977ff7425f07a63c03d2d222ced780",unsignedTx:"000401010103000000091500bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a13c40de0b6b3a7640000a214405b070609121b4024402d4050010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302010000000102a00002010201010015ce04b4450c7ba0001600340d7bb4b11600aba00016002ba1000516005e14403f0603024654030a46616b6520546f6b656e021202000400bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a0306414c5048000114030102000cae188000e039c1174876e8000137a4444796ece62cecbb2d5e37c8b170701a0c01859c425724d6850c1442e1d7281cee82000381818e63bd9e35a5489b52a430accefc608fd60aa2c7c0d1b393b5239aedf6b001c6d388b948bdfad57a980000bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a00000000000000000000",signature:"ea39aec2d7bbb6e6d2ecc28621f7f5b145017db7250c9521c74e4d729eb286481675bb12f1b7c5f33b3d80efdba89cb6330ab8dca3d8300a7f7a95c0d2990f49",gasPrice:"100000000000",gasAmount:57401,blockHash:"004b4df0f6dda9d2335ffe804d60d9772e5e5bac4d596a2af95c301d8b9a7770",codeHash:"2b861c3e394586c235dca6d70e9e1803abf17a74e9c049efd0c9a37efea86203",contractInstance:{address:"27NFdRE5GFaLBceNrKy4rH1P2u8w3LAbyWHrUQoJ4pP8j",contractId:"bc5db338da0b7b5ac07754d412e61746eda150f51de4842e7fc0e93b0ce87500",groupIndex:0,methods:{}},issueTokenAmount:"0"}},tYe={},rYe={},nYe={deployerAddress:QKe,contracts:eYe,scripts:tYe,migrations:rYe};function YB(e){const t={SimpleToken:{...e.contracts.SimpleToken,contractInstance:na.at(e.contracts.SimpleToken.contractInstance.address)}};return{...e,contracts:t}}function oYe(e,t){const r=e==="devnet"?nYe:void 0;if(r===void 0)throw Error("The contract has not been deployed to the "+e);const n=Array.isArray(r)?r:[r];if(t===void 0){if(n.length>1)throw Error("The contract has been deployed multiple times on "+e+", please specify the deployer address");return YB(n[0])}const o=n.find(i=>i.deployerAddress===t);if(o===void 0)throw Error("The contract deployment result does not exist");return YB(o)}async function iYe(e,t,{name:r,symbol:n,decimals:o,supply:i}){const a=oYe(e),s=await XKe.execute(t,{initialFields:{templateId:a.contracts.SimpleToken.contractInstance.contractId,name:mb.from(r,"utf-8").toString("hex"),symbol:mb.from(n,"utf-8").toString("hex"),decimals:BigInt(o),initialSupply:BigInt(i)*BigInt(10**o)},attoAlphAmount:ot.ONE_ALPH});return console.log(s),s.txId}function yE(e,t){return yE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},yE(e,t)}function Jre(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yE(e,t)}const JB={disabled:!1},Kb=fe.createContext(null);var tp="unmounted",Cl="exited",Pl="entering",Ju="entered",bE="exiting",Os=function(e){Jre(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=Cl,i.appearStatus=Pl):c=Ju:n.unmountOnExit||n.mountOnEnter?c=tp:c=Cl,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===tp?{status:Cl}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Pl&&a!==Ju&&(i=Pl):(a===Pl||a===Ju)&&(i=bE)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){o===void 0&&(o=!1),i!==null?(this.cancelNextCallback(),i===Pl?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===Cl&&this.setState({status:tp})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[av.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!o&&!a||JB.disabled){this.safeSetState({status:Ju},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:Pl},function(){i.props.onEntering(l,u),i.onTransitionEnd(p,function(){i.safeSetState({status:Ju},function(){i.props.onEntered(l,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:av.findDOMNode(this);if(!i||JB.disabled){this.safeSetState({status:Cl},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:bE},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Cl},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:av.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===tp)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=nC(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return fe.createElement(Kb.Provider,{value:null},typeof a=="function"?a(o,s):fe.cloneElement(fe.Children.only(a),s))},t}(fe.Component);Os.contextType=Kb;Os.propTypes={};function zu(){}Os.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zu,onEntering:zu,onEntered:zu,onExit:zu,onExiting:zu,onExited:zu};Os.UNMOUNTED=tp;Os.EXITED=Cl;Os.ENTERING=Pl;Os.ENTERED=Ju;Os.EXITING=bE;const aYe=Os;function sYe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KP(e,t){var r=function(i){return t&&z.isValidElement(i)?t(i):i},n=Object.create(null);return e&&z.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function cYe(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in t){if(n[c])for(a=0;at in e?_Ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QB=(e,t)=>{for(var r in t||(t={}))xYe.call(t,r)&&XB(e,r,t[r]);if(ZB)for(var r of ZB(t))SYe.call(t,r)&&XB(e,r,t[r]);return e};const eF={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},EYe={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function CYe({state:e,maxHeight:t,positioning:r,transitionDuration:n}){const[o,i]=r,a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:eF[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},c={opacity:1,transform:EYe[a]},l={opacity:0,maxHeight:0,transform:eF[a]},u={entering:c,entered:c,exiting:l,exited:l};return QB(QB({},s),u[e])}function PYe(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var AYe=Object.defineProperty,OYe=Object.defineProperties,IYe=Object.getOwnPropertyDescriptors,Yb=Object.getOwnPropertySymbols,Zre=Object.prototype.hasOwnProperty,Xre=Object.prototype.propertyIsEnumerable,tF=(e,t,r)=>t in e?AYe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rF=(e,t)=>{for(var r in t||(t={}))Zre.call(t,r)&&tF(e,r,t[r]);if(Yb)for(var r of Yb(t))Xre.call(t,r)&&tF(e,r,t[r]);return e},TYe=(e,t)=>OYe(e,IYe(t)),nF=(e,t)=>{var r={};for(var n in e)Zre.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yb)for(var n of Yb(e))t.indexOf(n)<0&&Xre.call(e,n)&&(r[n]=e[n]);return r};function Qre(e){var t=e,{notification:r,autoClose:n,onHide:o,innerRef:i}=t,a=nF(t,["notification","autoClose","onHide","innerRef"]);const s=r,{autoClose:c,message:l}=s,u=nF(s,["autoClose","message"]),d=PYe(n,c),p=z.useRef(),m=()=>{o(r.id),window.clearTimeout(p.current)},w=()=>{clearTimeout(p.current)},A=()=>{typeof d=="number"&&(p.current=window.setTimeout(m,d))};return z.useEffect(()=>{typeof r.onOpen=="function"&&r.onOpen(r)},[]),z.useEffect(()=>(A(),w),[n,r.autoClose]),fe.createElement(Sq,TYe(rF(rF({},u),a),{onClose:m,onMouseEnter:w,onMouseLeave:A,ref:i}),l)}Qre.displayName="@mantine/notifications/NotificationContainer";var MYe=ft((e,{zIndex:t})=>({notifications:{width:`calc(100% - ${e.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:t},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}}));const kYe=MYe;var $Ye=Object.defineProperty,DYe=Object.defineProperties,RYe=Object.getOwnPropertyDescriptors,oF=Object.getOwnPropertySymbols,NYe=Object.prototype.hasOwnProperty,BYe=Object.prototype.propertyIsEnumerable,iF=(e,t,r)=>t in e?$Ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,FYe=(e,t)=>{for(var r in t||(t={}))NYe.call(t,r)&&iF(e,r,t[r]);if(oF)for(var r of oF(t))BYe.call(t,r)&&iF(e,r,t[r]);return e},jYe=(e,t)=>DYe(e,RYe(t));function LYe({limit:e}){const{state:t,queue:r,update:n,cleanQueue:o}=$le({initialValues:[],limit:e});return{notifications:t,queue:r,showNotification:l=>{const u=l.id||Aw();return n(d=>l.id&&d.some(p=>p.id===l.id)?d:[...d,jYe(FYe({},l),{id:u})]),u},updateNotification:l=>n(u=>{const d=u.findIndex(m=>m.id===l.id);if(d===-1)return u;const p=[...u];return p[d]=l,p}),hideNotification:l=>n(u=>u.filter(d=>d.id===l?(typeof d.onClose=="function"&&d.onClose(d),!1):!0)),cleanQueue:o,clean:()=>n(()=>[])}}var UYe=Object.defineProperty,Jb=Object.getOwnPropertySymbols,ene=Object.prototype.hasOwnProperty,tne=Object.prototype.propertyIsEnumerable,aF=(e,t,r)=>t in e?UYe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g6=(e,t)=>{for(var r in t||(t={}))ene.call(t,r)&&aF(e,r,t[r]);if(Jb)for(var r of Jb(t))tne.call(t,r)&&aF(e,r,t[r]);return e},HYe=(e,t)=>{var r={};for(var n in e)ene.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jb)for(var n of Jb(e))t.indexOf(n)<0&&tne.call(e,n)&&(r[n]=e[n]);return r};const zYe=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],Iu=e=>{var t=e,{className:r,position:n="bottom-right",autoClose:o=4e3,transitionDuration:i=250,containerWidth:a=xe(440),notificationMaxHeight:s=xe(200),limit:c=5,zIndex:l=bs("overlay"),style:u,children:d,target:p}=t,m=HYe(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const w=Cle(),A=z.useRef({}),T=z.useRef(0),{notifications:O,showNotification:P,updateNotification:$,hideNotification:R,clean:j,cleanQueue:I}=LYe({limit:c}),{classes:b,cx:N,theme:V}=kYe({zIndex:l}),Z=$0(),_=(V.respectReducedMotion?Z:!1)?1:i,y=(zYe.includes(n)?n:"bottom-right").split("-");Mo(()=>{O.length>T.current&&setTimeout(()=>w(),0),T.current=O.length},[O]),pYe({show:P,hide:R,update:$,clean:j,cleanQueue:I});const f=O.map(h=>fe.createElement(aYe,{key:h.id,timeout:_,onEnter:()=>A.current[h.id].offsetHeight,nodeRef:{current:A.current[h.id]}},x=>fe.createElement(Qre,{innerRef:v=>{A.current[h.id]=v},notification:h,onHide:R,className:b.notification,autoClose:o,sx:[g6({},CYe({state:x,positioning:y,transitionDuration:_,maxHeight:s})),...Array.isArray(h.sx)?h.sx:[h.sx]]})));return fe.createElement(I4,{target:p},fe.createElement(at,g6({className:N(b.notifications,r),style:u,sx:g6({maxWidth:a},wYe(y,V.spacing.md))},m),fe.createElement(hYe,null,f)))};Iu.displayName="@mantine/notifications/Notifications";Iu.show=nu.show;Iu.hide=nu.hide;Iu.update=nu.update;Iu.clean=nu.clean;Iu.cleanQueue=nu.cleanQueue;const VYe=()=>G.jsx(T4,{icon:G.jsx(U6e,{}),variant:"light",color:"blue",title:"No wallet connected",children:"You must connect a wallet with funds to perform this operation."});function qYe(){const[e,t]=z.useState(!1),{signer:r}=J2(),[n]=Ou(),o=Ote(),i=_P({initialValues:{name:"",symbol:"",decimals:18,supply:1e6},validate:{name:RHe({min:3},"Name must have 3 or more characters"),symbol:l=>/[A-Z]{3,6}/.test(l)?null:"Symbol must be 3-6 capital letters",decimals:cB({min:0,max:18},"Decimals must be between 0 and 18"),supply:cB({min:1},"Supply must be a positive integer")}}),a=l=>{const u=`${o}/transactions/${l}`;nu.show({title:"Tokens successfully issued!",message:G.jsxs("span",{children:["View your minting transaction in the explorer"," ",G.jsxs("a",{href:u,target:"_blank",rel:"noreferrer",children:["here ",G.jsx(B6e,{size:12}),"."]})]}),icon:G.jsx(RW,{size:"1.1rem"}),color:"teal"})},s=l=>{console.error(l),nu.show({title:"Failed to issue tokens",message:`Error: ${l.message}`,icon:G.jsx(G6e,{size:"1.1rem"}),color:"red"})},c=l=>{t(!0),iYe(n,r,l).then(a).catch(s).finally(()=>t(!1))};return G.jsx(j0,{h:xe("80%"),children:G.jsx(X4,{shadow:"xs",p:"md",children:G.jsx(H0,{spacing:"md",children:G.jsxs(at,{ta:"left",w:"40rem",mx:"auto",children:[!r&&G.jsx(VYe,{}),G.jsx(Bw,{order:1,children:"Issue new tokens"}),G.jsx(St,{size:"xs",c:"dimmed",children:"Newly created tokens will be owned by your currently connected wallet account."}),G.jsx(iC,{h:"md"}),G.jsxs("form",{onSubmit:i.onSubmit(c),children:[G.jsx(ma,{label:"Token Name",withAsterisk:!0,placeholder:"Token Name",...i.getInputProps("name")}),G.jsx(ma,{mt:"md",label:"Token Symbol",withAsterisk:!0,description:"Symbol must be 3-6 capital letters",placeholder:"Token Symbol",...i.getInputProps("symbol")}),G.jsx(t0,{mt:"md",label:"Decimals",withAsterisk:!0,description:"Must be in the range of 0-18",placeholder:"Decimals",hideControls:!0,...i.getInputProps("decimals")}),G.jsx(t0,{mt:"md",label:"Token Supply",withAsterisk:!0,placeholder:"supply",hideControls:!0,...i.getInputProps("supply")}),G.jsx(Ut,{position:"right",mt:"xl",children:G.jsx(_r,{type:"submit",disabled:!r,loading:e,children:"Issue Tokens"})})]})]})})})})}function WYe(){const e=Kr();return G.jsx(m6e,{children:G.jsx(fH,{styles:{main:{background:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}},navbarOffsetBreakpoint:"sm",asideOffsetBreakpoint:"sm",navbar:G.jsx(X6e,{}),footer:G.jsx(sH,{height:60,p:"md",children:G.jsx(St,{fw:"bold",fz:"sm",children:"Powered by BlockFlow, Stateful UTXO, PoLW"})}),header:G.jsx(nHe,{}),children:G.jsxs(u6e,{children:[G.jsx($r,{path:"/",element:G.jsx(sHe,{})}),G.jsx($r,{path:"/token/all",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/token/info",element:G.jsx(fHe,{})}),G.jsx($r,{path:"/token/new",element:G.jsx(qYe,{})}),G.jsx($r,{path:"/token/burn",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/nft/all",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/nft/info",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/nft/new-collection",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/nft/burn",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/contract/play",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/contract/info",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/contract/deploy",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/multisig",element:G.jsx(Zi,{})}),G.jsx($r,{path:"/multisig/create",element:G.jsx(yKe,{})}),G.jsx($r,{path:"/multisig/import",element:G.jsx(bKe,{})}),G.jsx($r,{path:"/multisig/show",element:G.jsx(_Ke,{})}),G.jsx($r,{path:"/multisig/build-tx",element:G.jsx(PKe,{})}),G.jsx($r,{path:"/multisig/sign-tx",element:G.jsx(xKe,{})})]})})})}function GYe(){const[e,t]=Mle({key:"mantine-color-scheme",defaultValue:"light",getInitialValueInEffect:!1}),r=z.useMemo(()=>JUe(),[]),n=o=>t(o||(e==="dark"?"light":"dark"));return Jle([["mod+J",()=>n()]]),G.jsx(AUe,{theme:e==="dark"?"retro":"nouns",network:r,children:G.jsx("div",{className:"App",children:G.jsx(eU,{colorScheme:e,toggleColorScheme:n,children:G.jsxs(XL,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:e},children:[G.jsx(Iu,{}),G.jsx(X4,{children:G.jsx(WYe,{})})]})})})})}m6.createRoot(document.getElementById("root")).render(G.jsx(GYe,{})); diff --git a/assets/index-fc0d89fc.js b/assets/index-fc0d89fc.js deleted file mode 100644 index 1895b96..0000000 --- a/assets/index-fc0d89fc.js +++ /dev/null @@ -1,2191 +0,0 @@ -var xZ=Object.defineProperty;var _Z=(e,t,r)=>t in e?xZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ih=(e,t,r)=>(_Z(e,typeof t!="symbol"?t+"":t,r),r);function EZ(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var $D={exports:{}},fy={},TD={exports:{}},St={};/** - * @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 t0=Symbol.for("react.element"),SZ=Symbol.for("react.portal"),CZ=Symbol.for("react.fragment"),PZ=Symbol.for("react.strict_mode"),OZ=Symbol.for("react.profiler"),kZ=Symbol.for("react.provider"),AZ=Symbol.for("react.context"),IZ=Symbol.for("react.forward_ref"),$Z=Symbol.for("react.suspense"),TZ=Symbol.for("react.memo"),DZ=Symbol.for("react.lazy"),nS=Symbol.iterator;function MZ(e){return e===null||typeof e!="object"?null:(e=nS&&e[nS]||e["@@iterator"],typeof e=="function"?e:null)}var DD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MD=Object.assign,RD={};function Qu(e,t,r){this.props=e,this.context=t,this.refs=RD,this.updater=r||DD}Qu.prototype.isReactComponent={};Qu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Qu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ND(){}ND.prototype=Qu.prototype;function D6(e,t,r){this.props=e,this.context=t,this.refs=RD,this.updater=r||DD}var M6=D6.prototype=new ND;M6.constructor=D6;MD(M6,Qu.prototype);M6.isPureReactComponent=!0;var oS=Array.isArray,FD=Object.prototype.hasOwnProperty,R6={current:null},BD={key:!0,ref:!0,__self:!0,__source:!0};function jD(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)FD.call(t,n)&&!BD.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1>>1,$=j[F];if(0>>1;Fo(te,P))ae<$&&0>o(ce,te)?(j[F]=ce,j[ae]=P,F=ae):(j[F]=te,j[J]=P,F=J);else if(ae<$&&0>o(ce,P))j[F]=ce,j[ae]=P,F=ae;else break e}}return H}function o(j,H){var P=j.sortIndex-H.sortIndex;return P!==0?P:j.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,f=null,d=3,p=!1,h=!1,m=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(j){for(var H=r(c);H!==null;){if(H.callback===null)n(c);else if(H.startTime<=j)n(c),H.sortIndex=H.expirationTime,t(l,H);else break;H=r(c)}}function A(j){if(m=!1,E(j),!h)if(r(l)!==null)h=!0,B(N);else{var H=r(c);H!==null&&T(A,H.startTime-j)}}function N(j,H){h=!1,m&&(m=!1,w(U),U=-1),p=!0;var P=d;try{for(E(H),f=r(l);f!==null&&(!(f.expirationTime>H)||j&&!V());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var $=F(f.expirationTime<=H);H=e.unstable_now(),typeof $=="function"?f.callback=$:f===r(l)&&n(l),E(H)}else n(l);f=r(l)}if(f!==null)var q=!0;else{var J=r(c);J!==null&&T(A,J.startTime-H),q=!1}return q}finally{f=null,d=P,p=!1}}var D=!1,y=null,U=-1,L=5,G=-1;function V(){return!(e.unstable_now()-Gj||125F?(j.sortIndex=P,t(c,j),r(l)===null&&j===r(c)&&(m?(w(U),U=-1):m=!0,T(A,P-F))):(j.sortIndex=$,t(l,j),h||p||(h=!0,B(N))),j},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(j){var H=d;return function(){var P=d;d=H;try{return j.apply(this,arguments)}finally{d=P}}}})(HD);zD.exports=HD;var WZ=zD.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var VD=k,Kn=WZ;function ze(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),U5=Object.prototype.hasOwnProperty,qZ=/^[: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]*$/,aS={},sS={};function GZ(e){return U5.call(sS,e)?!0:U5.call(aS,e)?!1:qZ.test(e)?sS[e]=!0:(aS[e]=!0,!1)}function KZ(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function YZ(e,t,r,n){if(t===null||typeof t>"u"||KZ(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _n(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Ur={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ur[e]=new _n(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ur[t]=new _n(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ur[e]=new _n(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ur[e]=new _n(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ur[e]=new _n(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ur[e]=new _n(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ur[e]=new _n(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ur[e]=new _n(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ur[e]=new _n(e,5,!1,e.toLowerCase(),null,!1,!1)});var F6=/[\-:]([a-z])/g;function B6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(F6,B6);Ur[t]=new _n(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(F6,B6);Ur[t]=new _n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(F6,B6);Ur[t]=new _n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ur[e]=new _n(e,1,!1,e.toLowerCase(),null,!1,!1)});Ur.xlinkHref=new _n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ur[e]=new _n(e,1,!1,e.toLowerCase(),null,!0,!0)});function j6(e,t,r,n){var o=Ur.hasOwnProperty(t)?Ur[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{y2=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?wd(e):""}function XZ(e){switch(e.tag){case 5:return wd(e.type);case 16:return wd("Lazy");case 13:return wd("Suspense");case 19:return wd("SuspenseList");case 0:case 2:case 15:return e=b2(e.type,!1),e;case 11:return e=b2(e.type.render,!1),e;case 1:return e=b2(e.type,!0),e;default:return""}}function W5(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Lc:return"Fragment";case jc:return"Portal";case z5:return"Profiler";case L6:return"StrictMode";case H5:return"Suspense";case V5:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case GD:return(e.displayName||"Context")+".Consumer";case qD:return(e._context.displayName||"Context")+".Provider";case U6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z6:return t=e.displayName||null,t!==null?t:W5(e.type)||"Memo";case ts:t=e._payload,e=e._init;try{return W5(e(t))}catch{}}return null}function ZZ(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W5(t);case 8:return t===L6?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function YD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function JZ(e){var t=YD(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lh(e){e._valueTracker||(e._valueTracker=JZ(e))}function XD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=YD(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function X1(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function q5(e,t){var r=t.checked;return er({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function cS(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Fs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ZD(e,t){t=t.checked,t!=null&&j6(e,"checked",t,!1)}function G5(e,t){ZD(e,t);var r=Fs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?K5(e,t.type,r):t.hasOwnProperty("defaultValue")&&K5(e,t.type,Fs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uS(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function K5(e,t,r){(t!=="number"||X1(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var xd=Array.isArray;function au(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ch.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lp(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var kd={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},QZ=["Webkit","ms","Moz","O"];Object.keys(kd).forEach(function(e){QZ.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kd[t]=kd[e]})});function tM(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||kd.hasOwnProperty(e)&&kd[e]?(""+t).trim():t+"px"}function rM(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=tM(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var eJ=er({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 Z5(e,t){if(t){if(eJ[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ze(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ze(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ze(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ze(62))}}function J5(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Q5=null;function H6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var e3=null,su=null,lu=null;function pS(e){if(e=o0(e)){if(typeof e3!="function")throw Error(ze(280));var t=e.stateNode;t&&(t=gy(t),e3(e.stateNode,e.type,t))}}function nM(e){su?lu?lu.push(e):lu=[e]:su=e}function oM(){if(su){var e=su,t=lu;if(lu=su=null,pS(e),t)for(e=0;e>>=0,e===0?32:31-(fJ(e)/dJ|0)|0}var uh=64,fh=4194304;function _d(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ev(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=_d(s):(i&=a,i!==0&&(n=_d(i)))}else a=r&~o,a!==0?n=_d(a):i!==0&&(n=_d(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function r0(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wo(t),e[t]=r}function gJ(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Id),_S=String.fromCharCode(32),ES=!1;function SM(e,t){switch(e){case"keyup":return VJ.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Uc=!1;function qJ(e,t){switch(e){case"compositionend":return CM(t);case"keypress":return t.which!==32?null:(ES=!0,_S);case"textInput":return e=t.data,e===_S&&ES?null:e;default:return null}}function GJ(e,t){if(Uc)return e==="compositionend"||!Z6&&SM(e,t)?(e=_M(),b1=K6=cs=null,Uc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=OS(r)}}function AM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?AM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function IM(){for(var e=window,t=X1();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=X1(e.document)}return t}function J6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rQ(e){var t=IM(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&AM(r.ownerDocument.documentElement,r)){if(n!==null&&J6(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=kS(r,i);var a=kS(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,zc=null,a3=null,Td=null,s3=!1;function AS(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;s3||zc==null||zc!==X1(n)||(n=zc,"selectionStart"in n&&J6(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}),Td&&hp(Td,n)||(Td=n,n=nv(a3,"onSelect"),0Wc||(e.current=p3[Wc],p3[Wc]=null,Wc--)}function Ut(e,t){Wc++,p3[Wc]=e.current,e.current=t}var Bs={},ln=Gs(Bs),An=Gs(!1),Bl=Bs;function _u(e,t){var r=e.type.contextTypes;if(!r)return Bs;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function In(e){return e=e.childContextTypes,e!=null}function iv(){Kt(An),Kt(ln)}function NS(e,t,r){if(ln.current!==Bs)throw Error(ze(168));Ut(ln,t),Ut(An,r)}function jM(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ze(108,ZZ(e)||"Unknown",o));return er({},r,n)}function av(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bs,Bl=ln.current,Ut(ln,e),Ut(An,An.current),!0}function FS(e,t,r){var n=e.stateNode;if(!n)throw Error(ze(169));r?(e=jM(e,t,Bl),n.__reactInternalMemoizedMergedChildContext=e,Kt(An),Kt(ln),Ut(ln,e)):Kt(An),Ut(An,r)}var aa=null,my=!1,D2=!1;function LM(e){aa===null?aa=[e]:aa.push(e)}function hQ(e){my=!0,LM(e)}function Ks(){if(!D2&&aa!==null){D2=!0;var e=0,t=Tt;try{var r=aa;for(Tt=1;e>=a,o-=a,ua=1<<32-Wo(t)+o|r<U?(L=y,y=null):L=y.sibling;var G=d(w,y,E[U],A);if(G===null){y===null&&(y=L);break}e&&y&&G.alternate===null&&t(w,y),g=i(G,g,U),D===null?N=G:D.sibling=G,D=G,y=L}if(U===E.length)return r(w,y),Xt&&xl(w,U),N;if(y===null){for(;UU?(L=y,y=null):L=y.sibling;var V=d(w,y,G.value,A);if(V===null){y===null&&(y=L);break}e&&y&&V.alternate===null&&t(w,y),g=i(V,g,U),D===null?N=V:D.sibling=V,D=V,y=L}if(G.done)return r(w,y),Xt&&xl(w,U),N;if(y===null){for(;!G.done;U++,G=E.next())G=f(w,G.value,A),G!==null&&(g=i(G,g,U),D===null?N=G:D.sibling=G,D=G);return Xt&&xl(w,U),N}for(y=n(w,y);!G.done;U++,G=E.next())G=p(y,w,U,G.value,A),G!==null&&(e&&G.alternate!==null&&y.delete(G.key===null?U:G.key),g=i(G,g,U),D===null?N=G:D.sibling=G,D=G);return e&&y.forEach(function(S){return t(w,S)}),Xt&&xl(w,U),N}function _(w,g,E,A){if(typeof E=="object"&&E!==null&&E.type===Lc&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case sh:e:{for(var N=E.key,D=g;D!==null;){if(D.key===N){if(N=E.type,N===Lc){if(D.tag===7){r(w,D.sibling),g=o(D,E.props.children),g.return=w,w=g;break e}}else if(D.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===ts&&VS(N)===D.type){r(w,D.sibling),g=o(D,E.props),g.ref=Ff(w,D,E),g.return=w,w=g;break e}r(w,D);break}else t(w,D);D=D.sibling}E.type===Lc?(g=Ml(E.props.children,w.mode,A,E.key),g.return=w,w=g):(A=O1(E.type,E.key,E.props,null,w.mode,A),A.ref=Ff(w,g,E),A.return=w,w=A)}return a(w);case jc:e:{for(D=E.key;g!==null;){if(g.key===D)if(g.tag===4&&g.stateNode.containerInfo===E.containerInfo&&g.stateNode.implementation===E.implementation){r(w,g.sibling),g=o(g,E.children||[]),g.return=w,w=g;break e}else{r(w,g);break}else t(w,g);g=g.sibling}g=U2(E,w.mode,A),g.return=w,w=g}return a(w);case ts:return D=E._init,_(w,g,D(E._payload),A)}if(xd(E))return h(w,g,E,A);if(Tf(E))return m(w,g,E,A);yh(w,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,g!==null&&g.tag===6?(r(w,g.sibling),g=o(g,E),g.return=w,w=g):(r(w,g),g=L2(E,w.mode,A),g.return=w,w=g),a(w)):r(w,g)}return _}var Su=KM(!0),YM=KM(!1),i0={},Si=Gs(i0),yp=Gs(i0),bp=Gs(i0);function Al(e){if(e===i0)throw Error(ze(174));return e}function s_(e,t){switch(Ut(bp,t),Ut(yp,e),Ut(Si,i0),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:X5(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=X5(t,e)}Kt(Si),Ut(Si,t)}function Cu(){Kt(Si),Kt(yp),Kt(bp)}function XM(e){Al(bp.current);var t=Al(Si.current),r=X5(t,e.type);t!==r&&(Ut(yp,e),Ut(Si,r))}function l_(e){yp.current===e&&(Kt(Si),Kt(yp))}var Jt=Gs(0);function dv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var M2=[];function c_(){for(var e=0;er?r:4,e(!0);var n=R2.transition;R2.transition={};try{e(!1),t()}finally{Tt=r,R2.transition=n}}function dR(){return _o().memoizedState}function yQ(e,t,r){var n=Cs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},pR(e))hR(t,r);else if(r=VM(e,t,r,n),r!==null){var o=yn();qo(r,e,n,o),vR(r,t,n)}}function bQ(e,t,r){var n=Cs(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(pR(e))hR(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,Jo(s,a)){var l=t.interleaved;l===null?(o.next=o,i_(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=VM(e,t,o,n),r!==null&&(o=yn(),qo(r,e,n,o),vR(r,t,n))}}function pR(e){var t=e.alternate;return e===Qt||t!==null&&t===Qt}function hR(e,t){Dd=pv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function vR(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,W6(e,r)}}var hv={readContext:xo,useCallback:Kr,useContext:Kr,useEffect:Kr,useImperativeHandle:Kr,useInsertionEffect:Kr,useLayoutEffect:Kr,useMemo:Kr,useReducer:Kr,useRef:Kr,useState:Kr,useDebugValue:Kr,useDeferredValue:Kr,useTransition:Kr,useMutableSource:Kr,useSyncExternalStore:Kr,useId:Kr,unstable_isNewReconciler:!1},wQ={readContext:xo,useCallback:function(e,t){return pi().memoizedState=[e,t===void 0?null:t],e},useContext:xo,useEffect:qS,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,E1(4194308,4,sR.bind(null,t,e),r)},useLayoutEffect:function(e,t){return E1(4194308,4,e,t)},useInsertionEffect:function(e,t){return E1(4,2,e,t)},useMemo:function(e,t){var r=pi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=yQ.bind(null,Qt,e),[n.memoizedState,e]},useRef:function(e){var t=pi();return e={current:e},t.memoizedState=e},useState:WS,useDebugValue:h_,useDeferredValue:function(e){return pi().memoizedState=e},useTransition:function(){var e=WS(!1),t=e[0];return e=mQ.bind(null,e[1]),pi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Qt,o=pi();if(Xt){if(r===void 0)throw Error(ze(407));r=r()}else{if(r=t(),Sr===null)throw Error(ze(349));Ll&30||QM(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,qS(tR.bind(null,n,i,e),[e]),n.flags|=2048,_p(9,eR.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=pi(),t=Sr.identifierPrefix;if(Xt){var r=fa,n=ua;r=(n&~(1<<32-Wo(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=wp++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[bi]=t,e[mp]=n,SR(e,t,!1,!1),t.stateNode=e;e:{switch(a=J5(r,n),r){case"dialog":qt("cancel",e),qt("close",e),o=n;break;case"iframe":case"object":case"embed":qt("load",e),o=n;break;case"video":case"audio":for(o=0;oOu&&(t.flags|=128,n=!0,Bf(i,!1),t.lanes=4194304)}else{if(!n)if(e=dv(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Bf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Xt)return Yr(t),null}else 2*lr()-i.renderingStartTime>Ou&&r!==1073741824&&(t.flags|=128,n=!0,Bf(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=lr(),t.sibling=null,r=Jt.current,Ut(Jt,n?r&1|2:r&1),t):(Yr(t),null);case 22:case 23:return w_(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ln&1073741824&&(Yr(t),t.subtreeFlags&6&&(t.flags|=8192)):Yr(t),null;case 24:return null;case 25:return null}throw Error(ze(156,t.tag))}function kQ(e,t){switch(e_(t),t.tag){case 1:return In(t.type)&&iv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cu(),Kt(An),Kt(ln),c_(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return l_(t),null;case 13:if(Kt(Jt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ze(340));Eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kt(Jt),null;case 4:return Cu(),null;case 10:return o_(t.type._context),null;case 22:case 23:return w_(),null;case 24:return null;default:return null}}var wh=!1,tn=!1,AQ=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Yc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){nr(e,t,n)}else r.current=null}function C3(e,t,r){try{r()}catch(n){nr(e,t,n)}}var t9=!1;function IQ(e,t){if(l3=tv,e=IM(),J6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var p;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++c===o&&(s=a),d===i&&++u===n&&(l=a),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(c3={focusedElem:e,selectionRange:r},tv=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){t=ot;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,_=h.memoizedState,w=t.stateNode,g=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:No(t.type,m),_);w.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ze(163))}}catch(A){nr(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}return h=t9,t9=!1,h}function Md(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&C3(t,r,i)}o=o.next}while(o!==n)}}function wy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function P3(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function OR(e){var t=e.alternate;t!==null&&(e.alternate=null,OR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bi],delete t[mp],delete t[d3],delete t[dQ],delete t[pQ])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kR(e){return e.tag===5||e.tag===3||e.tag===4}function r9(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function O3(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ov));else if(n!==4&&(e=e.child,e!==null))for(O3(e,t,r),e=e.sibling;e!==null;)O3(e,t,r),e=e.sibling}function k3(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(k3(e,t,r),e=e.sibling;e!==null;)k3(e,t,r),e=e.sibling}var Nr=null,Fo=!1;function Ha(e,t,r){for(r=r.child;r!==null;)AR(e,t,r),r=r.sibling}function AR(e,t,r){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(dy,r)}catch{}switch(r.tag){case 5:tn||Yc(r,t);case 6:var n=Nr,o=Fo;Nr=null,Ha(e,t,r),Nr=n,Fo=o,Nr!==null&&(Fo?(e=Nr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Nr.removeChild(r.stateNode));break;case 18:Nr!==null&&(Fo?(e=Nr,r=r.stateNode,e.nodeType===8?T2(e.parentNode,r):e.nodeType===1&&T2(e,r),dp(e)):T2(Nr,r.stateNode));break;case 4:n=Nr,o=Fo,Nr=r.stateNode.containerInfo,Fo=!0,Ha(e,t,r),Nr=n,Fo=o;break;case 0:case 11:case 14:case 15:if(!tn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&C3(r,t,a),o=o.next}while(o!==n)}Ha(e,t,r);break;case 1:if(!tn&&(Yc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){nr(r,t,s)}Ha(e,t,r);break;case 21:Ha(e,t,r);break;case 22:r.mode&1?(tn=(n=tn)||r.memoizedState!==null,Ha(e,t,r),tn=n):Ha(e,t,r);break;default:Ha(e,t,r)}}function n9(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new AQ),t.forEach(function(n){var o=jQ.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Io(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=lr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*TQ(n/1960))-n,10e?16:e,us===null)var n=!1;else{if(e=us,us=null,mv=0,kt&6)throw Error(ze(331));var o=kt;for(kt|=4,ot=e.current;ot!==null;){var i=ot,a=i.child;if(ot.flags&16){var s=i.deletions;if(s!==null){for(var l=0;llr()-y_?Dl(e,0):m_|=r),$n(e,t)}function FR(e,t){t===0&&(e.mode&1?(t=fh,fh<<=1,!(fh&130023424)&&(fh=4194304)):t=1);var r=yn();e=xa(e,t),e!==null&&(r0(e,t,r),$n(e,r))}function BQ(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),FR(e,r)}function jQ(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ze(314))}n!==null&&n.delete(t),FR(e,r)}var BR;BR=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||An.current)Pn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Pn=!1,PQ(e,t,r);Pn=!!(e.flags&131072)}else Pn=!1,Xt&&t.flags&1048576&&UM(t,lv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;S1(e,t),e=t.pendingProps;var o=_u(t,ln.current);uu(t,r),o=f_(null,t,n,e,o,r);var i=d_();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,In(n)?(i=!0,av(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,a_(t),o.updater=yy,t.stateNode=o,o._reactInternals=t,y3(t,n,e,r),t=x3(null,t,n,!0,i,r)):(t.tag=0,Xt&&i&&Q6(t),gn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(S1(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=UQ(n),e=No(n,e),o){case 0:t=w3(null,t,n,e,r);break e;case 1:t=JS(null,t,n,e,r);break e;case 11:t=XS(null,t,n,e,r);break e;case 14:t=ZS(null,t,n,No(n.type,e),r);break e}throw Error(ze(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:No(n,o),w3(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:No(n,o),JS(e,t,n,o,r);case 3:e:{if(xR(t),e===null)throw Error(ze(387));n=t.pendingProps,i=t.memoizedState,o=i.element,WM(e,t),fv(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Pu(Error(ze(423)),t),t=QS(e,t,n,r,o);break e}else if(n!==o){o=Pu(Error(ze(424)),t),t=QS(e,t,n,r,o);break e}else for(Un=_s(t.stateNode.containerInfo.firstChild),Hn=t,Xt=!0,Uo=null,r=YM(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Eu(),n===o){t=_a(e,t,r);break e}gn(e,t,n,r)}t=t.child}return t;case 5:return XM(t),e===null&&v3(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,u3(n,o)?a=null:i!==null&&u3(n,i)&&(t.flags|=32),wR(e,t),gn(e,t,a,r),t.child;case 6:return e===null&&v3(t),null;case 13:return _R(e,t,r);case 4:return s_(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Su(t,null,n,r):gn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:No(n,o),XS(e,t,n,o,r);case 7:return gn(e,t,t.pendingProps,r),t.child;case 8:return gn(e,t,t.pendingProps.children,r),t.child;case 12:return gn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Ut(cv,n._currentValue),n._currentValue=a,i!==null)if(Jo(i.value,a)){if(i.children===o.children&&!An.current){t=_a(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=va(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),g3(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ze(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),g3(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}gn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,uu(t,r),o=xo(o),n=n(o),t.flags|=1,gn(e,t,n,r),t.child;case 14:return n=t.type,o=No(n,t.pendingProps),o=No(n.type,o),ZS(e,t,n,o,r);case 15:return yR(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:No(n,o),S1(e,t),t.tag=1,In(n)?(e=!0,av(t)):e=!1,uu(t,r),GM(t,n,o),y3(t,n,o,r),x3(null,t,n,!0,e,r);case 19:return ER(e,t,r);case 22:return bR(e,t,r)}throw Error(ze(156,t.tag))};function jR(e,t){return fM(e,t)}function LQ(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,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 mo(e,t,r,n){return new LQ(e,t,r,n)}function __(e){return e=e.prototype,!(!e||!e.isReactComponent)}function UQ(e){if(typeof e=="function")return __(e)?1:0;if(e!=null){if(e=e.$$typeof,e===U6)return 11;if(e===z6)return 14}return 2}function Ps(e,t){var r=e.alternate;return r===null?(r=mo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function O1(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")__(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Lc:return Ml(r.children,o,i,t);case L6:a=8,o|=8;break;case z5:return e=mo(12,r,t,o|2),e.elementType=z5,e.lanes=i,e;case H5:return e=mo(13,r,t,o),e.elementType=H5,e.lanes=i,e;case V5:return e=mo(19,r,t,o),e.elementType=V5,e.lanes=i,e;case KD:return _y(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qD:a=10;break e;case GD:a=9;break e;case U6:a=11;break e;case z6:a=14;break e;case ts:a=16,n=null;break e}throw Error(ze(130,e==null?e:typeof e,""))}return t=mo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Ml(e,t,r,n){return e=mo(7,e,n,t),e.lanes=r,e}function _y(e,t,r,n){return e=mo(22,e,n,t),e.elementType=KD,e.lanes=r,e.stateNode={isHidden:!1},e}function L2(e,t,r){return e=mo(6,e,null,t),e.lanes=r,e}function U2(e,t,r){return t=mo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zQ(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=x2(0),this.expirationTimes=x2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=x2(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function E_(e,t,r,n,o,i,a,s,l){return e=new zQ(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=mo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},a_(i),e}function HQ(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HR)}catch(e){console.error(e)}}HR(),UD.exports=Zn;var Ys=UD.exports;const k1=ri(Ys);var f9=Ys;L5.createRoot=f9.createRoot,L5.hydrateRoot=f9.hydrateRoot;var ss=function(){return ss=Object.assign||function(t){for(var r,n=1,o=arguments.length;n"u")return fee;var t=dee(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},hee=qR(),vee=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),` - .`.concat(XQ,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(s,"px ").concat(n,`; - } - body { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(o,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(A1,` { - right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(I1,` { - margin-right: `).concat(s,"px ").concat(n,`; - } - - .`).concat(A1," .").concat(A1,` { - right: 0 `).concat(n,`; - } - - .`).concat(I1," .").concat(I1,` { - margin-right: 0 `).concat(n,`; - } - - body { - `).concat(ZQ,": ").concat(s,`px; - } -`)},gee=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=k.useMemo(function(){return pee(o)},[o]);return k.createElement(hee,{styles:vee(i,!t,o,r?"":"!important")})},D3=!1;if(typeof window<"u")try{var Eh=Object.defineProperty({},"passive",{get:function(){return D3=!0,!0}});window.addEventListener("test",Eh,Eh),window.removeEventListener("test",Eh,Eh)}catch{D3=!1}var yc=D3?{passive:!1}:!1,mee=function(e){return e.tagName==="TEXTAREA"},GR=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!mee(e)&&r[t]==="visible")},yee=function(e){return GR(e,"overflowY")},bee=function(e){return GR(e,"overflowX")},h9=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=KR(e,n);if(o){var i=YR(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},wee=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},xee=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},KR=function(e,t){return e==="v"?yee(t):bee(t)},YR=function(e,t){return e==="v"?wee(t):xee(t)},_ee=function(e,t){return e==="h"&&t==="rtl"?-1:1},Eee=function(e,t,r,n,o){var i=_ee(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,u=a>0,f=0,d=0;do{var p=YR(e,s),h=p[0],m=p[1],_=p[2],w=m-_-i*h;(h||w)&&KR(e,s)&&(f+=w,d+=h),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(o&&Math.abs(f)<1||!o&&a>f)||!u&&(o&&Math.abs(d)<1||!o&&-a>d))&&(c=!0),c},Sh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v9=function(e){return[e.deltaX,e.deltaY]},g9=function(e){return e&&"current"in e?e.current:e},See=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cee=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Pee=0,bc=[];function Oee(e){var t=k.useRef([]),r=k.useRef([0,0]),n=k.useRef(),o=k.useState(Pee++)[0],i=k.useState(qR)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=YQ([e.lockRef.current],(e.shards||[]).map(g9),!0).filter(Boolean);return m.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(m,_){if("touches"in m&&m.touches.length===2)return!a.current.allowPinchZoom;var w=Sh(m),g=r.current,E="deltaX"in m?m.deltaX:g[0]-w[0],A="deltaY"in m?m.deltaY:g[1]-w[1],N,D=m.target,y=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in m&&y==="h"&&D.type==="range")return!1;var U=h9(y,D);if(!U)return!0;if(U?N=y:(N=y==="v"?"h":"v",U=h9(y,D)),!U)return!1;if(!n.current&&"changedTouches"in m&&(E||A)&&(n.current=N),!N)return!0;var L=n.current||N;return Eee(L,_,m,L==="h"?E:A,!0)},[]),l=k.useCallback(function(m){var _=m;if(!(!bc.length||bc[bc.length-1]!==i)){var w="deltaY"in _?v9(_):Sh(_),g=t.current.filter(function(N){return N.name===_.type&&(N.target===_.target||_.target===N.shadowParent)&&See(N.delta,w)})[0];if(g&&g.should){_.cancelable&&_.preventDefault();return}if(!g){var E=(a.current.shards||[]).map(g9).filter(Boolean).filter(function(N){return N.contains(_.target)}),A=E.length>0?s(_,E[0]):!a.current.noIsolation;A&&_.cancelable&&_.preventDefault()}}},[]),c=k.useCallback(function(m,_,w,g){var E={name:m,delta:_,target:w,should:g,shadowParent:kee(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(A){return A!==E})},1)},[]),u=k.useCallback(function(m){r.current=Sh(m),n.current=void 0},[]),f=k.useCallback(function(m){c(m.type,v9(m),m.target,s(m,e.lockRef.current))},[]),d=k.useCallback(function(m){c(m.type,Sh(m),m.target,s(m,e.lockRef.current))},[]);k.useEffect(function(){return bc.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,yc),document.addEventListener("touchmove",l,yc),document.addEventListener("touchstart",u,yc),function(){bc=bc.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,yc),document.removeEventListener("touchmove",l,yc),document.removeEventListener("touchstart",u,yc)}},[]);var p=e.removeScrollBar,h=e.inert;return k.createElement(k.Fragment,null,h?k.createElement(i,{styles:Cee(o)}):null,p?k.createElement(gee,{gapMode:e.gapMode}):null)}function kee(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Aee=oee(WR,Oee);var XR=k.forwardRef(function(e,t){return k.createElement(Oy,ss({},e,{ref:t,sideCar:Aee}))});XR.classNames=Oy.classNames;const Iee=XR;function xv(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function $ee(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function Tee(e,t,r){for(let n=e+1;n{var l;r==null||r(s);const c=Array.from(((l=xv(s.currentTarget,e))==null?void 0:l.querySelectorAll(t))||[]).filter(m=>Dee(s.currentTarget,m,e)),u=c.findIndex(m=>s.currentTarget===m),f=Tee(u,c,n),d=$ee(u,c,n),p=i==="rtl"?d:f,h=i==="rtl"?f:d;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),o&&c[p].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),c[h].focus(),o&&c[h].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),o&&c[d].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),o&&c[f].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();const m=c.length-1;!c[m].disabled&&c[m].focus();break}}}}function Ree(e,t,r){var n;return r?Array.from(((n=xv(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function a0(e){const t=k.createContext(null);return[({children:o,value:i})=>ne.createElement(t.Provider,{value:i},o),()=>{const o=k.useContext(t);if(o===null)throw new Error(e);return o}]}function O_(e){return Array.isArray(e)?e:[e]}const Nee=()=>{};function Fee(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||Nee:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function da(e,t){return r=>{e==null||e(r),t==null||t(r)}}function Bee(){const[e,t]=k.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function jee({data:e}){const t=[],r=[],n=e.reduce((o,i,a)=>(i.group?o[i.group]?o[i.group].push(a):o[i.group]=[a]:r.push(a),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(i=>e[i]))}),t.push(...r.map(o=>e[o])),t}function Lee(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const Uee=typeof window<"u"?k.useLayoutEffect:k.useEffect;function zee(e){function t(n){const o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});Uee(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>Lee(`${e}:${String(n)}`,o[0])}return[t,r]}function s0(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==ne.Fragment:!1}function ZR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t({fontFamily:e.fontFamily||"sans-serif"})}var Wee=Object.defineProperty,m9=Object.getOwnPropertySymbols,qee=Object.prototype.hasOwnProperty,Gee=Object.prototype.propertyIsEnumerable,y9=(e,t,r)=>t in e?Wee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b9=(e,t)=>{for(var r in t||(t={}))qee.call(t,r)&&y9(e,r,t[r]);if(m9)for(var r of m9(t))Gee.call(t,r)&&y9(e,r,t[r]);return e};function Kee(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:b9({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:b9({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function l0(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function k_(e){const t=l0(e);return(r,n,o=!0,i=!0)=>{if(typeof r=="string"&&r.includes(".")){const[s,l]=r.split("."),c=parseInt(l,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof n=="number"&&!i?n:c]}const a=typeof n=="number"?n:t();return r in e.colors?e.colors[r][a]:o?e.colors[e.primaryColor][a]:r}}function QR(e){let t="";for(let r=1;r{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function tN(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const me=tN("rem"),bn=tN("em");function Re({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?bn(e):me(e):e||t.md}function Eo(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function Zee(e){return t=>`@media (min-width: ${bn(Eo(Re({size:t,sizes:e.breakpoints})))})`}function Jee(e){return t=>`@media (max-width: ${bn(Eo(Re({size:t,sizes:e.breakpoints}))-1)})`}function Qee(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function ete(e){let t=e.replace("#","");if(t.length===3){const a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function tte(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function A_(e){return Qee(e)?ete(e):e.startsWith("rgb")?tte(e):{r:0,g:0,b:0,a:1}}function Tc(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=A_(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function rte(e=0){return{position:"absolute",top:me(e),right:me(e),left:me(e),bottom:me(e)}}function nte(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=A_(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function ote(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a:i}=A_(e),a=s=>Math.round(s+(255-s)*t);return`rgba(${a(r)}, ${a(n)}, ${a(o)}, ${i})`}function ite(e){return t=>{if(typeof t=="number")return me(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function ate(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function ste(e){const t=k_(e),r=l0(e),n=eN(e);return({variant:o,color:i,gradient:a,primaryFallback:s})=>{const l=ate(i,e);switch(o){case"light":return{border:"transparent",background:Tc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Tc(t(i,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),hover:Tc(t(i,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(i,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(i,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?Tc(t(i,5,s,!1),.05):Tc(t(i,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(i,r()),hover:null};case"transparent":return{border:"transparent",color:i==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(i,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(a),color:e.white,border:"transparent",hover:null};default:{const c=r(),u=l.isSplittedColor?l.shade:c,f=l.isSplittedColor?l.key:i;return{border:"transparent",background:t(f,u,s),color:e.white,hover:t(f,u===9?8:u+1)}}}}}function lte(e){return t=>{const r=l0(e)(t);return e.colors[e.primaryColor][r]}}function cte(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function ute(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function fte(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const hr={fontStyles:Vee,themeColor:k_,focusStyles:Kee,linearGradient:Yee,radialGradient:Xee,smallerThan:Jee,largerThan:Zee,rgba:Tc,cover:rte,darken:nte,lighten:ote,radius:ite,variant:ste,primaryShade:l0,hover:cte,gradient:eN,primaryColor:lte,placeholderStyles:ute,dimmed:fte};var dte=Object.defineProperty,pte=Object.defineProperties,hte=Object.getOwnPropertyDescriptors,w9=Object.getOwnPropertySymbols,vte=Object.prototype.hasOwnProperty,gte=Object.prototype.propertyIsEnumerable,x9=(e,t,r)=>t in e?dte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mte=(e,t)=>{for(var r in t||(t={}))vte.call(t,r)&&x9(e,r,t[r]);if(w9)for(var r of w9(t))gte.call(t,r)&&x9(e,r,t[r]);return e},yte=(e,t)=>pte(e,hte(t));function rN(e){return yte(mte({},e),{fn:{fontStyles:hr.fontStyles(e),themeColor:hr.themeColor(e),focusStyles:hr.focusStyles(e),largerThan:hr.largerThan(e),smallerThan:hr.smallerThan(e),radialGradient:hr.radialGradient,linearGradient:hr.linearGradient,gradient:hr.gradient(e),rgba:hr.rgba,cover:hr.cover,lighten:hr.lighten,darken:hr.darken,primaryShade:hr.primaryShade(e),radius:hr.radius(e),variant:hr.variant(e),hover:hr.hover,primaryColor:hr.primaryColor(e),placeholderStyles:hr.placeholderStyles(e),dimmed:hr.dimmed(e)}})}const nN=["xs","sm","md","lg","xl"],bte={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Hee,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},I_=rN(bte);function wte(e){if(e.sheet)return e.sheet;for(var t=0;t0?Br(rf,--Tn):0,ku--,ur===10&&(ku=1,Ay--),ur}function Vn(){return ur=Tn2||Cp(ur)>3?"":" "}function Dte(e,t){for(;--t&&Vn()&&!(ur<48||ur>102||ur>57&&ur<65||ur>70&&ur<97););return c0(e,$1()+(t<6&&Ci()==32&&Vn()==32))}function R3(e){for(;Vn();)switch(ur){case e:return Tn;case 34:case 39:e!==34&&e!==39&&R3(ur);break;case 40:e===41&&R3(e);break;case 92:Vn();break}return Tn}function Mte(e,t){for(;Vn()&&e+ur!==47+10;)if(e+ur===42+42&&Ci()===47)break;return"/*"+c0(t,Tn-1)+"*"+ky(e===47?e:Vn())}function Rte(e){for(;!Cp(Ci());)Vn();return c0(e,Tn)}function Nte(e){return cN(D1("",null,null,null,[""],e=lN(e),0,[0],e))}function D1(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,f=a,d=0,p=0,h=0,m=1,_=1,w=1,g=0,E="",A=o,N=i,D=n,y=E;_;)switch(h=g,g=Vn()){case 40:if(h!=108&&Br(y,f-1)==58){M3(y+=$t(T1(g),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:y+=T1(g);break;case 9:case 10:case 13:case 32:y+=Tte(h);break;case 92:y+=Dte($1()-1,7);continue;case 47:switch(Ci()){case 42:case 47:Ch(Fte(Mte(Vn(),$1()),t,r),l);break;default:y+="/"}break;case 123*m:s[c++]=mi(y)*w;case 125*m:case 59:case 0:switch(g){case 0:case 125:_=0;case 59+u:w==-1&&(y=$t(y,/\f/g,"")),p>0&&mi(y)-f&&Ch(p>32?E9(y+";",n,r,f-1):E9($t(y," ","")+";",n,r,f-2),l);break;case 59:y+=";";default:if(Ch(D=_9(y,t,r,c,u,o,s,E,A=[],N=[],f),i),g===123)if(u===0)D1(y,t,D,D,A,i,f,s,N);else switch(d===99&&Br(y,3)===110?100:d){case 100:case 108:case 109:case 115:D1(e,D,D,n&&Ch(_9(e,D,D,0,0,o,s,E,o,A=[],f),N),o,N,f,s,n?A:N);break;default:D1(y,D,D,D,[""],N,0,s,N)}}c=u=p=0,m=w=1,E=y="",f=a;break;case 58:f=1+mi(y),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&$te()==125)continue}switch(y+=ky(g),g*m){case 38:w=u>0?1:(y+="\f",-1);break;case 44:s[c++]=(mi(y)-1)*w,w=1;break;case 64:Ci()===45&&(y+=T1(Vn())),d=Ci(),u=f=mi(E=y+=Rte($1())),g++;break;case 45:h===45&&mi(y)==2&&(m=0)}}return i}function _9(e,t,r,n,o,i,a,s,l,c,u){for(var f=o-1,d=o===0?i:[""],p=D_(d),h=0,m=0,_=0;h0?d[w]+" "+g:$t(g,/&\f/g,d[w])))&&(l[_++]=E);return Iy(e,t,r,o===0?$_:s,l,c,u)}function Fte(e,t,r){return Iy(e,t,r,oN,ky(Ite()),Sp(e,2,-2),0)}function E9(e,t,r,n){return Iy(e,t,r,T_,Sp(e,0,n),Sp(e,n+1,-1),n)}function du(e,t){for(var r="",n=D_(e),o=0;o6)switch(Br(e,t+1)){case 109:if(Br(e,t+4)!==45)break;case 102:return $t(e,/(.+:)(.+)-([^]+)/,"$1"+It+"$2-$3$1"+_v+(Br(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~M3(e,"stretch")?fN($t(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Br(e,t+1)!==115)break;case 6444:switch(Br(e,mi(e)-3-(~M3(e,"!important")&&10))){case 107:return $t(e,":",":"+It)+e;case 101:return $t(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+It+(Br(e,14)===45?"inline-":"")+"box$3$1"+It+"$2$3$1"+Qr+"$2box$3")+e}break;case 5936:switch(Br(e,t+11)){case 114:return It+e+Qr+$t(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return It+e+Qr+$t(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return It+e+Qr+$t(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return It+e+Qr+e+e}return e}var qte=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case T_:t.return=fN(t.value,t.length);break;case iN:return du([Lf(t,{value:$t(t.value,"@","@"+It)})],o);case $_:if(t.length)return Ate(t.props,function(i){switch(kte(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return du([Lf(t,{props:[$t(i,/:(read-\w+)/,":"+_v+"$1")]})],o);case"::placeholder":return du([Lf(t,{props:[$t(i,/:(plac\w+)/,":"+It+"input-$1")]}),Lf(t,{props:[$t(i,/:(plac\w+)/,":"+_v+"$1")]}),Lf(t,{props:[$t(i,/:(plac\w+)/,Qr+"input-$1")]})],o)}return""})}},Gte=[qte],dN=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(m){var _=m.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var o=t.stylisPlugins||Gte,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(m){for(var _=m.getAttribute("data-emotion").split(" "),w=1;w<_.length;w++)i[_[w]]=!0;s.push(m)});var l,c=[Vte,Wte];{var u,f=[Bte,Lte(function(m){u.insert(m)})],d=jte(c.concat(o,f)),p=function(_){return du(Nte(_),d)};l=function(_,w,g,E){u=g,p(_?_+"{"+w.styles+"}":w.styles),E&&(h.inserted[w.name]=!0)}}var h={key:r,sheet:new _te({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return h.sheet.hydrate(s),h};function N3(){return N3=Object.assign?Object.assign.bind():function(e){for(var t=1;t=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var fre={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},dre=/[A-Z]|^ms/g,pre=/_EMO_([^_]+?)_([^]*?)_EMO_/g,yN=function(t){return t.charCodeAt(1)===45},A9=function(t){return t!=null&&typeof t!="boolean"},W2=uN(function(e){return yN(e)?e:e.replace(dre,"-$&").toLowerCase()}),I9=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(pre,function(n,o,i){return yi={name:o,styles:i,next:yi},o})}return fre[t]!==1&&!yN(t)&&typeof r=="number"&&r!==0?r+"px":r};function Pp(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return yi={name:r.name,styles:r.styles,next:yi},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)yi={name:n.name,styles:n.styles,next:yi},n=n.next;var o=r.styles+";";return o}return hre(e,t,r)}case"function":{if(e!==void 0){var i=yi,a=r(e);return yi=i,Pp(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function hre(e,t,r){var n="";if(Array.isArray(r))for(var o=0;ot in e?xre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pre=(e,t)=>{for(var r in t||(t={}))Sre.call(t,r)&&M9(e,r,t[r]);if(D9)for(var r of D9(t))Cre.call(t,r)&&M9(e,r,t[r]);return e},Ore=(e,t)=>_re(e,Ere(t));function kre({theme:e}){return ne.createElement(u0,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Ore(Pre({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function Uf(e,t,r,n=me){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function Are({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};Uf(t,e.shadows,"shadow"),Uf(t,e.fontSizes,"font-size"),Uf(t,e.radius,"radius"),Uf(t,e.spacing,"spacing"),Uf(t,e.breakpoints,"breakpoints",bn),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,i)=>{t[`--mantine-color-${n}-${i}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),ne.createElement(u0,{styles:{":root":t}})}var Ire=Object.defineProperty,$re=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,R9=Object.getOwnPropertySymbols,Dre=Object.prototype.hasOwnProperty,Mre=Object.prototype.propertyIsEnumerable,N9=(e,t,r)=>t in e?Ire(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,si=(e,t)=>{for(var r in t||(t={}))Dre.call(t,r)&&N9(e,r,t[r]);if(R9)for(var r of R9(t))Mre.call(t,r)&&N9(e,r,t[r]);return e},q2=(e,t)=>$re(e,Tre(t));function Rre(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,i)=>{if(i==="headings"&&t.headings){const a=t.headings.sizes?Object.keys(e.headings.sizes).reduce((s,l)=>(s[l]=si(si({},e.headings.sizes[l]),t.headings.sizes[l]),s),{}):e.headings.sizes;return q2(si({},o),{headings:q2(si(si({},e.headings),t.headings),{sizes:a})})}if(i==="breakpoints"&&t.breakpoints){const a=si(si({},e.breakpoints),t.breakpoints);return q2(si({},o),{breakpoints:Object.fromEntries(Object.entries(a).sort((s,l)=>Eo(s[1])-Eo(l[1])))})}return o[i]=typeof t[i]=="object"?si(si({},e[i]),t[i]):typeof t[i]=="number"||typeof t[i]=="boolean"||typeof t[i]=="function"?t[i]:t[i]||e[i],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function Nre(e,t){return rN(Rre(e,t))}function wN(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const Fre={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${me(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function Bre(){return ne.createElement(u0,{styles:Fre})}var jre=Object.defineProperty,F9=Object.getOwnPropertySymbols,Lre=Object.prototype.hasOwnProperty,Ure=Object.prototype.propertyIsEnumerable,B9=(e,t,r)=>t in e?jre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fd=(e,t)=>{for(var r in t||(t={}))Lre.call(t,r)&&B9(e,r,t[r]);if(F9)for(var r of F9(t))Ure.call(t,r)&&B9(e,r,t[r]);return e};const Ev=k.createContext({theme:I_});function Ir(){var e;return((e=k.useContext(Ev))==null?void 0:e.theme)||I_}function zre(e){const t=Ir(),r=n=>{var o,i,a,s;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((i=t.components[n])==null?void 0:i.classNames)||{},variants:(a=t.components[n])==null?void 0:a.variants,sizes:(s=t.components[n])==null?void 0:s.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function xN(){var e;return(e=k.useContext(Ev))==null?void 0:e.emotionCache}function tt(e,t,r){var n;const o=Ir(),i=(n=o.components[e])==null?void 0:n.defaultProps,a=typeof i=="function"?i(o):i;return Fd(Fd(Fd({},t),a),wN(r))}function _N({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:i=!1,children:a}){const s=k.useContext(Ev),l=Nre(I_,i?Fd(Fd({},s.theme),e):e);return ne.createElement(bre,{theme:l},ne.createElement(Ev.Provider,{value:{theme:l,emotionCache:t}},r&&ne.createElement(Bre,null),n&&ne.createElement(kre,{theme:l}),o&&ne.createElement(Are,{theme:l}),typeof l.globalStyles=="function"&&ne.createElement(u0,{styles:l.globalStyles(l)}),a))}_N.displayName="@mantine/core/MantineProvider";const EN=k.createContext(null);function Hre(){const e=k.useContext(EN);if(!e)throw new Error("useMantineColorScheme hook was called outside of context, make sure your app is wrapped with ColorSchemeProvider component");return e}function SN({colorScheme:e,toggleColorScheme:t,children:r}){return ne.createElement(EN.Provider,{value:{colorScheme:e,toggleColorScheme:t}},r)}SN.displayName="@mantine/core/ColorSchemeProvider";const Vre={app:100,modal:200,popover:300,overlay:400,max:9999};function Ta(e){return Vre[e]}function Wre(e,t){const r=k.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const qre=dN({key:"mantine",prepend:!0});function Gre(){return xN()||qre}var Kre=Object.defineProperty,j9=Object.getOwnPropertySymbols,Yre=Object.prototype.hasOwnProperty,Xre=Object.prototype.propertyIsEnumerable,L9=(e,t,r)=>t in e?Kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zre=(e,t)=>{for(var r in t||(t={}))Yre.call(t,r)&&L9(e,r,t[r]);if(j9)for(var r of j9(t))Xre.call(t,r)&&L9(e,r,t[r]);return e};const G2="ref";function Jre(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(G2 in r))return{args:e,ref:t};t=r[G2];const n=Zre({},r);return delete n[G2],{args:[n],ref:t}}const{cssFactory:Qre}=(()=>{function e(r,n,o){const i=[],a=lre(r,i,o);return i.length<2?o:a+n(i)}function t(r){const{cache:n}=r,o=(...a)=>{const{ref:s,args:l}=Jre(a),c=L_(l,n.registered);return mN(n,c,!1),`${n.key}-${c.name}${s===void 0?"":` ${s}`}`};return{css:o,cx:(...a)=>e(n.registered,o,JR(a))}}return{cssFactory:t}})();function CN(){const e=Gre();return Wre(()=>Qre({cache:e}),[e])}function ene({cx:e,classes:t,context:r,classNames:n,name:o,cache:i}){const a=r.reduce((s,l)=>(Object.keys(l.classNames).forEach(c=>{typeof s[c]!="string"?s[c]=`${l.classNames[c]}`:s[c]=`${s[c]} ${l.classNames[c]}`}),s),{});return Object.keys(t).reduce((s,l)=>(s[l]=e(t[l],a[l],n!=null&&n[l],Array.isArray(o)?o.filter(Boolean).map(c=>`${(i==null?void 0:i.key)||"mantine"}-${c}-${l}`).join(" "):o?`${(i==null?void 0:i.key)||"mantine"}-${o}-${l}`:null),s),{})}var tne=Object.defineProperty,U9=Object.getOwnPropertySymbols,rne=Object.prototype.hasOwnProperty,nne=Object.prototype.propertyIsEnumerable,z9=(e,t,r)=>t in e?tne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,K2=(e,t)=>{for(var r in t||(t={}))rne.call(t,r)&&z9(e,r,t[r]);if(U9)for(var r of U9(t))nne.call(t,r)&&z9(e,r,t[r]);return e};function j3(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=K2(K2({},e[r]),t[r]):e[r]=K2({},t[r])}),e}function H9(e,t,r,n){const o=i=>typeof i=="function"?i(t,r||{},n):i||{};return Array.isArray(e)?e.map(i=>o(i.styles)).reduce((i,a)=>j3(i,a),{}):o(e)}function one({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((i,a)=>(a.variants&&n in a.variants&&j3(i,a.variants[n](t,r,{variant:n,size:o})),a.sizes&&o in a.sizes&&j3(i,a.sizes[o](t,r,{variant:n,size:o})),i),{})}function it(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const i=Ir(),a=zre(o==null?void 0:o.name),s=xN(),l={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:c,cx:u}=CN(),f=t(i,n,l),d=H9(o==null?void 0:o.styles,i,n,l),p=H9(a,i,n,l),h=one({ctx:a,theme:i,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),m=Object.fromEntries(Object.keys(f).map(_=>{const w=u({[c(f[_])]:!(o!=null&&o.unstyled)},c(h[_]),c(p[_]),c(d[_]));return[_,w]}));return{classes:ene({cx:u,classes:m,context:a,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:s}),cx:u,theme:i}}return r}function zo(e){return`___ref-${e||""}`}function PN({styles:e}){const t=Ir();return ne.createElement(u0,{styles:wre(typeof e=="function"?e(t):e)})}var ine=Object.defineProperty,ane=Object.defineProperties,sne=Object.getOwnPropertyDescriptors,V9=Object.getOwnPropertySymbols,lne=Object.prototype.hasOwnProperty,cne=Object.prototype.propertyIsEnumerable,W9=(e,t,r)=>t in e?ine(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zf=(e,t)=>{for(var r in t||(t={}))lne.call(t,r)&&W9(e,r,t[r]);if(V9)for(var r of V9(t))cne.call(t,r)&&W9(e,r,t[r]);return e},Hf=(e,t)=>ane(e,sne(t));const Vf={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${me(10)})`},transitionProperty:"transform, opacity"},Ph={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${me(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:Hf(zf({},Vf),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Hf(zf({},Vf),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Hf(zf({},Vf),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Hf(zf({},Vf),{common:{transformOrigin:"top left"}}),"pop-top-right":Hf(zf({},Vf),{common:{transformOrigin:"top right"}})},q9=["mousedown","touchstart"];function une(e,t,r){const n=k.useRef();return k.useEffect(()=>{const o=i=>{const{target:a}=i??{};if(Array.isArray(r)){const s=(a==null?void 0:a.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||q9).forEach(i=>document.addEventListener(i,o)),()=>{(t||q9).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}function fne({timeout:e=2e3}={}){const[t,r]=k.useState(null),[n,o]=k.useState(!1),[i,a]=k.useState(null),s=u=>{clearTimeout(i),a(setTimeout(()=>o(!1),e)),o(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>s(!0)).catch(f=>r(f)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),clearTimeout(i)},error:t,copied:n}}function dne(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function pne(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function hne(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=k.useState(r?t:pne(e,t)),i=k.useRef();return k.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),dne(i.current,a=>o(a.matches))},[e]),n}function Os(e,t,r){return Math.min(Math.max(e,t),r)}const U_=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Yn(e,t){const r=k.useRef(!1);k.useEffect(()=>()=>{r.current=!1},[]),k.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function ON({opened:e,shouldReturnFocus:t=!0}){const r=k.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return Yn(()=>{let o=-1;const i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}const vne=/input|select|textarea|button|object/,kN="a, input, select, textarea, button, object, [tabindex]";function gne(e){return e.style.display==="none"}function mne(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(gne(r))return!1;r=r.parentNode}return!0}function AN(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function L3(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(AN(e));return(vne.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&mne(e)}function IN(e){const t=AN(e);return(Number.isNaN(t)||t>=0)&&L3(e)}function yne(e){return Array.from(e.querySelectorAll(kN)).filter(IN)}function bne(e,t){const r=yne(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const a=r[t.shiftKey?r.length-1:0];a&&a.focus()}function Uy(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function wne(e,t="body > :not(script)"){const r=Uy(),n=Array.from(document.querySelectorAll(t)).map(o=>{var i;if((i=o==null?void 0:o.shadowRoot)!=null&&i.contains(e)||o.contains(e))return;const a=o.getAttribute("aria-hidden"),s=o.getAttribute("data-hidden"),l=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),a===null||a==="false"?o.setAttribute("aria-hidden","true"):!s&&!l&&o.setAttribute("data-hidden",a),{node:o,ariaHidden:s||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function xne(e=!0){const t=k.useRef(),r=k.useRef(null),n=i=>{let a=i.querySelector("[data-autofocus]");if(!a){const s=Array.from(i.querySelectorAll(kN));a=s.find(IN)||s.find(L3)||null,!a&&L3(i)&&(a=i)}a&&a.focus({preventScroll:!0})},o=k.useCallback(i=>{if(e){if(i===null){r.current&&(r.current(),r.current=null);return}r.current=wne(i),t.current!==i&&(i?(setTimeout(()=>{i.getRootNode()&&n(i)}),t.current=i):t.current=null)}},[e]);return k.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const i=a=>{a.key==="Tab"&&t.current&&bne(t.current,a)};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),r.current&&r.current()}},[e]),o}const _ne=e=>(e+1)%1e6;function Ene(){const[,e]=k.useReducer(_ne,0);return e}const Sne=ne["useId".toString()]||(()=>{});function Cne(){const e=Sne();return e?`mantine-${e.replace(/:/g,"")}`:""}function Ql(e){const t=Cne(),[r,n]=k.useState(t);return U_(()=>{n(Uy())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Op(e,t,r){k.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Pne(e,t){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function One(e){try{return JSON.parse(e)}catch{return e}}function kne(e,t){const r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage";return function({key:o,defaultValue:i=void 0,getInitialValueInEffect:a=!0,deserialize:s=One,serialize:l=c=>Pne(c,t)}){const c=k.useCallback(h=>{if(typeof window>"u"||!(e in window)||window[e]===null||h)return i;const m=window[e].getItem(o);return m!==null?s(m):i},[o,i]),[u,f]=k.useState(c(a)),d=k.useCallback(h=>{h instanceof Function?f(m=>{const _=h(m);return window[e].setItem(o,l(_)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h(m)}})),_}):(window[e].setItem(o,l(h)),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:h}})),f(h))},[o]),p=k.useCallback(()=>{window[e].removeItem(o),window.dispatchEvent(new CustomEvent(r,{detail:{key:o,value:i}}))},[]);return Op("storage",h=>{var m;h.storageArea===window[e]&&h.key===o&&f(s((m=h.newValue)!=null?m:void 0))}),Op(r,h=>{h.detail.key===o&&f(h.detail.value)}),k.useEffect(()=>{i!==void 0&&u===void 0&&d(i)},[i,u,d]),k.useEffect(()=>{a&&f(c())},[o]),[u===void 0?i:u,d,p]}}function Ane(e){return kne("localStorage","use-local-storage")(e)}function $N(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function TN(...e){return t=>{e.forEach(r=>$N(r,t))}}function Xs(...e){return k.useCallback(TN(...e),e)}function Ine(e,t,r="ltr"){const n=k.useRef(),o=k.useRef(!1),i=k.useRef(!1),a=k.useRef(0),[s,l]=k.useState(!1);return k.useEffect(()=>{o.current=!0},[]),k.useEffect(()=>{const c=({x:g,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(o.current&&n.current){n.current.style.userSelect="none";const A=n.current.getBoundingClientRect();if(A.width&&A.height){const N=Os((g-A.left)/A.width,0,1);e({x:r==="ltr"?N:1-N,y:Os((E-A.top)/A.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",m),document.addEventListener("mouseup",p),document.addEventListener("touchmove",w),document.addEventListener("touchend",p)},f=()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",p),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",p)},d=()=>{!i.current&&o.current&&(i.current=!0,typeof(t==null?void 0:t.onScrubStart)=="function"&&t.onScrubStart(),l(!0),u())},p=()=>{i.current&&o.current&&(i.current=!1,l(!1),f(),setTimeout(()=>{typeof(t==null?void 0:t.onScrubEnd)=="function"&&t.onScrubEnd()},0))},h=g=>{d(),g.preventDefault(),m(g)},m=g=>c({x:g.clientX,y:g.clientY}),_=g=>{g.cancelable&&g.preventDefault(),d(),w(g)},w=g=>{g.cancelable&&g.preventDefault(),c({x:g.changedTouches[0].clientX,y:g.changedTouches[0].clientY})};return n.current.addEventListener("mousedown",h),n.current.addEventListener("touchstart",_,{passive:!1}),()=>{n.current&&(n.current.removeEventListener("mousedown",h),n.current.removeEventListener("touchstart",_))}},[r,e]),{ref:n,active:s}}function Hl({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,i]=k.useState(t!==void 0?t:r),a=s=>{i(s),n==null||n(s)};return e!==void 0?[e,n,!0]:[o,a,!1]}function $ne({initialValues:e=[],limit:t}){const[{state:r,queue:n},o]=k.useState({state:e.slice(0,t),queue:e.slice(t)});return{state:r,queue:n,add:(...l)=>o(c=>{const u=[...c.state,...c.queue,...l];return{state:u.slice(0,t),queue:u.slice(t)}}),update:l=>o(c=>{const u=l([...c.state,...c.queue]);return{state:u.slice(0,t),queue:u.slice(t)}}),cleanQueue:()=>o(l=>({state:l.state,queue:[]}))}}function f0(e,t){return hne("(prefers-reduced-motion: reduce)",e,t)}const Tne=e=>e<.5?2*e*e:-1+(4-2*e)*e,Dne=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:i})=>{if(!t||!r&&typeof document>"u")return 0;const a=!!r,l=(r||document.body).getBoundingClientRect(),c=t.getBoundingClientRect(),u=f=>c[f]-l[f];if(e==="y"){const f=u("top");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.height*(i?0:1)||!i?p:0}const d=a?l.height:window.innerHeight;if(n==="end"){const p=f+o-d+c.height;return p>=-c.height*(i?0:1)||!i?p:0}return n==="center"?f-d/2+c.height/2:0}if(e==="x"){const f=u("left");if(f===0)return 0;if(n==="start"){const p=f-o;return p<=c.width||!i?p:0}const d=a?l.width:window.innerWidth;if(n==="end"){const p=f+o-d+c.width;return p>=-c.width||!i?p:0}return n==="center"?f-d/2+c.width/2:0}return 0},Mne=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},Rne=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:i}=document;o[n]=r,i[n]=r}};function Nne({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=Tne,offset:o=0,cancelable:i=!0,isList:a=!1}={}){const s=k.useRef(0),l=k.useRef(0),c=k.useRef(!1),u=k.useRef(null),f=k.useRef(null),d=f0(),p=()=>{s.current&&cancelAnimationFrame(s.current)},h=k.useCallback(({alignment:_="start"}={})=>{var w;c.current=!1,s.current&&p();const g=(w=Mne({parent:u.current,axis:t}))!=null?w:0,E=Dne({parent:u.current,target:f.current,axis:t,alignment:_,offset:o,isList:a})-(u.current?0:g);function A(){l.current===0&&(l.current=performance.now());const D=performance.now()-l.current,y=d||e===0?1:D/e,U=g+E*n(y);Rne({parent:u.current,axis:t,distance:U}),!c.current&&y<1?s.current=requestAnimationFrame(A):(typeof r=="function"&&r(),l.current=0,s.current=0,p())}A()},[t,e,n,a,o,r,d]),m=()=>{i&&(c.current=!0)};return Op("wheel",m,{passive:!0}),Op("touchmove",m,{passive:!0}),k.useEffect(()=>p,[]),{scrollableRef:u,targetRef:f,scrollIntoView:h,cancel:p}}var Fne=Object.defineProperty,Bne=Object.defineProperties,jne=Object.getOwnPropertyDescriptors,G9=Object.getOwnPropertySymbols,Lne=Object.prototype.hasOwnProperty,Une=Object.prototype.propertyIsEnumerable,K9=(e,t,r)=>t in e?Fne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zne=(e,t)=>{for(var r in t||(t={}))Lne.call(t,r)&&K9(e,r,t[r]);if(G9)for(var r of G9(t))Une.call(t,r)&&K9(e,r,t[r]);return e},Hne=(e,t)=>Bne(e,jne(t));function Vne(e){const t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return Hne(zne({},r),{key:o})}function Wne(e,t){const{alt:r,ctrl:n,meta:o,mod:i,shift:a,key:s}=e,{altKey:l,ctrlKey:c,metaKey:u,shiftKey:f,key:d}=t;if(r!==l)return!1;if(i){if(!c&&!u)return!1}else if(n!==c||o!==u)return!1;return a!==f?!1:!!(s&&(d.toLowerCase()===s.toLowerCase()||t.code.replace("Key","").toLowerCase()===s.toLowerCase()))}function qne(e){return t=>Wne(Vne(e),t)}function Gne(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function Kne(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){k.useEffect(()=>{const n=o=>{e.forEach(([i,a,s={preventDefault:!0}])=>{qne(i)(o)&&Gne(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}function Y9(){if(typeof window>"u")return"undetermined";const{userAgent:e}=window.navigator,t=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,r=/(Win32)|(Win64)|(Windows)|(WinCE)/i,n=/(iPhone)|(iPad)|(iPod)/i;return t.test(e)?"macos":n.test(e)?"ios":r.test(e)?"windows":/Android/i.test(e)?"android":/Linux/i.test(e)?"linux":"undetermined"}function Yne(e={getValueInEffect:!0}){const[t,r]=k.useState(e.getValueInEffect?"undetermined":Y9());return U_(()=>{e.getValueInEffect&&r(Y9)},[]),t}function DN(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,i]=k.useState(e),a=k.useCallback(()=>{i(c=>c||(r==null||r(),!0))},[r]),s=k.useCallback(()=>{i(c=>c&&(n==null||n(),!1))},[n]),l=k.useCallback(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var X9=Object.getOwnPropertySymbols,Xne=Object.prototype.hasOwnProperty,Zne=Object.prototype.propertyIsEnumerable,Jne=(e,t)=>{var r={};for(var n in e)Xne.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&X9)for(var n of X9(e))t.indexOf(n)<0&&Zne.call(e,n)&&(r[n]=e[n]);return r};function nf(e){const t=e,{m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:m,bg:_,c:w,opacity:g,ff:E,fz:A,fw:N,lts:D,ta:y,lh:U,fs:L,tt:G,td:V,w:S,miw:C,maw:v,h:b,mih:B,mah:T,bgsz:j,bgp:H,bgr:P,bga:F,pos:$,top:q,left:J,bottom:te,right:ae,inset:ce,display:ie}=t,ue=Jne(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:wN({m:r,mx:n,my:o,mt:i,mb:a,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:p,pl:h,pr:m,bg:_,c:w,opacity:g,ff:E,fz:A,fw:N,lts:D,ta:y,lh:U,fs:L,tt:G,td:V,w:S,miw:C,maw:v,h:b,mih:B,mah:T,bgsz:j,bgp:H,bgr:P,bga:F,pos:$,top:q,left:J,bottom:te,right:ae,inset:ce,display:ie}),rest:ue}}function Qne(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>Eo(Re({size:n,sizes:t.breakpoints}))-Eo(Re({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function eoe({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return Qne(e,t).reduce((a,s)=>{if(s==="base"&&e.base!==void 0){const c=r(e.base,t);return Array.isArray(n)?(n.forEach(u=>{a[u]=c}),a):(a[n]=c,a)}const l=r(e[s],t);return Array.isArray(n)?(a[t.fn.largerThan(s)]={},n.forEach(c=>{a[t.fn.largerThan(s)][c]=l}),a):(a[t.fn.largerThan(s)]={[n]:l},a)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((i,a)=>(i[a]=o,i),{}):{[n]:o}}function toe(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function roe(e){return me(e)}function noe(e){return e}function ooe(e,t){return Re({size:e,sizes:t.fontSizes})}const ioe=["-xs","-sm","-md","-lg","-xl"];function aoe(e,t){return ioe.includes(e)?`calc(${Re({size:e.replace("-",""),sizes:t.spacing})} * -1)`:Re({size:e,sizes:t.spacing})}const soe={identity:noe,color:toe,size:roe,fontSize:ooe,spacing:aoe},loe={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var coe=Object.defineProperty,Z9=Object.getOwnPropertySymbols,uoe=Object.prototype.hasOwnProperty,foe=Object.prototype.propertyIsEnumerable,J9=(e,t,r)=>t in e?coe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q9=(e,t)=>{for(var r in t||(t={}))uoe.call(t,r)&&J9(e,r,t[r]);if(Z9)for(var r of Z9(t))foe.call(t,r)&&J9(e,r,t[r]);return e};function e7(e,t,r=loe){return Object.keys(r).reduce((o,i)=>(i in e&&e[i]!==void 0&&o.push(eoe({value:e[i],getValue:soe[r[i].type],property:r[i].property,theme:t})),o),[]).reduce((o,i)=>(Object.keys(i).forEach(a=>{typeof i[a]=="object"&&i[a]!==null&&a in o?o[a]=Q9(Q9({},o[a]),i[a]):o[a]=i[a]}),o),{})}function t7(e,t){return typeof e=="function"?e(t):e}function doe(e,t,r){const n=Ir(),{css:o,cx:i}=CN();return Array.isArray(e)?i(r,o(e7(t,n)),e.map(a=>o(t7(a,n)))):i(r,o(t7(e,n)),o(e7(t,n)))}var poe=Object.defineProperty,Sv=Object.getOwnPropertySymbols,MN=Object.prototype.hasOwnProperty,RN=Object.prototype.propertyIsEnumerable,r7=(e,t,r)=>t in e?poe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hoe=(e,t)=>{for(var r in t||(t={}))MN.call(t,r)&&r7(e,r,t[r]);if(Sv)for(var r of Sv(t))RN.call(t,r)&&r7(e,r,t[r]);return e},voe=(e,t)=>{var r={};for(var n in e)MN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sv)for(var n of Sv(e))t.indexOf(n)<0&&RN.call(e,n)&&(r[n]=e[n]);return r};const NN=k.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:i,sx:a}=r,s=voe(r,["className","component","style","sx"]);const{systemStyles:l,rest:c}=nf(s),u=o||"div";return ne.createElement(u,hoe({ref:t,className:doe(a,l,n),style:i},c))});NN.displayName="@mantine/core/Box";const Je=NN;var goe=Object.defineProperty,moe=Object.defineProperties,yoe=Object.getOwnPropertyDescriptors,n7=Object.getOwnPropertySymbols,boe=Object.prototype.hasOwnProperty,woe=Object.prototype.propertyIsEnumerable,o7=(e,t,r)=>t in e?goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i7=(e,t)=>{for(var r in t||(t={}))boe.call(t,r)&&o7(e,r,t[r]);if(n7)for(var r of n7(t))woe.call(t,r)&&o7(e,r,t[r]);return e},xoe=(e,t)=>moe(e,yoe(t)),_oe=it(e=>({root:xoe(i7(i7({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const Eoe=_oe;var Soe=Object.defineProperty,Cv=Object.getOwnPropertySymbols,FN=Object.prototype.hasOwnProperty,BN=Object.prototype.propertyIsEnumerable,a7=(e,t,r)=>t in e?Soe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Coe=(e,t)=>{for(var r in t||(t={}))FN.call(t,r)&&a7(e,r,t[r]);if(Cv)for(var r of Cv(t))BN.call(t,r)&&a7(e,r,t[r]);return e},Poe=(e,t)=>{var r={};for(var n in e)FN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cv)for(var n of Cv(e))t.indexOf(n)<0&&BN.call(e,n)&&(r[n]=e[n]);return r};const jN=k.forwardRef((e,t)=>{const r=tt("UnstyledButton",{},e),{className:n,component:o="button",unstyled:i,variant:a}=r,s=Poe(r,["className","component","unstyled","variant"]),{classes:l,cx:c}=Eoe(null,{name:"UnstyledButton",unstyled:i,variant:a});return ne.createElement(Je,Coe({component:o,ref:t,className:c(l.root,n),type:o==="button"?"button":void 0},s))});jN.displayName="@mantine/core/UnstyledButton";const d0=jN;var Ooe=Object.defineProperty,koe=Object.defineProperties,Aoe=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,UN=Object.prototype.propertyIsEnumerable,s7=(e,t,r)=>t in e?Ooe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,al=(e,t)=>{for(var r in t||(t={}))LN.call(t,r)&&s7(e,r,t[r]);if(Pv)for(var r of Pv(t))UN.call(t,r)&&s7(e,r,t[r]);return e},Y2=(e,t)=>koe(e,Aoe(t)),Ioe=(e,t)=>{var r={};for(var n in e)LN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pv)for(var n of Pv(e))t.indexOf(n)<0&&UN.call(e,n)&&(r[n]=e[n]);return r};function $oe(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function X2(e){return e!=null&&e.current?e.current.scrollHeight:"auto"}const Oh=typeof window<"u"&&window.requestAnimationFrame;function Toe({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){const o=k.useRef(null),i=0,a={display:"none",height:0,overflow:"hidden"},[s,l]=k.useState(n?{}:a),c=h=>{Ys.flushSync(()=>l(h))},u=h=>{c(m=>al(al({},m),h))};function f(h){return{transition:`height ${e||$oe(h)}ms ${t}`}}Yn(()=>{Oh(n?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),Oh(()=>{const h=X2(o);u(Y2(al({},f(h)),{height:h}))})}:()=>{const h=X2(o);u(Y2(al({},f(h)),{willChange:"height",height:h})),Oh(()=>u({height:i,overflow:"hidden"}))})},[n]);const d=h=>{if(!(h.target!==o.current||h.propertyName!=="height"))if(n){const m=X2(o);m===s.height?c({}):u({height:m}),r()}else s.height===i&&(c(a),r())};function p(h={}){var m=h,{style:_={},refKey:w="ref"}=m,g=Ioe(m,["style","refKey"]);const E=g[w];return Y2(al({"aria-hidden":!n},g),{[w]:TN(o,E),onTransitionEnd:d,style:al(al({boxSizing:"border-box"},_),s)})}return p}var Doe=Object.defineProperty,Ov=Object.getOwnPropertySymbols,zN=Object.prototype.hasOwnProperty,HN=Object.prototype.propertyIsEnumerable,l7=(e,t,r)=>t in e?Doe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kh=(e,t)=>{for(var r in t||(t={}))zN.call(t,r)&&l7(e,r,t[r]);if(Ov)for(var r of Ov(t))HN.call(t,r)&&l7(e,r,t[r]);return e},Moe=(e,t)=>{var r={};for(var n in e)zN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ov)for(var n of Ov(e))t.indexOf(n)<0&&HN.call(e,n)&&(r[n]=e[n]);return r};const Roe={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},VN=k.forwardRef((e,t)=>{const r=tt("Collapse",Roe,e),{children:n,in:o,transitionDuration:i,transitionTimingFunction:a,style:s,onTransitionEnd:l,animateOpacity:c}=r,u=Moe(r,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),f=Ir(),d=f0(),h=(f.respectReducedMotion?d:!1)?0:i,{systemStyles:m,rest:_}=nf(u),w=Toe({opened:o,transitionDuration:h,transitionTimingFunction:a,onTransitionEnd:l});return h===0?o?ne.createElement(Je,kh({},_),n):null:ne.createElement(Je,kh({},w(kh(kh({style:s,ref:t},_),m))),ne.createElement("div",{style:{opacity:o||!c?1:0,transition:c?`opacity ${h}ms ${a}`:"none"}},n))});VN.displayName="@mantine/core/Collapse";var Noe=Object.defineProperty,Foe=Object.defineProperties,Boe=Object.getOwnPropertyDescriptors,c7=Object.getOwnPropertySymbols,joe=Object.prototype.hasOwnProperty,Loe=Object.prototype.propertyIsEnumerable,u7=(e,t,r)=>t in e?Noe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U3=(e,t)=>{for(var r in t||(t={}))joe.call(t,r)&&u7(e,r,t[r]);if(c7)for(var r of c7(t))Loe.call(t,r)&&u7(e,r,t[r]);return e},f7=(e,t)=>Foe(e,Boe(t));const Uoe=["subtle","filled","outline","light","default","transparent","gradient"],Ah={xs:me(18),sm:me(22),md:me(28),lg:me(34),xl:me(44)};function zoe({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:Uoe.includes(e)?U3({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Hoe=it((e,{radius:t,color:r,gradient:n},{variant:o,size:i})=>({root:f7(U3({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Re({size:i,sizes:Ah}),minHeight:Re({size:i,sizes:Ah}),width:Re({size:i,sizes:Ah}),minWidth:Re({size:i,sizes:Ah})},zoe({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":f7(U3({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const Voe=Hoe;var Woe=Object.defineProperty,kv=Object.getOwnPropertySymbols,WN=Object.prototype.hasOwnProperty,qN=Object.prototype.propertyIsEnumerable,d7=(e,t,r)=>t in e?Woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p7=(e,t)=>{for(var r in t||(t={}))WN.call(t,r)&&d7(e,r,t[r]);if(kv)for(var r of kv(t))qN.call(t,r)&&d7(e,r,t[r]);return e},h7=(e,t)=>{var r={};for(var n in e)WN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kv)for(var n of kv(e))t.indexOf(n)<0&&qN.call(e,n)&&(r[n]=e[n]);return r};function qoe(e){var t=e,{size:r,color:n}=t,o=h7(t,["size","color"]);const i=o,{style:a}=i,s=h7(i,["style"]);return ne.createElement("svg",p7({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:p7({width:r},a)},s),ne.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},ne.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},ne.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},ne.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},ne.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},ne.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Goe=Object.defineProperty,Av=Object.getOwnPropertySymbols,GN=Object.prototype.hasOwnProperty,KN=Object.prototype.propertyIsEnumerable,v7=(e,t,r)=>t in e?Goe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g7=(e,t)=>{for(var r in t||(t={}))GN.call(t,r)&&v7(e,r,t[r]);if(Av)for(var r of Av(t))KN.call(t,r)&&v7(e,r,t[r]);return e},m7=(e,t)=>{var r={};for(var n in e)GN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Av)for(var n of Av(e))t.indexOf(n)<0&&KN.call(e,n)&&(r[n]=e[n]);return r};function Koe(e){var t=e,{size:r,color:n}=t,o=m7(t,["size","color"]);const i=o,{style:a}=i,s=m7(i,["style"]);return ne.createElement("svg",g7({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:g7({width:r,height:r},a)},s),ne.createElement("g",{fill:"none",fillRule:"evenodd"},ne.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},ne.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),ne.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},ne.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Yoe=Object.defineProperty,Iv=Object.getOwnPropertySymbols,YN=Object.prototype.hasOwnProperty,XN=Object.prototype.propertyIsEnumerable,y7=(e,t,r)=>t in e?Yoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b7=(e,t)=>{for(var r in t||(t={}))YN.call(t,r)&&y7(e,r,t[r]);if(Iv)for(var r of Iv(t))XN.call(t,r)&&y7(e,r,t[r]);return e},w7=(e,t)=>{var r={};for(var n in e)YN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Iv)for(var n of Iv(e))t.indexOf(n)<0&&XN.call(e,n)&&(r[n]=e[n]);return r};function Xoe(e){var t=e,{size:r,color:n}=t,o=w7(t,["size","color"]);const i=o,{style:a}=i,s=w7(i,["style"]);return ne.createElement("svg",b7({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:b7({width:r},a)},s),ne.createElement("circle",{cx:"15",cy:"15",r:"15"},ne.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},ne.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),ne.createElement("circle",{cx:"105",cy:"15",r:"15"},ne.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),ne.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Zoe=Object.defineProperty,$v=Object.getOwnPropertySymbols,ZN=Object.prototype.hasOwnProperty,JN=Object.prototype.propertyIsEnumerable,x7=(e,t,r)=>t in e?Zoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Joe=(e,t)=>{for(var r in t||(t={}))ZN.call(t,r)&&x7(e,r,t[r]);if($v)for(var r of $v(t))JN.call(t,r)&&x7(e,r,t[r]);return e},Qoe=(e,t)=>{var r={};for(var n in e)ZN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$v)for(var n of $v(e))t.indexOf(n)<0&&JN.call(e,n)&&(r[n]=e[n]);return r};const Z2={bars:qoe,oval:Koe,dots:Xoe},eie={xs:me(18),sm:me(22),md:me(36),lg:me(44),xl:me(58)},tie={size:"md"};function Vl(e){const t=tt("Loader",tie,e),{size:r,color:n,variant:o}=t,i=Qoe(t,["size","color","variant"]),a=Ir(),s=o in Z2?o:a.loader;return ne.createElement(Je,Joe({role:"presentation",component:Z2[s]||Z2.bars,size:Re({size:r,sizes:eie}),color:a.fn.variant({variant:"filled",primaryFallback:!1,color:n||a.primaryColor}).background},i))}Vl.displayName="@mantine/core/Loader";var rie=Object.defineProperty,Tv=Object.getOwnPropertySymbols,QN=Object.prototype.hasOwnProperty,eF=Object.prototype.propertyIsEnumerable,_7=(e,t,r)=>t in e?rie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E7=(e,t)=>{for(var r in t||(t={}))QN.call(t,r)&&_7(e,r,t[r]);if(Tv)for(var r of Tv(t))eF.call(t,r)&&_7(e,r,t[r]);return e},nie=(e,t)=>{var r={};for(var n in e)QN.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tv)for(var n of Tv(e))t.indexOf(n)<0&&eF.call(e,n)&&(r[n]=e[n]);return r};const oie={color:"gray",size:"md",variant:"subtle"},tF=k.forwardRef((e,t)=>{const r=tt("ActionIcon",oie,e),{className:n,color:o,children:i,radius:a,size:s,variant:l,gradient:c,disabled:u,loaderProps:f,loading:d,unstyled:p,__staticSelector:h}=r,m=nie(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:_,cx:w,theme:g}=Voe({radius:a,color:o,gradient:c},{name:["ActionIcon",h],unstyled:p,size:s,variant:l}),E=ne.createElement(Vl,E7({color:g.fn.variant({color:o,variant:l}).color,size:"100%","data-action-icon-loader":!0},f));return ne.createElement(d0,E7({className:w(_.root,n),ref:t,disabled:u,"data-disabled":u||void 0,"data-loading":d||void 0,unstyled:p},m),d?E:i)});tF.displayName="@mantine/core/ActionIcon";const Dv=tF;var iie=Object.defineProperty,aie=Object.defineProperties,sie=Object.getOwnPropertyDescriptors,Mv=Object.getOwnPropertySymbols,rF=Object.prototype.hasOwnProperty,nF=Object.prototype.propertyIsEnumerable,S7=(e,t,r)=>t in e?iie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lie=(e,t)=>{for(var r in t||(t={}))rF.call(t,r)&&S7(e,r,t[r]);if(Mv)for(var r of Mv(t))nF.call(t,r)&&S7(e,r,t[r]);return e},cie=(e,t)=>aie(e,sie(t)),uie=(e,t)=>{var r={};for(var n in e)rF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mv)for(var n of Mv(e))t.indexOf(n)<0&&nF.call(e,n)&&(r[n]=e[n]);return r};function z_(e){const t=tt("Portal",{},e),{children:r,target:n,className:o,innerRef:i}=t,a=uie(t,["children","target","className","innerRef"]),s=Ir(),[l,c]=k.useState(!1),u=k.useRef();return U_(()=>(c(!0),u.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(u.current),()=>{!n&&document.body.removeChild(u.current)}),[n]),l?Ys.createPortal(ne.createElement("div",cie(lie({className:o,dir:s.dir},a),{ref:i}),r),u.current):null}z_.displayName="@mantine/core/Portal";var fie=Object.defineProperty,Rv=Object.getOwnPropertySymbols,oF=Object.prototype.hasOwnProperty,iF=Object.prototype.propertyIsEnumerable,C7=(e,t,r)=>t in e?fie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,die=(e,t)=>{for(var r in t||(t={}))oF.call(t,r)&&C7(e,r,t[r]);if(Rv)for(var r of Rv(t))iF.call(t,r)&&C7(e,r,t[r]);return e},pie=(e,t)=>{var r={};for(var n in e)oF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rv)for(var n of Rv(e))t.indexOf(n)<0&&iF.call(e,n)&&(r[n]=e[n]);return r};function p0(e){var t=e,{withinPortal:r=!0,children:n}=t,o=pie(t,["withinPortal","children"]);return r?ne.createElement(z_,die({},o),n):ne.createElement(ne.Fragment,null,n)}p0.displayName="@mantine/core/OptionalPortal";var hie=Object.defineProperty,vie=Object.defineProperties,gie=Object.getOwnPropertyDescriptors,P7=Object.getOwnPropertySymbols,mie=Object.prototype.hasOwnProperty,yie=Object.prototype.propertyIsEnumerable,O7=(e,t,r)=>t in e?hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J2=(e,t)=>{for(var r in t||(t={}))mie.call(t,r)&&O7(e,r,t[r]);if(P7)for(var r of P7(t))yie.call(t,r)&&O7(e,r,t[r]);return e},k7=(e,t)=>vie(e,gie(t));function bie({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var wie=it((e,{radius:t,color:r},{variant:n})=>({root:J2(k7(J2({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${me(1)} solid transparent`}),bie({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:me(20),height:me(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:k7(J2({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:me(10),height:me(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const xie=wie;var _ie=Object.defineProperty,Nv=Object.getOwnPropertySymbols,aF=Object.prototype.hasOwnProperty,sF=Object.prototype.propertyIsEnumerable,A7=(e,t,r)=>t in e?_ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I7=(e,t)=>{for(var r in t||(t={}))aF.call(t,r)&&A7(e,r,t[r]);if(Nv)for(var r of Nv(t))sF.call(t,r)&&A7(e,r,t[r]);return e},Eie=(e,t)=>{var r={};for(var n in e)aF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nv)for(var n of Nv(e))t.indexOf(n)<0&&sF.call(e,n)&&(r[n]=e[n]);return r};function lF(e){const t=e,{width:r,height:n,style:o}=t,i=Eie(t,["width","height","style"]);return ne.createElement("svg",I7({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:I7({width:r,height:n},o)},i),ne.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}lF.displayName="@mantine/core/CloseIcon";var Sie=Object.defineProperty,Fv=Object.getOwnPropertySymbols,cF=Object.prototype.hasOwnProperty,uF=Object.prototype.propertyIsEnumerable,$7=(e,t,r)=>t in e?Sie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cie=(e,t)=>{for(var r in t||(t={}))cF.call(t,r)&&$7(e,r,t[r]);if(Fv)for(var r of Fv(t))uF.call(t,r)&&$7(e,r,t[r]);return e},Pie=(e,t)=>{var r={};for(var n in e)cF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fv)for(var n of Fv(e))t.indexOf(n)<0&&uF.call(e,n)&&(r[n]=e[n]);return r};const Oie={xs:me(12),sm:me(16),md:me(20),lg:me(28),xl:me(34)},kie={size:"sm"},fF=k.forwardRef((e,t)=>{const r=tt("CloseButton",kie,e),{iconSize:n,size:o,children:i}=r,a=Pie(r,["iconSize","size","children"]),s=me(n||Oie[o]);return ne.createElement(Dv,Cie({ref:t,__staticSelector:"CloseButton",size:o},a),i||ne.createElement(lF,{width:s,height:s}))});fF.displayName="@mantine/core/CloseButton";const zy=fF;var Aie=Object.defineProperty,Bv=Object.getOwnPropertySymbols,dF=Object.prototype.hasOwnProperty,pF=Object.prototype.propertyIsEnumerable,T7=(e,t,r)=>t in e?Aie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Iie=(e,t)=>{for(var r in t||(t={}))dF.call(t,r)&&T7(e,r,t[r]);if(Bv)for(var r of Bv(t))pF.call(t,r)&&T7(e,r,t[r]);return e},$ie=(e,t)=>{var r={};for(var n in e)dF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bv)for(var n of Bv(e))t.indexOf(n)<0&&pF.call(e,n)&&(r[n]=e[n]);return r};const Tie={variant:"light"},H_=k.forwardRef((e,t)=>{const r=tt("Alert",Tie,e),{id:n,className:o,title:i,variant:a,children:s,color:l,classNames:c,icon:u,styles:f,onClose:d,radius:p,withCloseButton:h,closeButtonLabel:m,unstyled:_}=r,w=$ie(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:g,cx:E}=xie({color:l,radius:p},{classNames:c,styles:f,unstyled:_,variant:a,name:"Alert"}),A=Ql(n),N=i&&`${A}-title`,D=`${A}-body`;return ne.createElement(Je,Iie({id:A,role:"alert","aria-labelledby":N,"aria-describedby":D,className:E(g.root,g[a],o),ref:t},w),ne.createElement("div",{className:g.wrapper},u&&ne.createElement("div",{className:g.icon},u),ne.createElement("div",{className:g.body},i&&ne.createElement("div",{className:g.title,"data-with-close-button":h||void 0},ne.createElement("span",{id:N,className:g.label},i)),ne.createElement("div",{id:D,className:g.message},s)),h&&ne.createElement(zy,{className:g.closeButton,onClick:d,variant:"transparent",size:16,iconSize:16,"aria-label":m})))});H_.displayName="@mantine/core/Alert";var Die=Object.defineProperty,Mie=Object.defineProperties,Rie=Object.getOwnPropertyDescriptors,D7=Object.getOwnPropertySymbols,Nie=Object.prototype.hasOwnProperty,Fie=Object.prototype.propertyIsEnumerable,M7=(e,t,r)=>t in e?Die(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ih=(e,t)=>{for(var r in t||(t={}))Nie.call(t,r)&&M7(e,r,t[r]);if(D7)for(var r of D7(t))Fie.call(t,r)&&M7(e,r,t[r]);return e},Bie=(e,t)=>Mie(e,Rie(t));function jie({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function Lie({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function Uie(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function zie({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var Hie=it((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:i,underline:a,gradient:s,weight:l,transform:c,align:u,strikethrough:f,italic:d},{size:p})=>{const h=e.fn.variant({variant:"gradient",gradient:s});return{root:Bie(Ih(Ih(Ih(Ih({},e.fn.fontStyles()),e.fn.focusStyles()),Uie(r)),zie({theme:e,truncate:n})),{color:Lie({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||p===void 0?"inherit":Re({size:p,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:jie({underline:a,strikethrough:f}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":l,textTransform:c,textAlign:u,fontStyle:d?"italic":void 0}),gradient:{backgroundImage:h.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const Vie=Hie;var Wie=Object.defineProperty,jv=Object.getOwnPropertySymbols,hF=Object.prototype.hasOwnProperty,vF=Object.prototype.propertyIsEnumerable,R7=(e,t,r)=>t in e?Wie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qie=(e,t)=>{for(var r in t||(t={}))hF.call(t,r)&&R7(e,r,t[r]);if(jv)for(var r of jv(t))vF.call(t,r)&&R7(e,r,t[r]);return e},Gie=(e,t)=>{var r={};for(var n in e)hF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jv)for(var n of jv(e))t.indexOf(n)<0&&vF.call(e,n)&&(r[n]=e[n]);return r};const Kie={variant:"text"},gF=k.forwardRef((e,t)=>{const r=tt("Text",Kie,e),{className:n,size:o,weight:i,transform:a,color:s,align:l,variant:c,lineClamp:u,truncate:f,gradient:d,inline:p,inherit:h,underline:m,strikethrough:_,italic:w,classNames:g,styles:E,unstyled:A,span:N,__staticSelector:D}=r,y=Gie(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:U,cx:L}=Vie({color:s,lineClamp:u,truncate:f,inline:p,inherit:h,underline:m,strikethrough:_,italic:w,weight:i,transform:a,align:l,gradient:d},{unstyled:A,name:D||"Text",variant:c,size:o});return ne.createElement(Je,qie({ref:t,className:L(U.root,{[U.gradient]:c==="gradient"},n),component:N?"span":"div"},y))});gF.displayName="@mantine/core/Text";const _t=gF;var Yie=Object.defineProperty,N7=Object.getOwnPropertySymbols,Xie=Object.prototype.hasOwnProperty,Zie=Object.prototype.propertyIsEnumerable,F7=(e,t,r)=>t in e?Yie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jie=(e,t)=>{for(var r in t||(t={}))Xie.call(t,r)&&F7(e,r,t[r]);if(N7)for(var r of N7(t))Zie.call(t,r)&&F7(e,r,t[r]);return e};function Qie({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var eae=it((e,{color:t,underline:r})=>({root:Jie({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:Qie({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const tae=eae;var rae=Object.defineProperty,Lv=Object.getOwnPropertySymbols,mF=Object.prototype.hasOwnProperty,yF=Object.prototype.propertyIsEnumerable,B7=(e,t,r)=>t in e?rae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j7=(e,t)=>{for(var r in t||(t={}))mF.call(t,r)&&B7(e,r,t[r]);if(Lv)for(var r of Lv(t))yF.call(t,r)&&B7(e,r,t[r]);return e},nae=(e,t)=>{var r={};for(var n in e)mF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lv)for(var n of Lv(e))t.indexOf(n)<0&&yF.call(e,n)&&(r[n]=e[n]);return r};const oae={underline:!0},bF=k.forwardRef((e,t)=>{const r=tt("Anchor",oae,e),{component:n,className:o,unstyled:i,variant:a,size:s,color:l,underline:c}=r,u=nae(r,["component","className","unstyled","variant","size","color","underline"]),{classes:f,cx:d}=tae({color:l,underline:c},{name:"Anchor",unstyled:i,variant:a,size:s}),p=n==="button"?{type:"button"}:null;return ne.createElement(_t,j7(j7({component:n||"a",ref:t,className:d(f.root,o),size:s},p),u))});bF.displayName="@mantine/core/Anchor";const z3=bF,wF=k.createContext({zIndex:1e3,fixed:!1,layout:"default"}),iae=wF.Provider;function xF(){return k.useContext(wF)}function Hy(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[Re({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>Eo(n[0])-Eo(o[0])),r}var aae=Object.defineProperty,sae=Object.defineProperties,lae=Object.getOwnPropertyDescriptors,L7=Object.getOwnPropertySymbols,cae=Object.prototype.hasOwnProperty,uae=Object.prototype.propertyIsEnumerable,U7=(e,t,r)=>t in e?aae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$h=(e,t)=>{for(var r in t||(t={}))cae.call(t,r)&&U7(e,r,t[r]);if(L7)for(var r of L7(t))uae.call(t,r)&&U7(e,r,t[r]);return e},z7=(e,t)=>sae(e,lae(t)),fae=it((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:i,zIndex:a,section:s,withBorder:l,layout:c})=>{const u=typeof r=="object"&&r!==null?Hy(r,e).reduce((d,[p,h])=>(d[`@media (min-width: ${bn(p)})`]={width:me(h),minWidth:me(h)},d),{}):null,f=l?{[s==="navbar"?"borderRight":"borderLeft"]:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:z7($h($h(z7($h($h({},e.fn.fontStyles()),o),{top:c==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:a,height:t?me(t):c==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?me(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),f),u),{"&[data-hidden]":{[`@media (max-width: ${bn(Eo(Re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const dae=fae;var pae=Object.defineProperty,Uv=Object.getOwnPropertySymbols,_F=Object.prototype.hasOwnProperty,EF=Object.prototype.propertyIsEnumerable,H7=(e,t,r)=>t in e?pae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V7=(e,t)=>{for(var r in t||(t={}))_F.call(t,r)&&H7(e,r,t[r]);if(Uv)for(var r of Uv(t))EF.call(t,r)&&H7(e,r,t[r]);return e},hae=(e,t)=>{var r={};for(var n in e)_F.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uv)for(var n of Uv(e))t.indexOf(n)<0&&EF.call(e,n)&&(r[n]=e[n]);return r};const SF=k.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:i=!1,position:a,zIndex:s,hiddenBreakpoint:l="md",hidden:c=!1,withBorder:u=!0,className:f,classNames:d,styles:p,children:h,section:m,__staticSelector:_,unstyled:w,variant:g}=r,E=hae(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const A=xF(),{classes:N,cx:D,theme:y}=dae({width:n,height:o,fixed:A.fixed||i,position:a,hiddenBreakpoint:l,zIndex:s||A.zIndex||Ta("app"),section:m,withBorder:u,layout:A.layout},{classNames:d,styles:p,name:_,unstyled:w,variant:g}),U=Hy(n,y).reduce((L,[G,V])=>(L[`@media (min-width: ${bn(G)})`]={[`--mantine-${m}-width`]:me(V)},L),{});return ne.createElement(Je,V7({component:m==="navbar"?"nav":"aside",ref:t,"data-hidden":c||void 0,className:D(N.root,f)},E),h,ne.createElement(PN,{styles:()=>({":root":V7({[`--mantine-${m}-width`]:n!=null&&n.base?me(n.base):"0rem"},U)})}))});SF.displayName="@mantine/core/HorizontalSection";var vae=Object.defineProperty,zv=Object.getOwnPropertySymbols,CF=Object.prototype.hasOwnProperty,PF=Object.prototype.propertyIsEnumerable,W7=(e,t,r)=>t in e?vae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gae=(e,t)=>{for(var r in t||(t={}))CF.call(t,r)&&W7(e,r,t[r]);if(zv)for(var r of zv(t))PF.call(t,r)&&W7(e,r,t[r]);return e},mae=(e,t)=>{var r={};for(var n in e)CF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zv)for(var n of zv(e))t.indexOf(n)<0&&PF.call(e,n)&&(r[n]=e[n]);return r};const OF=k.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:i}=r,a=mae(r,["children","grow","sx"]);return ne.createElement(Je,gae({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...O_(i)]},a),n)});OF.displayName="@mantine/core/Section";const yae=OF;var bae=Object.defineProperty,q7=Object.getOwnPropertySymbols,wae=Object.prototype.hasOwnProperty,xae=Object.prototype.propertyIsEnumerable,G7=(e,t,r)=>t in e?bae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_ae=(e,t)=>{for(var r in t||(t={}))wae.call(t,r)&&G7(e,r,t[r]);if(q7)for(var r of q7(t))xae.call(t,r)&&G7(e,r,t[r]);return e};const Eae={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},Hv=k.forwardRef((e,t)=>{const r=tt("Navbar",Eae,e);return ne.createElement(SF,_ae({section:"navbar",__staticSelector:"Navbar",ref:t},r))});Hv.Section=yae;Hv.displayName="@mantine/core/Navbar";var Sae=Object.defineProperty,Cae=Object.defineProperties,Pae=Object.getOwnPropertyDescriptors,K7=Object.getOwnPropertySymbols,Oae=Object.prototype.hasOwnProperty,kae=Object.prototype.propertyIsEnumerable,Y7=(e,t,r)=>t in e?Sae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q2=(e,t)=>{for(var r in t||(t={}))Oae.call(t,r)&&Y7(e,r,t[r]);if(K7)for(var r of K7(t))kae.call(t,r)&&Y7(e,r,t[r]);return e},X7=(e,t)=>Cae(e,Pae(t)),Aae=it((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:i,layout:a})=>{const s=typeof t=="object"&&t!==null?Hy(t,e).reduce((l,[c,u])=>(l[`@media (min-width: ${bn(c)})`]={height:me(u),minHeight:me(u)},l),{}):null;return{root:X7(Q2(X7(Q2(Q2({},e.fn.fontStyles()),n),{zIndex:o,left:a==="alt"?"var(--mantine-navbar-width, 0)":0,right:a==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),maxHeight:typeof t=="object"?me(t==null?void 0:t.base)||"100%":me(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),s),{borderBottom:i==="bottom"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:i==="top"?`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const Iae=Aae;var $ae=Object.defineProperty,Vv=Object.getOwnPropertySymbols,kF=Object.prototype.hasOwnProperty,AF=Object.prototype.propertyIsEnumerable,Z7=(e,t,r)=>t in e?$ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,J7=(e,t)=>{for(var r in t||(t={}))kF.call(t,r)&&Z7(e,r,t[r]);if(Vv)for(var r of Vv(t))AF.call(t,r)&&Z7(e,r,t[r]);return e},Tae=(e,t)=>{var r={};for(var n in e)kF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vv)for(var n of Vv(e))t.indexOf(n)<0&&AF.call(e,n)&&(r[n]=e[n]);return r};const V_=k.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:i,styles:a,height:s,fixed:l=!1,withBorder:c=!0,position:u,zIndex:f,section:d,unstyled:p,__staticSelector:h,variant:m}=r,_=Tae(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const w=xF(),g=f||w.zIndex||Ta("app"),{classes:E,cx:A,theme:N}=Iae({height:s,fixed:w.fixed||l,position:u,zIndex:typeof g=="number"&&w.layout==="default"?g+1:g,layout:w.layout,borderPosition:c?d==="header"?"bottom":"top":"none"},{name:h,classNames:i,styles:a,unstyled:p,variant:m}),D=typeof s=="object"&&s!==null?Hy(s,N).reduce((y,[U,L])=>(y[`@media (min-width: ${bn(U)})`]={[`--mantine-${d}-height`]:me(L)},y),{}):null;return ne.createElement(Je,J7({component:d==="header"?"header":"footer",className:A(E.root,o),ref:t},_),n,ne.createElement(PN,{styles:()=>({":root":J7({[`--mantine-${d}-height`]:typeof s=="object"?me(s==null?void 0:s.base)||"100%":me(s)},D)})}))});V_.displayName="@mantine/core/VerticalSection";var Dae=Object.defineProperty,Mae=Object.defineProperties,Rae=Object.getOwnPropertyDescriptors,Q7=Object.getOwnPropertySymbols,Nae=Object.prototype.hasOwnProperty,Fae=Object.prototype.propertyIsEnumerable,eC=(e,t,r)=>t in e?Dae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bae=(e,t)=>{for(var r in t||(t={}))Nae.call(t,r)&&eC(e,r,t[r]);if(Q7)for(var r of Q7(t))Fae.call(t,r)&&eC(e,r,t[r]);return e},jae=(e,t)=>Mae(e,Rae(t));const Lae={fixed:!1,position:{top:0,left:0,right:0}},IF=k.forwardRef((e,t)=>{const r=tt("Header",Lae,e);return ne.createElement(V_,jae(Bae({section:"header",__staticSelector:"Header"},r),{ref:t}))});IF.displayName="@mantine/core/Header";var Uae=Object.defineProperty,zae=Object.defineProperties,Hae=Object.getOwnPropertyDescriptors,tC=Object.getOwnPropertySymbols,Vae=Object.prototype.hasOwnProperty,Wae=Object.prototype.propertyIsEnumerable,rC=(e,t,r)=>t in e?Uae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qae=(e,t)=>{for(var r in t||(t={}))Vae.call(t,r)&&rC(e,r,t[r]);if(tC)for(var r of tC(t))Wae.call(t,r)&&rC(e,r,t[r]);return e},Gae=(e,t)=>zae(e,Hae(t));const Kae={fixed:!1,position:{bottom:0,left:0,right:0}},$F=k.forwardRef((e,t)=>{const r=tt("Footer",Kae,e);return ne.createElement(V_,Gae(qae({section:"footer",__staticSelector:"Footer"},r),{ref:t}))});$F.displayName="@mantine/core/Footer";var Yae=Object.defineProperty,nC=Object.getOwnPropertySymbols,Xae=Object.prototype.hasOwnProperty,Zae=Object.prototype.propertyIsEnumerable,oC=(e,t,r)=>t in e?Yae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,TF=(e,t)=>{for(var r in t||(t={}))Xae.call(t,r)&&oC(e,r,t[r]);if(nC)for(var r of nC(t))Zae.call(t,r)&&oC(e,r,t[r]);return e};function Jae(e,t){const r=Re({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?Re({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?Re({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const i=Eo(n),a=Eo(o);return TF({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},i===a?{[`@media (max-width: ${bn(i-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${bn(i-1)})`]:{paddingLeft:r},[`@media (max-width: ${bn(a-1)})`]:{paddingRight:r}})}var Qae=it((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:TF({flex:1,width:"100vw",boxSizing:"border-box"},Jae(t,e))}));const ese=Qae;var tse=Object.defineProperty,Wv=Object.getOwnPropertySymbols,DF=Object.prototype.hasOwnProperty,MF=Object.prototype.propertyIsEnumerable,iC=(e,t,r)=>t in e?tse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rse=(e,t)=>{for(var r in t||(t={}))DF.call(t,r)&&iC(e,r,t[r]);if(Wv)for(var r of Wv(t))MF.call(t,r)&&iC(e,r,t[r]);return e},nse=(e,t)=>{var r={};for(var n in e)DF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wv)for(var n of Wv(e))t.indexOf(n)<0&&MF.call(e,n)&&(r[n]=e[n]);return r};const ose={fixed:!0,padding:"md"},RF=k.forwardRef((e,t)=>{const r=tt("AppShell",ose,e),{children:n,navbar:o,header:i,footer:a,aside:s,fixed:l,zIndex:c,padding:u,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d,className:p,styles:h,classNames:m,unstyled:_,hidden:w,layout:g,variant:E}=r,A=nse(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:N,cx:D}=ese({padding:u,fixed:l,navbarOffsetBreakpoint:f,asideOffsetBreakpoint:d},{styles:h,classNames:m,unstyled:_,name:"AppShell",variant:E});return w?ne.createElement(ne.Fragment,null,n):ne.createElement(iae,{value:{fixed:l,zIndex:c,layout:g}},ne.createElement(Je,rse({className:D(N.root,p),ref:t},A),i,ne.createElement("div",{className:N.body},o,ne.createElement("main",{className:N.main},n),s),a))});RF.displayName="@mantine/core/AppShell";const Th={xs:me(1),sm:me(2),md:me(3),lg:me(4),xl:me(5)};function Dh(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var ise=it((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:me(1),borderTop:`${Re({size:r,sizes:Th})} ${n} ${Dh(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Re({size:r,sizes:Th})} ${n} ${Dh(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:me(Re({size:r,sizes:Th})),borderTopColor:Dh(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:me(Re({size:r,sizes:Th})),borderLeftColor:Dh(e,t),borderLeftStyle:n}}));const ase=ise;var sse=Object.defineProperty,lse=Object.defineProperties,cse=Object.getOwnPropertyDescriptors,qv=Object.getOwnPropertySymbols,NF=Object.prototype.hasOwnProperty,FF=Object.prototype.propertyIsEnumerable,aC=(e,t,r)=>t in e?sse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sC=(e,t)=>{for(var r in t||(t={}))NF.call(t,r)&&aC(e,r,t[r]);if(qv)for(var r of qv(t))FF.call(t,r)&&aC(e,r,t[r]);return e},use=(e,t)=>lse(e,cse(t)),fse=(e,t)=>{var r={};for(var n in e)NF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qv)for(var n of qv(e))t.indexOf(n)<0&&FF.call(e,n)&&(r[n]=e[n]);return r};const dse={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},H3=k.forwardRef((e,t)=>{const r=tt("Divider",dse,e),{className:n,color:o,orientation:i,size:a,label:s,labelPosition:l,labelProps:c,variant:u,styles:f,classNames:d,unstyled:p}=r,h=fse(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:m,cx:_}=ase({color:o},{classNames:d,styles:f,unstyled:p,name:"Divider",variant:u,size:a}),w=i==="vertical",g=i==="horizontal",E=!!s&&g,A=!(c!=null&&c.color);return ne.createElement(Je,sC({ref:t,className:_(m.root,{[m.vertical]:w,[m.horizontal]:g,[m.withLabel]:E},n),role:"separator"},h),E&&ne.createElement(_t,use(sC({},c),{size:(c==null?void 0:c.size)||"xs",mt:me(2),className:_(m.label,m[l],{[m.labelDefaultStyles]:A})}),s))});H3.displayName="@mantine/core/Divider";var pse=Object.defineProperty,hse=Object.defineProperties,vse=Object.getOwnPropertyDescriptors,lC=Object.getOwnPropertySymbols,gse=Object.prototype.hasOwnProperty,mse=Object.prototype.propertyIsEnumerable,cC=(e,t,r)=>t in e?pse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uC=(e,t)=>{for(var r in t||(t={}))gse.call(t,r)&&cC(e,r,t[r]);if(lC)for(var r of lC(t))mse.call(t,r)&&cC(e,r,t[r]);return e},yse=(e,t)=>hse(e,vse(t)),bse=it((e,t,{size:r})=>({item:yse(uC({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:Re({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":uC({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${Re({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Re({size:r,sizes:e.spacing})} / 1.5) ${Re({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const wse=bse;var xse=Object.defineProperty,fC=Object.getOwnPropertySymbols,_se=Object.prototype.hasOwnProperty,Ese=Object.prototype.propertyIsEnumerable,dC=(e,t,r)=>t in e?xse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sse=(e,t)=>{for(var r in t||(t={}))_se.call(t,r)&&dC(e,r,t[r]);if(fC)for(var r of fC(t))Ese.call(t,r)&&dC(e,r,t[r]);return e};function BF({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:i,__staticSelector:a,onItemHover:s,onItemSelect:l,itemsRefs:c,itemComponent:u,size:f,nothingFound:d,creatable:p,createLabel:h,unstyled:m,variant:_}){const{classes:w}=wse(null,{classNames:r,styles:n,unstyled:m,name:a,variant:_,size:f}),g=[],E=[];let A=null;const N=(y,U)=>{const L=typeof o=="function"?o(y.value):!1;return ne.createElement(u,Sse({key:y.value,className:w.item,"data-disabled":y.disabled||void 0,"data-hovered":!y.disabled&&t===U||void 0,"data-selected":!y.disabled&&L||void 0,selected:L,onMouseEnter:()=>s(U),id:`${i}-${U}`,role:"option",tabIndex:-1,"aria-selected":t===U,ref:G=>{c&&c.current&&(c.current[y.value]=G)},onMouseDown:y.disabled?null:G=>{G.preventDefault(),l(y)},disabled:y.disabled,variant:_},y))};let D=null;if(e.forEach((y,U)=>{y.creatable?A=U:y.group?(D!==y.group&&(D=y.group,E.push(ne.createElement("div",{className:w.separator,key:`__mantine-divider-${U}`},ne.createElement(H3,{classNames:{label:w.separatorLabel},label:y.group})))),E.push(N(y,U))):g.push(N(y,U))}),p){const y=e[A];g.push(ne.createElement("div",{key:Uy(),className:w.item,"data-hovered":t===A||void 0,onMouseEnter:()=>s(A),onMouseDown:U=>{U.preventDefault(),l(y)},tabIndex:-1,ref:U=>{c&&c.current&&(c.current[y.value]=U)}},h))}return E.length>0&&g.length>0&&g.unshift(ne.createElement("div",{className:w.separator,key:"empty-group-separator"},ne.createElement(H3,null))),E.length>0||g.length>0?ne.createElement(ne.Fragment,null,E,g):ne.createElement(_t,{size:f,unstyled:m,className:w.nothingFound},d)}BF.displayName="@mantine/core/SelectItems";var Cse=Object.defineProperty,Gv=Object.getOwnPropertySymbols,jF=Object.prototype.hasOwnProperty,LF=Object.prototype.propertyIsEnumerable,pC=(e,t,r)=>t in e?Cse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pse=(e,t)=>{for(var r in t||(t={}))jF.call(t,r)&&pC(e,r,t[r]);if(Gv)for(var r of Gv(t))LF.call(t,r)&&pC(e,r,t[r]);return e},Ose=(e,t)=>{var r={};for(var n in e)jF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gv)for(var n of Gv(e))t.indexOf(n)<0&&LF.call(e,n)&&(r[n]=e[n]);return r};const UF=k.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,i=Ose(r,["label","value"]);return ne.createElement("div",Pse({ref:t},i),n||o)});UF.displayName="@mantine/core/DefaultItem";function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(r=>kse(r,t))}function ec(...e){return k.useCallback(zF(...e),e)}const HF=k.forwardRef((e,t)=>{const{children:r,...n}=e,o=k.Children.toArray(r),i=o.find(Ise);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return k.createElement(V3,Yt({},n,{ref:t}),k.isValidElement(a)?k.cloneElement(a,void 0,s):null)}return k.createElement(V3,Yt({},n,{ref:t}),r)});HF.displayName="Slot";const V3=k.forwardRef((e,t)=>{const{children:r,...n}=e;return k.isValidElement(r)?k.cloneElement(r,{...$se(n,r.props),ref:zF(t,r.ref)}):k.Children.count(r)>1?k.Children.only(null):null});V3.displayName="SlotClone";const Ase=({children:e})=>k.createElement(k.Fragment,null,e);function Ise(e){return k.isValidElement(e)&&e.type===Ase}function $se(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Tse=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],h0=Tse.reduce((e,t)=>{const r=k.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?HF:t;return k.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),k.createElement(s,Yt({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),W3=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function Dse(e,t){return k.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const v0=e=>{const{present:t,children:r}=e,n=Mse(t),o=typeof r=="function"?r({present:n.isPresent}):k.Children.only(r),i=ec(n.ref,o.ref);return typeof r=="function"||n.isPresent?k.cloneElement(o,{ref:i}):null};v0.displayName="Presence";function Mse(e){const[t,r]=k.useState(),n=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Dse(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=Mh(n.current);i.current=s==="mounted"?c:"none"},[s]),W3(()=>{const c=n.current,u=o.current;if(u!==e){const d=i.current,p=Mh(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),W3(()=>{if(t){const c=f=>{const p=Mh(n.current).includes(f.animationName);f.target===t&&p&&Ys.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(i.current=Mh(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:k.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Mh(e){return(e==null?void 0:e.animationName)||"none"}function Rse(e,t=[]){let r=[];function n(i,a){const s=k.createContext(a),l=r.length;r=[...r,a];function c(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][l])||s,_=k.useMemo(()=>h,Object.values(h));return k.createElement(m.Provider,{value:_},p)}function u(f,d){const p=(d==null?void 0:d[e][l])||s,h=k.useContext(p);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=r.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Nse(o,...t)]}function Nse(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Pl(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Fse=k.createContext(void 0);function Bse(e){const t=k.useContext(Fse);return e||t||"ltr"}function jse(e,[t,r]){return Math.min(r,Math.max(t,e))}function Rl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Lse(e,t){return k.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const VF="ScrollArea",[WF,Aze]=Rse(VF),[Use,Po]=WF(VF),zse=k.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=k.useState(null),[c,u]=k.useState(null),[f,d]=k.useState(null),[p,h]=k.useState(null),[m,_]=k.useState(null),[w,g]=k.useState(0),[E,A]=k.useState(0),[N,D]=k.useState(!1),[y,U]=k.useState(!1),L=ec(t,V=>l(V)),G=Bse(o);return k.createElement(Use,{scope:r,type:n,dir:G,scrollHideDelay:i,scrollArea:s,viewport:c,onViewportChange:u,content:f,onContentChange:d,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:N,onScrollbarXEnabledChange:D,scrollbarY:m,onScrollbarYChange:_,scrollbarYEnabled:y,onScrollbarYEnabledChange:U,onCornerWidthChange:g,onCornerHeightChange:A},k.createElement(h0.div,Yt({dir:G},a,{ref:L,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),Hse="ScrollAreaViewport",Vse=k.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=Po(Hse,r),a=k.useRef(null),s=ec(t,a,i.onViewportChange);return k.createElement(k.Fragment,null,k.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),k.createElement(h0.div,Yt({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),k.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Da="ScrollAreaScrollbar",Wse=k.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Po(Da,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return k.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?k.createElement(qse,Yt({},n,{ref:t,forceMount:r})):o.type==="scroll"?k.createElement(Gse,Yt({},n,{ref:t,forceMount:r})):o.type==="auto"?k.createElement(qF,Yt({},n,{ref:t,forceMount:r})):o.type==="always"?k.createElement(W_,Yt({},n,{ref:t})):null}),qse=k.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Po(Da,e.__scopeScrollArea),[i,a]=k.useState(!1);return k.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const c=()=>{window.clearTimeout(l),a(!0)},u=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),k.createElement(v0,{present:r||i},k.createElement(qF,Yt({"data-state":i?"visible":"hidden"},n,{ref:t})))}),Gse=k.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Po(Da,e.__scopeScrollArea),i=e.orientation==="horizontal",a=Wy(()=>l("SCROLL_END"),100),[s,l]=Lse("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return k.useEffect(()=>{if(s==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),k.useEffect(()=>{const c=o.viewport,u=i?"scrollLeft":"scrollTop";if(c){let f=c[u];const d=()=>{const p=c[u];f!==p&&(l("SCROLL"),a()),f=p};return c.addEventListener("scroll",d),()=>c.removeEventListener("scroll",d)}},[o.viewport,i,l,a]),k.createElement(v0,{present:r||s!=="hidden"},k.createElement(W_,Yt({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Rl(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Rl(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),qF=k.forwardRef((e,t)=>{const r=Po(Da,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=k.useState(!1),s=e.orientation==="horizontal",l=Wy(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,o=Po(Da,e.__scopeScrollArea),i=k.useRef(null),a=k.useRef(0),[s,l]=k.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=XF(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:d=>a.current=d};function f(d,p){return tle(d,a.current,s,p)}return r==="horizontal"?k.createElement(Kse,Yt({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollLeft,p=hC(d,s,o.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollLeft=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollLeft=f(d,o.dir))}})):r==="vertical"?k.createElement(Yse,Yt({},u,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const d=o.viewport.scrollTop,p=hC(d,s);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:d=>{o.viewport&&(o.viewport.scrollTop=d)},onDragScroll:d=>{o.viewport&&(o.viewport.scrollTop=f(d))}})):null}),Kse=k.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Po(Da,e.__scopeScrollArea),[a,s]=k.useState(),l=k.useRef(null),c=ec(t,l,i.onScrollbarXChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),k.createElement(KF,Yt({"data-orientation":"horizontal"},o,{ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Vy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(d),JF(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Kv(a.paddingLeft),paddingEnd:Kv(a.paddingRight)}})}}))}),Yse=k.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=Po(Da,e.__scopeScrollArea),[a,s]=k.useState(),l=k.useRef(null),c=ec(t,l,i.onScrollbarYChange);return k.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),k.createElement(KF,Yt({"data-orientation":"vertical"},o,{ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Vy(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(i.viewport){const d=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(d),JF(d,f)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Kv(a.paddingTop),paddingEnd:Kv(a.paddingBottom)}})}}))}),[Xse,GF]=WF(Da),KF=k.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...d}=e,p=Po(Da,r),[h,m]=k.useState(null),_=ec(t,L=>m(L)),w=k.useRef(null),g=k.useRef(""),E=p.viewport,A=n.content-n.viewport,N=Pl(u),D=Pl(l),y=Wy(f,10);function U(L){if(w.current){const G=L.clientX-w.current.left,V=L.clientY-w.current.top;c({x:G,y:V})}}return k.useEffect(()=>{const L=G=>{const V=G.target;(h==null?void 0:h.contains(V))&&N(G,A)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[E,h,A,N]),k.useEffect(D,[n,D]),Au(h,y),Au(p.content,y),k.createElement(Xse,{scope:r,scrollbar:h,hasThumb:o,onThumbChange:Pl(i),onThumbPointerUp:Pl(a),onThumbPositionChange:D,onThumbPointerDown:Pl(s)},k.createElement(h0.div,Yt({},d,{ref:_,style:{position:"absolute",...d.style},onPointerDown:Rl(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),w.current=h.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",U(L))}),onPointerMove:Rl(e.onPointerMove,U),onPointerUp:Rl(e.onPointerUp,L=>{const G=L.target;G.hasPointerCapture(L.pointerId)&&G.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=g.current,w.current=null})})))}),q3="ScrollAreaThumb",Zse=k.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=GF(q3,e.__scopeScrollArea);return k.createElement(v0,{present:r||o.hasThumb},k.createElement(Jse,Yt({ref:t},n)))}),Jse=k.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=Po(q3,r),a=GF(q3,r),{onThumbPositionChange:s}=a,l=ec(t,f=>a.onThumbChange(f)),c=k.useRef(),u=Wy(()=>{c.current&&(c.current(),c.current=void 0)},100);return k.useEffect(()=>{const f=i.viewport;if(f){const d=()=>{if(u(),!c.current){const p=rle(f,s);c.current=p,s()}};return s(),f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,u,s]),k.createElement(h0.div,Yt({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Rl(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),h=f.clientX-p.left,m=f.clientY-p.top;a.onThumbPointerDown({x:h,y:m})}),onPointerUp:Rl(e.onPointerUp,a.onThumbPointerUp)}))}),YF="ScrollAreaCorner",Qse=k.forwardRef((e,t)=>{const r=Po(YF,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?k.createElement(ele,Yt({},e,{ref:t})):null}),ele=k.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=Po(YF,r),[i,a]=k.useState(0),[s,l]=k.useState(0),c=!!(i&&s);return Au(o.scrollbarX,()=>{var u;const f=((u=o.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;o.onCornerHeightChange(f),l(f)}),Au(o.scrollbarY,()=>{var u;const f=((u=o.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;o.onCornerWidthChange(f),a(f)}),c?k.createElement(h0.div,Yt({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Kv(e){return e?parseInt(e,10):0}function XF(e,t){const r=e/t;return isNaN(r)?0:r}function Vy(e){const t=XF(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function tle(e,t,r,n="ltr"){const o=Vy(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,f=n==="ltr"?[0,u]:[u*-1,0];return ZF([l,c],f)(e)}function hC(e,t,r="ltr"){const n=Vy(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=jse(e,l);return ZF([0,a],[0,s])(c)}function ZF(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function JF(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Wy(e,t){const r=Pl(e),n=k.useRef(0);return k.useEffect(()=>()=>window.clearTimeout(n.current),[]),k.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function Au(e,t){const r=Pl(t);W3(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const nle=zse,ole=Vse,vC=Wse,gC=Zse,ile=Qse;var ale=it((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?me(t):void 0,paddingBottom:r?me(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${me(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${zo("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:me(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:me(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:zo("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:me(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:me(44),minHeight:me(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const sle=ale;var lle=Object.defineProperty,cle=Object.defineProperties,ule=Object.getOwnPropertyDescriptors,Yv=Object.getOwnPropertySymbols,QF=Object.prototype.hasOwnProperty,eB=Object.prototype.propertyIsEnumerable,mC=(e,t,r)=>t in e?lle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G3=(e,t)=>{for(var r in t||(t={}))QF.call(t,r)&&mC(e,r,t[r]);if(Yv)for(var r of Yv(t))eB.call(t,r)&&mC(e,r,t[r]);return e},tB=(e,t)=>cle(e,ule(t)),rB=(e,t)=>{var r={};for(var n in e)QF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yv)for(var n of Yv(e))t.indexOf(n)<0&&eB.call(e,n)&&(r[n]=e[n]);return r};const nB={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},qy=k.forwardRef((e,t)=>{const r=tt("ScrollArea",nB,e),{children:n,className:o,classNames:i,styles:a,scrollbarSize:s,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:f,viewportRef:d,onScrollPositionChange:p,unstyled:h,variant:m,viewportProps:_}=r,w=rB(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[g,E]=k.useState(!1),A=Ir(),{classes:N,cx:D}=sle({scrollbarSize:s,offsetScrollbars:f,scrollbarHovered:g,hidden:c==="never"},{name:"ScrollArea",classNames:i,styles:a,unstyled:h,variant:m});return ne.createElement(nle,{type:c==="never"?"always":c,scrollHideDelay:l,dir:u||A.dir,ref:t,asChild:!0},ne.createElement(Je,G3({className:D(N.root,o)},w),ne.createElement(ole,tB(G3({},_),{className:N.viewport,ref:d,onScroll:typeof p=="function"?({currentTarget:y})=>p({x:y.scrollLeft,y:y.scrollTop}):void 0}),n),ne.createElement(vC,{orientation:"horizontal",className:N.scrollbar,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1)},ne.createElement(gC,{className:N.thumb})),ne.createElement(vC,{orientation:"vertical",className:N.scrollbar,forceMount:!0,onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1)},ne.createElement(gC,{className:N.thumb})),ne.createElement(ile,{className:N.corner})))}),oB=k.forwardRef((e,t)=>{const r=tt("ScrollAreaAutosize",nB,e),{children:n,classNames:o,styles:i,scrollbarSize:a,scrollHideDelay:s,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,sx:h,variant:m,viewportProps:_}=r,w=rB(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return ne.createElement(Je,tB(G3({},w),{ref:t,sx:[{display:"flex"},...O_(h)]}),ne.createElement(Je,{sx:{display:"flex",flexDirection:"column",flex:1}},ne.createElement(qy,{classNames:o,styles:i,scrollHideDelay:s,scrollbarSize:a,type:l,dir:c,offsetScrollbars:u,viewportRef:f,onScrollPositionChange:d,unstyled:p,variant:m,viewportProps:_},n)))});oB.displayName="@mantine/core/ScrollAreaAutosize";qy.displayName="@mantine/core/ScrollArea";qy.Autosize=oB;const iB=qy;var fle=Object.defineProperty,dle=Object.defineProperties,ple=Object.getOwnPropertyDescriptors,Xv=Object.getOwnPropertySymbols,aB=Object.prototype.hasOwnProperty,sB=Object.prototype.propertyIsEnumerable,yC=(e,t,r)=>t in e?fle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bC=(e,t)=>{for(var r in t||(t={}))aB.call(t,r)&&yC(e,r,t[r]);if(Xv)for(var r of Xv(t))sB.call(t,r)&&yC(e,r,t[r]);return e},hle=(e,t)=>dle(e,ple(t)),vle=(e,t)=>{var r={};for(var n in e)aB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xv)for(var n of Xv(e))t.indexOf(n)<0&&sB.call(e,n)&&(r[n]=e[n]);return r};const q_=k.forwardRef((e,t)=>{var r=e,{style:n}=r,o=vle(r,["style"]);return ne.createElement(iB,hle(bC({},o),{style:bC({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});q_.displayName="@mantine/core/SelectScrollArea";var gle=it(()=>({dropdown:{},itemsWrapper:{padding:me(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const mle=gle,Qo=Math.min,rn=Math.max,Zv=Math.round,Rh=Math.floor,js=e=>({x:e,y:e}),yle={left:"right",right:"left",bottom:"top",top:"bottom"},ble={start:"end",end:"start"};function K3(e,t,r){return rn(e,Qo(t,r))}function Ea(e,t){return typeof e=="function"?e(t):e}function ei(e){return e.split("-")[0]}function of(e){return e.split("-")[1]}function G_(e){return e==="x"?"y":"x"}function K_(e){return e==="y"?"height":"width"}function tc(e){return["top","bottom"].includes(ei(e))?"y":"x"}function Y_(e){return G_(tc(e))}function wle(e,t,r){r===void 0&&(r=!1);const n=of(e),o=Y_(e),i=K_(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Jv(a)),[a,Jv(a)]}function xle(e){const t=Jv(e);return[Y3(e),t,Y3(t)]}function Y3(e){return e.replace(/start|end/g,t=>ble[t])}function _le(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}function Ele(e,t,r,n){const o=of(e);let i=_le(ei(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Y3)))),i}function Jv(e){return e.replace(/left|right|bottom|top/g,t=>yle[t])}function Sle(e){return{top:0,right:0,bottom:0,left:0,...e}}function X_(e){return typeof e!="number"?Sle(e):{top:e,right:e,bottom:e,left:e}}function Iu(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function wC(e,t,r){let{reference:n,floating:o}=e;const i=tc(t),a=Y_(t),s=K_(a),l=ei(t),c=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,d=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(of(t)){case"start":p[a]-=d*(r&&c?-1:1);break;case"end":p[a]+=d*(r&&c?-1:1);break}return p}const Cle=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=wC(c,n,l),d=n,p={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ea(e,t)||{};if(c==null)return{};const f=X_(u),d={x:r,y:n},p=Y_(o),h=K_(p),m=await a.getDimensions(c),_=p==="y",w=_?"top":"left",g=_?"bottom":"right",E=_?"clientHeight":"clientWidth",A=i.reference[h]+i.reference[p]-d[p]-i.floating[h],N=d[p]-i.reference[p],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let y=D?D[E]:0;(!y||!await(a.isElement==null?void 0:a.isElement(D)))&&(y=s.floating[E]||i.floating[h]);const U=A/2-N/2,L=y/2-m[h]/2-1,G=Qo(f[w],L),V=Qo(f[g],L),S=G,C=y-m[h]-V,v=y/2-m[h]/2+U,b=K3(S,v,C),B=!l.arrow&&of(o)!=null&&v!=b&&i.reference[h]/2-(vS<=0)){var L,G;const S=(((L=i.flip)==null?void 0:L.index)||0)+1,C=N[S];if(C)return{data:{index:S,overflows:U},reset:{placement:C}};let v=(G=U.filter(b=>b.overflows[0]<=0).sort((b,B)=>b.overflows[1]-B.overflows[1])[0])==null?void 0:G.placement;if(!v)switch(p){case"bestFit":{var V;const b=(V=U.map(B=>[B.placement,B.overflows.filter(T=>T>0).reduce((T,j)=>T+j,0)]).sort((B,T)=>B[1]-T[1])[0])==null?void 0:V[0];b&&(v=b);break}case"initialPlacement":v=s;break}if(o!==v)return{reset:{placement:v}}}return{}}}};function lB(e){const t=Qo(...e.map(i=>i.left)),r=Qo(...e.map(i=>i.top)),n=rn(...e.map(i=>i.right)),o=rn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function kle(e){const t=e.slice().sort((o,i)=>o.y-i.y),r=[];let n=null;for(let o=0;on.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>Iu(lB(o)))}const Ale=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=Ea(e,t),u=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]),f=kle(u),d=Iu(lB(u)),p=X_(s);function h(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(_=>l>_.left-p.left&&l<_.right+p.right&&c>_.top-p.top&&c<_.bottom+p.bottom)||d;if(f.length>=2){if(tc(r)==="y"){const G=f[0],V=f[f.length-1],S=ei(r)==="top",C=G.top,v=V.bottom,b=S?G.left:V.left,B=S?G.right:V.right,T=B-b,j=v-C;return{top:C,bottom:v,left:b,right:B,width:T,height:j,x:b,y:C}}const _=ei(r)==="left",w=rn(...f.map(G=>G.right)),g=Qo(...f.map(G=>G.left)),E=f.filter(G=>_?G.left===g:G.right===w),A=E[0].top,N=E[E.length-1].bottom,D=g,y=w,U=y-D,L=N-A;return{top:A,bottom:N,left:D,right:y,width:U,height:L,x:D,y:A}}return d}const m=await i.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:a});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};async function Ile(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ei(r),s=of(r),l=tc(r)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Ea(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const cB=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await Ile(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},$le=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:_=>{let{x:w,y:g}=_;return{x:w,y:g}}},...l}=Ea(e,t),c={x:r,y:n},u=await Z_(t,l),f=tc(ei(o)),d=G_(f);let p=c[d],h=c[f];if(i){const _=d==="y"?"top":"left",w=d==="y"?"bottom":"right",g=p+u[_],E=p-u[w];p=K3(g,p,E)}if(a){const _=f==="y"?"top":"left",w=f==="y"?"bottom":"right",g=h+u[_],E=h-u[w];h=K3(g,h,E)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-r,y:m.y-n}}}}},Tle=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ea(e,t),u={x:r,y:n},f=tc(o),d=G_(f);let p=u[d],h=u[f];const m=Ea(s,t),_=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const E=d==="y"?"height":"width",A=i.reference[d]-i.floating[E]+_.mainAxis,N=i.reference[d]+i.reference[E]-_.mainAxis;pN&&(p=N)}if(c){var w,g;const E=d==="y"?"width":"height",A=["top","left"].includes(ei(o)),N=i.reference[f]-i.floating[E]+(A&&((w=a.offset)==null?void 0:w[f])||0)+(A?0:_.crossAxis),D=i.reference[f]+i.reference[E]+(A?0:((g=a.offset)==null?void 0:g[f])||0)-(A?_.crossAxis:0);hD&&(h=D)}return{[d]:p,[f]:h}}}},Dle=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Ea(e,t),l=await Z_(t,s),c=ei(r),u=of(r),f=tc(r)==="y",{width:d,height:p}=n.floating;let h,m;c==="top"||c==="bottom"?(h=c,m=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=c,h=u==="end"?"top":"bottom");const _=p-l[h],w=d-l[m],g=!t.middlewareData.shift;let E=_,A=w;if(f){const D=d-l.left-l.right;A=u||g?Qo(w,D):D}else{const D=p-l.top-l.bottom;E=u||g?Qo(_,D):D}if(g&&!u){const D=rn(l.left,0),y=rn(l.right,0),U=rn(l.top,0),L=rn(l.bottom,0);f?A=d-2*(D!==0||y!==0?D+y:rn(l.left,l.right)):E=p-2*(U!==0||L!==0?U+L:rn(l.top,l.bottom))}await a({...t,availableWidth:A,availableHeight:E});const N=await o.getDimensions(i.floating);return d!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function Ls(e){return uB(e)?(e.nodeName||"").toLowerCase():"#document"}function Wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ma(e){var t;return(t=(uB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uB(e){return e instanceof Node||e instanceof Wn(e).Node}function Sa(e){return e instanceof Element||e instanceof Wn(e).Element}function Di(e){return e instanceof HTMLElement||e instanceof Wn(e).HTMLElement}function xC(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wn(e).ShadowRoot}function g0(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=So(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Mle(e){return["table","td","th"].includes(Ls(e))}function J_(e){const t=Q_(),r=So(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Rle(e){let t=$u(e);for(;Di(t)&&!Gy(t);){if(J_(t))return t;t=$u(t)}return null}function Q_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gy(e){return["html","body","#document"].includes(Ls(e))}function So(e){return Wn(e).getComputedStyle(e)}function Ky(e){return Sa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $u(e){if(Ls(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xC(e)&&e.host||Ma(e);return xC(t)?t.host:t}function fB(e){const t=$u(e);return Gy(t)?e.ownerDocument?e.ownerDocument.body:e.body:Di(t)&&g0(t)?t:fB(t)}function ga(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=fB(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Wn(o);return i?t.concat(a,a.visualViewport||[],g0(o)?o:[],a.frameElement&&r?ga(a.frameElement):[]):t.concat(o,ga(o,[],r))}function dB(e){const t=So(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Di(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Zv(r)!==i||Zv(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function e4(e){return Sa(e)?e:e.contextElement}function pu(e){const t=e4(e);if(!Di(t))return js(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=dB(t);let a=(i?Zv(r.width):r.width)/n,s=(i?Zv(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Nle=js(0);function pB(e){const t=Wn(e);return!Q_()||!t.visualViewport?Nle:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fle(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Wn(e)?!1:t}function Wl(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=e4(e);let a=js(1);t&&(n?Sa(n)&&(a=pu(n)):a=pu(e));const s=Fle(i,r,n)?pB(i):js(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const d=Wn(i),p=n&&Sa(n)?Wn(n):n;let h=d.frameElement;for(;h&&n&&p!==d;){const m=pu(h),_=h.getBoundingClientRect(),w=So(h),g=_.left+(h.clientLeft+parseFloat(w.paddingLeft))*m.x,E=_.top+(h.clientTop+parseFloat(w.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,f*=m.y,l+=g,c+=E,h=Wn(h).frameElement}}return Iu({width:u,height:f,x:l,y:c})}function Ble(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Di(r),i=Ma(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=js(1);const l=js(0);if((o||!o&&n!=="fixed")&&((Ls(r)!=="body"||g0(i))&&(a=Ky(r)),Di(r))){const c=Wl(r);s=pu(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}}function jle(e){return Array.from(e.getClientRects())}function hB(e){return Wl(Ma(e)).left+Ky(e).scrollLeft}function Lle(e){const t=Ma(e),r=Ky(e),n=e.ownerDocument.body,o=rn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=rn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+hB(e);const s=-r.scrollTop;return So(n).direction==="rtl"&&(a+=rn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Ule(e,t){const r=Wn(e),n=Ma(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=Q_();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function zle(e,t){const r=Wl(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Di(e)?pu(e):js(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function _C(e,t,r){let n;if(t==="viewport")n=Ule(e,r);else if(t==="document")n=Lle(Ma(e));else if(Sa(t))n=zle(t,r);else{const o=pB(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Iu(n)}function vB(e,t){const r=$u(e);return r===t||!Sa(r)||Gy(r)?!1:So(r).position==="fixed"||vB(r,t)}function Hle(e,t){const r=t.get(e);if(r)return r;let n=ga(e,[],!1).filter(s=>Sa(s)&&Ls(s)!=="body"),o=null;const i=So(e).position==="fixed";let a=i?$u(e):e;for(;Sa(a)&&!Gy(a);){const s=So(a),l=J_(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||g0(a)&&!l&&vB(e,a))?n=n.filter(u=>u!==a):o=s,a=$u(a)}return t.set(e,n),n}function Vle(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Hle(t,this._c):[].concat(r),n],s=a[0],l=a.reduce((c,u)=>{const f=_C(t,u,o);return c.top=rn(f.top,c.top),c.right=Qo(f.right,c.right),c.bottom=Qo(f.bottom,c.bottom),c.left=rn(f.left,c.left),c},_C(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wle(e){const{width:t,height:r}=dB(e);return{width:t,height:r}}function qle(e,t,r){const n=Di(t),o=Ma(t),i=r==="fixed",a=Wl(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=js(0);if(n||!n&&!i)if((Ls(t)!=="body"||g0(o))&&(s=Ky(t)),n){const c=Wl(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=hB(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function EC(e,t){return!Di(e)||So(e).position==="fixed"?null:t?t(e):e.offsetParent}function gB(e,t){const r=Wn(e);if(!Di(e))return r;let n=EC(e,t);for(;n&&Mle(n)&&So(n).position==="static";)n=EC(n,t);return n&&(Ls(n)==="html"||Ls(n)==="body"&&So(n).position==="static"&&!J_(n))?r:n||Rle(e)||r}const Gle=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||gB,i=this.getDimensions;return{reference:qle(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function Kle(e){return So(e).direction==="rtl"}const Yle={convertOffsetParentRelativeRectToViewportRelativeRect:Ble,getDocumentElement:Ma,getClippingRect:Vle,getOffsetParent:gB,getElementRects:Gle,getClientRects:jle,getDimensions:Wle,getScale:pu,isElement:Sa,isRTL:Kle};function Xle(e,t){let r=null,n;const o=Ma(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=Rh(u),h=Rh(o.clientWidth-(c+f)),m=Rh(o.clientHeight-(u+d)),_=Rh(c),g={rootMargin:-p+"px "+-h+"px "+-m+"px "+-_+"px",threshold:rn(0,Qo(1,l))||1};let E=!0;function A(N){const D=N[0].intersectionRatio;if(D!==l){if(!E)return a();D?a(!1,D):n=setTimeout(()=>{a(!1,1e-7)},100)}E=!1}try{r=new IntersectionObserver(A,{...g,root:o.ownerDocument})}catch{r=new IntersectionObserver(A,g)}r.observe(e)}return a(!0),i}function Zle(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=e4(e),u=o||i?[...c?ga(c):[],...ga(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),i&&w.addEventListener("resize",r)});const f=c&&s?Xle(c,r):null;let d=-1,p=null;a&&(p=new ResizeObserver(w=>{let[g]=w;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{p&&p.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?Wl(e):null;l&&_();function _(){const w=Wl(e);m&&(w.x!==m.x||w.y!==m.y||w.width!==m.width||w.height!==m.height)&&r(),m=w,h=requestAnimationFrame(_)}return r(),()=>{u.forEach(w=>{o&&w.removeEventListener("scroll",r),i&&w.removeEventListener("resize",r)}),f&&f(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const t4=$le,mB=Ole,Jle=Dle,SC=Ple,yB=Ale,Qle=Tle,ece=(e,t,r)=>{const n=new Map,o={platform:Yle,...r},i={...o.platform,_c:n};return Cle(e,t,{...o,platform:i})},bB=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?SC({element:t.current,padding:r}).fn(o):{}:t?SC({element:t,padding:r}).fn(o):{}}}};var M1=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Qv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Qv(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Qv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function CC(e){const t=k.useRef(e);return M1(()=>{t.current=e}),t}function tce(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:i,open:a}=e,[s,l]=k.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=k.useState(n);Qv(c,n)||u(n);const f=k.useRef(null),d=k.useRef(null),p=k.useRef(s),h=CC(i),m=CC(o),[_,w]=k.useState(null),[g,E]=k.useState(null),A=k.useCallback(G=>{f.current!==G&&(f.current=G,w(G))},[]),N=k.useCallback(G=>{d.current!==G&&(d.current=G,E(G))},[]),D=k.useCallback(()=>{if(!f.current||!d.current)return;const G={placement:t,strategy:r,middleware:c};m.current&&(G.platform=m.current),ece(f.current,d.current,G).then(V=>{const S={...V,isPositioned:!0};y.current&&!Qv(p.current,S)&&(p.current=S,Ys.flushSync(()=>{l(S)}))})},[c,t,r,m]);M1(()=>{a===!1&&p.current.isPositioned&&(p.current.isPositioned=!1,l(G=>({...G,isPositioned:!1})))},[a]);const y=k.useRef(!1);M1(()=>(y.current=!0,()=>{y.current=!1}),[]),M1(()=>{if(_&&g){if(h.current)return h.current(_,g,D);D()}},[_,g,D,h]);const U=k.useMemo(()=>({reference:f,floating:d,setReference:A,setFloating:N}),[A,N]),L=k.useMemo(()=>({reference:_,floating:g}),[_,g]);return k.useMemo(()=>({...s,update:D,refs:U,elements:L,reference:A,floating:N}),[s,D,U,L,A,N])}var Tu=typeof document<"u"?k.useLayoutEffect:k.useEffect;let ew=!1,rce=0;const PC=()=>"floating-ui-"+rce++;function nce(){const[e,t]=k.useState(()=>ew?PC():void 0);return Tu(()=>{e==null&&t(PC())},[]),k.useEffect(()=>{ew||(ew=!0)},[]),e}const oce=ap["useId".toString()],OC=oce||nce;function ice(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const ace=k.createContext(null),sce=k.createContext(null),wB=()=>{var e;return((e=k.useContext(ace))==null?void 0:e.id)||null},r4=()=>k.useContext(sce);function fs(e){return(e==null?void 0:e.ownerDocument)||document}function lce(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function cce(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function n4(e){return fs(e).defaultView||window}function xi(e){return e?e instanceof n4(e).Element:!1}function xB(e){return e?e instanceof n4(e).HTMLElement:!1}function uce(e){if(typeof ShadowRoot>"u")return!1;const t=n4(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function fce(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(lce())||t.test(cce()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function dce(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function _B(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function kC(e){const t=k.useRef(e);return Tu(()=>{t.current=e}),t}const AC="data-floating-ui-safe-polygon";function R1(e,t,r){return r&&!_B(r)?0:typeof e=="number"?e:e==null?void 0:e[t]}const pce=function(e,t){let{enabled:r=!0,delay:n=0,handleClose:o=null,mouseOnly:i=!1,restMs:a=0,move:s=!0}=t===void 0?{}:t;const{open:l,onOpenChange:c,dataRef:u,events:f,elements:{domReference:d,floating:p},refs:h}=e,m=r4(),_=wB(),w=kC(o),g=kC(n),E=k.useRef(),A=k.useRef(),N=k.useRef(),D=k.useRef(),y=k.useRef(!0),U=k.useRef(!1),L=k.useRef(()=>{}),G=k.useCallback(()=>{var v;const b=(v=u.current.openEvent)==null?void 0:v.type;return(b==null?void 0:b.includes("mouse"))&&b!=="mousedown"},[u]);k.useEffect(()=>{if(!r)return;function v(){clearTimeout(A.current),clearTimeout(D.current),y.current=!0}return f.on("dismiss",v),()=>{f.off("dismiss",v)}},[r,f]),k.useEffect(()=>{if(!r||!w.current||!l)return;function v(){G()&&c(!1)}const b=fs(p).documentElement;return b.addEventListener("mouseleave",v),()=>{b.removeEventListener("mouseleave",v)}},[p,l,c,r,w,u,G]);const V=k.useCallback(function(v){v===void 0&&(v=!0);const b=R1(g.current,"close",E.current);b&&!N.current?(clearTimeout(A.current),A.current=setTimeout(()=>c(!1),b)):v&&(clearTimeout(A.current),c(!1))},[g,c]),S=k.useCallback(()=>{L.current(),N.current=void 0},[]),C=k.useCallback(()=>{if(U.current){const v=fs(h.floating.current).body;v.style.pointerEvents="",v.removeAttribute(AC),U.current=!1}},[h]);return k.useEffect(()=>{if(!r)return;function v(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function b(j){if(clearTimeout(A.current),y.current=!1,i&&!_B(E.current)||a>0&&R1(g.current,"open")===0)return;u.current.openEvent=j;const H=R1(g.current,"open",E.current);H?A.current=setTimeout(()=>{c(!0)},H):c(!0)}function B(j){if(v())return;L.current();const H=fs(p);if(clearTimeout(D.current),w.current){l||clearTimeout(A.current),N.current=w.current({...e,tree:m,x:j.clientX,y:j.clientY,onClose(){C(),S(),V()}});const P=N.current;H.addEventListener("mousemove",P),L.current=()=>{H.removeEventListener("mousemove",P)};return}V()}function T(j){v()||w.current==null||w.current({...e,tree:m,x:j.clientX,y:j.clientY,onClose(){C(),S(),V()}})(j)}if(xi(d)){const j=d;return l&&j.addEventListener("mouseleave",T),p==null||p.addEventListener("mouseleave",T),s&&j.addEventListener("mousemove",b,{once:!0}),j.addEventListener("mouseenter",b),j.addEventListener("mouseleave",B),()=>{l&&j.removeEventListener("mouseleave",T),p==null||p.removeEventListener("mouseleave",T),s&&j.removeEventListener("mousemove",b),j.removeEventListener("mouseenter",b),j.removeEventListener("mouseleave",B)}}},[d,p,r,e,i,a,s,V,S,C,c,l,m,g,w,u]),Tu(()=>{var v;if(r&&l&&(v=w.current)!=null&&v.__options.blockPointerEvents&&G()){const T=fs(p).body;if(T.setAttribute(AC,""),T.style.pointerEvents="none",U.current=!0,xi(d)&&p){var b,B;const j=d,H=m==null||(b=m.nodesRef.current.find(P=>P.id===_))==null||(B=b.context)==null?void 0:B.elements.floating;return H&&(H.style.pointerEvents=""),j.style.pointerEvents="auto",p.style.pointerEvents="auto",()=>{j.style.pointerEvents="",p.style.pointerEvents=""}}}},[r,l,_,p,d,m,w,u,G]),Tu(()=>{l||(E.current=void 0,S(),C())},[l,S,C]),k.useEffect(()=>()=>{S(),clearTimeout(A.current),clearTimeout(D.current),C()},[r,S,C]),k.useMemo(()=>{if(!r)return{};function v(b){E.current=b.pointerType}return{reference:{onPointerDown:v,onPointerEnter:v,onMouseMove(){l||a===0||(clearTimeout(D.current),D.current=setTimeout(()=>{y.current||c(!0)},a))}},floating:{onMouseEnter(){clearTimeout(A.current)},onMouseLeave(){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),V(!1)}}}},[f,r,a,l,c,V])},EB=k.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),SB=()=>k.useContext(EB),hce=e=>{let{children:t,delay:r,timeoutMs:n=0}=e;const[o,i]=k.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=k.useRef(null),s=k.useCallback(l=>{i({currentId:l})},[]);return Tu(()=>{o.currentId?a.current===null?a.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),a.current=null)},[o.currentId]),k.createElement(EB.Provider,{value:k.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,i,s])},t)},vce=(e,t)=>{let{open:r,onOpenChange:n}=e,{id:o}=t;const{currentId:i,setCurrentId:a,initialDelay:s,setState:l,timeoutMs:c}=SB();k.useEffect(()=>{i&&(l({delay:{open:1,close:R1(s,"close")}}),i!==o&&n(!1))},[o,n,l,i,s]),k.useEffect(()=>{function u(){n(!1),l({delay:s,currentId:null})}if(!r&&i===o)if(c){const f=window.setTimeout(u,c);return()=>{clearTimeout(f)}}else u()},[r,l,i,o,n,s,c]),k.useEffect(()=>{r&&a(o)},[r,a,o])};function gce(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function IC(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&uce(r)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}function tw(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function mce(e){return"composedPath"in e?e.composedPath()[0]:e.target}const yce=ap["useInsertionEffect".toString()],bce=yce||(e=>e());function CB(e){const t=k.useRef(()=>{});return bce(()=>{t.current=e}),k.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o!1),N=typeof d=="function"?A:d,D=k.useRef(!1),{escapeKeyBubbles:y,outsidePressBubbles:U}=_ce(w);return k.useEffect(()=>{if(!r||!u)return;c.current.__escapeKeyBubbles=y,c.current.__outsidePressBubbles=U;function L(v){if(v.key==="Escape"){const b=g?tw(g.nodesRef.current,i):[];if(b.length>0){let B=!0;if(b.forEach(T=>{var j;if((j=T.context)!=null&&j.open&&!T.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function G(v){const b=D.current;if(D.current=!1,b||typeof N=="function"&&!N(v))return;const B=mce(v);if(xB(B)&&l){const H=l.ownerDocument.defaultView||window,P=B.scrollWidth>B.clientWidth,F=B.scrollHeight>B.clientHeight;let $=F&&v.offsetX>B.clientWidth;if(F&&H.getComputedStyle(B).direction==="rtl"&&($=v.offsetX<=B.offsetWidth-B.clientWidth),$||P&&v.offsetY>B.clientHeight)return}const T=g&&tw(g.nodesRef.current,i).some(H=>{var P;return N1(v,(P=H.context)==null?void 0:P.elements.floating)});if(N1(v,l)||N1(v,s)||T)return;const j=g?tw(g.nodesRef.current,i):[];if(j.length>0){let H=!0;if(j.forEach(P=>{var F;if((F=P.context)!=null&&F.open&&!P.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:E?{preventScroll:!0}:fce(v)||dce(v)}}),n(!1)}function V(){n(!1)}const S=fs(l);f&&S.addEventListener("keydown",L),N&&S.addEventListener(p,G);let C=[];return _&&(xi(s)&&(C=ga(s)),xi(l)&&(C=C.concat(ga(l))),!xi(a)&&a&&a.contextElement&&(C=C.concat(ga(a.contextElement)))),C=C.filter(v=>{var b;return v!==((b=S.defaultView)==null?void 0:b.visualViewport)}),C.forEach(v=>{v.addEventListener("scroll",V,{passive:!0})}),()=>{f&&S.removeEventListener("keydown",L),N&&S.removeEventListener(p,G),C.forEach(v=>{v.removeEventListener("scroll",V)})}},[c,l,s,a,f,N,p,o,g,i,r,n,_,u,y,U,E]),k.useEffect(()=>{D.current=!1},[N,p]),k.useMemo(()=>u?{reference:{[wce[m]]:()=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[xce[p]]:()=>{D.current=!0}}}:{},[u,o,h,p,m,n])},Sce=function(e,t){let{open:r,onOpenChange:n,dataRef:o,events:i,refs:a,elements:{floating:s,domReference:l}}=e,{enabled:c=!0,keyboardOnly:u=!0}=t===void 0?{}:t;const f=k.useRef(""),d=k.useRef(!1),p=k.useRef();return k.useEffect(()=>{if(!c)return;const m=fs(s).defaultView||window;function _(){!r&&xB(l)&&l===gce(fs(l))&&(d.current=!0)}return m.addEventListener("blur",_),()=>{m.removeEventListener("blur",_)}},[s,l,r,c]),k.useEffect(()=>{if(!c)return;function h(m){(m.type==="referencePress"||m.type==="escapeKey")&&(d.current=!0)}return i.on("dismiss",h),()=>{i.off("dismiss",h)}},[i,c]),k.useEffect(()=>()=>{clearTimeout(p.current)},[]),k.useMemo(()=>c?{reference:{onPointerDown(h){let{pointerType:m}=h;f.current=m,d.current=!!(m&&u)},onMouseLeave(){d.current=!1},onFocus(h){var m;d.current||h.type==="focus"&&((m=o.current.openEvent)==null?void 0:m.type)==="mousedown"&&o.current.openEvent&&N1(o.current.openEvent,l)||(o.current.openEvent=h.nativeEvent,n(!0))},onBlur(h){d.current=!1;const m=h.relatedTarget,_=xi(m)&&m.hasAttribute("data-floating-ui-focus-guard")&&m.getAttribute("data-type")==="outside";p.current=setTimeout(()=>{IC(a.floating.current,m)||IC(l,m)||_||n(!1)})}}}:{},[c,u,l,a,o,n])},Cce=function(e,t){let{open:r}=e,{enabled:n=!0,role:o="dialog"}=t===void 0?{}:t;const i=OC(),a=OC();return k.useMemo(()=>{const s={id:i,role:o};return n?o==="tooltip"?{reference:{"aria-describedby":r?i:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":r?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[n,o,r,i,a])};function o4(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=tce(e),i=r4(),a=k.useRef(null),s=k.useRef({}),l=k.useState(()=>ice())[0],[c,u]=k.useState(null),f=k.useCallback(w=>{const g=xi(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;o.refs.setReference(g)},[o.refs]),d=k.useCallback(w=>{(xi(w)||w===null)&&(a.current=w,u(w)),(xi(o.refs.reference.current)||o.refs.reference.current===null||w!==null&&!xi(w))&&o.refs.setReference(w)},[o.refs]),p=k.useMemo(()=>({...o.refs,setReference:d,setPositionReference:f,domReference:a}),[o.refs,d,f]),h=k.useMemo(()=>({...o.elements,domReference:c}),[o.elements,c]),m=CB(r),_=k.useMemo(()=>({...o,refs:p,elements:h,dataRef:s,nodeId:n,events:l,open:t,onOpenChange:m}),[o,n,l,t,m,p,h]);return Tu(()=>{const w=i==null?void 0:i.nodesRef.current.find(g=>g.id===n);w&&(w.context=_)}),k.useMemo(()=>({...o,context:_,refs:p,reference:d,positionReference:f}),[o,p,_,d,f])}function rw(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof l=="function"){var c;(c=n.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;ph(...d))}}}else o[s]=l}),o),{})}}const Pce=function(e){e===void 0&&(e=[]);const t=e,r=k.useCallback(i=>rw(i,e,"reference"),t),n=k.useCallback(i=>rw(i,e,"floating"),t),o=k.useCallback(i=>rw(i,e,"item"),e.map(i=>i==null?void 0:i.item));return k.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])};function PB({opened:e,floating:t,position:r,positionDependencies:n}){const[o,i]=k.useState(0);k.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return Zle(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),Yn(()=>{t.update()},n),Yn(()=>{i(a=>a+1)},[e])}function Oce(e){const t=[cB(e.offset)];return e.middlewares.shift&&t.push(t4({limiter:Qle()})),e.middlewares.flip&&t.push(mB()),e.middlewares.inline&&t.push(yB()),t.push(bB({element:e.arrowRef,padding:e.arrowOffset})),t}function kce(e){const[t,r]=Hl({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var a;(a=e.onClose)==null||a.call(e),r(!1)},o=()=>{var a,s;t?((a=e.onClose)==null||a.call(e),r(!1)):((s=e.onOpen)==null||s.call(e),r(!0))},i=o4({placement:e.position,middleware:[...Oce(e),...e.width==="target"?[Jle({apply({rects:a}){var s,l;Object.assign((l=(s=i.refs.floating.current)==null?void 0:s.style)!=null?l:{},{width:`${a.reference.width}px`})}})]:[]]});return PB({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Yn(()=>{var a;(a=e.onPositionChange)==null||a.call(e,i.placement)},[i.placement]),Yn(()=>{var a,s;e.opened?(s=e.onOpen)==null||s.call(e):(a=e.onClose)==null||a.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const OB={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[Ace,kB]=a0(OB.context);var Ice=Object.defineProperty,$ce=Object.defineProperties,Tce=Object.getOwnPropertyDescriptors,eg=Object.getOwnPropertySymbols,AB=Object.prototype.hasOwnProperty,IB=Object.prototype.propertyIsEnumerable,$C=(e,t,r)=>t in e?Ice(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nh=(e,t)=>{for(var r in t||(t={}))AB.call(t,r)&&$C(e,r,t[r]);if(eg)for(var r of eg(t))IB.call(t,r)&&$C(e,r,t[r]);return e},Dce=(e,t)=>$ce(e,Tce(t)),Mce=(e,t)=>{var r={};for(var n in e)AB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&eg)for(var n of eg(e))t.indexOf(n)<0&&IB.call(e,n)&&(r[n]=e[n]);return r};const Rce={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},$B=k.forwardRef((e,t)=>{const r=tt("PopoverTarget",Rce,e),{children:n,refProp:o,popupType:i,shouldOverrideDefaultTargetId:a}=r,s=Mce(r,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!s0(n))throw new Error(OB.children);const l=s,c=kB(),u=Xs(c.reference,n.ref,t),f=c.withRoles?{"aria-haspopup":i,"aria-expanded":c.opened,"aria-controls":c.getDropdownId(),id:a?c.getTargetId():n.props.id}:{};return k.cloneElement(n,Nh(Dce(Nh(Nh(Nh({},l),f),c.targetProps),{className:JR(c.targetProps.className,l.className,n.props.className),[o]:u}),c.controlled?null:{onClick:c.onToggle}))});$B.displayName="@mantine/core/PopoverTarget";var Nce=it((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const Fce=Nce;var Bce=Object.defineProperty,TC=Object.getOwnPropertySymbols,jce=Object.prototype.hasOwnProperty,Lce=Object.prototype.propertyIsEnumerable,DC=(e,t,r)=>t in e?Bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wc=(e,t)=>{for(var r in t||(t={}))jce.call(t,r)&&DC(e,r,t[r]);if(TC)for(var r of TC(t))Lce.call(t,r)&&DC(e,r,t[r]);return e};const MC={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Uce({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Ph?wc(wc(wc({transitionProperty:Ph[e].transitionProperty},o),Ph[e].common),Ph[e][MC[t]]):null:wc(wc(wc({transitionProperty:e.transitionProperty},o),e.common),e[MC[t]])}function zce({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s}){const l=Ir(),c=f0(),u=l.respectReducedMotion?c:!1,[f,d]=k.useState(u?0:e),[p,h]=k.useState(n?"entered":"exited"),m=k.useRef(-1),_=w=>{const g=w?o:i,E=w?a:s;h(w?"pre-entering":"pre-exiting"),window.clearTimeout(m.current);const A=u?0:w?e:t;if(d(A),A===0)typeof g=="function"&&g(),typeof E=="function"&&E(),h(w?"entered":"exited");else{const N=window.setTimeout(()=>{typeof g=="function"&&g(),h(w?"entering":"exiting")},10);m.current=window.setTimeout(()=>{window.clearTimeout(N),typeof E=="function"&&E(),h(w?"entered":"exited")},A)}};return Yn(()=>{_(n)},[n]),k.useEffect(()=>()=>window.clearTimeout(m.current),[]),{transitionDuration:f,transitionStatus:p,transitionTimingFunction:r||l.transitionTimingFunction}}function rc({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u}){const{transitionDuration:f,transitionStatus:d,transitionTimingFunction:p}=zce({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:u});return f===0?o?ne.createElement(ne.Fragment,null,i({})):e?i({display:"none"}):null:d==="exited"?e?i({display:"none"}):null:ne.createElement(ne.Fragment,null,i(Uce({transition:t,duration:f,state:d,timingFunction:p})))}rc.displayName="@mantine/core/Transition";function i4({children:e,active:t=!0,refProp:r="ref"}){const n=xne(t),o=Xs(n,e==null?void 0:e.ref);return s0(e)?k.cloneElement(e,{[r]:o}):e}i4.displayName="@mantine/core/FocusTrap";var Hce=Object.defineProperty,Vce=Object.defineProperties,Wce=Object.getOwnPropertyDescriptors,RC=Object.getOwnPropertySymbols,qce=Object.prototype.hasOwnProperty,Gce=Object.prototype.propertyIsEnumerable,NC=(e,t,r)=>t in e?Hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Va=(e,t)=>{for(var r in t||(t={}))qce.call(t,r)&&NC(e,r,t[r]);if(RC)for(var r of RC(t))Gce.call(t,r)&&NC(e,r,t[r]);return e},Fh=(e,t)=>Vce(e,Wce(t));function FC(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function BC(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const Kce={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Yce({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){const[l,c="center"]=e.split("-"),u={width:me(t),height:me(t),transform:"rotate(45deg)",position:"absolute",[Kce[l]]:me(n)},f=me(-t/2);return l==="left"?Fh(Va(Va({},u),FC(c,a,r,o)),{right:f,borderLeftColor:"transparent",borderBottomColor:"transparent"}):l==="right"?Fh(Va(Va({},u),FC(c,a,r,o)),{left:f,borderRightColor:"transparent",borderTopColor:"transparent"}):l==="top"?Fh(Va(Va({},u),BC(c,i,r,o,s)),{bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent"}):l==="bottom"?Fh(Va(Va({},u),BC(c,i,r,o,s)),{top:f,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Xce=Object.defineProperty,Zce=Object.defineProperties,Jce=Object.getOwnPropertyDescriptors,tg=Object.getOwnPropertySymbols,TB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,jC=(e,t,r)=>t in e?Xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qce=(e,t)=>{for(var r in t||(t={}))TB.call(t,r)&&jC(e,r,t[r]);if(tg)for(var r of tg(t))DB.call(t,r)&&jC(e,r,t[r]);return e},eue=(e,t)=>Zce(e,Jce(t)),tue=(e,t)=>{var r={};for(var n in e)TB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tg)for(var n of tg(e))t.indexOf(n)<0&&DB.call(e,n)&&(r[n]=e[n]);return r};const a4=k.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,visible:l,arrowX:c,arrowY:u}=r,f=tue(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const d=Ir();return l?ne.createElement("div",eue(Qce({},f),{ref:t,style:Yce({position:n,arrowSize:o,arrowOffset:i,arrowRadius:a,arrowPosition:s,dir:d.dir,arrowX:c,arrowY:u})})):null});a4.displayName="@mantine/core/FloatingArrow";var rue=Object.defineProperty,nue=Object.defineProperties,oue=Object.getOwnPropertyDescriptors,rg=Object.getOwnPropertySymbols,MB=Object.prototype.hasOwnProperty,RB=Object.prototype.propertyIsEnumerable,LC=(e,t,r)=>t in e?rue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xc=(e,t)=>{for(var r in t||(t={}))MB.call(t,r)&&LC(e,r,t[r]);if(rg)for(var r of rg(t))RB.call(t,r)&&LC(e,r,t[r]);return e},Bh=(e,t)=>nue(e,oue(t)),iue=(e,t)=>{var r={};for(var n in e)MB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rg)for(var n of rg(e))t.indexOf(n)<0&&RB.call(e,n)&&(r[n]=e[n]);return r};const aue={};function NB(e){var t;const r=tt("PopoverDropdown",aue,e),{style:n,className:o,children:i,onKeyDownCapture:a}=r,s=iue(r,["style","className","children","onKeyDownCapture"]),l=kB(),{classes:c,cx:u}=Fce({radius:l.radius,shadow:l.shadow},{name:l.__staticSelector,classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),f=ON({opened:l.opened,shouldReturnFocus:l.returnFocus}),d=l.withRoles?{"aria-labelledby":l.getTargetId(),id:l.getDropdownId(),role:"dialog"}:{};return l.disabled?null:ne.createElement(p0,Bh(xc({},l.portalProps),{withinPortal:l.withinPortal}),ne.createElement(rc,Bh(xc({mounted:l.opened},l.transitionProps),{transition:l.transitionProps.transition||"fade",duration:(t=l.transitionProps.duration)!=null?t:150,keepMounted:l.keepMounted,exitDuration:typeof l.transitionProps.exitDuration=="number"?l.transitionProps.exitDuration:l.transitionProps.duration}),p=>{var h,m;return ne.createElement(i4,{active:l.trapFocus},ne.createElement(Je,xc(Bh(xc({},d),{tabIndex:-1,ref:l.floating,style:Bh(xc(xc({},n),p),{zIndex:l.zIndex,top:(h=l.y)!=null?h:0,left:(m=l.x)!=null?m:0,width:l.width==="target"?void 0:me(l.width)}),className:u(c.dropdown,o),onKeyDownCapture:Fee(l.onClose,{active:l.closeOnEscape,onTrigger:f,onKeyDown:a}),"data-position":l.placement}),s),i,ne.createElement(a4,{ref:l.arrowRef,arrowX:l.arrowX,arrowY:l.arrowY,visible:l.withArrow,position:l.placement,arrowSize:l.arrowSize,arrowRadius:l.arrowRadius,arrowOffset:l.arrowOffset,arrowPosition:l.arrowPosition,className:c.arrow})))}))}NB.displayName="@mantine/core/PopoverDropdown";function FB(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var UC=Object.getOwnPropertySymbols,sue=Object.prototype.hasOwnProperty,lue=Object.prototype.propertyIsEnumerable,cue=(e,t)=>{var r={};for(var n in e)sue.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&UC)for(var n of UC(e))t.indexOf(n)<0&&lue.call(e,n)&&(r[n]=e[n]);return r};const uue={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ta("popover"),__staticSelector:"Popover",width:"max-content"};function Ra(e){var t,r,n,o,i,a;const s=k.useRef(null),l=tt("Popover",uue,e),{children:c,position:u,offset:f,onPositionChange:d,positionDependencies:p,opened:h,transitionProps:m,width:_,middlewares:w,withArrow:g,arrowSize:E,arrowOffset:A,arrowRadius:N,arrowPosition:D,unstyled:y,classNames:U,styles:L,closeOnClickOutside:G,withinPortal:V,portalProps:S,closeOnEscape:C,clickOutsideEvents:v,trapFocus:b,onClose:B,onOpen:T,onChange:j,zIndex:H,radius:P,shadow:F,id:$,defaultOpened:q,__staticSelector:J,withRoles:te,disabled:ae,returnFocus:ce,variant:ie,keepMounted:ue}=l,O=cue(l,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[K,ee]=k.useState(null),[se,pe]=k.useState(null),ge=Ql($),X=Ir(),M=kce({middlewares:w,width:_,position:FB(X.dir,u),offset:typeof f=="number"?f+(g?E/2:0):f,arrowRef:s,arrowOffset:A,onPositionChange:d,positionDependencies:p,opened:h,defaultOpened:q,onChange:j,onOpen:T,onClose:B});une(()=>M.opened&&G&&M.onClose(),v,[K,se]);const z=k.useCallback(Q=>{ee(Q),M.floating.reference(Q)},[M.floating.reference]),Z=k.useCallback(Q=>{pe(Q),M.floating.floating(Q)},[M.floating.floating]);return ne.createElement(Ace,{value:{returnFocus:ce,disabled:ae,controlled:M.controlled,reference:z,floating:Z,x:M.floating.x,y:M.floating.y,arrowX:(n=(r=(t=M.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(a=(i=(o=M.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:a.y,opened:M.opened,arrowRef:s,transitionProps:m,width:_,withArrow:g,arrowSize:E,arrowOffset:A,arrowRadius:N,arrowPosition:D,placement:M.floating.placement,trapFocus:b,withinPortal:V,portalProps:S,zIndex:H,radius:P,shadow:F,closeOnEscape:C,onClose:M.onClose,onToggle:M.onToggle,getTargetId:()=>`${ge}-target`,getDropdownId:()=>`${ge}-dropdown`,withRoles:te,targetProps:O,__staticSelector:J,classNames:U,styles:L,unstyled:y,variant:ie,keepMounted:ue}},c)}Ra.Target=$B;Ra.Dropdown=NB;Ra.displayName="@mantine/core/Popover";var fue=Object.defineProperty,ng=Object.getOwnPropertySymbols,BB=Object.prototype.hasOwnProperty,jB=Object.prototype.propertyIsEnumerable,zC=(e,t,r)=>t in e?fue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,due=(e,t)=>{for(var r in t||(t={}))BB.call(t,r)&&zC(e,r,t[r]);if(ng)for(var r of ng(t))jB.call(t,r)&&zC(e,r,t[r]);return e},pue=(e,t)=>{var r={};for(var n in e)BB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ng)for(var n of ng(e))t.indexOf(n)<0&&jB.call(e,n)&&(r[n]=e[n]);return r};function hue(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:i="column",id:a,innerRef:s,__staticSelector:l,styles:c,classNames:u,unstyled:f}=t,d=pue(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:p}=mle(null,{name:l,styles:c,classNames:u,unstyled:f});return ne.createElement(Ra.Dropdown,due({p:0,onMouseDown:h=>h.preventDefault()},d),ne.createElement("div",{style:{maxHeight:me(o),display:"flex"}},ne.createElement(Je,{component:n||"div",id:`${a}-items`,"aria-labelledby":`${a}-label`,role:"listbox",onMouseDown:h=>h.preventDefault(),style:{flex:1,overflowY:n!==q_?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:s},ne.createElement("div",{className:p.itemsWrapper,style:{flexDirection:i}},r))))}function Bd({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:i,__staticSelector:a,onDirectionChange:s,switchDirectionOnFlip:l,zIndex:c,dropdownPosition:u,positionDependencies:f=[],classNames:d,styles:p,unstyled:h,readOnly:m,variant:_}){return ne.createElement(Ra,{unstyled:h,classNames:d,styles:p,width:"target",withRoles:!1,opened:e,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:f,zIndex:c,__staticSelector:a,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:m,onPositionChange:w=>l&&(s==null?void 0:s(w==="top"?"column-reverse":"column")),variant:_},i)}Bd.Target=Ra.Target;Bd.Dropdown=hue;var vue=Object.defineProperty,gue=Object.defineProperties,mue=Object.getOwnPropertyDescriptors,og=Object.getOwnPropertySymbols,LB=Object.prototype.hasOwnProperty,UB=Object.prototype.propertyIsEnumerable,HC=(e,t,r)=>t in e?vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jh=(e,t)=>{for(var r in t||(t={}))LB.call(t,r)&&HC(e,r,t[r]);if(og)for(var r of og(t))UB.call(t,r)&&HC(e,r,t[r]);return e},yue=(e,t)=>gue(e,mue(t)),bue=(e,t)=>{var r={};for(var n in e)LB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&og)for(var n of og(e))t.indexOf(n)<0&&UB.call(e,n)&&(r[n]=e[n]);return r};function zB(e,t,r){const n=tt(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:u,unstyled:f,__staticSelector:d,sx:p,errorProps:h,labelProps:m,descriptionProps:_,wrapperProps:w,id:g,size:E,style:A,inputContainer:N,inputWrapperOrder:D,withAsterisk:y,variant:U}=n,L=bue(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),G=Ql(g),{systemStyles:V,rest:S}=nf(L),C=jh({label:o,description:i,error:a,required:s,classNames:l,className:u,__staticSelector:d,sx:p,errorProps:h,labelProps:m,descriptionProps:_,unstyled:f,styles:c,id:G,size:E,style:A,inputContainer:N,inputWrapperOrder:D,withAsterisk:y,variant:U},w);return yue(jh({},S),{classNames:l,styles:c,unstyled:f,wrapperProps:jh(jh({},C),V),inputProps:{required:s,classNames:l,styles:c,unstyled:f,id:G,size:E,__staticSelector:d,error:a,variant:U}})}var wue=it((e,t,{size:r})=>({label:{display:"inline-block",fontSize:Re({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const xue=wue;var _ue=Object.defineProperty,ig=Object.getOwnPropertySymbols,HB=Object.prototype.hasOwnProperty,VB=Object.prototype.propertyIsEnumerable,VC=(e,t,r)=>t in e?_ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eue=(e,t)=>{for(var r in t||(t={}))HB.call(t,r)&&VC(e,r,t[r]);if(ig)for(var r of ig(t))VB.call(t,r)&&VC(e,r,t[r]);return e},Sue=(e,t)=>{var r={};for(var n in e)HB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ig)for(var n of ig(e))t.indexOf(n)<0&&VB.call(e,n)&&(r[n]=e[n]);return r};const Cue={labelElement:"label",size:"sm"},s4=k.forwardRef((e,t)=>{const r=tt("InputLabel",Cue,e),{labelElement:n,children:o,required:i,size:a,classNames:s,styles:l,unstyled:c,className:u,htmlFor:f,__staticSelector:d,variant:p,onMouseDown:h}=r,m=Sue(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:_,cx:w}=xue(null,{name:["InputWrapper",d],classNames:s,styles:l,unstyled:c,variant:p,size:a});return ne.createElement(Je,Eue({component:n,ref:t,className:w(_.label,u),htmlFor:n==="label"?f:void 0,onMouseDown:g=>{h==null||h(g),!g.defaultPrevented&&g.detail>1&&g.preventDefault()}},m),o,i&&ne.createElement("span",{className:_.required,"aria-hidden":!0}," *"))});s4.displayName="@mantine/core/InputLabel";var Pue=it((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const Oue=Pue;var kue=Object.defineProperty,ag=Object.getOwnPropertySymbols,WB=Object.prototype.hasOwnProperty,qB=Object.prototype.propertyIsEnumerable,WC=(e,t,r)=>t in e?kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Aue=(e,t)=>{for(var r in t||(t={}))WB.call(t,r)&&WC(e,r,t[r]);if(ag)for(var r of ag(t))qB.call(t,r)&&WC(e,r,t[r]);return e},Iue=(e,t)=>{var r={};for(var n in e)WB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ag)for(var n of ag(e))t.indexOf(n)<0&&qB.call(e,n)&&(r[n]=e[n]);return r};const $ue={size:"sm"},l4=k.forwardRef((e,t)=>{const r=tt("InputError",$ue,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=Iue(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=Oue(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ne.createElement(_t,Aue({className:p(d.error,o),ref:t},f),n)});l4.displayName="@mantine/core/InputError";var Tue=it((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${Re({size:r,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1.2,display:"block"}}));const Due=Tue;var Mue=Object.defineProperty,sg=Object.getOwnPropertySymbols,GB=Object.prototype.hasOwnProperty,KB=Object.prototype.propertyIsEnumerable,qC=(e,t,r)=>t in e?Mue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rue=(e,t)=>{for(var r in t||(t={}))GB.call(t,r)&&qC(e,r,t[r]);if(sg)for(var r of sg(t))KB.call(t,r)&&qC(e,r,t[r]);return e},Nue=(e,t)=>{var r={};for(var n in e)GB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sg)for(var n of sg(e))t.indexOf(n)<0&&KB.call(e,n)&&(r[n]=e[n]);return r};const Fue={size:"sm"},c4=k.forwardRef((e,t)=>{const r=tt("InputDescription",Fue,e),{children:n,className:o,classNames:i,styles:a,unstyled:s,size:l,__staticSelector:c,variant:u}=r,f=Nue(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:d,cx:p}=Due(null,{name:["InputWrapper",c],classNames:i,styles:a,unstyled:s,variant:u,size:l});return ne.createElement(_t,Rue({color:"dimmed",className:p(d.description,o),ref:t,unstyled:s},f),n)});c4.displayName="@mantine/core/InputDescription";const YB=k.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),Bue=YB.Provider,jue=()=>k.useContext(YB);function Lue(e,{hasDescription:t,hasError:r}){const n=e.findIndex(l=>l==="input"),o=e[n-1],i=e[n+1];return{offsetBottom:t&&i==="description"||r&&i==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var Uue=Object.defineProperty,zue=Object.defineProperties,Hue=Object.getOwnPropertyDescriptors,GC=Object.getOwnPropertySymbols,Vue=Object.prototype.hasOwnProperty,Wue=Object.prototype.propertyIsEnumerable,KC=(e,t,r)=>t in e?Uue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,que=(e,t)=>{for(var r in t||(t={}))Vue.call(t,r)&&KC(e,r,t[r]);if(GC)for(var r of GC(t))Wue.call(t,r)&&KC(e,r,t[r]);return e},Gue=(e,t)=>zue(e,Hue(t)),Kue=it(e=>({root:Gue(que({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Yue=Kue;var Xue=Object.defineProperty,Zue=Object.defineProperties,Jue=Object.getOwnPropertyDescriptors,lg=Object.getOwnPropertySymbols,XB=Object.prototype.hasOwnProperty,ZB=Object.prototype.propertyIsEnumerable,YC=(e,t,r)=>t in e?Xue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wa=(e,t)=>{for(var r in t||(t={}))XB.call(t,r)&&YC(e,r,t[r]);if(lg)for(var r of lg(t))ZB.call(t,r)&&YC(e,r,t[r]);return e},XC=(e,t)=>Zue(e,Jue(t)),Que=(e,t)=>{var r={};for(var n in e)XB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lg)for(var n of lg(e))t.indexOf(n)<0&&ZB.call(e,n)&&(r[n]=e[n]);return r};const efe={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},JB=k.forwardRef((e,t)=>{const r=tt("InputWrapper",efe,e),{className:n,label:o,children:i,required:a,id:s,error:l,description:c,labelElement:u,labelProps:f,descriptionProps:d,errorProps:p,classNames:h,styles:m,size:_,inputContainer:w,__staticSelector:g,unstyled:E,inputWrapperOrder:A,withAsterisk:N,variant:D}=r,y=Que(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:U,cx:L}=Yue(null,{classNames:h,styles:m,name:["InputWrapper",g],unstyled:E,variant:D,size:_}),G={classNames:h,styles:m,unstyled:E,size:_,variant:D,__staticSelector:g},V=typeof N=="boolean"?N:a,S=s?`${s}-error`:p==null?void 0:p.id,C=s?`${s}-description`:d==null?void 0:d.id,b=`${!!l&&typeof l!="boolean"?S:""} ${c?C:""}`,B=b.trim().length>0?b.trim():void 0,T=o&&ne.createElement(s4,Wa(Wa({key:"label",labelElement:u,id:s?`${s}-label`:void 0,htmlFor:s,required:V},G),f),o),j=c&&ne.createElement(c4,XC(Wa(Wa({key:"description"},d),G),{size:(d==null?void 0:d.size)||G.size,id:(d==null?void 0:d.id)||C}),c),H=ne.createElement(k.Fragment,{key:"input"},w(i)),P=typeof l!="boolean"&&l&&ne.createElement(l4,XC(Wa(Wa({},p),G),{size:(p==null?void 0:p.size)||G.size,key:"error",id:(p==null?void 0:p.id)||S}),l),F=A.map($=>{switch($){case"label":return T;case"input":return H;case"description":return j;case"error":return P;default:return null}});return ne.createElement(Bue,{value:Wa({describedBy:B},Lue(A,{hasDescription:!!j,hasError:!!P}))},ne.createElement(Je,Wa({className:L(U.root,n),ref:t},y),F))});JB.displayName="@mantine/core/InputWrapper";var tfe=Object.defineProperty,cg=Object.getOwnPropertySymbols,QB=Object.prototype.hasOwnProperty,ej=Object.prototype.propertyIsEnumerable,ZC=(e,t,r)=>t in e?tfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rfe=(e,t)=>{for(var r in t||(t={}))QB.call(t,r)&&ZC(e,r,t[r]);if(cg)for(var r of cg(t))ej.call(t,r)&&ZC(e,r,t[r]);return e},nfe=(e,t)=>{var r={};for(var n in e)QB.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cg)for(var n of cg(e))t.indexOf(n)<0&&ej.call(e,n)&&(r[n]=e[n]);return r};const ofe={},tj=k.forwardRef((e,t)=>{const r=tt("InputPlaceholder",ofe,e),{sx:n}=r,o=nfe(r,["sx"]);return ne.createElement(Je,rfe({component:"span",sx:[i=>i.fn.placeholderStyles(),...O_(n)],ref:t},o))});tj.displayName="@mantine/core/InputPlaceholder";var ife=Object.defineProperty,afe=Object.defineProperties,sfe=Object.getOwnPropertyDescriptors,JC=Object.getOwnPropertySymbols,lfe=Object.prototype.hasOwnProperty,cfe=Object.prototype.propertyIsEnumerable,QC=(e,t,r)=>t in e?ife(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lh=(e,t)=>{for(var r in t||(t={}))lfe.call(t,r)&&QC(e,r,t[r]);if(JC)for(var r of JC(t))cfe.call(t,r)&&QC(e,r,t[r]);return e},nw=(e,t)=>afe(e,sfe(t));const hn={xs:me(30),sm:me(36),md:me(42),lg:me(50),xl:me(60)},ufe=["default","filled","unstyled"];function ffe({theme:e,variant:t}){return ufe.includes(t)?t==="default"?{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${me(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:me(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var dfe=it((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:i,iconWidth:a,offsetBottom:s,offsetTop:l,pointer:c},{variant:u,size:f})=>{const d=e.fn.variant({variant:"filled",color:"red"}).background,p=u==="default"||u==="filled"?{minHeight:Re({size:f,sizes:hn}),paddingLeft:`calc(${Re({size:f,sizes:hn})} / 3)`,paddingRight:i?o||Re({size:f,sizes:hn}):`calc(${Re({size:f,sizes:hn})} / 3)`,borderRadius:e.fn.radius(r)}:u==="unstyled"&&i?{paddingRight:o||Re({size:f,sizes:hn})}:null;return{wrapper:{position:"relative",marginTop:l?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:s?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:nw(Lh(Lh(nw(Lh({},e.fn.fontStyles()),{height:t?u==="unstyled"?void 0:"auto":Re({size:f,sizes:hn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${Re({size:f,sizes:hn})} - ${me(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Re({size:f,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:c?"pointer":void 0}),ffe({theme:e,variant:u})),p),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:d,borderColor:d,"&::placeholder":{opacity:1,color:d}},"&[data-with-icon]":{paddingLeft:typeof a=="number"?me(a):Re({size:f,sizes:hn})},"&::placeholder":nw(Lh({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:a?me(a):Re({size:f,sizes:hn}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||Re({size:f,sizes:hn})}}});const pfe=dfe;var hfe=Object.defineProperty,vfe=Object.defineProperties,gfe=Object.getOwnPropertyDescriptors,ug=Object.getOwnPropertySymbols,rj=Object.prototype.hasOwnProperty,nj=Object.prototype.propertyIsEnumerable,eP=(e,t,r)=>t in e?hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uh=(e,t)=>{for(var r in t||(t={}))rj.call(t,r)&&eP(e,r,t[r]);if(ug)for(var r of ug(t))nj.call(t,r)&&eP(e,r,t[r]);return e},tP=(e,t)=>vfe(e,gfe(t)),mfe=(e,t)=>{var r={};for(var n in e)rj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ug)for(var n of ug(e))t.indexOf(n)<0&&nj.call(e,n)&&(r[n]=e[n]);return r};const yfe={size:"sm",variant:"default"},nc=k.forwardRef((e,t)=>{const r=tt("Input",yfe,e),{className:n,error:o,required:i,disabled:a,variant:s,icon:l,style:c,rightSectionWidth:u,iconWidth:f,rightSection:d,rightSectionProps:p,radius:h,size:m,wrapperProps:_,classNames:w,styles:g,__staticSelector:E,multiline:A,sx:N,unstyled:D,pointer:y}=r,U=mfe(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:L,offsetTop:G,describedBy:V}=jue(),{classes:S,cx:C}=pfe({radius:h,multiline:A,invalid:!!o,rightSectionWidth:u?me(u):void 0,iconWidth:f,withRightSection:!!d,offsetBottom:L,offsetTop:G,pointer:y},{classNames:w,styles:g,name:["Input",E],unstyled:D,variant:s,size:m}),{systemStyles:v,rest:b}=nf(U);return ne.createElement(Je,Uh(Uh({className:C(S.wrapper,n),sx:N,style:c},v),_),l&&ne.createElement("div",{className:S.icon},l),ne.createElement(Je,tP(Uh({component:"input"},b),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":V,disabled:a,"data-disabled":a||void 0,"data-with-icon":!!l||void 0,"data-invalid":!!o||void 0,className:S.input})),d&&ne.createElement("div",tP(Uh({},p),{className:S.rightSection}),d))});nc.displayName="@mantine/core/Input";nc.Wrapper=JB;nc.Label=s4;nc.Description=c4;nc.Error=l4;nc.Placeholder=tj;const Pi=nc,bfe={xs:me(12),sm:me(18),md:me(24),lg:me(34),xl:me(42)};var wfe=it((e,{color:t,transitionDuration:r},{size:n})=>{const o=Re({size:n,sizes:bfe}),i=t||(e.colorScheme==="dark"?e.white:e.black);return{root:{borderRadius:e.radius.sm,width:`calc(${o} + ${e.spacing.xs})`,height:`calc(${o} + ${e.spacing.xs})`,padding:`calc(${e.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:o,height:`calc(${o} / 12)`,backgroundColor:i,outline:`${me(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${r}ms`,"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${o} / 3) * -1)`},"&::after":{top:`calc(${o} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${o} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${o} / 3)) rotate(-45deg)`}}}}});const xfe=wfe;var _fe=Object.defineProperty,fg=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,ij=Object.prototype.propertyIsEnumerable,rP=(e,t,r)=>t in e?_fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Efe=(e,t)=>{for(var r in t||(t={}))oj.call(t,r)&&rP(e,r,t[r]);if(fg)for(var r of fg(t))ij.call(t,r)&&rP(e,r,t[r]);return e},Sfe=(e,t)=>{var r={};for(var n in e)oj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fg)for(var n of fg(e))t.indexOf(n)<0&&ij.call(e,n)&&(r[n]=e[n]);return r};const Cfe={size:"md",transitionDuration:300},aj=k.forwardRef((e,t)=>{const r=tt("Burger",Cfe,e),{className:n,opened:o,color:i,size:a,classNames:s,styles:l,transitionDuration:c,variant:u}=r,f=Sfe(r,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:d,cx:p}=xfe({color:i,transitionDuration:c},{classNames:s,styles:l,name:"Burger",variant:u,size:a});return ne.createElement(d0,Efe({className:p(d.root,n),ref:t},f),ne.createElement("div",{"data-opened":o||void 0,className:d.burger}))});aj.displayName="@mantine/core/Burger";var Pfe=it((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${me(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${me(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Ofe=Pfe;var kfe=Object.defineProperty,dg=Object.getOwnPropertySymbols,sj=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,nP=(e,t,r)=>t in e?kfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Afe=(e,t)=>{for(var r in t||(t={}))sj.call(t,r)&&nP(e,r,t[r]);if(dg)for(var r of dg(t))lj.call(t,r)&&nP(e,r,t[r]);return e},Ife=(e,t)=>{var r={};for(var n in e)sj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dg)for(var n of dg(e))t.indexOf(n)<0&&lj.call(e,n)&&(r[n]=e[n]);return r};const $fe={orientation:"horizontal",buttonBorderWidth:1},cj=k.forwardRef((e,t)=>{const r=tt("ButtonGroup",$fe,e),{className:n,orientation:o,buttonBorderWidth:i,unstyled:a}=r,s=Ife(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:l,cx:c}=Ofe({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:a});return ne.createElement(Je,Afe({className:c(l.root,n),ref:t},s))});cj.displayName="@mantine/core/ButtonGroup";var Tfe=Object.defineProperty,Dfe=Object.defineProperties,Mfe=Object.getOwnPropertyDescriptors,oP=Object.getOwnPropertySymbols,Rfe=Object.prototype.hasOwnProperty,Nfe=Object.prototype.propertyIsEnumerable,iP=(e,t,r)=>t in e?Tfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sa=(e,t)=>{for(var r in t||(t={}))Rfe.call(t,r)&&iP(e,r,t[r]);if(oP)for(var r of oP(t))Nfe.call(t,r)&&iP(e,r,t[r]);return e},F1=(e,t)=>Dfe(e,Mfe(t));const Ffe=["filled","outline","light","white","default","subtle","gradient"],X3={xs:{height:hn.xs,paddingLeft:me(14),paddingRight:me(14)},sm:{height:hn.sm,paddingLeft:me(18),paddingRight:me(18)},md:{height:hn.md,paddingLeft:me(22),paddingRight:me(22)},lg:{height:hn.lg,paddingLeft:me(26),paddingRight:me(26)},xl:{height:hn.xl,paddingLeft:me(32),paddingRight:me(32)},"compact-xs":{height:me(22),paddingLeft:me(7),paddingRight:me(7)},"compact-sm":{height:me(26),paddingLeft:me(8),paddingRight:me(8)},"compact-md":{height:me(30),paddingLeft:me(10),paddingRight:me(10)},"compact-lg":{height:me(34),paddingLeft:me(12),paddingRight:me(12)},"compact-xl":{height:me(40),paddingLeft:me(14),paddingRight:me(14)}};function Bfe({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return X3[`compact-${t}`];const o=X3[t];return o?F1(sa({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const jfe=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function Lfe({variant:e,theme:t,color:r,gradient:n}){if(!Ffe.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?sa({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):sa({border:`${me(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var Ufe=it((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:i,color:a,gradient:s},{variant:l,size:c})=>({root:F1(sa(F1(sa(sa(sa(sa({},Bfe({compact:n,size:c,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),jfe(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:Re({size:c,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),Lfe({variant:l,theme:e,color:a,gradient:s})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":F1(sa({content:'""'},e.fn.cover(me(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const zfe=Ufe;var Hfe=Object.defineProperty,pg=Object.getOwnPropertySymbols,uj=Object.prototype.hasOwnProperty,fj=Object.prototype.propertyIsEnumerable,aP=(e,t,r)=>t in e?Hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sP=(e,t)=>{for(var r in t||(t={}))uj.call(t,r)&&aP(e,r,t[r]);if(pg)for(var r of pg(t))fj.call(t,r)&&aP(e,r,t[r]);return e},Vfe=(e,t)=>{var r={};for(var n in e)uj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pg)for(var n of pg(e))t.indexOf(n)<0&&fj.call(e,n)&&(r[n]=e[n]);return r};const Wfe={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},u4=k.forwardRef((e,t)=>{const r=tt("Button",Wfe,e),{className:n,size:o,color:i,type:a,disabled:s,children:l,leftIcon:c,rightIcon:u,fullWidth:f,variant:d,radius:p,uppercase:h,compact:m,loading:_,loaderPosition:w,loaderProps:g,gradient:E,classNames:A,styles:N,unstyled:D}=r,y=Vfe(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:U,cx:L,theme:G}=zfe({radius:p,color:i,fullWidth:f,compact:m,gradient:E,withLeftIcon:!!c,withRightIcon:!!u},{name:"Button",unstyled:D,classNames:A,styles:N,variant:d,size:o}),V=G.fn.variant({color:i,variant:d}),S=ne.createElement(Vl,sP({color:V.color,size:`calc(${Re({size:o,sizes:X3}).height} / 2)`},g));return ne.createElement(d0,sP({className:L(U.root,n),type:a,disabled:s,"data-button":!0,"data-disabled":s||void 0,"data-loading":_||void 0,ref:t,unstyled:D},y),ne.createElement("div",{className:U.inner},(c||_&&w==="left")&&ne.createElement("span",{className:L(U.icon,U.leftIcon)},_&&w==="left"?S:c),_&&w==="center"&&ne.createElement("span",{className:U.centerLoader},S),ne.createElement("span",{className:U.label,style:{textTransform:h?"uppercase":void 0}},l),(u||_&&w==="right")&&ne.createElement("span",{className:L(U.icon,U.rightIcon)},_&&w==="right"?S:u)))});u4.displayName="@mantine/core/Button";u4.Group=cj;const sr=u4;var qfe=it((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const Gfe=qfe;var Kfe=Object.defineProperty,hg=Object.getOwnPropertySymbols,dj=Object.prototype.hasOwnProperty,pj=Object.prototype.propertyIsEnumerable,lP=(e,t,r)=>t in e?Kfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yfe=(e,t)=>{for(var r in t||(t={}))dj.call(t,r)&&lP(e,r,t[r]);if(hg)for(var r of hg(t))pj.call(t,r)&&lP(e,r,t[r]);return e},Xfe=(e,t)=>{var r={};for(var n in e)dj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hg)for(var n of hg(e))t.indexOf(n)<0&&pj.call(e,n)&&(r[n]=e[n]);return r};const Zfe={},hj=k.forwardRef((e,t)=>{const r=tt("Paper",Zfe,e),{className:n,children:o,radius:i,withBorder:a,shadow:s,unstyled:l,variant:c}=r,u=Xfe(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:f,cx:d}=Gfe({radius:i,shadow:s},{name:"Paper",unstyled:l,variant:c});return ne.createElement(Je,Yfe({className:d(f.root,n),"data-with-border":a||void 0,ref:t},u),o)});hj.displayName="@mantine/core/Paper";const f4=hj;var Jfe=it((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const Qfe=Jfe;var ede=Object.defineProperty,vg=Object.getOwnPropertySymbols,vj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,cP=(e,t,r)=>t in e?ede(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tde=(e,t)=>{for(var r in t||(t={}))vj.call(t,r)&&cP(e,r,t[r]);if(vg)for(var r of vg(t))gj.call(t,r)&&cP(e,r,t[r]);return e},rde=(e,t)=>{var r={};for(var n in e)vj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vg)for(var n of vg(e))t.indexOf(n)<0&&gj.call(e,n)&&(r[n]=e[n]);return r};const mj=k.forwardRef((e,t)=>{const r=tt("Center",{},e),{inline:n,className:o,unstyled:i,variant:a}=r,s=rde(r,["inline","className","unstyled","variant"]),{classes:l,cx:c}=Qfe({inline:n},{name:"Center",unstyled:i,variant:a});return ne.createElement(Je,tde({ref:t,className:c(l.root,o)},s))});mj.displayName="@mantine/core/Center";const m0=mj;var nde=Object.defineProperty,gg=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,uP=(e,t,r)=>t in e?nde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mg=(e,t)=>{for(var r in t||(t={}))yj.call(t,r)&&uP(e,r,t[r]);if(gg)for(var r of gg(t))bj.call(t,r)&&uP(e,r,t[r]);return e},wj=(e,t)=>{var r={};for(var n in e)yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gg)for(var n of gg(e))t.indexOf(n)<0&&bj.call(e,n)&&(r[n]=e[n]);return r};function xj(e){const t=e,{width:r,height:n,style:o}=t,i=wj(t,["width","height","style"]);return ne.createElement("svg",mg({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:mg({width:r,height:n},o)},i),ne.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function ode(e){var t=e,{indeterminate:r}=t,n=wj(t,["indeterminate"]);return r?ne.createElement("svg",mg({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),ne.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):ne.createElement(xj,mg({},n))}const _j=k.createContext(null),ide=_j.Provider,ade=()=>k.useContext(_j),sde={};function Ej(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:i}=tt("ChipGroup",sde,e),[a,s]=Hl({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),l=u=>Array.isArray(a)?a.includes(u):u===a,c=u=>{const f=u.currentTarget.value;Array.isArray(a)?s(a.includes(f)?a.filter(d=>d!==f):[...a,f]):s(f)};return ne.createElement(ide,{value:{isChipSelected:l,onChange:c,multiple:o}},i)}Ej.displayName="@mantine/core/ChipGroup";var lde=Object.defineProperty,cde=Object.defineProperties,ude=Object.getOwnPropertyDescriptors,fP=Object.getOwnPropertySymbols,fde=Object.prototype.hasOwnProperty,dde=Object.prototype.propertyIsEnumerable,dP=(e,t,r)=>t in e?lde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ho=(e,t)=>{for(var r in t||(t={}))fde.call(t,r)&&dP(e,r,t[r]);if(fP)for(var r of fP(t))dde.call(t,r)&&dP(e,r,t[r]);return e},Sd=(e,t)=>cde(e,ude(t));const pP={xs:me(24),sm:me(28),md:me(32),lg:me(36),xl:me(40)},Wf={xs:me(10),sm:me(12),md:me(14),lg:me(16),xl:me(18)},hP={xs:me(16),sm:me(20),md:me(24),lg:me(28),xl:me(32)},zh={xs:me(7.5),sm:me(10),md:me(11.5),lg:me(13),xl:me(15)};function pde(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:Ho({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Sd(Ho({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:Ho({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Ho({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:Ho({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${me(1)} solid ${n.background}`}}:{label:null,checked:null}}var hde=it((e,{radius:t,color:r},{size:n,variant:o})=>{const i=pde(e,{color:r},o);return{root:{},label:Sd(Ho(Sd(Ho({ref:zo("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${me(1)} solid transparent`,borderRadius:e.fn.radius(t),height:Re({size:n,sizes:pP}),fontSize:Re({size:n,sizes:e.fontSizes}),lineHeight:`calc(${Re({size:n,sizes:pP})} - ${me(2)})`,paddingLeft:Re({size:n,sizes:hP}),paddingRight:Re({size:n,sizes:hP}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),i.label),{"&[data-disabled]":Sd(Ho({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Re({size:n,sizes:zh}),paddingRight:Re({size:n,sizes:zh}),"&:not([data-disabled])":i.checked}}),iconWrapper:{ref:zo("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${Re({size:n,sizes:Wf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${Re({size:n,sizes:Wf})} + (${Re({size:n,sizes:e.spacing})} / 1.5))`,height:Re({size:n,sizes:Wf}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Re({size:n,sizes:Wf}),height:`calc(${Re({size:n,sizes:Wf})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Sd(Ho({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${zo("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:Re({size:n,sizes:zh}),paddingRight:Re({size:n,sizes:zh}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${zo("label")}`]:Ho({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${zo("label")}`]:Ho({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const vde=hde;var gde=Object.defineProperty,yg=Object.getOwnPropertySymbols,Sj=Object.prototype.hasOwnProperty,Cj=Object.prototype.propertyIsEnumerable,vP=(e,t,r)=>t in e?gde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hh=(e,t)=>{for(var r in t||(t={}))Sj.call(t,r)&&vP(e,r,t[r]);if(yg)for(var r of yg(t))Cj.call(t,r)&&vP(e,r,t[r]);return e},mde=(e,t)=>{var r={};for(var n in e)Sj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yg)for(var n of yg(e))t.indexOf(n)<0&&Cj.call(e,n)&&(r[n]=e[n]);return r};const yde={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},bg=k.forwardRef((e,t)=>{const r=tt("Chip",yde,e),{radius:n,type:o,size:i,variant:a,disabled:s,id:l,color:c,children:u,className:f,classNames:d,style:p,styles:h,checked:m,defaultChecked:_,onChange:w,sx:g,wrapperProps:E,value:A,unstyled:N}=r,D=mde(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),y=ade(),U=Ql(l),{systemStyles:L,rest:G}=nf(D),{classes:V,cx:S}=vde({radius:n,color:c},{classNames:d,styles:h,unstyled:N,name:"Chip",variant:a,size:i}),[C,v]=Hl({value:m,defaultValue:_,finalValue:!1,onChange:w}),b=y?{checked:y.isChipSelected(A),onChange:y.onChange,type:y.multiple?"checkbox":"radio"}:{},B=b.checked||C;return ne.createElement(Je,Hh(Hh({className:S(V.root,f),style:p,sx:g},L),E),ne.createElement("input",Hh(Hh({type:o,className:V.input,checked:B,onChange:T=>v(T.currentTarget.checked),id:U,disabled:s,ref:t,value:A},b),G)),ne.createElement("label",{htmlFor:U,"data-checked":B||void 0,"data-disabled":s||void 0,className:V.label},B&&ne.createElement("span",{className:V.iconWrapper},ne.createElement(xj,{className:V.checkIcon})),u))});bg.displayName="@mantine/core/Chip";bg.Group=Ej;var bde=it((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":Re({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const wde=bde;var xde=Object.defineProperty,wg=Object.getOwnPropertySymbols,Pj=Object.prototype.hasOwnProperty,Oj=Object.prototype.propertyIsEnumerable,gP=(e,t,r)=>t in e?xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_de=(e,t)=>{for(var r in t||(t={}))Pj.call(t,r)&&gP(e,r,t[r]);if(wg)for(var r of wg(t))Oj.call(t,r)&&gP(e,r,t[r]);return e},Ede=(e,t)=>{var r={};for(var n in e)Pj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wg)for(var n of wg(e))t.indexOf(n)<0&&Oj.call(e,n)&&(r[n]=e[n]);return r};const Sde={sizes:{xs:me(540),sm:me(720),md:me(960),lg:me(1140),xl:me(1320)}},d4=k.forwardRef((e,t)=>{const r=tt("Container",Sde,e),{className:n,fluid:o,size:i,unstyled:a,sizes:s,variant:l}=r,c=Ede(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:f}=wde({fluid:o,sizes:s},{unstyled:a,name:"Container",variant:l,size:i});return ne.createElement(Je,_de({className:f(u.root,n),ref:t},c))});d4.displayName="@mantine/core/Container";var Cde=Object.defineProperty,xg=Object.getOwnPropertySymbols,kj=Object.prototype.hasOwnProperty,Aj=Object.prototype.propertyIsEnumerable,mP=(e,t,r)=>t in e?Cde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pde=(e,t)=>{for(var r in t||(t={}))kj.call(t,r)&&mP(e,r,t[r]);if(xg)for(var r of xg(t))Aj.call(t,r)&&mP(e,r,t[r]);return e},Ode=(e,t)=>{var r={};for(var n in e)kj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xg)for(var n of xg(e))t.indexOf(n)<0&&Aj.call(e,n)&&(r[n]=e[n]);return r};const kde={timeout:1e3};function Yy(e){const t=tt("CopyButton",kde,e),{children:r,timeout:n,value:o}=t,i=Ode(t,["children","timeout","value"]),a=fne({timeout:n}),s=()=>a.copy(o);return ne.createElement(ne.Fragment,null,r(Pde({copy:s,copied:a.copied},i)))}Yy.displayName="@mantine/core/CopyButton";const[Ade,af]=a0("ModalBase component was not found in tree");var Ide=it(()=>({close:{marginLeft:"auto",marginRight:0}}));const $de=Ide;var Tde=Object.defineProperty,_g=Object.getOwnPropertySymbols,Ij=Object.prototype.hasOwnProperty,$j=Object.prototype.propertyIsEnumerable,yP=(e,t,r)=>t in e?Tde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dde=(e,t)=>{for(var r in t||(t={}))Ij.call(t,r)&&yP(e,r,t[r]);if(_g)for(var r of _g(t))$j.call(t,r)&&yP(e,r,t[r]);return e},Mde=(e,t)=>{var r={};for(var n in e)Ij.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_g)for(var n of _g(e))t.indexOf(n)<0&&$j.call(e,n)&&(r[n]=e[n]);return r};const Rde={size:"sm"},Nde=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}CloseButton`,Rde,e),{className:o}=n,i=Mde(n,["className"]),{classes:a,cx:s}=$de(null,r.stylesApi);return ne.createElement(zy,Dde({className:s(a.close,o),ref:t,onClick:r.onClose},i))});var Fde=it(()=>({overlay:{}}));const Bde=Fde;var jde=Object.defineProperty,Lde=Object.defineProperties,Ude=Object.getOwnPropertyDescriptors,bP=Object.getOwnPropertySymbols,zde=Object.prototype.hasOwnProperty,Hde=Object.prototype.propertyIsEnumerable,wP=(e,t,r)=>t in e?jde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vde=(e,t)=>{for(var r in t||(t={}))zde.call(t,r)&&wP(e,r,t[r]);if(bP)for(var r of bP(t))Hde.call(t,r)&&wP(e,r,t[r]);return e},Wde=(e,t)=>Lde(e,Ude(t)),qde=it((e,{color:t,opacity:r,blur:n,radius:o,gradient:i,fixed:a,zIndex:s})=>({root:Wde(Vde({},e.fn.cover(0)),{position:a?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,r),backgroundImage:i,backdropFilter:n?`blur(${me(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:s,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Gde=qde;var Kde=Object.defineProperty,Eg=Object.getOwnPropertySymbols,Tj=Object.prototype.hasOwnProperty,Dj=Object.prototype.propertyIsEnumerable,xP=(e,t,r)=>t in e?Kde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yde=(e,t)=>{for(var r in t||(t={}))Tj.call(t,r)&&xP(e,r,t[r]);if(Eg)for(var r of Eg(t))Dj.call(t,r)&&xP(e,r,t[r]);return e},Xde=(e,t)=>{var r={};for(var n in e)Tj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Eg)for(var n of Eg(e))t.indexOf(n)<0&&Dj.call(e,n)&&(r[n]=e[n]);return r};const Zde={opacity:.6,color:"#000",zIndex:Ta("modal"),radius:0},Mj=k.forwardRef((e,t)=>{const r=tt("Overlay",Zde,e),{variant:n,opacity:o,color:i,blur:a,gradient:s,zIndex:l,radius:c,children:u,className:f,classNames:d,styles:p,unstyled:h,center:m,fixed:_}=r,w=Xde(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:g,cx:E}=Gde({color:i,opacity:o,blur:a,radius:c,gradient:s,fixed:_,zIndex:l},{name:"Overlay",classNames:d,styles:p,unstyled:h,variant:n});return ne.createElement(Je,Yde({ref:t,className:E(g.root,f),"data-center":m||void 0},w),u)});Mj.displayName="@mantine/core/Overlay";const Jde=Mj;var Qde=Object.defineProperty,epe=Object.defineProperties,tpe=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,Rj=Object.prototype.hasOwnProperty,Nj=Object.prototype.propertyIsEnumerable,_P=(e,t,r)=>t in e?Qde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qf=(e,t)=>{for(var r in t||(t={}))Rj.call(t,r)&&_P(e,r,t[r]);if(Sg)for(var r of Sg(t))Nj.call(t,r)&&_P(e,r,t[r]);return e},rpe=(e,t)=>epe(e,tpe(t)),npe=(e,t)=>{var r={};for(var n in e)Rj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sg)for(var n of Sg(e))t.indexOf(n)<0&&Nj.call(e,n)&&(r[n]=e[n]);return r};const ope={},ipe=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}Overlay`,ope,e),{onClick:o,transitionProps:i,style:a,className:s}=n,l=npe(n,["onClick","transitionProps","style","className"]),{classes:c,cx:u}=Bde(null,r.stylesApi),f=d=>{o==null||o(d),r.closeOnClickOutside&&r.onClose()};return ne.createElement(rc,rpe(qf(qf({mounted:r.opened},r.transitionProps),i),{transition:"fade"}),d=>ne.createElement(Jde,qf({ref:t,onClick:f,fixed:!0,style:qf(qf({},a),d),className:u(c.overlay,s),zIndex:r.zIndex},l)))});var ape=it((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const spe=ape;var lpe=Object.defineProperty,Cg=Object.getOwnPropertySymbols,Fj=Object.prototype.hasOwnProperty,Bj=Object.prototype.propertyIsEnumerable,EP=(e,t,r)=>t in e?lpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gf=(e,t)=>{for(var r in t||(t={}))Fj.call(t,r)&&EP(e,r,t[r]);if(Cg)for(var r of Cg(t))Bj.call(t,r)&&EP(e,r,t[r]);return e},cpe=(e,t)=>{var r={};for(var n in e)Fj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cg)for(var n of Cg(e))t.indexOf(n)<0&&Bj.call(e,n)&&(r[n]=e[n]);return r};const upe={},fpe=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}Content`,upe,e),{className:o,transitionProps:i,style:a,onKeyDown:s}=n,l=cpe(n,["className","transitionProps","style","onKeyDown"]),{classes:c,cx:u}=spe({zIndex:r.zIndex},r.stylesApi),f=d=>{var p;((p=d.target)==null?void 0:p.getAttribute("data-mantine-stop-propagation"))!=="true"&&d.key==="Escape"&&r.closeOnEscape&&r.onClose(),s==null||s(d)};return ne.createElement(rc,Gf(Gf({mounted:r.opened,transition:"pop"},r.transitionProps),i),d=>ne.createElement("div",{className:u(c.inner)},ne.createElement(i4,{active:r.opened&&r.trapFocus},ne.createElement(f4,Gf({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:f,ref:t,className:u(c.content,o),style:Gf(Gf({},a),d),shadow:r.shadow},l),l.children))))});var dpe=it((e,{padding:t})=>{const r=Re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${me(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const ppe=dpe;var hpe=Object.defineProperty,Pg=Object.getOwnPropertySymbols,jj=Object.prototype.hasOwnProperty,Lj=Object.prototype.propertyIsEnumerable,SP=(e,t,r)=>t in e?hpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vpe=(e,t)=>{for(var r in t||(t={}))jj.call(t,r)&&SP(e,r,t[r]);if(Pg)for(var r of Pg(t))Lj.call(t,r)&&SP(e,r,t[r]);return e},gpe=(e,t)=>{var r={};for(var n in e)jj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pg)for(var n of Pg(e))t.indexOf(n)<0&&Lj.call(e,n)&&(r[n]=e[n]);return r};const mpe={},ype=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}Header`,mpe,e),{className:o}=n,i=gpe(n,["className"]),{classes:a,cx:s}=ppe({padding:r.padding},r.stylesApi);return ne.createElement(Je,vpe({ref:t,className:s(a.header,o)},i))});var bpe=it(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const wpe=bpe;var xpe=Object.defineProperty,Og=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,zj=Object.prototype.propertyIsEnumerable,CP=(e,t,r)=>t in e?xpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_pe=(e,t)=>{for(var r in t||(t={}))Uj.call(t,r)&&CP(e,r,t[r]);if(Og)for(var r of Og(t))zj.call(t,r)&&CP(e,r,t[r]);return e},Epe=(e,t)=>{var r={};for(var n in e)Uj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Og)for(var n of Og(e))t.indexOf(n)<0&&zj.call(e,n)&&(r[n]=e[n]);return r};const Spe={},Cpe=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}Title`,Spe,e),{className:o}=n,i=Epe(n,["className"]),{classes:a,cx:s}=wpe(null,r.stylesApi);return k.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),ne.createElement(Je,_pe({component:"h2",id:r.getTitleId(),className:s(a.title,o),ref:t},i))});var Ppe=it((e,{padding:t})=>({body:{padding:Re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const Ope=Ppe;var kpe=Object.defineProperty,kg=Object.getOwnPropertySymbols,Hj=Object.prototype.hasOwnProperty,Vj=Object.prototype.propertyIsEnumerable,PP=(e,t,r)=>t in e?kpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ape=(e,t)=>{for(var r in t||(t={}))Hj.call(t,r)&&PP(e,r,t[r]);if(kg)for(var r of kg(t))Vj.call(t,r)&&PP(e,r,t[r]);return e},Ipe=(e,t)=>{var r={};for(var n in e)Hj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kg)for(var n of kg(e))t.indexOf(n)<0&&Vj.call(e,n)&&(r[n]=e[n]);return r};const $pe={},Tpe=k.forwardRef((e,t)=>{const r=af(),n=tt(`${r.__staticSelector}Body`,$pe,e),{className:o}=n,i=Ipe(n,["className"]),{classes:a,cx:s}=Ope({padding:r.padding},r.stylesApi);return k.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),ne.createElement(Je,Ape({id:r.getBodyId(),className:s(a.body,o),ref:t},i))});function Dpe({children:e}){return ne.createElement(ne.Fragment,null,e)}function Mpe({opened:e,transitionDuration:t}){const[r,n]=k.useState(e),o=k.useRef(),a=f0()?0:t;return k.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}var Rpe=it(()=>({root:{}}));const Npe=Rpe;var Fpe=Object.defineProperty,Bpe=Object.defineProperties,jpe=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,Wj=Object.prototype.hasOwnProperty,qj=Object.prototype.propertyIsEnumerable,OP=(e,t,r)=>t in e?Fpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ow=(e,t)=>{for(var r in t||(t={}))Wj.call(t,r)&&OP(e,r,t[r]);if(Ag)for(var r of Ag(t))qj.call(t,r)&&OP(e,r,t[r]);return e},kP=(e,t)=>Bpe(e,jpe(t)),Lpe=(e,t)=>{var r={};for(var n in e)Wj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ag)for(var n of Ag(e))t.indexOf(n)<0&&qj.call(e,n)&&(r[n]=e[n]);return r};const p4={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ta("modal"),padding:"md",size:"md",shadow:"xl"};function cr(e){const t=tt("ModalBase",p4,e),{opened:r,onClose:n,children:o,closeOnClickOutside:i,__staticSelector:a,transitionProps:s,withinPortal:l,portalProps:c,keepMounted:u,target:f,zIndex:d,lockScroll:p,trapFocus:h,closeOnEscape:m,returnFocus:_,padding:w,shadow:g,id:E,size:A,variant:N,classNames:D,unstyled:y,styles:U,className:L}=t,G=Lpe(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:V,cx:S}=Npe(null,{name:a,classNames:D,styles:U,unstyled:y,variant:N,size:A}),C=Ql(E),[v,b]=k.useState(!1),[B,T]=k.useState(!1),j=typeof(s==null?void 0:s.duration)=="number"?s==null?void 0:s.duration:200,H=Mpe({opened:r,transitionDuration:j});return Op("keydown",P=>{!h&&P.key==="Escape"&&m&&n()}),ON({opened:r,shouldReturnFocus:h&&_}),ne.createElement(p0,kP(ow({},c),{withinPortal:l,target:f}),ne.createElement(Ade,{value:{__staticSelector:a,opened:r,onClose:n,closeOnClickOutside:i,transitionProps:kP(ow({},s),{duration:j,keepMounted:u}),zIndex:d,padding:w,id:C,getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:v,bodyMounted:B,setTitleMounted:b,setBodyMounted:T,trapFocus:h,closeOnEscape:m,shadow:g,stylesApi:{name:a,size:A,variant:N,classNames:D,styles:U,unstyled:y}}},ne.createElement(Iee,{enabled:H&&p},ne.createElement(Je,ow({className:S(V.root,L)},G),o))))}cr.CloseButton=Nde;cr.Overlay=ipe;cr.Content=fpe;cr.Header=ype;cr.Title=Cpe;cr.Body=Tpe;cr.NativeScrollArea=Dpe;const[Upe,zpe]=a0("Grid component was not found in tree");var Hpe=Object.defineProperty,AP=Object.getOwnPropertySymbols,Vpe=Object.prototype.hasOwnProperty,Wpe=Object.prototype.propertyIsEnumerable,IP=(e,t,r)=>t in e?Hpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qpe=(e,t)=>{for(var r in t||(t={}))Vpe.call(t,r)&&IP(e,r,t[r]);if(AP)for(var r of AP(t))Wpe.call(t,r)&&IP(e,r,t[r]);return e};const h4=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,Gj=(e,t,r)=>r||e==="auto"||e==="content"?"unset":h4(e,t),Kj=(e,t)=>{if(e)return e==="auto"||t?1:0},Yj=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,Xj=(e,t)=>typeof e<"u"?`calc(${Re({size:e,sizes:t.spacing})} / 2)`:void 0;function Gpe({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:i,grow:a}){return nN.reduce((s,l)=>(s[`@media (min-width: ${bn(n.breakpoints[l])})`]={order:r[l],flexBasis:h4(e[l],o),padding:Xj(i[l],n),flexShrink:0,width:e[l]==="content"?"auto":void 0,maxWidth:Gj(e[l],o,a),marginLeft:Yj(t[l],o),flexGrow:Kj(e[l],a)},s),{})}var Kpe=it((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:i,gutterXl:a,grow:s,offset:l,offsetXs:c,offsetSm:u,offsetMd:f,offsetLg:d,offsetXl:p,columns:h,span:m,xs:_,sm:w,md:g,lg:E,xl:A,order:N,orderXs:D,orderSm:y,orderMd:U,orderLg:L,orderXl:G})=>({col:qpe({boxSizing:"border-box",flexGrow:Kj(m,s),order:N,padding:Xj(t,e),marginLeft:Yj(l,h),flexBasis:h4(m,h),flexShrink:0,width:m==="content"?"auto":void 0,maxWidth:Gj(m,h,s)},Gpe({sizes:{xs:_,sm:w,md:g,lg:E,xl:A},offsets:{xs:c,sm:u,md:f,lg:d,xl:p},orders:{xs:D,sm:y,md:U,lg:L,xl:G},gutters:{xs:r,sm:n,md:o,lg:i,xl:a},theme:e,columns:h,grow:s}))}));const Ype=Kpe;var Xpe=Object.defineProperty,Ig=Object.getOwnPropertySymbols,Zj=Object.prototype.hasOwnProperty,Jj=Object.prototype.propertyIsEnumerable,$P=(e,t,r)=>t in e?Xpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zpe=(e,t)=>{for(var r in t||(t={}))Zj.call(t,r)&&$P(e,r,t[r]);if(Ig)for(var r of Ig(t))Jj.call(t,r)&&$P(e,r,t[r]);return e},Jpe=(e,t)=>{var r={};for(var n in e)Zj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ig)for(var n of Ig(e))t.indexOf(n)<0&&Jj.call(e,n)&&(r[n]=e[n]);return r};const Qpe={};function e0e(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const Qj=k.forwardRef((e,t)=>{const r=tt("GridCol",Qpe,e),{children:n,span:o,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:m,order:_,orderXs:w,orderSm:g,orderMd:E,orderLg:A,orderXl:N,className:D,unstyled:y,variant:U}=r,L=Jpe(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","unstyled","variant"]),G=zpe(),V=o||G.columns,{classes:S,cx:C}=Ype({gutter:G.gutter,gutterXs:G.gutterXs,gutterSm:G.gutterSm,gutterMd:G.gutterMd,gutterLg:G.gutterLg,gutterXl:G.gutterXl,offset:i,offsetXs:a,offsetSm:s,offsetMd:l,offsetLg:c,offsetXl:u,xs:f,sm:d,md:p,lg:h,xl:m,order:_,orderXs:w,orderSm:g,orderMd:E,orderLg:A,orderXl:N,grow:G.grow,columns:G.columns,span:V},{unstyled:y,name:"Grid",variant:U});return!e0e(V)||V>G.columns?null:ne.createElement(Je,Zpe({className:C(S.col,D),ref:t},L),n)});Qj.displayName="@mantine/core/Col";var t0e=Object.defineProperty,TP=Object.getOwnPropertySymbols,r0e=Object.prototype.hasOwnProperty,n0e=Object.prototype.propertyIsEnumerable,DP=(e,t,r)=>t in e?t0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o0e=(e,t)=>{for(var r in t||(t={}))r0e.call(t,r)&&DP(e,r,t[r]);if(TP)for(var r of TP(t))n0e.call(t,r)&&DP(e,r,t[r]);return e};function i0e(e,t){return nN.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${Re({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var a0e=it((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l})=>({root:o0e({margin:`calc(-${Re({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},i0e({xs:o,sm:i,md:a,lg:s,xl:l},e))}));const s0e=a0e;var l0e=Object.defineProperty,$g=Object.getOwnPropertySymbols,eL=Object.prototype.hasOwnProperty,tL=Object.prototype.propertyIsEnumerable,MP=(e,t,r)=>t in e?l0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c0e=(e,t)=>{for(var r in t||(t={}))eL.call(t,r)&&MP(e,r,t[r]);if($g)for(var r of $g(t))tL.call(t,r)&&MP(e,r,t[r]);return e},u0e=(e,t)=>{var r={};for(var n in e)eL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$g)for(var n of $g(e))t.indexOf(n)<0&&tL.call(e,n)&&(r[n]=e[n]);return r};const f0e={gutter:"md",justify:"flex-start",align:"stretch",columns:12},ks=k.forwardRef((e,t)=>{const r=tt("Grid",f0e,e),{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,children:c,grow:u,justify:f,align:d,columns:p,className:h,unstyled:m,variant:_}=r,w=u0e(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","unstyled","variant"]),{classes:g,cx:E}=s0e({gutter:n,justify:f,align:d,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l},{unstyled:m,name:"Grid",variant:_});return ne.createElement(Upe,{value:{gutter:n,gutterXs:o,gutterSm:i,gutterMd:a,gutterLg:s,gutterXl:l,grow:u,columns:p}},ne.createElement(Je,c0e({className:E(g.root,h),ref:t},w),c))});ks.Col=Qj;ks.displayName="@mantine/core/Grid";function d0e(e){return k.Children.toArray(e).filter(Boolean)}const p0e={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var h0e=it((e,{spacing:t,position:r,noWrap:n,grow:o,align:i,count:a})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:n?"nowrap":"wrap",justifyContent:p0e[r],gap:Re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/a}% - (${me(Re({size:t,sizes:e.spacing}))} - ${Re({size:t,sizes:e.spacing})} / ${a}))`:void 0,flexGrow:o?1:0}}}));const v0e=h0e;var g0e=Object.defineProperty,Tg=Object.getOwnPropertySymbols,rL=Object.prototype.hasOwnProperty,nL=Object.prototype.propertyIsEnumerable,RP=(e,t,r)=>t in e?g0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m0e=(e,t)=>{for(var r in t||(t={}))rL.call(t,r)&&RP(e,r,t[r]);if(Tg)for(var r of Tg(t))nL.call(t,r)&&RP(e,r,t[r]);return e},y0e=(e,t)=>{var r={};for(var n in e)rL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tg)for(var n of Tg(e))t.indexOf(n)<0&&nL.call(e,n)&&(r[n]=e[n]);return r};const b0e={position:"left",spacing:"md"},jt=k.forwardRef((e,t)=>{const r=tt("Group",b0e,e),{className:n,position:o,align:i,children:a,noWrap:s,grow:l,spacing:c,unstyled:u,variant:f}=r,d=y0e(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),p=d0e(a),{classes:h,cx:m}=v0e({align:i,grow:l,noWrap:s,spacing:c,position:o,count:p.length},{unstyled:u,name:"Group",variant:f});return ne.createElement(Je,m0e({className:m(h.root,n),ref:t},d),p)});jt.displayName="@mantine/core/Group";var w0e=it((e,{color:t})=>({root:{backgroundColor:e.fn.themeColor(t,e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"}}));const x0e=w0e;var _0e=Object.defineProperty,Dg=Object.getOwnPropertySymbols,oL=Object.prototype.hasOwnProperty,iL=Object.prototype.propertyIsEnumerable,NP=(e,t,r)=>t in e?_0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,E0e=(e,t)=>{for(var r in t||(t={}))oL.call(t,r)&&NP(e,r,t[r]);if(Dg)for(var r of Dg(t))iL.call(t,r)&&NP(e,r,t[r]);return e},S0e=(e,t)=>{var r={};for(var n in e)oL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Dg)for(var n of Dg(e))t.indexOf(n)<0&&iL.call(e,n)&&(r[n]=e[n]);return r};const C0e={color:"yellow"},v4=k.forwardRef((e,t)=>{const r=tt("Mark",C0e,e),{color:n,className:o,unstyled:i,variant:a}=r,s=S0e(r,["color","className","unstyled","variant"]),{classes:l,cx:c}=x0e({color:n},{unstyled:i,name:"Mark",variant:a});return ne.createElement(Je,E0e({component:"mark",ref:t,className:c(l.root,o)},s))});v4.displayName="@mantine/core/Mark";function P0e({open:e,close:t,openDelay:r,closeDelay:n}){const o=k.useRef(-1),i=k.useRef(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0?t():i.current=window.setTimeout(t,n)};return k.useEffect(()=>a,[]),{openDropdown:s,closeDropdown:l}}var O0e=Object.defineProperty,Mg=Object.getOwnPropertySymbols,aL=Object.prototype.hasOwnProperty,sL=Object.prototype.propertyIsEnumerable,FP=(e,t,r)=>t in e?O0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BP=(e,t)=>{for(var r in t||(t={}))aL.call(t,r)&&FP(e,r,t[r]);if(Mg)for(var r of Mg(t))sL.call(t,r)&&FP(e,r,t[r]);return e},k0e=(e,t)=>{var r={};for(var n in e)aL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mg)for(var n of Mg(e))t.indexOf(n)<0&&sL.call(e,n)&&(r[n]=e[n]);return r};function A0e(e){const t=e,{width:r,height:n,style:o}=t,i=k0e(t,["width","height","style"]);return ne.createElement("svg",BP({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:BP({width:r,height:n},o)},i),ne.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var I0e=Object.defineProperty,$0e=Object.defineProperties,T0e=Object.getOwnPropertyDescriptors,jP=Object.getOwnPropertySymbols,D0e=Object.prototype.hasOwnProperty,M0e=Object.prototype.propertyIsEnumerable,LP=(e,t,r)=>t in e?I0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UP=(e,t)=>{for(var r in t||(t={}))D0e.call(t,r)&&LP(e,r,t[r]);if(jP)for(var r of jP(t))M0e.call(t,r)&&LP(e,r,t[r]);return e},zP=(e,t)=>$0e(e,T0e(t)),R0e=it((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:zP(UP({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(t)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:zP(UP({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(t)})}));const N0e=R0e;var F0e=Object.defineProperty,B0e=Object.defineProperties,j0e=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,lL=Object.prototype.hasOwnProperty,cL=Object.prototype.propertyIsEnumerable,HP=(e,t,r)=>t in e?F0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kf=(e,t)=>{for(var r in t||(t={}))lL.call(t,r)&&HP(e,r,t[r]);if(Rg)for(var r of Rg(t))cL.call(t,r)&&HP(e,r,t[r]);return e},L0e=(e,t)=>B0e(e,j0e(t)),U0e=(e,t)=>{var r={};for(var n in e)lL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rg)for(var n of Rg(e))t.indexOf(n)<0&&cL.call(e,n)&&(r[n]=e[n]);return r};const z0e={fit:"cover",width:"100%",height:"auto",radius:0},uL=k.forwardRef((e,t)=>{const r=tt("Image",z0e,e),{className:n,alt:o,src:i,fit:a,width:s,height:l,radius:c,imageProps:u,withPlaceholder:f,placeholder:d,imageRef:p,classNames:h,styles:m,caption:_,unstyled:w,style:g,variant:E}=r,A=U0e(r,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:N,cx:D}=N0e({radius:c},{classNames:h,styles:m,unstyled:w,name:"Image",variant:E}),[y,U]=k.useState(!i),L=f&&y;return Yn(()=>{U(!i)},[i]),ne.createElement(Je,Kf({className:D(N.root,n),style:Kf({width:me(s)},g),ref:t},A),ne.createElement("figure",{className:N.figure},ne.createElement("div",{className:N.imageWrapper},ne.createElement("img",L0e(Kf({src:i,alt:o,ref:p},u),{className:D(N.image,u==null?void 0:u.className),onError:G=>{U(!0),typeof(u==null?void 0:u.onError)=="function"&&u.onError(G)},style:Kf(Kf({objectFit:a,width:me(s),height:me(l)},L&&{overflow:"hidden"}),u==null?void 0:u.style)})),L&&ne.createElement("div",{className:N.placeholder,title:o},d||ne.createElement("div",null,ne.createElement(A0e,{width:me(40),height:me(40)})))),!!_&&ne.createElement(_t,{component:"figcaption",size:"sm",align:"center",className:N.caption},_)))});uL.displayName="@mantine/core/Image";function g4(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i=0)&&(r[o]=e[o]);return r}var H0e=k.useLayoutEffect,V0e=function(t){var r=k.useRef(t);return H0e(function(){r.current=t}),r},VP=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},W0e=function(t,r){var n=k.useRef();return k.useCallback(function(o){t.current=o,n.current&&VP(n.current,null),n.current=r,r&&VP(r,o)},[r])},WP={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},qP=function(t){Object.keys(WP).forEach(function(r){t.style.setProperty(r,WP[r],"important")})},jn=null,q0e=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function G0e(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),jn||(jn=document.createElement("textarea"),jn.setAttribute("tabindex","-1"),jn.setAttribute("aria-hidden","true"),qP(jn)),jn.parentNode===null&&document.body.appendChild(jn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(d){var p=d;jn.style[p]=a[p]}),qP(jn),jn.value=t;var l=q0e(jn,e);jn.value="x";var c=jn.scrollHeight-o,u=c*r;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*n;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var GP=function(){},K0e=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Y0e=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],X0e=!!document.documentElement.currentStyle,Z0e=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=K0e(Y0e,r),o=n.boxSizing;if(o==="")return null;X0e&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},J0e=function(t){var r=V0e(t);k.useLayoutEffect(function(){var n=function(i){r.current(i)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},Q0e=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?GP:a,l=t.onHeightChange,c=l===void 0?GP:l,u=g4(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),f=u.value!==void 0,d=k.useRef(null),p=W0e(d,r),h=k.useRef(0),m=k.useRef(),_=function(){var E=d.current,A=n&&m.current?m.current:Z0e(E);if(A){m.current=A;var N=G0e(A,E.value||E.placeholder||"x",i,o),D=N[0],y=N[1];h.current!==D&&(h.current=D,E.style.setProperty("height",D+"px","important"),c(D,{rowHeight:y}))}},w=function(E){f||_(),s(E)};return k.useLayoutEffect(_),J0e(_),k.createElement("textarea",Yt({},u,{onChange:w,ref:p}))},ehe=k.forwardRef(Q0e);const the=ehe;var rhe=it(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const nhe=rhe;var ohe=Object.defineProperty,ihe=Object.defineProperties,ahe=Object.getOwnPropertyDescriptors,Ng=Object.getOwnPropertySymbols,fL=Object.prototype.hasOwnProperty,dL=Object.prototype.propertyIsEnumerable,KP=(e,t,r)=>t in e?ohe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_c=(e,t)=>{for(var r in t||(t={}))fL.call(t,r)&&KP(e,r,t[r]);if(Ng)for(var r of Ng(t))dL.call(t,r)&&KP(e,r,t[r]);return e},iw=(e,t)=>ihe(e,ahe(t)),she=(e,t)=>{var r={};for(var n in e)fL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ng)for(var n of Ng(e))t.indexOf(n)<0&&dL.call(e,n)&&(r[n]=e[n]);return r};const lhe={autosize:!1,size:"sm",__staticSelector:"Textarea"},m4=k.forwardRef((e,t)=>{const r=tt("Textarea",lhe,e),{autosize:n,maxRows:o,minRows:i,label:a,error:s,description:l,id:c,className:u,required:f,style:d,wrapperProps:p,classNames:h,styles:m,size:_,__staticSelector:w,sx:g,errorProps:E,descriptionProps:A,labelProps:N,inputWrapperOrder:D,inputContainer:y,unstyled:U,withAsterisk:L,variant:G}=r,V=she(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),S=Ql(c),{classes:C,cx:v}=nhe(),{systemStyles:b,rest:B}=nf(V),T=_c({required:f,ref:t,error:s,id:S,classNames:iw(_c({},h),{input:v(C.input,h==null?void 0:h.input)}),styles:m,__staticSelector:w,size:_,multiline:!0,unstyled:U,variant:G},B);return ne.createElement(Pi.Wrapper,_c(_c({label:a,error:s,id:S,description:l,required:f,style:d,className:u,classNames:h,styles:m,size:_,__staticSelector:w,sx:g,errorProps:E,labelProps:N,descriptionProps:A,inputContainer:y,inputWrapperOrder:D,unstyled:U,withAsterisk:L,variant:G},b),p),n?ne.createElement(Pi,iw(_c({},T),{component:the,maxRows:o,minRows:i})):ne.createElement(Pi,iw(_c({},T),{component:"textarea",rows:i})))});m4.displayName="@mantine/core/Textarea";const pL={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[che,y0]=a0(pL.context);var uhe=it(e=>({divider:{marginTop:me(4),marginBottom:me(4),borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const fhe=uhe;var dhe=Object.defineProperty,Fg=Object.getOwnPropertySymbols,hL=Object.prototype.hasOwnProperty,vL=Object.prototype.propertyIsEnumerable,YP=(e,t,r)=>t in e?dhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,phe=(e,t)=>{for(var r in t||(t={}))hL.call(t,r)&&YP(e,r,t[r]);if(Fg)for(var r of Fg(t))vL.call(t,r)&&YP(e,r,t[r]);return e},hhe=(e,t)=>{var r={};for(var n in e)hL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fg)for(var n of Fg(e))t.indexOf(n)<0&&vL.call(e,n)&&(r[n]=e[n]);return r};const vhe={},gL=k.forwardRef((e,t)=>{const r=tt("MenuDivider",vhe,e),{children:n,className:o}=r,i=hhe(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=y0(),{classes:u,cx:f}=fhe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ne.createElement(Je,phe({className:f(u.divider,o),ref:t},i))});gL.displayName="@mantine/core/MenuDivider";var ghe=Object.defineProperty,Bg=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,yL=Object.prototype.propertyIsEnumerable,XP=(e,t,r)=>t in e?ghe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mhe=(e,t)=>{for(var r in t||(t={}))mL.call(t,r)&&XP(e,r,t[r]);if(Bg)for(var r of Bg(t))yL.call(t,r)&&XP(e,r,t[r]);return e},yhe=(e,t)=>{var r={};for(var n in e)mL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bg)for(var n of Bg(e))t.indexOf(n)<0&&yL.call(e,n)&&(r[n]=e[n]);return r};const bhe={};function bL(e){const t=tt("MenuDropdown",bhe,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,i=yhe(t,["children","onMouseEnter","onMouseLeave"]),a=k.useRef(),s=y0(),l=f=>{var d;(f.key==="ArrowUp"||f.key==="ArrowDown")&&(f.preventDefault(),(d=a.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||d.focus())},c=da(n,()=>s.trigger==="hover"&&s.openDropdown()),u=da(o,()=>s.trigger==="hover"&&s.closeDropdown());return ne.createElement(Ra.Dropdown,mhe({onMouseEnter:c,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},i),ne.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:l,ref:a,style:{outline:0}},r))}bL.displayName="@mantine/core/MenuDropdown";var whe=Object.defineProperty,xhe=Object.defineProperties,_he=Object.getOwnPropertyDescriptors,ZP=Object.getOwnPropertySymbols,Ehe=Object.prototype.hasOwnProperty,She=Object.prototype.propertyIsEnumerable,JP=(e,t,r)=>t in e?whe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Che=(e,t)=>{for(var r in t||(t={}))Ehe.call(t,r)&&JP(e,r,t[r]);if(ZP)for(var r of ZP(t))She.call(t,r)&&JP(e,r,t[r]);return e},Phe=(e,t)=>xhe(e,_he(t)),Ohe=it((e,{color:t,radius:r})=>({item:Phe(Che({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const khe=Ohe;var Ahe=Object.defineProperty,Ihe=Object.defineProperties,$he=Object.getOwnPropertyDescriptors,jg=Object.getOwnPropertySymbols,wL=Object.prototype.hasOwnProperty,xL=Object.prototype.propertyIsEnumerable,QP=(e,t,r)=>t in e?Ahe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,The=(e,t)=>{for(var r in t||(t={}))wL.call(t,r)&&QP(e,r,t[r]);if(jg)for(var r of jg(t))xL.call(t,r)&&QP(e,r,t[r]);return e},Dhe=(e,t)=>Ihe(e,$he(t)),Mhe=(e,t)=>{var r={};for(var n in e)wL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jg)for(var n of jg(e))t.indexOf(n)<0&&xL.call(e,n)&&(r[n]=e[n]);return r};const Rhe={},_L=k.forwardRef((e,t)=>{const r=tt("MenuItem",Rhe,e),{children:n,className:o,color:i,closeMenuOnClick:a,icon:s,rightSection:l}=r,c=Mhe(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=y0(),{classes:f,cx:d,theme:p}=khe({radius:u.radius,color:i},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),h=k.useRef(),m=u.getItemIndex(h.current),_=c,w=da(_.onMouseLeave,()=>u.setHovered(-1)),g=da(_.onMouseEnter,()=>u.setHovered(u.getItemIndex(h.current))),E=da(_.onClick,()=>{typeof a=="boolean"?a&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),A=da(_.onFocus,()=>u.setHovered(u.getItemIndex(h.current)));return ne.createElement(Je,Dhe(The({component:"button",type:"button"},c),{tabIndex:-1,onFocus:A,className:d(f.item,o),ref:Xs(h,t),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===m?!0:void 0,onMouseEnter:g,onMouseLeave:w,onClick:E,onKeyDown:Mee({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:p.dir,orientation:"vertical",onKeyDown:_.onKeydown})}),s&&ne.createElement("div",{className:f.itemIcon},s),n&&ne.createElement("div",{className:f.itemLabel},n),l&&ne.createElement("div",{className:f.itemRightSection},l))});_L.displayName="@mantine/core/MenuItem";const Nhe=_L;var Fhe=it(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Bhe=Fhe;var jhe=Object.defineProperty,Lg=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,SL=Object.prototype.propertyIsEnumerable,eO=(e,t,r)=>t in e?jhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Lhe=(e,t)=>{for(var r in t||(t={}))EL.call(t,r)&&eO(e,r,t[r]);if(Lg)for(var r of Lg(t))SL.call(t,r)&&eO(e,r,t[r]);return e},Uhe=(e,t)=>{var r={};for(var n in e)EL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lg)for(var n of Lg(e))t.indexOf(n)<0&&SL.call(e,n)&&(r[n]=e[n]);return r};const zhe={},CL=k.forwardRef((e,t)=>{const r=tt("MenuLabel",zhe,e),{children:n,className:o}=r,i=Uhe(r,["children","className"]),{classNames:a,styles:s,unstyled:l,variant:c}=y0(),{classes:u,cx:f}=Bhe(null,{name:"Menu",classNames:a,styles:s,unstyled:l,variant:c});return ne.createElement(_t,Lhe({className:f(u.label,o),ref:t},i),n)});CL.displayName="@mantine/core/MenuLabel";var Hhe=Object.defineProperty,Ug=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,OL=Object.prototype.propertyIsEnumerable,tO=(e,t,r)=>t in e?Hhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vhe=(e,t)=>{for(var r in t||(t={}))PL.call(t,r)&&tO(e,r,t[r]);if(Ug)for(var r of Ug(t))OL.call(t,r)&&tO(e,r,t[r]);return e},Whe=(e,t)=>{var r={};for(var n in e)PL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ug)for(var n of Ug(e))t.indexOf(n)<0&&OL.call(e,n)&&(r[n]=e[n]);return r};const qhe={refProp:"ref"},kL=k.forwardRef((e,t)=>{const r=tt("MenuTarget",qhe,e),{children:n,refProp:o}=r,i=Whe(r,["children","refProp"]);if(!s0(n))throw new Error(pL.children);const a=y0(),s=da(n.props.onClick,()=>a.trigger==="click"&&a.toggleDropdown()),l=da(n.props.onMouseEnter,()=>a.trigger==="hover"&&a.openDropdown()),c=da(n.props.onMouseLeave,()=>a.trigger==="hover"&&a.closeDropdown());return ne.createElement(Ra.Target,Vhe({refProp:o,popupType:"menu",ref:t},i),k.cloneElement(n,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":a.opened?!0:void 0}))});kL.displayName="@mantine/core/MenuTarget";var Ghe=it({dropdown:{padding:me(4)}});const Khe=Ghe;var Yhe=Object.defineProperty,Xhe=Object.defineProperties,Zhe=Object.getOwnPropertyDescriptors,zg=Object.getOwnPropertySymbols,AL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,rO=(e,t,r)=>t in e?Yhe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nO=(e,t)=>{for(var r in t||(t={}))AL.call(t,r)&&rO(e,r,t[r]);if(zg)for(var r of zg(t))IL.call(t,r)&&rO(e,r,t[r]);return e},oO=(e,t)=>Xhe(e,Zhe(t)),Jhe=(e,t)=>{var r={};for(var n in e)AL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zg)for(var n of zg(e))t.indexOf(n)<0&&IL.call(e,n)&&(r[n]=e[n]);return r};const Qhe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function go(e){const t=tt("Menu",Qhe,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,onChange:s,closeOnItemClick:l,loop:c,closeOnEscape:u,trigger:f,openDelay:d,closeDelay:p,classNames:h,styles:m,unstyled:_,radius:w,variant:g}=t,E=Jhe(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:A,cx:N}=Khe(),[D,{setHovered:y,resetHovered:U}]=Bee(),[L,G]=Hl({value:i,defaultValue:a,finalValue:!1,onChange:s}),V=()=>{G(!1),L&&(o==null||o())},S=()=>{G(!0),!L&&(n==null||n())},C=()=>L?V():S(),{openDropdown:v,closeDropdown:b}=P0e({open:S,close:V,closeDelay:p,openDelay:d}),B=T=>Ree("[data-menu-item]","[data-menu-dropdown]",T);return Yn(()=>{U()},[L]),ne.createElement(che,{value:{opened:L,toggleDropdown:C,getItemIndex:B,hovered:D,setHovered:y,closeOnItemClick:l,closeDropdown:f==="click"?V:b,openDropdown:f==="click"?S:v,closeDropdownImmediately:V,loop:c,trigger:f,radius:w,classNames:h,styles:m,unstyled:_,variant:g}},ne.createElement(Ra,oO(nO({},E),{radius:w,opened:L,onChange:C,defaultOpened:a,trapFocus:f==="click",closeOnEscape:u&&f==="click",__staticSelector:"Menu",classNames:oO(nO({},h),{dropdown:N(A.dropdown,h==null?void 0:h.dropdown)}),styles:m,unstyled:_,variant:g}),r))}go.displayName="@mantine/core/Menu";go.Item=Nhe;go.Label=CL;go.Dropdown=bL;go.Target=kL;go.Divider=gL;const[e1e,t1e]=a0("Modal component was not found in tree"),r1e={xs:me(320),sm:me(380),md:me(440),lg:me(620),xl:me(780)};var n1e=it((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${Re({size:i,sizes:r1e})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${me(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const o1e=n1e;var i1e=Object.defineProperty,a1e=Object.defineProperties,s1e=Object.getOwnPropertyDescriptors,Hg=Object.getOwnPropertySymbols,$L=Object.prototype.hasOwnProperty,TL=Object.prototype.propertyIsEnumerable,iO=(e,t,r)=>t in e?i1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z3=(e,t)=>{for(var r in t||(t={}))$L.call(t,r)&&iO(e,r,t[r]);if(Hg)for(var r of Hg(t))TL.call(t,r)&&iO(e,r,t[r]);return e},DL=(e,t)=>a1e(e,s1e(t)),l1e=(e,t)=>{var r={};for(var n in e)$L.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hg)for(var n of Hg(e))t.indexOf(n)<0&&TL.call(e,n)&&(r[n]=e[n]);return r};const c1e=DL(Z3({},p4),{yOffset:"5dvh",xOffset:"5vw"});function ML(e){const t=tt("ModalRoot",c1e,e),{classNames:r,variant:n,size:o,yOffset:i,xOffset:a,scrollAreaComponent:s,radius:l,centered:c,fullScreen:u}=t,f=l1e(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:d,cx:p}=o1e({yOffset:i,xOffset:a,centered:c,fullScreen:u},{name:"Modal",variant:n,size:o});return ne.createElement(e1e,{value:{yOffset:i,scrollAreaComponent:s,radius:l}},ne.createElement(cr,Z3({__staticSelector:"Modal",size:o,variant:n,classNames:DL(Z3({},r),{content:p(d.content,r==null?void 0:r.content),inner:p(d.inner,r==null?void 0:r.inner)})},f)))}var u1e=Object.defineProperty,Vg=Object.getOwnPropertySymbols,RL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,aO=(e,t,r)=>t in e?u1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f1e=(e,t)=>{for(var r in t||(t={}))RL.call(t,r)&&aO(e,r,t[r]);if(Vg)for(var r of Vg(t))NL.call(t,r)&&aO(e,r,t[r]);return e},d1e=(e,t)=>{var r={};for(var n in e)RL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vg)for(var n of Vg(e))t.indexOf(n)<0&&NL.call(e,n)&&(r[n]=e[n]);return r};const p1e={shadow:"xl"},FL=k.forwardRef((e,t)=>{const r=tt("ModalContent",p1e,e),{children:n,scrollAreaComponent:o}=r,i=d1e(r,["children","scrollAreaComponent"]),a=t1e(),s=o||a.scrollAreaComponent||cr.NativeScrollArea;return ne.createElement(cr.Content,f1e({ref:t,radius:a.radius},i),ne.createElement(s,{style:{maxHeight:`calc(100dvh - (${me(a.yOffset)} * 2))`}},n))});var h1e=Object.defineProperty,v1e=Object.defineProperties,g1e=Object.getOwnPropertyDescriptors,Wg=Object.getOwnPropertySymbols,BL=Object.prototype.hasOwnProperty,jL=Object.prototype.propertyIsEnumerable,sO=(e,t,r)=>t in e?h1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B1=(e,t)=>{for(var r in t||(t={}))BL.call(t,r)&&sO(e,r,t[r]);if(Wg)for(var r of Wg(t))jL.call(t,r)&&sO(e,r,t[r]);return e},m1e=(e,t)=>v1e(e,g1e(t)),y1e=(e,t)=>{var r={};for(var n in e)BL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wg)for(var n of Wg(e))t.indexOf(n)<0&&jL.call(e,n)&&(r[n]=e[n]);return r};const b1e=m1e(B1({},p4),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Na(e){const t=tt("Modal",b1e,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s}=t,l=y1e(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!r||i;return ne.createElement(ML,B1({},l),n&&ne.createElement(cr.Overlay,B1({},o)),ne.createElement(FL,null,c&&ne.createElement(cr.Header,null,r&&ne.createElement(cr.Title,null,r),i&&ne.createElement(cr.CloseButton,B1({},a))),ne.createElement(cr.Body,null,s)))}Na.Root=ML;Na.CloseButton=cr.CloseButton;Na.Overlay=cr.Overlay;Na.Content=FL;Na.Header=cr.Header;Na.Title=cr.Title;Na.Body=cr.Body;Na.NativeScrollArea=cr.NativeScrollArea;var w1e=Object.defineProperty,qg=Object.getOwnPropertySymbols,LL=Object.prototype.hasOwnProperty,UL=Object.prototype.propertyIsEnumerable,lO=(e,t,r)=>t in e?w1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cO=(e,t)=>{for(var r in t||(t={}))LL.call(t,r)&&lO(e,r,t[r]);if(qg)for(var r of qg(t))UL.call(t,r)&&lO(e,r,t[r]);return e},x1e=(e,t)=>{var r={};for(var n in e)LL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qg)for(var n of qg(e))t.indexOf(n)<0&&UL.call(e,n)&&(r[n]=e[n]);return r};const _1e={xs:me(14),sm:me(18),md:me(20),lg:me(24),xl:me(28)};function E1e(e){var t=e,{size:r,error:n,style:o}=t,i=x1e(t,["size","error","style"]);const a=Ir(),s=Re({size:r,sizes:_1e});return ne.createElement("svg",cO({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:cO({color:n?a.colors.red[6]:a.colors.gray[6],width:s,height:s},o),"data-chevron":!0},i),ne.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var S1e=Object.defineProperty,C1e=Object.defineProperties,P1e=Object.getOwnPropertyDescriptors,uO=Object.getOwnPropertySymbols,O1e=Object.prototype.hasOwnProperty,k1e=Object.prototype.propertyIsEnumerable,fO=(e,t,r)=>t in e?S1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A1e=(e,t)=>{for(var r in t||(t={}))O1e.call(t,r)&&fO(e,r,t[r]);if(uO)for(var r of uO(t))k1e.call(t,r)&&fO(e,r,t[r]);return e},I1e=(e,t)=>C1e(e,P1e(t));function zL({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?ne.createElement(zy,I1e(A1e({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:i=>i.preventDefault()})):ne.createElement(E1e,{error:o,size:n})}zL.displayName="@mantine/core/SelectRightSection";var $1e=Object.defineProperty,T1e=Object.defineProperties,D1e=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,HL=Object.prototype.hasOwnProperty,VL=Object.prototype.propertyIsEnumerable,dO=(e,t,r)=>t in e?$1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aw=(e,t)=>{for(var r in t||(t={}))HL.call(t,r)&&dO(e,r,t[r]);if(Gg)for(var r of Gg(t))VL.call(t,r)&&dO(e,r,t[r]);return e},pO=(e,t)=>T1e(e,D1e(t)),M1e=(e,t)=>{var r={};for(var n in e)HL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gg)for(var n of Gg(e))t.indexOf(n)<0&&VL.call(e,n)&&(r[n]=e[n]);return r};function R1e(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:i}=t,a=M1e(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const s=typeof r=="function"?r(i):r;return{rightSection:!a.readOnly&&!(a.disabled&&a.shouldClear)&&ne.createElement(zL,aw({},a)),styles:pO(aw({},s),{rightSection:pO(aw({},s==null?void 0:s.rightSection),{pointerEvents:a.shouldClear?void 0:"none"})})}}var N1e=it((e,{color:t,radius:r,withTitle:n})=>{const o=e.fn.radius(r),i=e.fn.variant({variant:"filled",color:t});return{closeButton:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:e.spacing.md,width:me(28),height:me(28),borderRadius:me(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:i.background,color:e.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:me(22),paddingRight:e.spacing.xs,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:o,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:me(6),top:o,bottom:o,left:me(4),borderRadius:o,backgroundColor:i.background},"&[data-with-icon]":{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:e.spacing.xs},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:me(2),overflow:"hidden",textOverflow:"ellipsis",color:e.colorScheme==="dark"?e.white:e.colors.gray[9]},description:{color:n?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const F1e=N1e;var B1e=Object.defineProperty,j1e=Object.defineProperties,L1e=Object.getOwnPropertyDescriptors,Kg=Object.getOwnPropertySymbols,WL=Object.prototype.hasOwnProperty,qL=Object.prototype.propertyIsEnumerable,hO=(e,t,r)=>t in e?B1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vO=(e,t)=>{for(var r in t||(t={}))WL.call(t,r)&&hO(e,r,t[r]);if(Kg)for(var r of Kg(t))qL.call(t,r)&&hO(e,r,t[r]);return e},U1e=(e,t)=>j1e(e,L1e(t)),z1e=(e,t)=>{var r={};for(var n in e)WL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kg)for(var n of Kg(e))t.indexOf(n)<0&&qL.call(e,n)&&(r[n]=e[n]);return r};const H1e={withCloseButton:!0},GL=k.forwardRef((e,t)=>{const r=tt("Notification",H1e,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:l,title:c,icon:u,children:f,onClose:d,closeButtonProps:p,classNames:h,styles:m,unstyled:_,variant:w}=r,g=z1e(r,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:E,cx:A}=F1e({color:o,radius:i,withTitle:!!c},{name:"Notification",classNames:h,styles:m,unstyled:_,variant:w});return ne.createElement(Je,vO({className:A(E.root,n),"data-with-icon":!!u||a||void 0,"data-with-border":l||void 0,role:"alert",ref:t},g),u&&!a&&ne.createElement("div",{className:E.icon},u),a&&ne.createElement(Vl,{size:28,color:o,className:E.loader}),ne.createElement("div",{className:E.body},c&&ne.createElement(_t,{className:E.title,size:"sm",weight:500},c),ne.createElement(_t,{color:"dimmed",className:E.description,size:"sm"},f)),s&&ne.createElement(zy,U1e(vO({iconSize:16,color:"gray"},p),{onClick:d,className:E.closeButton})))});GL.displayName="@mantine/core/Notification";const V1e=(e,t,r)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?r==="ios"?"text":"decimal":"numeric";function gO({direction:e,size:t}){return ne.createElement("svg",{style:{width:me(t),height:me(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ne.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const KL={xs:me(20),sm:me(24),md:me(30),lg:me(34),xl:me(36)};var W1e=it((e,{radius:t},{size:r})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${me(2)})`,margin:me(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Re({size:r,sizes:KL}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:me(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const q1e=W1e;var G1e=Object.defineProperty,K1e=Object.defineProperties,Y1e=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,XL=Object.prototype.propertyIsEnumerable,mO=(e,t,r)=>t in e?G1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sw=(e,t)=>{for(var r in t||(t={}))YL.call(t,r)&&mO(e,r,t[r]);if(Yg)for(var r of Yg(t))XL.call(t,r)&&mO(e,r,t[r]);return e},X1e=(e,t)=>K1e(e,Y1e(t)),Z1e=(e,t)=>{var r={};for(var n in e)YL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yg)for(var n of Yg(e))t.indexOf(n)<0&&XL.call(e,n)&&(r[n]=e[n]);return r};const J1e={type:"text",size:"sm",__staticSelector:"TextInput"},Oi=k.forwardRef((e,t)=>{const r=zB("TextInput",J1e,e),{inputProps:n,wrapperProps:o}=r,i=Z1e(r,["inputProps","wrapperProps"]);return ne.createElement(Pi.Wrapper,sw({},o),ne.createElement(Pi,X1e(sw(sw({},n),i),{ref:t})))});Oi.displayName="@mantine/core/TextInput";var Q1e=Object.defineProperty,eve=Object.defineProperties,tve=Object.getOwnPropertyDescriptors,Xg=Object.getOwnPropertySymbols,ZL=Object.prototype.hasOwnProperty,JL=Object.prototype.propertyIsEnumerable,yO=(e,t,r)=>t in e?Q1e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rve=(e,t)=>{for(var r in t||(t={}))ZL.call(t,r)&&yO(e,r,t[r]);if(Xg)for(var r of Xg(t))JL.call(t,r)&&yO(e,r,t[r]);return e},nve=(e,t)=>eve(e,tve(t)),ove=(e,t)=>{var r={};for(var n in e)ZL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xg)for(var n of Xg(e))t.indexOf(n)<0&&JL.call(e,n)&&(r[n]=e[n]);return r};const ive=e=>e||"",ave=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const r=parseFloat(t);return Number.isNaN(r)?"":e},bO={xs:me(10),sm:me(14),md:me(16),lg:me(18),xl:me(20)},sve={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:ive,parser:ave,type:"text"},kp=k.forwardRef((e,t)=>{const r=tt("NumberInput",sve,e),{readOnly:n,disabled:o,value:i,onChange:a,decimalSeparator:s,thousandsSeparator:l,min:c,max:u,startValue:f,step:d,stepHoldInterval:p,stepHoldDelay:h,onFocus:m,onBlur:_,onKeyDown:w,onKeyUp:g,hideControls:E,radius:A,variant:N,precision:D,removeTrailingZeros:y,defaultValue:U,noClampOnBlur:L,handlersRef:G,classNames:V,styles:S,size:C,rightSection:v,rightSectionWidth:b,formatter:B,parser:T,inputMode:j,unstyled:H,type:P}=r,F=ove(r,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:$,cx:q}=q1e({radius:A},{classNames:V,styles:S,unstyled:H,name:"NumberInput",variant:N,size:C}),J=xe=>{if(xe==="")return"";let _e=xe.toFixed(D);return y&&D>0&&(_e=_e.replace(new RegExp(`[0]{0,${D}}$`),""),_e.endsWith(".")&&(_e=_e.slice(0,-1))),_e},te=xe=>{let _e=xe;return s&&(_e=_e.replace(".",s)),B(_e)},ae=xe=>{let _e=xe;return s&&(_e=_e.replaceAll(l,"").replace(s,".")),T(_e)},ce=xe=>te(J(xe)),[ie,ue]=k.useState(typeof i=="number"?i:typeof U=="number"?U:""),[O,K]=k.useState(()=>ce(ie)),ee=k.useRef(),[se,pe]=k.useState(!1),ge=(xe,_e)=>{if(!se||_e){const Ae=ce(xe);Ae!==O&&K(Ae)}xe!==ie&&ue(xe)},X=typeof c=="number"?c:-1/0,M=typeof u=="number"?u:1/0,z=k.useRef();z.current=()=>{var xe;let _e;ie===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(Os(ie+d,X,M))),ge(_e,!0),a==null||a(_e)};const Z=k.useRef();Z.current=()=>{var xe;let _e;ie===""?_e=(xe=f??c)!=null?xe:0:_e=parseFloat(J(Os(ie-d,X,M))),ge(_e,!0),a==null||a(_e)},$N(G,{increment:z.current,decrement:Z.current}),k.useEffect(()=>{se||ge(i===void 0?ie:i,!0)},[i,se]);const Q=h!==void 0&&p!==void 0,de=k.useRef(null),we=k.useRef(0),Se=()=>{de.current&&window.clearTimeout(de.current),de.current=null,we.current=0},Ee=xe=>{xe?z.current():Z.current(),we.current+=1},ke=xe=>{if(Ee(xe),Q){const _e=typeof p=="number"?p:p(we.current);de.current=window.setTimeout(()=>ke(xe),_e)}},Te=(xe,_e)=>{xe.preventDefault(),ee.current.focus(),Ee(_e),Q&&(de.current=window.setTimeout(()=>ke(_e),h))};k.useEffect(()=>(Se(),Se),[]);const W=ne.createElement("div",{className:$.rightSection},ne.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie>=u,className:q($.control,$.controlUp),onPointerDown:xe=>{Te(xe,!0)},onPointerUp:Se,onPointerLeave:Se},ne.createElement(gO,{size:Re({size:C,sizes:bO}),direction:"up"})),ne.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:ie<=c,className:q($.control,$.controlDown),onPointerDown:xe=>{Te(xe,!1)},onPointerUp:Se,onPointerLeave:Se},ne.createElement(gO,{size:Re({size:C,sizes:bO}),direction:"down"}))),x=xe=>{let _e=xe;(_e[0]===`${s}`||_e[0]===".")&&(_e=`0${_e}`);const Ae=parseFloat(J(parseFloat(ae(_e)))),$e=L?Ae:Os(Ae,X,M),Ne=Number.isNaN($e)?"":$e,We=ie!==Ne;K(xe),ge(Ne),We&&(a==null||a(Ne))},I=xe=>{xe.nativeEvent.isComposing||x(xe.target.value)},Y=xe=>{pe(!0),m==null||m(xe)},re=xe=>{pe(!1),_==null||_(xe)},fe=xe=>{if(typeof w=="function"&&w(xe),xe.repeat&&Q&&(xe.key==="ArrowUp"||xe.key==="ArrowDown")){xe.preventDefault();return}n||(xe.key==="ArrowUp"?Te(xe,!0):xe.key==="ArrowDown"&&Te(xe,!1))},le=xe=>{typeof g=="function"&&g(xe),(xe.key==="ArrowUp"||xe.key==="ArrowDown")&&Se()};return ne.createElement(Oi,nve(rve({},F),{type:P,variant:N,value:O,disabled:o,readOnly:n,ref:Xs(ee,t),onChange:I,onFocus:Y,onBlur:re,onKeyDown:fe,onKeyUp:le,rightSection:v||(o||n||E||N==="unstyled"?null:W),rightSectionWidth:b??`calc(${Re({size:C,sizes:KL})} + ${me(1)})`,radius:A,max:u,min:c,step:d,size:C,styles:S,classNames:V,inputMode:j||V1e(d,D,Yne()),__staticSelector:"NumberInput",unstyled:H}))});kp.displayName="@mantine/core/NumberInput";const QL=k.createContext(!1),lve=QL.Provider,cve=()=>k.useContext(QL);function eU({children:e,openDelay:t=0,closeDelay:r=0}){return ne.createElement(lve,{value:!0},ne.createElement(hce,{delay:{open:t,close:r}},e))}eU.displayName="@mantine/core/TooltipGroup";var uve=Object.defineProperty,fve=Object.defineProperties,dve=Object.getOwnPropertyDescriptors,wO=Object.getOwnPropertySymbols,pve=Object.prototype.hasOwnProperty,hve=Object.prototype.propertyIsEnumerable,xO=(e,t,r)=>t in e?uve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_O=(e,t)=>{for(var r in t||(t={}))pve.call(t,r)&&xO(e,r,t[r]);if(wO)for(var r of wO(t))hve.call(t,r)&&xO(e,r,t[r]);return e},vve=(e,t)=>fve(e,dve(t));function gve(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const r=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:r.background,color:r.color}}var mve=it((e,{color:t,radius:r,width:n,multiline:o})=>({tooltip:vve(_O(_O({},e.fn.fontStyles()),gve(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(r),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:n}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const tU=mve,rU={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function yve({offset:e,position:t}){const[r,n]=k.useState(!1),o=k.useRef(),{x:i,y:a,reference:s,floating:l,refs:c,update:u,placement:f}=o4({placement:t,middleware:[t4({crossAxis:!0,padding:5,rootBoundary:"document"})]}),d=f.includes("right")?e:t.includes("left")?e*-1:0,p=f.includes("bottom")?e:t.includes("top")?e*-1:0,h=k.useCallback(({clientX:m,clientY:_})=>{s({getBoundingClientRect(){return{width:0,height:0,x:m,y:_,left:m+d,top:_+p,right:m,bottom:_}}})},[s]);return k.useEffect(()=>{if(c.floating.current){const m=o.current;m.addEventListener("mousemove",h);const _=ga(c.floating.current);return _.forEach(w=>{w.addEventListener("scroll",u)}),()=>{m.removeEventListener("mousemove",h),_.forEach(w=>{w.removeEventListener("scroll",u)})}}},[s,c.floating.current,u,h,r]),{handleMouseMove:h,x:i,y:a,opened:r,setOpened:n,boundaryRef:o,floating:l}}var bve=Object.defineProperty,wve=Object.defineProperties,xve=Object.getOwnPropertyDescriptors,Zg=Object.getOwnPropertySymbols,nU=Object.prototype.hasOwnProperty,oU=Object.prototype.propertyIsEnumerable,EO=(e,t,r)=>t in e?bve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vh=(e,t)=>{for(var r in t||(t={}))nU.call(t,r)&&EO(e,r,t[r]);if(Zg)for(var r of Zg(t))oU.call(t,r)&&EO(e,r,t[r]);return e},Wh=(e,t)=>wve(e,xve(t)),_ve=(e,t)=>{var r={};for(var n in e)nU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zg)for(var n of Zg(e))t.indexOf(n)<0&&oU.call(e,n)&&(r[n]=e[n]);return r};const Eve={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ta("popover")};function iU(e){var t;const r=tt("TooltipFloating",Eve,e),{children:n,refProp:o,withinPortal:i,portalProps:a,style:s,className:l,classNames:c,styles:u,unstyled:f,radius:d,color:p,label:h,offset:m,position:_,multiline:w,width:g,zIndex:E,disabled:A,variant:N}=r,D=_ve(r,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:y,x:U,y:L,opened:G,boundaryRef:V,floating:S,setOpened:C}=yve({offset:m,position:_}),{classes:v,cx:b}=tU({radius:d,color:p,multiline:w,width:g},{name:"TooltipFloating",classNames:c,styles:u,unstyled:f,variant:N});if(!s0(n))throw new Error(rU.children);const B=Xs(V,n.ref),T=H=>{var P,F;(F=(P=n.props).onMouseEnter)==null||F.call(P,H),y(H),C(!0)},j=H=>{var P,F;(F=(P=n.props).onMouseLeave)==null||F.call(P,H),C(!1)};return ne.createElement(ne.Fragment,null,ne.createElement(p0,Wh(Vh({},a),{withinPortal:i}),ne.createElement(Je,Wh(Vh({},D),{ref:S,className:b(v.tooltip,l),style:Wh(Vh({},s),{zIndex:E,display:!A&&G?"block":"none",top:L??"",left:(t=Math.round(U))!=null?t:""})}),h)),k.cloneElement(n,Wh(Vh({},n.props),{[o]:B,onMouseEnter:T,onMouseLeave:j})))}iU.displayName="@mantine/core/TooltipFloating";function Sve(e){const[t,r]=k.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=cve(),a=Ql(),{delay:s,currentId:l,setCurrentId:c}=SB(),u=k.useCallback(U=>{r(U),U&&c(a)},[c,a]),{x:f,y:d,reference:p,floating:h,context:m,refs:_,update:w,placement:g,middlewareData:{arrow:{x:E,y:A}={}}}=o4({placement:e.position,open:o,onOpenChange:u,middleware:[cB(e.offset),t4({padding:8}),mB(),bB({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[yB()]:[]]}),{getReferenceProps:N,getFloatingProps:D}=Pce([pce(m,{enabled:e.events.hover,delay:i?s:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),Sce(m,{enabled:e.events.focus,keyboardOnly:!0}),Cce(m,{role:"tooltip"}),Ece(m,{enabled:typeof e.opened===void 0}),vce(m,{id:a})]);return PB({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:_,update:w}}),Yn(()=>{var U;(U=e.onPositionChange)==null||U.call(e,g)},[g]),{x:f,y:d,arrowX:E,arrowY:A,reference:p,floating:h,getFloatingProps:D,getReferenceProps:N,isGroupPhase:o&&l&&l!==a,opened:o,placement:g}}var Cve=Object.defineProperty,Pve=Object.defineProperties,Ove=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,aU=Object.prototype.hasOwnProperty,sU=Object.prototype.propertyIsEnumerable,SO=(e,t,r)=>t in e?Cve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sl=(e,t)=>{for(var r in t||(t={}))aU.call(t,r)&&SO(e,r,t[r]);if(Jg)for(var r of Jg(t))sU.call(t,r)&&SO(e,r,t[r]);return e},lw=(e,t)=>Pve(e,Ove(t)),kve=(e,t)=>{var r={};for(var n in e)aU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jg)for(var n of Jg(e))t.indexOf(n)<0&&sU.call(e,n)&&(r[n]=e[n]);return r};const Ave={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Ta("popover"),positionDependencies:[]},Xy=k.forwardRef((e,t)=>{var r;const n=k.useRef(null),o=tt("Tooltip",Ave,e),{children:i,position:a,refProp:s,label:l,openDelay:c,closeDelay:u,onPositionChange:f,opened:d,withinPortal:p,portalProps:h,radius:m,color:_,classNames:w,styles:g,unstyled:E,style:A,className:N,withArrow:D,arrowSize:y,arrowOffset:U,arrowRadius:L,arrowPosition:G,offset:V,transitionProps:S,multiline:C,width:v,events:b,zIndex:B,disabled:T,positionDependencies:j,onClick:H,onMouseEnter:P,onMouseLeave:F,inline:$,variant:q,keepMounted:J}=o,te=kve(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ae,cx:ce,theme:ie}=tU({radius:m,color:_,width:v,multiline:C},{name:"Tooltip",classNames:w,styles:g,unstyled:E,variant:q}),ue=Sve({position:FB(ie.dir,a),closeDelay:u,openDelay:c,onPositionChange:f,opened:d,events:b,arrowRef:n,arrowOffset:U,offset:V+(D?y/2:0),positionDependencies:[...j,i],inline:$});if(!s0(i))throw new Error(rU.children);const O=Xs(ue.reference,i.ref,t);return ne.createElement(ne.Fragment,null,ne.createElement(p0,lw(sl({},h),{withinPortal:p}),ne.createElement(rc,lw(sl({keepMounted:J,mounted:!T&&ue.opened},S),{transition:S.transition||"fade",duration:ue.isGroupPhase?10:(r=S.duration)!=null?r:100}),K=>{var ee,se;return ne.createElement(Je,sl(sl({},te),ue.getFloatingProps({ref:ue.floating,className:ae.tooltip,style:lw(sl(sl({},A),K),{zIndex:B,top:(ee=ue.y)!=null?ee:0,left:(se=ue.x)!=null?se:0})})),l,ne.createElement(a4,{ref:n,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:D,position:ue.placement,arrowSize:y,arrowOffset:U,arrowRadius:L,arrowPosition:G,className:ae.arrow}))})),k.cloneElement(i,ue.getReferenceProps(sl({onClick:H,onMouseEnter:P,onMouseLeave:F,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[s]:O,className:ce(N,i.props.className)},i.props))))});Xy.Group=eU;Xy.Floating=iU;Xy.displayName="@mantine/core/Tooltip";const b0=Xy;function Ive({size:e,thickness:t,sum:r,value:n,root:o,offset:i}){const a=(e*.9-t*2)/2,s=Math.PI*a*2/100,l=o?`${(100-r)*s}, ${r*s}`:`${n*s}, ${(100-n)*s}`;return{strokeWidth:t,cx:e/2,cy:e/2,r:a,transform:o?`scale(1, -1) translate(0, -${e})`:null,strokeDasharray:l,strokeDashoffset:o?0:i}}var $ve=Object.defineProperty,Tve=Object.defineProperties,Dve=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,lU=Object.prototype.hasOwnProperty,cU=Object.prototype.propertyIsEnumerable,CO=(e,t,r)=>t in e?$ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PO=(e,t)=>{for(var r in t||(t={}))lU.call(t,r)&&CO(e,r,t[r]);if(Qg)for(var r of Qg(t))cU.call(t,r)&&CO(e,r,t[r]);return e},Mve=(e,t)=>Tve(e,Dve(t)),Rve=(e,t)=>{var r={};for(var n in e)lU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qg)for(var n of Qg(e))t.indexOf(n)<0&&cU.call(e,n)&&(r[n]=e[n]);return r};function uU(e){var t=e,{size:r,value:n,offset:o,sum:i,thickness:a,root:s,color:l,lineRoundCaps:c,tooltip:u}=t,f=Rve(t,["size","value","offset","sum","thickness","root","color","lineRoundCaps","tooltip"]);const d=Ir(),p=d.fn.themeColor(l||(d.colorScheme==="dark"?"dark":"gray"),l?d.fn.primaryShade():d.colorScheme==="dark"?4:1,!1);return ne.createElement(b0.Floating,{disabled:!u,label:u},ne.createElement("circle",PO(Mve(PO({},f),{fill:"none",strokeLinecap:c?"round":"butt",stroke:p}),Ive({sum:i,size:r,thickness:a,value:n,offset:o,root:s}))))}uU.displayName="@mantine/core/Curve";var Nve=Object.defineProperty,Fve=Object.defineProperties,Bve=Object.getOwnPropertyDescriptors,OO=Object.getOwnPropertySymbols,jve=Object.prototype.hasOwnProperty,Lve=Object.prototype.propertyIsEnumerable,kO=(e,t,r)=>t in e?Nve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yf=(e,t)=>{for(var r in t||(t={}))jve.call(t,r)&&kO(e,r,t[r]);if(OO)for(var r of OO(t))Lve.call(t,r)&&kO(e,r,t[r]);return e},Xf=(e,t)=>Fve(e,Bve(t));function Uve({size:e,thickness:t,sections:r,renderRoundedLineCaps:n,rootColor:o}){const i=r.reduce((u,f)=>u+f.value,0),a=Math.PI*((e*.9-t*2)/2)*2;let s=a;const l=[],c=[];for(let u=0;u2){c.push(Xf(Yf({},l[0]),{lineRoundCaps:n})),c.push(Xf(Yf({},l[l.length-2]),{lineRoundCaps:n}));for(let u=1;u<=l.length-3;u+=1)c.push(Xf(Yf({},l[u]),{lineRoundCaps:!1}))}else c.push(Xf(Yf({},l[0]),{lineRoundCaps:n}));return c}var zve=it({root:{position:"relative"},label:{position:"absolute",top:"50%",transform:"translateY(-50%)"}});const Hve=zve;var Vve=Object.defineProperty,Wve=Object.defineProperties,qve=Object.getOwnPropertyDescriptors,em=Object.getOwnPropertySymbols,fU=Object.prototype.hasOwnProperty,dU=Object.prototype.propertyIsEnumerable,AO=(e,t,r)=>t in e?Vve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cw=(e,t)=>{for(var r in t||(t={}))fU.call(t,r)&&AO(e,r,t[r]);if(em)for(var r of em(t))dU.call(t,r)&&AO(e,r,t[r]);return e},Gve=(e,t)=>Wve(e,qve(t)),Kve=(e,t)=>{var r={};for(var n in e)fU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&em)for(var n of em(e))t.indexOf(n)<0&&dU.call(e,n)&&(r[n]=e[n]);return r};const Yve={size:120,thickness:12},pU=k.forwardRef((e,t)=>{const r=tt("RingProgress",Yve,e),{className:n,style:o,label:i,sections:a,size:s,thickness:l,classNames:c,styles:u,roundCaps:f,rootColor:d,unstyled:p,variant:h}=r,m=Kve(r,["className","style","label","sections","size","thickness","classNames","styles","roundCaps","rootColor","unstyled","variant"]),{classes:_,cx:w}=Hve(null,{name:"RingProgress",classNames:c,styles:u,unstyled:p,variant:h}),g=Uve({size:s,thickness:l,sections:a,renderRoundedLineCaps:f,rootColor:d}).map(({data:E,sum:A,root:N,lineRoundCaps:D,offset:y},U)=>ne.createElement(uU,Gve(cw({},E),{key:U,size:s,thickness:l,sum:A,offset:y,color:E==null?void 0:E.color,root:N,lineRoundCaps:D})));return ne.createElement(Je,cw({style:cw({width:s,height:s},o),className:w(_.root,n),ref:t},m),ne.createElement("svg",{style:{width:s,height:s,transform:"rotate(-90deg)"}},g),i&&ne.createElement("div",{className:_.label,style:{right:l*2,left:l*2}},i))});pU.displayName="@mantine/core/RingProgress";function Xve({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:i,filterDataOnExactSearchMatch:a}){if(!t)return e;const s=i!=null&&e.find(c=>c.value===i)||null;if(s&&!a&&(s==null?void 0:s.label)===n){if(r){if(r>=e.length)return e;const c=e.indexOf(s),u=c+r,f=u-e.length;return f>0?e.slice(c-f):e.slice(c,u)}return e}const l=[];for(let c=0;c=r));c+=1);return l}var Zve=it(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const Jve=Zve;var Qve=Object.defineProperty,ege=Object.defineProperties,tge=Object.getOwnPropertyDescriptors,tm=Object.getOwnPropertySymbols,hU=Object.prototype.hasOwnProperty,vU=Object.prototype.propertyIsEnumerable,IO=(e,t,r)=>t in e?Qve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zf=(e,t)=>{for(var r in t||(t={}))hU.call(t,r)&&IO(e,r,t[r]);if(tm)for(var r of tm(t))vU.call(t,r)&&IO(e,r,t[r]);return e},uw=(e,t)=>ege(e,tge(t)),rge=(e,t)=>{var r={};for(var n in e)hU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tm)for(var n of tm(e))t.indexOf(n)<0&&vU.call(e,n)&&(r[n]=e[n]);return r};function nge(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function oge(e,t){return!!e&&!t.some(r=>r.label.toLowerCase()===e.toLowerCase())}const ige={required:!1,size:"sm",shadow:"sm",itemComponent:UF,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:nge,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:oge,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ta("popover"),positionDependencies:[],dropdownPosition:"flip"},rm=k.forwardRef((e,t)=>{const r=zB("Select",ige,e),{inputProps:n,wrapperProps:o,shadow:i,data:a,value:s,defaultValue:l,onChange:c,itemComponent:u,onKeyDown:f,onBlur:d,onFocus:p,transitionProps:h,initiallyOpened:m,unstyled:_,classNames:w,styles:g,filter:E,maxDropdownHeight:A,searchable:N,clearable:D,nothingFound:y,limit:U,disabled:L,onSearchChange:G,searchValue:V,rightSection:S,rightSectionWidth:C,creatable:v,getCreateLabel:b,shouldCreate:B,selectOnBlur:T,onCreate:j,dropdownComponent:H,onDropdownClose:P,onDropdownOpen:F,withinPortal:$,portalProps:q,switchDirectionOnFlip:J,zIndex:te,name:ae,dropdownPosition:ce,allowDeselect:ie,placeholder:ue,filterDataOnExactSearchMatch:O,form:K,positionDependencies:ee,readOnly:se,clearButtonProps:pe,hoverOnSearchChange:ge}=r,X=rge(r,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:M,cx:z,theme:Z}=Jve(),[Q,de]=k.useState(m),[we,Se]=k.useState(-1),Ee=k.useRef(),ke=k.useRef({}),[Te,W]=k.useState("column"),x=Te==="column",{scrollIntoView:I,targetRef:Y,scrollableRef:re}=Nne({duration:0,offset:5,cancelable:!1,isList:!0}),fe=ie===void 0?D:ie,le=Be=>{if(Q!==Be){de(Be);const Ke=Be?F:P;typeof Ke=="function"&&Ke()}},xe=v&&typeof b=="function";let _e=null;const Ae=a.map(Be=>typeof Be=="string"?{label:Be,value:Be}:Be),$e=jee({data:Ae}),[Ne,We,gt]=Hl({value:s,defaultValue:l,finalValue:null,onChange:c}),ft=$e.find(Be=>Be.value===Ne),[Ye,Qe]=Hl({value:V,defaultValue:(ft==null?void 0:ft.label)||"",finalValue:void 0,onChange:G}),rt=Be=>{Qe(Be),N&&typeof G=="function"&&G(Be)},ve=()=>{var Be;se||(We(null),gt||rt(""),(Be=Ee.current)==null||Be.focus())};k.useEffect(()=>{const Be=$e.find(Ke=>Ke.value===Ne);Be?rt(Be.label):(!xe||!Ne)&&rt("")},[Ne]),k.useEffect(()=>{ft&&(!N||!Q)&&rt(ft.label)},[ft==null?void 0:ft.label]);const oe=Be=>{if(!se)if(fe&&(ft==null?void 0:ft.value)===Be.value)We(null),le(!1);else{if(Be.creatable&&typeof j=="function"){const Ke=j(Be.value);typeof Ke<"u"&&Ke!==null&&We(typeof Ke=="string"?Ke:Ke.value)}else We(Be.value);gt||rt(Be.label),Se(-1),le(!1),Ee.current.focus()}},he=Xve({data:$e,searchable:N,limit:U,searchValue:Ye,filter:E,filterDataOnExactSearchMatch:O,value:Ne});xe&&B(Ye,he)&&(_e=b(Ye),he.push({label:Ye,value:Ye,creatable:!0}));const be=(Be,Ke,mt)=>{let ct=Be;for(;mt(ct);)if(ct=Ke(ct),!he[ct].disabled)return ct;return Be};Yn(()=>{Se(ge&&Ye?0:-1)},[Ye,ge]);const Ce=Ne?he.findIndex(Be=>Be.value===Ne):0,Oe=!se&&(he.length>0?Q:Q&&!!y),Ie=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct-1,ct=>ct>0);return Y.current=ke.current[(Ke=he[mt])==null?void 0:Ke.value],Oe&&I({alignment:x?"start":"end"}),mt})},De=()=>{Se(Be=>{var Ke;const mt=be(Be,ct=>ct+1,ct=>ctwindow.setTimeout(()=>{var Be;Y.current=ke.current[(Be=he[Ce])==null?void 0:Be.value],I({alignment:x?"end":"start"})},50);Yn(()=>{Oe&&je()},[Oe]);const Me=Be=>{switch(typeof f=="function"&&f(Be),Be.key){case"ArrowUp":{Be.preventDefault(),Q?x?Ie():De():(Se(Ce),le(!0),je());break}case"ArrowDown":{Be.preventDefault(),Q?x?De():Ie():(Se(Ce),le(!0),je());break}case"Home":{if(!N){Be.preventDefault(),Q||le(!0);const Ke=he.findIndex(mt=>!mt.disabled);Se(Ke),Oe&&I({alignment:x?"end":"start"})}break}case"End":{if(!N){Be.preventDefault(),Q||le(!0);const Ke=he.map(mt=>!!mt.disabled).lastIndexOf(!1);Se(Ke),Oe&&I({alignment:x?"end":"start"})}break}case"Escape":{Be.preventDefault(),le(!1),Se(-1);break}case" ":{N||(Be.preventDefault(),he[we]&&Q?oe(he[we]):(le(!0),Se(Ce),je()));break}case"Enter":N||Be.preventDefault(),he[we]&&Q&&(Be.preventDefault(),oe(he[we]))}},He=Be=>{typeof d=="function"&&d(Be);const Ke=$e.find(mt=>mt.value===Ne);T&&he[we]&&Q&&oe(he[we]),rt((Ke==null?void 0:Ke.label)||""),le(!1)},qe=Be=>{typeof p=="function"&&p(Be),N&&le(!0)},Ue=Be=>{se||(rt(Be.currentTarget.value),D&&Be.currentTarget.value===""&&We(null),Se(-1),le(!0))},at=()=>{se||(le(!Q),Ne&&!Q&&Se(Ce))};return ne.createElement(Pi.Wrapper,uw(Zf({},o),{__staticSelector:"Select"}),ne.createElement(Bd,{opened:Oe,transitionProps:h,shadow:i,withinPortal:$,portalProps:q,__staticSelector:"Select",onDirectionChange:W,switchDirectionOnFlip:J,zIndex:te,dropdownPosition:ce,positionDependencies:[...ee,Ye],classNames:w,styles:g,unstyled:_,variant:n.variant},ne.createElement(Bd.Target,null,ne.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":Oe?`${n.id}-items`:null,"aria-controls":n.id,"aria-expanded":Oe,onMouseLeave:()=>Se(-1),tabIndex:-1},ne.createElement("input",{type:"hidden",name:ae,value:Ne||"",form:K,disabled:L}),ne.createElement(Pi,Zf(uw(Zf(Zf({autoComplete:"off",type:"search"},n),X),{ref:Xs(t,Ee),onKeyDown:Me,__staticSelector:"Select",value:Ye,placeholder:ue,onChange:Ue,"aria-autocomplete":"list","aria-controls":Oe?`${n.id}-items`:null,"aria-activedescendant":we>=0?`${n.id}-${we}`:null,onMouseDown:at,onBlur:He,onFocus:qe,readOnly:!N||se,disabled:L,"data-mantine-stop-propagation":Oe,name:null,classNames:uw(Zf({},w),{input:z({[M.input]:!N},w==null?void 0:w.input)})}),R1e({theme:Z,rightSection:S,rightSectionWidth:C,styles:g,size:n.size,shouldClear:D&&!!ft,onClear:ve,error:o.error,clearButtonProps:pe,disabled:L,readOnly:se}))))),ne.createElement(Bd.Dropdown,{component:H||q_,maxHeight:A,direction:Te,id:n.id,innerRef:re,__staticSelector:"Select",classNames:w,styles:g},ne.createElement(BF,{data:he,hovered:we,classNames:w,styles:g,isItemSelected:Be=>Be===Ne,uuid:n.id,__staticSelector:"Select",onItemHover:Se,onItemSelect:oe,itemsRefs:ke,itemComponent:u,size:n.size,nothingFound:y,creatable:xe&&!!_e,createLabel:_e,"aria-label":o.label,unstyled:_,variant:n.variant}))))});rm.displayName="@mantine/core/Select";function gU({value:e,min:t,max:r}){const n=(e-t)/(r-t)*100;return Math.min(Math.max(n,0),100)}function age({value:e,containerWidth:t,min:r,max:n,step:o,precision:i}){const s=(t?Math.min(Math.max(e,0),t)/t:e)*(n-r),l=(s!==0?Math.round(s/o)*o:0)+r,c=Math.max(l,r);return i!==void 0?Number(c.toFixed(i)):c}var sge=Object.defineProperty,lge=Object.defineProperties,cge=Object.getOwnPropertyDescriptors,$O=Object.getOwnPropertySymbols,uge=Object.prototype.hasOwnProperty,fge=Object.prototype.propertyIsEnumerable,TO=(e,t,r)=>t in e?sge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dge=(e,t)=>{for(var r in t||(t={}))uge.call(t,r)&&TO(e,r,t[r]);if($O)for(var r of $O(t))fge.call(t,r)&&TO(e,r,t[r]);return e},pge=(e,t)=>lge(e,cge(t));const nn={xs:me(4),sm:me(6),md:me(8),lg:me(10),xl:me(12)};var hge=it(e=>({root:pge(dge({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const vge=hge;var gge=Object.defineProperty,mge=Object.defineProperties,yge=Object.getOwnPropertyDescriptors,DO=Object.getOwnPropertySymbols,bge=Object.prototype.hasOwnProperty,wge=Object.prototype.propertyIsEnumerable,MO=(e,t,r)=>t in e?gge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xge=(e,t)=>{for(var r in t||(t={}))bge.call(t,r)&&MO(e,r,t[r]);if(DO)for(var r of DO(t))wge.call(t,r)&&MO(e,r,t[r]);return e},_ge=(e,t)=>mge(e,yge(t)),Ege=it((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({label:{position:"absolute",top:me(-36),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[9],fontSize:e.fontSizes.xs,color:e.white,padding:`calc(${e.spacing.xs} / 2)`,borderRadius:e.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:_ge(xge({},e.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:r?"none":"flex",height:n?me(n):`calc(${Re({sizes:nn,size:o})} * 2)`,width:n?me(n):`calc(${Re({sizes:nn,size:o})} * 2)`,backgroundColor:e.colorScheme==="dark"?e.fn.themeColor(t,e.fn.primaryShade()):e.white,border:`${me(4)} solid ${e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade())}`,color:e.colorScheme==="dark"?e.white:e.fn.themeColor(t,e.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:e.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:e.shadows.sm}}));const Sge=Ege,mU=k.forwardRef(({max:e,min:t,value:r,position:n,label:o,dragging:i,onMouseDown:a,onKeyDownCapture:s,color:l,classNames:c,styles:u,size:f,labelTransition:d,labelTransitionDuration:p,labelTransitionTimingFunction:h,labelAlwaysOn:m,thumbLabel:_,onFocus:w,onBlur:g,showLabelOnHover:E,isHovered:A,children:N=null,disabled:D,unstyled:y,thumbSize:U,variant:L},G)=>{const{classes:V,cx:S,theme:C}=Sge({color:l,disabled:D,thumbSize:U},{name:"Slider",classNames:c,styles:u,unstyled:y,variant:L,size:f}),[v,b]=k.useState(!1),B=m||i||v||E&&A;return ne.createElement(Je,{tabIndex:0,role:"slider","aria-label":_,"aria-valuemax":e,"aria-valuemin":t,"aria-valuenow":r,ref:G,className:S(V.thumb,{[V.dragging]:i}),onFocus:()=>{b(!0),typeof w=="function"&&w()},onBlur:()=>{b(!1),typeof g=="function"&&g()},onTouchStart:a,onMouseDown:a,onKeyDownCapture:s,onClick:T=>T.stopPropagation(),style:{[C.dir==="rtl"?"right":"left"]:`${n}%`}},N,ne.createElement(rc,{mounted:o!=null&&B,duration:p,transition:d,timingFunction:h||C.transitionTimingFunction},T=>ne.createElement("div",{style:T,className:V.label},o)))});mU.displayName="@mantine/core/SliderThumb";function Cge({mark:e,offset:t,value:r,inverted:n=!1}){return n?typeof t=="number"&&e.value<=t||e.value>=r:typeof t=="number"?e.value>=t&&e.value<=r:e.value<=r}var Pge=it((e,{color:t,disabled:r,thumbSize:n},{size:o})=>({marksContainer:{position:"absolute",right:n?me(n/2):Re({sizes:nn,size:o}),left:n?me(n/2):Re({sizes:nn,size:o}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,borderColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${me(Re({sizes:nn,size:o}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,height:Re({sizes:nn,size:o}),width:Re({sizes:nn,size:o}),borderRadius:1e3,transform:`translateX(calc(-${Re({sizes:nn,size:o})} / 2))`,backgroundColor:e.white,pointerEvents:"none"},markFilled:{borderColor:r?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:t}).background},markLabel:{transform:`translate(-50%, calc(${e.spacing.xs} / 2))`,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const Oge=Pge;function yU({marks:e,color:t,size:r,thumbSize:n,min:o,max:i,value:a,classNames:s,styles:l,offset:c,onChange:u,disabled:f,unstyled:d,inverted:p,variant:h}){const{classes:m,cx:_}=Oge({color:t,disabled:f,thumbSize:n},{name:"Slider",classNames:s,styles:l,unstyled:d,variant:h,size:r}),w=e.map((g,E)=>ne.createElement(Je,{className:m.markWrapper,sx:{left:`${gU({value:g.value,min:o,max:i})}%`},key:E},ne.createElement("div",{className:_(m.mark,{[m.markFilled]:Cge({mark:g,value:a,offset:c,inverted:p})})}),g.label&&ne.createElement("div",{className:m.markLabel,onMouseDown:A=>{A.stopPropagation(),!f&&u(g.value)},onTouchStart:A=>{A.stopPropagation(),!f&&u(g.value)}},g.label)));return ne.createElement("div",{className:m.marksContainer},w)}yU.displayName="@mantine/core/SliderMarks";var kge=it((e,{radius:t,color:r,disabled:n,inverted:o,thumbSize:i},{size:a})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Re({sizes:nn,size:a})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}}},track:{position:"relative",height:Re({sizes:nn,size:a}),width:"100%",marginRight:i?me(i/2):Re({size:a,sizes:nn}),marginLeft:i?me(i/2):Re({size:a,sizes:nn}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:e.fn.radius(t),right:`calc(${i?me(i/2):Re({size:a,sizes:nn})} * -1)`,left:`calc(${i?me(i/2):Re({size:a,sizes:nn})} * -1)`,backgroundColor:o?n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:o?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]:n?e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]:e.fn.variant({variant:"filled",color:r}).background,borderRadius:e.fn.radius(t)}}));const Age=kge;var Ige=Object.defineProperty,$ge=Object.defineProperties,Tge=Object.getOwnPropertyDescriptors,nm=Object.getOwnPropertySymbols,bU=Object.prototype.hasOwnProperty,wU=Object.prototype.propertyIsEnumerable,RO=(e,t,r)=>t in e?Ige(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NO=(e,t)=>{for(var r in t||(t={}))bU.call(t,r)&&RO(e,r,t[r]);if(nm)for(var r of nm(t))wU.call(t,r)&&RO(e,r,t[r]);return e},Dge=(e,t)=>$ge(e,Tge(t)),Mge=(e,t)=>{var r={};for(var n in e)bU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&nm)for(var n of nm(e))t.indexOf(n)<0&&wU.call(e,n)&&(r[n]=e[n]);return r};function xU(e){var t=e,{filled:r,size:n,thumbSize:o,color:i,classNames:a,styles:s,radius:l,children:c,offset:u,disabled:f,marksOffset:d,unstyled:p,inverted:h,variant:m,containerProps:_}=t,w=Mge(t,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:g}=Age({color:i,radius:l,disabled:f,inverted:h,thumbSize:o},{name:"Slider",classNames:a,styles:s,unstyled:p,variant:m,size:n});return ne.createElement(ne.Fragment,null,ne.createElement("div",NO({className:g.trackContainer},_),ne.createElement("div",{className:g.track},ne.createElement(Je,{className:g.bar,sx:{left:`calc(${u}% - ${o?me(o/2):Re({size:n,sizes:nn})})`,width:`calc(${r}% + 2 * ${o?me(o/2):Re({size:n,sizes:nn})})`}}),c)),ne.createElement(yU,Dge(NO({},w),{size:n,thumbSize:o,color:i,offset:d,classNames:a,styles:s,disabled:f,unstyled:p,inverted:h,variant:m})))}xU.displayName="@mantine/core/SliderTrack";var Rge=Object.defineProperty,Nge=Object.defineProperties,Fge=Object.getOwnPropertyDescriptors,om=Object.getOwnPropertySymbols,_U=Object.prototype.hasOwnProperty,EU=Object.prototype.propertyIsEnumerable,FO=(e,t,r)=>t in e?Rge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bge=(e,t)=>{for(var r in t||(t={}))_U.call(t,r)&&FO(e,r,t[r]);if(om)for(var r of om(t))EU.call(t,r)&&FO(e,r,t[r]);return e},jge=(e,t)=>Nge(e,Fge(t)),Lge=(e,t)=>{var r={};for(var n in e)_U.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&om)for(var n of om(e))t.indexOf(n)<0&&EU.call(e,n)&&(r[n]=e[n]);return r};const SU=k.forwardRef((e,t)=>{var r=e,{className:n,size:o,classNames:i,styles:a,disabled:s,unstyled:l,variant:c}=r,u=Lge(r,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:f,cx:d}=vge(null,{name:"Slider",classNames:i,styles:a,unstyled:l,variant:c,size:o});return ne.createElement(Je,jge(Bge({},u),{tabIndex:-1,className:d(f.root,n),ref:t}))});SU.displayName="@mantine/core/SliderRoot";function qh(e,t){return parseFloat(e.toFixed(t))}function Uge(e){if(!e)return 0;const t=e.toString().split(".");return t.length>1?t[1].length:0}var zge=Object.defineProperty,Hge=Object.defineProperties,Vge=Object.getOwnPropertyDescriptors,im=Object.getOwnPropertySymbols,CU=Object.prototype.hasOwnProperty,PU=Object.prototype.propertyIsEnumerable,BO=(e,t,r)=>t in e?zge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wge=(e,t)=>{for(var r in t||(t={}))CU.call(t,r)&&BO(e,r,t[r]);if(im)for(var r of im(t))PU.call(t,r)&&BO(e,r,t[r]);return e},qge=(e,t)=>Hge(e,Vge(t)),Gge=(e,t)=>{var r={};for(var n in e)CU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&im)for(var n of im(e))t.indexOf(n)<0&&PU.call(e,n)&&(r[n]=e[n]);return r};const Kge={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:e=>e,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:e=>e},OU=k.forwardRef((e,t)=>{const r=tt("Slider",Kge,e),{classNames:n,styles:o,color:i,value:a,onChange:s,onChangeEnd:l,size:c,radius:u,min:f,max:d,step:p,precision:h,defaultValue:m,name:_,marks:w,label:g,labelTransition:E,labelTransitionDuration:A,labelTransitionTimingFunction:N,labelAlwaysOn:D,thumbLabel:y,showLabelOnHover:U,thumbChildren:L,disabled:G,unstyled:V,thumbSize:S,scale:C,inverted:v,variant:b}=r,B=Gge(r,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),T=h??Uge(p),j=Ir(),[H,P]=k.useState(!1),[F,$]=Hl({value:typeof a=="number"?Os(a,f,d):a,defaultValue:typeof m=="number"?Os(m,f,d):m,finalValue:Os(0,f,d),onChange:s}),q=k.useRef(F),J=k.useRef(),te=k.useRef(),ae=gU({value:F,min:f,max:d}),ce=C(F),ie=typeof g=="function"?g(ce):g,ue=k.useCallback(({x:se})=>{if(!G){const pe=age({value:se,min:f,max:d,step:p,precision:T});$(pe),q.current=pe}},[G,f,d,p,T,$]),{ref:O,active:K}=Ine(ue,{onScrubEnd:()=>l==null?void 0:l(q.current)},j.dir),ee=se=>{if(!G)switch(se.key){case"ArrowUp":{se.preventDefault(),te.current.focus();const pe=qh(Math.min(Math.max(F+p,f),d),T);l==null||l(pe),$(pe);break}case"ArrowRight":{se.preventDefault(),te.current.focus();const pe=qh(Math.min(Math.max(j.dir==="rtl"?F-p:F+p,f),d),T);l==null||l(pe),$(pe);break}case"ArrowDown":{se.preventDefault(),te.current.focus();const pe=qh(Math.min(Math.max(F-p,f),d),T);l==null||l(pe),$(pe);break}case"ArrowLeft":{se.preventDefault(),te.current.focus();const pe=qh(Math.min(Math.max(j.dir==="rtl"?F+p:F-p,f),d),T);l==null||l(pe),$(pe);break}case"Home":{se.preventDefault(),te.current.focus(),l==null||l(f),$(f);break}case"End":{se.preventDefault(),te.current.focus(),l==null||l(d),$(d);break}}};return ne.createElement(SU,qge(Wge({},B),{ref:Xs(t,J),onKeyDownCapture:ee,onMouseDownCapture:()=>{var se;return(se=J.current)==null?void 0:se.focus()},size:c,classNames:n,styles:o,disabled:G,unstyled:V,variant:b}),ne.createElement(xU,{inverted:v,offset:0,filled:ae,marks:w,size:c,thumbSize:S,radius:u,color:i,min:f,max:d,value:ce,onChange:$,classNames:n,styles:o,disabled:G,unstyled:V,variant:b,containerProps:{ref:O,onMouseEnter:U?()=>P(!0):void 0,onMouseLeave:U?()=>P(!1):void 0}},ne.createElement(mU,{max:d,min:f,value:ce,position:ae,dragging:K,color:i,size:c,label:ie,ref:te,labelTransition:E,labelTransitionDuration:A,labelTransitionTimingFunction:N,labelAlwaysOn:D,classNames:n,styles:o,thumbLabel:y,showLabelOnHover:U,isHovered:H,disabled:G,unstyled:V,thumbSize:S,variant:b},L)),ne.createElement("input",{type:"hidden",name:_,value:ce}))});OU.displayName="@mantine/core/Slider";var Yge=Object.defineProperty,am=Object.getOwnPropertySymbols,kU=Object.prototype.hasOwnProperty,AU=Object.prototype.propertyIsEnumerable,jO=(e,t,r)=>t in e?Yge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xge=(e,t)=>{for(var r in t||(t={}))kU.call(t,r)&&jO(e,r,t[r]);if(am)for(var r of am(t))AU.call(t,r)&&jO(e,r,t[r]);return e},Zge=(e,t)=>{var r={};for(var n in e)kU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&am)for(var n of am(e))t.indexOf(n)<0&&AU.call(e,n)&&(r[n]=e[n]);return r};const Jge={w:0,h:0},y4=k.forwardRef((e,t)=>{const r=tt("Space",Jge,e),{w:n,h:o}=r,i=Zge(r,["w","h"]);return ne.createElement(Je,Xge({ref:t,w:n,miw:n,h:o,mih:o},i))});y4.displayName="@mantine/core/Space";var Qge=it((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:Re({size:t,sizes:e.spacing})}}));const eme=Qge;var tme=Object.defineProperty,sm=Object.getOwnPropertySymbols,IU=Object.prototype.hasOwnProperty,$U=Object.prototype.propertyIsEnumerable,LO=(e,t,r)=>t in e?tme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rme=(e,t)=>{for(var r in t||(t={}))IU.call(t,r)&&LO(e,r,t[r]);if(sm)for(var r of sm(t))$U.call(t,r)&&LO(e,r,t[r]);return e},nme=(e,t)=>{var r={};for(var n in e)IU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sm)for(var n of sm(e))t.indexOf(n)<0&&$U.call(e,n)&&(r[n]=e[n]);return r};const ome={spacing:"md",align:"stretch",justify:"flex-start"},w0=k.forwardRef((e,t)=>{const r=tt("Stack",ome,e),{spacing:n,className:o,align:i,justify:a,unstyled:s,variant:l}=r,c=nme(r,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:f}=eme({spacing:n,align:i,justify:a},{name:"Stack",unstyled:s,variant:l});return ne.createElement(Je,rme({className:f(u.root,o),ref:t},c))});w0.displayName="@mantine/core/Stack";var ime=Object.defineProperty,ame=Object.defineProperties,sme=Object.getOwnPropertyDescriptors,UO=Object.getOwnPropertySymbols,lme=Object.prototype.hasOwnProperty,cme=Object.prototype.propertyIsEnumerable,zO=(e,t,r)=>t in e?ime(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fw=(e,t)=>{for(var r in t||(t={}))lme.call(t,r)&&zO(e,r,t[r]);if(UO)for(var r of UO(t))cme.call(t,r)&&zO(e,r,t[r]);return e},ume=(e,t)=>ame(e,sme(t));const TU={xs:me(34),sm:me(36),md:me(42),lg:me(48),xl:me(52)};var fme=it((e,{color:t,iconSize:r,radius:n,allowStepClick:o,iconPosition:i,orientation:a},{size:s})=>{const l=r?me(r):Re({size:s,sizes:TU}),c=s==="xl"||s==="lg"?e.spacing.md:e.spacing.sm,u=e.fn.radius(n),f=e.fn.variant({variant:"filled",color:t||e.primaryColor,primaryFallback:!1}),d=`calc(${e.spacing.xs} / 2)`,p={step:{justifyContent:"flex-start",minHeight:`calc(${l} + ${e.spacing.xl} + ${d})`,marginTop:d,overflow:"hidden","&:first-of-type":{marginTop:0},[`&:last-of-type .${zo("verticalSeparator")}`]:{display:"none"}}};return{stepLoader:{},step:fw({display:"flex",flexDirection:i==="left"?"row":"row-reverse",cursor:o?"pointer":"default"},a==="vertical"?p.step:{alignItems:"center"}),stepWrapper:{position:"relative"},verticalSeparator:{top:`calc(${l} + ${d})`,left:`calc(${l} / 2)`,height:"100vh",position:"absolute",borderLeft:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,ref:zo("verticalSeparator")},verticalSeparatorActive:{borderColor:e.fn.variant({variant:"filled",color:t}).background},stepIcon:{boxSizing:"border-box",height:l,width:l,minWidth:l,borderRadius:u,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],border:`${me(2)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`,transition:"background-color 150ms ease, border-color 150ms ease",position:"relative",fontWeight:700,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],fontSize:Re({size:s,sizes:e.fontSizes}),"&[data-progress]":{borderColor:f.background},"&[data-completed]":{backgroundColor:f.background,borderColor:f.background,color:e.white}},stepCompletedIcon:ume(fw({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.white}),stepBody:fw({display:"flex",flexDirection:"column",marginLeft:i==="left"?c:void 0,marginRight:i==="right"?c:void 0},a==="vertical"?{marginTop:`calc(${r} / 4)`}:null),stepLabel:{textAlign:i,fontWeight:500,fontSize:Re({size:s,sizes:e.fontSizes}),lineHeight:1},stepDescription:{textAlign:i,marginTop:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,marginBottom:`calc(${Re({size:s,sizes:e.spacing})} / 3)`,fontSize:`calc(${Re({size:s,sizes:e.fontSizes})} - ${me(2)})`,lineHeight:1}}});const dme=fme;var pme=Object.defineProperty,lm=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,MU=Object.prototype.propertyIsEnumerable,HO=(e,t,r)=>t in e?pme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dw=(e,t)=>{for(var r in t||(t={}))DU.call(t,r)&&HO(e,r,t[r]);if(lm)for(var r of lm(t))MU.call(t,r)&&HO(e,r,t[r]);return e},hme=(e,t)=>{var r={};for(var n in e)DU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lm)for(var n of lm(e))t.indexOf(n)<0&&MU.call(e,n)&&(r[n]=e[n]);return r};const vme={xs:16,sm:18,md:20,lg:22,xl:24},gme={withIcon:!0,size:"md",radius:"xl",allowStepClick:!0,iconPosition:"left",__staticSelector:"Step"},Gh=(e,t)=>typeof e=="function"?ne.createElement(e,{step:t}):e,RU=k.forwardRef((e,t)=>{const r=tt("StepperStep",gme,e),{className:n,step:o,state:i,color:a,icon:s,completedIcon:l,progressIcon:c,label:u,description:f,withIcon:d,iconSize:p,size:h,radius:m,loading:_,allowStepClick:w,allowStepSelect:g,iconPosition:E,__staticSelector:A,classNames:N,styles:D,unstyled:y,orientation:U,variant:L}=r,G=hme(r,["className","step","state","color","icon","completedIcon","progressIcon","label","description","withIcon","iconSize","size","radius","loading","allowStepClick","allowStepSelect","iconPosition","__staticSelector","classNames","styles","unstyled","orientation","variant"]),{classes:V,cx:S}=dme({color:a,iconSize:p,radius:m,allowStepClick:w,iconPosition:E,orientation:U},{name:A,classNames:N,styles:D,unstyled:y,variant:L,size:h}),C=Re({size:h,sizes:vme}),v=i==="stepCompleted"?null:i==="stepProgress"?c:s,b={"data-progress":i==="stepProgress"||void 0,"data-completed":i==="stepCompleted"||void 0};return ne.createElement(d0,dw(dw({className:S(V.step,n),tabIndex:w?0:-1,ref:t},b),G),d&&ne.createElement("div",{className:V.stepWrapper},ne.createElement("div",dw({className:V.stepIcon},b),ne.createElement(rc,{mounted:i==="stepCompleted",transition:"pop",duration:200},B=>ne.createElement("div",{className:V.stepCompletedIcon,style:B},_?ne.createElement(Vl,{color:"#fff",size:C,className:V.stepLoader}):Gh(l,o)||ne.createElement(ode,{indeterminate:!1,width:C,height:C}))),i!=="stepCompleted"?_?ne.createElement(Vl,{size:C,color:a}):Gh(v||s,o):null),U==="vertical"&&ne.createElement("div",{className:S(V.verticalSeparator,{[V.verticalSeparatorActive]:i==="stepCompleted"})})),(u||f)&&ne.createElement("div",{className:V.stepBody},u&&ne.createElement(_t,{className:V.stepLabel},Gh(u,o)),f&&ne.createElement(_t,{className:V.stepDescription,color:"dimmed"},Gh(f,o))))});RU.displayName="@mantine/core/Step";function cm(e){return null}cm.displayName="@mantine/core/StepCompleted";var mme=Object.defineProperty,yme=Object.defineProperties,bme=Object.getOwnPropertyDescriptors,VO=Object.getOwnPropertySymbols,wme=Object.prototype.hasOwnProperty,xme=Object.prototype.propertyIsEnumerable,WO=(e,t,r)=>t in e?mme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jf=(e,t)=>{for(var r in t||(t={}))wme.call(t,r)&&WO(e,r,t[r]);if(VO)for(var r of VO(t))xme.call(t,r)&&WO(e,r,t[r]);return e},_me=(e,t)=>yme(e,bme(t)),Eme=it((e,{contentPadding:t,color:r,orientation:n,iconPosition:o,iconSize:i,breakpoint:a},{size:s})=>{const l=typeof a<"u",c=Eo(Re({size:a,sizes:e.breakpoints})),u=typeof i<"u"?`calc(${me(i)} / 2 - ${me(1)})`:`calc(${Re({size:s,sizes:TU})} / 2 - ${me(1)})`,f={steps:{flexDirection:"column",alignItems:o==="left"?"flex-start":"flex-end"},separator:{width:me(2),minHeight:e.spacing.xl,marginLeft:o==="left"?u:0,marginRight:o==="right"?u:0,marginTop:`calc(${e.spacing.xs} / 2)`,marginBottom:`calc(${e.spacing.xs} - ${me(2)})`}},d={steps:{[`@media (max-width: ${bn(c-1)})`]:f.steps},separator:{[`@media (max-width: ${bn(c-1)})`]:f.separator}};return{root:{},steps:Jf(Jf({display:"flex",boxSizing:"border-box",alignItems:"center"},n==="vertical"?f.steps:null),l?d.steps:null),separator:Jf(Jf({boxSizing:"border-box",transition:"background-color 150ms ease",flex:1,height:me(2),backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],marginLeft:e.spacing.md,marginRight:e.spacing.md},n==="vertical"?f.separator:null),l?d.separator:null),separatorActive:{backgroundColor:e.fn.variant({variant:"filled",color:r||e.primaryColor,primaryFallback:!1}).background},content:_me(Jf({},e.fn.fontStyles()),{paddingTop:Re({size:t,sizes:e.spacing})})}});const Sme=Eme;var Cme=Object.defineProperty,um=Object.getOwnPropertySymbols,NU=Object.prototype.hasOwnProperty,FU=Object.prototype.propertyIsEnumerable,qO=(e,t,r)=>t in e?Cme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pme=(e,t)=>{for(var r in t||(t={}))NU.call(t,r)&&qO(e,r,t[r]);if(um)for(var r of um(t))FU.call(t,r)&&qO(e,r,t[r]);return e},Ome=(e,t)=>{var r={};for(var n in e)NU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&um)for(var n of um(e))t.indexOf(n)<0&&FU.call(e,n)&&(r[n]=e[n]);return r};const kme={contentPadding:"md",size:"md",radius:"xl",orientation:"horizontal",iconPosition:"left",allowNextStepsSelect:!0},ls=k.forwardRef((e,t)=>{var r,n,o;const i=tt("Stepper",kme,e),{className:a,children:s,onStepClick:l,active:c,icon:u,completedIcon:f,progressIcon:d,color:p,iconSize:h,contentPadding:m,size:_,radius:w,orientation:g,breakpoint:E,iconPosition:A,allowNextStepsSelect:N,classNames:D,styles:y,unstyled:U,variant:L}=i,G=Ome(i,["className","children","onStepClick","active","icon","completedIcon","progressIcon","color","iconSize","contentPadding","size","radius","orientation","breakpoint","iconPosition","allowNextStepsSelect","classNames","styles","unstyled","variant"]),{classes:V,cx:S}=Sme({contentPadding:m,color:p,orientation:g,iconPosition:A,iconSize:h,breakpoint:E},{name:"Stepper",classNames:D,styles:y,unstyled:U,variant:L,size:_}),C=k.Children.toArray(s),v=C.filter(P=>P.type!==cm),b=C.find(P=>P.type===cm),B=v.reduce((P,F,$)=>{const q=c===$?"stepProgress":c>$?"stepCompleted":"stepInactive",te=(()=>typeof l!="function"?!1:typeof F.props.allowStepSelect=="boolean"?F.props.allowStepSelect:q==="stepCompleted"||N)();return P.push(k.cloneElement(F,{__staticSelector:"Stepper",icon:F.props.icon||u||$+1,key:$,step:$,variant:L,state:q,onClick:()=>te&&l($),allowStepClick:te,completedIcon:F.props.completedIcon||f,progressIcon:F.props.progressIcon||d,color:F.props.color||p,iconSize:h,size:_,radius:w,classNames:D,styles:y,iconPosition:F.props.iconPosition||A,orientation:g,unstyled:U})),g==="horizontal"&&$!==v.length-1&&P.push(ne.createElement("div",{className:S(V.separator,{[V.separatorActive]:$v.length-1?j:T;return ne.createElement(Je,Pme({className:S(V.root,a),ref:t},G),ne.createElement("div",{className:V.steps},B),H&&ne.createElement("div",{className:V.content},H))});ls.Step=RU;ls.Completed=cm;ls.displayName="@mantine/core/Stepper";var Ame=Object.defineProperty,Ime=Object.defineProperties,$me=Object.getOwnPropertyDescriptors,GO=Object.getOwnPropertySymbols,Tme=Object.prototype.hasOwnProperty,Dme=Object.prototype.propertyIsEnumerable,KO=(e,t,r)=>t in e?Ame(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mme=(e,t)=>{for(var r in t||(t={}))Tme.call(t,r)&&KO(e,r,t[r]);if(GO)for(var r of GO(t))Dme.call(t,r)&&KO(e,r,t[r]);return e},Rme=(e,t)=>Ime(e,$me(t)),Nme=it((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:i,withColumnBorders:a})=>{const s=`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:Rme(Mme({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?s:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:Re({size:o,sizes:e.fontSizes}),padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:s},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:s},"& > tbody > tr > td":{padding:`${Re({size:n,sizes:e.spacing})} ${Re({size:r,sizes:e.spacing})}`,borderTop:s,fontSize:Re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:a?s:"none","&:last-of-type":{borderRight:"none",borderLeft:a?s:"none"}},"& > tbody > tr > th":{borderRight:a?s:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const Fme=Nme;var Bme=Object.defineProperty,jme=Object.defineProperties,Lme=Object.getOwnPropertyDescriptors,fm=Object.getOwnPropertySymbols,BU=Object.prototype.hasOwnProperty,jU=Object.prototype.propertyIsEnumerable,YO=(e,t,r)=>t in e?Bme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ume=(e,t)=>{for(var r in t||(t={}))BU.call(t,r)&&YO(e,r,t[r]);if(fm)for(var r of fm(t))jU.call(t,r)&&YO(e,r,t[r]);return e},zme=(e,t)=>jme(e,Lme(t)),Hme=(e,t)=>{var r={};for(var n in e)BU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fm)for(var n of fm(e))t.indexOf(n)<0&&jU.call(e,n)&&(r[n]=e[n]);return r};const Vme={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},LU=k.forwardRef((e,t)=>{const r=tt("Table",Vme,e),{className:n,children:o,striped:i,highlightOnHover:a,captionSide:s,horizontalSpacing:l,verticalSpacing:c,fontSize:u,unstyled:f,withBorder:d,withColumnBorders:p,variant:h}=r,m=Hme(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:_,cx:w}=Fme({captionSide:s,verticalSpacing:c,horizontalSpacing:l,fontSize:u,withBorder:d,withColumnBorders:p},{unstyled:f,name:"Table",variant:h});return ne.createElement(Je,zme(Ume({},m),{component:"table",ref:t,className:w(_.root,n),"data-striped":i||void 0,"data-hover":a||void 0}),o)});LU.displayName="@mantine/core/Table";var Wme=Object.defineProperty,qme=Object.defineProperties,Gme=Object.getOwnPropertyDescriptors,XO=Object.getOwnPropertySymbols,Kme=Object.prototype.hasOwnProperty,Yme=Object.prototype.propertyIsEnumerable,ZO=(e,t,r)=>t in e?Wme(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,JO=(e,t)=>{for(var r in t||(t={}))Kme.call(t,r)&&ZO(e,r,t[r]);if(XO)for(var r of XO(t))Yme.call(t,r)&&ZO(e,r,t[r]);return e},Xme=(e,t)=>qme(e,Gme(t));const Zme={xs:me(16),sm:me(20),md:me(26),lg:me(32),xl:me(40)},Jme=["filled","light","gradient","outline","default"];function Qme({theme:e,variant:t,color:r,gradient:n}){if(!Jme.includes(t))return null;const o=e.fn.variant({variant:t,color:r||e.primaryColor,gradient:n,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${me(t==="gradient"?0:1)} solid ${o.border}`}}var eye=it((e,{color:t,radius:r,gradient:n},{variant:o,size:i})=>{const a=Re({size:i,sizes:Zme});return{root:JO(Xme(JO({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:a,height:a,minWidth:a,minHeight:a,borderRadius:e.fn.radius(r)}),Qme({theme:e,variant:o,gradient:n,color:t}))}});const tye=eye;var rye=Object.defineProperty,dm=Object.getOwnPropertySymbols,UU=Object.prototype.hasOwnProperty,zU=Object.prototype.propertyIsEnumerable,QO=(e,t,r)=>t in e?rye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nye=(e,t)=>{for(var r in t||(t={}))UU.call(t,r)&&QO(e,r,t[r]);if(dm)for(var r of dm(t))zU.call(t,r)&&QO(e,r,t[r]);return e},oye=(e,t)=>{var r={};for(var n in e)UU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dm)for(var n of dm(e))t.indexOf(n)<0&&zU.call(e,n)&&(r[n]=e[n]);return r};const iye={size:"md",variant:"filled"},b4=k.forwardRef((e,t)=>{const r=tt("ThemeIcon",iye,e),{className:n,size:o,radius:i,variant:a,color:s,children:l,gradient:c,unstyled:u}=r,f=oye(r,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:d,cx:p}=tye({variant:a,radius:i,color:s,gradient:c},{name:"ThemeIcon",unstyled:u,variant:a,size:o});return ne.createElement(Je,nye({className:p(d.root,n),ref:t},f),l)});b4.displayName="@mantine/core/ThemeIcon";var aye=Object.defineProperty,sye=Object.defineProperties,lye=Object.getOwnPropertyDescriptors,ek=Object.getOwnPropertySymbols,cye=Object.prototype.hasOwnProperty,uye=Object.prototype.propertyIsEnumerable,tk=(e,t,r)=>t in e?aye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fye=(e,t)=>{for(var r in t||(t={}))cye.call(t,r)&&tk(e,r,t[r]);if(ek)for(var r of ek(t))uye.call(t,r)&&tk(e,r,t[r]);return e},dye=(e,t)=>sye(e,lye(t));function pye(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:me(e):r.headings.sizes[t].fontSize}function hye(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var vye=it((e,{element:t,weight:r,inline:n},{size:o})=>({root:dye(fye({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:pye(o,t,e),lineHeight:n?1:hye(o,t,e),margin:0})}));const gye=vye;var mye=Object.defineProperty,pm=Object.getOwnPropertySymbols,HU=Object.prototype.hasOwnProperty,VU=Object.prototype.propertyIsEnumerable,rk=(e,t,r)=>t in e?mye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yye=(e,t)=>{for(var r in t||(t={}))HU.call(t,r)&&rk(e,r,t[r]);if(pm)for(var r of pm(t))VU.call(t,r)&&rk(e,r,t[r]);return e},bye=(e,t)=>{var r={};for(var n in e)HU.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pm)for(var n of pm(e))t.indexOf(n)<0&&VU.call(e,n)&&(r[n]=e[n]);return r};const wye={order:1},Zy=k.forwardRef((e,t)=>{const r=tt("Title",wye,e),{className:n,order:o,children:i,unstyled:a,size:s,weight:l,inline:c,variant:u}=r,f=bye(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:d,cx:p}=gye({element:`h${o}`,weight:l,inline:c},{name:"Title",unstyled:a,variant:u,size:s});return[1,2,3,4,5,6].includes(o)?ne.createElement(_t,yye({variant:u,component:`h${o}`,ref:t,className:p(d.root,n)},f),i):null});Zy.displayName="@mantine/core/Title";/** - * @remix-run/router v1.7.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Jy(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _ye(){return Math.random().toString(36).substr(2,8)}function ok(e,t){return{usr:e.state,key:e.key,idx:t}}function J3(e,t,r,n){return r===void 0&&(r=null),Ap({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?oc(t):t,{state:r,key:t&&t.key||n||_ye()})}function hm(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function oc(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Eye(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s=ds.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(Ap({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function f(){s=ds.Pop;let _=u(),w=_==null?null:_-c;c=_,l&&l({action:s,location:m.location,delta:w})}function d(_,w){s=ds.Push;let g=J3(m.location,_,w);r&&r(g,_),c=u()+1;let E=ok(g,c),A=m.createHref(g);try{a.pushState(E,"",A)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign(A)}i&&l&&l({action:s,location:m.location,delta:1})}function p(_,w){s=ds.Replace;let g=J3(m.location,_,w);r&&r(g,_),c=u();let E=ok(g,c),A=m.createHref(g);a.replaceState(E,"",A),i&&l&&l({action:s,location:m.location,delta:0})}function h(_){let w=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof _=="string"?_:hm(_);return pr(w,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,w)}let m={get action(){return s},get location(){return e(o,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(nk,f),l=_,()=>{o.removeEventListener(nk,f),l=null}},createHref(_){return t(o,_)},createURL:h,encodeLocation(_){let w=h(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:d,replace:p,go(_){return a.go(_)}};return m}var ik;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ik||(ik={}));function Sye(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?oc(t):t,o=w4(n.pathname||"/",r);if(o==null)return null;let i=WU(e);Cye(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(pr(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=As([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(pr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),WU(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Tye(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of qU(i.path))o(i,a,l)}),t}function qU(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=qU(n.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Cye(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Dye(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Pye=/^:\w+$/,Oye=3,kye=2,Aye=1,Iye=10,$ye=-2,ak=e=>e==="*";function Tye(e,t){let r=e.split("/"),n=r.length;return r.some(ak)&&(n+=$ye),t&&(n+=kye),r.filter(o=>!ak(o)).reduce((o,i)=>o+(Pye.test(i)?Oye:i===""?Aye:Iye),n)}function Dye(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function Mye(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let a=0;a{if(u==="*"){let d=s[f]||"";a=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return c[u]=Bye(s[f]||"",u),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Nye(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Jy(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Fye(e){try{return decodeURI(e)}catch(t){return Jy(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Bye(e,t){try{return decodeURIComponent(e)}catch(r){return Jy(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function w4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function jye(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?oc(e):e;return{pathname:r?r.startsWith("/")?r:Lye(r,t):t,search:zye(n),hash:Hye(o)}}function Lye(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function pw(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function GU(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function KU(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=oc(e):(o=Ap({},e),pr(!o.pathname||!o.pathname.includes("?"),pw("?","pathname","search",o)),pr(!o.pathname||!o.pathname.includes("#"),pw("#","pathname","hash",o)),pr(!o.search||!o.search.includes("#"),pw("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(n||a==null)s=r;else{let f=t.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=jye(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const As=e=>e.join("/").replace(/\/\/+/g,"/"),Uye=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zye=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hye=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vye(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const YU=["post","put","patch","delete"];new Set(YU);const Wye=["get",...YU];new Set(Wye);/** - * React Router v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function vm(){return vm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=k.useRef(!1);return ZU(()=>{a.current=!0}),k.useCallback(function(l,c){if(c===void 0&&(c={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let u=KU(l,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:As([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,i,o,e])}function JU(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=k.useContext(ic),{pathname:o}=lf(),i=JSON.stringify(GU(n).map(a=>a.pathnameBase));return k.useMemo(()=>KU(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function Yye(e,t){return Xye(e,t)}function Xye(e,t,r){x0()||pr(!1);let{navigator:n}=k.useContext(sf),{matches:o}=k.useContext(ic),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=lf(),c;if(t){var u;let m=typeof t=="string"?oc(t):t;s==="/"||(u=m.pathname)!=null&&u.startsWith(s)||pr(!1),c=m}else c=l;let f=c.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=Sye(e,{pathname:d}),h=tbe(p&&p.map(m=>Object.assign({},m,{params:Object.assign({},a,m.params),pathname:As([s,n.encodeLocation?n.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:As([s,n.encodeLocation?n.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,r);return t&&h?k.createElement(Qy.Provider,{value:{location:vm({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ds.Pop}},h):h}function Zye(){let e=ibe(),t=Vye(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),r?k.createElement("pre",{style:o},r):null,i)}const Jye=k.createElement(Zye,null);class Qye extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?k.createElement(ic.Provider,{value:this.props.routeContext},k.createElement(XU.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ebe(e){let{routeContext:t,match:r,children:n}=e,o=k.useContext(x4);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),k.createElement(ic.Provider,{value:t},n)}function tbe(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let s=i.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||pr(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,c)=>{let u=l.route.id?a==null?void 0:a[l.route.id]:null,f=null;r&&(f=l.route.errorElement||Jye);let d=t.concat(i.slice(0,c+1)),p=()=>{let h;return u?h=f:l.route.Component?h=k.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,k.createElement(ebe,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?k.createElement(Qye,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var Q3;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Q3||(Q3={}));var Ip;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Ip||(Ip={}));function rbe(e){let t=k.useContext(x4);return t||pr(!1),t}function nbe(e){let t=k.useContext(qye);return t||pr(!1),t}function obe(e){let t=k.useContext(ic);return t||pr(!1),t}function QU(e){let t=obe(),r=t.matches[t.matches.length-1];return r.route.id||pr(!1),r.route.id}function ibe(){var e;let t=k.useContext(XU),r=nbe(Ip.UseRouteError),n=QU(Ip.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function abe(){let{router:e}=rbe(Q3.UseNavigateStable),t=QU(Ip.UseNavigateStable),r=k.useRef(!1);return ZU(()=>{r.current=!0}),k.useCallback(function(o,i){i===void 0&&(i={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,vm({fromRouteId:t},i)))},[e,t])}function vr(e){pr(!1)}function sbe(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ds.Pop,navigator:i,static:a=!1}=e;x0()&&pr(!1);let s=t.replace(/^\/*/,"/"),l=k.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof n=="string"&&(n=oc(n));let{pathname:c="/",search:u="",hash:f="",state:d=null,key:p="default"}=n,h=k.useMemo(()=>{let m=w4(c,s);return m==null?null:{location:{pathname:m,search:u,hash:f,state:d,key:p},navigationType:o}},[s,c,u,f,d,p,o]);return h==null?null:k.createElement(sf.Provider,{value:l},k.createElement(Qy.Provider,{children:r,value:h}))}function lbe(e){let{children:t,location:r}=e;return Yye(ex(t),r)}var sk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(sk||(sk={}));new Promise(()=>{});function ex(e,t){t===void 0&&(t=[]);let r=[];return k.Children.forEach(e,(n,o)=>{if(!k.isValidElement(n))return;let i=[...t,o];if(n.type===k.Fragment){r.push.apply(r,ex(n.props.children,i));return}n.type!==vr&&pr(!1),!n.props.index||!n.props.children||pr(!1);let a={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=ex(n.props.children,i)),r.push(a)}),r}/** - * React Router DOM v6.14.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function tx(){return tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}function ube(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fbe(e,t){return e.button===0&&(!t||t==="_self")&&!ube(e)}const dbe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],pbe="startTransition",lk=ap[pbe];function hbe(e){let{basename:t,children:r,future:n,window:o}=e,i=k.useRef();i.current==null&&(i.current=xye({window:o,v5Compat:!0}));let a=i.current,[s,l]=k.useState({action:a.action,location:a.location}),{v7_startTransition:c}=n||{},u=k.useCallback(f=>{c&&lk?lk(()=>l(f)):l(f)},[l,c]);return k.useLayoutEffect(()=>a.listen(u),[a,u]),k.createElement(sbe,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:a})}const vbe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gbe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mbe=k.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u}=t,f=cbe(t,dbe),{basename:d}=k.useContext(sf),p,h=!1;if(typeof c=="string"&&gbe.test(c)&&(p=c,vbe))try{let g=new URL(window.location.href),E=c.startsWith("//")?new URL(g.protocol+c):new URL(c),A=w4(E.pathname,d);E.origin===g.origin&&A!=null?c=A+E.search+E.hash:h=!0}catch{}let m=Gye(c,{relative:o}),_=ybe(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o});function w(g){n&&n(g),g.defaultPrevented||_(g)}return k.createElement("a",tx({},f,{href:p||m,onClick:h||i?n:w,ref:r,target:l}))});var ck;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(ck||(ck={}));var uk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(uk||(uk={}));function ybe(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=_0(),l=lf(),c=JU(e,{relative:a});return k.useCallback(u=>{if(fbe(u,r)){u.preventDefault();let f=n!==void 0?n:hm(l)===hm(c);s(e,{replace:f,state:o,preventScrollReset:i,relative:a})}},[l,s,c,n,o,r,e,i,a])}var ez={exports:{}},bbe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",wbe=bbe,xbe=wbe;function tz(){}function rz(){}rz.resetWarningCache=tz;var _be=function(){function e(n,o,i,a,s,l){if(l!==xbe){var c=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 c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rz,resetWarningCache:tz};return r.PropTypes=r,r};ez.exports=_be();var Ebe=ez.exports;const ll=ri(Ebe);var Sbe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Cbe=Object.defineProperty,Pbe=Object.defineProperties,Obe=Object.getOwnPropertyDescriptors,gm=Object.getOwnPropertySymbols,nz=Object.prototype.hasOwnProperty,oz=Object.prototype.propertyIsEnumerable,fk=(e,t,r)=>t in e?Cbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dk=(e,t)=>{for(var r in t||(t={}))nz.call(t,r)&&fk(e,r,t[r]);if(gm)for(var r of gm(t))oz.call(t,r)&&fk(e,r,t[r]);return e},kbe=(e,t)=>Pbe(e,Obe(t)),Abe=(e,t)=>{var r={};for(var n in e)nz.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gm)for(var n of gm(e))t.indexOf(n)<0&&oz.call(e,n)&&(r[n]=e[n]);return r},zr=(e,t,r)=>{const n=k.forwardRef((o,i)=>{var a=o,{color:s="currentColor",size:l=24,stroke:c=2,children:u}=a,f=Abe(a,["color","size","stroke","children"]);return k.createElement("svg",dk(kbe(dk({ref:i},Sbe),{width:l,height:l,stroke:s,strokeWidth:c,className:`tabler-icon tabler-icon-${e}`}),f),[...r.map(([d,p])=>k.createElement(d,p)),...u||[]])});return n.propTypes={color:ll.string,size:ll.oneOfType([ll.string,ll.number]),stroke:ll.oneOfType([ll.string,ll.number])},n.displayName=`${t}`,n},Ibe=zr("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),$be=zr("at","IconAt",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]]),Tbe=zr("calendar-stats","IconCalendarStats",[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M18 18m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]]),iz=zr("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),Dbe=zr("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),Mbe=zr("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),Rbe=zr("external-link","IconExternalLink",[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]]),Nbe=zr("file-analytics","IconFileAnalytics",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17l0 -5",key:"svg-2"}],["path",{d:"M12 17l0 -1",key:"svg-3"}],["path",{d:"M15 17l0 -3",key:"svg-4"}]]),Fbe=zr("gauge","IconGauge",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M13.41 10.59l2.59 -2.59",key:"svg-2"}],["path",{d:"M7 12a5 5 0 0 1 5 -5",key:"svg-3"}]]),Bbe=zr("grip-vertical","IconGripVertical",[["path",{d:"M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),jbe=zr("info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]),Lbe=zr("moon-stars","IconMoonStars",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}],["path",{d:"M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2",key:"svg-1"}],["path",{d:"M19 11h2m-1 -1v2",key:"svg-2"}]]),Ube=zr("notes","IconNotes",[["path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 7l6 0",key:"svg-1"}],["path",{d:"M9 11l6 0",key:"svg-2"}],["path",{d:"M9 15l4 0",key:"svg-3"}]]),zbe=zr("presentation-analytics","IconPresentationAnalytics",[["path",{d:"M9 12v-4",key:"svg-0"}],["path",{d:"M15 12v-2",key:"svg-1"}],["path",{d:"M12 12v-1",key:"svg-2"}],["path",{d:"M3 4h18",key:"svg-3"}],["path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10",key:"svg-4"}],["path",{d:"M12 16v4",key:"svg-5"}],["path",{d:"M9 20h6",key:"svg-6"}]]),Hbe=zr("square-rounded-minus","IconSquareRoundedMinus",[["path",{d:"M9 12h6",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}]]),Vbe=zr("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),Wbe=zr("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);const qbe=it(e=>({control:{fontWeight:500,display:"block",width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:e.fontSizes.sm,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},link:{fontWeight:500,display:"block",textDecoration:"none",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:me(31),marginLeft:me(30),fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],borderLeft:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,[`& .${zo("icon")}`]:{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}},chevron:{transition:"transform 200ms ease"}}));function Gbe({icon:e,label:t,initiallyOpened:r,links:n,groupLink:o,active:i,setActive:a}){const{classes:s,theme:l,cx:c}=qbe(),u=_0(),f=Array.isArray(n),[d,p]=k.useState(r??!0),h=l.dir==="ltr"?Mbe:Dbe,m=(f?n:[]).map(_=>R.jsx(_t,{component:mbe,className:c(s.link,{[s.linkActive]:_.link===i}),to:_.link,ta:"left",onClick:()=>a(_.link),children:_.label},_.label));return R.jsxs(R.Fragment,{children:[R.jsx(d0,{onClick:()=>{p(_=>!_),f||a(o??""),o&&u(o)},className:c(s.control,{[s.linkActive]:!f&&o===i}),children:R.jsxs(jt,{position:"apart",spacing:0,children:[R.jsxs(Je,{sx:{display:"flex",alignItems:"center"},children:[R.jsx(b4,{variant:"light",size:30,children:R.jsx(e,{size:"1.1rem"})}),R.jsx(Je,{ml:"md",children:t})]}),f&&R.jsx(h,{className:s.chevron,size:"1rem",stroke:1.5,style:{transform:d?`rotate(${l.dir==="rtl"?-90:90}deg)`:"none"}})]})}),f?R.jsx(VN,{in:d,children:m}):null]})}const Kbe=[{label:"Wallet Info",icon:Fbe,groupLink:"/"},{label:"Fungible Tokens",icon:Ube,initiallyOpened:!1,links:[{label:"Token info",link:"/token/info"},{label:"Issue new tokens",link:"/token/new"},{label:"Burn tokens",link:"/token/burn"}]},{label:"NFT",icon:Tbe,initiallyOpened:!1,links:[{label:"NFT info",link:"/nft/info"},{label:"Create new collection",link:"/nft/new-collection"},{label:"Burn NFTs",link:"/nft/burn"}]},{label:"Contracts",icon:Nbe,initiallyOpened:!1,links:[{label:"Playground",link:"/contract/play"},{label:"Contract info",link:"/contract/info"},{label:"Deploy Contract",link:"/contract/deploy"}]},{label:"Multisig",icon:zbe,initiallyOpened:!0,links:[{label:"Create Multisig",link:"/multisig/create"},{label:"Import Multisig",link:"/multisig/import"},{label:"Show Multisig",link:"/multisig/show"},{label:"Build Transaction",link:"/multisig/build-tx"},{label:"Sign Transaction",link:"/multisig/sign-tx"}]}],Ybe=it(e=>({navbar:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,paddingBottom:0},header:{padding:e.spacing.md,paddingTop:0,marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,color:e.colorScheme==="dark"?e.white:e.black,borderBottom:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},links:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`},linksInner:{paddingTop:e.spacing.xl,paddingBottom:e.spacing.xl},footer:{marginLeft:`calc(${e.spacing.md} * -1)`,marginRight:`calc(${e.spacing.md} * -1)`,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}));function Xbe(){const{classes:e}=Ybe(),t=lf(),[r,n]=k.useState(t.pathname);k.useEffect(()=>{n(t.pathname)},[t.pathname]);const o=Kbe.map(i=>k.createElement(Gbe,{...i,key:i.label,active:r,setActive:n}));return R.jsx(Hv,{width:{sm:300},p:"md",className:e.navbar,children:R.jsx(Hv.Section,{grow:!0,className:e.links,component:iB,children:R.jsx("div",{className:e.linksInner,children:o})})})}function Zbe(){const{colorScheme:e,toggleColorScheme:t}=Hre(),r=e==="dark";return R.jsx(Dv,{variant:"outline",color:r?"yellow":"blue",onClick:()=>t(),title:"Toggle color scheme",children:r?R.jsx(Vbe,{size:"1.1rem"}):R.jsx(Lbe,{size:"1.1rem"})})}var rx=function(e,t){return rx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},rx(e,t)};function az(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ve=function(){return Ve=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ar(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Go(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"||process.env===void 0?Qbe:"production",Qi=function(e){return{isEnabled:function(t){return e.some(function(r){return!!t[r]})}}},$p={measureLayout:Qi(["layout","layoutId","drag"]),animation:Qi(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Qi(["exit"]),drag:Qi(["drag","dragControls"]),focus:Qi(["whileFocus"]),hover:Qi(["whileHover","onHoverStart","onHoverEnd"]),tap:Qi(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Qi(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Qi(["whileInView","onViewportEnter","onViewportLeave"])};function e2e(e){for(var t in e)e[t]!==null&&(t==="projectionNodeConstructor"?$p.projectionNodeConstructor=e[t]:$p[t].Component=e[t])}var t2e=function(){},mm=function(){},sz=k.createContext({strict:!1}),lz=Object.keys($p),r2e=lz.length;function n2e(e,t,r){var n=[],o=k.useContext(sz);if(!t)return null;_4!=="production"&&r&&o.strict;for(var i=0;i"u")return t;var r=new Map;return new Proxy(t,{get:function(n,o){return r.has(o)||r.set(o,t(o)),r.get(o)}})}var x2e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function C4(e){return typeof e!="string"||e.includes("-")?!1:!!(x2e.indexOf(e)>-1||/[A-Z]/.test(e))}var bm={};function _2e(e){Object.assign(bm,e)}var ox=["","X","Y","Z"],E2e=["translate","scale","rotate","skew"],Tp=["transformPerspective","x","y","z"];E2e.forEach(function(e){return ox.forEach(function(t){return Tp.push(e+t)})});function S2e(e,t){return Tp.indexOf(e)-Tp.indexOf(t)}var C2e=new Set(Tp);function C0(e){return C2e.has(e)}var P2e=new Set(["originX","originY","originZ"]);function hz(e){return P2e.has(e)}function vz(e,t){var r=t.layout,n=t.layoutId;return C0(e)||hz(e)||(r||n!==void 0)&&(!!bm[e]||e==="opacity")}var Ca=function(e){return!!(e!==null&&typeof e=="object"&&e.getVelocity)},O2e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function k2e(e,t,r,n){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=a===void 0?!0:a,l=t.allowTransformNone,c=l===void 0?!0:l,u="";i.sort(S2e);for(var f=!1,d=i.length,p=0;pr=>Math.max(Math.min(r,t),e),Ld=e=>e%1?Number(e.toFixed(5)):e,Dp=/(-)?([\d]*\.?[\d])+/g,ix=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,$2e=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function P0(e){return typeof e=="string"}const ac={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ud=Object.assign(Object.assign({},ac),{transform:mz(0,1)}),Kh=Object.assign(Object.assign({},ac),{default:1}),O0=e=>({test:t=>P0(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ja=O0("deg"),ki=O0("%"),dt=O0("px"),T2e=O0("vh"),D2e=O0("vw"),hk=Object.assign(Object.assign({},ki),{parse:e=>ki.parse(e)/100,transform:e=>ki.transform(e*100)}),P4=(e,t)=>r=>!!(P0(r)&&$2e.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),yz=(e,t,r)=>n=>{if(!P0(n))return n;const[o,i,a,s]=n.match(Dp);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Il={test:P4("hsl","hue"),parse:yz("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ki.transform(Ld(t))+", "+ki.transform(Ld(r))+", "+Ld(Ud.transform(n))+")"},M2e=mz(0,255),hw=Object.assign(Object.assign({},ac),{transform:e=>Math.round(M2e(e))}),ps={test:P4("rgb","red"),parse:yz("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+hw.transform(e)+", "+hw.transform(t)+", "+hw.transform(r)+", "+Ld(Ud.transform(n))+")"};function R2e(e){let t="",r="",n="",o="";return e.length>5?(t=e.substr(1,2),r=e.substr(3,2),n=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),r=e.substr(2,1),n=e.substr(3,1),o=e.substr(4,1),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}const ax={test:P4("#"),parse:R2e,transform:ps.transform},vn={test:e=>ps.test(e)||ax.test(e)||Il.test(e),parse:e=>ps.test(e)?ps.parse(e):Il.test(e)?Il.parse(e):ax.parse(e),transform:e=>P0(e)?e:e.hasOwnProperty("red")?ps.transform(e):Il.transform(e)},bz="${c}",wz="${n}";function N2e(e){var t,r,n,o;return isNaN(e)&&P0(e)&&((r=(t=e.match(Dp))===null||t===void 0?void 0:t.length)!==null&&r!==void 0?r:0)+((o=(n=e.match(ix))===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0}function xz(e){typeof e=="number"&&(e=`${e}`);const t=[];let r=0;const n=e.match(ix);n&&(r=n.length,e=e.replace(ix,bz),t.push(...n.map(vn.parse)));const o=e.match(Dp);return o&&(e=e.replace(Dp,wz),t.push(...o.map(ac.parse))),{values:t,numColors:r,tokenised:e}}function _z(e){return xz(e).values}function Ez(e){const{values:t,numColors:r,tokenised:n}=xz(e),o=t.length;return i=>{let a=n;for(let s=0;stypeof e=="number"?0:e;function B2e(e){const t=_z(e);return Ez(e)(t.map(F2e))}const Pa={test:N2e,parse:_z,createTransformer:Ez,getAnimatableNone:B2e},j2e=new Set(["brightness","contrast","saturate","opacity"]);function L2e(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(Dp)||[];if(!n)return e;const o=r.replace(n,"");let i=j2e.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}const U2e=/([a-z-]*)\(.*?\)/g,sx=Object.assign(Object.assign({},Pa),{getAnimatableNone:e=>{const t=e.match(U2e);return t?t.map(L2e).join(" "):e}});var vk=Ve(Ve({},ac),{transform:Math.round}),Sz={borderWidth:dt,borderTopWidth:dt,borderRightWidth:dt,borderBottomWidth:dt,borderLeftWidth:dt,borderRadius:dt,radius:dt,borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomRightRadius:dt,borderBottomLeftRadius:dt,width:dt,maxWidth:dt,height:dt,maxHeight:dt,size:dt,top:dt,right:dt,bottom:dt,left:dt,padding:dt,paddingTop:dt,paddingRight:dt,paddingBottom:dt,paddingLeft:dt,margin:dt,marginTop:dt,marginRight:dt,marginBottom:dt,marginLeft:dt,rotate:Ja,rotateX:Ja,rotateY:Ja,rotateZ:Ja,scale:Kh,scaleX:Kh,scaleY:Kh,scaleZ:Kh,skew:Ja,skewX:Ja,skewY:Ja,distance:dt,translateX:dt,translateY:dt,translateZ:dt,x:dt,y:dt,z:dt,perspective:dt,transformPerspective:dt,opacity:Ud,originX:hk,originY:hk,originZ:dt,zIndex:vk,fillOpacity:Ud,strokeOpacity:Ud,numOctaves:vk};function O4(e,t,r,n){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,c=e.transformOrigin;l.length=0;var u=!1,f=!1,d=!0;for(var p in t){var h=t[p];if(gz(p)){a[p]=h;continue}var m=Sz[p],_=I2e(h,m);if(C0(p)){if(u=!0,s[p]=_,l.push(p),!d)continue;h!==((o=m.default)!==null&&o!==void 0?o:0)&&(d=!1)}else hz(p)?(c[p]=_,f=!0):i[p]=_}u?i.transform=k2e(e,r,d,n):n?i.transform=n({},""):!t.transform&&i.transform&&(i.transform="none"),f&&(i.transformOrigin=A2e(c))}var k4=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Cz(e,t,r){for(var n in t)!Ca(t[n])&&!vz(n,r)&&(e[n]=t[n])}function z2e(e,t,r){var n=e.transformTemplate;return k.useMemo(function(){var o=k4();O4(o,t,{enableHardwareAcceleration:!r},n);var i=o.vars,a=o.style;return Ve(Ve({},i),a)},[t])}function H2e(e,t,r){var n=e.style||{},o={};return Cz(o,n,e),Object.assign(o,z2e(e,t,r)),e.transformValues&&(o=e.transformValues(o)),o}function V2e(e,t,r){var n={},o=H2e(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":"pan-".concat(e.drag==="x"?"y":"x")),n.style=o,n}var W2e=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function wm(e){return W2e.has(e)}var Pz=function(e){return!wm(e)};function q2e(e){e&&(Pz=function(t){return t.startsWith("on")?!wm(t):e(t)})}try{q2e(require("@emotion/is-prop-valid").default)}catch{}function G2e(e,t,r){var n={};for(var o in e)(Pz(o)||r===!0&&wm(o)||!t&&!wm(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function gk(e,t,r){return typeof e=="string"?e:dt.transform(t+r*e)}function K2e(e,t,r){var n=gk(t,e.x,e.width),o=gk(r,e.y,e.height);return"".concat(n," ").concat(o)}var Y2e={offset:"stroke-dashoffset",array:"stroke-dasharray"},X2e={offset:"strokeDashoffset",array:"strokeDasharray"};function Z2e(e,t,r,n,o){r===void 0&&(r=1),n===void 0&&(n=0),o===void 0&&(o=!0),e.pathLength=1;var i=o?Y2e:X2e;e[i.offset]=dt.transform(-n);var a=dt.transform(t),s=dt.transform(r);e[i.array]="".concat(a," ").concat(s)}function A4(e,t,r,n){var o=t.attrX,i=t.attrY,a=t.originX,s=t.originY,l=t.pathLength,c=t.pathSpacing,u=c===void 0?1:c,f=t.pathOffset,d=f===void 0?0:f,p=Fi(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]);O4(e,p,r,n),e.attrs=e.style,e.style={};var h=e.attrs,m=e.style,_=e.dimensions;h.transform&&(_&&(m.transform=h.transform),delete h.transform),_&&(a!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=K2e(_,a!==void 0?a:.5,s!==void 0?s:.5)),o!==void 0&&(h.x=o),i!==void 0&&(h.y=i),l!==void 0&&Z2e(h,l,u,d,!1)}var Oz=function(){return Ve(Ve({},k4()),{attrs:{}})};function J2e(e,t){var r=k.useMemo(function(){var o=Oz();return A4(o,t,{enableHardwareAcceleration:!1},e.transformTemplate),Ve(Ve({},o.attrs),{style:Ve({},o.style)})},[t]);if(e.style){var n={};Cz(n,e.style,e),r.style=Ve(Ve({},n),r.style)}return r}function Q2e(e){e===void 0&&(e=!1);var t=function(r,n,o,i,a,s){var l=a.latestValues,c=C4(r)?J2e:V2e,u=c(n,l,s),f=G2e(n,typeof r=="string",e),d=Ve(Ve(Ve({},f),u),{ref:i});return o&&(d["data-projection-id"]=o),k.createElement(r,d)};return t}var ewe=/([a-z])([A-Z])/g,twe="$1-$2",kz=function(e){return e.replace(ewe,twe).toLowerCase()};function Az(e,t,r,n){var o=t.style,i=t.vars;Object.assign(e.style,o,n&&n.getProjectionStyles(r));for(var a in i)e.style.setProperty(a,i[a])}var Iz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function $z(e,t,r,n){Az(e,t,void 0,n);for(var o in t.attrs)e.setAttribute(Iz.has(o)?o:kz(o),t.attrs[o])}function I4(e){var t=e.style,r={};for(var n in t)(Ca(t[n])||vz(n,e))&&(r[n]=t[n]);return r}function Tz(e){var t=I4(e);for(var r in e)if(Ca(e[r])){var n=r==="x"||r==="y"?"attr"+r.toUpperCase():r;t[n]=e[r]}return t}function $4(e){return typeof e=="object"&&typeof e.start=="function"}var Mp=function(e){return Array.isArray(e)},rwe=function(e){return!!(e&&typeof e=="object"&&e.mix&&e.toValue)},Dz=function(e){return Mp(e)?e[e.length-1]||0:e};function j1(e){var t=Ca(e)?e.get():e;return rwe(t)?t.toValue():t}function mk(e,t,r,n){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:nwe(t,r,n,o),renderState:i()};return a&&(s.mount=function(l){return a(t,l,s)}),s}var Mz=function(e){return function(t,r){var n=k.useContext(eb),o=k.useContext(E0);return r?mk(e,t,n,o):S0(function(){return mk(e,t,n,o)})}};function nwe(e,t,r,n){var o={},i=(r==null?void 0:r.initial)===!1,a=n(e);for(var s in a)o[s]=j1(a[s]);var l=e.initial,c=e.animate,u=rb(e),f=dz(e);t&&f&&!u&&e.inherit!==!1&&(l??(l=t.initial),c??(c=t.animate));var d=i||l===!1,p=d?c:l;if(p&&typeof p!="boolean"&&!$4(p)){var h=Array.isArray(p)?p:[p];h.forEach(function(m){var _=fz(e,m);if(_){var w=_.transitionEnd;_.transition;var g=Fi(_,["transitionEnd","transition"]);for(var E in g){var A=g[E];if(Array.isArray(A)){var N=d?A.length-1:0;A=A[N]}A!==null&&(o[E]=A)}for(var E in w)o[E]=w[E]}})}return o}var owe={useVisualState:Mz({scrapeMotionValuesFromProps:Tz,createRenderState:Oz,onMount:function(e,t,r){var n=r.renderState,o=r.latestValues;try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}A4(n,o,{enableHardwareAcceleration:!1},e.transformTemplate),$z(t,n)}})},iwe={useVisualState:Mz({scrapeMotionValuesFromProps:I4,createRenderState:k4})};function awe(e,t,r,n,o){var i=t.forwardMotionProps,a=i===void 0?!1:i,s=C4(e)?owe:iwe;return Ve(Ve({},s),{preloadedFeatures:r,useRender:Q2e(a),createVisualElement:n,projectionNodeConstructor:o,Component:e})}var Lt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Lt||(Lt={}));function nb(e,t,r,n){return n===void 0&&(n={passive:!0}),e.addEventListener(t,r,n),function(){return e.removeEventListener(t,r)}}function lx(e,t,r,n){k.useEffect(function(){var o=e.current;if(r&&o)return nb(o,t,r,n)},[e,t,r,n])}function swe(e){var t=e.whileFocus,r=e.visualElement,n=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(Lt.Focus,!0)},o=function(){var i;(i=r.animationState)===null||i===void 0||i.setActive(Lt.Focus,!1)};lx(r,"focus",t?n:void 0),lx(r,"blur",t?o:void 0)}function Rz(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function Nz(e){var t=!!e.touches;return t}function lwe(e){return function(t){var r=t instanceof MouseEvent,n=!r||r&&t.button===0;n&&e(t)}}var cwe={pageX:0,pageY:0};function uwe(e,t){t===void 0&&(t="page");var r=e.touches[0]||e.changedTouches[0],n=r||cwe;return{x:n[t+"X"],y:n[t+"Y"]}}function fwe(e,t){return t===void 0&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function T4(e,t){return t===void 0&&(t="page"),{point:Nz(e)?uwe(e,t):fwe(e,t)}}var Fz=function(e,t){t===void 0&&(t=!1);var r=function(n){return e(n,T4(n))};return t?lwe(r):r},dwe=function(){return cf&&window.onpointerdown===null},pwe=function(){return cf&&window.ontouchstart===null},hwe=function(){return cf&&window.onmousedown===null},vwe={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},gwe={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Bz(e){return dwe()?e:pwe()?gwe[e]:hwe()?vwe[e]:e}function hu(e,t,r,n){return nb(e,Bz(t),Fz(r,t==="pointerdown"),n)}function xm(e,t,r,n){return lx(e,Bz(t),r&&Fz(r,t==="pointerdown"),n)}function jz(e){var t=null;return function(){var r=function(){t=null};return t===null?(t=e,r):!1}}var yk=jz("dragHorizontal"),bk=jz("dragVertical");function Lz(e){var t=!1;if(e==="y")t=bk();else if(e==="x")t=yk();else{var r=yk(),n=bk();r&&n?t=function(){r(),n()}:(r&&r(),n&&n())}return t}function Uz(){var e=Lz(!0);return e?(e(),!1):!0}function wk(e,t,r){return function(n,o){var i;!Rz(n)||Uz()||((i=e.animationState)===null||i===void 0||i.setActive(Lt.Hover,t),r==null||r(n,o))}}function mwe(e){var t=e.onHoverStart,r=e.onHoverEnd,n=e.whileHover,o=e.visualElement;xm(o,"pointerenter",t||n?wk(o,!0,t):void 0,{passive:!t}),xm(o,"pointerleave",r||n?wk(o,!1,r):void 0,{passive:!r})}var zz=function(e,t){return t?e===t?!0:zz(e,t.parentElement):!1};function D4(e){return k.useEffect(function(){return function(){return e()}},[])}function Hz(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);oMath.min(Math.max(r,e),t),vw=.001,ywe=.01,xk=10,bwe=.05,wwe=1;function xwe({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let o,i;t2e(e<=xk*1e3);let a=1-t;a=_m(bwe,wwe,a),e=_m(ywe,xk,e/1e3),a<1?(o=c=>{const u=c*a,f=u*e,d=u-r,p=cx(c,a),h=Math.exp(-f);return vw-d/p*h},i=c=>{const f=c*a*e,d=f*r+r,p=Math.pow(a,2)*Math.pow(c,2)*e,h=Math.exp(-f),m=cx(Math.pow(c,2),a);return(-o(c)+vw>0?-1:1)*((d-p)*h)/m}):(o=c=>{const u=Math.exp(-c*e),f=(c-r)*e+1;return-vw+u*f},i=c=>{const u=Math.exp(-c*e),f=(r-c)*(e*e);return u*f});const s=5/e,l=Ewe(o,i,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:a*2*Math.sqrt(n*c),duration:e}}}const _we=12;function Ewe(e,t,r){let n=r;for(let o=1;o<_we;o++)n=n-e(n)/t(n);return n}function cx(e,t){return e*Math.sqrt(1-t*t)}const Swe=["duration","bounce"],Cwe=["stiffness","damping","mass"];function _k(e,t){return t.some(r=>e[r]!==void 0)}function Pwe(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!_k(e,Cwe)&&_k(e,Swe)){const r=xwe(e);t=Object.assign(Object.assign(Object.assign({},t),r),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function M4(e){var{from:t=0,to:r=1,restSpeed:n=2,restDelta:o}=e,i=Hz(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:d}=Pwe(i),p=Ek,h=Ek;function m(){const _=u?-(u/1e3):0,w=r-t,g=l/(2*Math.sqrt(s*c)),E=Math.sqrt(s/c)/1e3;if(o===void 0&&(o=Math.min(Math.abs(r-t)/100,.4)),g<1){const A=cx(E,g);p=N=>{const D=Math.exp(-g*E*N);return r-D*((_+g*E*w)/A*Math.sin(A*N)+w*Math.cos(A*N))},h=N=>{const D=Math.exp(-g*E*N);return g*E*D*(Math.sin(A*N)*(_+g*E*w)/A+w*Math.cos(A*N))-D*(Math.cos(A*N)*(_+g*E*w)-A*w*Math.sin(A*N))}}else if(g===1)p=A=>r-Math.exp(-E*A)*(w+(_+E*w)*A);else{const A=E*Math.sqrt(g*g-1);p=N=>{const D=Math.exp(-g*E*N),y=Math.min(A*N,300);return r-D*((_+g*E*w)*Math.sinh(y)+A*w*Math.cosh(y))/A}}}return m(),{next:_=>{const w=p(_);if(d)a.done=_>=f;else{const g=h(_)*1e3,E=Math.abs(g)<=n,A=Math.abs(r-w)<=o;a.done=E&&A}return a.value=a.done?r:w,a},flipTarget:()=>{u=-u,[t,r]=[r,t],m()}}}M4.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Ek=e=>0,Rp=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},or=(e,t,r)=>-r*e+r*t+e;function gw(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Sk({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,a=0;if(!t)o=i=a=r;else{const s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=gw(l,s,e+1/3),i=gw(l,s,e),a=gw(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}const Owe=(e,t,r)=>{const n=e*e,o=t*t;return Math.sqrt(Math.max(0,r*(o-n)+n))},kwe=[ax,ps,Il],Ck=e=>kwe.find(t=>t.test(e)),Vz=(e,t)=>{let r=Ck(e),n=Ck(t),o=r.parse(e),i=n.parse(t);r===Il&&(o=Sk(o),r=ps),n===Il&&(i=Sk(i),n=ps);const a=Object.assign({},o);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Owe(o[l],i[l],s));return a.alpha=or(o.alpha,i.alpha,s),r.transform(a)}},ux=e=>typeof e=="number",Awe=(e,t)=>r=>t(e(r)),ob=(...e)=>e.reduce(Awe);function Wz(e,t){return ux(e)?r=>or(e,t,r):vn.test(e)?Vz(e,t):Gz(e,t)}const qz=(e,t)=>{const r=[...e],n=r.length,o=e.map((i,a)=>Wz(i,t[a]));return i=>{for(let a=0;a{const r=Object.assign(Object.assign({},e),t),n={};for(const o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=Wz(e[o],t[o]));return o=>{for(const i in n)r[i]=n[i](o);return r}};function Pk(e){const t=Pa.parse(e),r=t.length;let n=0,o=0,i=0;for(let a=0;a{const r=Pa.createTransformer(t),n=Pk(e),o=Pk(t);return n.numHSL===o.numHSL&&n.numRGB===o.numRGB&&n.numNumbers>=o.numNumbers?ob(qz(n.parsed,o.parsed),r):a=>`${a>0?t:e}`},$we=(e,t)=>r=>or(e,t,r);function Twe(e){if(typeof e=="number")return $we;if(typeof e=="string")return vn.test(e)?Vz:Gz;if(Array.isArray(e))return qz;if(typeof e=="object")return Iwe}function Dwe(e,t,r){const n=[],o=r||Twe(e[0]),i=e.length-1;for(let a=0;ar(Rp(e,t,n))}function Rwe(e,t){const r=e.length,n=r-1;return o=>{let i=0,a=!1;if(o<=e[0]?a=!0:o>=e[n]&&(i=n-1,a=!0),!a){let l=1;for(;lo||l===n);l++);i=l-1}const s=Rp(e[i],e[i+1],o);return t[i](s)}}function Kz(e,t,{clamp:r=!0,ease:n,mixer:o}={}){const i=e.length;mm(i===t.length),mm(!n||!Array.isArray(n)||n.length===i-1),e[0]>e[i-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Dwe(t,n,o),s=i===2?Mwe(e,a):Rwe(e,a);return r?l=>s(_m(e[0],e[i-1],l)):s}const ib=e=>t=>1-e(1-t),R4=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Nwe=e=>t=>Math.pow(t,e),Yz=e=>t=>t*t*((e+1)*t-e),Fwe=e=>{const t=Yz(e);return r=>(r*=2)<1?.5*t(r):.5*(2-Math.pow(2,-10*(r-1)))},Xz=1.525,Bwe=4/11,jwe=8/11,Lwe=9/10,N4=e=>e,F4=Nwe(2),Uwe=ib(F4),Zz=R4(F4),Jz=e=>1-Math.sin(Math.acos(e)),B4=ib(Jz),zwe=R4(B4),j4=Yz(Xz),Hwe=ib(j4),Vwe=R4(j4),Wwe=Fwe(Xz),qwe=4356/361,Gwe=35442/1805,Kwe=16061/1805,Em=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-Em(1-e*2)):.5*Em(e*2-1)+.5;function Zwe(e,t){return e.map(()=>t||Zz).splice(0,e.length-1)}function Jwe(e){const t=e.length;return e.map((r,n)=>n!==0?n/(t-1):0)}function Qwe(e,t){return e.map(r=>r*t)}function L1({from:e=0,to:t=1,ease:r,offset:n,duration:o=300}){const i={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=Qwe(n&&n.length===a.length?n:Jwe(a),o);function l(){return Kz(s,a,{ease:Array.isArray(r)?r:Zwe(a,r)})}let c=l();return{next:u=>(i.value=c(u),i.done=u>=o,i),flipTarget:()=>{a.reverse(),c=l()}}}function e5e({velocity:e=0,from:t=0,power:r=.8,timeConstant:n=350,restDelta:o=.5,modifyTarget:i}){const a={done:!1,value:t};let s=r*e;const l=t+s,c=i===void 0?l:i(l);return c!==l&&(s=c-t),{next:u=>{const f=-s*Math.exp(-u/n);return a.done=!(f>o||f<-o),a.value=a.done?c:c+f,a},flipTarget:()=>{}}}const Ok={keyframes:L1,spring:M4,decay:e5e};function t5e(e){if(Array.isArray(e.to))return L1;if(Ok[e.type])return Ok[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?L1:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?M4:L1}const Qz=1/60*1e3,r5e=typeof performance<"u"?()=>performance.now():()=>Date.now(),eH=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(r5e()),Qz);function n5e(e){let t=[],r=[],n=0,o=!1,i=!1;const a=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const f=u&&o,d=f?t:r;return c&&a.add(l),d.indexOf(l)===-1&&(d.push(l),f&&o&&(n=t.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),a.delete(l)},process:l=>{if(o){i=!0;return}if(o=!0,[t,r]=[r,t],r.length=0,n=t.length,n)for(let c=0;c(e[t]=n5e(()=>Np=!0),e),{}),Ko=k0.reduce((e,t)=>{const r=ab[t];return e[t]=(n,o=!1,i=!1)=>(Np||a5e(),r.schedule(n,o,i)),e},{}),Du=k0.reduce((e,t)=>(e[t]=ab[t].cancel,e),{}),mw=k0.reduce((e,t)=>(e[t]=()=>ab[t].process(vu),e),{}),i5e=e=>ab[e].process(vu),tH=e=>{Np=!1,vu.delta=fx?Qz:Math.max(Math.min(e-vu.timestamp,o5e),1),vu.timestamp=e,dx=!0,k0.forEach(i5e),dx=!1,Np&&(fx=!1,eH(tH))},a5e=()=>{Np=!0,fx=!0,dx||eH(tH)},Sm=()=>vu;function rH(e,t,r=0){return e-t-r}function s5e(e,t,r=0,n=!0){return n?rH(t+-e,t,r):t-(e-t)+r}function l5e(e,t,r,n){return n?e>=t+r:e<=-r}const c5e=e=>{const t=({delta:r})=>e(r);return{start:()=>Ko.update(t,!0),stop:()=>Du.update(t)}};function nH(e){var t,r,{from:n,autoplay:o=!0,driver:i=c5e,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:d,onRepeat:p,onUpdate:h}=e,m=Hz(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:_}=m,w,g=0,E=m.duration,A,N=!1,D=!0,y;const U=t5e(m);!((r=(t=U).needsInterpolation)===null||r===void 0)&&r.call(t,n,_)&&(y=Kz([0,100],[n,_],{clamp:!1}),n=0,_=100);const L=U(Object.assign(Object.assign({},m),{from:n,to:_}));function G(){g++,l==="reverse"?(D=g%2===0,a=s5e(a,E,c,D)):(a=rH(a,E,c),l==="mirror"&&L.flipTarget()),N=!1,p&&p()}function V(){w.stop(),d&&d()}function S(v){if(D||(v=-v),a+=v,!N){const b=L.next(Math.max(0,a));A=b.value,y&&(A=y(A)),N=D?b.done:a<=0}h==null||h(A),N&&(g===0&&(E??(E=a)),g{f==null||f(),w.stop()}}}function oH(e,t){return t?e*(1e3/t):0}function u5e({from:e=0,velocity:t=0,min:r,max:n,power:o=.8,timeConstant:i=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:d,onStop:p}){let h;function m(E){return r!==void 0&&En}function _(E){return r===void 0?n:n===void 0||Math.abs(r-E){var N;f==null||f(A),(N=E.onUpdate)===null||N===void 0||N.call(E,A)},onComplete:d,onStop:p}))}function g(E){w(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},E))}if(m(e))g({from:e,velocity:t,to:_(e)});else{let E=o*t+e;typeof c<"u"&&(E=c(E));const A=_(E),N=A===r?-1:1;let D,y;const U=L=>{D=y,y=L,t=oH(L-D,Sm().delta),(N===1&&L>A||N===-1&&Lh==null?void 0:h.stop()}}const px=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),kk=e=>px(e)&&e.hasOwnProperty("z"),Yh=(e,t)=>Math.abs(e-t);function iH(e,t){if(ux(e)&&ux(t))return Yh(e,t);if(px(e)&&px(t)){const r=Yh(e.x,t.x),n=Yh(e.y,t.y),o=kk(e)&&kk(t)?Yh(e.z,t.z):0;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2)+Math.pow(o,2))}}const aH=(e,t)=>1-3*t+3*e,sH=(e,t)=>3*t-6*e,lH=e=>3*e,Cm=(e,t,r)=>((aH(t,r)*e+sH(t,r))*e+lH(t))*e,cH=(e,t,r)=>3*aH(t,r)*e*e+2*sH(t,r)*e+lH(t),f5e=1e-7,d5e=10;function p5e(e,t,r,n,o){let i,a,s=0;do a=t+(r-t)/2,i=Cm(a,n,o)-e,i>0?r=a:t=a;while(Math.abs(i)>f5e&&++s=v5e?g5e(a,f,e,r):d===0?f:p5e(a,s,s+Xh,e,r)}return a=>a===0||a===1?a:Cm(i(a),t,n)}function y5e(e){var t=e.onTap,r=e.onTapStart,n=e.onTapCancel,o=e.whileTap,i=e.visualElement,a=t||r||n||o,s=k.useRef(!1),l=k.useRef(null),c={passive:!(r||t||n||h)};function u(){var m;(m=l.current)===null||m===void 0||m.call(l),l.current=null}function f(){var m;return u(),s.current=!1,(m=i.animationState)===null||m===void 0||m.setActive(Lt.Tap,!1),!Uz()}function d(m,_){f()&&(zz(i.getInstance(),m.target)?t==null||t(m,_):n==null||n(m,_))}function p(m,_){f()&&(n==null||n(m,_))}function h(m,_){var w;u(),!s.current&&(s.current=!0,l.current=ob(hu(window,"pointerup",d,c),hu(window,"pointercancel",p,c)),(w=i.animationState)===null||w===void 0||w.setActive(Lt.Tap,!0),r==null||r(m,_))}xm(i,"pointerdown",a?h:void 0,c),D4(u)}var Ak=new Set;function b5e(e,t,r){e||Ak.has(t)||(console.warn(t),r&&console.warn(r),Ak.add(t))}var hx=new WeakMap,yw=new WeakMap,w5e=function(e){var t;(t=hx.get(e.target))===null||t===void 0||t(e)},x5e=function(e){e.forEach(w5e)};function _5e(e){var t=e.root,r=Fi(e,["root"]),n=t||document;yw.has(n)||yw.set(n,{});var o=yw.get(n),i=JSON.stringify(r);return o[i]||(o[i]=new IntersectionObserver(x5e,Ve({root:t},r))),o[i]}function E5e(e,t,r){var n=_5e(t);return hx.set(e,r),n.observe(e),function(){hx.delete(e),n.unobserve(e)}}function S5e(e){var t=e.visualElement,r=e.whileInView,n=e.onViewportEnter,o=e.onViewportLeave,i=e.viewport,a=i===void 0?{}:i,s=k.useRef({hasEnteredView:!1,isInView:!1}),l=!!(r||n||o);a.once&&s.current.hasEnteredView&&(l=!1);var c=typeof IntersectionObserver>"u"?O5e:P5e;c(l,s.current,t,a)}var C5e={some:0,all:1};function P5e(e,t,r,n){var o=n.root,i=n.margin,a=n.amount,s=a===void 0?"some":a,l=n.once;k.useEffect(function(){if(e){var c={root:o==null?void 0:o.current,rootMargin:i,threshold:typeof s=="number"?s:C5e[s]},u=function(f){var d,p=f.isIntersecting;if(t.isInView!==p&&(t.isInView=p,!(l&&!p&&t.hasEnteredView))){p&&(t.hasEnteredView=!0),(d=r.animationState)===null||d===void 0||d.setActive(Lt.InView,p);var h=r.getProps(),m=p?h.onViewportEnter:h.onViewportLeave;m==null||m(f)}};return E5e(r.getInstance(),c,u)}},[e,o,i,s])}function O5e(e,t,r,n){var o=n.fallback,i=o===void 0?!0:o;k.useEffect(function(){!e||!i||(_4!=="production"&&b5e(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(function(){var a;t.hasEnteredView=!0;var s=r.getProps().onViewportEnter;s==null||s(null),(a=r.animationState)===null||a===void 0||a.setActive(Lt.InView,!0)}))},[e])}var hs=function(e){return function(t){return e(t),null}},k5e={inView:hs(S5e),tap:hs(y5e),focus:hs(swe),hover:hs(mwe)},A5e=0,I5e=function(){return A5e++},uH=function(){return S0(I5e)};function fH(){var e=k.useContext(E0);if(e===null)return[!0,null];var t=e.isPresent,r=e.onExitComplete,n=e.register,o=uH();k.useEffect(function(){return n(o)},[]);var i=function(){return r==null?void 0:r(o)};return!t&&r?[!1,i]:[!0]}function dH(e,t){if(!Array.isArray(t))return!1;var r=t.length;if(r!==e.length)return!1;for(var n=0;n-1&&e.splice(r,1)}var zd=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(t){var r=this;return V4(this.subscriptions,t),function(){return W4(r.subscriptions,t)}},e.prototype.notify=function(t,r,n){var o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(var i=0;ig&&V,B=Array.isArray(G)?G:[G],T=B.reduce(i,{});S===!1&&(T={});var j=L.prevResolvedValues,H=j===void 0?{}:j,P=Ve(Ve({},H),T),F=function(te){b=!0,_.delete(te),L.needsAnimating[te]=!0};for(var $ in P){var q=T[$],J=H[$];w.hasOwnProperty($)||(q!==J?Mp(q)&&Mp(J)?!dH(q,J)||v?F($):L.protectedKeys[$]=!0:q!==void 0?F($):_.add($):q!==void 0&&_.has($)?F($):L.protectedKeys[$]=!0)}L.prevProp=G,L.prevResolvedValues=T,L.isActive&&(w=Ve(Ve({},w),T)),o&&e.blockInitialAnimation&&(b=!1),b&&!C&&m.push.apply(m,Go([],ar(B.map(function(te){return{animation:te,options:Ve({type:U},u)}})),!1))},A=0;A=3;if(!(!p&&!h)){var m=d.point,_=Sm().timestamp;o.history.push(Ve(Ve({},m),{timestamp:_}));var w=o.handlers,g=w.onStart,E=w.onMove;p||(g&&g(o.lastMoveEvent,d),o.startEvent=o.lastMoveEvent),E&&E(o.lastMoveEvent,d)}}},this.handlePointerMove=function(d,p){if(o.lastMoveEvent=d,o.lastMoveEventInfo=ww(p,o.transformPagePoint),Rz(d)&&d.buttons===0){o.handlePointerUp(d,p);return}Ko.update(o.updatePoint,!0)},this.handlePointerUp=function(d,p){o.end();var h=o.handlers,m=h.onEnd,_=h.onSessionEnd,w=xw(ww(p,o.transformPagePoint),o.history);o.startEvent&&m&&m(d,w),_&&_(d,w)},!(Nz(t)&&t.touches.length>1)){this.handlers=r,this.transformPagePoint=a;var s=T4(t),l=ww(s,this.transformPagePoint),c=l.point,u=Sm().timestamp;this.history=[Ve(Ve({},c),{timestamp:u})];var f=r.onSessionStart;f&&f(t,xw(l,this.history)),this.removeListeners=ob(hu(window,"pointermove",this.handlePointerMove),hu(window,"pointerup",this.handlePointerUp),hu(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(t){this.handlers=t},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Du.update(this.updatePoint)},e}();function ww(e,t){return t?{point:t(e.point)}:e}function Rk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xw(e,t){var r=e.point;return{point:r,delta:Rk(r,mH(t)),offset:Rk(r,f3e(t)),velocity:d3e(t,.1)}}function f3e(e){return e[0]}function mH(e){return e[e.length-1]}function d3e(e,t){if(e.length<2)return{x:0,y:0};for(var r=e.length-1,n=null,o=mH(e);r>=0&&(n=e[r],!(o.timestamp-n.timestamp>Pm(t)));)r--;if(!n)return{x:0,y:0};var i=(o.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};var a={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Oa(e){return e.max-e.min}function Nk(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=.01),iH(e,t)o&&(e=r?or(o,e,r.max):Math.min(e,o)),e}function Lk(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function v3e(e,t){var r=t.top,n=t.left,o=t.bottom,i=t.right;return{x:Lk(e.x,n,i),y:Lk(e.y,r,o)}}function Uk(e,t){var r,n=t.min-e.min,o=t.max-e.max;return t.max-t.minn?r=Rp(t.min,t.max-n,e.min):n>o&&(r=Rp(e.min,e.max-o,t.min)),_m(0,1,r)}function y3e(e,t){var r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var gx=.35;function b3e(e){return e===void 0&&(e=gx),e===!1?e=0:e===!0&&(e=gx),{x:zk(e,"left","right"),y:zk(e,"top","bottom")}}function zk(e,t,r){return{min:Hk(e,t),max:Hk(e,r)}}function Hk(e,t){var r;return typeof e=="number"?e:(r=e[t])!==null&&r!==void 0?r:0}var Vk=function(){return{translate:0,scale:1,origin:0,originPoint:0}},Wd=function(){return{x:Vk(),y:Vk()}},Wk=function(){return{min:0,max:0}},en=function(){return{x:Wk(),y:Wk()}};function hi(e){return[e("x"),e("y")]}function yH(e){var t=e.top,r=e.left,n=e.right,o=e.bottom;return{x:{min:r,max:n},y:{min:t,max:o}}}function w3e(e){var t=e.x,r=e.y;return{top:r.min,right:t.max,bottom:r.max,left:t.min}}function x3e(e,t){if(!t)return e;var r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function _w(e){return e===void 0||e===1}function bH(e){var t=e.scale,r=e.scaleX,n=e.scaleY;return!_w(t)||!_w(r)||!_w(n)}function Qa(e){return bH(e)||qk(e.x)||qk(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function qk(e){return e&&e!=="0%"}function Om(e,t,r){var n=e-r,o=t*n;return r+o}function Gk(e,t,r,n,o){return o!==void 0&&(e=Om(e,o,n)),Om(e,r,n)+t}function mx(e,t,r,n,o){t===void 0&&(t=0),r===void 0&&(r=1),e.min=Gk(e.min,t,r,n,o),e.max=Gk(e.max,t,r,n,o)}function wH(e,t){var r=t.x,n=t.y;mx(e.x,r.translate,r.scale,r.originPoint),mx(e.y,n.translate,n.scale,n.originPoint)}function _3e(e,t,r,n){var o,i;n===void 0&&(n=!1);var a=r.length;if(a){t.x=t.y=1;for(var s,l,c=0;ct?r="y":Math.abs(e.x)>t&&(r="x"),r}function A3e(e){var t=e.dragControls,r=e.visualElement,n=S0(function(){return new O3e(r)});k.useEffect(function(){return t&&t.subscribe(n)},[n,t]),k.useEffect(function(){return n.addListeners()},[n])}function I3e(e){var t=e.onPan,r=e.onPanStart,n=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,a=t||r||n||o,s=k.useRef(null),l=k.useContext(E4).transformPagePoint,c={onSessionStart:o,onStart:r,onMove:t,onEnd:function(f,d){s.current=null,n&&n(f,d)}};k.useEffect(function(){s.current!==null&&s.current.updateHandlers(c)});function u(f){s.current=new gH(f,c,{transformPagePoint:l})}xm(i,"pointerdown",a&&u),D4(function(){return s.current&&s.current.end()})}var $3e={pan:hs(I3e),drag:hs(A3e)},Qh=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function T3e(){var e=Qh.map(function(){return new zd}),t={},r={clearAllListeners:function(){return e.forEach(function(n){return n.clear()})},updatePropListeners:function(n){Qh.forEach(function(o){var i,a="on"+o,s=n[a];(i=t[o])===null||i===void 0||i.call(t),s&&(t[o]=r[a](s))})}};return e.forEach(function(n,o){r["on"+Qh[o]]=function(i){return n.add(i)},r["notify"+Qh[o]]=function(){for(var i=[],a=0;a=0?window.pageYOffset:null,c=z3e(t,e,s);return i.length&&i.forEach(function(u){var f=ar(u,2),d=f[0],p=f[1];e.getValue(d).set(p)}),e.syncRender(),l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:t,transitionEnd:n}};function V3e(e,t,r,n){return B3e(t)?H3e(e,t,r,n):{target:t,transitionEnd:n}}var W3e=function(e,t,r,n){var o=N3e(e,t,n);return t=o.target,n=o.transitionEnd,V3e(e,t,r,n)};function q3e(e){return window.getComputedStyle(e)}var OH={treeType:"dom",readValueFromInstance:function(e,t){if(C0(t)){var r=L4(t);return r&&r.default||0}else{var n=q3e(e);return(gz(t)?n.getPropertyValue(t):n[t])||0}},sortNodePosition:function(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget:function(e,t){var r;return(r=e.style)===null||r===void 0?void 0:r[t]},measureViewportBox:function(e,t){var r=t.transformPagePoint;return xH(e,r)},resetTransform:function(e,t,r){var n=r.transformTemplate;t.style.transform=n?n({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var r=t.vars,n=t.style;delete r[e],delete n[e]},makeTargetAnimatable:function(e,t,r,n){var o=r.transformValues;n===void 0&&(n=!0);var i=t.transition,a=t.transitionEnd,s=Fi(t,["transition","transitionEnd"]),l=Q5e(s,i||{},e);if(o&&(a&&(a=o(a)),s&&(s=o(s)),l&&(l=o(l))),n){Z5e(e,s,l);var c=W3e(e,s,l,a);a=c.transitionEnd,s=c.target}return Ve({transition:i,transitionEnd:a},s)},scrapeMotionValuesFromProps:I4,build:function(e,t,r,n,o){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),O4(t,r,n,o.transformTemplate)},render:Az},G3e=_H(OH),K3e=_H(Ve(Ve({},OH),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var r;return C0(t)?((r=L4(t))===null||r===void 0?void 0:r.default)||0:(t=Iz.has(t)?t:kz(t),e.getAttribute(t))},scrapeMotionValuesFromProps:Tz,build:function(e,t,r,n,o){A4(t,r,n,o.transformTemplate)},render:$z})),Y3e=function(e,t){return C4(e)?K3e(t,{enableHardwareAcceleration:!1}):G3e(t,{enableHardwareAcceleration:!0})};function eA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ed={correct:function(e,t){if(!t.target)return e;if(typeof e=="string")if(dt.test(e))e=parseFloat(e);else return e;var r=eA(e,t.target.x),n=eA(e,t.target.y);return"".concat(r,"% ").concat(n,"%")}},tA="_$css",X3e={correct:function(e,t){var r=t.treeScale,n=t.projectionDelta,o=e,i=e.includes("var("),a=[];i&&(e=e.replace(SH,function(m){return a.push(m),tA}));var s=Pa.parse(e);if(s.length>5)return o;var l=Pa.createTransformer(e),c=typeof s[0]!="number"?1:0,u=n.x.scale*r.x,f=n.y.scale*r.y;s[0+c]/=u,s[1+c]/=f;var d=or(u,f,.5);typeof s[2+c]=="number"&&(s[2+c]/=d),typeof s[3+c]=="number"&&(s[3+c]/=d);var p=l(s);if(i){var h=0;p=p.replace(tA,function(){var m=a[h];return h++,m})}return p}},Z3e=function(e){az(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.componentDidMount=function(){var r=this,n=this.props,o=n.visualElement,i=n.layoutGroup,a=n.switchLayoutGroup,s=n.layoutId,l=o.projection;_2e(Q3e),l&&(i!=null&&i.group&&i.group.add(l),a!=null&&a.register&&s&&a.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",function(){r.safeToRemove()}),l.setOptions(Ve(Ve({},l.options),{onExitComplete:function(){return r.safeToRemove()}}))),jd.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(r){var n=this,o=this.props,i=o.layoutDependency,a=o.visualElement,s=o.drag,l=o.isPresent,c=a.projection;return c&&(c.isPresent=l,s||r.layoutDependency!==i||i===void 0?c.willUpdate():this.safeToRemove(),r.isPresent!==l&&(l?c.promote():c.relegate()||Ko.postRender(function(){var u;!((u=c.getStack())===null||u===void 0)&&u.members.length||n.safeToRemove()}))),null},t.prototype.componentDidUpdate=function(){var r=this.props.visualElement.projection;r&&(r.root.didUpdate(),!r.currentAnimation&&r.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var r=this.props,n=r.visualElement,o=r.layoutGroup,i=r.switchLayoutGroup,a=n.projection;a&&(a.scheduleCheckAfterUnmount(),o!=null&&o.group&&o.group.remove(a),i!=null&&i.deregister&&i.deregister(a))},t.prototype.safeToRemove=function(){var r=this.props.safeToRemove;r==null||r()},t.prototype.render=function(){return null},t}(ne.Component);function J3e(e){var t=ar(fH(),2),r=t[0],n=t[1],o=k.useContext(S4);return ne.createElement(Z3e,Ve({},e,{layoutGroup:o,switchLayoutGroup:k.useContext(pz),isPresent:r,safeToRemove:n}))}var Q3e={borderRadius:Ve(Ve({},ed),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ed,borderTopRightRadius:ed,borderBottomLeftRadius:ed,borderBottomRightRadius:ed,boxShadow:X3e},exe={measureLayout:J3e};function txe(e,t,r){r===void 0&&(r={});var n=Ca(e)?e:Mu(e);return H4("",n,t,r),{stop:function(){return n.stop()},isAnimating:function(){return n.isAnimating()}}}var kH=["TopLeft","TopRight","BottomLeft","BottomRight"],rxe=kH.length,rA=function(e){return typeof e=="string"?parseFloat(e):e},nA=function(e){return typeof e=="number"||dt.test(e)};function nxe(e,t,r,n,o,i){var a,s,l,c;o?(e.opacity=or(0,(a=r.opacity)!==null&&a!==void 0?a:1,oxe(n)),e.opacityExit=or((s=t.opacity)!==null&&s!==void 0?s:1,0,ixe(n))):i&&(e.opacity=or((l=t.opacity)!==null&&l!==void 0?l:1,(c=r.opacity)!==null&&c!==void 0?c:1,n));for(var u=0;ut?1:r(Rp(e,t,n))}}function iA(e,t){e.min=t.min,e.max=t.max}function $o(e,t){iA(e.x,t.x),iA(e.y,t.y)}function aA(e,t,r,n,o){return e-=t,e=Om(e,1/r,n),o!==void 0&&(e=Om(e,1/o,n)),e}function axe(e,t,r,n,o,i,a){if(t===void 0&&(t=0),r===void 0&&(r=1),n===void 0&&(n=.5),i===void 0&&(i=e),a===void 0&&(a=e),ki.test(t)){t=parseFloat(t);var s=or(a.min,a.max,t/100);t=s-a.min}if(typeof t=="number"){var l=or(i.min,i.max,n);e===i&&(l-=t),e.min=aA(e.min,t,r,l,o),e.max=aA(e.max,t,r,l,o)}}function sA(e,t,r,n,o){var i=ar(r,3),a=i[0],s=i[1],l=i[2];axe(e,t[a],t[s],t[l],t.scale,n,o)}var sxe=["x","scaleX","originX"],lxe=["y","scaleY","originY"];function lA(e,t,r,n){sA(e.x,t,sxe,r==null?void 0:r.x,n==null?void 0:n.x),sA(e.y,t,lxe,r==null?void 0:r.y,n==null?void 0:n.y)}function cA(e){return e.translate===0&&e.scale===1}function IH(e){return cA(e.x)&&cA(e.y)}function $H(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var cxe=function(){function e(){this.members=[]}return e.prototype.add=function(t){V4(this.members,t),t.scheduleRender()},e.prototype.remove=function(t){if(W4(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){var r=this.members[this.members.length-1];r&&this.promote(r)}},e.prototype.relegate=function(t){var r=this.members.findIndex(function(a){return t===a});if(r===0)return!1;for(var n,o=r;o>=0;o--){var i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1},e.prototype.promote=function(t,r){var n,o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues,t.snapshot.isShared=!0),!((n=t.root)===null||n===void 0)&&n.isUpdating&&(t.isLayoutDirty=!0);var i=t.options.crossfade;i===!1&&o.hide()}},e.prototype.exitAnimationComplete=function(){this.members.forEach(function(t){var r,n,o,i,a;(n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r),(a=(o=t.resumingFrom)===null||o===void 0?void 0:(i=o.options).onExitComplete)===null||a===void 0||a.call(i)})},e.prototype.scheduleRender=function(){this.members.forEach(function(t){t.instance&&t.scheduleRender(!1)})},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),uxe="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function uA(e,t,r){var n=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(n,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),r){var a=r.rotate,s=r.rotateX,l=r.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var c=e.x.scale*t.x,u=e.y.scale*t.y;return i+="scale(".concat(c,", ").concat(u,")"),i===uxe?"none":i}var fxe=function(e,t){return e.depth-t.depth},dxe=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(t){V4(this.children,t),this.isDirty=!0},e.prototype.remove=function(t){W4(this.children,t),this.isDirty=!0},e.prototype.forEach=function(t){this.isDirty&&this.children.sort(fxe),this.isDirty=!1,this.children.forEach(t)},e}(),fA=1e3;function TH(e){var t=e.attachResizeListener,r=e.defaultParent,n=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function a(s,l,c){var u=this;l===void 0&&(l={}),c===void 0&&(c=r==null?void 0:r()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!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=function(){u.isUpdating&&(u.isUpdating=!1,u.clearAllSnapshots())},this.updateProjection=function(){u.nodes.forEach(yxe),u.nodes.forEach(bxe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=s,this.latestValues=l,this.root=c?c.root||c:this,this.path=c?Go(Go([],ar(c.path),!1),[c],!1):[],this.parent=c,this.depth=c?c.depth+1:0,s&&this.root.registerPotentialNode(s,this);for(var f=0;f=0;n--)if(e.path[n].instance){r=e.path[n];break}var o=r&&r!==e.root?r.instance:document,i=o.querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function vA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function gA(e){vA(e.x),vA(e.y)}var Pxe=TH({attachResizeListener:function(e,t){return nb(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Ew={current:void 0},Oxe=TH({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Ew.current){var e=new Pxe(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Ew.current=e}return Ew.current},resetTransform:function(e,t){e.style.transform=t??"none"},checkIsScrollRoot:function(e){return window.getComputedStyle(e).position==="fixed"}}),kxe=Ve(Ve(Ve(Ve({},u3e),k5e),$3e),exe),ut=w2e(function(e,t){return awe(e,t,kxe,Y3e,Oxe)});function DH(){var e=k.useRef(!1);return ym(function(){return e.current=!0,function(){e.current=!1}},[]),e}function Axe(){var e=DH(),t=ar(k.useState(0),2),r=t[0],n=t[1],o=k.useCallback(function(){e.current&&n(r+1)},[r]),i=k.useCallback(function(){return Ko.postRender(o)},[o]);return[i,r]}var Sw=function(e){var t=e.children,r=e.initial,n=e.isPresent,o=e.onExitComplete,i=e.custom,a=e.presenceAffectsLayout,s=S0(Ixe),l=uH(),c=k.useMemo(function(){return{id:l,initial:r,isPresent:n,custom:i,onExitComplete:function(u){var f,d;s.set(u,!0);try{for(var p=Jbe(s.values()),h=p.next();!h.done;h=p.next()){var m=h.value;if(!m)return}}catch(_){f={error:_}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}o==null||o()},register:function(u){return s.set(u,!1),function(){return s.delete(u)}}}},a?void 0:[n]);return k.useMemo(function(){s.forEach(function(u,f){return s.set(f,!1)})},[n]),k.useEffect(function(){!n&&!s.size&&(o==null||o())},[n]),k.createElement(E0.Provider,{value:c},t)};function Ixe(){return new Map}var Dc=function(e){return e.key||""};function $xe(e,t){e.forEach(function(r){var n=Dc(r);t.set(n,r)})}function Txe(e){var t=[];return k.Children.forEach(e,function(r){k.isValidElement(r)&&t.push(r)}),t}var Yo=function(e){var t=e.children,r=e.custom,n=e.initial,o=n===void 0?!0:n,i=e.onExitComplete,a=e.exitBeforeEnter,s=e.presenceAffectsLayout,l=s===void 0?!0:s,c=ar(Axe(),1),u=c[0],f=k.useContext(S4).forceRender;f&&(u=f);var d=DH(),p=Txe(t),h=p,m=new Set,_=k.useRef(h),w=k.useRef(new Map).current,g=k.useRef(!0);if(ym(function(){g.current=!1,$xe(p,w),_.current=h}),D4(function(){g.current=!0,w.clear(),m.clear()}),g.current)return k.createElement(k.Fragment,null,h.map(function(U){return k.createElement(Sw,{key:Dc(U),isPresent:!0,initial:o?void 0:!1,presenceAffectsLayout:l},U)}));h=Go([],ar(h),!1);for(var E=_.current.map(Dc),A=p.map(Dc),N=E.length,D=0;D1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),k.createElement(k.Fragment,null,m.size?h:h.map(function(U){return k.cloneElement(U)}))},mA=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Fxe:typeof navigator<"u"?wA(navigator.userAgent):Hxe()}function Uxe(e){return e!==""&&Lxe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function wA(e){var t=Uxe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new Nxe;var o=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);o?o.lengthK)&&(Q=(Ee=Ee.replace(" ",":")).length),0te&&(te=(q=q.trim()).charCodeAt(0)),te){case 38:return q.replace(w,"$1"+$.trim());case 58:return $.trim()+q.replace(w,"$1"+$.trim());default:if(0<1*J&&0ie.charCodeAt(8))break;case 115:ae=ae.replace(ie,"-webkit-"+ie)+";"+ae;break;case 207:case 102:ae=ae.replace(ie,"-webkit-"+(102J.charCodeAt(0)&&(J=J.trim()),F=J,J=[F],01?t-1:0),n=1;n0?" Args: "+r.join(", "):""))}var Yxe=function(){function e(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var t=e.prototype;return t.indexOfGroup=function(r){for(var n=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,a=i;r>=a;)(a<<=1)<0&&ql(16,""+r);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var s=i;s=this.length||this.groupSizes[r]===0)return n;for(var o=this.groupSizes[r],i=this.indexOfGroup(r),a=i+o,s=i;s=qd&&(qd=t+1),z1.set(e,t),Am.set(t,e)},Jxe="style["+Nu+'][data-styled-version="5.3.11"]',Qxe=new RegExp("^"+Nu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),e6e=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i=0;c--){var u=l[c];if(u&&u.nodeType===1&&u.hasAttribute(Nu))return u}}(r),i=o!==void 0?o.nextSibling:null;n.setAttribute(Nu,"active"),n.setAttribute("data-styled-version","5.3.11");var a=r6e();return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},n6e=function(){function e(r){var n=this.element=MH(r);n.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,a=0,s=i.length;a=0){var o=document.createTextNode(n),i=this.nodes[r];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},t.getRule=function(r){return r0&&(f+=d+",")}),i+=""+c+u+'{content:"'+f+`"}/*!sc*/ -`}}}return i}(this)},e}(),s6e=/(a)(d)/gi,CA=function(e){return String.fromCharCode(e+(e>25?39:97))};function xx(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=CA(t%52)+r;return(CA(t%52)+r).replace(s6e,"$1-$2")}var Qc=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},NH=function(e){return Qc(5381,e)};function l6e(e){for(var t=0;t>>0);if(!r.hasNameForId(o,s)){var l=n(a,"."+s,void 0,o);r.insertRules(o,s,l)}i.push(s),this.staticRulesId=s}else{for(var c=this.rules.length,u=Qc(this.baseHash,n.hash),f="",d=0;d>>0);if(!r.hasNameForId(o,_)){var w=n(f,"."+_,void 0,o);r.insertRules(o,_,w)}i.push(_)}}return i.join(" ")},e}(),f6e=/^\s*\/\/.*$/gm,d6e=[":","[",".","#"];function p6e(e){var t,r,n,o,i=e===void 0?Is:e,a=i.options,s=a===void 0?Is:a,l=i.plugins,c=l===void 0?km:l,u=new Wxe(s),f=[],d=function(m){function _(w){if(w)try{m(w+"}")}catch{}}return function(w,g,E,A,N,D,y,U,L,G){switch(w){case 1:if(L===0&&g.charCodeAt(0)===64)return m(g+";"),"";break;case 2:if(U===0)return g+"/*|*/";break;case 3:switch(U){case 102:case 112:return m(E[0]+g),"";default:return g+(G===0?"/*|*/":"")}case-2:g.split("/*|*/}").forEach(_)}}}(function(m){f.push(m)}),p=function(m,_,w){return _===0&&d6e.indexOf(w[r.length])!==-1||w.match(o)?m:"."+t};function h(m,_,w,g){g===void 0&&(g="&");var E=m.replace(f6e,""),A=_&&w?w+" "+_+" { "+E+" }":E;return t=g,r=_,n=new RegExp("\\"+r+"\\b","g"),o=new RegExp("(\\"+r+"\\b){2,}"),u(w||!_?"":_,A)}return u.use([].concat(c,[function(m,_,w){m===2&&w.length&&w[0].lastIndexOf(r)>0&&(w[0]=w[0].replace(n,p))},d,function(m){if(m===-2){var _=f;return f=[],_}}])),h.hash=c.length?c.reduce(function(m,_){return _.name||ql(15),Qc(m,_.name)},5381).toString():"",h}var FH=ne.createContext();FH.Consumer;var BH=ne.createContext(),h6e=(BH.Consumer,new RH),_x=p6e();function v6e(){return k.useContext(FH)||h6e}function g6e(){return k.useContext(BH)||_x}var jH=function(){function e(t,r){var n=this;this.inject=function(o,i){i===void 0&&(i=_x);var a=n.name+i.hash;o.hasNameForId(n.id,a)||o.insertRules(n.id,a,i(n.rules,a,"@keyframes"))},this.toString=function(){return ql(12,String(n.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=r}return e.prototype.getName=function(t){return t===void 0&&(t=_x),this.name+t.hash},e}(),m6e=/([A-Z])/,y6e=/([A-Z])/g,b6e=/^ms-/,w6e=function(e){return"-"+e.toLowerCase()};function PA(e){return m6e.test(e)?e.replace(y6e,w6e).replace(b6e,"-ms-"):e}var OA=function(e){return e==null||e===!1||e===""};function Fu(e,t,r,n){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a1?t-1:0),n=1;n?@[\\\]^`{|}~-]+/g,E6e=/(^-|-$)/g;function Cw(e){return e.replace(_6e,"-").replace(E6e,"")}var LH=function(e){return xx(NH(e)>>>0)};function t1(e){return typeof e=="string"&&!0}var Ex=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},S6e=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function C6e(e,t,r){var n=e[r];Ex(t)&&Ex(n)?UH(n,t):e[r]=t}function UH(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0||(G[U]=D[U]);return G}(t,["componentId"]),N=E&&E+"-"+(t1(g)?g:Cw(EA(g)));return zH(g,_i({},A,{attrs:d,componentId:N}),r)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(g){this._foldedDefaultProps=n?UH({},e.defaultProps,g):g}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&F3(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var Sx=function(e){return function t(r,n,o){if(o===void 0&&(o=Is),!F_.isValidElementType(n))return ql(1,String(n));var i=function(){return r(n,o,dr.apply(void 0,arguments))};return i.withConfig=function(a){return t(r,n,_i({},o,{},a))},i.attrs=function(a){return t(r,n,_i({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},i}(zH,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Sx[e]=Sx(e)});function eo(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0&&(g.current=setTimeout(N,E));break;case $w:A>=0&&(g.current=setTimeout(N,A));break;case kw:case Iw:g.current=setTimeout(function(){return G(V+1)},0);break}},L=w.current<=r1;typeof y!="boolean"&&(y=!L),y?L||U(o?s?kw:Aw:r1):L&&U(a?l?Iw:$w:Tw(d))},[N,p,o,a,s,l,E,A,d]);return k.useEffect(function(){return function(){return clearTimeout(g.current)}},[]),[HH[m],D,N]},WH=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!Cx||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),M6e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Cx||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=D6e.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),qH=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof Bu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new H6e(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Bu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new V6e(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),KH=typeof WeakMap<"u"?new WeakMap:new WH,YH=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=R6e.getInstance(),n=new W6e(t,r,this);KH.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){YH.prototype[e]=function(){var t;return(t=KH.get(this))[e].apply(t,arguments)}});var q6e=function(){return typeof $m.ResizeObserver<"u"?$m.ResizeObserver:YH}();function Px(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var u=Date.now()-a;u=0?n=setTimeout(l,t-u):(n=null,r||(s=e.apply(i,o),i=o=null))}var c=function(){i=this,o=arguments,a=Date.now();var u=r&&!n;return n||(n=setTimeout(l,t)),u&&(s=e.apply(i,o),i=o=null),s};return c.clear=function(){n&&(clearTimeout(n),n=null)},c.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},c}Px.debounce=Px;var G6e=Px;const $A=ri(G6e);function XH(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=k.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=k.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=k.useRef(!1);k.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[d,p,h]=k.useMemo(()=>{const g=()=>{if(!l.current.element)return;const{left:E,top:A,width:N,height:D,bottom:y,right:U,x:L,y:G}=l.current.element.getBoundingClientRect(),V={left:E,top:A,width:N,height:D,bottom:y,right:U,x:L,y:G};l.current.element instanceof HTMLElement&&o&&(V.height=l.current.element.offsetHeight,V.width=l.current.element.offsetWidth),Object.freeze(V),f.current&&!Z6e(l.current.lastBounds,V)&&s(l.current.lastBounds=V)};return[g,u?$A(g,u):g,c?$A(g,c):g]},[s,o,c,u]);function m(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",h,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(h),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(g=>g.addEventListener("scroll",h,{capture:!0,passive:!0})))}const w=g=>{!g||g===l.current.element||(m(),l.current.element=g,l.current.scrollContainers=ZH(g),_())};return Y6e(h,!!r),K6e(p),k.useEffect(()=>{m(),_()},[r,h,p]),k.useEffect(()=>m,[]),[w,a,d]}function K6e(e){k.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Y6e(e,t){k.useEffect(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function ZH(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...ZH(e.parentElement)]}const X6e=["x","y","top","bottom","left","right","width","height"],Z6e=(e,t)=>X6e.every(r=>e[r]===t[r]);var JH={};/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Ox=function(e,t){return Ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Ox(e,t)};function J6e(e,t){Ox(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var kx=function(){return kx=Object.assign||function(t){for(var r,n=1,o=arguments.length;n=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function t_e(e,t){return function(r,n){t(r,n,e)}}function r_e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function n_e(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{c(n.next(u))}catch(f){a(f)}}function l(u){try{c(n.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function o_e(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function QH(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function s_e(){for(var e=[],t=0;t1||s(d,p)})})}function s(d,p){try{l(n[d](p))}catch(h){f(i[0][3],h)}}function l(d){d.value instanceof Fp?Promise.resolve(d.value.v).then(c,u):f(i[0][2],d)}function c(d){s("next",d)}function u(d){s("throw",d)}function f(d,p){d(p),i.shift(),i.length&&s(i[0][0],i[0][1])}}function u_e(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:Fp(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function f_e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ax=="function"?Ax(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(s,l){a=e[i](a),o(s,l,a.done,a.value)})}}function o(i,a,s,l){Promise.resolve(l).then(function(c){i({value:c,done:s})},a)}}function d_e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function p_e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function h_e(e){return e&&e.__esModule?e:{default:e}}function v_e(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function g_e(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}const m_e=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return kx},__asyncDelegator:u_e,__asyncGenerator:c_e,__asyncValues:f_e,__await:Fp,__awaiter:n_e,__classPrivateFieldGet:v_e,__classPrivateFieldSet:g_e,__createBinding:i_e,__decorate:e_e,__exportStar:a_e,__extends:J6e,__generator:o_e,__importDefault:h_e,__importStar:p_e,__makeTemplateObject:d_e,__metadata:r_e,__param:t_e,__read:QH,__rest:Q6e,__spread:s_e,__spreadArrays:l_e,__values:Ax},Symbol.toStringTag,{value:"Module"})),Nn=Xl(m_e);var Dr={},Dw={exports:{}},TA;function eV(){return TA||(TA=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function o(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function i(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new o(u,f||l,d),h=r?r+c:c;return l._events[h]?l._events[h].fn?l._events[h]=[l._events[h],p]:l._events[h].push(p):(l._events[h]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,h=new Array(p);d-1?f:0,e.charCodeAt(p+1)){case 100:case 102:if(u>=l||t[u]==null)break;f=l||t[u]==null)break;f=l||t[u]===void 0)break;f",f=p+2,p++;break}c+=n(t[u]),f=p+2,p++;break;case 115:if(u>=l)break;f-1&&(i=!1);const a=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");const s=e.level||"info",l=Object.create(r);l.log||(l.log=jp),Object.defineProperty(l,"levelVal",{get:u}),Object.defineProperty(l,"level",{get:f,set:d});const c={transmit:t,serialize:o,asObject:e.browser.asObject,levels:a,timestamp:O_e(e)};l.levels=Ai.levels,l.level=s,l.setMaxListeners=l.getMaxListeners=l.emit=l.addListener=l.on=l.prependListener=l.once=l.prependOnceListener=l.removeListener=l.removeAllListeners=l.listeners=l.listenerCount=l.eventNames=l.write=l.flush=jp,l.serializers=n,l._serialize=o,l._stdErrSerialize=i,l.child=p,t&&(l._logEvent=Ix());function u(){return this.level==="silent"?1/0:this.levels.values[this.level]}function f(){return this._level}function d(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,Ec(c,l,"error","log"),Ec(c,l,"fatal","error"),Ec(c,l,"warn","error"),Ec(c,l,"info","log"),Ec(c,l,"debug","log"),Ec(c,l,"trace","log")}function p(h,m){if(!h)throw new Error("missing bindings for child Pino");m=m||{},o&&h.serializers&&(m.serializers=h.serializers);const _=m.serializers;if(o&&_){var w=Object.assign({},n,_),g=e.browser.serialize===!0?Object.keys(w):o;delete h.serializers,lb([h],g,w,this._stdErrSerialize)}function E(A){this._childLevel=(A._childLevel|0)+1,this.error=Sc(A,h,"error"),this.fatal=Sc(A,h,"fatal"),this.warn=Sc(A,h,"warn"),this.info=Sc(A,h,"info"),this.debug=Sc(A,h,"debug"),this.trace=Sc(A,h,"trace"),w&&(this.serializers=w,this._serialize=g),t&&(this._logEvent=Ix([].concat(A._logEvent.bindings,h)))}return E.prototype=this,new E(this)}return l}Ai.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Ai.stdSerializers=x_e;Ai.stdTimeFunctions=Object.assign({},{nullTime:rV,epochTime:nV,unixTime:k_e,isoTime:A_e});function Ec(e,t,r,n){const o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?jp:o[r]?o[r]:Bp[r]||Bp[n]||jp,E_e(e,t,r)}function E_e(e,t,r){!e.transmit&&t[r]===jp||(t[r]=function(n){return function(){const i=e.timestamp(),a=new Array(arguments.length),s=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Bp?Bp:this;for(var l=0;l-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function Sc(e,t,r){return function(){const n=new Array(1+arguments.length);n[0]=t;for(var o=1;o0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")MA(l,this,r);else for(var c=l.length,u=uV(l,c),n=0;n0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,$_e(s)}return e}Rt.prototype.addListener=function(t,r){return aV(this,t,r,!1)};Rt.prototype.on=Rt.prototype.addListener;Rt.prototype.prependListener=function(t,r){return aV(this,t,r,!0)};function T_e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function sV(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=T_e.bind(n);return o.listener=r,n.wrapFn=o,o}Rt.prototype.once=function(t,r){return cb(r),this.on(t,sV(this,t,r)),this};Rt.prototype.prependOnceListener=function(t,r){return cb(r),this.prependListener(t,sV(this,t,r)),this};Rt.prototype.removeListener=function(t,r){var n,o,i,a,s;if(cb(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():D_e(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};Rt.prototype.off=Rt.prototype.removeListener;Rt.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o=0;o--)this.removeListener(t,r[o]);return this};function lV(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?M_e(o):uV(o,o.length)}Rt.prototype.listeners=function(t){return lV(this,t,!0)};Rt.prototype.rawListeners=function(t){return lV(this,t,!1)};Rt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):cV.call(e,t)};Rt.prototype.listenerCount=cV;function cV(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Rt.prototype.eventNames=function(){return this._eventsCount>0?H1(this._events):[]};function uV(e,t){for(var r=new Array(t),n=0;ntypeof r>"u"?null:r)}A0.safeJsonStringify=B_e;var td={exports:{}},NA;function j_e(){return NA||(NA=1,function(){let e;function t(){}e=t,e.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},e.prototype.setItem=function(r,n){this[r]=String(n)},e.prototype.removeItem=function(r){delete this[r]},e.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(n){r[n]=void 0,delete r[n]})},e.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Le<"u"&&Le.localStorage?td.exports=Le.localStorage:typeof window<"u"&&window.localStorage?td.exports=window.localStorage:td.exports=new t}()),td.exports}var Rw={},rd={},FA;function L_e(){if(FA)return rd;FA=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.IKeyValueStorage=void 0;class e{}return rd.IKeyValueStorage=e,rd}var nd={},BA;function U_e(){if(BA)return nd;BA=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.parseEntry=void 0;const e=A0;function t(r){var n;return[r[0],e.safeJsonParse((n=r[1])!==null&&n!==void 0?n:"")]}return nd.parseEntry=t,nd}var jA;function z_e(){return jA||(jA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(L_e(),e),t.__exportStar(U_e(),e)}(Rw)),Rw}Object.defineProperty(ub,"__esModule",{value:!0});ub.KeyValueStorage=void 0;const Mc=Nn,LA=A0,H_e=Mc.__importDefault(j_e()),V_e=z_e();class pV{constructor(){this.localStorage=H_e.default}getKeys(){return Mc.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return Mc.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(V_e.parseEntry)})}getItem(t){return Mc.__awaiter(this,void 0,void 0,function*(){const r=this.localStorage.getItem(t);if(r!==null)return LA.safeJsonParse(r)})}setItem(t,r){return Mc.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(t,LA.safeJsonStringify(r))})}removeItem(t){return Mc.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(t)})}}ub.KeyValueStorage=pV;var W_e=ub.default=pV,I0={},od={},pt={},Nw={},id={},UA;function q_e(){if(UA)return id;UA=1,Object.defineProperty(id,"__esModule",{value:!0}),id.delay=void 0;function e(t){return new Promise(r=>{setTimeout(()=>{r(!0)},t)})}return id.delay=e,id}var fl={},Fw={},dl={},zA;function G_e(){return zA||(zA=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.ONE_THOUSAND=dl.ONE_HUNDRED=void 0,dl.ONE_HUNDRED=100,dl.ONE_THOUSAND=1e3),dl}var Bw={},HA;function K_e(){return HA||(HA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_YEAR=e.FOUR_WEEKS=e.THREE_WEEKS=e.TWO_WEEKS=e.ONE_WEEK=e.THIRTY_DAYS=e.SEVEN_DAYS=e.FIVE_DAYS=e.THREE_DAYS=e.ONE_DAY=e.TWENTY_FOUR_HOURS=e.TWELVE_HOURS=e.SIX_HOURS=e.THREE_HOURS=e.ONE_HOUR=e.SIXTY_MINUTES=e.THIRTY_MINUTES=e.TEN_MINUTES=e.FIVE_MINUTES=e.ONE_MINUTE=e.SIXTY_SECONDS=e.THIRTY_SECONDS=e.TEN_SECONDS=e.FIVE_SECONDS=e.ONE_SECOND=void 0,e.ONE_SECOND=1,e.FIVE_SECONDS=5,e.TEN_SECONDS=10,e.THIRTY_SECONDS=30,e.SIXTY_SECONDS=60,e.ONE_MINUTE=e.SIXTY_SECONDS,e.FIVE_MINUTES=e.ONE_MINUTE*5,e.TEN_MINUTES=e.ONE_MINUTE*10,e.THIRTY_MINUTES=e.ONE_MINUTE*30,e.SIXTY_MINUTES=e.ONE_MINUTE*60,e.ONE_HOUR=e.SIXTY_MINUTES,e.THREE_HOURS=e.ONE_HOUR*3,e.SIX_HOURS=e.ONE_HOUR*6,e.TWELVE_HOURS=e.ONE_HOUR*12,e.TWENTY_FOUR_HOURS=e.ONE_HOUR*24,e.ONE_DAY=e.TWENTY_FOUR_HOURS,e.THREE_DAYS=e.ONE_DAY*3,e.FIVE_DAYS=e.ONE_DAY*5,e.SEVEN_DAYS=e.ONE_DAY*7,e.THIRTY_DAYS=e.ONE_DAY*30,e.ONE_WEEK=e.SEVEN_DAYS,e.TWO_WEEKS=e.ONE_WEEK*2,e.THREE_WEEKS=e.ONE_WEEK*3,e.FOUR_WEEKS=e.ONE_WEEK*4,e.ONE_YEAR=e.ONE_DAY*365}(Bw)),Bw}var VA;function hV(){return VA||(VA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(G_e(),e),t.__exportStar(K_e(),e)}(Fw)),Fw}var WA;function Y_e(){if(WA)return fl;WA=1,Object.defineProperty(fl,"__esModule",{value:!0}),fl.fromMiliseconds=fl.toMiliseconds=void 0;const e=hV();function t(n){return n*e.ONE_THOUSAND}fl.toMiliseconds=t;function r(n){return Math.floor(n/e.ONE_THOUSAND)}return fl.fromMiliseconds=r,fl}var qA;function X_e(){return qA||(qA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(q_e(),e),t.__exportStar(Y_e(),e)}(Nw)),Nw}var Cc={},GA;function Z_e(){if(GA)return Cc;GA=1,Object.defineProperty(Cc,"__esModule",{value:!0}),Cc.Watch=void 0;class e{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const o=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:o})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return Cc.Watch=e,Cc.default=e,Cc}var jw={},ad={},KA;function J_e(){if(KA)return ad;KA=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.IWatch=void 0;class e{}return ad.IWatch=e,ad}var YA;function Q_e(){return YA||(YA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Nn.__exportStar(J_e(),e)}(jw)),jw}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(X_e(),e),t.__exportStar(Z_e(),e),t.__exportStar(Q_e(),e),t.__exportStar(hV(),e)})(pt);var Lw={},sd={};let sc=class{};const e4e=Object.freeze(Object.defineProperty({__proto__:null,IEvents:sc},Symbol.toStringTag,{value:"Module"})),t4e=Xl(e4e);var XA;function r4e(){if(XA)return sd;XA=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.IHeartBeat=void 0;const e=t4e;class t extends e.IEvents{constructor(n){super()}}return sd.IHeartBeat=t,sd}var ZA;function vV(){return ZA||(ZA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Nn.__exportStar(r4e(),e)}(Lw)),Lw}var Uw={},pl={},JA;function n4e(){if(JA)return pl;JA=1,Object.defineProperty(pl,"__esModule",{value:!0}),pl.HEARTBEAT_EVENTS=pl.HEARTBEAT_INTERVAL=void 0;const e=pt;return pl.HEARTBEAT_INTERVAL=e.FIVE_SECONDS,pl.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},pl}var QA;function gV(){return QA||(QA=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Nn.__exportStar(n4e(),e)}(Uw)),Uw}var eI;function o4e(){if(eI)return od;eI=1,Object.defineProperty(od,"__esModule",{value:!0}),od.HeartBeat=void 0;const e=Nn,t=ni,r=pt,n=vV(),o=gV();class i extends n.IHeartBeat{constructor(s){super(s),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(s==null?void 0:s.interval)||o.HEARTBEAT_INTERVAL}static init(s){return e.__awaiter(this,void 0,void 0,function*(){const l=new i(s);return yield l.init(),l})}init(){return e.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(s,l){this.events.on(s,l)}once(s,l){this.events.once(s,l)}off(s,l){this.events.off(s,l)}removeListener(s,l){this.events.removeListener(s,l)}initialize(){return e.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),r.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return od.HeartBeat=i,od}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(o4e(),e),t.__exportStar(vV(),e),t.__exportStar(gV(),e)})(I0);var Mt={},hl={},tI;function mV(){return tI||(tI=1,Object.defineProperty(hl,"__esModule",{value:!0}),hl.PINO_CUSTOM_CONTEXT_KEY=hl.PINO_LOGGER_DEFAULTS=void 0,hl.PINO_LOGGER_DEFAULTS={level:"info"},hl.PINO_CUSTOM_CONTEXT_KEY="custom_context"),hl}var fn={},rI;function i4e(){if(rI)return fn;rI=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.generateChildLogger=fn.formatChildLoggerContext=fn.getLoggerContext=fn.setBrowserLoggerContext=fn.getBrowserLoggerContext=fn.getDefaultLoggerOptions=void 0;const e=mV();function t(s){return Object.assign(Object.assign({},s),{level:(s==null?void 0:s.level)||e.PINO_LOGGER_DEFAULTS.level})}fn.getDefaultLoggerOptions=t;function r(s,l=e.PINO_CUSTOM_CONTEXT_KEY){return s[l]||""}fn.getBrowserLoggerContext=r;function n(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){return s[c]=l,s}fn.setBrowserLoggerContext=n;function o(s,l=e.PINO_CUSTOM_CONTEXT_KEY){let c="";return typeof s.bindings>"u"?c=r(s,l):c=s.bindings().context||"",c}fn.getLoggerContext=o;function i(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=o(s,c);return u.trim()?`${u}/${l}`:l}fn.formatChildLoggerContext=i;function a(s,l,c=e.PINO_CUSTOM_CONTEXT_KEY){const u=i(s,l,c),f=s.child({context:u});return n(f,u,c)}return fn.generateChildLogger=a,fn}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const t=Nn,r=t.__importDefault(tV);Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return r.default}}),t.__exportStar(mV(),e),t.__exportStar(i4e(),e)})(Mt);let a4e=class extends sc{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}},s4e=class extends sc{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}},l4e=class{constructor(t,r){this.logger=t,this.core=r}},c4e=class extends sc{constructor(t,r){super(),this.relayer=t,this.logger=r}},u4e=class extends sc{constructor(t){super()}},f4e=class{constructor(t,r,n,o){this.core=t,this.logger=r,this.name=n}},d4e=class extends sc{constructor(t,r){super(),this.relayer=t,this.logger=r}},p4e=class extends sc{constructor(t,r){super(),this.core=t,this.logger=r}},h4e=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}},v4e=class{constructor(t){this.client=t}};const g4e=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),m4e=e=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function yV(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return m4e(e)}catch{return e}}function J4(e){return typeof e=="string"?e:g4e(e)||""}var Q4={},uf={},fb={},db={};Object.defineProperty(db,"__esModule",{value:!0});db.BrowserRandomSource=void 0;const nI=65536;class y4e{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let n=0;n>>16&65535,u=s&65535,f=l>>>16&65535,d=l&65535;return u*d+(c*d+u*f<<16>>>0)|0}e.mul=Math.imul||t;function r(s,l){return s+l|0}e.add=r;function n(s,l){return s-l|0}e.sub=n;function o(s,l){return s<>>32-l}e.rotl=o;function i(s,l){return s<<32-l|s>>>l}e.rotr=i;function a(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s}e.isInteger=Number.isInteger||a,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(s){return e.isInteger(s)&&s>=-e.MAX_SAFE_INTEGER&&s<=e.MAX_SAFE_INTEGER}})(bV);Object.defineProperty(wt,"__esModule",{value:!0});var wV=bV;function k4e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}wt.readInt16BE=k4e;function A4e(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}wt.readUint16BE=A4e;function I4e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}wt.readInt16LE=I4e;function $4e(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}wt.readUint16LE=$4e;function xV(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}wt.writeUint16BE=xV;wt.writeInt16BE=xV;function _V(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}wt.writeUint16LE=_V;wt.writeInt16LE=_V;function $x(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}wt.readInt32BE=$x;function Tx(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}wt.readUint32BE=Tx;function Dx(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}wt.readInt32LE=Dx;function Mx(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}wt.readUint32LE=Mx;function Dm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}wt.writeUint32BE=Dm;wt.writeInt32BE=Dm;function Mm(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}wt.writeUint32LE=Mm;wt.writeInt32LE=Mm;function T4e(e,t){t===void 0&&(t=0);var r=$x(e,t),n=$x(e,t+4);return r*4294967296+n-(n>>31)*4294967296}wt.readInt64BE=T4e;function D4e(e,t){t===void 0&&(t=0);var r=Tx(e,t),n=Tx(e,t+4);return r*4294967296+n}wt.readUint64BE=D4e;function M4e(e,t){t===void 0&&(t=0);var r=Dx(e,t),n=Dx(e,t+4);return n*4294967296+r-(r>>31)*4294967296}wt.readInt64LE=M4e;function R4e(e,t){t===void 0&&(t=0);var r=Mx(e,t),n=Mx(e,t+4);return n*4294967296+r}wt.readUint64LE=R4e;function EV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Dm(e/4294967296>>>0,t,r),Dm(e>>>0,t,r+4),t}wt.writeUint64BE=EV;wt.writeInt64BE=EV;function SV(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Mm(e>>>0,t,r),Mm(e/4294967296>>>0,t,r+4),t}wt.writeUint64LE=SV;wt.writeInt64LE=SV;function N4e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,o=1,i=e/8+r-1;i>=r;i--)n+=t[i]*o,o*=256;return n}wt.readUintBE=N4e;function F4e(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,o=1,i=r;i=n;i--)r[i]=t/o&255,o*=256;return r}wt.writeUintBE=B4e;function j4e(e,t,r,n){if(r===void 0&&(r=new Uint8Array(e/8)),n===void 0&&(n=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!wV.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=n;i256)throw new Error("randomString charset is too long");let d="";const p=u.length,h=256-256%p;for(;c>0;){const m=o(Math.ceil(c*256/h),f);for(let _=0;_0;_++){const w=m[_];w0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._tempHi,this._tempLo,this._stateHi,this._stateLo,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%128<112?128:256;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._stateHi.set(l.stateHi),this._stateLo.set(l.stateLo),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.stateHi),r.wipe(l.stateLo),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA512=n;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function i(s,l,c,u,f,d,p){for(var h=c[0],m=c[1],_=c[2],w=c[3],g=c[4],E=c[5],A=c[6],N=c[7],D=u[0],y=u[1],U=u[2],L=u[3],G=u[4],V=u[5],S=u[6],C=u[7],v,b,B,T,j,H,P,F;p>=128;){for(var $=0;$<16;$++){var q=8*$+d;s[$]=t.readUint32BE(f,q),l[$]=t.readUint32BE(f,q+4)}for(var $=0;$<80;$++){var J=h,te=m,ae=_,ce=w,ie=g,ue=E,O=A,K=N,ee=D,se=y,pe=U,ge=L,X=G,M=V,z=S,Z=C;if(v=N,b=C,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=(g>>>14|G<<32-14)^(g>>>18|G<<32-18)^(G>>>41-32|g<<32-(41-32)),b=(G>>>14|g<<32-14)^(G>>>18|g<<32-18)^(g>>>41-32|G<<32-(41-32)),j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,v=g&E^~g&A,b=G&V^~G&S,j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,v=o[$*2],b=o[$*2+1],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,v=s[$%16],b=l[$%16],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,B=P&65535|F<<16,T=j&65535|H<<16,v=B,b=T,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=(h>>>28|D<<32-28)^(D>>>34-32|h<<32-(34-32))^(D>>>39-32|h<<32-(39-32)),b=(D>>>28|h<<32-28)^(h>>>34-32|D<<32-(34-32))^(h>>>39-32|D<<32-(39-32)),j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,v=h&m^h&_^m&_,b=D&y^D&U^y&U,j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,K=P&65535|F<<16,Z=j&65535|H<<16,v=ce,b=ge,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=B,b=T,j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,ce=P&65535|F<<16,ge=j&65535|H<<16,m=J,_=te,w=ae,g=ce,E=ie,A=ue,N=O,h=K,y=ee,U=se,L=pe,G=ge,V=X,S=M,C=z,D=Z,$%16===15)for(var q=0;q<16;q++)v=s[q],b=l[q],j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=s[(q+9)%16],b=l[(q+9)%16],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,B=s[(q+1)%16],T=l[(q+1)%16],v=(B>>>1|T<<32-1)^(B>>>8|T<<32-8)^B>>>7,b=(T>>>1|B<<32-1)^(T>>>8|B<<32-8)^(T>>>7|B<<32-7),j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,B=s[(q+14)%16],T=l[(q+14)%16],v=(B>>>19|T<<32-19)^(T>>>61-32|B<<32-(61-32))^B>>>6,b=(T>>>19|B<<32-19)^(B>>>61-32|T<<32-(61-32))^(T>>>6|B<<32-6),j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,s[q]=P&65535|F<<16,l[q]=j&65535|H<<16}v=h,b=D,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[0],b=u[0],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[0]=h=P&65535|F<<16,u[0]=D=j&65535|H<<16,v=m,b=y,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[1],b=u[1],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[1]=m=P&65535|F<<16,u[1]=y=j&65535|H<<16,v=_,b=U,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[2],b=u[2],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[2]=_=P&65535|F<<16,u[2]=U=j&65535|H<<16,v=w,b=L,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[3],b=u[3],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[3]=w=P&65535|F<<16,u[3]=L=j&65535|H<<16,v=g,b=G,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[4],b=u[4],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[4]=g=P&65535|F<<16,u[4]=G=j&65535|H<<16,v=E,b=V,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[5],b=u[5],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[5]=E=P&65535|F<<16,u[5]=V=j&65535|H<<16,v=A,b=S,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[6],b=u[6],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[6]=A=P&65535|F<<16,u[6]=S=j&65535|H<<16,v=N,b=C,j=b&65535,H=b>>>16,P=v&65535,F=v>>>16,v=c[7],b=u[7],j+=b&65535,H+=b>>>16,P+=v&65535,F+=v>>>16,H+=j>>>16,P+=H>>>16,F+=P>>>16,c[7]=N=P&65535|F<<16,u[7]=C=j&65535|H<<16,d+=128,p-=128}return d}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(CV);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convertSecretKeyToX25519=e.convertPublicKeyToX25519=e.verify=e.sign=e.extractPublicKeyFromSecretKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.SEED_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=e.SIGNATURE_LENGTH=void 0;const t=uf,r=CV,n=to;e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;function o(ce){const ie=new Float64Array(16);if(ce)for(let ue=0;ue>16&1),ue[se-1]&=65535;ue[15]=O[15]-32767-(ue[14]>>16&1);const ee=ue[15]>>16&1;ue[14]&=65535,m(O,ue,1-ee)}for(let K=0;K<16;K++)ce[2*K]=O[K]&255,ce[2*K+1]=O[K]>>8}function w(ce,ie){let ue=0;for(let O=0;O<32;O++)ue|=ce[O]^ie[O];return(1&ue-1>>>8)-1}function g(ce,ie){const ue=new Uint8Array(32),O=new Uint8Array(32);return _(ue,ce),_(O,ie),w(ue,O)}function E(ce){const ie=new Uint8Array(32);return _(ie,ce),ie[0]&1}function A(ce,ie){for(let ue=0;ue<16;ue++)ce[ue]=ie[2*ue]+(ie[2*ue+1]<<8);ce[15]&=32767}function N(ce,ie,ue){for(let O=0;O<16;O++)ce[O]=ie[O]+ue[O]}function D(ce,ie,ue){for(let O=0;O<16;O++)ce[O]=ie[O]-ue[O]}function y(ce,ie,ue){let O,K,ee=0,se=0,pe=0,ge=0,X=0,M=0,z=0,Z=0,Q=0,de=0,we=0,Se=0,Ee=0,ke=0,Te=0,W=0,x=0,I=0,Y=0,re=0,fe=0,le=0,xe=0,_e=0,Ae=0,$e=0,Ne=0,We=0,gt=0,ft=0,Ye=0,Qe=ue[0],rt=ue[1],ve=ue[2],oe=ue[3],he=ue[4],be=ue[5],Ce=ue[6],Oe=ue[7],Ie=ue[8],De=ue[9],je=ue[10],Me=ue[11],He=ue[12],qe=ue[13],Ue=ue[14],at=ue[15];O=ie[0],ee+=O*Qe,se+=O*rt,pe+=O*ve,ge+=O*oe,X+=O*he,M+=O*be,z+=O*Ce,Z+=O*Oe,Q+=O*Ie,de+=O*De,we+=O*je,Se+=O*Me,Ee+=O*He,ke+=O*qe,Te+=O*Ue,W+=O*at,O=ie[1],se+=O*Qe,pe+=O*rt,ge+=O*ve,X+=O*oe,M+=O*he,z+=O*be,Z+=O*Ce,Q+=O*Oe,de+=O*Ie,we+=O*De,Se+=O*je,Ee+=O*Me,ke+=O*He,Te+=O*qe,W+=O*Ue,x+=O*at,O=ie[2],pe+=O*Qe,ge+=O*rt,X+=O*ve,M+=O*oe,z+=O*he,Z+=O*be,Q+=O*Ce,de+=O*Oe,we+=O*Ie,Se+=O*De,Ee+=O*je,ke+=O*Me,Te+=O*He,W+=O*qe,x+=O*Ue,I+=O*at,O=ie[3],ge+=O*Qe,X+=O*rt,M+=O*ve,z+=O*oe,Z+=O*he,Q+=O*be,de+=O*Ce,we+=O*Oe,Se+=O*Ie,Ee+=O*De,ke+=O*je,Te+=O*Me,W+=O*He,x+=O*qe,I+=O*Ue,Y+=O*at,O=ie[4],X+=O*Qe,M+=O*rt,z+=O*ve,Z+=O*oe,Q+=O*he,de+=O*be,we+=O*Ce,Se+=O*Oe,Ee+=O*Ie,ke+=O*De,Te+=O*je,W+=O*Me,x+=O*He,I+=O*qe,Y+=O*Ue,re+=O*at,O=ie[5],M+=O*Qe,z+=O*rt,Z+=O*ve,Q+=O*oe,de+=O*he,we+=O*be,Se+=O*Ce,Ee+=O*Oe,ke+=O*Ie,Te+=O*De,W+=O*je,x+=O*Me,I+=O*He,Y+=O*qe,re+=O*Ue,fe+=O*at,O=ie[6],z+=O*Qe,Z+=O*rt,Q+=O*ve,de+=O*oe,we+=O*he,Se+=O*be,Ee+=O*Ce,ke+=O*Oe,Te+=O*Ie,W+=O*De,x+=O*je,I+=O*Me,Y+=O*He,re+=O*qe,fe+=O*Ue,le+=O*at,O=ie[7],Z+=O*Qe,Q+=O*rt,de+=O*ve,we+=O*oe,Se+=O*he,Ee+=O*be,ke+=O*Ce,Te+=O*Oe,W+=O*Ie,x+=O*De,I+=O*je,Y+=O*Me,re+=O*He,fe+=O*qe,le+=O*Ue,xe+=O*at,O=ie[8],Q+=O*Qe,de+=O*rt,we+=O*ve,Se+=O*oe,Ee+=O*he,ke+=O*be,Te+=O*Ce,W+=O*Oe,x+=O*Ie,I+=O*De,Y+=O*je,re+=O*Me,fe+=O*He,le+=O*qe,xe+=O*Ue,_e+=O*at,O=ie[9],de+=O*Qe,we+=O*rt,Se+=O*ve,Ee+=O*oe,ke+=O*he,Te+=O*be,W+=O*Ce,x+=O*Oe,I+=O*Ie,Y+=O*De,re+=O*je,fe+=O*Me,le+=O*He,xe+=O*qe,_e+=O*Ue,Ae+=O*at,O=ie[10],we+=O*Qe,Se+=O*rt,Ee+=O*ve,ke+=O*oe,Te+=O*he,W+=O*be,x+=O*Ce,I+=O*Oe,Y+=O*Ie,re+=O*De,fe+=O*je,le+=O*Me,xe+=O*He,_e+=O*qe,Ae+=O*Ue,$e+=O*at,O=ie[11],Se+=O*Qe,Ee+=O*rt,ke+=O*ve,Te+=O*oe,W+=O*he,x+=O*be,I+=O*Ce,Y+=O*Oe,re+=O*Ie,fe+=O*De,le+=O*je,xe+=O*Me,_e+=O*He,Ae+=O*qe,$e+=O*Ue,Ne+=O*at,O=ie[12],Ee+=O*Qe,ke+=O*rt,Te+=O*ve,W+=O*oe,x+=O*he,I+=O*be,Y+=O*Ce,re+=O*Oe,fe+=O*Ie,le+=O*De,xe+=O*je,_e+=O*Me,Ae+=O*He,$e+=O*qe,Ne+=O*Ue,We+=O*at,O=ie[13],ke+=O*Qe,Te+=O*rt,W+=O*ve,x+=O*oe,I+=O*he,Y+=O*be,re+=O*Ce,fe+=O*Oe,le+=O*Ie,xe+=O*De,_e+=O*je,Ae+=O*Me,$e+=O*He,Ne+=O*qe,We+=O*Ue,gt+=O*at,O=ie[14],Te+=O*Qe,W+=O*rt,x+=O*ve,I+=O*oe,Y+=O*he,re+=O*be,fe+=O*Ce,le+=O*Oe,xe+=O*Ie,_e+=O*De,Ae+=O*je,$e+=O*Me,Ne+=O*He,We+=O*qe,gt+=O*Ue,ft+=O*at,O=ie[15],W+=O*Qe,x+=O*rt,I+=O*ve,Y+=O*oe,re+=O*he,fe+=O*be,le+=O*Ce,xe+=O*Oe,_e+=O*Ie,Ae+=O*De,$e+=O*je,Ne+=O*Me,We+=O*He,gt+=O*qe,ft+=O*Ue,Ye+=O*at,ee+=38*x,se+=38*I,pe+=38*Y,ge+=38*re,X+=38*fe,M+=38*le,z+=38*xe,Z+=38*_e,Q+=38*Ae,de+=38*$e,we+=38*Ne,Se+=38*We,Ee+=38*gt,ke+=38*ft,Te+=38*Ye,K=1,O=ee+K+65535,K=Math.floor(O/65536),ee=O-K*65536,O=se+K+65535,K=Math.floor(O/65536),se=O-K*65536,O=pe+K+65535,K=Math.floor(O/65536),pe=O-K*65536,O=ge+K+65535,K=Math.floor(O/65536),ge=O-K*65536,O=X+K+65535,K=Math.floor(O/65536),X=O-K*65536,O=M+K+65535,K=Math.floor(O/65536),M=O-K*65536,O=z+K+65535,K=Math.floor(O/65536),z=O-K*65536,O=Z+K+65535,K=Math.floor(O/65536),Z=O-K*65536,O=Q+K+65535,K=Math.floor(O/65536),Q=O-K*65536,O=de+K+65535,K=Math.floor(O/65536),de=O-K*65536,O=we+K+65535,K=Math.floor(O/65536),we=O-K*65536,O=Se+K+65535,K=Math.floor(O/65536),Se=O-K*65536,O=Ee+K+65535,K=Math.floor(O/65536),Ee=O-K*65536,O=ke+K+65535,K=Math.floor(O/65536),ke=O-K*65536,O=Te+K+65535,K=Math.floor(O/65536),Te=O-K*65536,O=W+K+65535,K=Math.floor(O/65536),W=O-K*65536,ee+=K-1+37*(K-1),K=1,O=ee+K+65535,K=Math.floor(O/65536),ee=O-K*65536,O=se+K+65535,K=Math.floor(O/65536),se=O-K*65536,O=pe+K+65535,K=Math.floor(O/65536),pe=O-K*65536,O=ge+K+65535,K=Math.floor(O/65536),ge=O-K*65536,O=X+K+65535,K=Math.floor(O/65536),X=O-K*65536,O=M+K+65535,K=Math.floor(O/65536),M=O-K*65536,O=z+K+65535,K=Math.floor(O/65536),z=O-K*65536,O=Z+K+65535,K=Math.floor(O/65536),Z=O-K*65536,O=Q+K+65535,K=Math.floor(O/65536),Q=O-K*65536,O=de+K+65535,K=Math.floor(O/65536),de=O-K*65536,O=we+K+65535,K=Math.floor(O/65536),we=O-K*65536,O=Se+K+65535,K=Math.floor(O/65536),Se=O-K*65536,O=Ee+K+65535,K=Math.floor(O/65536),Ee=O-K*65536,O=ke+K+65535,K=Math.floor(O/65536),ke=O-K*65536,O=Te+K+65535,K=Math.floor(O/65536),Te=O-K*65536,O=W+K+65535,K=Math.floor(O/65536),W=O-K*65536,ee+=K-1+37*(K-1),ce[0]=ee,ce[1]=se,ce[2]=pe,ce[3]=ge,ce[4]=X,ce[5]=M,ce[6]=z,ce[7]=Z,ce[8]=Q,ce[9]=de,ce[10]=we,ce[11]=Se,ce[12]=Ee,ce[13]=ke,ce[14]=Te,ce[15]=W}function U(ce,ie){y(ce,ie,ie)}function L(ce,ie){const ue=o();let O;for(O=0;O<16;O++)ue[O]=ie[O];for(O=253;O>=0;O--)U(ue,ue),O!==2&&O!==4&&y(ue,ue,ie);for(O=0;O<16;O++)ce[O]=ue[O]}function G(ce,ie){const ue=o();let O;for(O=0;O<16;O++)ue[O]=ie[O];for(O=250;O>=0;O--)U(ue,ue),O!==1&&y(ue,ue,ie);for(O=0;O<16;O++)ce[O]=ue[O]}function V(ce,ie){const ue=o(),O=o(),K=o(),ee=o(),se=o(),pe=o(),ge=o(),X=o(),M=o();D(ue,ce[1],ce[0]),D(M,ie[1],ie[0]),y(ue,ue,M),N(O,ce[0],ce[1]),N(M,ie[0],ie[1]),y(O,O,M),y(K,ce[3],ie[3]),y(K,K,c),y(ee,ce[2],ie[2]),N(ee,ee,ee),D(se,O,ue),D(pe,ee,K),N(ge,ee,K),N(X,O,ue),y(ce[0],se,pe),y(ce[1],X,ge),y(ce[2],ge,pe),y(ce[3],se,X)}function S(ce,ie,ue){for(let O=0;O<4;O++)m(ce[O],ie[O],ue)}function C(ce,ie){const ue=o(),O=o(),K=o();L(K,ie[2]),y(ue,ie[0],K),y(O,ie[1],K),_(ce,O),ce[31]^=E(ue)<<7}function v(ce,ie,ue){p(ce[0],a),p(ce[1],s),p(ce[2],s),p(ce[3],a);for(let O=255;O>=0;--O){const K=ue[O/8|0]>>(O&7)&1;S(ce,ie,K),V(ie,ce),V(ce,ce),S(ce,ie,K)}}function b(ce,ie){const ue=[o(),o(),o(),o()];p(ue[0],u),p(ue[1],f),p(ue[2],s),y(ue[3],u,f),v(ce,ue,ie)}function B(ce){if(ce.length!==e.SEED_LENGTH)throw new Error(`ed25519: seed must be ${e.SEED_LENGTH} bytes`);const ie=(0,r.hash)(ce);ie[0]&=248,ie[31]&=127,ie[31]|=64;const ue=new Uint8Array(32),O=[o(),o(),o(),o()];b(O,ie),C(ue,O);const K=new Uint8Array(64);return K.set(ce),K.set(ue,32),{publicKey:ue,secretKey:K}}e.generateKeyPairFromSeed=B;function T(ce){const ie=(0,t.randomBytes)(32,ce),ue=B(ie);return(0,n.wipe)(ie),ue}e.generateKeyPair=T;function j(ce){if(ce.length!==e.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${e.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(ce.subarray(32))}e.extractPublicKeyFromSecretKey=j;const H=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function P(ce,ie){let ue,O,K,ee;for(O=63;O>=32;--O){for(ue=0,K=O-32,ee=O-12;K>4)*H[K],ue=ie[K]>>8,ie[K]&=255;for(K=0;K<32;K++)ie[K]-=ue*H[K];for(O=0;O<32;O++)ie[O+1]+=ie[O]>>8,ce[O]=ie[O]&255}function F(ce){const ie=new Float64Array(64);for(let ue=0;ue<64;ue++)ie[ue]=ce[ue];for(let ue=0;ue<64;ue++)ce[ue]=0;P(ce,ie)}function $(ce,ie){const ue=new Float64Array(64),O=[o(),o(),o(),o()],K=(0,r.hash)(ce.subarray(0,32));K[0]&=248,K[31]&=127,K[31]|=64;const ee=new Uint8Array(64);ee.set(K.subarray(32),32);const se=new r.SHA512;se.update(ee.subarray(32)),se.update(ie);const pe=se.digest();se.clean(),F(pe),b(O,pe),C(ee,O),se.reset(),se.update(ee.subarray(0,32)),se.update(ce.subarray(32)),se.update(ie);const ge=se.digest();F(ge);for(let X=0;X<32;X++)ue[X]=pe[X];for(let X=0;X<32;X++)for(let M=0;M<32;M++)ue[X+M]+=ge[X]*K[M];return P(ee.subarray(32),ue),ee}e.sign=$;function q(ce,ie){const ue=o(),O=o(),K=o(),ee=o(),se=o(),pe=o(),ge=o();return p(ce[2],s),A(ce[1],ie),U(K,ce[1]),y(ee,K,l),D(K,K,ce[2]),N(ee,ce[2],ee),U(se,ee),U(pe,se),y(ge,pe,se),y(ue,ge,K),y(ue,ue,ee),G(ue,ue),y(ue,ue,K),y(ue,ue,ee),y(ue,ue,ee),y(ce[0],ue,ee),U(O,ce[0]),y(O,O,ee),g(O,K)&&y(ce[0],ce[0],d),U(O,ce[0]),y(O,O,ee),g(O,K)?-1:(E(ce[0])===ie[31]>>7&&D(ce[0],a,ce[0]),y(ce[3],ce[0],ce[1]),0)}function J(ce,ie,ue){const O=new Uint8Array(32),K=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(ue.length!==e.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${e.SIGNATURE_LENGTH} bytes`);if(q(ee,ce))return!1;const se=new r.SHA512;se.update(ue.subarray(0,32)),se.update(ce),se.update(ie);const pe=se.digest();return F(pe),v(K,ee,pe),b(ee,ue.subarray(32)),V(K,ee),C(O,K),!w(ue,O)}e.verify=J;function te(ce){let ie=[o(),o(),o(),o()];if(q(ie,ce))throw new Error("Ed25519: invalid public key");let ue=o(),O=o(),K=ie[1];N(ue,s,K),D(O,s,K),L(O,O),y(ue,ue,O);let ee=new Uint8Array(32);return _(ee,ue),ee}e.convertPublicKeyToX25519=te;function ae(ce){const ie=(0,r.hash)(ce.subarray(0,32));ie[0]&=248,ie[31]&=127,ie[31]|=64;const ue=new Uint8Array(ie.subarray(0,32));return(0,n.wipe)(ie),ue}e.convertSecretKeyToX25519=ae})(Q4);const K4e="EdDSA",Y4e="JWT",PV=".",OV="base64url",X4e="utf8",Z4e="utf8",J4e=":",Q4e="did",e8e="key",oI="base58btc",t8e="z",r8e="K36",n8e=32;function e8(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function kV(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?e8(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function Rx(e,t){t||(t=e.reduce((o,i)=>o+i.length,0));const r=kV(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return e8(r)}function o8e(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(E);w!==g;){for(var N=h[w],D=0,y=E-1;(N!==0||D<_)&&y!==-1;y--,D++)N+=256*A[y]>>>0,A[y]=N%s>>>0,N=N/s>>>0;if(N!==0)throw new Error("Non-zero carry");_=D,w++}for(var U=E-_;U!==E&&A[U]===0;)U++;for(var L=l.repeat(m);U>>0,E=new Uint8Array(g);h[m];){var A=r[h.charCodeAt(m)];if(A===255)return;for(var N=0,D=g-1;(A!==0||N>>0,E[D]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");w=N,m++}if(h[m]!==" "){for(var y=g-w;y!==g&&E[y]===0;)y++;for(var U=new Uint8Array(_+(g-y)),L=_;y!==g;)U[L++]=E[y++];return U}}}function p(h){var m=d(h);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var i8e=o8e,a8e=i8e;const s8e=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},l8e=e=>new TextEncoder().encode(e),c8e=e=>new TextDecoder().decode(e);class u8e{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class f8e{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return AV(this,t)}}class d8e{constructor(t){this.decoders=t}or(t){return AV(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const AV=(e,t)=>new d8e({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class p8e{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new u8e(t,r,n),this.decoder=new f8e(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const hb=({name:e,prefix:t,encode:r,decode:n})=>new p8e(e,t,r,n),$0=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=a8e(r,t);return hb({prefix:e,name:t,encode:n,decode:i=>s8e(o(i))})},h8e=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},v8e=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<hb({prefix:t,name:e,encode(o){return v8e(o,n,r)},decode(o){return h8e(o,n,r,e)}}),g8e=hb({prefix:"\0",name:"identity",encode:e=>c8e(e),decode:e=>l8e(e)}),m8e=Object.freeze(Object.defineProperty({__proto__:null,identity:g8e},Symbol.toStringTag,{value:"Module"})),y8e=Hr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),b8e=Object.freeze(Object.defineProperty({__proto__:null,base2:y8e},Symbol.toStringTag,{value:"Module"})),w8e=Hr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),x8e=Object.freeze(Object.defineProperty({__proto__:null,base8:w8e},Symbol.toStringTag,{value:"Module"})),_8e=$0({prefix:"9",name:"base10",alphabet:"0123456789"}),E8e=Object.freeze(Object.defineProperty({__proto__:null,base10:_8e},Symbol.toStringTag,{value:"Module"})),S8e=Hr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),C8e=Hr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),P8e=Object.freeze(Object.defineProperty({__proto__:null,base16:S8e,base16upper:C8e},Symbol.toStringTag,{value:"Module"})),O8e=Hr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),k8e=Hr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),A8e=Hr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),I8e=Hr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),$8e=Hr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),T8e=Hr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),D8e=Hr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),M8e=Hr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),R8e=Hr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),N8e=Object.freeze(Object.defineProperty({__proto__:null,base32:O8e,base32hex:$8e,base32hexpad:D8e,base32hexpadupper:M8e,base32hexupper:T8e,base32pad:A8e,base32padupper:I8e,base32upper:k8e,base32z:R8e},Symbol.toStringTag,{value:"Module"})),F8e=$0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),B8e=$0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),j8e=Object.freeze(Object.defineProperty({__proto__:null,base36:F8e,base36upper:B8e},Symbol.toStringTag,{value:"Module"})),L8e=$0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),U8e=$0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),z8e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:L8e,base58flickr:U8e},Symbol.toStringTag,{value:"Module"})),H8e=Hr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),V8e=Hr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),W8e=Hr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),q8e=Hr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),G8e=Object.freeze(Object.defineProperty({__proto__:null,base64:H8e,base64pad:V8e,base64url:W8e,base64urlpad:q8e},Symbol.toStringTag,{value:"Module"})),IV=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),K8e=IV.reduce((e,t,r)=>(e[r]=t,e),[]),Y8e=IV.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function X8e(e){return e.reduce((t,r)=>(t+=K8e[r],t),"")}function Z8e(e){const t=[];for(const r of e){const n=Y8e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const J8e=hb({prefix:"🚀",name:"base256emoji",encode:X8e,decode:Z8e}),Q8e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:J8e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const iI={...m8e,...b8e,...x8e,...E8e,...P8e,...N8e,...j8e,...z8e,...G8e,...Q8e};function $V(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const aI=$V("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),zw=$V("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=kV(e.length);for(let r=0;r>>32-16|b<<16,V=V+b|0,y^=V,y=y>>>32-12|y<<12,A=A+U|0,B^=A,B=B>>>32-16|B<<16,S=S+B|0,U^=S,U=U>>>32-12|U<<12,N=N+L|0,T^=N,T=T>>>32-16|T<<16,C=C+T|0,L^=C,L=L>>>32-12|L<<12,D=D+G|0,j^=D,j=j>>>32-16|j<<16,v=v+j|0,G^=v,G=G>>>32-12|G<<12,N=N+L|0,T^=N,T=T>>>32-8|T<<8,C=C+T|0,L^=C,L=L>>>32-7|L<<7,D=D+G|0,j^=D,j=j>>>32-8|j<<8,v=v+j|0,G^=v,G=G>>>32-7|G<<7,A=A+U|0,B^=A,B=B>>>32-8|B<<8,S=S+B|0,U^=S,U=U>>>32-7|U<<7,E=E+y|0,b^=E,b=b>>>32-8|b<<8,V=V+b|0,y^=V,y=y>>>32-7|y<<7,E=E+U|0,j^=E,j=j>>>32-16|j<<16,C=C+j|0,U^=C,U=U>>>32-12|U<<12,A=A+L|0,b^=A,b=b>>>32-16|b<<16,v=v+b|0,L^=v,L=L>>>32-12|L<<12,N=N+G|0,B^=N,B=B>>>32-16|B<<16,V=V+B|0,G^=V,G=G>>>32-12|G<<12,D=D+y|0,T^=D,T=T>>>32-16|T<<16,S=S+T|0,y^=S,y=y>>>32-12|y<<12,N=N+G|0,B^=N,B=B>>>32-8|B<<8,V=V+B|0,G^=V,G=G>>>32-7|G<<7,D=D+y|0,T^=D,T=T>>>32-8|T<<8,S=S+T|0,y^=S,y=y>>>32-7|y<<7,A=A+L|0,b^=A,b=b>>>32-8|b<<8,v=v+b|0,L^=v,L=L>>>32-7|L<<7,E=E+U|0,j^=E,j=j>>>32-8|j<<8,C=C+j|0,U^=C,U=U>>>32-7|U<<7;Xr.writeUint32LE(E+n|0,e,0),Xr.writeUint32LE(A+o|0,e,4),Xr.writeUint32LE(N+i|0,e,8),Xr.writeUint32LE(D+a|0,e,12),Xr.writeUint32LE(y+s|0,e,16),Xr.writeUint32LE(U+l|0,e,20),Xr.writeUint32LE(L+c|0,e,24),Xr.writeUint32LE(G+u|0,e,28),Xr.writeUint32LE(V+f|0,e,32),Xr.writeUint32LE(S+d|0,e,36),Xr.writeUint32LE(C+p|0,e,40),Xr.writeUint32LE(v+h|0,e,44),Xr.writeUint32LE(b+m|0,e,48),Xr.writeUint32LE(B+_|0,e,52),Xr.writeUint32LE(T+w|0,e,56),Xr.writeUint32LE(j+g|0,e,60)}function MV(e,t,r,n,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,t++;if(n>0)throw new Error("ChaCha: counter overflow")}var RV={},Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});function lEe(e,t,r){return~(e-1)&t|e-1&r}Zs.select=lEe;function cEe(e,t){return(e|0)-(t|0)-1>>>31&1}Zs.lessOrEqual=cEe;function NV(e,t){if(e.length!==t.length)return 0;for(var r=0,n=0;n>>8}Zs.compare=NV;function uEe(e,t){return e.length===0||t.length===0?!1:NV(e,t)!==0}Zs.equal=uEe;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Zs,r=to;e.DIGEST_LENGTH=16;var n=function(){function a(s){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=s[0]|s[1]<<8;this._r[0]=l&8191;var c=s[2]|s[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var u=s[4]|s[5]<<8;this._r[2]=(c>>>10|u<<6)&7939;var f=s[6]|s[7]<<8;this._r[3]=(u>>>7|f<<9)&8191;var d=s[8]|s[9]<<8;this._r[4]=(f>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var p=s[10]|s[11]<<8;this._r[6]=(d>>>14|p<<2)&8191;var h=s[12]|s[13]<<8;this._r[7]=(p>>>11|h<<5)&8065;var m=s[14]|s[15]<<8;this._r[8]=(h>>>8|m<<8)&8191,this._r[9]=m>>>5&127,this._pad[0]=s[16]|s[17]<<8,this._pad[1]=s[18]|s[19]<<8,this._pad[2]=s[20]|s[21]<<8,this._pad[3]=s[22]|s[23]<<8,this._pad[4]=s[24]|s[25]<<8,this._pad[5]=s[26]|s[27]<<8,this._pad[6]=s[28]|s[29]<<8,this._pad[7]=s[30]|s[31]<<8}return a.prototype._blocks=function(s,l,c){for(var u=this._fin?0:2048,f=this._h[0],d=this._h[1],p=this._h[2],h=this._h[3],m=this._h[4],_=this._h[5],w=this._h[6],g=this._h[7],E=this._h[8],A=this._h[9],N=this._r[0],D=this._r[1],y=this._r[2],U=this._r[3],L=this._r[4],G=this._r[5],V=this._r[6],S=this._r[7],C=this._r[8],v=this._r[9];c>=16;){var b=s[l+0]|s[l+1]<<8;f+=b&8191;var B=s[l+2]|s[l+3]<<8;d+=(b>>>13|B<<3)&8191;var T=s[l+4]|s[l+5]<<8;p+=(B>>>10|T<<6)&8191;var j=s[l+6]|s[l+7]<<8;h+=(T>>>7|j<<9)&8191;var H=s[l+8]|s[l+9]<<8;m+=(j>>>4|H<<12)&8191,_+=H>>>1&8191;var P=s[l+10]|s[l+11]<<8;w+=(H>>>14|P<<2)&8191;var F=s[l+12]|s[l+13]<<8;g+=(P>>>11|F<<5)&8191;var $=s[l+14]|s[l+15]<<8;E+=(F>>>8|$<<8)&8191,A+=$>>>5|u;var q=0,J=q;J+=f*N,J+=d*(5*v),J+=p*(5*C),J+=h*(5*S),J+=m*(5*V),q=J>>>13,J&=8191,J+=_*(5*G),J+=w*(5*L),J+=g*(5*U),J+=E*(5*y),J+=A*(5*D),q+=J>>>13,J&=8191;var te=q;te+=f*D,te+=d*N,te+=p*(5*v),te+=h*(5*C),te+=m*(5*S),q=te>>>13,te&=8191,te+=_*(5*V),te+=w*(5*G),te+=g*(5*L),te+=E*(5*U),te+=A*(5*y),q+=te>>>13,te&=8191;var ae=q;ae+=f*y,ae+=d*D,ae+=p*N,ae+=h*(5*v),ae+=m*(5*C),q=ae>>>13,ae&=8191,ae+=_*(5*S),ae+=w*(5*V),ae+=g*(5*G),ae+=E*(5*L),ae+=A*(5*U),q+=ae>>>13,ae&=8191;var ce=q;ce+=f*U,ce+=d*y,ce+=p*D,ce+=h*N,ce+=m*(5*v),q=ce>>>13,ce&=8191,ce+=_*(5*C),ce+=w*(5*S),ce+=g*(5*V),ce+=E*(5*G),ce+=A*(5*L),q+=ce>>>13,ce&=8191;var ie=q;ie+=f*L,ie+=d*U,ie+=p*y,ie+=h*D,ie+=m*N,q=ie>>>13,ie&=8191,ie+=_*(5*v),ie+=w*(5*C),ie+=g*(5*S),ie+=E*(5*V),ie+=A*(5*G),q+=ie>>>13,ie&=8191;var ue=q;ue+=f*G,ue+=d*L,ue+=p*U,ue+=h*y,ue+=m*D,q=ue>>>13,ue&=8191,ue+=_*N,ue+=w*(5*v),ue+=g*(5*C),ue+=E*(5*S),ue+=A*(5*V),q+=ue>>>13,ue&=8191;var O=q;O+=f*V,O+=d*G,O+=p*L,O+=h*U,O+=m*y,q=O>>>13,O&=8191,O+=_*D,O+=w*N,O+=g*(5*v),O+=E*(5*C),O+=A*(5*S),q+=O>>>13,O&=8191;var K=q;K+=f*S,K+=d*V,K+=p*G,K+=h*L,K+=m*U,q=K>>>13,K&=8191,K+=_*y,K+=w*D,K+=g*N,K+=E*(5*v),K+=A*(5*C),q+=K>>>13,K&=8191;var ee=q;ee+=f*C,ee+=d*S,ee+=p*V,ee+=h*G,ee+=m*L,q=ee>>>13,ee&=8191,ee+=_*U,ee+=w*y,ee+=g*D,ee+=E*N,ee+=A*(5*v),q+=ee>>>13,ee&=8191;var se=q;se+=f*v,se+=d*C,se+=p*S,se+=h*V,se+=m*G,q=se>>>13,se&=8191,se+=_*L,se+=w*U,se+=g*y,se+=E*D,se+=A*N,q+=se>>>13,se&=8191,q=(q<<2)+q|0,q=q+J|0,J=q&8191,q=q>>>13,te+=q,f=J,d=te,p=ae,h=ce,m=ie,_=ue,w=O,g=K,E=ee,A=se,l+=16,c-=16}this._h[0]=f,this._h[1]=d,this._h[2]=p,this._h[3]=h,this._h[4]=m,this._h[5]=_,this._h[6]=w,this._h[7]=g,this._h[8]=E,this._h[9]=A},a.prototype.finish=function(s,l){l===void 0&&(l=0);var c=new Uint16Array(10),u,f,d,p;if(this._leftover){for(p=this._leftover,this._buffer[p++]=1;p<16;p++)this._buffer[p]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,p=2;p<10;p++)this._h[p]+=u,u=this._h[p]>>>13,this._h[p]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,c[0]=this._h[0]+5,u=c[0]>>>13,c[0]&=8191,p=1;p<10;p++)c[p]=this._h[p]+u,u=c[p]>>>13,c[p]&=8191;for(c[9]-=8192,f=(u^1)-1,p=0;p<10;p++)c[p]&=f;for(f=~f,p=0;p<10;p++)this._h[p]=this._h[p]&f|c[p];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,p=1;p<8;p++)d=(this._h[p]+this._pad[p]|0)+(d>>>16)|0,this._h[p]=d&65535;return s[l+0]=this._h[0]>>>0,s[l+1]=this._h[0]>>>8,s[l+2]=this._h[1]>>>0,s[l+3]=this._h[1]>>>8,s[l+4]=this._h[2]>>>0,s[l+5]=this._h[2]>>>8,s[l+6]=this._h[3]>>>0,s[l+7]=this._h[3]>>>8,s[l+8]=this._h[4]>>>0,s[l+9]=this._h[4]>>>8,s[l+10]=this._h[5]>>>0,s[l+11]=this._h[5]>>>8,s[l+12]=this._h[6]>>>0,s[l+13]=this._h[6]>>>8,s[l+14]=this._h[7]>>>0,s[l+15]=this._h[7]>>>8,this._finished=!0,this},a.prototype.update=function(s){var l=0,c=s.length,u;if(this._leftover){u=16-this._leftover,u>c&&(u=c);for(var f=0;f=16&&(u=c-c%16,this._blocks(s,l,u),l+=u,c-=u),c){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var p=new Uint8Array(16);p.set(c,p.length-c.length);var h=new Uint8Array(32);t.stream(this._key,p,h,4);var m=u.length+this.tagLength,_;if(d){if(d.length!==m)throw new Error("ChaCha20Poly1305: incorrect destination length");_=d}else _=new Uint8Array(m);return t.streamXOR(this._key,p,u,_,4),this._authenticate(_.subarray(_.length-this.tagLength,_.length),h,_.subarray(0,_.length-this.tagLength),f),n.wipe(p),_},l.prototype.open=function(c,u,f,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&p.update(a.subarray(d.length%16))),p.update(f),f.length%16>0&&p.update(a.subarray(f.length%16));var h=new Uint8Array(8);d&&o.writeUint64LE(d.length,h),p.update(h),o.writeUint64LE(f.length,h),p.update(h);for(var m=p.digest(),_=0;_this.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var o=0;o1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),n=0;n0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[u++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(u=i(this._temp,this._state,l,u,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[u++],c--;return this},s.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,u=this._bufferLength,f=c/536870912|0,d=c<<3,p=c%64<56?64:128;this._buffer[u]=128;for(var h=u+1;h0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},s.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},s.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},s}();e.SHA256=n;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function i(s,l,c,u,f){for(;f>=64;){for(var d=l[0],p=l[1],h=l[2],m=l[3],_=l[4],w=l[5],g=l[6],E=l[7],A=0;A<16;A++){var N=u+A*4;s[A]=t.readUint32BE(c,N)}for(var A=16;A<64;A++){var D=s[A-2],y=(D>>>17|D<<32-17)^(D>>>19|D<<32-19)^D>>>10;D=s[A-15];var U=(D>>>7|D<<32-7)^(D>>>18|D<<32-18)^D>>>3;s[A]=(y+s[A-7]|0)+(U+s[A-16]|0)}for(var A=0;A<64;A++){var y=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&w^~_&g)|0)+(E+(o[A]+s[A]|0)|0)|0,U=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&p^d&h^p&h)|0;E=g,g=w,w=_,_=m+y|0,m=h,h=p,p=d,d=y+U|0}l[0]+=d,l[1]+=p,l[2]+=h,l[3]+=m,l[4]+=_,l[5]+=w,l[6]+=g,l[7]+=E,u+=64,f-=64}return u}function a(s){var l=new n;l.update(s);var c=l.digest();return l.clean(),c}e.hash=a})(gb);var n8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=uf,r=to;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function n(A){const N=new Float64Array(16);if(A)for(let D=0;D>16&1),D[G-1]&=65535;D[15]=y[15]-32767-(D[14]>>16&1);const L=D[15]>>16&1;D[14]&=65535,s(y,D,1-L)}for(let U=0;U<16;U++)A[2*U]=y[U]&255,A[2*U+1]=y[U]>>8}function c(A,N){for(let D=0;D<16;D++)A[D]=N[2*D]+(N[2*D+1]<<8);A[15]&=32767}function u(A,N,D){for(let y=0;y<16;y++)A[y]=N[y]+D[y]}function f(A,N,D){for(let y=0;y<16;y++)A[y]=N[y]-D[y]}function d(A,N,D){let y,U,L=0,G=0,V=0,S=0,C=0,v=0,b=0,B=0,T=0,j=0,H=0,P=0,F=0,$=0,q=0,J=0,te=0,ae=0,ce=0,ie=0,ue=0,O=0,K=0,ee=0,se=0,pe=0,ge=0,X=0,M=0,z=0,Z=0,Q=D[0],de=D[1],we=D[2],Se=D[3],Ee=D[4],ke=D[5],Te=D[6],W=D[7],x=D[8],I=D[9],Y=D[10],re=D[11],fe=D[12],le=D[13],xe=D[14],_e=D[15];y=N[0],L+=y*Q,G+=y*de,V+=y*we,S+=y*Se,C+=y*Ee,v+=y*ke,b+=y*Te,B+=y*W,T+=y*x,j+=y*I,H+=y*Y,P+=y*re,F+=y*fe,$+=y*le,q+=y*xe,J+=y*_e,y=N[1],G+=y*Q,V+=y*de,S+=y*we,C+=y*Se,v+=y*Ee,b+=y*ke,B+=y*Te,T+=y*W,j+=y*x,H+=y*I,P+=y*Y,F+=y*re,$+=y*fe,q+=y*le,J+=y*xe,te+=y*_e,y=N[2],V+=y*Q,S+=y*de,C+=y*we,v+=y*Se,b+=y*Ee,B+=y*ke,T+=y*Te,j+=y*W,H+=y*x,P+=y*I,F+=y*Y,$+=y*re,q+=y*fe,J+=y*le,te+=y*xe,ae+=y*_e,y=N[3],S+=y*Q,C+=y*de,v+=y*we,b+=y*Se,B+=y*Ee,T+=y*ke,j+=y*Te,H+=y*W,P+=y*x,F+=y*I,$+=y*Y,q+=y*re,J+=y*fe,te+=y*le,ae+=y*xe,ce+=y*_e,y=N[4],C+=y*Q,v+=y*de,b+=y*we,B+=y*Se,T+=y*Ee,j+=y*ke,H+=y*Te,P+=y*W,F+=y*x,$+=y*I,q+=y*Y,J+=y*re,te+=y*fe,ae+=y*le,ce+=y*xe,ie+=y*_e,y=N[5],v+=y*Q,b+=y*de,B+=y*we,T+=y*Se,j+=y*Ee,H+=y*ke,P+=y*Te,F+=y*W,$+=y*x,q+=y*I,J+=y*Y,te+=y*re,ae+=y*fe,ce+=y*le,ie+=y*xe,ue+=y*_e,y=N[6],b+=y*Q,B+=y*de,T+=y*we,j+=y*Se,H+=y*Ee,P+=y*ke,F+=y*Te,$+=y*W,q+=y*x,J+=y*I,te+=y*Y,ae+=y*re,ce+=y*fe,ie+=y*le,ue+=y*xe,O+=y*_e,y=N[7],B+=y*Q,T+=y*de,j+=y*we,H+=y*Se,P+=y*Ee,F+=y*ke,$+=y*Te,q+=y*W,J+=y*x,te+=y*I,ae+=y*Y,ce+=y*re,ie+=y*fe,ue+=y*le,O+=y*xe,K+=y*_e,y=N[8],T+=y*Q,j+=y*de,H+=y*we,P+=y*Se,F+=y*Ee,$+=y*ke,q+=y*Te,J+=y*W,te+=y*x,ae+=y*I,ce+=y*Y,ie+=y*re,ue+=y*fe,O+=y*le,K+=y*xe,ee+=y*_e,y=N[9],j+=y*Q,H+=y*de,P+=y*we,F+=y*Se,$+=y*Ee,q+=y*ke,J+=y*Te,te+=y*W,ae+=y*x,ce+=y*I,ie+=y*Y,ue+=y*re,O+=y*fe,K+=y*le,ee+=y*xe,se+=y*_e,y=N[10],H+=y*Q,P+=y*de,F+=y*we,$+=y*Se,q+=y*Ee,J+=y*ke,te+=y*Te,ae+=y*W,ce+=y*x,ie+=y*I,ue+=y*Y,O+=y*re,K+=y*fe,ee+=y*le,se+=y*xe,pe+=y*_e,y=N[11],P+=y*Q,F+=y*de,$+=y*we,q+=y*Se,J+=y*Ee,te+=y*ke,ae+=y*Te,ce+=y*W,ie+=y*x,ue+=y*I,O+=y*Y,K+=y*re,ee+=y*fe,se+=y*le,pe+=y*xe,ge+=y*_e,y=N[12],F+=y*Q,$+=y*de,q+=y*we,J+=y*Se,te+=y*Ee,ae+=y*ke,ce+=y*Te,ie+=y*W,ue+=y*x,O+=y*I,K+=y*Y,ee+=y*re,se+=y*fe,pe+=y*le,ge+=y*xe,X+=y*_e,y=N[13],$+=y*Q,q+=y*de,J+=y*we,te+=y*Se,ae+=y*Ee,ce+=y*ke,ie+=y*Te,ue+=y*W,O+=y*x,K+=y*I,ee+=y*Y,se+=y*re,pe+=y*fe,ge+=y*le,X+=y*xe,M+=y*_e,y=N[14],q+=y*Q,J+=y*de,te+=y*we,ae+=y*Se,ce+=y*Ee,ie+=y*ke,ue+=y*Te,O+=y*W,K+=y*x,ee+=y*I,se+=y*Y,pe+=y*re,ge+=y*fe,X+=y*le,M+=y*xe,z+=y*_e,y=N[15],J+=y*Q,te+=y*de,ae+=y*we,ce+=y*Se,ie+=y*Ee,ue+=y*ke,O+=y*Te,K+=y*W,ee+=y*x,se+=y*I,pe+=y*Y,ge+=y*re,X+=y*fe,M+=y*le,z+=y*xe,Z+=y*_e,L+=38*te,G+=38*ae,V+=38*ce,S+=38*ie,C+=38*ue,v+=38*O,b+=38*K,B+=38*ee,T+=38*se,j+=38*pe,H+=38*ge,P+=38*X,F+=38*M,$+=38*z,q+=38*Z,U=1,y=L+U+65535,U=Math.floor(y/65536),L=y-U*65536,y=G+U+65535,U=Math.floor(y/65536),G=y-U*65536,y=V+U+65535,U=Math.floor(y/65536),V=y-U*65536,y=S+U+65535,U=Math.floor(y/65536),S=y-U*65536,y=C+U+65535,U=Math.floor(y/65536),C=y-U*65536,y=v+U+65535,U=Math.floor(y/65536),v=y-U*65536,y=b+U+65535,U=Math.floor(y/65536),b=y-U*65536,y=B+U+65535,U=Math.floor(y/65536),B=y-U*65536,y=T+U+65535,U=Math.floor(y/65536),T=y-U*65536,y=j+U+65535,U=Math.floor(y/65536),j=y-U*65536,y=H+U+65535,U=Math.floor(y/65536),H=y-U*65536,y=P+U+65535,U=Math.floor(y/65536),P=y-U*65536,y=F+U+65535,U=Math.floor(y/65536),F=y-U*65536,y=$+U+65535,U=Math.floor(y/65536),$=y-U*65536,y=q+U+65535,U=Math.floor(y/65536),q=y-U*65536,y=J+U+65535,U=Math.floor(y/65536),J=y-U*65536,L+=U-1+37*(U-1),U=1,y=L+U+65535,U=Math.floor(y/65536),L=y-U*65536,y=G+U+65535,U=Math.floor(y/65536),G=y-U*65536,y=V+U+65535,U=Math.floor(y/65536),V=y-U*65536,y=S+U+65535,U=Math.floor(y/65536),S=y-U*65536,y=C+U+65535,U=Math.floor(y/65536),C=y-U*65536,y=v+U+65535,U=Math.floor(y/65536),v=y-U*65536,y=b+U+65535,U=Math.floor(y/65536),b=y-U*65536,y=B+U+65535,U=Math.floor(y/65536),B=y-U*65536,y=T+U+65535,U=Math.floor(y/65536),T=y-U*65536,y=j+U+65535,U=Math.floor(y/65536),j=y-U*65536,y=H+U+65535,U=Math.floor(y/65536),H=y-U*65536,y=P+U+65535,U=Math.floor(y/65536),P=y-U*65536,y=F+U+65535,U=Math.floor(y/65536),F=y-U*65536,y=$+U+65535,U=Math.floor(y/65536),$=y-U*65536,y=q+U+65535,U=Math.floor(y/65536),q=y-U*65536,y=J+U+65535,U=Math.floor(y/65536),J=y-U*65536,L+=U-1+37*(U-1),A[0]=L,A[1]=G,A[2]=V,A[3]=S,A[4]=C,A[5]=v,A[6]=b,A[7]=B,A[8]=T,A[9]=j,A[10]=H,A[11]=P,A[12]=F,A[13]=$,A[14]=q,A[15]=J}function p(A,N){d(A,N,N)}function h(A,N){const D=n();for(let y=0;y<16;y++)D[y]=N[y];for(let y=253;y>=0;y--)p(D,D),y!==2&&y!==4&&d(D,D,N);for(let y=0;y<16;y++)A[y]=D[y]}function m(A,N){const D=new Uint8Array(32),y=new Float64Array(80),U=n(),L=n(),G=n(),V=n(),S=n(),C=n();for(let T=0;T<31;T++)D[T]=A[T];D[31]=A[31]&127|64,D[0]&=248,c(y,N);for(let T=0;T<16;T++)L[T]=y[T];U[0]=V[0]=1;for(let T=254;T>=0;--T){const j=D[T>>>3]>>>(T&7)&1;s(U,L,j),s(G,V,j),u(S,U,G),f(U,U,G),u(G,L,V),f(L,L,V),p(V,S),p(C,U),d(U,G,U),d(G,L,S),u(S,U,G),f(U,U,G),p(L,U),f(G,V,C),d(U,G,i),u(U,U,V),d(G,G,U),d(U,V,C),d(V,L,y),p(L,S),s(U,L,j),s(G,V,j)}for(let T=0;T<16;T++)y[T+16]=U[T],y[T+32]=G[T],y[T+48]=L[T],y[T+64]=V[T];const v=y.subarray(32),b=y.subarray(16);h(v,v),d(b,b,v);const B=new Uint8Array(32);return l(B,b),B}e.scalarMult=m;function _(A){return m(A,o)}e.scalarMultBase=_;function w(A){if(A.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const N=new Uint8Array(A);return{publicKey:_(N),secretKey:N}}e.generateKeyPairFromSeed=w;function g(A){const N=(0,t.randomBytes)(32,A),D=w(N);return(0,r.wipe)(N),D}e.generateKeyPair=g;function E(A,N,D=!1){if(A.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(N.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const y=m(A,N);if(D){let U=0;for(let L=0;L-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let w=t.protocol+"//"+t.host;if(_.indexOf("/")===0)w+=_;else{const g=t.pathname.split("/");g.pop();const E=g.join("/");w+=E+"/"+_}d.push(w)}else if(_.indexOf("//")===0){const w=t.protocol+_;d.push(w)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(m.length&&m){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}LV=a8.getWindowMetadata=OEe;var Lp={},kEe=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),UV="%[a-f0-9]{2}",fI=new RegExp("("+UV+")|([^%]+?)","gi"),dI=new RegExp("("+UV+")+","gi");function Fx(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],Fx(r),Fx(n))}function AEe(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(fI)||[],r=1;r{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},DEe=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;ig==null,a=Symbol("encodeFragmentIdentifier");function s(g){switch(g.arrayFormat){case"index":return E=>(A,N)=>{const D=A.length;return N===void 0||g.skipNull&&N===null||g.skipEmptyString&&N===""?A:N===null?[...A,[u(E,g),"[",D,"]"].join("")]:[...A,[u(E,g),"[",u(D,g),"]=",u(N,g)].join("")]};case"bracket":return E=>(A,N)=>N===void 0||g.skipNull&&N===null||g.skipEmptyString&&N===""?A:N===null?[...A,[u(E,g),"[]"].join("")]:[...A,[u(E,g),"[]=",u(N,g)].join("")];case"colon-list-separator":return E=>(A,N)=>N===void 0||g.skipNull&&N===null||g.skipEmptyString&&N===""?A:N===null?[...A,[u(E,g),":list="].join("")]:[...A,[u(E,g),":list=",u(N,g)].join("")];case"comma":case"separator":case"bracket-separator":{const E=g.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(N,D)=>D===void 0||g.skipNull&&D===null||g.skipEmptyString&&D===""?N:(D=D===null?"":D,N.length===0?[[u(A,g),E,u(D,g)].join("")]:[[N,u(D,g)].join(g.arrayFormatSeparator)])}default:return E=>(A,N)=>N===void 0||g.skipNull&&N===null||g.skipEmptyString&&N===""?A:N===null?[...A,u(E,g)]:[...A,[u(E,g),"=",u(N,g)].join("")]}}function l(g){let E;switch(g.arrayFormat){case"index":return(A,N,D)=>{if(E=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!E){D[A]=N;return}D[A]===void 0&&(D[A]={}),D[A][E[1]]=N};case"bracket":return(A,N,D)=>{if(E=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!E){D[A]=N;return}if(D[A]===void 0){D[A]=[N];return}D[A]=[].concat(D[A],N)};case"colon-list-separator":return(A,N,D)=>{if(E=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!E){D[A]=N;return}if(D[A]===void 0){D[A]=[N];return}D[A]=[].concat(D[A],N)};case"comma":case"separator":return(A,N,D)=>{const y=typeof N=="string"&&N.includes(g.arrayFormatSeparator),U=typeof N=="string"&&!y&&f(N,g).includes(g.arrayFormatSeparator);N=U?f(N,g):N;const L=y||U?N.split(g.arrayFormatSeparator).map(G=>f(G,g)):N===null?N:f(N,g);D[A]=L};case"bracket-separator":return(A,N,D)=>{const y=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!y){D[A]=N&&f(N,g);return}const U=N===null?[]:N.split(g.arrayFormatSeparator).map(L=>f(L,g));if(D[A]===void 0){D[A]=U;return}D[A]=[].concat(D[A],U)};default:return(A,N,D)=>{if(D[A]===void 0){D[A]=N;return}D[A]=[].concat(D[A],N)}}}function c(g){if(typeof g!="string"||g.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(g,E){return E.encode?E.strict?t(g):encodeURIComponent(g):g}function f(g,E){return E.decode?r(g):g}function d(g){return Array.isArray(g)?g.sort():typeof g=="object"?d(Object.keys(g)).sort((E,A)=>Number(E)-Number(A)).map(E=>g[E]):g}function p(g){const E=g.indexOf("#");return E!==-1&&(g=g.slice(0,E)),g}function h(g){let E="";const A=g.indexOf("#");return A!==-1&&(E=g.slice(A)),E}function m(g){g=p(g);const E=g.indexOf("?");return E===-1?"":g.slice(E+1)}function _(g,E){return E.parseNumbers&&!Number.isNaN(Number(g))&&typeof g=="string"&&g.trim()!==""?g=Number(g):E.parseBooleans&&g!==null&&(g.toLowerCase()==="true"||g.toLowerCase()==="false")&&(g=g.toLowerCase()==="true"),g}function w(g,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),c(E.arrayFormatSeparator);const A=l(E),N=Object.create(null);if(typeof g!="string"||(g=g.trim().replace(/^[?#&]/,""),!g))return N;for(const D of g.split("&")){if(D==="")continue;let[y,U]=n(E.decode?D.replace(/\+/g," "):D,"=");U=U===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?U:f(U,E),A(f(y,E),U,N)}for(const D of Object.keys(N)){const y=N[D];if(typeof y=="object"&&y!==null)for(const U of Object.keys(y))y[U]=_(y[U],E);else N[D]=_(y,E)}return E.sort===!1?N:(E.sort===!0?Object.keys(N).sort():Object.keys(N).sort(E.sort)).reduce((D,y)=>{const U=N[y];return U&&typeof U=="object"&&!Array.isArray(U)?D[y]=d(U):D[y]=U,D},Object.create(null))}e.extract=m,e.parse=w,e.stringify=(g,E)=>{if(!g)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),c(E.arrayFormatSeparator);const A=U=>E.skipNull&&i(g[U])||E.skipEmptyString&&g[U]==="",N=s(E),D={};for(const U of Object.keys(g))A(U)||(D[U]=g[U]);const y=Object.keys(D);return E.sort!==!1&&y.sort(E.sort),y.map(U=>{const L=g[U];return L===void 0?"":L===null?u(U,E):Array.isArray(L)?L.length===0&&E.arrayFormat==="bracket-separator"?u(U,E)+"[]":L.reduce(N(U),[]).join("&"):u(U,E)+"="+u(L,E)}).filter(U=>U.length>0).join("&")},e.parseUrl=(g,E)=>{E=Object.assign({decode:!0},E);const[A,N]=n(g,"#");return Object.assign({url:A.split("?")[0]||"",query:w(m(g),E)},E&&E.parseFragmentIdentifier&&N?{fragmentIdentifier:f(N,E)}:{})},e.stringifyUrl=(g,E)=>{E=Object.assign({encode:!0,strict:!0,[a]:!0},E);const A=p(g.url).split("?")[0]||"",N=e.extract(g.url),D=e.parse(N,{sort:!1}),y=Object.assign(D,g.query);let U=e.stringify(y,E);U&&(U=`?${U}`);let L=h(g.url);return g.fragmentIdentifier&&(L=`#${E[a]?u(g.fragmentIdentifier,E):g.fragmentIdentifier}`),`${A}${U}${L}`},e.pick=(g,E,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[a]:!1},A);const{url:N,query:D,fragmentIdentifier:y}=e.parseUrl(g,A);return e.stringifyUrl({url:N,query:o(D,E),fragmentIdentifier:y},A)},e.exclude=(g,E,A)=>{const N=Array.isArray(E)?D=>!E.includes(D):(D,y)=>!E(D,y);return e.pick(g,N,A)}})(Lp);const MEe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}},mb=":";function zV(e){const[t,r]=e.split(mb);return{namespace:t,reference:r}}function HV(e){const{namespace:t,reference:r}=e;return[t,r].join(mb)}function s8(e){const[t,r,n]=e.split(mb);return{namespace:t,reference:r,address:n}}function VV(e){const{namespace:t,reference:r,address:n}=e;return[t,r,n].join(mb)}function l8(e,t){const r=[];return e.forEach(n=>{const o=t(n);r.includes(o)||r.push(o)}),r}function WV(e){const{address:t}=s8(e);return t}function qV(e){const{namespace:t,reference:r}=s8(e);return HV({namespace:t,reference:r})}function REe(e,t){const{namespace:r,reference:n}=zV(t);return VV({namespace:r,reference:n,address:e})}function NEe(e){return l8(e,WV)}function GV(e){return l8(e,qV)}function FEe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...o.accounts)}),r}function BEe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...GV(o.accounts))}),r}function jEe(e,t=[]){const r=[];return Object.keys(e).forEach(n=>{if(t.length&&!t.includes(n))return;const o=e[n];r.push(...yb(n,o))}),r}function yb(e,t){return e.includes(":")?[e]:t.chains||[]}const bb=e=>e==null?void 0:e.split(":"),KV=e=>{const t=e&&bb(e);if(t)return t[3]},LEe=e=>{const t=e&&bb(e);if(t)return t[2]+":"+t[3]},YV=e=>{const t=e&&bb(e);if(t)return t.pop()},UEe=(e,t)=>{const r=`${e.domain} wants you to sign in with your Ethereum account:`,n=YV(t),o=e.statement,i=`URI: ${e.aud}`,a=`Version: ${e.version}`,s=`Chain ID: ${KV(t)}`,l=`Nonce: ${e.nonce}`,c=`Issued At: ${e.iat}`,u=e.resources&&e.resources.length>0?`Resources: -${e.resources.map(f=>`- ${f}`).join(` -`)}`:void 0;return[r,n,"",o,"",i,a,s,l,c,u].filter(f=>f!=null).join(` -`)},c8="base10",wn="base16",Nm="base64pad",wb="utf8",u8=0,Js=1,zEe=0,pI=1,Bx=12,f8=32;function XV(){const e=n8.generateKeyPair();return{privateKey:Dn(e.secretKey,wn),publicKey:Dn(e.publicKey,wn)}}function Fm(){const e=uf.randomBytes(f8);return Dn(e,wn)}function ZV(e,t){const r=n8.sharedKey(On(e,wn),On(t,wn)),n=new gEe(gb.SHA256,r).expand(f8);return Dn(n,wn)}function JV(e){const t=gb.hash(On(e,wn));return Dn(t,wn)}function Up(e){const t=gb.hash(On(e,wb));return Dn(t,wn)}function QV(e){return On(`${e}`,c8)}function df(e){return Number(Dn(e,c8))}function eW(e){const t=QV(typeof e.type<"u"?e.type:u8);if(df(t)===Js&&typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof e.senderPublicKey<"u"?On(e.senderPublicKey,wn):void 0,n=typeof e.iv<"u"?On(e.iv,wn):uf.randomBytes(Bx),o=new t8.ChaCha20Poly1305(On(e.symKey,wn)).seal(n,On(e.message,wb));return rW({type:t,sealed:o,iv:n,senderPublicKey:r})}function tW(e){const t=new t8.ChaCha20Poly1305(On(e.symKey,wn)),{sealed:r,iv:n}=xb(e.encoded),o=t.open(n,r);if(o===null)throw new Error("Failed to decrypt");return Dn(o,wb)}function rW(e){if(df(e.type)===Js){if(typeof e.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Dn(Rx([e.type,e.senderPublicKey,e.iv,e.sealed]),Nm)}return Dn(Rx([e.type,e.iv,e.sealed]),Nm)}function xb(e){const t=On(e,Nm),r=t.slice(zEe,pI),n=pI;if(df(r)===Js){const s=n+f8,l=s+Bx,c=t.slice(n,s),u=t.slice(s,l),f=t.slice(l);return{type:r,sealed:f,iv:u,senderPublicKey:c}}const o=n+Bx,i=t.slice(n,o),a=t.slice(o);return{type:r,sealed:a,iv:i}}function nW(e,t){const r=xb(e);return d8({type:df(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Dn(r.senderPublicKey,wn):void 0,receiverPublicKey:t==null?void 0:t.receiverPublicKey})}function d8(e){const t=(e==null?void 0:e.type)||u8;if(t===Js){if(typeof(e==null?void 0:e.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(e==null?void 0:e.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:e==null?void 0:e.senderPublicKey,receiverPublicKey:e==null?void 0:e.receiverPublicKey}}function jx(e){return e.type===Js&&typeof e.senderPublicKey=="string"&&typeof e.receiverPublicKey=="string"}var HEe=Object.defineProperty,hI=Object.getOwnPropertySymbols,VEe=Object.prototype.hasOwnProperty,WEe=Object.prototype.propertyIsEnumerable,vI=(e,t,r)=>t in e?HEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gI=(e,t)=>{for(var r in t||(t={}))VEe.call(t,r)&&vI(e,r,t[r]);if(hI)for(var r of hI(t))WEe.call(t,r)&&vI(e,r,t[r]);return e};const oW="ReactNative",eu={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Bm=" ",qEe=":",iW="/",p8=2,GEe=1e3,aW="js";function h8(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function sW(){return!jV()&&!!o8()&&navigator.product===oW}function lW(){return!h8()&&!!o8()}function v8(){return sW()?eu.reactNative:h8()?eu.node:lW()?eu.browser:eu.unknown}function cW(e,t){let r=Lp.parse(e);return r=gI(gI({},r),t),e=Lp.stringify(r),e}function uW(){return LV()||{name:"",description:"",url:"",icons:[""]}}function KEe(e,t){var r;const n=v8(),o={protocol:e,version:t,env:n};return n==="browser"&&(o.host=((r=i8())==null?void 0:r.host)||"unknown"),o}function fW(){const e=G4();if(e===null)return"unknown";const t=e.os?e.os.replace(" ","").toLowerCase():"unknown";return e.type==="browser"?[t,e.name,e.version].join("-"):[t,e.version].join("-")}function dW(){var e;const t=v8();return t===eu.browser?[t,((e=i8())==null?void 0:e.host)||"unknown"].join(":"):t}function pW(e,t,r){const n=fW(),o=dW();return[[e,t].join("-"),[aW,r].join("-"),n,o].join("/")}function hW({protocol:e,version:t,relayUrl:r,sdkVersion:n,auth:o,projectId:i,useOnCloseEvent:a}){const s=r.split("?"),l=pW(e,t,n),c={auth:o,ua:l,projectId:i,useOnCloseEvent:a||void 0},u=cW(s[1]||"",c);return s[0]+"?"+u}function YEe(e){let t=(e.match(/^[^:]+(?=:\/\/)/gi)||[])[0];const r=typeof t<"u"?e.split("://")[1]:e;return t=t==="wss"?"https":"http",[t,r].join("://")}function XEe(e,t,r){if(!e[t]||typeof e[t]!==r)throw new Error(`Missing or invalid "${t}" param`)}function vW(e,t=p8){return gW(e.split(iW),t)}function ZEe(e){return vW(e).join(Bm)}function vs(e,t){return e.filter(r=>t.includes(r)).length===e.length}function gW(e,t=p8){return e.slice(Math.max(e.length-t,0))}function g8(e){return Object.fromEntries(e.entries())}function m8(e){return new Map(Object.entries(e))}function JEe(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=t(e[n])}),r}const QEe=e=>e;function mW(e){return e.trim().replace(/^\w/,t=>t.toUpperCase())}function eSe(e){return e.split(Bm).map(t=>mW(t)).join(Bm)}function os(e=pt.FIVE_MINUTES,t){const r=pt.toMiliseconds(e||pt.FIVE_MINUTES);let n,o,i;return{resolve:a=>{i&&n&&(clearTimeout(i),n(a))},reject:a=>{i&&o&&(clearTimeout(i),o(a))},done:()=>new Promise((a,s)=>{i=setTimeout(()=>{s(new Error(t))},r),n=a,o=s})}}function zp(e,t,r){return new Promise(async(n,o)=>{const i=setTimeout(()=>o(new Error(r)),t);try{const a=await e;n(a)}catch(a){o(a)}clearTimeout(i)})}function y8(e,t){if(typeof t=="string"&&t.startsWith(`${e}:`))return t;if(e.toLowerCase()==="topic"){if(typeof t!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}else if(e.toLowerCase()==="id"){if(typeof t!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${e}`)}function yW(e){return y8("topic",e)}function bW(e){return y8("id",e)}function b8(e){const[t,r]=e.split(":"),n={id:void 0,topic:void 0};if(t==="topic"&&typeof r=="string")n.topic=r;else if(t==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return n}function jo(e,t){return pt.fromMiliseconds((t||Date.now())+pt.toMiliseconds(e))}function la(e){return Date.now()>=pt.toMiliseconds(e)}function rr(e,t){return`${e}${t?`:${t}`:""}`}const wW="irn";function jm(e){return(e==null?void 0:e.relay)||{protocol:wW}}function Gd(e){const t=MEe[e];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${e}`);return t}var tSe=Object.defineProperty,mI=Object.getOwnPropertySymbols,rSe=Object.prototype.hasOwnProperty,nSe=Object.prototype.propertyIsEnumerable,yI=(e,t,r)=>t in e?tSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oSe=(e,t)=>{for(var r in t||(t={}))rSe.call(t,r)&&yI(e,r,t[r]);if(mI)for(var r of mI(t))nSe.call(t,r)&&yI(e,r,t[r]);return e};function xW(e,t="-"){const r={},n="relay"+t;return Object.keys(e).forEach(o=>{if(o.startsWith(n)){const i=o.replace(n,""),a=e[o];r[i]=a}}),r}function _W(e){const t=e.indexOf(":"),r=e.indexOf("?")!==-1?e.indexOf("?"):void 0,n=e.substring(0,t),o=e.substring(t+1,r).split("@"),i=typeof r<"u"?e.substring(r):"",a=Lp.parse(i);return{protocol:n,topic:o[0],version:parseInt(o[1],10),symKey:a.symKey,relay:xW(a)}}function EW(e,t="-"){const r="relay",n={};return Object.keys(e).forEach(o=>{const i=r+t+o;e[o]&&(n[i]=e[o])}),n}function SW(e){return`${e.protocol}:${e.topic}@${e.version}?`+Lp.stringify(oSe({symKey:e.symKey},EW(e.relay)))}function cc(e){const t=[];return e.forEach(r=>{const[n,o]=r.split(":");t.push(`${n}:${o}`)}),t}function CW(e){const t=[];return Object.values(e).forEach(r=>{t.push(...cc(r.accounts))}),t}function PW(e,t){const r=[];return Object.values(e).forEach(n=>{cc(n.accounts).includes(t)&&r.push(...n.methods)}),r}function OW(e,t){const r=[];return Object.values(e).forEach(n=>{cc(n.accounts).includes(t)&&r.push(...n.events)}),r}function kW(e,t){const r=Kd(e,t);if(r)throw new Error(r.message);const n={};for(const[o,i]of Object.entries(e))n[o]={methods:i.methods,events:i.events,chains:i.accounts.map(a=>`${a.split(":")[0]}:${a.split(":")[1]}`)};return n}const iSe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},aSe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Xe(e,t){const{message:r,code:n}=aSe[e];return{message:t?`${r} ${t}`:r,code:n}}function mr(e,t){const{message:r,code:n}=iSe[e];return{message:t?`${r} ${t}`:r,code:n}}function pf(e,t){return Array.isArray(e)?typeof t<"u"&&e.length?e.every(t):!0:!1}function mu(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function on(e){return typeof e>"u"}function yr(e,t){return t&&on(e)?!0:typeof e=="string"&&!!e.trim().length}function _b(e,t){return t&&on(e)?!0:typeof e=="number"&&!isNaN(e)}function AW(e,t){const{requiredNamespaces:r}=t,n=Object.keys(e.namespaces),o=Object.keys(r);let i=!0;return vs(o,n)?(n.forEach(a=>{const{accounts:s,methods:l,events:c}=e.namespaces[a],u=cc(s),f=r[a];(!vs(yb(a,f),u)||!vs(f.methods,l)||!vs(f.events,c))&&(i=!1)}),i):!1}function Eb(e){return yr(e,!1)&&e.includes(":")?e.split(":").length===2:!1}function IW(e){if(yr(e,!1)&&e.includes(":")){const t=e.split(":");if(t.length===3){const r=t[0]+":"+t[1];return!!t[2]&&Eb(r)}}return!1}function $W(e){if(yr(e,!1))try{return typeof new URL(e)<"u"}catch{return!1}return!1}function TW(e){var t;return(t=e==null?void 0:e.proposer)==null?void 0:t.publicKey}function DW(e){return e==null?void 0:e.topic}function MW(e,t){let r=null;return yr(e==null?void 0:e.publicKey,!1)||(r=Xe("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}function Lx(e){let t=!0;return pf(e)?e.length&&(t=e.every(r=>yr(r,!1))):t=!1,t}function RW(e,t,r){let n=null;return pf(t)?t.forEach(o=>{n||(!Eb(o)||!o.includes(e))&&(n=mr("UNSUPPORTED_CHAINS",`${r}, chain ${o} should be a string and conform to "namespace:chainId" format`))}):n=mr("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),n}function NW(e,t){let r=null;return Object.entries(e).forEach(([n,o])=>{if(r)return;const i=RW(n,yb(n,o),`${t} requiredNamespace`);i&&(r=i)}),r}function FW(e,t){let r=null;return pf(e)?e.forEach(n=>{r||IW(n)||(r=mr("UNSUPPORTED_ACCOUNTS",`${t}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=mr("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function BW(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=FW(n==null?void 0:n.accounts,`${t} namespace`);o&&(r=o)}),r}function jW(e,t){let r=null;return Lx(e==null?void 0:e.methods)?Lx(e==null?void 0:e.events)||(r=mr("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=mr("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}function w8(e,t){let r=null;return Object.values(e).forEach(n=>{if(r)return;const o=jW(n,`${t}, namespace`);o&&(r=o)}),r}function LW(e,t,r){let n=null;if(e&&mu(e)){const o=w8(e,t);o&&(n=o);const i=NW(e,t);i&&(n=i)}else n=Xe("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return n}function Kd(e,t){let r=null;if(e&&mu(e)){const n=w8(e,t);n&&(r=n);const o=BW(e,t);o&&(r=o)}else r=Xe("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function x8(e){return yr(e.protocol,!0)}function UW(e,t){let r=!1;return t&&!e?r=!0:e&&pf(e)&&e.length&&e.forEach(n=>{r=x8(n)}),r}function zW(e){return typeof e=="number"}function pn(e){return typeof e<"u"&&typeof e!==null}function HW(e){return!(!e||typeof e!="object"||!e.code||!_b(e.code,!1)||!e.message||!yr(e.message,!1))}function VW(e){return!(on(e)||!yr(e.method,!1))}function WW(e){return!(on(e)||on(e.result)&&on(e.error)||!_b(e.id,!1)||!yr(e.jsonrpc,!1))}function qW(e){return!(on(e)||!yr(e.name,!1))}function Ux(e,t){return!(!Eb(t)||!CW(e).includes(t))}function GW(e,t,r){return yr(r,!1)?PW(e,t).includes(r):!1}function KW(e,t,r){return yr(r,!1)?OW(e,t).includes(r):!1}function zx(e,t,r){let n=null;const o=sSe(e),i=lSe(t),a=Object.keys(o),s=Object.keys(i),l=bI(Object.keys(e)),c=bI(Object.keys(t)),u=l.filter(f=>!c.includes(f));return u.length&&(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. - Required: ${u.toString()} - Received: ${Object.keys(t).toString()}`)),vs(a,s)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. - Required: ${a.toString()} - Approved: ${s.toString()}`)),Object.keys(t).forEach(f=>{if(!f.includes(":")||n)return;const d=cc(t[f].accounts);d.includes(f)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${f} - Required: ${f} - Approved: ${d.toString()}`))}),a.forEach(f=>{n||(vs(o[f].methods,i[f].methods)?vs(o[f].events,i[f].events)||(n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=Xe("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function sSe(e){const t={};return Object.keys(e).forEach(r=>{var n;r.includes(":")?t[r]=e[r]:(n=e[r].chains)==null||n.forEach(o=>{t[o]={methods:e[r].methods,events:e[r].events}})}),t}function bI(e){return[...new Set(e.map(t=>t.includes(":")?t.split(":")[0]:t))]}function lSe(e){const t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{const n=cc(e[r].accounts);n==null||n.forEach(o=>{t[o]={accounts:e[r].accounts.filter(i=>i.includes(`${o}:`)),methods:e[r].methods,events:e[r].events}})}}),t}function YW(e,t){return _b(e,!1)&&e<=t.max&&e>=t.min}const cSe=Object.freeze(Object.defineProperty({__proto__:null,BASE10:c8,BASE16:wn,BASE64:Nm,COLON:qEe,DEFAULT_DEPTH:p8,EMPTY_SPACE:Bm,ENV_MAP:eu,ONE_THOUSAND:GEe,REACT_NATIVE_PRODUCT:oW,RELAYER_DEFAULT_PROTOCOL:wW,SDK_TYPE:aW,SLASH:iW,TYPE_0:u8,TYPE_1:Js,UTF8:wb,appendToQueryString:cW,assertType:XEe,calcExpiry:jo,capitalize:eSe,capitalizeWord:mW,createDelayedPromise:os,createExpiringPromise:zp,decodeTypeByte:df,decrypt:tW,deriveSymKey:ZV,deserialize:xb,encodeTypeByte:QV,encrypt:eW,engineEvent:rr,enumify:QEe,formatAccountId:VV,formatAccountWithChain:REe,formatChainId:HV,formatExpirerTarget:y8,formatIdTarget:bW,formatMessage:UEe,formatMessageContext:ZEe,formatRelayParams:EW,formatRelayRpcUrl:hW,formatTopicTarget:yW,formatUA:pW,formatUri:SW,generateKeyPair:XV,generateRandomBytes32:Fm,getAccountsChains:cc,getAccountsFromNamespaces:FEe,getAddressFromAccount:WV,getAddressesFromAccounts:NEe,getAppMetadata:uW,getChainFromAccount:qV,getChainsFromAccounts:GV,getChainsFromNamespace:yb,getChainsFromNamespaces:BEe,getChainsFromRequiredNamespaces:jEe,getDidAddress:YV,getDidAddressSegments:bb,getDidChainId:KV,getEnvironment:v8,getHttpUrl:YEe,getInternalError:Xe,getJavascriptID:dW,getJavascriptOS:fW,getLastItems:gW,getNamespacedDidChainId:LEe,getNamespacesChains:CW,getNamespacesEventsForChainId:OW,getNamespacesMethodsForChainId:PW,getRelayClientMetadata:KEe,getRelayProtocolApi:Gd,getRelayProtocolName:jm,getRequiredNamespacesFromNamespaces:kW,getSdkError:mr,getUniqueValues:l8,hasOverlap:vs,hashKey:JV,hashMessage:Up,isBrowser:lW,isConformingNamespaces:zx,isExpired:la,isNode:h8,isProposalStruct:TW,isReactNative:sW,isSessionCompatible:AW,isSessionStruct:DW,isTypeOneEnvelope:jx,isUndefined:on,isValidAccountId:IW,isValidAccounts:FW,isValidActions:jW,isValidArray:pf,isValidChainId:Eb,isValidChains:RW,isValidController:MW,isValidErrorReason:HW,isValidEvent:qW,isValidId:zW,isValidNamespaceAccounts:BW,isValidNamespaceActions:w8,isValidNamespaceChains:NW,isValidNamespaceMethodsOrEvents:Lx,isValidNamespaces:Kd,isValidNamespacesChainId:Ux,isValidNamespacesEvent:KW,isValidNamespacesRequest:GW,isValidNumber:_b,isValidObject:mu,isValidParams:pn,isValidRelay:x8,isValidRelays:UW,isValidRequest:VW,isValidRequestExpiry:YW,isValidRequiredNamespaces:LW,isValidResponse:WW,isValidString:yr,isValidUrl:$W,mapEntries:JEe,mapToObj:g8,objToMap:m8,parseAccountId:s8,parseChainId:zV,parseContextNames:vW,parseExpirerTarget:b8,parseRelayParams:xW,parseUri:_W,serialize:rW,validateDecoding:nW,validateEncoding:d8},Symbol.toStringTag,{value:"Module"})),uSe="PARSE_ERROR",fSe="INVALID_REQUEST",dSe="METHOD_NOT_FOUND",pSe="INVALID_PARAMS",XW="INTERNAL_ERROR",_8="SERVER_ERROR",hSe=[-32700,-32600,-32601,-32602,-32603],Yd={[uSe]:{code:-32700,message:"Parse error"},[fSe]:{code:-32600,message:"Invalid Request"},[dSe]:{code:-32601,message:"Method not found"},[pSe]:{code:-32602,message:"Invalid params"},[XW]:{code:-32603,message:"Internal error"},[_8]:{code:-32e3,message:"Server error"}},ZW=_8;function vSe(e){return hSe.includes(e)}function wI(e){return Object.keys(Yd).includes(e)?Yd[e]:Yd[ZW]}function gSe(e){const t=Object.values(Yd).find(r=>r.code===e);return t||Yd[ZW]}function mSe(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}var JW={},ea={},xI;function ySe(){if(xI)return ea;xI=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.isBrowserCryptoAvailable=ea.getSubtleCrypto=ea.getBrowerCrypto=void 0;function e(){return(Le==null?void 0:Le.crypto)||(Le==null?void 0:Le.msCrypto)||{}}ea.getBrowerCrypto=e;function t(){const n=e();return n.subtle||n.webkitSubtle}ea.getSubtleCrypto=t;function r(){return!!e()&&!!t()}return ea.isBrowserCryptoAvailable=r,ea}var ta={},_I;function bSe(){if(_I)return ta;_I=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.isBrowser=ta.isNode=ta.isReactNative=void 0;function e(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ta.isReactNative=e;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ta.isNode=t;function r(){return!e()&&!t()}return ta.isBrowser=r,ta}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(ySe(),e),t.__exportStar(bSe(),e)})(JW);function wSe(e=3){const t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function Sb(e,t,r){return{id:r||wSe(),jsonrpc:"2.0",method:e,params:t}}function E8(e,t){return{id:e,jsonrpc:"2.0",result:t}}function S8(e,t,r){return{id:e,jsonrpc:"2.0",error:xSe(t,r)}}function xSe(e,t){return typeof e>"u"?wI(XW):(typeof e=="string"&&(e=Object.assign(Object.assign({},wI(_8)),{message:e})),typeof t<"u"&&(e.data=t),vSe(e.code)&&(e=gSe(e.code)),e)}class _Se{}class ESe extends _Se{constructor(){super()}}class SSe extends ESe{constructor(t){super()}}const CSe="^wss?:";function PSe(e){const t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function OSe(e,t){const r=PSe(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function EI(e){return OSe(e,CSe)}function kSe(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function QW(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function C8(e){return QW(e)&&"method"in e}function P8(e){return QW(e)&&(ia(e)||Lo(e))}function ia(e){return"result"in e}function Lo(e){return"error"in e}class ASe extends SSe{constructor(t){super(t),this.events=new ni.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(Sb(t.method,t.params||[]),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{Lo(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),P8(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const SI=10,ISe=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),$Se=()=>typeof window<"u",TSe=ISe();class DSe{constructor(t){if(this.url=t,this.events=new ni.EventEmitter,this.registering=!1,!EI(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,r)=>{if(typeof this.socket>"u"){r(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),t()},this.socket.close()})}async send(t,r){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(J4(t))}catch(n){this.onError(t.id,n)}}register(t=this.url){if(!EI(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{const o=JW.isReactNative()?void 0:{rejectUnauthorized:!kSe(t)},i=new TSe(t,[],o);$Se()?i.onerror=a=>{const s=a;n(this.emitError(s.error))}:i.on("error",a=>{n(this.emitError(a))}),i.onopen=()=>{this.onOpen(i),r(i)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r=typeof t.data=="string"?yV(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const n=this.parseError(r),o=n.message||n.toString(),i=S8(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return mSe(t,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>SI&&this.events.setMaxListeners(SI)}emitError(t){const r=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}var Lm={exports:{}};Lm.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",h="[object GeneratorFunction]",m="[object Map]",_="[object Number]",w="[object Null]",g="[object Object]",E="[object Promise]",A="[object Proxy]",N="[object RegExp]",D="[object Set]",y="[object String]",U="[object Symbol]",L="[object Undefined]",G="[object WeakMap]",V="[object ArrayBuffer]",S="[object DataView]",C="[object Float32Array]",v="[object Float64Array]",b="[object Int8Array]",B="[object Int16Array]",T="[object Int32Array]",j="[object Uint8Array]",H="[object Uint8ClampedArray]",P="[object Uint16Array]",F="[object Uint32Array]",$=/[\\^$.*+?()[\]{}|]/g,q=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,te={};te[C]=te[v]=te[b]=te[B]=te[T]=te[j]=te[H]=te[P]=te[F]=!0,te[s]=te[l]=te[V]=te[u]=te[S]=te[f]=te[d]=te[p]=te[m]=te[_]=te[g]=te[N]=te[D]=te[y]=te[G]=!1;var ae=typeof Le=="object"&&Le&&Le.Object===Object&&Le,ce=typeof self=="object"&&self&&self.Object===Object&&self,ie=ae||ce||Function("return this")(),ue=t&&!t.nodeType&&t,O=ue&&!0&&e&&!e.nodeType&&e,K=O&&O.exports===ue,ee=K&&ae.process,se=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),pe=se&&se.isTypedArray;function ge(ye,Pe){for(var Fe=-1,nt=ye==null?0:ye.length,Ht=0,xt=[];++Fe-1}function ii(ye,Pe){var Fe=this.__data__,nt=eh(Fe,ye);return nt<0?(++this.size,Fe.push([ye,Pe])):Fe[nt][1]=Pe,this}ct.prototype.clear=Pt,ct.prototype.delete=En,ct.prototype.get=Fn,ct.prototype.has=cn,ct.prototype.set=ii;function un(ye){var Pe=-1,Fe=ye==null?0:ye.length;for(this.clear();++Pewr))return!1;var Zt=xt.get(ye);if(Zt&&xt.get(Pe))return Zt==Pe;var Bn=-1,Ao=!0,Gr=Fe&i?new oo:void 0;for(xt.set(ye,Pe),xt.set(Pe,ye);++Bn-1&&ye%1==0&&ye-1&&ye%1==0&&ye<=a}function eS(ye){var Pe=typeof ye;return ye!=null&&(Pe=="object"||Pe=="function")}function $f(ye){return ye!=null&&typeof ye=="object"}var tS=pe?Z(pe):oZ;function yZ(ye){return gZ(ye)?eZ(ye):iZ(ye)}function bZ(){return[]}function wZ(){return!1}e.exports=mZ})(Lm,Lm.exports);var MSe=Lm.exports;const RSe=ri(MSe);function NSe(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,A=new Uint8Array(E);w!==g;){for(var N=h[w],D=0,y=E-1;(N!==0||D<_)&&y!==-1;y--,D++)N+=256*A[y]>>>0,A[y]=N%s>>>0,N=N/s>>>0;if(N!==0)throw new Error("Non-zero carry");_=D,w++}for(var U=E-_;U!==E&&A[U]===0;)U++;for(var L=l.repeat(m);U>>0,E=new Uint8Array(g);h[m];){var A=r[h.charCodeAt(m)];if(A===255)return;for(var N=0,D=g-1;(A!==0||N>>0,E[D]=A%256>>>0,A=A/256>>>0;if(A!==0)throw new Error("Non-zero carry");w=N,m++}if(h[m]!==" "){for(var y=g-w;y!==g&&E[y]===0;)y++;for(var U=new Uint8Array(_+(g-y)),L=_;y!==g;)U[L++]=E[y++];return U}}}function p(h){var m=d(h);if(m)return m;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:d,decode:p}}var FSe=NSe,BSe=FSe;const eq=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},jSe=e=>new TextEncoder().encode(e),LSe=e=>new TextDecoder().decode(e);class USe{constructor(t,r,n){this.name=t,this.prefix=r,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class zSe{constructor(t,r,n){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return tq(this,t)}}class HSe{constructor(t){this.decoders=t}or(t){return tq(this,t)}decode(t){const r=t[0],n=this.decoders[r];if(n)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const tq=(e,t)=>new HSe({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class VSe{constructor(t,r,n,o){this.name=t,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new USe(t,r,n),this.decoder=new zSe(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const Cb=({name:e,prefix:t,encode:r,decode:n})=>new VSe(e,t,r,n),D0=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:o}=BSe(r,t);return Cb({prefix:e,name:t,encode:n,decode:i=>eq(o(i))})},WSe=(e,t,r,n)=>{const o={};for(let u=0;u=8&&(s-=8,a[c++]=255&l>>s)}if(s>=r||255&l<<8-s)throw new SyntaxError("Unexpected end of data");return a},qSe=(e,t,r)=>{const n=t[t.length-1]==="=",o=(1<r;)a-=r,i+=t[o&s>>a];if(a&&(i+=t[o&s<Cb({prefix:t,name:e,encode(o){return qSe(o,n,r)},decode(o){return WSe(o,n,r,e)}}),GSe=Cb({prefix:"\0",name:"identity",encode:e=>LSe(e),decode:e=>jSe(e)});var KSe=Object.freeze({__proto__:null,identity:GSe});const YSe=Vr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var XSe=Object.freeze({__proto__:null,base2:YSe});const ZSe=Vr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var JSe=Object.freeze({__proto__:null,base8:ZSe});const QSe=D0({prefix:"9",name:"base10",alphabet:"0123456789"});var e9e=Object.freeze({__proto__:null,base10:QSe});const t9e=Vr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),r9e=Vr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var n9e=Object.freeze({__proto__:null,base16:t9e,base16upper:r9e});const o9e=Vr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),i9e=Vr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),a9e=Vr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),s9e=Vr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),l9e=Vr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),c9e=Vr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),u9e=Vr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),f9e=Vr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),d9e=Vr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var p9e=Object.freeze({__proto__:null,base32:o9e,base32upper:i9e,base32pad:a9e,base32padupper:s9e,base32hex:l9e,base32hexupper:c9e,base32hexpad:u9e,base32hexpadupper:f9e,base32z:d9e});const h9e=D0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),v9e=D0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var g9e=Object.freeze({__proto__:null,base36:h9e,base36upper:v9e});const m9e=D0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),y9e=D0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var b9e=Object.freeze({__proto__:null,base58btc:m9e,base58flickr:y9e});const w9e=Vr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),x9e=Vr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),_9e=Vr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),E9e=Vr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var S9e=Object.freeze({__proto__:null,base64:w9e,base64pad:x9e,base64url:_9e,base64urlpad:E9e});const rq=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),C9e=rq.reduce((e,t,r)=>(e[r]=t,e),[]),P9e=rq.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function O9e(e){return e.reduce((t,r)=>(t+=C9e[r],t),"")}function k9e(e){const t=[];for(const r of e){const n=P9e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(n)}return new Uint8Array(t)}const A9e=Cb({prefix:"🚀",name:"base256emoji",encode:O9e,decode:k9e});var I9e=Object.freeze({__proto__:null,base256emoji:A9e}),$9e=nq,CI=128,T9e=127,D9e=~T9e,M9e=Math.pow(2,31);function nq(e,t,r){t=t||[],r=r||0;for(var n=r;e>=M9e;)t[r++]=e&255|CI,e/=128;for(;e&D9e;)t[r++]=e&255|CI,e>>>=7;return t[r]=e|0,nq.bytes=r-n+1,t}var R9e=Hx,N9e=128,PI=127;function Hx(e,n){var r=0,n=n||0,o=0,i=n,a,s=e.length;do{if(i>=s)throw Hx.bytes=0,new RangeError("Could not decode varint");a=e[i++],r+=o<28?(a&PI)<=N9e);return Hx.bytes=i-n,r}var F9e=Math.pow(2,7),B9e=Math.pow(2,14),j9e=Math.pow(2,21),L9e=Math.pow(2,28),U9e=Math.pow(2,35),z9e=Math.pow(2,42),H9e=Math.pow(2,49),V9e=Math.pow(2,56),W9e=Math.pow(2,63),q9e=function(e){return e(oq.encode(e,t,r),t),kI=e=>oq.encodingLength(e),Vx=(e,t)=>{const r=t.byteLength,n=kI(e),o=n+kI(r),i=new Uint8Array(o+r);return OI(e,i,0),OI(r,i,n),i.set(t,o),new K9e(e,r,t,i)};class K9e{constructor(t,r,n,o){this.code=t,this.size=r,this.digest=n,this.bytes=o}}const iq=({name:e,code:t,encode:r})=>new Y9e(e,t,r);class Y9e{constructor(t,r,n){this.name=t,this.code=r,this.encode=n}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?Vx(this.code,r):r.then(n=>Vx(this.code,n))}else throw Error("Unknown type, must be binary type")}}const aq=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),X9e=iq({name:"sha2-256",code:18,encode:aq("SHA-256")}),Z9e=iq({name:"sha2-512",code:19,encode:aq("SHA-512")});var J9e=Object.freeze({__proto__:null,sha256:X9e,sha512:Z9e});const sq=0,Q9e="identity",lq=eq,e7e=e=>Vx(sq,lq(e)),t7e={code:sq,name:Q9e,encode:lq,digest:e7e};var r7e=Object.freeze({__proto__:null,identity:t7e});new TextEncoder,new TextDecoder;const AI={...KSe,...XSe,...JSe,...e9e,...n9e,...p9e,...g9e,...b9e,...S9e,...I9e};({...J9e,...r7e});function n7e(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}function cq(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}const II=cq("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),Hw=cq("ascii","a",e=>{let t="a";for(let r=0;r{e=e.substring(1);const t=n7e(e.length);for(let r=0;r{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:i}=Xe("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(i)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=t,this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,g8(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?m8(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class D7e{constructor(t,r,n){this.core=t,this.logger=r,this.name=c7e,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),i=sI(o);return DV(i.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=XV();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const i=await this.getClientSeed(),a=sI(i),s=Fm();return await nEe(s,o,u7e,a)},this.generateSharedKey=(o,i,a)=>{this.isInitialized();const s=this.getPrivateKey(o),l=ZV(s,i);return this.setSymKey(l,a)},this.setSymKey=async(o,i)=>{this.isInitialized();const a=i||JV(o);return await this.keychain.set(a,o),a},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,i,a)=>{this.isInitialized();const s=d8(a),l=J4(i);if(jx(s)){const d=s.senderPublicKey,p=s.receiverPublicKey;o=await this.generateSharedKey(d,p)}const c=this.getSymKey(o),{type:u,senderPublicKey:f}=s;return eW({type:u,symKey:c,message:l,senderPublicKey:f})},this.decode=async(o,i,a)=>{this.isInitialized();const s=nW(i,a);if(jx(s)){const u=s.receiverPublicKey,f=s.senderPublicKey;o=await this.generateSharedKey(u,f)}const l=this.getSymKey(o),c=tW({symKey:l,encoded:i});return yV(c)},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.keychain=n||new T7e(this.core,this.logger)}get context(){return Mt.getLoggerContext(this.logger)}getPayloadType(t){const r=xb(t);return df(r.type)}async setPrivateKey(t,r){return await this.keychain.set(t,r),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get($I)}catch{t=Fm(),await this.keychain.set($I,t)}return i7e(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}let M7e=class extends l4e{constructor(t,r){super(t,r),this.logger=t,this.core=r,this.messages=new Map,this.name=p7e,this.version=h7e,this.initialized=!1,this.storagePrefix=Us,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const i=Up(o);let a=this.messages.get(n);return typeof a>"u"&&(a={}),typeof a[i]<"u"||(a[i]=o,this.messages.set(n,a),await this.persist()),i},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const i=this.get(n),a=Up(o);return typeof i[a]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Mt.generateChildLogger(t,this.name),this.core=r}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,g8(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?m8(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}};class R7e extends c4e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.events=new ni.EventEmitter,this.name=g7e,this.queue=new Map,this.publishTimeout=1e4,this.publish=async(n,o,i)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}});try{const a=(i==null?void 0:i.ttl)||v7e,s=jm(i),l=(i==null?void 0:i.prompt)||!1,c=(i==null?void 0:i.tag)||0,u={topic:n,message:o,opts:{ttl:a,relay:s,prompt:l,tag:c}},f=Up(o);this.queue.set(f,u);try{await await zp(this.rpcPublish(n,o,a,s,l,c),this.publishTimeout),this.relayer.events.emit(xr.publish,u)}catch{this.logger.debug("Publishing Payload stalled"),this.relayer.events.emit(xr.connection_stalled);return}this.onPublish(f,u),this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:i}})}catch(a){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(a),a}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.registerEventListeners()}get context(){return Mt.getLoggerContext(this.logger)}rpcPublish(t,r,n,o,i,a){var s,l,c,u;const f={method:Gd(o.protocol).publish,params:{topic:t,message:r,ttl:n,prompt:i,tag:a}};return on((s=f.params)==null?void 0:s.prompt)&&((l=f.params)==null||delete l.prompt),on((c=f.params)==null?void 0:c.tag)&&((u=f.params)==null||delete u.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:f}),this.relayer.request(f)}onPublish(t,r){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{const{topic:r,message:n,opts:o}=t;await this.publish(r,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(I0.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class N7e{constructor(){this.map=new Map,this.set=(t,r)=>{const n=this.get(t);this.exists(t,r)||this.map.set(t,[...n,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const n=this.get(t);if(!this.exists(t,r))return;const o=n.filter(i=>i!==r);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var F7e=Object.defineProperty,B7e=Object.defineProperties,j7e=Object.getOwnPropertyDescriptors,TI=Object.getOwnPropertySymbols,L7e=Object.prototype.hasOwnProperty,U7e=Object.prototype.propertyIsEnumerable,DI=(e,t,r)=>t in e?F7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cd=(e,t)=>{for(var r in t||(t={}))L7e.call(t,r)&&DI(e,r,t[r]);if(TI)for(var r of TI(t))U7e.call(t,r)&&DI(e,r,t[r]);return e},Vw=(e,t)=>B7e(e,j7e(t));class z7e extends d4e{constructor(t,r){super(t,r),this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new N7e,this.events=new ni.EventEmitter,this.name=E7e,this.version=S7e,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Us,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const i=jm(o),a={topic:n,relay:i};this.pending.set(n,a);const s=await this.rpcSubscribe(n,i);return this.onSubscribe(s,a),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),s}catch(i){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(i),i}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,i)=>{const a=new pt.Watch;a.start(this.pendingSubscriptionWatchLabel);const s=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),o(!0)),a.elapsed(this.pendingSubscriptionWatchLabel)>=C7e&&(clearInterval(s),a.stop(this.pendingSubscriptionWatchLabel),i(!1))},this.pollingInterval)}),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Mt.generateChildLogger(r,this.name),this.clientId=""}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let n=!1;try{n=this.getSubscription(t).topic===r}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,r){const n=this.topicMap.get(t);await Promise.all(n.map(async o=>await this.unsubscribeById(t,o,r)))}async unsubscribeById(t,r,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}});try{const o=jm(n);await this.rpcUnsubscribe(t,r,o);const i=mr("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,r,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,r){const n={method:Gd(r.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await zp(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(xr.connection_stalled)}return Up(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const r=t[0].relay,n={method:Gd(r.protocol).batchSubscribe,params:{topics:t.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await zp(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(xr.connection_stalled)}}rpcUnsubscribe(t,r,n){const o={method:Gd(n.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(t,r){this.setSubscription(t,Vw(cd({},r),{id:t})),this.pending.delete(r.topic)}onBatchSubscribe(t){t.length&&t.forEach(r=>{this.setSubscription(r.id,cd({},r)),this.pending.delete(r.topic)})}async onUnsubscribe(t,r,n){this.events.removeAllListeners(r),this.hasSubscription(r,t)&&this.deleteSubscription(r,n),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,cd({},r)),this.topicMap.set(r.topic,t),this.events.emit(vi.created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const r=this.subscriptions.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});const n=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(n.topic,t),this.events.emit(vi.deleted,Vw(cd({},n),{reason:r}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(vi.sync)}async reset(){if(!this.cached.length)return;const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r"u"||!t.length)return;if(this.subscriptions.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const r=await this.rpcBatchSubscribe(t);pf(r)&&this.onBatchSubscribe(r.map((n,o)=>Vw(cd({},t[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach(r=>{t.push(r)}),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(I0.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(xr.connect,async()=>{await this.onConnect()}),this.relayer.on(xr.disconnect,()=>{this.onDisconnect()}),this.events.on(vi.created,async t=>{const r=vi.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()}),this.events.on(vi.deleted,async t=>{const r=vi.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise(t=>{const r=setInterval(()=>{this.restartInProgress||(clearInterval(r),t())},this.pollingInterval)})}}var H7e=Object.defineProperty,MI=Object.getOwnPropertySymbols,V7e=Object.prototype.hasOwnProperty,W7e=Object.prototype.propertyIsEnumerable,RI=(e,t,r)=>t in e?H7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q7e=(e,t)=>{for(var r in t||(t={}))V7e.call(t,r)&&RI(e,r,t[r]);if(MI)for(var r of MI(t))W7e.call(t,r)&&RI(e,r,t[r]);return e};class G7e extends u4e{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new ni.EventEmitter,this.name=y7e,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async r=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(r)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Mt.generateChildLogger(t.logger,this.name):X4(Mt.getDefaultLoggerOptions({level:t.logger||m7e})),this.messages=new M7e(this.logger,t.core),this.subscriber=new z7e(this,this.logger),this.publisher=new R7e(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||dq,this.projectId=t.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.transportOpen(),this.subscriber.init()]),this.registerEventListeners(),this.initialized=!0}get context(){return Mt.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,r,n){this.isInitialized(),await this.publisher.publish(t,r,n),await this.recordMessageEvent({topic:t,message:r,publishedAt:Date.now()})}async subscribe(t,r){this.isInitialized();let n="";return await Promise.all([new Promise(o=>{this.subscriber.once(vi.created,i=>{i.topic===t&&o()})}),new Promise(async o=>{n=await this.subscriber.subscribe(t,r),o()})]),n}async unsubscribe(t,r){this.isInitialized(),await this.subscriber.unsubscribe(t,r)}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(xr.transport_closed))}async transportOpen(t){if(!this.reconnecting){this.relayUrl=t||this.relayUrl,this.transportExplicitlyClosed=!1,this.reconnecting=!0;try{await Promise.all([new Promise(r=>{this.initialized||r(),this.subscriber.once(vi.resubscribed,()=>{r()})}),await Promise.race([new Promise(async(r,n)=>{await zp(this.provider.connect(),5e3,"socket stalled").catch(o=>n(o)).then(()=>r()).finally(()=>this.removeListener(xr.transport_closed,this.rejectTransportOpen))}),new Promise(r=>this.once(xr.transport_closed,this.rejectTransportOpen))])])}catch(r){this.logger.error(r);const n=r;if(!this.isConnectionStalled(n.message))throw r;this.events.emit(xr.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(t){this.transportExplicitlyClosed||(this.relayUrl=t||this.relayUrl,await this.transportClose(),await this.createProvider(),await this.transportOpen())}isConnectionStalled(t){return this.staleConnectionErrors.some(r=>t.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}async createProvider(){const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new ASe(new DSe(hW({sdkVersion:x7e,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:r,message:n}=t;await this.messages.set(r,n)}async shouldIgnoreMessageEvent(t){const{topic:r,message:n}=t;return await this.subscriber.isSubscribed(r)?this.messages.has(r,n):!0}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),C8(t)){if(!t.method.endsWith(b7e))return;const r=t.params,{topic:n,message:o,publishedAt:i}=r.data,a={topic:n,message:o,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(q7e({type:"event",event:r.id},a)),this.events.emit(r.id,a),await this.acknowledgePayload(t),await this.onMessageEvent(a)}}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(xr.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const r=E8(t.id,!0);await this.provider.connection.send(r)}registerProviderListeners(){this.provider.on(o1.payload,t=>this.onProviderPayload(t)),this.provider.on(o1.connect,()=>{this.events.emit(xr.connect)}),this.provider.on(o1.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(o1.error,t=>{this.logger.error(t),this.events.emit(xr.error,t)})}registerEventListeners(){this.events.on(xr.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(xr.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},pt.toMiliseconds(w7e))}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(t=>{const r=setInterval(()=>{this.connected&&(clearInterval(r),t())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var K7e=Object.defineProperty,NI=Object.getOwnPropertySymbols,Y7e=Object.prototype.hasOwnProperty,X7e=Object.prototype.propertyIsEnumerable,FI=(e,t,r)=>t in e?K7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BI=(e,t)=>{for(var r in t||(t={}))Y7e.call(t,r)&&FI(e,r,t[r]);if(NI)for(var r of NI(t))X7e.call(t,r)&&FI(e,r,t[r]);return e};class Pb extends f4e{constructor(t,r,n,o=Us,i=void 0){super(t,r,n,o),this.core=t,this.logger=r,this.name=n,this.map=new Map,this.version=_7e,this.cached=[],this.initialized=!1,this.storagePrefix=Us,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(a=>{this.getKey&&a!==null&&!on(a)?this.map.set(this.getKey(a),a):TW(a)?this.map.set(a.id,a):DW(a)&&this.map.set(a.topic,a)}),this.cached=[],this.initialized=!0)},this.set=async(a,s)=>{this.isInitialized(),this.map.has(a)?await this.update(a,s):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:a,value:s}),this.map.set(a,s),await this.persist())},this.get=a=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:a}),this.getData(a)),this.getAll=a=>(this.isInitialized(),a?this.values.filter(s=>Object.keys(a).every(l=>RSe(s[l],a[l]))):this.values),this.update=async(a,s)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:a,update:s});const l=BI(BI({},this.getData(a)),s);this.map.set(a,l),await this.persist()},this.delete=async(a,s)=>{this.isInitialized(),this.map.has(a)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:a,reason:s}),this.map.delete(a),await this.persist())},this.logger=Mt.generateChildLogger(r,this.name),this.storagePrefix=o,this.getKey=i}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const r=this.map.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Z7e{constructor(t,r){this.core=t,this.logger=r,this.name=P7e,this.version=O7e,this.events=new dV,this.initialized=!1,this.storagePrefix=Us,this.ignoredPayloadTypes=[Js],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=Fm(),o=await this.core.crypto.setSymKey(n),i=jo(pt.FIVE_MINUTES),a={protocol:fq},s={topic:o,expiry:i,relay:a,active:!1},l=SW({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:a});return await this.pairings.set(o,s),await this.core.relayer.subscribe(o),this.core.expirer.set(o,i),{topic:o,uri:l}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:i,relay:a}=_W(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const s=jo(pt.FIVE_MINUTES),l={topic:o,relay:a,expiry:s,active:!1};return await this.pairings.set(o,l),await this.core.crypto.setSymKey(i,o),await this.core.relayer.subscribe(o,{relay:a}),this.core.expirer.set(o,s),n.activatePairing&&await this.activate({topic:o}),l},this.activate=async({topic:n})=>{this.isInitialized();const o=jo(pt.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const i=await this.sendRequest(o,"wc_pairingPing",{}),{done:a,resolve:s,reject:l}=os();this.events.once(rr("pairing_ping",i),({error:c})=>{c?l(c):s()}),await a()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",mr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,i)=>{const a=Sb(o,i),s=await this.core.crypto.encode(n,a),l=ld[o].req;return this.core.history.set(n,a),await this.core.relayer.publish(n,s,l),a.id},this.sendResult=async(n,o,i)=>{const a=E8(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=ld[l.request.method].res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.sendError=async(n,o,i)=>{const a=S8(n,i),s=await this.core.crypto.encode(o,a),l=await this.core.history.get(o,n),c=ld[l.request.method]?ld[l.request.method].res:ld.unregistered_method.res;await this.core.relayer.publish(o,s,c),await this.core.history.resolve(a)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,mr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>la(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:i}=n,a=i.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingRequest(o,i);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,i);default:return this.onUnknownRpcMethodRequest(o,i)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:i}=n,a=(await this.core.history.get(o,i.id)).request.method;if(this.pairings.keys.includes(o))switch(a){case"wc_pairingPing":return this.onPairingPingResponse(o,i);default:return this.onUnknownRpcMethodResponse(a)}},this.onPairingPingRequest=async(n,o)=>{const{id:i}=o;try{this.isValidPing({topic:n}),await this.sendResult(i,n,!0),this.events.emit("pairing_ping",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onPairingPingResponse=(n,o)=>{const{id:i}=o;setTimeout(()=>{ia(o)?this.events.emit(rr("pairing_ping",i),{}):Lo(o)&&this.events.emit(rr("pairing_ping",i),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:i}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:i,topic:n})}catch(a){await this.sendError(i,n,a),this.logger.error(a)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:i,method:a}=o;try{if(this.registeredMethods.includes(a))return;const s=mr("WC_METHOD_UNSUPPORTED",a);await this.sendError(i,n,s),this.logger.error(s)}catch(s){await this.sendError(i,n,s),this.logger.error(s)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(mr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!pn(n)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!$W(n.uri)){const{message:o}=Xe("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!pn(n)){const{message:i}=Xe("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!pn(n)){const{message:i}=Xe("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(i)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!yr(n,!1)){const{message:o}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(la(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Xe("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=t,this.logger=Mt.generateChildLogger(r,this.name),this.pairings=new Pb(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Mt.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(xr.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(r,n);C8(o)?(this.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):P8(o)&&(await this.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.core.expirer.on(uo.expired,async t=>{const{topic:r}=b8(t.target);r&&this.pairings.keys.includes(r)&&(await this.deletePairing(r,!0),this.events.emit("pairing_expire",{topic:r}))})}}class J7e extends s4e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.records=new Map,this.events=new ni.EventEmitter,this.name=k7e,this.version=A7e,this.cached=[],this.initialized=!1,this.storagePrefix=Us,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,i)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:i}),this.records.has(o.id))return;const a={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:i};this.records.set(a.id,a),this.events.emit(ci.created,a)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=Lo(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(ci.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(i=>{if(i.topic===n){if(typeof o<"u"&&i.id!==o)return;this.records.delete(i.id),this.events.emit(ci.deleted,i)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const n={topic:r.topic,request:Sb(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(n)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const r=this.records.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(n)}return r}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(ci.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(ci.created,t=>{const r=ci.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ci.updated,t=>{const r=ci.updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on(ci.deleted,t=>{const r=ci.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Q7e extends p4e{constructor(t,r){super(t,r),this.core=t,this.logger=r,this.expirations=new Map,this.events=new ni.EventEmitter,this.name=I7e,this.version=$7e,this.cached=[],this.initialized=!1,this.storagePrefix=Us,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const i=this.formatTarget(n),a={target:i,expiry:o};this.expirations.set(i,a),this.checkExpiry(i,a),this.events.emit(uo.created,{target:i,expiration:a})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),i=this.getExpiration(o);this.expirations.delete(o),this.events.emit(uo.deleted,{target:o,expiration:i})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Mt.generateChildLogger(r,this.name)}get context(){return Mt.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return yW(t);if(typeof t=="number")return bW(t);const{message:r}=Xe("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(r)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(uo.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:r}=Xe("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(r),new Error(r)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const r=this.expirations.get(t);if(!r){const{message:n}=Xe("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(n),new Error(n)}return r}checkExpiry(t,r){const{expiry:n}=r;pt.toMiliseconds(n)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(uo.expired,{target:t,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(I0.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(uo.created,t=>{const r=uo.created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(uo.expired,t=>{const r=uo.expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(uo.deleted,t=>{const r=uo.deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}}var eCe=Object.defineProperty,jI=Object.getOwnPropertySymbols,tCe=Object.prototype.hasOwnProperty,rCe=Object.prototype.propertyIsEnumerable,LI=(e,t,r)=>t in e?eCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UI=(e,t)=>{for(var r in t||(t={}))tCe.call(t,r)&&LI(e,r,t[r]);if(jI)for(var r of jI(t))rCe.call(t,r)&&LI(e,r,t[r]);return e};let nCe=class pq extends a4e{constructor(t){super(t),this.protocol=uq,this.version=a7e,this.name=O8,this.events=new ni.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||dq;const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:X4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||s7e.logger}));this.logger=Mt.generateChildLogger(r,this.name),this.heartbeat=new I0.HeartBeat,this.crypto=new D7e(this,this.logger,t==null?void 0:t.keychain),this.history=new J7e(this,this.logger),this.expirer=new Q7e(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new W_e(UI(UI({},l7e),t==null?void 0:t.storageOptions)),this.relayer=new G7e({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Z7e(this,this.logger)}static async init(t){const r=new pq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}};const oCe=nCe,k8="wc",A8=2,I8="client",Ob=`${k8}@${A8}:${I8}:`,V1={name:I8,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},iCe={session_proposal:"session_proposal",session_update:"session_update",session_extend:"session_extend",session_ping:"session_ping",session_delete:"session_delete",session_expire:"session_expire",session_request:"session_request",session_request_sent:"session_request_sent",session_event:"session_event",proposal_expire:"proposal_expire"},aCe={database:":memory:"},sCe={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},lCe="history",cCe="0.3",hq="proposal",uCe=pt.THIRTY_DAYS,vq="Proposal expired",gq="session",Cd=pt.SEVEN_DAYS,mq="engine",Rc={wc_sessionPropose:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1104},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1106},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:pt.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:pt.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:pt.ONE_DAY,prompt:!1,tag:1112},res:{ttl:pt.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:pt.THIRTY_SECONDS,prompt:!1,tag:1115}}},W1={min:pt.FIVE_MINUTES,max:pt.SEVEN_DAYS},yq="request";var fCe=Object.defineProperty,dCe=Object.defineProperties,pCe=Object.getOwnPropertyDescriptors,zI=Object.getOwnPropertySymbols,hCe=Object.prototype.hasOwnProperty,vCe=Object.prototype.propertyIsEnumerable,HI=(e,t,r)=>t in e?fCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,so=(e,t)=>{for(var r in t||(t={}))hCe.call(t,r)&&HI(e,r,t[r]);if(zI)for(var r of zI(t))vCe.call(t,r)&&HI(e,r,t[r]);return e},Ww=(e,t)=>dCe(e,pCe(t));class gCe extends v4e{constructor(t){super(t),this.name=mq,this.events=new dV,this.initialized=!1,this.ignoredPayloadTypes=[Js],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(Rc)}),this.initialized=!0)},this.connect=async r=>{this.isInitialized();const n=Ww(so({},r),{requiredNamespaces:r.requiredNamespaces||{},optionalNamespaces:r.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:i,optionalNamespaces:a,sessionProperties:s,relays:l}=n;let c=o,u,f=!1;if(c&&(f=this.client.core.pairing.pairings.get(c).active),!c||!f){const{topic:E,uri:A}=await this.client.core.pairing.create();c=E,u=A}const d=await this.client.core.crypto.generateKeyPair(),p=so({requiredNamespaces:i,optionalNamespaces:a,relays:l??[{protocol:fq}],proposer:{publicKey:d,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:h,resolve:m,done:_}=os(pt.FIVE_MINUTES,vq);if(this.events.once(rr("session_connect"),async({error:E,session:A})=>{if(E)h(E);else if(A){A.self.publicKey=d;const N=Ww(so({},A),{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces});await this.client.session.set(A.topic,N),await this.setExpiry(A.topic,A.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:A.peer.metadata}),m(N)}}),!c){const{message:E}=Xe("NO_MATCHING_KEY",`connect() pairing topic: ${c}`);throw new Error(E)}const w=await this.sendRequest(c,"wc_sessionPropose",p),g=jo(pt.FIVE_MINUTES);return await this.setProposal(w,so({id:w,expiry:g},p)),{uri:u,approval:_}},this.pair=async r=>(this.isInitialized(),await this.client.core.pairing.pair(r)),this.approve=async r=>{this.isInitialized(),await this.isValidApprove(r);const{id:n,relayProtocol:o,namespaces:i,sessionProperties:a}=r,s=this.client.proposal.get(n);let{pairingTopic:l,proposer:c,requiredNamespaces:u,optionalNamespaces:f}=s;mu(u)||(u=kW(i,"approve()"));const d=await this.client.core.crypto.generateKeyPair(),p=c.publicKey,h=await this.client.core.crypto.generateSharedKey(d,p);l&&n&&(await this.client.core.pairing.updateMetadata({topic:l,metadata:c.metadata}),await this.sendResult(n,l,{relay:{protocol:o??"irn"},responderPublicKey:d}),await this.client.proposal.delete(n,mr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:l}));const m=so({relay:{protocol:o??"irn"},namespaces:i,requiredNamespaces:u,optionalNamespaces:f,controller:{publicKey:d,metadata:this.client.metadata},expiry:jo(Cd)},a&&{sessionProperties:a});await this.client.core.relayer.subscribe(h);const _=await this.sendRequest(h,"wc_sessionSettle",m),{done:w,resolve:g,reject:E}=os();this.events.once(rr("session_approve",_),({error:N})=>{N?E(N):g(this.client.session.get(h))});const A=Ww(so({},m),{topic:h,acknowledged:!1,self:m.controller,peer:{publicKey:c.publicKey,metadata:c.metadata},controller:d});return await this.client.session.set(h,A),await this.setExpiry(h,jo(Cd)),{topic:h,acknowledged:w}},this.reject=async r=>{this.isInitialized(),await this.isValidReject(r);const{id:n,reason:o}=r,{pairingTopic:i}=this.client.proposal.get(n);i&&(await this.sendError(n,i,o),await this.client.proposal.delete(n,mr("USER_DISCONNECTED")))},this.update=async r=>{this.isInitialized(),await this.isValidUpdate(r);const{topic:n,namespaces:o}=r,i=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:a,resolve:s,reject:l}=os();return this.events.once(rr("session_update",i),({error:c})=>{c?l(c):s()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:a}},this.extend=async r=>{this.isInitialized(),await this.isValidExtend(r);const{topic:n}=r,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:i,resolve:a,reject:s}=os();return this.events.once(rr("session_extend",o),({error:l})=>{l?s(l):a()}),await this.setExpiry(n,jo(Cd)),{acknowledged:i}},this.request=async r=>{this.isInitialized(),await this.isValidRequest(r);const{chainId:n,request:o,topic:i,expiry:a}=r,s=await this.sendRequest(i,"wc_sessionRequest",{request:o,chainId:n},a),{done:l,resolve:c,reject:u}=os(a);return this.events.once(rr("session_request",s),({error:f,result:d})=>{f?u(f):c(d)}),this.client.events.emit("session_request_sent",{topic:i,request:o,chainId:n,id:s}),await l()},this.respond=async r=>{this.isInitialized(),await this.isValidRespond(r);const{topic:n,response:o}=r,{id:i}=o;ia(o)?await this.sendResult(i,n,o.result):Lo(o)&&await this.sendError(i,n,o.error),this.deletePendingSessionRequest(r.response.id,{message:"fulfilled",code:0})},this.ping=async r=>{this.isInitialized(),await this.isValidPing(r);const{topic:n}=r;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:i,resolve:a,reject:s}=os();this.events.once(rr("session_ping",o),({error:l})=>{l?s(l):a()}),await i()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async r=>{this.isInitialized(),await this.isValidEmit(r);const{topic:n,event:o,chainId:i}=r;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:i})},this.disconnect=async r=>{this.isInitialized(),await this.isValidDisconnect(r);const{topic:n}=r;this.client.session.keys.includes(n)?(await this.sendRequest(n,"wc_sessionDelete",mr("USER_DISCONNECTED")),await this.deleteSession(n)):await this.client.core.pairing.disconnect({topic:n})},this.find=r=>(this.isInitialized(),this.client.session.getAll().filter(n=>AW(n,r))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=async(r,n)=>{const{self:o}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await Promise.all([this.client.session.delete(r,mr("USER_DISCONNECTED")),this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.deleteSymKey(r),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deleteProposal=async(r,n)=>{await Promise.all([this.client.proposal.delete(r,mr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(r)])},this.deletePendingSessionRequest=async(r,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(r,n),o?Promise.resolve():this.client.core.expirer.del(r)])},this.setExpiry=async(r,n)=>{this.client.session.keys.includes(r)&&await this.client.session.update(r,{expiry:n}),this.client.core.expirer.set(r,n)},this.setProposal=async(r,n)=>{await this.client.proposal.set(r,n),this.client.core.expirer.set(r,n.expiry)},this.setPendingSessionRequest=async r=>{const n=Rc.wc_sessionRequest.req.ttl,{id:o,topic:i,params:a}=r;await this.client.pendingRequest.set(o,{id:o,topic:i,params:a}),n&&this.client.core.expirer.set(o,jo(n))},this.sendRequest=async(r,n,o,i)=>{const a=Sb(n,o),s=await this.client.core.crypto.encode(r,a),l=Rc[n].req;return i&&(l.ttl=i),this.client.core.history.set(r,a),this.client.core.relayer.publish(r,s,l),a.id},this.sendResult=async(r,n,o)=>{const i=E8(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=Rc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.sendError=async(r,n,o)=>{const i=S8(r,o),a=await this.client.core.crypto.encode(n,i),s=await this.client.core.history.get(n,r),l=Rc[s.request.method].res;this.client.core.relayer.publish(n,a,l),await this.client.core.history.resolve(i)},this.cleanup=async()=>{const r=[],n=[];this.client.session.getAll().forEach(o=>{la(o.expiry)&&r.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{la(o.expiry)&&n.push(o.id)}),await Promise.all([...r.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=r=>{const{topic:n,payload:o}=r,i=o.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${i}`)}},this.onRelayEventResponse=async r=>{const{topic:n,payload:o}=r,i=(await this.client.core.history.get(n,o.id)).request.method;switch(i){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${i}`)}},this.onSessionProposeRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidConnect(so({},n.params));const a=jo(pt.FIVE_MINUTES),s=so({id:i,pairingTopic:r,expiry:a},o);await this.setProposal(i,s),this.client.events.emit("session_proposal",{id:i,params:s})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionProposeResponse=async(r,n)=>{const{id:o}=n;if(ia(n)){const{result:i}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:i});const a=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:a});const s=a.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const l=i.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:l});const c=await this.client.core.crypto.generateSharedKey(s,l);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:c});const u=await this.client.core.relayer.subscribe(c);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:u}),await this.client.core.pairing.activate({topic:r})}else Lo(n)&&(await this.client.proposal.delete(o,mr("USER_DISCONNECTED")),this.events.emit(rr("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidSessionSettleRequest(i);const{relay:a,controller:s,expiry:l,namespaces:c,requiredNamespaces:u,optionalNamespaces:f,sessionProperties:d}=n.params,p=so({topic:r,relay:a,expiry:l,namespaces:c,acknowledged:!0,requiredNamespaces:u,optionalNamespaces:f,controller:s.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:s.publicKey,metadata:s.metadata}},d&&{sessionProperties:d});await this.sendResult(n.id,r,!0),this.events.emit(rr("session_connect"),{session:p})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionSettleResponse=async(r,n)=>{const{id:o}=n;ia(n)?(await this.client.session.update(r,{acknowledged:!0}),this.events.emit(rr("session_approve",o),{})):Lo(n)&&(await this.client.session.delete(r,mr("USER_DISCONNECTED")),this.events.emit(rr("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(r,n)=>{const{params:o,id:i}=n;try{this.isValidUpdate(so({topic:r},o)),await this.client.session.update(r,{namespaces:o.namespaces}),await this.sendResult(i,r,!0),this.client.events.emit("session_update",{id:i,topic:r,params:o})}catch(a){await this.sendError(i,r,a),this.client.logger.error(a)}},this.onSessionUpdateResponse=(r,n)=>{const{id:o}=n;ia(n)?this.events.emit(rr("session_update",o),{}):Lo(n)&&this.events.emit(rr("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(r,n)=>{const{id:o}=n;try{this.isValidExtend({topic:r}),await this.setExpiry(r,jo(Cd)),await this.sendResult(o,r,!0),this.client.events.emit("session_extend",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionExtendResponse=(r,n)=>{const{id:o}=n;ia(n)?this.events.emit(rr("session_extend",o),{}):Lo(n)&&this.events.emit(rr("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(r,n)=>{const{id:o}=n;try{this.isValidPing({topic:r}),await this.sendResult(o,r,!0),this.client.events.emit("session_ping",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionPingResponse=(r,n)=>{const{id:o}=n;setTimeout(()=>{ia(n)?this.events.emit(rr("session_ping",o),{}):Lo(n)&&this.events.emit(rr("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(r,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:r,reason:n.params}),this.client.core.relayer.once(xr.publish,async()=>{await this.deleteSession(r)}),await this.sendResult(o,r,!0),this.client.events.emit("session_delete",{id:o,topic:r})}catch(i){await this.sendError(o,r,i),this.client.logger.error(i)}},this.onSessionRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidRequest(so({topic:r},i)),await this.setPendingSessionRequest({id:o,topic:r,params:i}),this.client.events.emit("session_request",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.onSessionRequestResponse=(r,n)=>{const{id:o}=n;ia(n)?this.events.emit(rr("session_request",o),{result:n.result}):Lo(n)&&this.events.emit(rr("session_request",o),{error:n.error})},this.onSessionEventRequest=async(r,n)=>{const{id:o,params:i}=n;try{this.isValidEmit(so({topic:r},i)),this.client.events.emit("session_event",{id:o,topic:r,params:i})}catch(a){await this.sendError(o,r,a),this.client.logger.error(a)}},this.isValidConnect=async r=>{if(!pn(r)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(r)}`);throw new Error(l)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:i,sessionProperties:a,relays:s}=r;if(on(n)||await this.isValidPairingTopic(n),!UW(s,!0)){const{message:l}=Xe("MISSING_OR_INVALID",`connect() relays: ${s}`);throw new Error(l)}!on(o)&&mu(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!on(i)&&mu(i)!==0&&this.validateNamespaces(i,"optionalNamespaces"),on(a)||this.validateSessionProps(a,"sessionProperties")},this.validateNamespaces=(r,n)=>{const o=LW(r,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async r=>{if(!pn(r))throw new Error(Xe("MISSING_OR_INVALID",`approve() params: ${r}`).message);const{id:n,namespaces:o,relayProtocol:i,sessionProperties:a}=r;await this.isValidProposalId(n);const s=this.client.proposal.get(n),l=Kd(o,"approve()");if(l)throw new Error(l.message);const c=zx(s.requiredNamespaces,o,"approve()");if(c)throw new Error(c.message);if(!yr(i,!0)){const{message:u}=Xe("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw new Error(u)}on(a)||this.validateSessionProps(a,"sessionProperties")},this.isValidReject=async r=>{if(!pn(r)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() params: ${r}`);throw new Error(i)}const{id:n,reason:o}=r;if(await this.isValidProposalId(n),!HW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidSessionSettleRequest=r=>{if(!pn(r)){const{message:c}=Xe("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${r}`);throw new Error(c)}const{relay:n,controller:o,namespaces:i,expiry:a}=r;if(!x8(n)){const{message:c}=Xe("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(c)}const s=MW(o,"onSessionSettleRequest()");if(s)throw new Error(s.message);const l=Kd(i,"onSessionSettleRequest()");if(l)throw new Error(l.message);if(la(a)){const{message:c}=Xe("EXPIRED","onSessionSettleRequest()");throw new Error(c)}},this.isValidUpdate=async r=>{if(!pn(r)){const{message:l}=Xe("MISSING_OR_INVALID",`update() params: ${r}`);throw new Error(l)}const{topic:n,namespaces:o}=r;await this.isValidSessionTopic(n);const i=this.client.session.get(n),a=Kd(o,"update()");if(a)throw new Error(a.message);const s=zx(i.requiredNamespaces,o,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async r=>{if(!pn(r)){const{message:o}=Xe("MISSING_OR_INVALID",`extend() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionTopic(n)},this.isValidRequest=async r=>{if(!pn(r)){const{message:l}=Xe("MISSING_OR_INVALID",`request() params: ${r}`);throw new Error(l)}const{topic:n,request:o,chainId:i,expiry:a}=r;await this.isValidSessionTopic(n);const{namespaces:s}=this.client.session.get(n);if(!Ux(s,i)){const{message:l}=Xe("MISSING_OR_INVALID",`request() chainId: ${i}`);throw new Error(l)}if(!VW(o)){const{message:l}=Xe("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(l)}if(!GW(s,i,o.method)){const{message:l}=Xe("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(l)}if(a&&!YW(a,W1)){const{message:l}=Xe("MISSING_OR_INVALID",`request() expiry: ${a}. Expiry must be a number (in seconds) between ${W1.min} and ${W1.max}`);throw new Error(l)}},this.isValidRespond=async r=>{if(!pn(r)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() params: ${r}`);throw new Error(i)}const{topic:n,response:o}=r;if(await this.isValidSessionTopic(n),!WW(o)){const{message:i}=Xe("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(i)}},this.isValidPing=async r=>{if(!pn(r)){const{message:o}=Xe("MISSING_OR_INVALID",`ping() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async r=>{if(!pn(r)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() params: ${r}`);throw new Error(s)}const{topic:n,event:o,chainId:i}=r;await this.isValidSessionTopic(n);const{namespaces:a}=this.client.session.get(n);if(!Ux(a,i)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() chainId: ${i}`);throw new Error(s)}if(!qW(o)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}if(!KW(a,i,o.name)){const{message:s}=Xe("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(s)}},this.isValidDisconnect=async r=>{if(!pn(r)){const{message:o}=Xe("MISSING_OR_INVALID",`disconnect() params: ${r}`);throw new Error(o)}const{topic:n}=r;await this.isValidSessionOrPairingTopic(n)},this.validateSessionProps=(r,n)=>{Object.values(r).forEach(o=>{if(!yr(o,!1)){const{message:i}=Xe("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(i)}})}}isInitialized(){if(!this.initialized){const{message:t}=Xe("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(xr.message,async t=>{const{topic:r,message:n}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(r,n);C8(o)?(this.client.core.history.set(r,o),this.onRelayEventRequest({topic:r,payload:o})):P8(o)&&(await this.client.core.history.resolve(o),this.onRelayEventResponse({topic:r,payload:o}))})}registerExpirerEvents(){this.client.core.expirer.on(uo.expired,async t=>{const{topic:r,id:n}=b8(t.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Xe("EXPIRED"),!0);r?this.client.session.keys.includes(r)&&(await this.deleteSession(r,!0),this.client.events.emit("session_expire",{topic:r})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(t){if(!yr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(la(this.client.core.pairing.pairings.get(t).expiry)){const{message:r}=Xe("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}async isValidSessionTopic(t){if(!yr(t,!1)){const{message:r}=Xe("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(r)}if(!this.client.session.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(r)}if(la(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:r}=Xe("EXPIRED",`session topic: ${t}`);throw new Error(r)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(yr(t,!1)){const{message:r}=Xe("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(r)}else{const{message:r}=Xe("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(r)}}async isValidProposalId(t){if(!zW(t)){const{message:r}=Xe("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(r)}if(!this.client.proposal.keys.includes(t)){const{message:r}=Xe("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(r)}if(la(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:r}=Xe("EXPIRED",`proposal id: ${t}`);throw new Error(r)}}}class mCe extends Pb{constructor(t,r){super(t,r,hq,Ob),this.core=t,this.logger=r}}let yCe=class extends Pb{constructor(t,r){super(t,r,gq,Ob),this.core=t,this.logger=r}};class bCe extends Pb{constructor(t,r){super(t,r,yq,Ob,n=>n.id),this.core=t,this.logger=r}}let bq=class wq extends h4e{constructor(t){super(t),this.protocol=k8,this.version=A8,this.name=V1.name,this.events=new ni.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(t==null?void 0:t.name)||V1.name,this.metadata=(t==null?void 0:t.metadata)||uW();const r=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:X4(Mt.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||V1.logger}));this.core=(t==null?void 0:t.core)||new oCe(t),this.logger=Mt.generateChildLogger(r,this.name),this.session=new yCe(this.core,this.logger),this.proposal=new mCe(this.core,this.logger),this.pendingRequest=new bCe(this.core,this.logger),this.engine=new gCe(this)}static async init(t){const r=new wq(t);return await r.initialize(),r}get context(){return Mt.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}};const wCe=bq,xCe=Object.freeze(Object.defineProperty({__proto__:null,ENGINE_CONTEXT:mq,ENGINE_RPC_OPTS:Rc,HISTORY_CONTEXT:lCe,HISTORY_EVENTS:sCe,HISTORY_STORAGE_VERSION:cCe,PROPOSAL_CONTEXT:hq,PROPOSAL_EXPIRY:uCe,PROPOSAL_EXPIRY_MESSAGE:vq,REQUEST_CONTEXT:yq,SESSION_CONTEXT:gq,SESSION_EXPIRY:Cd,SESSION_REQUEST_EXPIRY_BOUNDARIES:W1,SIGN_CLIENT_CONTEXT:I8,SIGN_CLIENT_DEFAULT:V1,SIGN_CLIENT_EVENTS:iCe,SIGN_CLIENT_PROTOCOL:k8,SIGN_CLIENT_STORAGE_OPTIONS:aCe,SIGN_CLIENT_STORAGE_PREFIX:Ob,SIGN_CLIENT_VERSION:A8,SignClient:wCe,default:bq},Symbol.toStringTag,{value:"Module"})),_Ce=Xl(xCe),ECe=Xl(cSe);var qw={},Gw={},ud={},Kw={},M0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ZERO_ADDRESS=e.DUST_AMOUNT=e.ONE_ALPH=e.ALPH_TOKEN_ID=e.MIN_UTXO_SET_AMOUNT=e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS=void 0,e.TOTAL_NUMBER_OF_GROUPS=4,e.TOTAL_NUMBER_OF_CHAINS=e.TOTAL_NUMBER_OF_GROUPS*e.TOTAL_NUMBER_OF_GROUPS,e.MIN_UTXO_SET_AMOUNT=BigInt(1e12),e.ALPH_TOKEN_ID="".padStart(64,"0"),e.ONE_ALPH=10n**18n,e.DUST_AMOUNT=10n**15n,e.ZERO_ADDRESS="tgx7VNFoP9DJiFMFgXXtafQZkUvyEdDHT9ryamHJYrjq"})(M0);var Yw={},kb={},zs={},R0={};R0.byteLength=PCe;R0.toByteArray=kCe;R0.fromByteArray=$Ce;var wi=[],fo=[],SCe=typeof Uint8Array<"u"?Uint8Array:Array,Xw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Pc=0,CCe=Xw.length;Pc0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function PCe(e){var t=xq(e),r=t[0],n=t[1];return(r+n)*3/4-n}function OCe(e,t,r){return(t+r)*3/4-r}function kCe(e){var t,r=xq(e),n=r[0],o=r[1],i=new SCe(OCe(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=fo[e.charCodeAt(l)]<<2|fo[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=fo[e.charCodeAt(l)]<<10|fo[e.charCodeAt(l+1)]<<4|fo[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function ACe(e){return wi[e>>18&63]+wi[e>>12&63]+wi[e>>6&63]+wi[e&63]}function ICe(e,t,r){for(var n,o=[],i=t;is?s:a+i));return n===1?(t=e[r-1],o.push(wi[t>>2]+wi[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(wi[t>>10]+wi[t>>4&63]+wi[t<<2&63]+"=")),o.join("")}var Ab={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Ab.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<>1,u=-7,f=r?o-1:0,d=r?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=i*256+e[t+f],f+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=n;u>0;a=a*256+e[t+f],f+=d,u-=8);if(i===0)i=1-c;else{if(i===l)return a?NaN:(p?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-c}return(p?-1:1)*a*Math.pow(2,i-n)};Ab.write=function(e,t,r,n,o,i){var a,s,l,c=i*8-o-1,u=(1<>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a=a+f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=s&255,p+=h,s/=256,o-=8);for(a=a<0;e[r+p]=a&255,p+=h,a/=256,c-=8);e[r+p-h]|=m*128};/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */(function(e){const t=R0,r=Ab,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const W=new Uint8Array(1),x={foo:function(){return 42}};return Object.setPrototypeOf(x,Uint8Array.prototype),Object.setPrototypeOf(W,x),W.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(W){if(W>o)throw new RangeError('The value "'+W+'" is invalid for option "size"');const x=new Uint8Array(W);return Object.setPrototypeOf(x,s.prototype),x}function s(W,x,I){if(typeof W=="number"){if(typeof x=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(W)}return l(W,x,I)}s.poolSize=8192;function l(W,x,I){if(typeof W=="string")return d(W,x);if(ArrayBuffer.isView(W))return h(W);if(W==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W);if(we(W,ArrayBuffer)||W&&we(W.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(we(W,SharedArrayBuffer)||W&&we(W.buffer,SharedArrayBuffer)))return m(W,x,I);if(typeof W=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=W.valueOf&&W.valueOf();if(Y!=null&&Y!==W)return s.from(Y,x,I);const re=_(W);if(re)return re;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof W[Symbol.toPrimitive]=="function")return s.from(W[Symbol.toPrimitive]("string"),x,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W)}s.from=function(W,x,I){return l(W,x,I)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(W){if(typeof W!="number")throw new TypeError('"size" argument must be of type number');if(W<0)throw new RangeError('The value "'+W+'" is invalid for option "size"')}function u(W,x,I){return c(W),W<=0?a(W):x!==void 0?typeof I=="string"?a(W).fill(x,I):a(W).fill(x):a(W)}s.alloc=function(W,x,I){return u(W,x,I)};function f(W){return c(W),a(W<0?0:w(W)|0)}s.allocUnsafe=function(W){return f(W)},s.allocUnsafeSlow=function(W){return f(W)};function d(W,x){if((typeof x!="string"||x==="")&&(x="utf8"),!s.isEncoding(x))throw new TypeError("Unknown encoding: "+x);const I=E(W,x)|0;let Y=a(I);const re=Y.write(W,x);return re!==I&&(Y=Y.slice(0,re)),Y}function p(W){const x=W.length<0?0:w(W.length)|0,I=a(x);for(let Y=0;Y=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return W|0}function g(W){return+W!=W&&(W=0),s.alloc(+W)}s.isBuffer=function(x){return x!=null&&x._isBuffer===!0&&x!==s.prototype},s.compare=function(x,I){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),we(I,Uint8Array)&&(I=s.from(I,I.offset,I.byteLength)),!s.isBuffer(x)||!s.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(x===I)return 0;let Y=x.length,re=I.length;for(let fe=0,le=Math.min(Y,re);fere.length?(s.isBuffer(le)||(le=s.from(le)),le.copy(re,fe)):Uint8Array.prototype.set.call(re,le,fe);else if(s.isBuffer(le))le.copy(re,fe);else throw new TypeError('"list" argument must be an Array of Buffers');fe+=le.length}return re};function E(W,x){if(s.isBuffer(W))return W.length;if(ArrayBuffer.isView(W)||we(W,ArrayBuffer))return W.byteLength;if(typeof W!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W);const I=W.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&I===0)return 0;let re=!1;for(;;)switch(x){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return M(W).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return Q(W).length;default:if(re)return Y?-1:M(W).length;x=(""+x).toLowerCase(),re=!0}}s.byteLength=E;function A(W,x,I){let Y=!1;if((x===void 0||x<0)&&(x=0),x>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,x>>>=0,I<=x))return"";for(W||(W="utf8");;)switch(W){case"hex":return H(this,x,I);case"utf8":case"utf-8":return v(this,x,I);case"ascii":return T(this,x,I);case"latin1":case"binary":return j(this,x,I);case"base64":return C(this,x,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,x,I);default:if(Y)throw new TypeError("Unknown encoding: "+W);W=(W+"").toLowerCase(),Y=!0}}s.prototype._isBuffer=!0;function N(W,x,I){const Y=W[x];W[x]=W[I],W[I]=Y}s.prototype.swap16=function(){const x=this.length;if(x%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;II&&(x+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(x,I,Y,re,fe){if(we(x,Uint8Array)&&(x=s.from(x,x.offset,x.byteLength)),!s.isBuffer(x))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof x);if(I===void 0&&(I=0),Y===void 0&&(Y=x?x.length:0),re===void 0&&(re=0),fe===void 0&&(fe=this.length),I<0||Y>x.length||re<0||fe>this.length)throw new RangeError("out of range index");if(re>=fe&&I>=Y)return 0;if(re>=fe)return-1;if(I>=Y)return 1;if(I>>>=0,Y>>>=0,re>>>=0,fe>>>=0,this===x)return 0;let le=fe-re,xe=Y-I;const _e=Math.min(le,xe),Ae=this.slice(re,fe),$e=x.slice(I,Y);for(let Ne=0;Ne<_e;++Ne)if(Ae[Ne]!==$e[Ne]){le=Ae[Ne],xe=$e[Ne];break}return le2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,Se(I)&&(I=re?0:W.length-1),I<0&&(I=W.length+I),I>=W.length){if(re)return-1;I=W.length-1}else if(I<0)if(re)I=0;else return-1;if(typeof x=="string"&&(x=s.from(x,Y)),s.isBuffer(x))return x.length===0?-1:y(W,x,I,Y,re);if(typeof x=="number")return x=x&255,typeof Uint8Array.prototype.indexOf=="function"?re?Uint8Array.prototype.indexOf.call(W,x,I):Uint8Array.prototype.lastIndexOf.call(W,x,I):y(W,[x],I,Y,re);throw new TypeError("val must be string, number or Buffer")}function y(W,x,I,Y,re){let fe=1,le=W.length,xe=x.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(W.length<2||x.length<2)return-1;fe=2,le/=2,xe/=2,I/=2}function _e($e,Ne){return fe===1?$e[Ne]:$e.readUInt16BE(Ne*fe)}let Ae;if(re){let $e=-1;for(Ae=I;Aele&&(I=le-xe),Ae=I;Ae>=0;Ae--){let $e=!0;for(let Ne=0;Nere&&(Y=re)):Y=re;const fe=x.length;Y>fe/2&&(Y=fe/2);let le;for(le=0;le>>0,isFinite(Y)?(Y=Y>>>0,re===void 0&&(re="utf8")):(re=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const fe=this.length-I;if((Y===void 0||Y>fe)&&(Y=fe),x.length>0&&(Y<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");re||(re="utf8");let le=!1;for(;;)switch(re){case"hex":return U(this,x,I,Y);case"utf8":case"utf-8":return L(this,x,I,Y);case"ascii":case"latin1":case"binary":return G(this,x,I,Y);case"base64":return V(this,x,I,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,x,I,Y);default:if(le)throw new TypeError("Unknown encoding: "+re);re=(""+re).toLowerCase(),le=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(W,x,I){return x===0&&I===W.length?t.fromByteArray(W):t.fromByteArray(W.slice(x,I))}function v(W,x,I){I=Math.min(W.length,I);const Y=[];let re=x;for(;re239?4:fe>223?3:fe>191?2:1;if(re+xe<=I){let _e,Ae,$e,Ne;switch(xe){case 1:fe<128&&(le=fe);break;case 2:_e=W[re+1],(_e&192)===128&&(Ne=(fe&31)<<6|_e&63,Ne>127&&(le=Ne));break;case 3:_e=W[re+1],Ae=W[re+2],(_e&192)===128&&(Ae&192)===128&&(Ne=(fe&15)<<12|(_e&63)<<6|Ae&63,Ne>2047&&(Ne<55296||Ne>57343)&&(le=Ne));break;case 4:_e=W[re+1],Ae=W[re+2],$e=W[re+3],(_e&192)===128&&(Ae&192)===128&&($e&192)===128&&(Ne=(fe&15)<<18|(_e&63)<<12|(Ae&63)<<6|$e&63,Ne>65535&&Ne<1114112&&(le=Ne))}}le===null?(le=65533,xe=1):le>65535&&(le-=65536,Y.push(le>>>10&1023|55296),le=56320|le&1023),Y.push(le),re+=xe}return B(Y)}const b=4096;function B(W){const x=W.length;if(x<=b)return String.fromCharCode.apply(String,W);let I="",Y=0;for(;YY)&&(I=Y);let re="";for(let fe=x;feY&&(x=Y),I<0?(I+=Y,I<0&&(I=0)):I>Y&&(I=Y),II)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(x,I,Y){x=x>>>0,I=I>>>0,Y||F(x,I,this.length);let re=this[x],fe=1,le=0;for(;++le>>0,I=I>>>0,Y||F(x,I,this.length);let re=this[x+--I],fe=1;for(;I>0&&(fe*=256);)re+=this[x+--I]*fe;return re},s.prototype.readUint8=s.prototype.readUInt8=function(x,I){return x=x>>>0,I||F(x,1,this.length),this[x]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(x,I){return x=x>>>0,I||F(x,2,this.length),this[x]|this[x+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(x,I){return x=x>>>0,I||F(x,2,this.length),this[x]<<8|this[x+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(x,I){return x=x>>>0,I||F(x,4,this.length),(this[x]|this[x+1]<<8|this[x+2]<<16)+this[x+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(x,I){return x=x>>>0,I||F(x,4,this.length),this[x]*16777216+(this[x+1]<<16|this[x+2]<<8|this[x+3])},s.prototype.readBigUInt64LE=ke(function(x){x=x>>>0,se(x,"offset");const I=this[x],Y=this[x+7];(I===void 0||Y===void 0)&&pe(x,this.length-8);const re=I+this[++x]*2**8+this[++x]*2**16+this[++x]*2**24,fe=this[++x]+this[++x]*2**8+this[++x]*2**16+Y*2**24;return BigInt(re)+(BigInt(fe)<>>0,se(x,"offset");const I=this[x],Y=this[x+7];(I===void 0||Y===void 0)&&pe(x,this.length-8);const re=I*2**24+this[++x]*2**16+this[++x]*2**8+this[++x],fe=this[++x]*2**24+this[++x]*2**16+this[++x]*2**8+Y;return(BigInt(re)<>>0,I=I>>>0,Y||F(x,I,this.length);let re=this[x],fe=1,le=0;for(;++le=fe&&(re-=Math.pow(2,8*I)),re},s.prototype.readIntBE=function(x,I,Y){x=x>>>0,I=I>>>0,Y||F(x,I,this.length);let re=I,fe=1,le=this[x+--re];for(;re>0&&(fe*=256);)le+=this[x+--re]*fe;return fe*=128,le>=fe&&(le-=Math.pow(2,8*I)),le},s.prototype.readInt8=function(x,I){return x=x>>>0,I||F(x,1,this.length),this[x]&128?(255-this[x]+1)*-1:this[x]},s.prototype.readInt16LE=function(x,I){x=x>>>0,I||F(x,2,this.length);const Y=this[x]|this[x+1]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt16BE=function(x,I){x=x>>>0,I||F(x,2,this.length);const Y=this[x+1]|this[x]<<8;return Y&32768?Y|4294901760:Y},s.prototype.readInt32LE=function(x,I){return x=x>>>0,I||F(x,4,this.length),this[x]|this[x+1]<<8|this[x+2]<<16|this[x+3]<<24},s.prototype.readInt32BE=function(x,I){return x=x>>>0,I||F(x,4,this.length),this[x]<<24|this[x+1]<<16|this[x+2]<<8|this[x+3]},s.prototype.readBigInt64LE=ke(function(x){x=x>>>0,se(x,"offset");const I=this[x],Y=this[x+7];(I===void 0||Y===void 0)&&pe(x,this.length-8);const re=this[x+4]+this[x+5]*2**8+this[x+6]*2**16+(Y<<24);return(BigInt(re)<>>0,se(x,"offset");const I=this[x],Y=this[x+7];(I===void 0||Y===void 0)&&pe(x,this.length-8);const re=(I<<24)+this[++x]*2**16+this[++x]*2**8+this[++x];return(BigInt(re)<>>0,I||F(x,4,this.length),r.read(this,x,!0,23,4)},s.prototype.readFloatBE=function(x,I){return x=x>>>0,I||F(x,4,this.length),r.read(this,x,!1,23,4)},s.prototype.readDoubleLE=function(x,I){return x=x>>>0,I||F(x,8,this.length),r.read(this,x,!0,52,8)},s.prototype.readDoubleBE=function(x,I){return x=x>>>0,I||F(x,8,this.length),r.read(this,x,!1,52,8)};function $(W,x,I,Y,re,fe){if(!s.isBuffer(W))throw new TypeError('"buffer" argument must be a Buffer instance');if(x>re||xW.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(x,I,Y,re){if(x=+x,I=I>>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;$(this,x,I,Y,xe,0)}let fe=1,le=0;for(this[I]=x&255;++le>>0,Y=Y>>>0,!re){const xe=Math.pow(2,8*Y)-1;$(this,x,I,Y,xe,0)}let fe=Y-1,le=1;for(this[I+fe]=x&255;--fe>=0&&(le*=256);)this[I+fe]=x/le&255;return I+Y},s.prototype.writeUint8=s.prototype.writeUInt8=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,1,255,0),this[I]=x&255,I+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,2,65535,0),this[I]=x&255,this[I+1]=x>>>8,I+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,2,65535,0),this[I]=x>>>8,this[I+1]=x&255,I+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,4,4294967295,0),this[I+3]=x>>>24,this[I+2]=x>>>16,this[I+1]=x>>>8,this[I]=x&255,I+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,4,4294967295,0),this[I]=x>>>24,this[I+1]=x>>>16,this[I+2]=x>>>8,this[I+3]=x&255,I+4};function q(W,x,I,Y,re){ee(x,Y,re,W,I,7);let fe=Number(x&BigInt(4294967295));W[I++]=fe,fe=fe>>8,W[I++]=fe,fe=fe>>8,W[I++]=fe,fe=fe>>8,W[I++]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return W[I++]=le,le=le>>8,W[I++]=le,le=le>>8,W[I++]=le,le=le>>8,W[I++]=le,I}function J(W,x,I,Y,re){ee(x,Y,re,W,I,7);let fe=Number(x&BigInt(4294967295));W[I+7]=fe,fe=fe>>8,W[I+6]=fe,fe=fe>>8,W[I+5]=fe,fe=fe>>8,W[I+4]=fe;let le=Number(x>>BigInt(32)&BigInt(4294967295));return W[I+3]=le,le=le>>8,W[I+2]=le,le=le>>8,W[I+1]=le,le=le>>8,W[I]=le,I+8}s.prototype.writeBigUInt64LE=ke(function(x,I=0){return q(this,x,I,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=ke(function(x,I=0){return J(this,x,I,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(x,I,Y,re){if(x=+x,I=I>>>0,!re){const _e=Math.pow(2,8*Y-1);$(this,x,I,Y,_e-1,-_e)}let fe=0,le=1,xe=0;for(this[I]=x&255;++fe>0)-xe&255;return I+Y},s.prototype.writeIntBE=function(x,I,Y,re){if(x=+x,I=I>>>0,!re){const _e=Math.pow(2,8*Y-1);$(this,x,I,Y,_e-1,-_e)}let fe=Y-1,le=1,xe=0;for(this[I+fe]=x&255;--fe>=0&&(le*=256);)x<0&&xe===0&&this[I+fe+1]!==0&&(xe=1),this[I+fe]=(x/le>>0)-xe&255;return I+Y},s.prototype.writeInt8=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,1,127,-128),x<0&&(x=255+x+1),this[I]=x&255,I+1},s.prototype.writeInt16LE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,2,32767,-32768),this[I]=x&255,this[I+1]=x>>>8,I+2},s.prototype.writeInt16BE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,2,32767,-32768),this[I]=x>>>8,this[I+1]=x&255,I+2},s.prototype.writeInt32LE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,4,2147483647,-2147483648),this[I]=x&255,this[I+1]=x>>>8,this[I+2]=x>>>16,this[I+3]=x>>>24,I+4},s.prototype.writeInt32BE=function(x,I,Y){return x=+x,I=I>>>0,Y||$(this,x,I,4,2147483647,-2147483648),x<0&&(x=4294967295+x+1),this[I]=x>>>24,this[I+1]=x>>>16,this[I+2]=x>>>8,this[I+3]=x&255,I+4},s.prototype.writeBigInt64LE=ke(function(x,I=0){return q(this,x,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=ke(function(x,I=0){return J(this,x,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(W,x,I,Y,re,fe){if(I+Y>W.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function ae(W,x,I,Y,re){return x=+x,I=I>>>0,re||te(W,x,I,4),r.write(W,x,I,Y,23,4),I+4}s.prototype.writeFloatLE=function(x,I,Y){return ae(this,x,I,!0,Y)},s.prototype.writeFloatBE=function(x,I,Y){return ae(this,x,I,!1,Y)};function ce(W,x,I,Y,re){return x=+x,I=I>>>0,re||te(W,x,I,8),r.write(W,x,I,Y,52,8),I+8}s.prototype.writeDoubleLE=function(x,I,Y){return ce(this,x,I,!0,Y)},s.prototype.writeDoubleBE=function(x,I,Y){return ce(this,x,I,!1,Y)},s.prototype.copy=function(x,I,Y,re){if(!s.isBuffer(x))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!re&&re!==0&&(re=this.length),I>=x.length&&(I=x.length),I||(I=0),re>0&&re=this.length)throw new RangeError("Index out of range");if(re<0)throw new RangeError("sourceEnd out of bounds");re>this.length&&(re=this.length),x.length-I>>0,Y=Y===void 0?this.length:Y>>>0,x||(x=0);let fe;if(typeof x=="number")for(fe=I;fe2**32?re=O(String(I)):typeof I=="bigint"&&(re=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(re=O(re)),re+="n"),Y+=` It must be ${x}. Received ${re}`,Y},RangeError);function O(W){let x="",I=W.length;const Y=W[0]==="-"?1:0;for(;I>=Y+4;I-=3)x=`_${W.slice(I-3,I)}${x}`;return`${W.slice(0,I)}${x}`}function K(W,x,I){se(x,"offset"),(W[x]===void 0||W[x+I]===void 0)&&pe(x,W.length-(I+1))}function ee(W,x,I,Y,re,fe){if(W>I||W3?x===0||x===BigInt(0)?xe=`>= 0${le} and < 2${le} ** ${(fe+1)*8}${le}`:xe=`>= -(2${le} ** ${(fe+1)*8-1}${le}) and < 2 ** ${(fe+1)*8-1}${le}`:xe=`>= ${x}${le} and <= ${I}${le}`,new ie.ERR_OUT_OF_RANGE("value",xe,W)}K(Y,re,fe)}function se(W,x){if(typeof W!="number")throw new ie.ERR_INVALID_ARG_TYPE(x,"number",W)}function pe(W,x,I){throw Math.floor(W)!==W?(se(W,I),new ie.ERR_OUT_OF_RANGE(I||"offset","an integer",W)):x<0?new ie.ERR_BUFFER_OUT_OF_BOUNDS:new ie.ERR_OUT_OF_RANGE(I||"offset",`>= ${I?1:0} and <= ${x}`,W)}const ge=/[^+/0-9A-Za-z-_]/g;function X(W){if(W=W.split("=")[0],W=W.trim().replace(ge,""),W.length<2)return"";for(;W.length%4!==0;)W=W+"=";return W}function M(W,x){x=x||1/0;let I;const Y=W.length;let re=null;const fe=[];for(let le=0;le55295&&I<57344){if(!re){if(I>56319){(x-=3)>-1&&fe.push(239,191,189);continue}else if(le+1===Y){(x-=3)>-1&&fe.push(239,191,189);continue}re=I;continue}if(I<56320){(x-=3)>-1&&fe.push(239,191,189),re=I;continue}I=(re-55296<<10|I-56320)+65536}else re&&(x-=3)>-1&&fe.push(239,191,189);if(re=null,I<128){if((x-=1)<0)break;fe.push(I)}else if(I<2048){if((x-=2)<0)break;fe.push(I>>6|192,I&63|128)}else if(I<65536){if((x-=3)<0)break;fe.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((x-=4)<0)break;fe.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return fe}function z(W){const x=[];for(let I=0;I>8,re=I%256,fe.push(re),fe.push(Y);return fe}function Q(W){return t.toByteArray(X(W))}function de(W,x,I,Y){let re;for(re=0;re=x.length||re>=W.length);++re)x[re+I]=W[re];return re}function we(W,x){return W instanceof x||W!=null&&W.constructor!=null&&W.constructor.name!=null&&W.constructor.name===x.name}function Se(W){return W!==W}const Ee=function(){const W="0123456789abcdef",x=new Array(256);for(let I=0;I<16;++I){const Y=I*16;for(let re=0;re<16;++re)x[Y+re]=W[I]+W[re]}return x}();function ke(W){return typeof BigInt>"u"?Te:W}function Te(){throw new Error("BigInt not supported")}})(zs);Object.defineProperty(kb,"__esModule",{value:!0});kb.WebCrypto=void 0;const TCe=zs,Zw=Xo,VI=typeof window<"u"&&typeof window.document<"u";class DCe{constructor(){this.subtle=VI?globalThis.crypto.subtle:Zw.webcrypto?Zw.webcrypto.subtle:crypto.subtle}getRandomValues(t){if(!ArrayBuffer.isView(t))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'");const r=TCe.Buffer.from(t.buffer,t.byteOffset,t.byteLength);return VI?globalThis.crypto.getRandomValues(r):(0,Zw.randomFillSync)(r),t}}kb.WebCrypto=DCe;var Ib={},$b={};function MCe(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r>>0,E=new Uint8Array(g);_!==w;){for(var A=p[_],N=0,D=g-1;(A!==0||N>>0,E[D]=A%a>>>0,A=A/a>>>0;if(A!==0)throw new Error("Non-zero carry");m=N,_++}for(var y=g-m;y!==g&&E[y]===0;)y++;for(var U=s.repeat(h);y>>0,g=new Uint8Array(w);p[h];){var E=t[p.charCodeAt(h)];if(E===255)return;for(var A=0,N=w-1;(E!==0||A<_)&&N!==-1;N--,A++)E+=a*g[N]>>>0,g[N]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");_=A,h++}for(var D=w-_;D!==w&&g[D]===0;)D++;for(var y=new Uint8Array(m+(w-D)),U=m;D!==w;)y[U++]=g[D++];return y}function d(p){var h=f(p);if(h)return h;throw new Error("Non-base"+a+" character")}return{encode:u,decodeUnsafe:f,decode:d}}var RCe=MCe;(function(e){var t=Le&&Le.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.isBase58=e.bs58=void 0;const r=t(RCe),n="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";e.bs58=(0,r.default)(n);function o(i){if(i===""||i.trim()==="")return!1;try{return e.bs58.encode(e.bs58.decode(i))===i}catch{return!1}}e.isBase58=o,e.default=e.bs58})($b);var N0={};Object.defineProperty(N0,"__esModule",{value:!0});function NCe(e){let t=5381;for(let r=0;r>24,r=e>>16,n=e>>8;return t^r^n^e}function UCe(e){return e&255}var ht={},$8={};const zCe="elliptic",HCe="6.5.4",VCe="EC cryptography",WCe="lib/elliptic.js",qCe=["lib"],GCe={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},KCe={type:"git",url:"git@github.com:indutny/elliptic"},YCe=["EC","Elliptic","curve","Cryptography"],XCe="Fedor Indutny ",ZCe="MIT",JCe={url:"https://github.com/indutny/elliptic/issues"},QCe="https://github.com/indutny/elliptic",ePe={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},tPe={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},rPe={name:zCe,version:HCe,description:VCe,main:WCe,files:qCe,scripts:GCe,repository:KCe,keywords:YCe,author:XCe,license:ZCe,bugs:JCe,homepage:QCe,devDependencies:ePe,dependencies:tPe};var ro={},T8={exports:{}};T8.exports;(function(e){(function(t,r){function n(V,S){if(!V)throw new Error(S||"Assertion failed")}function o(V,S){V.super_=S;var C=function(){};C.prototype=S.prototype,V.prototype=new C,V.prototype.constructor=V}function i(V,S,C){if(i.isBN(V))return V;this.negative=0,this.words=null,this.length=0,this.red=null,V!==null&&((S==="le"||S==="be")&&(C=S,S=10),this._init(V||0,S||10,C||"be"))}typeof t=="object"?t.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=Xo.Buffer}catch{}i.isBN=function(S){return S instanceof i?!0:S!==null&&typeof S=="object"&&S.constructor.wordSize===i.wordSize&&Array.isArray(S.words)},i.max=function(S,C){return S.cmp(C)>0?S:C},i.min=function(S,C){return S.cmp(C)<0?S:C},i.prototype._init=function(S,C,v){if(typeof S=="number")return this._initNumber(S,C,v);if(typeof S=="object")return this._initArray(S,C,v);C==="hex"&&(C=16),n(C===(C|0)&&C>=2&&C<=36),S=S.toString().replace(/\s+/g,"");var b=0;S[0]==="-"&&(b++,this.negative=1),b=0;b-=3)T=S[b]|S[b-1]<<8|S[b-2]<<16,this.words[B]|=T<>>26-j&67108863,j+=24,j>=26&&(j-=26,B++);else if(v==="le")for(b=0,B=0;b>>26-j&67108863,j+=24,j>=26&&(j-=26,B++);return this.strip()};function s(V,S){var C=V.charCodeAt(S);return C>=65&&C<=70?C-55:C>=97&&C<=102?C-87:C-48&15}function l(V,S,C){var v=s(V,C);return C-1>=S&&(v|=s(V,C-1)<<4),v}i.prototype._parseHex=function(S,C,v){this.length=Math.ceil((S.length-C)/6),this.words=new Array(this.length);for(var b=0;b=C;b-=2)j=l(S,C,b)<=18?(B-=18,T+=1,this.words[T]|=j>>>26):B+=8;else{var H=S.length-C;for(b=H%2===0?C+1:C;b=18?(B-=18,T+=1,this.words[T]|=j>>>26):B+=8}this.strip()};function c(V,S,C,v){for(var b=0,B=Math.min(V.length,C),T=S;T=49?b+=j-49+10:j>=17?b+=j-17+10:b+=j}return b}i.prototype._parseBase=function(S,C,v){this.words=[0],this.length=1;for(var b=0,B=1;B<=67108863;B*=C)b++;b--,B=B/C|0;for(var T=S.length-v,j=T%b,H=Math.min(T,T-j)+v,P=0,F=v;F1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","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"],f=[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],d=[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];i.prototype.toString=function(S,C){S=S||10,C=C|0||1;var v;if(S===16||S==="hex"){v="";for(var b=0,B=0,T=0;T>>24-b&16777215,B!==0||T!==this.length-1?v=u[6-H.length]+H+v:v=H+v,b+=2,b>=26&&(b-=26,T--)}for(B!==0&&(v=B.toString(16)+v);v.length%C!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(S===(S|0)&&S>=2&&S<=36){var P=f[S],F=d[S];v="";var $=this.clone();for($.negative=0;!$.isZero();){var q=$.modn(F).toString(S);$=$.idivn(F),$.isZero()?v=q+v:v=u[P-q.length]+q+v}for(this.isZero()&&(v="0"+v);v.length%C!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var S=this.words[0];return this.length===2?S+=this.words[1]*67108864:this.length===3&&this.words[2]===1?S+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-S:S},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(S,C){return n(typeof a<"u"),this.toArrayLike(a,S,C)},i.prototype.toArray=function(S,C){return this.toArrayLike(Array,S,C)},i.prototype.toArrayLike=function(S,C,v){var b=this.byteLength(),B=v||Math.max(1,b);n(b<=B,"byte array longer than desired length"),n(B>0,"Requested array length <= 0"),this.strip();var T=C==="le",j=new S(B),H,P,F=this.clone();if(T){for(P=0;!F.isZero();P++)H=F.andln(255),F.iushrn(8),j[P]=H;for(;P=4096&&(v+=13,C>>>=13),C>=64&&(v+=7,C>>>=7),C>=8&&(v+=4,C>>>=4),C>=2&&(v+=2,C>>>=2),v+C},i.prototype._zeroBits=function(S){if(S===0)return 26;var C=S,v=0;return C&8191||(v+=13,C>>>=13),C&127||(v+=7,C>>>=7),C&15||(v+=4,C>>>=4),C&3||(v+=2,C>>>=2),C&1||v++,v},i.prototype.bitLength=function(){var S=this.words[this.length-1],C=this._countBits(S);return(this.length-1)*26+C};function p(V){for(var S=new Array(V.bitLength()),C=0;C>>b}return S}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var S=0,C=0;CS.length?this.clone().ior(S):S.clone().ior(this)},i.prototype.uor=function(S){return this.length>S.length?this.clone().iuor(S):S.clone().iuor(this)},i.prototype.iuand=function(S){var C;this.length>S.length?C=S:C=this;for(var v=0;vS.length?this.clone().iand(S):S.clone().iand(this)},i.prototype.uand=function(S){return this.length>S.length?this.clone().iuand(S):S.clone().iuand(this)},i.prototype.iuxor=function(S){var C,v;this.length>S.length?(C=this,v=S):(C=S,v=this);for(var b=0;bS.length?this.clone().ixor(S):S.clone().ixor(this)},i.prototype.uxor=function(S){return this.length>S.length?this.clone().iuxor(S):S.clone().iuxor(this)},i.prototype.inotn=function(S){n(typeof S=="number"&&S>=0);var C=Math.ceil(S/26)|0,v=S%26;this._expand(C),v>0&&C--;for(var b=0;b0&&(this.words[b]=~this.words[b]&67108863>>26-v),this.strip()},i.prototype.notn=function(S){return this.clone().inotn(S)},i.prototype.setn=function(S,C){n(typeof S=="number"&&S>=0);var v=S/26|0,b=S%26;return this._expand(v+1),C?this.words[v]=this.words[v]|1<S.length?(v=this,b=S):(v=S,b=this);for(var B=0,T=0;T>>26;for(;B!==0&&T>>26;if(this.length=v.length,B!==0)this.words[this.length]=B,this.length++;else if(v!==this)for(;TS.length?this.clone().iadd(S):S.clone().iadd(this)},i.prototype.isub=function(S){if(S.negative!==0){S.negative=0;var C=this.iadd(S);return S.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(S),this.negative=1,this._normSign();var v=this.cmp(S);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,B;v>0?(b=this,B=S):(b=S,B=this);for(var T=0,j=0;j>26,this.words[j]=C&67108863;for(;T!==0&&j>26,this.words[j]=C&67108863;if(T===0&&j>>26,$=H&67108863,q=Math.min(P,S.length-1),J=Math.max(0,P-V.length+1);J<=q;J++){var te=P-J|0;b=V.words[te]|0,B=S.words[J]|0,T=b*B+$,F+=T/67108864|0,$=T&67108863}C.words[P]=$|0,H=F|0}return H!==0?C.words[P]=H|0:C.length--,C.strip()}var m=function(S,C,v){var b=S.words,B=C.words,T=v.words,j=0,H,P,F,$=b[0]|0,q=$&8191,J=$>>>13,te=b[1]|0,ae=te&8191,ce=te>>>13,ie=b[2]|0,ue=ie&8191,O=ie>>>13,K=b[3]|0,ee=K&8191,se=K>>>13,pe=b[4]|0,ge=pe&8191,X=pe>>>13,M=b[5]|0,z=M&8191,Z=M>>>13,Q=b[6]|0,de=Q&8191,we=Q>>>13,Se=b[7]|0,Ee=Se&8191,ke=Se>>>13,Te=b[8]|0,W=Te&8191,x=Te>>>13,I=b[9]|0,Y=I&8191,re=I>>>13,fe=B[0]|0,le=fe&8191,xe=fe>>>13,_e=B[1]|0,Ae=_e&8191,$e=_e>>>13,Ne=B[2]|0,We=Ne&8191,gt=Ne>>>13,ft=B[3]|0,Ye=ft&8191,Qe=ft>>>13,rt=B[4]|0,ve=rt&8191,oe=rt>>>13,he=B[5]|0,be=he&8191,Ce=he>>>13,Oe=B[6]|0,Ie=Oe&8191,De=Oe>>>13,je=B[7]|0,Me=je&8191,He=je>>>13,qe=B[8]|0,Ue=qe&8191,at=qe>>>13,Be=B[9]|0,Ke=Be&8191,mt=Be>>>13;v.negative=S.negative^C.negative,v.length=19,H=Math.imul(q,le),P=Math.imul(q,xe),P=P+Math.imul(J,le)|0,F=Math.imul(J,xe);var ct=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(ct>>>26)|0,ct&=67108863,H=Math.imul(ae,le),P=Math.imul(ae,xe),P=P+Math.imul(ce,le)|0,F=Math.imul(ce,xe),H=H+Math.imul(q,Ae)|0,P=P+Math.imul(q,$e)|0,P=P+Math.imul(J,Ae)|0,F=F+Math.imul(J,$e)|0;var Pt=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,H=Math.imul(ue,le),P=Math.imul(ue,xe),P=P+Math.imul(O,le)|0,F=Math.imul(O,xe),H=H+Math.imul(ae,Ae)|0,P=P+Math.imul(ae,$e)|0,P=P+Math.imul(ce,Ae)|0,F=F+Math.imul(ce,$e)|0,H=H+Math.imul(q,We)|0,P=P+Math.imul(q,gt)|0,P=P+Math.imul(J,We)|0,F=F+Math.imul(J,gt)|0;var En=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(En>>>26)|0,En&=67108863,H=Math.imul(ee,le),P=Math.imul(ee,xe),P=P+Math.imul(se,le)|0,F=Math.imul(se,xe),H=H+Math.imul(ue,Ae)|0,P=P+Math.imul(ue,$e)|0,P=P+Math.imul(O,Ae)|0,F=F+Math.imul(O,$e)|0,H=H+Math.imul(ae,We)|0,P=P+Math.imul(ae,gt)|0,P=P+Math.imul(ce,We)|0,F=F+Math.imul(ce,gt)|0,H=H+Math.imul(q,Ye)|0,P=P+Math.imul(q,Qe)|0,P=P+Math.imul(J,Ye)|0,F=F+Math.imul(J,Qe)|0;var Fn=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,H=Math.imul(ge,le),P=Math.imul(ge,xe),P=P+Math.imul(X,le)|0,F=Math.imul(X,xe),H=H+Math.imul(ee,Ae)|0,P=P+Math.imul(ee,$e)|0,P=P+Math.imul(se,Ae)|0,F=F+Math.imul(se,$e)|0,H=H+Math.imul(ue,We)|0,P=P+Math.imul(ue,gt)|0,P=P+Math.imul(O,We)|0,F=F+Math.imul(O,gt)|0,H=H+Math.imul(ae,Ye)|0,P=P+Math.imul(ae,Qe)|0,P=P+Math.imul(ce,Ye)|0,F=F+Math.imul(ce,Qe)|0,H=H+Math.imul(q,ve)|0,P=P+Math.imul(q,oe)|0,P=P+Math.imul(J,ve)|0,F=F+Math.imul(J,oe)|0;var cn=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(cn>>>26)|0,cn&=67108863,H=Math.imul(z,le),P=Math.imul(z,xe),P=P+Math.imul(Z,le)|0,F=Math.imul(Z,xe),H=H+Math.imul(ge,Ae)|0,P=P+Math.imul(ge,$e)|0,P=P+Math.imul(X,Ae)|0,F=F+Math.imul(X,$e)|0,H=H+Math.imul(ee,We)|0,P=P+Math.imul(ee,gt)|0,P=P+Math.imul(se,We)|0,F=F+Math.imul(se,gt)|0,H=H+Math.imul(ue,Ye)|0,P=P+Math.imul(ue,Qe)|0,P=P+Math.imul(O,Ye)|0,F=F+Math.imul(O,Qe)|0,H=H+Math.imul(ae,ve)|0,P=P+Math.imul(ae,oe)|0,P=P+Math.imul(ce,ve)|0,F=F+Math.imul(ce,oe)|0,H=H+Math.imul(q,be)|0,P=P+Math.imul(q,Ce)|0,P=P+Math.imul(J,be)|0,F=F+Math.imul(J,Ce)|0;var ii=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(ii>>>26)|0,ii&=67108863,H=Math.imul(de,le),P=Math.imul(de,xe),P=P+Math.imul(we,le)|0,F=Math.imul(we,xe),H=H+Math.imul(z,Ae)|0,P=P+Math.imul(z,$e)|0,P=P+Math.imul(Z,Ae)|0,F=F+Math.imul(Z,$e)|0,H=H+Math.imul(ge,We)|0,P=P+Math.imul(ge,gt)|0,P=P+Math.imul(X,We)|0,F=F+Math.imul(X,gt)|0,H=H+Math.imul(ee,Ye)|0,P=P+Math.imul(ee,Qe)|0,P=P+Math.imul(se,Ye)|0,F=F+Math.imul(se,Qe)|0,H=H+Math.imul(ue,ve)|0,P=P+Math.imul(ue,oe)|0,P=P+Math.imul(O,ve)|0,F=F+Math.imul(O,oe)|0,H=H+Math.imul(ae,be)|0,P=P+Math.imul(ae,Ce)|0,P=P+Math.imul(ce,be)|0,F=F+Math.imul(ce,Ce)|0,H=H+Math.imul(q,Ie)|0,P=P+Math.imul(q,De)|0,P=P+Math.imul(J,Ie)|0,F=F+Math.imul(J,De)|0;var un=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(un>>>26)|0,un&=67108863,H=Math.imul(Ee,le),P=Math.imul(Ee,xe),P=P+Math.imul(ke,le)|0,F=Math.imul(ke,xe),H=H+Math.imul(de,Ae)|0,P=P+Math.imul(de,$e)|0,P=P+Math.imul(we,Ae)|0,F=F+Math.imul(we,$e)|0,H=H+Math.imul(z,We)|0,P=P+Math.imul(z,gt)|0,P=P+Math.imul(Z,We)|0,F=F+Math.imul(Z,gt)|0,H=H+Math.imul(ge,Ye)|0,P=P+Math.imul(ge,Qe)|0,P=P+Math.imul(X,Ye)|0,F=F+Math.imul(X,Qe)|0,H=H+Math.imul(ee,ve)|0,P=P+Math.imul(ee,oe)|0,P=P+Math.imul(se,ve)|0,F=F+Math.imul(se,oe)|0,H=H+Math.imul(ue,be)|0,P=P+Math.imul(ue,Ce)|0,P=P+Math.imul(O,be)|0,F=F+Math.imul(O,Ce)|0,H=H+Math.imul(ae,Ie)|0,P=P+Math.imul(ae,De)|0,P=P+Math.imul(ce,Ie)|0,F=F+Math.imul(ce,De)|0,H=H+Math.imul(q,Me)|0,P=P+Math.imul(q,He)|0,P=P+Math.imul(J,Me)|0,F=F+Math.imul(J,He)|0;var zi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(zi>>>26)|0,zi&=67108863,H=Math.imul(W,le),P=Math.imul(W,xe),P=P+Math.imul(x,le)|0,F=Math.imul(x,xe),H=H+Math.imul(Ee,Ae)|0,P=P+Math.imul(Ee,$e)|0,P=P+Math.imul(ke,Ae)|0,F=F+Math.imul(ke,$e)|0,H=H+Math.imul(de,We)|0,P=P+Math.imul(de,gt)|0,P=P+Math.imul(we,We)|0,F=F+Math.imul(we,gt)|0,H=H+Math.imul(z,Ye)|0,P=P+Math.imul(z,Qe)|0,P=P+Math.imul(Z,Ye)|0,F=F+Math.imul(Z,Qe)|0,H=H+Math.imul(ge,ve)|0,P=P+Math.imul(ge,oe)|0,P=P+Math.imul(X,ve)|0,F=F+Math.imul(X,oe)|0,H=H+Math.imul(ee,be)|0,P=P+Math.imul(ee,Ce)|0,P=P+Math.imul(se,be)|0,F=F+Math.imul(se,Ce)|0,H=H+Math.imul(ue,Ie)|0,P=P+Math.imul(ue,De)|0,P=P+Math.imul(O,Ie)|0,F=F+Math.imul(O,De)|0,H=H+Math.imul(ae,Me)|0,P=P+Math.imul(ae,He)|0,P=P+Math.imul(ce,Me)|0,F=F+Math.imul(ce,He)|0,H=H+Math.imul(q,Ue)|0,P=P+Math.imul(q,at)|0,P=P+Math.imul(J,Ue)|0,F=F+Math.imul(J,at)|0;var Hi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,H=Math.imul(Y,le),P=Math.imul(Y,xe),P=P+Math.imul(re,le)|0,F=Math.imul(re,xe),H=H+Math.imul(W,Ae)|0,P=P+Math.imul(W,$e)|0,P=P+Math.imul(x,Ae)|0,F=F+Math.imul(x,$e)|0,H=H+Math.imul(Ee,We)|0,P=P+Math.imul(Ee,gt)|0,P=P+Math.imul(ke,We)|0,F=F+Math.imul(ke,gt)|0,H=H+Math.imul(de,Ye)|0,P=P+Math.imul(de,Qe)|0,P=P+Math.imul(we,Ye)|0,F=F+Math.imul(we,Qe)|0,H=H+Math.imul(z,ve)|0,P=P+Math.imul(z,oe)|0,P=P+Math.imul(Z,ve)|0,F=F+Math.imul(Z,oe)|0,H=H+Math.imul(ge,be)|0,P=P+Math.imul(ge,Ce)|0,P=P+Math.imul(X,be)|0,F=F+Math.imul(X,Ce)|0,H=H+Math.imul(ee,Ie)|0,P=P+Math.imul(ee,De)|0,P=P+Math.imul(se,Ie)|0,F=F+Math.imul(se,De)|0,H=H+Math.imul(ue,Me)|0,P=P+Math.imul(ue,He)|0,P=P+Math.imul(O,Me)|0,F=F+Math.imul(O,He)|0,H=H+Math.imul(ae,Ue)|0,P=P+Math.imul(ae,at)|0,P=P+Math.imul(ce,Ue)|0,F=F+Math.imul(ce,at)|0,H=H+Math.imul(q,Ke)|0,P=P+Math.imul(q,mt)|0,P=P+Math.imul(J,Ke)|0,F=F+Math.imul(J,mt)|0;var Vi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,H=Math.imul(Y,Ae),P=Math.imul(Y,$e),P=P+Math.imul(re,Ae)|0,F=Math.imul(re,$e),H=H+Math.imul(W,We)|0,P=P+Math.imul(W,gt)|0,P=P+Math.imul(x,We)|0,F=F+Math.imul(x,gt)|0,H=H+Math.imul(Ee,Ye)|0,P=P+Math.imul(Ee,Qe)|0,P=P+Math.imul(ke,Ye)|0,F=F+Math.imul(ke,Qe)|0,H=H+Math.imul(de,ve)|0,P=P+Math.imul(de,oe)|0,P=P+Math.imul(we,ve)|0,F=F+Math.imul(we,oe)|0,H=H+Math.imul(z,be)|0,P=P+Math.imul(z,Ce)|0,P=P+Math.imul(Z,be)|0,F=F+Math.imul(Z,Ce)|0,H=H+Math.imul(ge,Ie)|0,P=P+Math.imul(ge,De)|0,P=P+Math.imul(X,Ie)|0,F=F+Math.imul(X,De)|0,H=H+Math.imul(ee,Me)|0,P=P+Math.imul(ee,He)|0,P=P+Math.imul(se,Me)|0,F=F+Math.imul(se,He)|0,H=H+Math.imul(ue,Ue)|0,P=P+Math.imul(ue,at)|0,P=P+Math.imul(O,Ue)|0,F=F+Math.imul(O,at)|0,H=H+Math.imul(ae,Ke)|0,P=P+Math.imul(ae,mt)|0,P=P+Math.imul(ce,Ke)|0,F=F+Math.imul(ce,mt)|0;var Wi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,H=Math.imul(Y,We),P=Math.imul(Y,gt),P=P+Math.imul(re,We)|0,F=Math.imul(re,gt),H=H+Math.imul(W,Ye)|0,P=P+Math.imul(W,Qe)|0,P=P+Math.imul(x,Ye)|0,F=F+Math.imul(x,Qe)|0,H=H+Math.imul(Ee,ve)|0,P=P+Math.imul(Ee,oe)|0,P=P+Math.imul(ke,ve)|0,F=F+Math.imul(ke,oe)|0,H=H+Math.imul(de,be)|0,P=P+Math.imul(de,Ce)|0,P=P+Math.imul(we,be)|0,F=F+Math.imul(we,Ce)|0,H=H+Math.imul(z,Ie)|0,P=P+Math.imul(z,De)|0,P=P+Math.imul(Z,Ie)|0,F=F+Math.imul(Z,De)|0,H=H+Math.imul(ge,Me)|0,P=P+Math.imul(ge,He)|0,P=P+Math.imul(X,Me)|0,F=F+Math.imul(X,He)|0,H=H+Math.imul(ee,Ue)|0,P=P+Math.imul(ee,at)|0,P=P+Math.imul(se,Ue)|0,F=F+Math.imul(se,at)|0,H=H+Math.imul(ue,Ke)|0,P=P+Math.imul(ue,mt)|0,P=P+Math.imul(O,Ke)|0,F=F+Math.imul(O,mt)|0;var qi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(qi>>>26)|0,qi&=67108863,H=Math.imul(Y,Ye),P=Math.imul(Y,Qe),P=P+Math.imul(re,Ye)|0,F=Math.imul(re,Qe),H=H+Math.imul(W,ve)|0,P=P+Math.imul(W,oe)|0,P=P+Math.imul(x,ve)|0,F=F+Math.imul(x,oe)|0,H=H+Math.imul(Ee,be)|0,P=P+Math.imul(Ee,Ce)|0,P=P+Math.imul(ke,be)|0,F=F+Math.imul(ke,Ce)|0,H=H+Math.imul(de,Ie)|0,P=P+Math.imul(de,De)|0,P=P+Math.imul(we,Ie)|0,F=F+Math.imul(we,De)|0,H=H+Math.imul(z,Me)|0,P=P+Math.imul(z,He)|0,P=P+Math.imul(Z,Me)|0,F=F+Math.imul(Z,He)|0,H=H+Math.imul(ge,Ue)|0,P=P+Math.imul(ge,at)|0,P=P+Math.imul(X,Ue)|0,F=F+Math.imul(X,at)|0,H=H+Math.imul(ee,Ke)|0,P=P+Math.imul(ee,mt)|0,P=P+Math.imul(se,Ke)|0,F=F+Math.imul(se,mt)|0;var oo=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(oo>>>26)|0,oo&=67108863,H=Math.imul(Y,ve),P=Math.imul(Y,oe),P=P+Math.imul(re,ve)|0,F=Math.imul(re,oe),H=H+Math.imul(W,be)|0,P=P+Math.imul(W,Ce)|0,P=P+Math.imul(x,be)|0,F=F+Math.imul(x,Ce)|0,H=H+Math.imul(Ee,Ie)|0,P=P+Math.imul(Ee,De)|0,P=P+Math.imul(ke,Ie)|0,F=F+Math.imul(ke,De)|0,H=H+Math.imul(de,Me)|0,P=P+Math.imul(de,He)|0,P=P+Math.imul(we,Me)|0,F=F+Math.imul(we,He)|0,H=H+Math.imul(z,Ue)|0,P=P+Math.imul(z,at)|0,P=P+Math.imul(Z,Ue)|0,F=F+Math.imul(Z,at)|0,H=H+Math.imul(ge,Ke)|0,P=P+Math.imul(ge,mt)|0,P=P+Math.imul(X,Ke)|0,F=F+Math.imul(X,mt)|0;var Gi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,H=Math.imul(Y,be),P=Math.imul(Y,Ce),P=P+Math.imul(re,be)|0,F=Math.imul(re,Ce),H=H+Math.imul(W,Ie)|0,P=P+Math.imul(W,De)|0,P=P+Math.imul(x,Ie)|0,F=F+Math.imul(x,De)|0,H=H+Math.imul(Ee,Me)|0,P=P+Math.imul(Ee,He)|0,P=P+Math.imul(ke,Me)|0,F=F+Math.imul(ke,He)|0,H=H+Math.imul(de,Ue)|0,P=P+Math.imul(de,at)|0,P=P+Math.imul(we,Ue)|0,F=F+Math.imul(we,at)|0,H=H+Math.imul(z,Ke)|0,P=P+Math.imul(z,mt)|0,P=P+Math.imul(Z,Ke)|0,F=F+Math.imul(Z,mt)|0;var Ki=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,H=Math.imul(Y,Ie),P=Math.imul(Y,De),P=P+Math.imul(re,Ie)|0,F=Math.imul(re,De),H=H+Math.imul(W,Me)|0,P=P+Math.imul(W,He)|0,P=P+Math.imul(x,Me)|0,F=F+Math.imul(x,He)|0,H=H+Math.imul(Ee,Ue)|0,P=P+Math.imul(Ee,at)|0,P=P+Math.imul(ke,Ue)|0,F=F+Math.imul(ke,at)|0,H=H+Math.imul(de,Ke)|0,P=P+Math.imul(de,mt)|0,P=P+Math.imul(we,Ke)|0,F=F+Math.imul(we,mt)|0;var qr=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(qr>>>26)|0,qr&=67108863,H=Math.imul(Y,Me),P=Math.imul(Y,He),P=P+Math.imul(re,Me)|0,F=Math.imul(re,He),H=H+Math.imul(W,Ue)|0,P=P+Math.imul(W,at)|0,P=P+Math.imul(x,Ue)|0,F=F+Math.imul(x,at)|0,H=H+Math.imul(Ee,Ke)|0,P=P+Math.imul(Ee,mt)|0,P=P+Math.imul(ke,Ke)|0,F=F+Math.imul(ke,mt)|0;var Yi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,H=Math.imul(Y,Ue),P=Math.imul(Y,at),P=P+Math.imul(re,Ue)|0,F=Math.imul(re,at),H=H+Math.imul(W,Ke)|0,P=P+Math.imul(W,mt)|0,P=P+Math.imul(x,Ke)|0,F=F+Math.imul(x,mt)|0;var Xi=(j+H|0)+((P&8191)<<13)|0;j=(F+(P>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,H=Math.imul(Y,Ke),P=Math.imul(Y,mt),P=P+Math.imul(re,Ke)|0,F=Math.imul(re,mt);var Zi=(j+H|0)+((P&8191)<<13)|0;return j=(F+(P>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,T[0]=ct,T[1]=Pt,T[2]=En,T[3]=Fn,T[4]=cn,T[5]=ii,T[6]=un,T[7]=zi,T[8]=Hi,T[9]=Vi,T[10]=Wi,T[11]=qi,T[12]=oo,T[13]=Gi,T[14]=Ki,T[15]=qr,T[16]=Yi,T[17]=Xi,T[18]=Zi,j!==0&&(T[19]=j,v.length++),v};Math.imul||(m=h);function _(V,S,C){C.negative=S.negative^V.negative,C.length=V.length+S.length;for(var v=0,b=0,B=0;B>>26)|0,b+=T>>>26,T&=67108863}C.words[B]=j,v=T,T=b}return v!==0?C.words[B]=v:C.length--,C.strip()}function w(V,S,C){var v=new g;return v.mulp(V,S,C)}i.prototype.mulTo=function(S,C){var v,b=this.length+S.length;return this.length===10&&S.length===10?v=m(this,S,C):b<63?v=h(this,S,C):b<1024?v=_(this,S,C):v=w(this,S,C),v};function g(V,S){this.x=V,this.y=S}g.prototype.makeRBT=function(S){for(var C=new Array(S),v=i.prototype._countBits(S)-1,b=0;b>=1;return b},g.prototype.permute=function(S,C,v,b,B,T){for(var j=0;j>>1)B++;return 1<>>13,v[2*T+1]=B&8191,B=B>>>13;for(T=2*C;T>=26,C+=b/67108864|0,C+=B>>>26,this.words[v]=B&67108863}return C!==0&&(this.words[v]=C,this.length++),this},i.prototype.muln=function(S){return this.clone().imuln(S)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(S){var C=p(S);if(C.length===0)return new i(1);for(var v=this,b=0;b=0);var C=S%26,v=(S-C)/26,b=67108863>>>26-C<<26-C,B;if(C!==0){var T=0;for(B=0;B>>26-C}T&&(this.words[B]=T,this.length++)}if(v!==0){for(B=this.length-1;B>=0;B--)this.words[B+v]=this.words[B];for(B=0;B=0);var b;C?b=(C-C%26)/26:b=0;var B=S%26,T=Math.min((S-B)/26,this.length),j=67108863^67108863>>>B<T)for(this.length-=T,P=0;P=0&&(F!==0||P>=b);P--){var $=this.words[P]|0;this.words[P]=F<<26-B|$>>>B,F=$&j}return H&&F!==0&&(H.words[H.length++]=F),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(S,C,v){return n(this.negative===0),this.iushrn(S,C,v)},i.prototype.shln=function(S){return this.clone().ishln(S)},i.prototype.ushln=function(S){return this.clone().iushln(S)},i.prototype.shrn=function(S){return this.clone().ishrn(S)},i.prototype.ushrn=function(S){return this.clone().iushrn(S)},i.prototype.testn=function(S){n(typeof S=="number"&&S>=0);var C=S%26,v=(S-C)/26,b=1<=0);var C=S%26,v=(S-C)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(C!==0&&v++,this.length=Math.min(v,this.length),C!==0){var b=67108863^67108863>>>C<=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},i.prototype.isubn=function(S){if(n(typeof S=="number"),n(S<67108864),S<0)return this.iaddn(-S);if(this.negative!==0)return this.negative=0,this.iaddn(S),this.negative=1,this;if(this.words[0]-=S,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C>26)-(H/67108864|0),this.words[B+v]=T&67108863}for(;B>26,this.words[B+v]=T&67108863;if(j===0)return this.strip();for(n(j===-1),j=0,B=0;B>26,this.words[B]=T&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(S,C){var v=this.length-S.length,b=this.clone(),B=S,T=B.words[B.length-1]|0,j=this._countBits(T);v=26-j,v!==0&&(B=B.ushln(v),b.iushln(v),T=B.words[B.length-1]|0);var H=b.length-B.length,P;if(C!=="mod"){P=new i(null),P.length=H+1,P.words=new Array(P.length);for(var F=0;F=0;q--){var J=(b.words[B.length+q]|0)*67108864+(b.words[B.length+q-1]|0);for(J=Math.min(J/T|0,67108863),b._ishlnsubmul(B,J,q);b.negative!==0;)J--,b.negative=0,b._ishlnsubmul(B,1,q),b.isZero()||(b.negative^=1);P&&(P.words[q]=J)}return P&&P.strip(),b.strip(),C!=="div"&&v!==0&&b.iushrn(v),{div:P||null,mod:b}},i.prototype.divmod=function(S,C,v){if(n(!S.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var b,B,T;return this.negative!==0&&S.negative===0?(T=this.neg().divmod(S,C),C!=="mod"&&(b=T.div.neg()),C!=="div"&&(B=T.mod.neg(),v&&B.negative!==0&&B.iadd(S)),{div:b,mod:B}):this.negative===0&&S.negative!==0?(T=this.divmod(S.neg(),C),C!=="mod"&&(b=T.div.neg()),{div:b,mod:T.mod}):this.negative&S.negative?(T=this.neg().divmod(S.neg(),C),C!=="div"&&(B=T.mod.neg(),v&&B.negative!==0&&B.isub(S)),{div:T.div,mod:B}):S.length>this.length||this.cmp(S)<0?{div:new i(0),mod:this}:S.length===1?C==="div"?{div:this.divn(S.words[0]),mod:null}:C==="mod"?{div:null,mod:new i(this.modn(S.words[0]))}:{div:this.divn(S.words[0]),mod:new i(this.modn(S.words[0]))}:this._wordDiv(S,C)},i.prototype.div=function(S){return this.divmod(S,"div",!1).div},i.prototype.mod=function(S){return this.divmod(S,"mod",!1).mod},i.prototype.umod=function(S){return this.divmod(S,"mod",!0).mod},i.prototype.divRound=function(S){var C=this.divmod(S);if(C.mod.isZero())return C.div;var v=C.div.negative!==0?C.mod.isub(S):C.mod,b=S.ushrn(1),B=S.andln(1),T=v.cmp(b);return T<0||B===1&&T===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},i.prototype.modn=function(S){n(S<=67108863);for(var C=(1<<26)%S,v=0,b=this.length-1;b>=0;b--)v=(C*v+(this.words[b]|0))%S;return v},i.prototype.idivn=function(S){n(S<=67108863);for(var C=0,v=this.length-1;v>=0;v--){var b=(this.words[v]|0)+C*67108864;this.words[v]=b/S|0,C=b%S}return this.strip()},i.prototype.divn=function(S){return this.clone().idivn(S)},i.prototype.egcd=function(S){n(S.negative===0),n(!S.isZero());var C=this,v=S.clone();C.negative!==0?C=C.umod(S):C=C.clone();for(var b=new i(1),B=new i(0),T=new i(0),j=new i(1),H=0;C.isEven()&&v.isEven();)C.iushrn(1),v.iushrn(1),++H;for(var P=v.clone(),F=C.clone();!C.isZero();){for(var $=0,q=1;!(C.words[0]&q)&&$<26;++$,q<<=1);if($>0)for(C.iushrn($);$-- >0;)(b.isOdd()||B.isOdd())&&(b.iadd(P),B.isub(F)),b.iushrn(1),B.iushrn(1);for(var J=0,te=1;!(v.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(v.iushrn(J);J-- >0;)(T.isOdd()||j.isOdd())&&(T.iadd(P),j.isub(F)),T.iushrn(1),j.iushrn(1);C.cmp(v)>=0?(C.isub(v),b.isub(T),B.isub(j)):(v.isub(C),T.isub(b),j.isub(B))}return{a:T,b:j,gcd:v.iushln(H)}},i.prototype._invmp=function(S){n(S.negative===0),n(!S.isZero());var C=this,v=S.clone();C.negative!==0?C=C.umod(S):C=C.clone();for(var b=new i(1),B=new i(0),T=v.clone();C.cmpn(1)>0&&v.cmpn(1)>0;){for(var j=0,H=1;!(C.words[0]&H)&&j<26;++j,H<<=1);if(j>0)for(C.iushrn(j);j-- >0;)b.isOdd()&&b.iadd(T),b.iushrn(1);for(var P=0,F=1;!(v.words[0]&F)&&P<26;++P,F<<=1);if(P>0)for(v.iushrn(P);P-- >0;)B.isOdd()&&B.iadd(T),B.iushrn(1);C.cmp(v)>=0?(C.isub(v),b.isub(B)):(v.isub(C),B.isub(b))}var $;return C.cmpn(1)===0?$=b:$=B,$.cmpn(0)<0&&$.iadd(S),$},i.prototype.gcd=function(S){if(this.isZero())return S.abs();if(S.isZero())return this.abs();var C=this.clone(),v=S.clone();C.negative=0,v.negative=0;for(var b=0;C.isEven()&&v.isEven();b++)C.iushrn(1),v.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;v.isEven();)v.iushrn(1);var B=C.cmp(v);if(B<0){var T=C;C=v,v=T}else if(B===0||v.cmpn(1)===0)break;C.isub(v)}while(!0);return v.iushln(b)},i.prototype.invm=function(S){return this.egcd(S).a.umod(S)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(S){return this.words[0]&S},i.prototype.bincn=function(S){n(typeof S=="number");var C=S%26,v=(S-C)/26,b=1<>>26,j&=67108863,this.words[T]=j}return B!==0&&(this.words[T]=B,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(S){var C=S<0;if(this.negative!==0&&!C)return-1;if(this.negative===0&&C)return 1;this.strip();var v;if(this.length>1)v=1;else{C&&(S=-S),n(S<=67108863,"Number is too big");var b=this.words[0]|0;v=b===S?0:bS.length)return 1;if(this.length=0;v--){var b=this.words[v]|0,B=S.words[v]|0;if(b!==B){bB&&(C=1);break}}return C},i.prototype.gtn=function(S){return this.cmpn(S)===1},i.prototype.gt=function(S){return this.cmp(S)===1},i.prototype.gten=function(S){return this.cmpn(S)>=0},i.prototype.gte=function(S){return this.cmp(S)>=0},i.prototype.ltn=function(S){return this.cmpn(S)===-1},i.prototype.lt=function(S){return this.cmp(S)===-1},i.prototype.lten=function(S){return this.cmpn(S)<=0},i.prototype.lte=function(S){return this.cmp(S)<=0},i.prototype.eqn=function(S){return this.cmpn(S)===0},i.prototype.eq=function(S){return this.cmp(S)===0},i.red=function(S){return new L(S)},i.prototype.toRed=function(S){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),S.convertTo(this)._forceRed(S)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(S){return this.red=S,this},i.prototype.forceRed=function(S){return n(!this.red,"Already a number in reduction context"),this._forceRed(S)},i.prototype.redAdd=function(S){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,S)},i.prototype.redIAdd=function(S){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,S)},i.prototype.redSub=function(S){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,S)},i.prototype.redISub=function(S){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,S)},i.prototype.redShl=function(S){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,S)},i.prototype.redMul=function(S){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.mul(this,S)},i.prototype.redIMul=function(S){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,S),this.red.imul(this,S)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(S){return n(this.red&&!S.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,S)};var E={k256:null,p224:null,p192:null,p25519:null};function A(V,S){this.name=V,this.p=new i(S,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var S=new i(null);return S.words=new Array(Math.ceil(this.n/13)),S},A.prototype.ireduce=function(S){var C=S,v;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),v=C.bitLength();while(v>this.n);var b=v0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},A.prototype.split=function(S,C){S.iushrn(this.n,0,C)},A.prototype.imulK=function(S){return S.imul(this.k)};function N(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(N,A),N.prototype.split=function(S,C){for(var v=4194303,b=Math.min(S.length,9),B=0;B>>22,T=j}T>>>=22,S.words[B-10]=T,T===0&&S.length>10?S.length-=10:S.length-=9},N.prototype.imulK=function(S){S.words[S.length]=0,S.words[S.length+1]=0,S.length+=2;for(var C=0,v=0;v>>=26,S.words[v]=B,C=b}return C!==0&&(S.words[S.length++]=C),S},i._prime=function(S){if(E[S])return E[S];var C;if(S==="k256")C=new N;else if(S==="p224")C=new D;else if(S==="p192")C=new y;else if(S==="p25519")C=new U;else throw new Error("Unknown prime "+S);return E[S]=C,C};function L(V){if(typeof V=="string"){var S=i._prime(V);this.m=S.p,this.prime=S}else n(V.gtn(1),"modulus must be greater than 1"),this.m=V,this.prime=null}L.prototype._verify1=function(S){n(S.negative===0,"red works only with positives"),n(S.red,"red works only with red numbers")},L.prototype._verify2=function(S,C){n((S.negative|C.negative)===0,"red works only with positives"),n(S.red&&S.red===C.red,"red works only with red numbers")},L.prototype.imod=function(S){return this.prime?this.prime.ireduce(S)._forceRed(this):S.umod(this.m)._forceRed(this)},L.prototype.neg=function(S){return S.isZero()?S.clone():this.m.sub(S)._forceRed(this)},L.prototype.add=function(S,C){this._verify2(S,C);var v=S.add(C);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},L.prototype.iadd=function(S,C){this._verify2(S,C);var v=S.iadd(C);return v.cmp(this.m)>=0&&v.isub(this.m),v},L.prototype.sub=function(S,C){this._verify2(S,C);var v=S.sub(C);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},L.prototype.isub=function(S,C){this._verify2(S,C);var v=S.isub(C);return v.cmpn(0)<0&&v.iadd(this.m),v},L.prototype.shl=function(S,C){return this._verify1(S),this.imod(S.ushln(C))},L.prototype.imul=function(S,C){return this._verify2(S,C),this.imod(S.imul(C))},L.prototype.mul=function(S,C){return this._verify2(S,C),this.imod(S.mul(C))},L.prototype.isqr=function(S){return this.imul(S,S.clone())},L.prototype.sqr=function(S){return this.mul(S,S)},L.prototype.sqrt=function(S){if(S.isZero())return S.clone();var C=this.m.andln(3);if(n(C%2===1),C===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(S,v)}for(var b=this.m.subn(1),B=0;!b.isZero()&&b.andln(1)===0;)B++,b.iushrn(1);n(!b.isZero());var T=new i(1).toRed(this),j=T.redNeg(),H=this.m.subn(1).iushrn(1),P=this.m.bitLength();for(P=new i(2*P*P).toRed(this);this.pow(P,H).cmp(j)!==0;)P.redIAdd(j);for(var F=this.pow(P,b),$=this.pow(S,b.addn(1).iushrn(1)),q=this.pow(S,b),J=B;q.cmp(T)!==0;){for(var te=q,ae=0;te.cmp(T)!==0;ae++)te=te.redSqr();n(ae=0;B--){for(var F=C.words[B],$=P-1;$>=0;$--){var q=F>>$&1;if(T!==b[0]&&(T=this.sqr(T)),q===0&&j===0){H=0;continue}j<<=1,j|=q,H++,!(H!==v&&(B!==0||$!==0))&&(T=this.mul(T,b[j]),H=0,j=0)}P=26}return T},L.prototype.convertTo=function(S){var C=S.umod(this.m);return C===S?C.clone():C},L.prototype.convertFrom=function(S){var C=S.clone();return C.red=null,C},i.mont=function(S){return new G(S)};function G(V){L.call(this,V),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(G,L),G.prototype.convertTo=function(S){return this.imod(S.ushln(this.shift))},G.prototype.convertFrom=function(S){var C=this.imod(S.mul(this.rinv));return C.red=null,C},G.prototype.imul=function(S,C){if(S.isZero()||C.isZero())return S.words[0]=0,S.length=1,S;var v=S.imul(C),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(b).iushrn(this.shift),T=B;return B.cmp(this.m)>=0?T=B.isub(this.m):B.cmpn(0)<0&&(T=B.iadd(this.m)),T._forceRed(this)},G.prototype.mul=function(S,C){if(S.isZero()||C.isZero())return new i(0)._forceRed(this);var v=S.mul(C),b=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=v.isub(b).iushrn(this.shift),T=B;return B.cmp(this.m)>=0?T=B.isub(this.m):B.cmpn(0)<0&&(T=B.iadd(this.m)),T._forceRed(this)},G.prototype.invm=function(S){var C=this.imod(S._invmp(this.m).mul(this.r2));return C._forceRed(this)}})(e,Le)})(T8);var Fa=T8.exports,uc=Eq;function Eq(e,t){if(!e)throw new Error(t||"Assertion failed")}Eq.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)};var D8={};(function(e){var t=e;function r(i,a){if(Array.isArray(i))return i.slice();if(!i)return[];var s=[];if(typeof i!="string"){for(var l=0;l>8,f=c&255;u?s.push(u,f):s.push(f)}return s}t.toArray=r;function n(i){return i.length===1?"0"+i:i}t.zero2=n;function o(i){for(var a="",s=0;s(h>>1)-1?w=(h>>1)-g:w=g,m.isubn(w)):w=0,p[_]=w,m.iushrn(1)}return p}t.getNAF=i;function a(u,f){var d=[[],[]];u=u.clone(),f=f.clone();for(var p=0,h=0,m;u.cmpn(-p)>0||f.cmpn(-h)>0;){var _=u.andln(3)+p&3,w=f.andln(3)+h&3;_===3&&(_=-1),w===3&&(w=-1);var g;_&1?(m=u.andln(7)+p&7,(m===3||m===5)&&w===2?g=-_:g=_):g=0,d[0].push(g);var E;w&1?(m=f.andln(7)+h&7,(m===3||m===5)&&_===2?E=-w:E=w):E=0,d[1].push(E),2*p===g+1&&(p=1-p),2*h===E+1&&(h=1-h),u.iushrn(1),f.iushrn(1)}return d}t.getJSF=a;function s(u,f,d){var p="_"+f;u.prototype[f]=function(){return this[p]!==void 0?this[p]:this[p]=d.call(this)}}t.cachedProperty=s;function l(u){return typeof u=="string"?t.toArray(u,"hex"):u}t.parseBytes=l;function c(u){return new r(u,"hex","le")}t.intFromLE=c})(ro);var M8={exports:{}},Jw;M8.exports=function(t){return Jw||(Jw=new gs(null)),Jw.generate(t)};function gs(e){this.rand=e}M8.exports.Rand=gs;gs.prototype.generate=function(t){return this._rand(t)};gs.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),n=0;n0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Tb=Qs;Qs.prototype.point=function(){throw new Error("Not implemented")};Qs.prototype.validate=function(){throw new Error("Not implemented")};Qs.prototype._fixedNafMul=function(t,r){zm(t.precomputed);var n=t._getDoubles(),o=Um(r,1,this._bitLength),i=(1<=s;c--)l=(l<<1)+o[c];a.push(l)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s=0;l--){for(var c=0;l>=0&&a[l]===0;l--)c++;if(l>=0&&c++,s=s.dblp(c),l<0)break;var u=a[l];zm(u!==0),t.type==="affine"?u>0?s=s.mixedAdd(i[u-1>>1]):s=s.mixedAdd(i[-u-1>>1].neg()):u>0?s=s.add(i[u-1>>1]):s=s.add(i[-u-1>>1].neg())}return t.type==="affine"?s.toP():s};Qs.prototype._wnafMulAdd=function(t,r,n,o,i){var a=this._wnafT1,s=this._wnafT2,l=this._wnafT3,c=0,u,f,d;for(u=0;u=1;u-=2){var h=u-1,m=u;if(a[h]!==1||a[m]!==1){l[h]=Um(n[h],a[h],this._bitLength),l[m]=Um(n[m],a[m],this._bitLength),c=Math.max(l[h].length,c),c=Math.max(l[m].length,c);continue}var _=[r[h],null,null,r[m]];r[h].y.cmp(r[m].y)===0?(_[1]=r[h].add(r[m]),_[2]=r[h].toJ().mixedAdd(r[m].neg())):r[h].y.cmp(r[m].y.redNeg())===0?(_[1]=r[h].toJ().mixedAdd(r[m]),_[2]=r[h].add(r[m].neg())):(_[1]=r[h].toJ().mixedAdd(r[m]),_[2]=r[h].toJ().mixedAdd(r[m].neg()));var w=[-3,-1,-5,-7,0,7,5,1,3],g=nPe(n[h],n[m]);for(c=Math.max(g[0].length,c),l[h]=new Array(c),l[m]=new Array(c),f=0;f=0;u--){for(var y=0;u>=0;){var U=!0;for(f=0;f=0&&y++,N=N.dblp(y),u<0)break;for(f=0;f0?d=s[f][L-1>>1]:L<0&&(d=s[f][-L-1>>1].neg()),d.type==="affine"?N=N.mixedAdd(d):N=N.add(d))}}for(u=0;u=Math.ceil((t.bitLength()+1)/r.step):!1};Oo.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],o=this,i=0;i=0&&(p=c,h=u),f.negative&&(f=f.neg(),d=d.neg()),p.negative&&(p=p.neg(),h=h.neg()),[{a:f,b:d},{a:p,b:h}]};ko.prototype._endoSplit=function(t){var r=this.endo.basis,n=r[0],o=r[1],i=o.b.mul(t).divRound(this.n),a=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),l=a.mul(o.a),c=i.mul(n.b),u=a.mul(o.b),f=t.sub(s).sub(l),d=c.add(u).neg();return{k1:f,k2:d}};ko.prototype.pointFromX=function(t,r){t=new ir(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(o.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=o.fromRed().isOdd();return(r&&!i||!r&&i)&&(o=o.redNeg()),this.point(t,o)};ko.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,n=t.y,o=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(o).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};ko.prototype._endoWnafMulAdd=function(t,r,n){for(var o=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""};$r.prototype.isInfinity=function(){return this.inf};$r.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(t.x),o=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,o)};$r.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),o=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(o),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)};$r.prototype.getX=function(){return this.x.fromRed()};$r.prototype.getY=function(){return this.y.fromRed()};$r.prototype.mul=function(t){return t=new ir(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};$r.prototype.mulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i):this.curve._wnafMulAdd(1,o,i,2)};$r.prototype.jmulAdd=function(t,r,n){var o=[this,r],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(o,i,!0):this.curve._wnafMulAdd(1,o,i,2,!0)};$r.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};$r.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,o=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(o)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(o)}}}return r};$r.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function Wr(e,t,r,n){hf.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ir(0)):(this.x=new ir(t,16),this.y=new ir(r,16),this.z=new ir(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}N8(Wr,hf.BasePoint);ko.prototype.jpoint=function(t,r,n){return new Wr(this,t,r,n)};Wr.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),n=this.x.redMul(r),o=this.y.redMul(r).redMul(t);return this.curve.point(n,o)};Wr.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Wr.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),n=this.z.redSqr(),o=this.x.redMul(r),i=t.x.redMul(n),a=this.y.redMul(r.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),l=o.redSub(i),c=a.redSub(s);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=l.redSqr(),f=u.redMul(l),d=o.redMul(u),p=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(p)).redISub(a.redMul(f)),m=this.z.redMul(t.z).redMul(l);return this.curve.jpoint(p,h,m)};Wr.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),n=this.x,o=t.x.redMul(r),i=this.y,a=t.y.redMul(r).redMul(this.z),s=n.redSub(o),l=i.redSub(a);if(s.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=n.redMul(c),d=l.redSqr().redIAdd(u).redISub(f).redISub(f),p=l.redMul(f.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(s);return this.curve.jpoint(d,p,h)};Wr.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)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(i),this.x.cmp(n)===0)return!0}};Wr.prototype.inspect=function(){return this.isInfinity()?"":""};Wr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var tu=Fa,Cq=Db,Mb=Tb,sPe=ro;function vf(e){Mb.call(this,"mont",e),this.a=new tu(e.a,16).toRed(this.red),this.b=new tu(e.b,16).toRed(this.red),this.i4=new tu(4).toRed(this.red).redInvm(),this.two=new tu(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}Cq(vf,Mb);var lPe=vf;vf.prototype.validate=function(t){var r=t.normalize().x,n=r.redSqr(),o=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),i=o.redSqrt();return i.redSqr().cmp(o)===0};function Or(e,t,r){Mb.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new tu(t,16),this.z=new tu(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}Cq(Or,Mb.BasePoint);vf.prototype.decodePoint=function(t,r){return this.point(sPe.toArray(t,r),1)};vf.prototype.point=function(t,r){return new Or(this,t,r)};vf.prototype.pointFromJSON=function(t){return Or.fromJSON(this,t)};Or.prototype.precompute=function(){};Or.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Or.fromJSON=function(t,r){return new Or(t,r[0],r[1]||t.one)};Or.prototype.inspect=function(){return this.isInfinity()?"":""};Or.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Or.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),n=this.x.redSub(this.z),o=n.redSqr(),i=r.redSub(o),a=r.redMul(o),s=i.redMul(o.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,s)};Or.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Or.prototype.diffAdd=function(t,r){var n=this.x.redAdd(this.z),o=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z),s=a.redMul(n),l=i.redMul(o),c=r.z.redMul(s.redAdd(l).redSqr()),u=r.x.redMul(s.redISub(l).redSqr());return this.curve.point(c,u)};Or.prototype.mul=function(t){for(var r=t.clone(),n=this,o=this.curve.point(null,null),i=this,a=[];r.cmpn(0)!==0;r.iushrn(1))a.push(r.andln(1));for(var s=a.length-1;s>=0;s--)a[s]===0?(n=n.diffAdd(o,i),o=o.dbl()):(o=n.diffAdd(o,i),n=n.dbl());return o};Or.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Or.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Or.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Or.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Or.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var cPe=ro,pa=Fa,Pq=Db,Rb=Tb,uPe=cPe.assert;function Bi(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Rb.call(this,"edwards",e),this.a=new pa(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new pa(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new pa(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),uPe(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}Pq(Bi,Rb);var fPe=Bi;Bi.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};Bi.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};Bi.prototype.jpoint=function(t,r,n,o){return this.point(t,r,n,o)};Bi.prototype.pointFromX=function(t,r){t=new pa(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");var l=s.fromRed().isOdd();return(r&&!l||!r&&l)&&(s=s.redNeg()),this.point(t,s)};Bi.prototype.pointFromY=function(t,r){t=new pa(t,16),t.red||(t=t.toRed(this.red));var n=t.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(a.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(s.redSqr().redSub(a).cmp(this.zero)!==0)throw new Error("invalid point");return s.fromRed().isOdd()!==r&&(s=s.redNeg()),this.point(s,t)};Bi.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),n=t.y.redSqr(),o=r.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return o.cmp(i)===0};function zt(e,t,r,n,o){Rb.BasePoint.call(this,e,"projective"),t===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new pa(t,16),this.y=new pa(r,16),this.z=n?new pa(n,16):this.curve.one,this.t=o&&new pa(o,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Pq(zt,Rb.BasePoint);Bi.prototype.pointFromJSON=function(t){return zt.fromJSON(this,t)};Bi.prototype.point=function(t,r,n,o){return new zt(this,t,r,n,o)};zt.fromJSON=function(t,r){return new zt(t,r[0],r[1],r[2])};zt.prototype.inspect=function(){return this.isInfinity()?"":""};zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var o=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),a=o.redAdd(r),s=a.redSub(n),l=o.redSub(r),c=i.redMul(s),u=a.redMul(l),f=i.redMul(l),d=s.redMul(a);return this.curve.point(c,u,d,f)};zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),o,i,a,s,l,c;if(this.curve.twisted){s=this.curve._mulA(r);var u=s.redAdd(n);this.zOne?(o=t.redSub(r).redSub(n).redMul(u.redSub(this.curve.two)),i=u.redMul(s.redSub(n)),a=u.redSqr().redSub(u).redSub(u)):(l=this.z.redSqr(),c=u.redSub(l).redISub(l),o=t.redSub(r).redISub(n).redMul(c),i=u.redMul(s.redSub(n)),a=u.redMul(c))}else s=r.redAdd(n),l=this.curve._mulC(this.z).redSqr(),c=s.redSub(l).redSub(l),o=this.curve._mulC(t.redISub(s)).redMul(c),i=this.curve._mulC(s).redMul(r.redISub(n)),a=s.redMul(c);return this.curve.point(o,i,a)};zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),o=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=n.redSub(r),s=i.redSub(o),l=i.redAdd(o),c=n.redAdd(r),u=a.redMul(s),f=l.redMul(c),d=a.redMul(c),p=s.redMul(l);return this.curve.point(u,f,p,d)};zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),i=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(i),s=n.redSub(a),l=n.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(i),u=r.redMul(s).redMul(c),f,d;return this.curve.twisted?(f=r.redMul(l).redMul(i.redSub(this.curve._mulA(o))),d=s.redMul(l)):(f=r.redMul(l).redMul(i.redSub(o)),d=this.curve._mulC(s).redMul(l)),this.curve.point(u,f,d)};zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};zt.prototype.mulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!1)};zt.prototype.jmulAdd=function(t,r,n){return this.curve._wnafMulAdd(1,[this,r],[t,n],2,!0)};zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(o),this.x.cmp(r)===0)return!0}};zt.prototype.toP=zt.prototype.normalize;zt.prototype.mixedAdd=zt.prototype.add;(function(e){var t=e;t.base=Tb,t.short=aPe,t.mont=lPe,t.edwards=fPe})(R8);var Nb={},Fb={},Ct={},dPe=uc,pPe=Db;Ct.inherits=pPe;function hPe(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function vPe(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),o=0;o>6|192,r[n++]=i&63|128):hPe(e,o)?(i=65536+((i&1023)<<10)+(e.charCodeAt(++o)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(o=0;o>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Ct.htonl=Oq;function mPe(e,t){for(var r="",n=0;n>>0}return i}Ct.join32=yPe;function bPe(e,t){for(var r=new Array(e.length*4),n=0,o=0;n>>24,r[o+1]=i>>>16&255,r[o+2]=i>>>8&255,r[o+3]=i&255):(r[o+3]=i>>>24,r[o+2]=i>>>16&255,r[o+1]=i>>>8&255,r[o]=i&255)}return r}Ct.split32=bPe;function wPe(e,t){return e>>>t|e<<32-t}Ct.rotr32=wPe;function xPe(e,t){return e<>>32-t}Ct.rotl32=xPe;function _Pe(e,t){return e+t>>>0}Ct.sum32=_Pe;function EPe(e,t,r){return e+t+r>>>0}Ct.sum32_3=EPe;function SPe(e,t,r,n){return e+t+r+n>>>0}Ct.sum32_4=SPe;function CPe(e,t,r,n,o){return e+t+r+n+o>>>0}Ct.sum32_5=CPe;function PPe(e,t,r,n){var o=e[t],i=e[t+1],a=n+i>>>0,s=(a>>0,e[t+1]=a}Ct.sum64=PPe;function OPe(e,t,r,n){var o=t+n>>>0,i=(o>>0}Ct.sum64_hi=OPe;function kPe(e,t,r,n){var o=t+n;return o>>>0}Ct.sum64_lo=kPe;function APe(e,t,r,n,o,i,a,s){var l=0,c=t;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}Ct.sum64_4_hi=APe;function IPe(e,t,r,n,o,i,a,s){var l=t+n+i+s;return l>>>0}Ct.sum64_4_lo=IPe;function $Pe(e,t,r,n,o,i,a,s,l,c){var u=0,f=t;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}Ct.sum64_5_hi=$Pe;function TPe(e,t,r,n,o,i,a,s,l,c){var u=t+n+i+s+c;return u>>>0}Ct.sum64_5_lo=TPe;function DPe(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}Ct.rotr64_hi=DPe;function MPe(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Ct.rotr64_lo=MPe;function RPe(e,t,r){return e>>>r}Ct.shr64_hi=RPe;function NPe(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}Ct.shr64_lo=NPe;var gf={},qI=Ct,FPe=uc;function Bb(){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}gf.BlockHash=Bb;Bb.prototype.update=function(t,r){if(t=qI.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var n=t.length%this._delta8;this.pending=t.slice(t.length-n,t.length),this.pending.length===0&&(this.pending=null),t=qI.join32(t,0,t.length-n,this.endian);for(var o=0;o>>24&255,o[i++]=t>>>16&255,o[i++]=t>>>8&255,o[i++]=t&255}else for(o[i++]=t&255,o[i++]=t>>>8&255,o[i++]=t>>>16&255,o[i++]=t>>>24&255,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,a=8;a>>3}ji.g0_256=zPe;function HPe(e){return Ii(e,17)^Ii(e,19)^e>>>10}ji.g1_256=HPe;var ju=Ct,VPe=gf,WPe=ji,Qw=ju.rotl32,fd=ju.sum32,qPe=ju.sum32_5,GPe=WPe.ft_1,Dq=VPe.BlockHash,KPe=[1518500249,1859775393,2400959708,3395469782];function Mi(){if(!(this instanceof Mi))return new Mi;Dq.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ju.inherits(Mi,Dq);var YPe=Mi;Mi.blockSize=512;Mi.outSize=160;Mi.hmacStrength=80;Mi.padLength=64;Mi.prototype._update=function(t,r){for(var n=this.W,o=0;o<16;o++)n[o]=t[r+o];for(;othis.blockSize&&(t=new this.Hash().update(t).digest()),NOe(t.length<=this.blockSize);for(var r=t.length;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var LOe=Hs;Hs.prototype._init=function(t,r,n){var o=t.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1};Hs.prototype.generate=function(t,r,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(o=n,n=r,r=null),n&&(n=Nl.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length"};var Hm=Fa,F8=ro,VOe=F8.assert;function jb(e,t){if(e instanceof jb)return e;this._importDER(e,t)||(VOe(e.r&&e.s,"Signature without r or s"),this.r=new Hm(e.r,16),this.s=new Hm(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var WOe=jb;function qOe(){this.place=0}function n5(e,t){var r=e[t.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return o<=127?!1:(t.place=a,o)}function ZI(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}jb.prototype.toDER=function(t){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=ZI(r),n=ZI(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var o=[2];o5(o,r.length),o=o.concat(r),o.push(2),o5(o,n.length);var i=o.concat(n),a=[48];return o5(a,i.length),a=a.concat(i),F8.encode(a,t)};var Fl=Fa,Wq=LOe,GOe=ro,i5=Nb,KOe=Sq,qq=GOe.assert,B8=HOe,Lb=WOe;function Co(e){if(!(this instanceof Co))return new Co(e);typeof e=="string"&&(qq(Object.prototype.hasOwnProperty.call(i5,e),"Unknown curve "+e),e=i5[e]),e instanceof i5.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var YOe=Co;Co.prototype.keyPair=function(t){return new B8(this,t)};Co.prototype.keyFromPrivate=function(t,r){return B8.fromPrivate(this,t,r)};Co.prototype.keyFromPublic=function(t,r){return B8.fromPublic(this,t,r)};Co.prototype.genKeyPair=function(t){t||(t={});for(var r=new Wq({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||KOe(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new Fl(2));;){var i=new Fl(r.generate(n));if(!(i.cmp(o)>0))return i.iaddn(1),this.keyFromPrivate(i)}};Co.prototype._truncateToN=function(t,r){var n=t.byteLength()*8-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};Co.prototype.sign=function(t,r,n,o){typeof n=="object"&&(o=n,n=null),o||(o={}),r=this.keyFromPrivate(r,n),t=this._truncateToN(new Fl(t,16));for(var i=this.n.byteLength(),a=r.getPrivate().toArray("be",i),s=t.toArray("be",i),l=new Wq({hash:this.hash,entropy:a,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),c=this.n.sub(new Fl(1)),u=0;;u++){var f=o.k?o.k(u):new Fl(l.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var p=d.getX(),h=p.umod(this.n);if(h.cmpn(0)!==0){var m=f.invm(this.n).mul(h.mul(r.getPrivate()).iadd(t));if(m=m.umod(this.n),m.cmpn(0)!==0){var _=(d.getY().isOdd()?1:0)|(p.cmp(h)!==0?2:0);return o.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),_^=1),new Lb({r:h,s:m,recoveryParam:_})}}}}}};Co.prototype.verify=function(t,r,n,o){t=this._truncateToN(new Fl(t,16)),n=this.keyFromPublic(n,o),r=new Lb(r,"hex");var i=r.r,a=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s=a.invm(this.n),l=s.mul(t).umod(this.n),c=s.mul(i).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.eqXToP(i)):(u=this.g.mulAdd(l,n.getPublic(),c),u.isInfinity()?!1:u.getX().umod(this.n).cmp(i)===0)};Co.prototype.recoverPubKey=function(e,t,r,n){qq((3&r)===r,"The recovery param is more than two bits"),t=new Lb(t,n);var o=this.n,i=new Fl(e),a=t.r,s=t.s,l=r&1,c=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?a=this.curve.pointFromX(a.add(this.curve.n),l):a=this.curve.pointFromX(a,l);var u=t.r.invm(o),f=o.sub(i).mul(u).umod(o),d=s.mul(u).umod(o);return this.g.mulAdd(f,a,d)};Co.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new Lb(t,n),t.recoveryParam!==null)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch{continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var B0=ro,Gq=B0.assert,JI=B0.parseBytes,bf=B0.cachedProperty;function Cr(e,t){this.eddsa=e,this._secret=JI(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=JI(t.pub)}Cr.fromPublic=function(t,r){return r instanceof Cr?r:new Cr(t,{pub:r})};Cr.fromSecret=function(t,r){return r instanceof Cr?r:new Cr(t,{secret:r})};Cr.prototype.secret=function(){return this._secret};bf(Cr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});bf(Cr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});bf(Cr,"privBytes",function(){var t=this.eddsa,r=this.hash(),n=t.encodingLength-1,o=r.slice(0,t.encodingLength);return o[0]&=248,o[n]&=127,o[n]|=64,o});bf(Cr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});bf(Cr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});bf(Cr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Cr.prototype.sign=function(t){return Gq(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Cr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};Cr.prototype.getSecret=function(t){return Gq(this._secret,"KeyPair is public only"),B0.encode(this.secret(),t)};Cr.prototype.getPublic=function(t){return B0.encode(this.pubBytes(),t)};var XOe=Cr,ZOe=Fa,Ub=ro,JOe=Ub.assert,zb=Ub.cachedProperty,QOe=Ub.parseBytes;function fc(e,t){this.eddsa=e,typeof t!="object"&&(t=QOe(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),JOe(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof ZOe&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}zb(fc,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});zb(fc,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});zb(fc,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});zb(fc,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});fc.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};fc.prototype.toHex=function(){return Ub.encode(this.toBytes(),"hex").toUpperCase()};var eke=fc,tke=Fb,rke=Nb,zu=ro,nke=zu.assert,Kq=zu.parseBytes,Yq=XOe,QI=eke;function Rn(e){if(nke(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Rn))return new Rn(e);e=rke[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=tke.sha512}var oke=Rn;Rn.prototype.sign=function(t,r){t=Kq(t);var n=this.keyFromSecret(r),o=this.hashInt(n.messagePrefix(),t),i=this.g.mul(o),a=this.encodePoint(i),s=this.hashInt(a,n.pubBytes(),t).mul(n.priv()),l=o.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:a})};Rn.prototype.verify=function(t,r,n){t=Kq(t),r=this.makeSignature(r);var o=this.keyFromPublic(n),i=this.hashInt(r.Rencoded(),o.pubBytes(),t),a=this.g.mul(r.S()),s=r.R().add(o.pub().mul(i));return s.eq(a)};Rn.prototype.hashInt=function(){for(var t=this.hash(),r=0;r0?v:b},i.min=function(v,b){return v.cmp(b)<0?v:b},i.prototype._init=function(v,b,B){if(typeof v=="number")return this._initNumber(v,b,B);if(typeof v=="object")return this._initArray(v,b,B);b==="hex"&&(b=16),n(b===(b|0)&&b>=2&&b<=36),v=v.toString().replace(/\s+/g,"");var T=0;v[0]==="-"&&(T++,this.negative=1),T=0;T-=3)H=v[T]|v[T-1]<<8|v[T-2]<<16,this.words[j]|=H<>>26-P&67108863,P+=24,P>=26&&(P-=26,j++);else if(B==="le")for(T=0,j=0;T>>26-P&67108863,P+=24,P>=26&&(P-=26,j++);return this._strip()};function s(C,v){var b=C.charCodeAt(v);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;n(!1,"Invalid character in "+C)}function l(C,v,b){var B=s(C,b);return b-1>=v&&(B|=s(C,b-1)<<4),B}i.prototype._parseHex=function(v,b,B){this.length=Math.ceil((v.length-b)/6),this.words=new Array(this.length);for(var T=0;T=b;T-=2)P=l(v,b,T)<=18?(j-=18,H+=1,this.words[H]|=P>>>26):j+=8;else{var F=v.length-b;for(T=F%2===0?b+1:b;T=18?(j-=18,H+=1,this.words[H]|=P>>>26):j+=8}this._strip()};function c(C,v,b,B){for(var T=0,j=0,H=Math.min(C.length,b),P=v;P=49?j=F-49+10:F>=17?j=F-17+10:j=F,n(F>=0&&j1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch{i.prototype.inspect=f}else i.prototype.inspect=f;function f(){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"],p=[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],h=[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];i.prototype.toString=function(v,b){v=v||10,b=b|0||1;var B;if(v===16||v==="hex"){B="";for(var T=0,j=0,H=0;H>>24-T&16777215,T+=2,T>=26&&(T-=26,H--),j!==0||H!==this.length-1?B=d[6-F.length]+F+B:B=F+B}for(j!==0&&(B=j.toString(16)+B);B.length%b!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}if(v===(v|0)&&v>=2&&v<=36){var $=p[v],q=h[v];B="";var J=this.clone();for(J.negative=0;!J.isZero();){var te=J.modrn(q).toString(v);J=J.idivn(q),J.isZero()?B=te+B:B=d[$-te.length]+te+B}for(this.isZero()&&(B="0"+B);B.length%b!==0;)B="0"+B;return this.negative!==0&&(B="-"+B),B}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=this.words[1]*67108864:this.length===3&&this.words[2]===1?v+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(v,b){return this.toArrayLike(a,v,b)}),i.prototype.toArray=function(v,b){return this.toArrayLike(Array,v,b)};var m=function(v,b){return v.allocUnsafe?v.allocUnsafe(b):new v(b)};i.prototype.toArrayLike=function(v,b,B){this._strip();var T=this.byteLength(),j=B||Math.max(1,T);n(T<=j,"byte array longer than desired length"),n(j>0,"Requested array length <= 0");var H=m(v,j),P=b==="le"?"LE":"BE";return this["_toArrayLike"+P](H,T),H},i.prototype._toArrayLikeLE=function(v,b){for(var B=0,T=0,j=0,H=0;j>8&255),B>16&255),H===6?(B>24&255),T=0,H=0):(T=P>>>24,H+=2)}if(B=0&&(v[B--]=P>>8&255),B>=0&&(v[B--]=P>>16&255),H===6?(B>=0&&(v[B--]=P>>24&255),T=0,H=0):(T=P>>>24,H+=2)}if(B>=0)for(v[B--]=T;B>=0;)v[B--]=0},Math.clz32?i.prototype._countBits=function(v){return 32-Math.clz32(v)}:i.prototype._countBits=function(v){var b=v,B=0;return b>=4096&&(B+=13,b>>>=13),b>=64&&(B+=7,b>>>=7),b>=8&&(B+=4,b>>>=4),b>=2&&(B+=2,b>>>=2),B+b},i.prototype._zeroBits=function(v){if(v===0)return 26;var b=v,B=0;return b&8191||(B+=13,b>>>=13),b&127||(B+=7,b>>>=7),b&15||(B+=4,b>>>=4),b&3||(B+=2,b>>>=2),b&1||B++,B},i.prototype.bitLength=function(){var v=this.words[this.length-1],b=this._countBits(v);return(this.length-1)*26+b};function _(C){for(var v=new Array(C.bitLength()),b=0;b>>T&1}return v}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,b=0;bv.length?this.clone().ior(v):v.clone().ior(this)},i.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},i.prototype.iuand=function(v){var b;this.length>v.length?b=v:b=this;for(var B=0;Bv.length?this.clone().iand(v):v.clone().iand(this)},i.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},i.prototype.iuxor=function(v){var b,B;this.length>v.length?(b=this,B=v):(b=v,B=this);for(var T=0;Tv.length?this.clone().ixor(v):v.clone().ixor(this)},i.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},i.prototype.inotn=function(v){n(typeof v=="number"&&v>=0);var b=Math.ceil(v/26)|0,B=v%26;this._expand(b),B>0&&b--;for(var T=0;T0&&(this.words[T]=~this.words[T]&67108863>>26-B),this._strip()},i.prototype.notn=function(v){return this.clone().inotn(v)},i.prototype.setn=function(v,b){n(typeof v=="number"&&v>=0);var B=v/26|0,T=v%26;return this._expand(B+1),b?this.words[B]=this.words[B]|1<v.length?(B=this,T=v):(B=v,T=this);for(var j=0,H=0;H>>26;for(;j!==0&&H>>26;if(this.length=B.length,j!==0)this.words[this.length]=j,this.length++;else if(B!==this)for(;Hv.length?this.clone().iadd(v):v.clone().iadd(this)},i.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var b=this.iadd(v);return v.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var B=this.cmp(v);if(B===0)return this.negative=0,this.length=1,this.words[0]=0,this;var T,j;B>0?(T=this,j=v):(T=v,j=this);for(var H=0,P=0;P>26,this.words[P]=b&67108863;for(;H!==0&&P>26,this.words[P]=b&67108863;if(H===0&&P>>26,J=F&67108863,te=Math.min($,v.length-1),ae=Math.max(0,$-C.length+1);ae<=te;ae++){var ce=$-ae|0;T=C.words[ce]|0,j=v.words[ae]|0,H=T*j+J,q+=H/67108864|0,J=H&67108863}b.words[$]=J|0,F=q|0}return F!==0?b.words[$]=F|0:b.length--,b._strip()}var g=function(v,b,B){var T=v.words,j=b.words,H=B.words,P=0,F,$,q,J=T[0]|0,te=J&8191,ae=J>>>13,ce=T[1]|0,ie=ce&8191,ue=ce>>>13,O=T[2]|0,K=O&8191,ee=O>>>13,se=T[3]|0,pe=se&8191,ge=se>>>13,X=T[4]|0,M=X&8191,z=X>>>13,Z=T[5]|0,Q=Z&8191,de=Z>>>13,we=T[6]|0,Se=we&8191,Ee=we>>>13,ke=T[7]|0,Te=ke&8191,W=ke>>>13,x=T[8]|0,I=x&8191,Y=x>>>13,re=T[9]|0,fe=re&8191,le=re>>>13,xe=j[0]|0,_e=xe&8191,Ae=xe>>>13,$e=j[1]|0,Ne=$e&8191,We=$e>>>13,gt=j[2]|0,ft=gt&8191,Ye=gt>>>13,Qe=j[3]|0,rt=Qe&8191,ve=Qe>>>13,oe=j[4]|0,he=oe&8191,be=oe>>>13,Ce=j[5]|0,Oe=Ce&8191,Ie=Ce>>>13,De=j[6]|0,je=De&8191,Me=De>>>13,He=j[7]|0,qe=He&8191,Ue=He>>>13,at=j[8]|0,Be=at&8191,Ke=at>>>13,mt=j[9]|0,ct=mt&8191,Pt=mt>>>13;B.negative=v.negative^b.negative,B.length=19,F=Math.imul(te,_e),$=Math.imul(te,Ae),$=$+Math.imul(ae,_e)|0,q=Math.imul(ae,Ae);var En=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(En>>>26)|0,En&=67108863,F=Math.imul(ie,_e),$=Math.imul(ie,Ae),$=$+Math.imul(ue,_e)|0,q=Math.imul(ue,Ae),F=F+Math.imul(te,Ne)|0,$=$+Math.imul(te,We)|0,$=$+Math.imul(ae,Ne)|0,q=q+Math.imul(ae,We)|0;var Fn=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,F=Math.imul(K,_e),$=Math.imul(K,Ae),$=$+Math.imul(ee,_e)|0,q=Math.imul(ee,Ae),F=F+Math.imul(ie,Ne)|0,$=$+Math.imul(ie,We)|0,$=$+Math.imul(ue,Ne)|0,q=q+Math.imul(ue,We)|0,F=F+Math.imul(te,ft)|0,$=$+Math.imul(te,Ye)|0,$=$+Math.imul(ae,ft)|0,q=q+Math.imul(ae,Ye)|0;var cn=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(cn>>>26)|0,cn&=67108863,F=Math.imul(pe,_e),$=Math.imul(pe,Ae),$=$+Math.imul(ge,_e)|0,q=Math.imul(ge,Ae),F=F+Math.imul(K,Ne)|0,$=$+Math.imul(K,We)|0,$=$+Math.imul(ee,Ne)|0,q=q+Math.imul(ee,We)|0,F=F+Math.imul(ie,ft)|0,$=$+Math.imul(ie,Ye)|0,$=$+Math.imul(ue,ft)|0,q=q+Math.imul(ue,Ye)|0,F=F+Math.imul(te,rt)|0,$=$+Math.imul(te,ve)|0,$=$+Math.imul(ae,rt)|0,q=q+Math.imul(ae,ve)|0;var ii=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(ii>>>26)|0,ii&=67108863,F=Math.imul(M,_e),$=Math.imul(M,Ae),$=$+Math.imul(z,_e)|0,q=Math.imul(z,Ae),F=F+Math.imul(pe,Ne)|0,$=$+Math.imul(pe,We)|0,$=$+Math.imul(ge,Ne)|0,q=q+Math.imul(ge,We)|0,F=F+Math.imul(K,ft)|0,$=$+Math.imul(K,Ye)|0,$=$+Math.imul(ee,ft)|0,q=q+Math.imul(ee,Ye)|0,F=F+Math.imul(ie,rt)|0,$=$+Math.imul(ie,ve)|0,$=$+Math.imul(ue,rt)|0,q=q+Math.imul(ue,ve)|0,F=F+Math.imul(te,he)|0,$=$+Math.imul(te,be)|0,$=$+Math.imul(ae,he)|0,q=q+Math.imul(ae,be)|0;var un=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(un>>>26)|0,un&=67108863,F=Math.imul(Q,_e),$=Math.imul(Q,Ae),$=$+Math.imul(de,_e)|0,q=Math.imul(de,Ae),F=F+Math.imul(M,Ne)|0,$=$+Math.imul(M,We)|0,$=$+Math.imul(z,Ne)|0,q=q+Math.imul(z,We)|0,F=F+Math.imul(pe,ft)|0,$=$+Math.imul(pe,Ye)|0,$=$+Math.imul(ge,ft)|0,q=q+Math.imul(ge,Ye)|0,F=F+Math.imul(K,rt)|0,$=$+Math.imul(K,ve)|0,$=$+Math.imul(ee,rt)|0,q=q+Math.imul(ee,ve)|0,F=F+Math.imul(ie,he)|0,$=$+Math.imul(ie,be)|0,$=$+Math.imul(ue,he)|0,q=q+Math.imul(ue,be)|0,F=F+Math.imul(te,Oe)|0,$=$+Math.imul(te,Ie)|0,$=$+Math.imul(ae,Oe)|0,q=q+Math.imul(ae,Ie)|0;var zi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(zi>>>26)|0,zi&=67108863,F=Math.imul(Se,_e),$=Math.imul(Se,Ae),$=$+Math.imul(Ee,_e)|0,q=Math.imul(Ee,Ae),F=F+Math.imul(Q,Ne)|0,$=$+Math.imul(Q,We)|0,$=$+Math.imul(de,Ne)|0,q=q+Math.imul(de,We)|0,F=F+Math.imul(M,ft)|0,$=$+Math.imul(M,Ye)|0,$=$+Math.imul(z,ft)|0,q=q+Math.imul(z,Ye)|0,F=F+Math.imul(pe,rt)|0,$=$+Math.imul(pe,ve)|0,$=$+Math.imul(ge,rt)|0,q=q+Math.imul(ge,ve)|0,F=F+Math.imul(K,he)|0,$=$+Math.imul(K,be)|0,$=$+Math.imul(ee,he)|0,q=q+Math.imul(ee,be)|0,F=F+Math.imul(ie,Oe)|0,$=$+Math.imul(ie,Ie)|0,$=$+Math.imul(ue,Oe)|0,q=q+Math.imul(ue,Ie)|0,F=F+Math.imul(te,je)|0,$=$+Math.imul(te,Me)|0,$=$+Math.imul(ae,je)|0,q=q+Math.imul(ae,Me)|0;var Hi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,F=Math.imul(Te,_e),$=Math.imul(Te,Ae),$=$+Math.imul(W,_e)|0,q=Math.imul(W,Ae),F=F+Math.imul(Se,Ne)|0,$=$+Math.imul(Se,We)|0,$=$+Math.imul(Ee,Ne)|0,q=q+Math.imul(Ee,We)|0,F=F+Math.imul(Q,ft)|0,$=$+Math.imul(Q,Ye)|0,$=$+Math.imul(de,ft)|0,q=q+Math.imul(de,Ye)|0,F=F+Math.imul(M,rt)|0,$=$+Math.imul(M,ve)|0,$=$+Math.imul(z,rt)|0,q=q+Math.imul(z,ve)|0,F=F+Math.imul(pe,he)|0,$=$+Math.imul(pe,be)|0,$=$+Math.imul(ge,he)|0,q=q+Math.imul(ge,be)|0,F=F+Math.imul(K,Oe)|0,$=$+Math.imul(K,Ie)|0,$=$+Math.imul(ee,Oe)|0,q=q+Math.imul(ee,Ie)|0,F=F+Math.imul(ie,je)|0,$=$+Math.imul(ie,Me)|0,$=$+Math.imul(ue,je)|0,q=q+Math.imul(ue,Me)|0,F=F+Math.imul(te,qe)|0,$=$+Math.imul(te,Ue)|0,$=$+Math.imul(ae,qe)|0,q=q+Math.imul(ae,Ue)|0;var Vi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,F=Math.imul(I,_e),$=Math.imul(I,Ae),$=$+Math.imul(Y,_e)|0,q=Math.imul(Y,Ae),F=F+Math.imul(Te,Ne)|0,$=$+Math.imul(Te,We)|0,$=$+Math.imul(W,Ne)|0,q=q+Math.imul(W,We)|0,F=F+Math.imul(Se,ft)|0,$=$+Math.imul(Se,Ye)|0,$=$+Math.imul(Ee,ft)|0,q=q+Math.imul(Ee,Ye)|0,F=F+Math.imul(Q,rt)|0,$=$+Math.imul(Q,ve)|0,$=$+Math.imul(de,rt)|0,q=q+Math.imul(de,ve)|0,F=F+Math.imul(M,he)|0,$=$+Math.imul(M,be)|0,$=$+Math.imul(z,he)|0,q=q+Math.imul(z,be)|0,F=F+Math.imul(pe,Oe)|0,$=$+Math.imul(pe,Ie)|0,$=$+Math.imul(ge,Oe)|0,q=q+Math.imul(ge,Ie)|0,F=F+Math.imul(K,je)|0,$=$+Math.imul(K,Me)|0,$=$+Math.imul(ee,je)|0,q=q+Math.imul(ee,Me)|0,F=F+Math.imul(ie,qe)|0,$=$+Math.imul(ie,Ue)|0,$=$+Math.imul(ue,qe)|0,q=q+Math.imul(ue,Ue)|0,F=F+Math.imul(te,Be)|0,$=$+Math.imul(te,Ke)|0,$=$+Math.imul(ae,Be)|0,q=q+Math.imul(ae,Ke)|0;var Wi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Wi>>>26)|0,Wi&=67108863,F=Math.imul(fe,_e),$=Math.imul(fe,Ae),$=$+Math.imul(le,_e)|0,q=Math.imul(le,Ae),F=F+Math.imul(I,Ne)|0,$=$+Math.imul(I,We)|0,$=$+Math.imul(Y,Ne)|0,q=q+Math.imul(Y,We)|0,F=F+Math.imul(Te,ft)|0,$=$+Math.imul(Te,Ye)|0,$=$+Math.imul(W,ft)|0,q=q+Math.imul(W,Ye)|0,F=F+Math.imul(Se,rt)|0,$=$+Math.imul(Se,ve)|0,$=$+Math.imul(Ee,rt)|0,q=q+Math.imul(Ee,ve)|0,F=F+Math.imul(Q,he)|0,$=$+Math.imul(Q,be)|0,$=$+Math.imul(de,he)|0,q=q+Math.imul(de,be)|0,F=F+Math.imul(M,Oe)|0,$=$+Math.imul(M,Ie)|0,$=$+Math.imul(z,Oe)|0,q=q+Math.imul(z,Ie)|0,F=F+Math.imul(pe,je)|0,$=$+Math.imul(pe,Me)|0,$=$+Math.imul(ge,je)|0,q=q+Math.imul(ge,Me)|0,F=F+Math.imul(K,qe)|0,$=$+Math.imul(K,Ue)|0,$=$+Math.imul(ee,qe)|0,q=q+Math.imul(ee,Ue)|0,F=F+Math.imul(ie,Be)|0,$=$+Math.imul(ie,Ke)|0,$=$+Math.imul(ue,Be)|0,q=q+Math.imul(ue,Ke)|0,F=F+Math.imul(te,ct)|0,$=$+Math.imul(te,Pt)|0,$=$+Math.imul(ae,ct)|0,q=q+Math.imul(ae,Pt)|0;var qi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(qi>>>26)|0,qi&=67108863,F=Math.imul(fe,Ne),$=Math.imul(fe,We),$=$+Math.imul(le,Ne)|0,q=Math.imul(le,We),F=F+Math.imul(I,ft)|0,$=$+Math.imul(I,Ye)|0,$=$+Math.imul(Y,ft)|0,q=q+Math.imul(Y,Ye)|0,F=F+Math.imul(Te,rt)|0,$=$+Math.imul(Te,ve)|0,$=$+Math.imul(W,rt)|0,q=q+Math.imul(W,ve)|0,F=F+Math.imul(Se,he)|0,$=$+Math.imul(Se,be)|0,$=$+Math.imul(Ee,he)|0,q=q+Math.imul(Ee,be)|0,F=F+Math.imul(Q,Oe)|0,$=$+Math.imul(Q,Ie)|0,$=$+Math.imul(de,Oe)|0,q=q+Math.imul(de,Ie)|0,F=F+Math.imul(M,je)|0,$=$+Math.imul(M,Me)|0,$=$+Math.imul(z,je)|0,q=q+Math.imul(z,Me)|0,F=F+Math.imul(pe,qe)|0,$=$+Math.imul(pe,Ue)|0,$=$+Math.imul(ge,qe)|0,q=q+Math.imul(ge,Ue)|0,F=F+Math.imul(K,Be)|0,$=$+Math.imul(K,Ke)|0,$=$+Math.imul(ee,Be)|0,q=q+Math.imul(ee,Ke)|0,F=F+Math.imul(ie,ct)|0,$=$+Math.imul(ie,Pt)|0,$=$+Math.imul(ue,ct)|0,q=q+Math.imul(ue,Pt)|0;var oo=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(oo>>>26)|0,oo&=67108863,F=Math.imul(fe,ft),$=Math.imul(fe,Ye),$=$+Math.imul(le,ft)|0,q=Math.imul(le,Ye),F=F+Math.imul(I,rt)|0,$=$+Math.imul(I,ve)|0,$=$+Math.imul(Y,rt)|0,q=q+Math.imul(Y,ve)|0,F=F+Math.imul(Te,he)|0,$=$+Math.imul(Te,be)|0,$=$+Math.imul(W,he)|0,q=q+Math.imul(W,be)|0,F=F+Math.imul(Se,Oe)|0,$=$+Math.imul(Se,Ie)|0,$=$+Math.imul(Ee,Oe)|0,q=q+Math.imul(Ee,Ie)|0,F=F+Math.imul(Q,je)|0,$=$+Math.imul(Q,Me)|0,$=$+Math.imul(de,je)|0,q=q+Math.imul(de,Me)|0,F=F+Math.imul(M,qe)|0,$=$+Math.imul(M,Ue)|0,$=$+Math.imul(z,qe)|0,q=q+Math.imul(z,Ue)|0,F=F+Math.imul(pe,Be)|0,$=$+Math.imul(pe,Ke)|0,$=$+Math.imul(ge,Be)|0,q=q+Math.imul(ge,Ke)|0,F=F+Math.imul(K,ct)|0,$=$+Math.imul(K,Pt)|0,$=$+Math.imul(ee,ct)|0,q=q+Math.imul(ee,Pt)|0;var Gi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,F=Math.imul(fe,rt),$=Math.imul(fe,ve),$=$+Math.imul(le,rt)|0,q=Math.imul(le,ve),F=F+Math.imul(I,he)|0,$=$+Math.imul(I,be)|0,$=$+Math.imul(Y,he)|0,q=q+Math.imul(Y,be)|0,F=F+Math.imul(Te,Oe)|0,$=$+Math.imul(Te,Ie)|0,$=$+Math.imul(W,Oe)|0,q=q+Math.imul(W,Ie)|0,F=F+Math.imul(Se,je)|0,$=$+Math.imul(Se,Me)|0,$=$+Math.imul(Ee,je)|0,q=q+Math.imul(Ee,Me)|0,F=F+Math.imul(Q,qe)|0,$=$+Math.imul(Q,Ue)|0,$=$+Math.imul(de,qe)|0,q=q+Math.imul(de,Ue)|0,F=F+Math.imul(M,Be)|0,$=$+Math.imul(M,Ke)|0,$=$+Math.imul(z,Be)|0,q=q+Math.imul(z,Ke)|0,F=F+Math.imul(pe,ct)|0,$=$+Math.imul(pe,Pt)|0,$=$+Math.imul(ge,ct)|0,q=q+Math.imul(ge,Pt)|0;var Ki=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Ki>>>26)|0,Ki&=67108863,F=Math.imul(fe,he),$=Math.imul(fe,be),$=$+Math.imul(le,he)|0,q=Math.imul(le,be),F=F+Math.imul(I,Oe)|0,$=$+Math.imul(I,Ie)|0,$=$+Math.imul(Y,Oe)|0,q=q+Math.imul(Y,Ie)|0,F=F+Math.imul(Te,je)|0,$=$+Math.imul(Te,Me)|0,$=$+Math.imul(W,je)|0,q=q+Math.imul(W,Me)|0,F=F+Math.imul(Se,qe)|0,$=$+Math.imul(Se,Ue)|0,$=$+Math.imul(Ee,qe)|0,q=q+Math.imul(Ee,Ue)|0,F=F+Math.imul(Q,Be)|0,$=$+Math.imul(Q,Ke)|0,$=$+Math.imul(de,Be)|0,q=q+Math.imul(de,Ke)|0,F=F+Math.imul(M,ct)|0,$=$+Math.imul(M,Pt)|0,$=$+Math.imul(z,ct)|0,q=q+Math.imul(z,Pt)|0;var qr=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(qr>>>26)|0,qr&=67108863,F=Math.imul(fe,Oe),$=Math.imul(fe,Ie),$=$+Math.imul(le,Oe)|0,q=Math.imul(le,Ie),F=F+Math.imul(I,je)|0,$=$+Math.imul(I,Me)|0,$=$+Math.imul(Y,je)|0,q=q+Math.imul(Y,Me)|0,F=F+Math.imul(Te,qe)|0,$=$+Math.imul(Te,Ue)|0,$=$+Math.imul(W,qe)|0,q=q+Math.imul(W,Ue)|0,F=F+Math.imul(Se,Be)|0,$=$+Math.imul(Se,Ke)|0,$=$+Math.imul(Ee,Be)|0,q=q+Math.imul(Ee,Ke)|0,F=F+Math.imul(Q,ct)|0,$=$+Math.imul(Q,Pt)|0,$=$+Math.imul(de,ct)|0,q=q+Math.imul(de,Pt)|0;var Yi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,F=Math.imul(fe,je),$=Math.imul(fe,Me),$=$+Math.imul(le,je)|0,q=Math.imul(le,Me),F=F+Math.imul(I,qe)|0,$=$+Math.imul(I,Ue)|0,$=$+Math.imul(Y,qe)|0,q=q+Math.imul(Y,Ue)|0,F=F+Math.imul(Te,Be)|0,$=$+Math.imul(Te,Ke)|0,$=$+Math.imul(W,Be)|0,q=q+Math.imul(W,Ke)|0,F=F+Math.imul(Se,ct)|0,$=$+Math.imul(Se,Pt)|0,$=$+Math.imul(Ee,ct)|0,q=q+Math.imul(Ee,Pt)|0;var Xi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,F=Math.imul(fe,qe),$=Math.imul(fe,Ue),$=$+Math.imul(le,qe)|0,q=Math.imul(le,Ue),F=F+Math.imul(I,Be)|0,$=$+Math.imul(I,Ke)|0,$=$+Math.imul(Y,Be)|0,q=q+Math.imul(Y,Ke)|0,F=F+Math.imul(Te,ct)|0,$=$+Math.imul(Te,Pt)|0,$=$+Math.imul(W,ct)|0,q=q+Math.imul(W,Pt)|0;var Zi=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,F=Math.imul(fe,Be),$=Math.imul(fe,Ke),$=$+Math.imul(le,Be)|0,q=Math.imul(le,Ke),F=F+Math.imul(I,ct)|0,$=$+Math.imul(I,Pt)|0,$=$+Math.imul(Y,ct)|0,q=q+Math.imul(Y,Pt)|0;var kf=(P+F|0)+(($&8191)<<13)|0;P=(q+($>>>13)|0)+(kf>>>26)|0,kf&=67108863,F=Math.imul(fe,ct),$=Math.imul(fe,Pt),$=$+Math.imul(le,ct)|0,q=Math.imul(le,Pt);var Af=(P+F|0)+(($&8191)<<13)|0;return P=(q+($>>>13)|0)+(Af>>>26)|0,Af&=67108863,H[0]=En,H[1]=Fn,H[2]=cn,H[3]=ii,H[4]=un,H[5]=zi,H[6]=Hi,H[7]=Vi,H[8]=Wi,H[9]=qi,H[10]=oo,H[11]=Gi,H[12]=Ki,H[13]=qr,H[14]=Yi,H[15]=Xi,H[16]=Zi,H[17]=kf,H[18]=Af,P!==0&&(H[19]=P,B.length++),B};Math.imul||(g=w);function E(C,v,b){b.negative=v.negative^C.negative,b.length=C.length+v.length;for(var B=0,T=0,j=0;j>>26)|0,T+=H>>>26,H&=67108863}b.words[j]=P,B=H,H=T}return B!==0?b.words[j]=B:b.length--,b._strip()}function A(C,v,b){return E(C,v,b)}i.prototype.mulTo=function(v,b){var B,T=this.length+v.length;return this.length===10&&v.length===10?B=g(this,v,b):T<63?B=w(this,v,b):T<1024?B=E(this,v,b):B=A(this,v,b),B},i.prototype.mul=function(v){var b=new i(null);return b.words=new Array(this.length+v.length),this.mulTo(v,b)},i.prototype.mulf=function(v){var b=new i(null);return b.words=new Array(this.length+v.length),A(this,v,b)},i.prototype.imul=function(v){return this.clone().mulTo(v,this)},i.prototype.imuln=function(v){var b=v<0;b&&(v=-v),n(typeof v=="number"),n(v<67108864);for(var B=0,T=0;T>=26,B+=j/67108864|0,B+=H>>>26,this.words[T]=H&67108863}return B!==0&&(this.words[T]=B,this.length++),b?this.ineg():this},i.prototype.muln=function(v){return this.clone().imuln(v)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(v){var b=_(v);if(b.length===0)return new i(1);for(var B=this,T=0;T=0);var b=v%26,B=(v-b)/26,T=67108863>>>26-b<<26-b,j;if(b!==0){var H=0;for(j=0;j>>26-b}H&&(this.words[j]=H,this.length++)}if(B!==0){for(j=this.length-1;j>=0;j--)this.words[j+B]=this.words[j];for(j=0;j=0);var T;b?T=(b-b%26)/26:T=0;var j=v%26,H=Math.min((v-j)/26,this.length),P=67108863^67108863>>>j<H)for(this.length-=H,$=0;$=0&&(q!==0||$>=T);$--){var J=this.words[$]|0;this.words[$]=q<<26-j|J>>>j,q=J&P}return F&&q!==0&&(F.words[F.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(v,b,B){return n(this.negative===0),this.iushrn(v,b,B)},i.prototype.shln=function(v){return this.clone().ishln(v)},i.prototype.ushln=function(v){return this.clone().iushln(v)},i.prototype.shrn=function(v){return this.clone().ishrn(v)},i.prototype.ushrn=function(v){return this.clone().iushrn(v)},i.prototype.testn=function(v){n(typeof v=="number"&&v>=0);var b=v%26,B=(v-b)/26,T=1<=0);var b=v%26,B=(v-b)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=B)return this;if(b!==0&&B++,this.length=Math.min(B,this.length),b!==0){var T=67108863^67108863>>>b<=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},i.prototype.isubn=function(v){if(n(typeof v=="number"),n(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b>26)-(F/67108864|0),this.words[j+B]=H&67108863}for(;j>26,this.words[j+B]=H&67108863;if(P===0)return this._strip();for(n(P===-1),P=0,j=0;j>26,this.words[j]=H&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(v,b){var B=this.length-v.length,T=this.clone(),j=v,H=j.words[j.length-1]|0,P=this._countBits(H);B=26-P,B!==0&&(j=j.ushln(B),T.iushln(B),H=j.words[j.length-1]|0);var F=T.length-j.length,$;if(b!=="mod"){$=new i(null),$.length=F+1,$.words=new Array($.length);for(var q=0;q<$.length;q++)$.words[q]=0}var J=T.clone()._ishlnsubmul(j,1,F);J.negative===0&&(T=J,$&&($.words[F]=1));for(var te=F-1;te>=0;te--){var ae=(T.words[j.length+te]|0)*67108864+(T.words[j.length+te-1]|0);for(ae=Math.min(ae/H|0,67108863),T._ishlnsubmul(j,ae,te);T.negative!==0;)ae--,T.negative=0,T._ishlnsubmul(j,1,te),T.isZero()||(T.negative^=1);$&&($.words[te]=ae)}return $&&$._strip(),T._strip(),b!=="div"&&B!==0&&T.iushrn(B),{div:$||null,mod:T}},i.prototype.divmod=function(v,b,B){if(n(!v.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var T,j,H;return this.negative!==0&&v.negative===0?(H=this.neg().divmod(v,b),b!=="mod"&&(T=H.div.neg()),b!=="div"&&(j=H.mod.neg(),B&&j.negative!==0&&j.iadd(v)),{div:T,mod:j}):this.negative===0&&v.negative!==0?(H=this.divmod(v.neg(),b),b!=="mod"&&(T=H.div.neg()),{div:T,mod:H.mod}):this.negative&v.negative?(H=this.neg().divmod(v.neg(),b),b!=="div"&&(j=H.mod.neg(),B&&j.negative!==0&&j.isub(v)),{div:H.div,mod:j}):v.length>this.length||this.cmp(v)<0?{div:new i(0),mod:this}:v.length===1?b==="div"?{div:this.divn(v.words[0]),mod:null}:b==="mod"?{div:null,mod:new i(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new i(this.modrn(v.words[0]))}:this._wordDiv(v,b)},i.prototype.div=function(v){return this.divmod(v,"div",!1).div},i.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},i.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},i.prototype.divRound=function(v){var b=this.divmod(v);if(b.mod.isZero())return b.div;var B=b.div.negative!==0?b.mod.isub(v):b.mod,T=v.ushrn(1),j=v.andln(1),H=B.cmp(T);return H<0||j===1&&H===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},i.prototype.modrn=function(v){var b=v<0;b&&(v=-v),n(v<=67108863);for(var B=(1<<26)%v,T=0,j=this.length-1;j>=0;j--)T=(B*T+(this.words[j]|0))%v;return b?-T:T},i.prototype.modn=function(v){return this.modrn(v)},i.prototype.idivn=function(v){var b=v<0;b&&(v=-v),n(v<=67108863);for(var B=0,T=this.length-1;T>=0;T--){var j=(this.words[T]|0)+B*67108864;this.words[T]=j/v|0,B=j%v}return this._strip(),b?this.ineg():this},i.prototype.divn=function(v){return this.clone().idivn(v)},i.prototype.egcd=function(v){n(v.negative===0),n(!v.isZero());var b=this,B=v.clone();b.negative!==0?b=b.umod(v):b=b.clone();for(var T=new i(1),j=new i(0),H=new i(0),P=new i(1),F=0;b.isEven()&&B.isEven();)b.iushrn(1),B.iushrn(1),++F;for(var $=B.clone(),q=b.clone();!b.isZero();){for(var J=0,te=1;!(b.words[0]&te)&&J<26;++J,te<<=1);if(J>0)for(b.iushrn(J);J-- >0;)(T.isOdd()||j.isOdd())&&(T.iadd($),j.isub(q)),T.iushrn(1),j.iushrn(1);for(var ae=0,ce=1;!(B.words[0]&ce)&&ae<26;++ae,ce<<=1);if(ae>0)for(B.iushrn(ae);ae-- >0;)(H.isOdd()||P.isOdd())&&(H.iadd($),P.isub(q)),H.iushrn(1),P.iushrn(1);b.cmp(B)>=0?(b.isub(B),T.isub(H),j.isub(P)):(B.isub(b),H.isub(T),P.isub(j))}return{a:H,b:P,gcd:B.iushln(F)}},i.prototype._invmp=function(v){n(v.negative===0),n(!v.isZero());var b=this,B=v.clone();b.negative!==0?b=b.umod(v):b=b.clone();for(var T=new i(1),j=new i(0),H=B.clone();b.cmpn(1)>0&&B.cmpn(1)>0;){for(var P=0,F=1;!(b.words[0]&F)&&P<26;++P,F<<=1);if(P>0)for(b.iushrn(P);P-- >0;)T.isOdd()&&T.iadd(H),T.iushrn(1);for(var $=0,q=1;!(B.words[0]&q)&&$<26;++$,q<<=1);if($>0)for(B.iushrn($);$-- >0;)j.isOdd()&&j.iadd(H),j.iushrn(1);b.cmp(B)>=0?(b.isub(B),T.isub(j)):(B.isub(b),j.isub(T))}var J;return b.cmpn(1)===0?J=T:J=j,J.cmpn(0)<0&&J.iadd(v),J},i.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var b=this.clone(),B=v.clone();b.negative=0,B.negative=0;for(var T=0;b.isEven()&&B.isEven();T++)b.iushrn(1),B.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;B.isEven();)B.iushrn(1);var j=b.cmp(B);if(j<0){var H=b;b=B,B=H}else if(j===0||B.cmpn(1)===0)break;b.isub(B)}while(!0);return B.iushln(T)},i.prototype.invm=function(v){return this.egcd(v).a.umod(v)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(v){return this.words[0]&v},i.prototype.bincn=function(v){n(typeof v=="number");var b=v%26,B=(v-b)/26,T=1<>>26,P&=67108863,this.words[H]=P}return j!==0&&(this.words[H]=j,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(v){var b=v<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var B;if(this.length>1)B=1;else{b&&(v=-v),n(v<=67108863,"Number is too big");var T=this.words[0]|0;B=T===v?0:Tv.length)return 1;if(this.length=0;B--){var T=this.words[B]|0,j=v.words[B]|0;if(T!==j){Tj&&(b=1);break}}return b},i.prototype.gtn=function(v){return this.cmpn(v)===1},i.prototype.gt=function(v){return this.cmp(v)===1},i.prototype.gten=function(v){return this.cmpn(v)>=0},i.prototype.gte=function(v){return this.cmp(v)>=0},i.prototype.ltn=function(v){return this.cmpn(v)===-1},i.prototype.lt=function(v){return this.cmp(v)===-1},i.prototype.lten=function(v){return this.cmpn(v)<=0},i.prototype.lte=function(v){return this.cmp(v)<=0},i.prototype.eqn=function(v){return this.cmpn(v)===0},i.prototype.eq=function(v){return this.cmp(v)===0},i.red=function(v){return new V(v)},i.prototype.toRed=function(v){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(v){return this.red=v,this},i.prototype.forceRed=function(v){return n(!this.red,"Already a number in reduction context"),this._forceRed(v)},i.prototype.redAdd=function(v){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},i.prototype.redIAdd=function(v){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},i.prototype.redSub=function(v){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},i.prototype.redISub=function(v){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},i.prototype.redShl=function(v){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},i.prototype.redMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},i.prototype.redIMul=function(v){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(v){return n(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var N={k256:null,p224:null,p192:null,p25519:null};function D(C,v){this.name=C,this.p=new i(v,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var v=new i(null);return v.words=new Array(Math.ceil(this.n/13)),v},D.prototype.ireduce=function(v){var b=v,B;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),B=b.bitLength();while(B>this.n);var T=B0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},D.prototype.split=function(v,b){v.iushrn(this.n,0,b)},D.prototype.imulK=function(v){return v.imul(this.k)};function y(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(y,D),y.prototype.split=function(v,b){for(var B=4194303,T=Math.min(v.length,9),j=0;j>>22,H=P}H>>>=22,v.words[j-10]=H,H===0&&v.length>10?v.length-=10:v.length-=9},y.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var b=0,B=0;B>>=26,v.words[B]=j,b=T}return b!==0&&(v.words[v.length++]=b),v},i._prime=function(v){if(N[v])return N[v];var b;if(v==="k256")b=new y;else if(v==="p224")b=new U;else if(v==="p192")b=new L;else if(v==="p25519")b=new G;else throw new Error("Unknown prime "+v);return N[v]=b,b};function V(C){if(typeof C=="string"){var v=i._prime(C);this.m=v.p,this.prime=v}else n(C.gtn(1),"modulus must be greater than 1"),this.m=C,this.prime=null}V.prototype._verify1=function(v){n(v.negative===0,"red works only with positives"),n(v.red,"red works only with red numbers")},V.prototype._verify2=function(v,b){n((v.negative|b.negative)===0,"red works only with positives"),n(v.red&&v.red===b.red,"red works only with red numbers")},V.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(u(v,v.umod(this.m)._forceRed(this)),v)},V.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},V.prototype.add=function(v,b){this._verify2(v,b);var B=v.add(b);return B.cmp(this.m)>=0&&B.isub(this.m),B._forceRed(this)},V.prototype.iadd=function(v,b){this._verify2(v,b);var B=v.iadd(b);return B.cmp(this.m)>=0&&B.isub(this.m),B},V.prototype.sub=function(v,b){this._verify2(v,b);var B=v.sub(b);return B.cmpn(0)<0&&B.iadd(this.m),B._forceRed(this)},V.prototype.isub=function(v,b){this._verify2(v,b);var B=v.isub(b);return B.cmpn(0)<0&&B.iadd(this.m),B},V.prototype.shl=function(v,b){return this._verify1(v),this.imod(v.ushln(b))},V.prototype.imul=function(v,b){return this._verify2(v,b),this.imod(v.imul(b))},V.prototype.mul=function(v,b){return this._verify2(v,b),this.imod(v.mul(b))},V.prototype.isqr=function(v){return this.imul(v,v.clone())},V.prototype.sqr=function(v){return this.mul(v,v)},V.prototype.sqrt=function(v){if(v.isZero())return v.clone();var b=this.m.andln(3);if(n(b%2===1),b===3){var B=this.m.add(new i(1)).iushrn(2);return this.pow(v,B)}for(var T=this.m.subn(1),j=0;!T.isZero()&&T.andln(1)===0;)j++,T.iushrn(1);n(!T.isZero());var H=new i(1).toRed(this),P=H.redNeg(),F=this.m.subn(1).iushrn(1),$=this.m.bitLength();for($=new i(2*$*$).toRed(this);this.pow($,F).cmp(P)!==0;)$.redIAdd(P);for(var q=this.pow($,T),J=this.pow(v,T.addn(1).iushrn(1)),te=this.pow(v,T),ae=j;te.cmp(H)!==0;){for(var ce=te,ie=0;ce.cmp(H)!==0;ie++)ce=ce.redSqr();n(ie=0;j--){for(var q=b.words[j],J=$-1;J>=0;J--){var te=q>>J&1;if(H!==T[0]&&(H=this.sqr(H)),te===0&&P===0){F=0;continue}P<<=1,P|=te,F++,!(F!==B&&(j!==0||J!==0))&&(H=this.mul(H,T[P]),F=0,P=0)}$=26}return H},V.prototype.convertTo=function(v){var b=v.umod(this.m);return b===v?b.clone():b},V.prototype.convertFrom=function(v){var b=v.clone();return b.red=null,b},i.mont=function(v){return new S(v)};function S(C){V.call(this,C),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}o(S,V),S.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},S.prototype.convertFrom=function(v){var b=this.imod(v.mul(this.rinv));return b.red=null,b},S.prototype.imul=function(v,b){if(v.isZero()||b.isZero())return v.words[0]=0,v.length=1,v;var B=v.imul(b),T=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=B.isub(T).iushrn(this.shift),H=j;return j.cmp(this.m)>=0?H=j.isub(this.m):j.cmpn(0)<0&&(H=j.iadd(this.m)),H._forceRed(this)},S.prototype.mul=function(v,b){if(v.isZero()||b.isZero())return new i(0)._forceRed(this);var B=v.mul(b),T=B.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),j=B.isub(T).iushrn(this.shift),H=j;return j.cmp(this.m)>=0?H=j.isub(this.m):j.cmpn(0)<0&&(H=j.iadd(this.m)),H._forceRed(this)},S.prototype.invm=function(v){var b=this.imod(v._invmp(this.m).mul(this.r2));return b._forceRed(this)}})(e,Le)})(j8);var ike=j8.exports;const ake="Input must be an string, Buffer or Uint8Array";function ske(e){let t;if(e instanceof Uint8Array)t=e;else if(typeof e=="string")t=new TextEncoder().encode(e);else throw new Error(ake);return t}function lke(e){return Array.prototype.map.call(e,function(t){return(t<16?"0":"")+t.toString(16)}).join("")}function a1(e){return(4294967296+e).toString(16).substring(1)}function cke(e,t,r){let n=` -`+e+" = ";for(let o=0;o=4294967296&&o++,e[t]=n,e[t+1]=o}function e$(e,t,r,n){let o=e[t]+r;r<0&&(o+=4294967296);let i=e[t+1]+n;o>=4294967296&&i++,e[t]=o,e[t+1]=i}function Zq(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Ga(e,t,r,n,o,i){const a=Pd[o],s=Pd[o+1],l=Pd[i],c=Pd[i+1];s1(bt,e,t),e$(bt,e,a,s);let u=bt[n]^bt[e],f=bt[n+1]^bt[e+1];bt[n]=f,bt[n+1]=u,s1(bt,r,n),u=bt[t]^bt[r],f=bt[t+1]^bt[r+1],bt[t]=u>>>24^f<<8,bt[t+1]=f>>>24^u<<8,s1(bt,e,t),e$(bt,e,l,c),u=bt[n]^bt[e],f=bt[n+1]^bt[e+1],bt[n]=u>>>16^f<<16,bt[n+1]=f>>>16^u<<16,s1(bt,r,n),u=bt[t]^bt[r],f=bt[t+1]^bt[r+1],bt[t]=f>>>31^u<<1,bt[t+1]=u>>>31^f<<1}const Jq=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),fke=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],Zr=new Uint8Array(fke.map(function(e){return e*2})),bt=new Uint32Array(32),Pd=new Uint32Array(32);function Qq(e,t){let r=0;for(r=0;r<16;r++)bt[r]=e.h[r],bt[r+16]=Jq[r];for(bt[24]=bt[24]^e.t,bt[25]=bt[25]^e.t/4294967296,t&&(bt[28]=~bt[28],bt[29]=~bt[29]),r=0;r<32;r++)Pd[r]=Zq(e.b,4*r);for(r=0;r<12;r++)Ga(0,8,16,24,Zr[r*16+0],Zr[r*16+1]),Ga(2,10,18,26,Zr[r*16+2],Zr[r*16+3]),Ga(4,12,20,28,Zr[r*16+4],Zr[r*16+5]),Ga(6,14,22,30,Zr[r*16+6],Zr[r*16+7]),Ga(0,10,20,30,Zr[r*16+8],Zr[r*16+9]),Ga(2,12,22,24,Zr[r*16+10],Zr[r*16+11]),Ga(4,14,16,26,Zr[r*16+12],Zr[r*16+13]),Ga(6,8,18,28,Zr[r*16+14],Zr[r*16+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^bt[r]^bt[r+16]}const Ka=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function eG(e,t,r,n){if(e===0||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&r.length!==16)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&n.length!==16)throw new Error("Illegal personal, expected Uint8Array with length is 16");const o={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};Ka.fill(0),Ka[0]=e,t&&(Ka[1]=t.length),Ka[2]=1,Ka[3]=1,r&&Ka.set(r,32),n&&Ka.set(n,48);for(let i=0;i<16;i++)o.h[i]=Jq[i]^Zq(Ka,i*4);return t&&(L8(o,t),o.c=128),o}function L8(e,t){for(let r=0;r>2]>>8*(r&3);return t}function rG(e,t,r,n,o){r=r||64,e=q1.normalizeInput(e),n&&(n=q1.normalizeInput(n)),o&&(o=q1.normalizeInput(o));const i=eG(r,t,n,o);return L8(i,e),tG(i)}function dke(e,t,r,n,o){const i=rG(e,t,r,n,o);return q1.toHex(i)}var pke={blake2b:rG,blake2bHex:dke,blake2bInit:eG,blake2bUpdate:L8,blake2bFinal:tG};const nG=Xq;function hke(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function Ya(e,t,r,n,o,i){At[e]=At[e]+At[t]+o,At[n]=l1(At[n]^At[e],16),At[r]=At[r]+At[n],At[t]=l1(At[t]^At[r],12),At[e]=At[e]+At[t]+i,At[n]=l1(At[n]^At[e],8),At[r]=At[r]+At[n],At[t]=l1(At[t]^At[r],7)}function l1(e,t){return e>>>t^e<<32-t}const oG=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Jr=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),At=new Uint32Array(16),Mr=new Uint32Array(16);function iG(e,t){let r=0;for(r=0;r<8;r++)At[r]=e.h[r],At[r+8]=oG[r];for(At[12]^=e.t,At[13]^=e.t/4294967296,t&&(At[14]=~At[14]),r=0;r<16;r++)Mr[r]=hke(e.b,4*r);for(r=0;r<10;r++)Ya(0,4,8,12,Mr[Jr[r*16+0]],Mr[Jr[r*16+1]]),Ya(1,5,9,13,Mr[Jr[r*16+2]],Mr[Jr[r*16+3]]),Ya(2,6,10,14,Mr[Jr[r*16+4]],Mr[Jr[r*16+5]]),Ya(3,7,11,15,Mr[Jr[r*16+6]],Mr[Jr[r*16+7]]),Ya(0,5,10,15,Mr[Jr[r*16+8]],Mr[Jr[r*16+9]]),Ya(1,6,11,12,Mr[Jr[r*16+10]],Mr[Jr[r*16+11]]),Ya(2,7,8,13,Mr[Jr[r*16+12]],Mr[Jr[r*16+13]]),Ya(3,4,9,14,Mr[Jr[r*16+14]],Mr[Jr[r*16+15]]);for(r=0;r<8;r++)e.h[r]^=At[r]^At[r+8]}function aG(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=t?t.length:0;if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(oG),b:new Uint8Array(64),c:0,t:0,outlen:e};return n.h[0]^=16842752^r<<8^e,r>0&&(U8(n,t),n.c=64),n}function U8(e,t){for(let r=0;r>2]>>8*(r&3)&255;return t}function lG(e,t,r){r=r||32,e=nG.normalizeInput(e);const n=aG(r,t);return U8(n,e),sG(n)}function vke(e,t,r){const n=lG(e,t,r);return nG.toHex(n)}var gke={blake2s:lG,blake2sHex:vke,blake2sInit:aG,blake2sUpdate:U8,blake2sFinal:sG};const pd=pke,hd=gke;var Hb={blake2b:pd.blake2b,blake2bHex:pd.blake2bHex,blake2bInit:pd.blake2bInit,blake2bUpdate:pd.blake2bUpdate,blake2bFinal:pd.blake2bFinal,blake2s:hd.blake2s,blake2sHex:hd.blake2sHex,blake2sInit:hd.blake2sInit,blake2sUpdate:hd.blake2sUpdate,blake2sFinal:hd.blake2sFinal};const Vb=ri(Hb);var Wb=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.assertType=ht.sleep=ht.hexToString=ht.stringToHex=ht.blockChainIndex=ht.subContractId=ht.contractIdFromTx=ht.addressFromTokenId=ht.addressFromContractId=ht.addressFromPublicKey=ht.publicKeyFromPrivateKey=ht.groupOfPrivateKey=ht.binToHex=ht.hexToBinUnsafe=ht.tokenIdFromAddress=ht.contractIdFromAddress=ht.groupOfAddress=ht.isHexString=ht.xorByte=ht.signatureDecode=ht.encodeHexSignature=ht.encodeSignature=ht.networkIds=void 0;const mke=$8,Vm=Wb(ike),Hp=Wb(Hb),Vp=Wb($b),Er=zs,Xd=M0,yke=Wb(N0);ht.networkIds=["mainnet","testnet","devnet"];const Zd=new mke.ec("secp256k1");function cG(e){let t=e.s;Zd.n&&e.s.cmp(Zd.nh)===1&&(t=Zd.n.sub(e.s));const r=e.r.toString("hex",66).slice(2),n=t.toString("hex",66).slice(2);return r+n}ht.encodeSignature=cG;function bke(e,t){return cG({r:new Vm.default(e,"hex"),s:new Vm.default(t,"hex")})}ht.encodeHexSignature=bke;function wke(e,t){if(t.length!==128)throw new Error("Invalid signature length");const r=t.slice(64,128),n=new Vm.default(r,"hex");if(e.n&&n.cmp(e.nh)<1)return{r:t.slice(0,64),s:r};throw new Error("The signature is not normalized")}ht.signatureDecode=wke;function uG(e){const t=e>>24&255,r=e>>16&255,n=e>>8&255,o=e&255;return(t^r^n^o)&255}ht.xorByte=uG;function fG(e){return e.length%2===0&&/^[0-9a-fA-F]*$/.test(e)}ht.isHexString=fG;var ma;(function(e){e[e.P2PKH=0]="P2PKH",e[e.P2MPKH=1]="P2MPKH",e[e.P2SH=2]="P2SH",e[e.P2C=3]="P2C"})(ma||(ma={}));function dG(e){const t=Vp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==ma.P2PKH)return xke(n);if(r==ma.P2MPKH)return _ke(n);if(r==ma.P2SH)return Eke(n);{const o=pG(e);return o[`${o.length-1}`]}}ht.groupOfAddress=dG;function z8(e){const t=(0,yke.default)(e)|1;return uG(t)%Xd.TOTAL_NUMBER_OF_GROUPS}function xke(e){if(e.length!=32)throw new Error(`Invalid p2pkh address length: ${e.length}`);return z8(e)}function _ke(e){if((e.length-2)%32!=0)throw new Error(`Invalid p2mpkh address length: ${e.length}`);return z8(e.slice(1,33))}function Eke(e){return z8(e)}function pG(e){return hG(e)}ht.contractIdFromAddress=pG;function Ske(e){return hG(e)}ht.tokenIdFromAddress=Ske;function hG(e){const t=Vp.default.decode(e);if(t.length==0)throw new Error("Address string is empty");const r=t[0],n=t.slice(1);if(r==ma.P2C)return n;throw new Error(`Invalid contract address type: ${r}`)}function Wp(e){return Er.Buffer.from(e,"hex")}ht.hexToBinUnsafe=Wp;function H8(e){return Er.Buffer.from(e).toString("hex")}ht.binToHex=H8;function Cke(e,t){return dG(gG(vG(e,t),t))}ht.groupOfPrivateKey=Cke;function vG(e,t){return(t??"default")==="default"?Zd.keyFromPrivate(e).getPublic(!0,"hex"):Zd.g.mul(new Vm.default(e,16)).encode("hex",!0).slice(2)}ht.publicKeyFromPrivateKey=vG;function gG(e,t){if((t??"default")==="default"){const n=Er.Buffer.from([ma.P2PKH]),o=Er.Buffer.from(Hp.default.blake2b(Er.Buffer.from(e,"hex"),void 0,32)),i=Er.Buffer.concat([n,o]);return Vp.default.encode(i)}else{const n=Er.Buffer.from(`0101000000000458144020${e}8685`,"hex"),o=Hp.default.blake2b(n,void 0,32),i=Er.Buffer.from([ma.P2SH]);return Vp.default.encode(Er.Buffer.concat([i,o]))}}ht.addressFromPublicKey=gG;function mG(e){const t=Er.Buffer.from([ma.P2C]),r=Er.Buffer.from(Wp(e)),n=Er.Buffer.concat([t,r]);return Vp.default.encode(n)}ht.addressFromContractId=mG;function Pke(e){return mG(e)}ht.addressFromTokenId=Pke;function Oke(e,t){const r=Wp(e),n=Er.Buffer.concat([r,Er.Buffer.from([t])]),o=Hp.default.blake2b(n,void 0,32);return H8(o)}ht.contractIdFromTx=Oke;function kke(e,t,r){if(r<0||r>=Xd.TOTAL_NUMBER_OF_GROUPS)throw new Error(`Invalid group ${r}`);const n=Er.Buffer.concat([Wp(e),Wp(t)]),o=Er.Buffer.concat([Hp.default.blake2b(Hp.default.blake2b(n,void 0,32),void 0,32).slice(0,-1),Er.Buffer.from([r])]);return H8(o)}ht.subContractId=kke;function Ake(e){if(e.length!=64)throw Error(`Invalid block hash: ${e}`);const t=+("0x"+e.slice(-4))%Xd.TOTAL_NUMBER_OF_CHAINS;return{fromGroup:Math.floor(t/Xd.TOTAL_NUMBER_OF_GROUPS),toGroup:t%Xd.TOTAL_NUMBER_OF_GROUPS}}ht.blockChainIndex=Ake;function Ike(e){let t="";for(let r=0;rsetTimeout(t,e))}ht.sleep=Tke;function Dke(){}ht.assertType=Dke;var qb={},Mke=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qb,"__esModule",{value:!0});qb.Subscription=void 0;const Rke=Mke(eV());class Nke{constructor(t){this.pollingInterval=t.pollingInterval,this.messageCallback=t.messageCallback,this.errorCallback=t.errorCallback,this.task=void 0,this.cancelled=!1,this.eventEmitter=new Rke.default}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling(),this.cancelled||(this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval))}),this.eventEmitter.emit("tick")}unsubscribe(){this.eventEmitter.removeAllListeners(),this.cancelled=!0,typeof this.task<"u"&&clearTimeout(this.task)}isCancelled(){return this.cancelled}}qb.Subscription=Nke;var gl={},yG={};(function(e){/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const t=Xo,r=BigInt(0),n=BigInt(1),o=BigInt(2),i=BigInt(3),a=BigInt(8),s=Object.freeze({a:r,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=s;const l=(ve,oe)=>(ve+oe/o)/oe,c={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ve){const{n:oe}=s,he=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),be=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Ce=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Oe=he,Ie=BigInt("0x100000000000000000000000000000000"),De=l(Oe*ve,oe),je=l(-be*ve,oe);let Me=q(ve-De*he-je*Ce,oe),He=q(-De*be-je*Oe,oe);const qe=Me>Ie,Ue=He>Ie;if(qe&&(Me=oe-Me),Ue&&(He=oe-He),Me>Ie||He>Ie)throw new Error("splitScalarEndo: Endomorphism failed, k="+ve);return{k1neg:qe,k1:Me,k2neg:Ue,k2:He}}},u=32,f=32,d=32,p=u+1,h=2*u+1;function m(ve){const{a:oe,b:he}=s,be=q(ve*ve),Ce=q(be*ve);return q(Ce+oe*ve+he)}const _=s.a===r;class w extends Error{constructor(oe){super(oe)}}function g(ve){if(!(ve instanceof E))throw new TypeError("JacobianPoint expected")}class E{constructor(oe,he,be){this.x=oe,this.y=he,this.z=be}static fromAffine(oe){if(!(oe instanceof D))throw new TypeError("JacobianPoint#fromAffine: expected Point");return oe.equals(D.ZERO)?E.ZERO:new E(oe.x,oe.y,n)}static toAffineBatch(oe){const he=ce(oe.map(be=>be.z));return oe.map((be,Ce)=>be.toAffine(he[Ce]))}static normalizeZ(oe){return E.toAffineBatch(oe).map(E.fromAffine)}equals(oe){g(oe);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=oe,je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),Ue=q(q(be*De)*Me),at=q(q(Ie*Ce)*je);return He===qe&&Ue===at}negate(){return new E(this.x,q(-this.y),this.z)}double(){const{x:oe,y:he,z:be}=this,Ce=q(oe*oe),Oe=q(he*he),Ie=q(Oe*Oe),De=oe+Oe,je=q(o*(q(De*De)-Ce-Ie)),Me=q(i*Ce),He=q(Me*Me),qe=q(He-o*je),Ue=q(Me*(je-qe)-a*Ie),at=q(o*he*be);return new E(qe,Ue,at)}add(oe){g(oe);const{x:he,y:be,z:Ce}=this,{x:Oe,y:Ie,z:De}=oe;if(Oe===r||Ie===r)return this;if(he===r||be===r)return oe;const je=q(Ce*Ce),Me=q(De*De),He=q(he*Me),qe=q(Oe*je),Ue=q(q(be*De)*Me),at=q(q(Ie*Ce)*je),Be=q(qe-He),Ke=q(at-Ue);if(Be===r)return Ke===r?this.double():E.ZERO;const mt=q(Be*Be),ct=q(Be*mt),Pt=q(He*mt),En=q(Ke*Ke-ct-o*Pt),Fn=q(Ke*(Pt-En)-Ue*ct),cn=q(Ce*De*Be);return new E(En,Fn,cn)}subtract(oe){return this.add(oe.negate())}multiplyUnsafe(oe){const he=E.ZERO;if(typeof oe=="bigint"&&oe===r)return he;let be=$(oe);if(be===n)return this;if(!_){let qe=he,Ue=this;for(;be>r;)be&n&&(qe=qe.add(Ue)),Ue=Ue.double(),be>>=n;return qe}let{k1neg:Ce,k1:Oe,k2neg:Ie,k2:De}=c.splitScalar(be),je=he,Me=he,He=this;for(;Oe>r||De>r;)Oe&n&&(je=je.add(He)),De&n&&(Me=Me.add(He)),He=He.double(),Oe>>=n,De>>=n;return Ce&&(je=je.negate()),Ie&&(Me=Me.negate()),Me=new E(q(Me.x*c.beta),Me.y,Me.z),je.add(Me)}precomputeWindow(oe){const he=_?128/oe+1:256/oe+1,be=[];let Ce=this,Oe=Ce;for(let Ie=0;Ie>=qe,Be>je&&(Be-=He,oe+=n);const Ke=at,mt=at+Math.abs(Be)-1,ct=Ue%2!==0,Pt=Be<0;Be===0?Ie=Ie.add(A(ct,Ce[Ke])):Oe=Oe.add(A(Pt,Ce[mt]))}return{p:Oe,f:Ie}}multiply(oe,he){let be=$(oe),Ce,Oe;if(_){const{k1neg:Ie,k1:De,k2neg:je,k2:Me}=c.splitScalar(be);let{p:He,f:qe}=this.wNAF(De,he),{p:Ue,f:at}=this.wNAF(Me,he);He=A(Ie,He),Ue=A(je,Ue),Ue=new E(q(Ue.x*c.beta),Ue.y,Ue.z),Ce=He.add(Ue),Oe=qe.add(at)}else{const{p:Ie,f:De}=this.wNAF(be,he);Ce=Ie,Oe=De}return E.normalizeZ([Ce,Oe])[0]}toAffine(oe){const{x:he,y:be,z:Ce}=this,Oe=this.equals(E.ZERO);oe==null&&(oe=Oe?a:ae(Ce));const Ie=oe,De=q(Ie*Ie),je=q(De*Ie),Me=q(he*De),He=q(be*je),qe=q(Ce*Ie);if(Oe)return D.ZERO;if(qe!==n)throw new Error("invZ was invalid");return new D(Me,He)}}E.BASE=new E(s.Gx,s.Gy,n),E.ZERO=new E(r,n,r);function A(ve,oe){const he=oe.negate();return ve?he:oe}const N=new WeakMap;class D{constructor(oe,he){this.x=oe,this.y=he}_setWindowSize(oe){this._WINDOW_SIZE=oe,N.delete(this)}hasEvenY(){return this.y%o===r}static fromCompressedHex(oe){const he=oe.length===32,be=P(he?oe:oe.subarray(1));if(!pe(be))throw new Error("Point is not on curve");const Ce=m(be);let Oe=te(Ce);const Ie=(Oe&n)===n;he?Ie&&(Oe=q(-Oe)):(oe[0]&1)===1!==Ie&&(Oe=q(-Oe));const De=new D(be,Oe);return De.assertValidity(),De}static fromUncompressedHex(oe){const he=P(oe.subarray(1,u+1)),be=P(oe.subarray(u+1,u*2+1)),Ce=new D(he,be);return Ce.assertValidity(),Ce}static fromHex(oe){const he=F(oe),be=he.length,Ce=he[0];if(be===u)return this.fromCompressedHex(he);if(be===p&&(Ce===2||Ce===3))return this.fromCompressedHex(he);if(be===h&&Ce===4)return this.fromUncompressedHex(he);throw new Error(`Point.fromHex: received invalid point. Expected 32-${p} compressed bytes or ${h} uncompressed bytes, not ${be}`)}static fromPrivateKey(oe){return D.BASE.multiply(X(oe))}static fromSignature(oe,he,be){const{r:Ce,s:Oe}=z(he);if(![0,1,2,3].includes(be))throw new Error("Cannot recover: invalid recovery bit");const Ie=ue(F(oe)),{n:De}=s,je=be===2||be===3?Ce+De:Ce,Me=ae(je,De),He=q(-Ie*Me,De),qe=q(Oe*Me,De),Ue=be&1?"03":"02",at=D.fromHex(Ue+b(je)),Be=D.BASE.multiplyAndAddUnsafe(at,He,qe);if(!Be)throw new Error("Cannot recover signature: point at infinify");return Be.assertValidity(),Be}toRawBytes(oe=!1){return H(this.toHex(oe))}toHex(oe=!1){const he=b(this.x);return oe?`${this.hasEvenY()?"02":"03"}${he}`:`04${he}${b(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const oe="Point is not on elliptic curve",{x:he,y:be}=this;if(!pe(he)||!pe(be))throw new Error(oe);const Ce=q(be*be),Oe=m(he);if(q(Ce-Oe)!==r)throw new Error(oe)}equals(oe){return this.x===oe.x&&this.y===oe.y}negate(){return new D(this.x,q(-this.y))}double(){return E.fromAffine(this).double().toAffine()}add(oe){return E.fromAffine(this).add(E.fromAffine(oe)).toAffine()}subtract(oe){return this.add(oe.negate())}multiply(oe){return E.fromAffine(this).multiply(oe,this).toAffine()}multiplyAndAddUnsafe(oe,he,be){const Ce=E.fromAffine(this),Oe=he===r||he===n||this!==D.BASE?Ce.multiplyUnsafe(he):Ce.multiply(he),Ie=E.fromAffine(oe).multiplyUnsafe(be),De=Oe.add(Ie);return De.equals(E.ZERO)?void 0:De.toAffine()}}e.Point=D,D.BASE=new D(s.Gx,s.Gy),D.ZERO=new D(r,r);function y(ve){return Number.parseInt(ve[0],16)>=8?"00"+ve:ve}function U(ve){if(ve.length<2||ve[0]!==2)throw new Error(`Invalid signature integer tag: ${C(ve)}`);const oe=ve[1],he=ve.subarray(2,oe+2);if(!oe||he.length!==oe)throw new Error("Invalid signature integer: wrong length");if(he[0]===0&&he[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:P(he),left:ve.subarray(oe+2)}}function L(ve){if(ve.length<2||ve[0]!=48)throw new Error(`Invalid signature tag: ${C(ve)}`);if(ve[1]!==ve.length-2)throw new Error("Invalid signature: incorrect length");const{data:oe,left:he}=U(ve.subarray(2)),{data:be,left:Ce}=U(he);if(Ce.length)throw new Error(`Invalid signature: left bytes after parsing: ${C(Ce)}`);return{r:oe,s:be}}class G{constructor(oe,he){this.r=oe,this.s=he,this.assertValidity()}static fromCompact(oe){const he=oe instanceof Uint8Array,be="Signature.fromCompact";if(typeof oe!="string"&&!he)throw new TypeError(`${be}: Expected string or Uint8Array`);const Ce=he?C(oe):oe;if(Ce.length!==128)throw new Error(`${be}: Expected 64-byte hex`);return new G(j(Ce.slice(0,64)),j(Ce.slice(64,128)))}static fromDER(oe){const he=oe instanceof Uint8Array;if(typeof oe!="string"&&!he)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:be,s:Ce}=L(he?oe:H(oe));return new G(be,Ce)}static fromHex(oe){return this.fromDER(oe)}assertValidity(){const{r:oe,s:he}=this;if(!se(oe))throw new Error("Invalid Signature: r must be 0 < r < n");if(!se(he))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const oe=s.n>>n;return this.s>oe}normalizeS(){return this.hasHighS()?new G(this.r,q(-this.s,s.n)):this}toDERRawBytes(){return H(this.toDERHex())}toDERHex(){const oe=y(T(this.s)),he=y(T(this.r)),be=oe.length/2,Ce=he.length/2,Oe=T(be),Ie=T(Ce);return`30${T(Ce+be+4)}02${Ie}${he}02${Oe}${oe}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return H(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}e.Signature=G;function V(...ve){if(!ve.every(be=>be instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ve.length===1)return ve[0];const oe=ve.reduce((be,Ce)=>be+Ce.length,0),he=new Uint8Array(oe);for(let be=0,Ce=0;beoe.toString(16).padStart(2,"0"));function C(ve){if(!(ve instanceof Uint8Array))throw new Error("Expected Uint8Array");let oe="";for(let he=0;he0)return BigInt(ve);if(typeof ve=="bigint"&&se(ve))return ve;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(ve,oe=s.P){const he=ve%oe;return he>=r?he:oe+he}function J(ve,oe){const{P:he}=s;let be=ve;for(;oe-- >r;)be*=be,be%=he;return be}function te(ve){const{P:oe}=s,he=BigInt(6),be=BigInt(11),Ce=BigInt(22),Oe=BigInt(23),Ie=BigInt(44),De=BigInt(88),je=ve*ve*ve%oe,Me=je*je*ve%oe,He=J(Me,i)*Me%oe,qe=J(He,i)*Me%oe,Ue=J(qe,o)*je%oe,at=J(Ue,be)*Ue%oe,Be=J(at,Ce)*at%oe,Ke=J(Be,Ie)*Be%oe,mt=J(Ke,De)*Ke%oe,ct=J(mt,Ie)*Be%oe,Pt=J(ct,i)*Me%oe,En=J(Pt,Oe)*at%oe,Fn=J(En,he)*je%oe,cn=J(Fn,o);if(cn*cn%oe!==ve)throw new Error("Cannot find square root");return cn}function ae(ve,oe=s.P){if(ve===r||oe<=r)throw new Error(`invert: expected positive integers, got n=${ve} mod=${oe}`);let he=q(ve,oe),be=oe,Ce=r,Oe=n;for(;he!==r;){const De=be/he,je=be%he,Me=Ce-Oe*De;be=he,he=je,Ce=Oe,Oe=Me}if(be!==n)throw new Error("invert: does not exist");return q(Ce,oe)}function ce(ve,oe=s.P){const he=new Array(ve.length),be=ve.reduce((Oe,Ie,De)=>Ie===r?Oe:(he[De]=Oe,q(Oe*Ie,oe)),n),Ce=ae(be,oe);return ve.reduceRight((Oe,Ie,De)=>Ie===r?Oe:(he[De]=q(Oe*he[De],oe),q(Oe*Ie,oe)),Ce),he}function ie(ve){const oe=ve.length*8-f*8,he=P(ve);return oe>0?he>>BigInt(oe):he}function ue(ve,oe=!1){const he=ie(ve);if(oe)return he;const{n:be}=s;return he>=be?he-be:he}let O,K;class ee{constructor(oe,he){if(this.hashLen=oe,this.qByteLen=he,typeof oe!="number"||oe<2)throw new Error("hashLen must be a number");if(typeof he!="number"||he<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(oe).fill(1),this.k=new Uint8Array(oe).fill(0),this.counter=0}hmac(...oe){return e.utils.hmacSha256(this.k,...oe)}hmacSync(...oe){return K(this.k,...oe)}checkSync(){if(typeof K!="function")throw new w("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(oe=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),oe),this.v=await this.hmac(this.v),oe.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),oe),this.v=await this.hmac(this.v))}reseedSync(oe=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),oe),this.v=this.hmacSync(this.v),oe.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),oe),this.v=this.hmacSync(this.v))}async generate(){this.incr();let oe=0;const he=[];for(;oe0)oe=BigInt(ve);else if(typeof ve=="string"){if(ve.length!==2*f)throw new Error("Expected 32 bytes of private key");oe=j(ve)}else if(ve instanceof Uint8Array){if(ve.length!==f)throw new Error("Expected 32 bytes of private key");oe=P(ve)}else throw new TypeError("Expected valid private key");if(!se(oe))throw new Error("Expected private key: 0 < key < n");return oe}function M(ve){return ve instanceof D?(ve.assertValidity(),ve):D.fromHex(ve)}function z(ve){if(ve instanceof G)return ve.assertValidity(),ve;try{return G.fromDER(ve)}catch{return G.fromCompact(ve)}}function Z(ve,oe=!1){return D.fromPrivateKey(ve).toRawBytes(oe)}e.getPublicKey=Z;function Q(ve,oe,he,be=!1){return D.fromSignature(ve,oe,he).toRawBytes(be)}e.recoverPublicKey=Q;function de(ve){const oe=ve instanceof Uint8Array,he=typeof ve=="string",be=(oe||he)&&ve.length;return oe?be===p||be===h:he?be===p*2||be===h*2:ve instanceof D}function we(ve,oe,he=!1){if(de(ve))throw new TypeError("getSharedSecret: first arg must be private key");if(!de(oe))throw new TypeError("getSharedSecret: second arg must be public key");const be=M(oe);return be.assertValidity(),be.multiply(X(ve)).toRawBytes(he)}e.getSharedSecret=we;function Se(ve){const oe=ve.length>u?ve.slice(0,u):ve;return P(oe)}function Ee(ve){const oe=Se(ve),he=q(oe,s.n);return ke(he{ve=F(ve);const oe=f+8;if(ve.length1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const he=q(P(ve),s.n-n)+n;return B(he)},randomBytes:(ve=32)=>{if(Ye.web)return Ye.web.getRandomValues(new Uint8Array(ve));if(Ye.node){const{randomBytes:oe}=Ye.node;return Uint8Array.from(oe(ve))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(f+8)),precompute(ve=8,oe=D.BASE){const he=oe===D.BASE?oe:new D(oe.x,oe.y);return he._setWindowSize(ve),he.multiply(i),he},sha256:async(...ve)=>{if(Ye.web){const oe=await Ye.web.subtle.digest("SHA-256",V(...ve));return new Uint8Array(oe)}else if(Ye.node){const{createHash:oe}=Ye.node,he=oe("sha256");return ve.forEach(be=>he.update(be)),Uint8Array.from(he.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ve,...oe)=>{if(Ye.web){const he=await Ye.web.subtle.importKey("raw",ve,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),be=V(...oe),Ce=await Ye.web.subtle.sign("HMAC",he,be);return new Uint8Array(Ce)}else if(Ye.node){const{createHmac:he}=Ye.node,be=he("sha256",ve);return oe.forEach(Ce=>be.update(Ce)),Uint8Array.from(be.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ve,...oe)=>{let he=rt[ve];if(he===void 0){const be=await e.utils.sha256(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=V(be,be),rt[ve]=he}return e.utils.sha256(he,...oe)},taggedHashSync:(ve,...oe)=>{if(typeof O!="function")throw new w("sha256Sync is undefined, you need to set it");let he=rt[ve];if(he===void 0){const be=O(Uint8Array.from(ve,Ce=>Ce.charCodeAt(0)));he=V(be,be),rt[ve]=he}return O(he,...oe)},_JacobianPoint:E},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return O},set(ve){O||(O=ve)}},hmacSha256Sync:{configurable:!1,get(){return K},set(ve){K||(K=ve)}}})})(yG);var t$;function Fke(){if(t$)return gl;t$=1;var e=Le&&Le.__createBinding||(Object.create?function(u,f,d,p){p===void 0&&(p=d);var h=Object.getOwnPropertyDescriptor(f,d);(!h||("get"in h?!f.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(u,p,h)}:function(u,f,d,p){p===void 0&&(p=d),u[p]=f[d]}),t=Le&&Le.__setModuleDefault||(Object.create?function(u,f){Object.defineProperty(u,"default",{enumerable:!0,value:f})}:function(u,f){u.default=f}),r=Le&&Le.__importStar||function(u){if(u&&u.__esModule)return u;var f={};if(u!=null)for(var d in u)d!=="default"&&Object.prototype.hasOwnProperty.call(u,d)&&e(f,u,d);return t(f,u),f};Object.defineProperty(gl,"__esModule",{value:!0}),gl.verifySignature=gl.sign=void 0;const n=$8,o=el(),i=r(yG),a=Xo,s=new n.ec("secp256k1");i.utils.sha256Sync=(...u)=>{const f=(0,a.createHash)("sha256");for(const d of u)f.update(d);return f.digest()},i.utils.hmacSha256Sync=(u,...f)=>{const d=(0,a.createHmac)("sha256",Buffer.from(u));return f.forEach(p=>d.update(p)),Uint8Array.from(d.digest())};function l(u,f,d){if((d??"default")==="default"){const m=s.keyFromPrivate(f).sign(u);return(0,o.encodeSignature)(m)}else{const h=i.schnorr.signSync((0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f));return(0,o.binToHex)(h)}}gl.sign=l;function c(u,f,d,p){const h=p??"default";try{return h==="default"?s.keyFromPublic(f,"hex").verify(u,(0,o.signatureDecode)(s,d)):i.schnorr.verifySync((0,o.hexToBinUnsafe)(d),(0,o.hexToBinUnsafe)(u),(0,o.hexToBinUnsafe)(f))}catch{return!1}}return gl.verifySignature=c,gl}var bG={},wG={exports:{}};(function(e){(function(t){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,i=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",l=1e14,c=14,u=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,p=1e9;function h(D){var y,U,L,G=J.prototype={constructor:J,toString:null,valueOf:null},V=new J(1),S=20,C=4,v=-7,b=21,B=-1e7,T=1e7,j=!1,H=1,P=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},$="0123456789abcdefghijklmnopqrstuvwxyz",q=!0;function J(O,K){var ee,se,pe,ge,X,M,z,Z,Q=this;if(!(Q instanceof J))return new J(O,K);if(K==null){if(O&&O._isBigNumber===!0){Q.s=O.s,!O.c||O.e>T?Q.c=Q.e=null:O.e=10;X/=10,ge++);ge>T?Q.c=Q.e=null:(Q.e=ge,Q.c=[O]);return}Z=String(O)}else{if(!n.test(Z=String(O)))return L(Q,Z,M);Q.s=Z.charCodeAt(0)==45?(Z=Z.slice(1),-1):1}(ge=Z.indexOf("."))>-1&&(Z=Z.replace(".","")),(X=Z.search(/e/i))>0?(ge<0&&(ge=X),ge+=+Z.slice(X+1),Z=Z.substring(0,X)):ge<0&&(ge=Z.length)}else{if(g(K,2,$.length,"Base"),K==10&&q)return Q=new J(O),ie(Q,S+Q.e+1,C);if(Z=String(O),M=typeof O=="number"){if(O*0!=0)return L(Q,Z,M,K);if(Q.s=1/O<0?(Z=Z.slice(1),-1):1,J.DEBUG&&Z.replace(/^0\.0*|\./,"").length>15)throw Error(s+O)}else Q.s=Z.charCodeAt(0)===45?(Z=Z.slice(1),-1):1;for(ee=$.slice(0,K),ge=X=0,z=Z.length;Xge){ge=z;continue}}else if(!pe&&(Z==Z.toUpperCase()&&(Z=Z.toLowerCase())||Z==Z.toLowerCase()&&(Z=Z.toUpperCase()))){pe=!0,X=-1,ge=0;continue}return L(Q,String(O),M,K)}M=!1,Z=U(Z,K,10,Q.s),(ge=Z.indexOf("."))>-1?Z=Z.replace(".",""):ge=Z.length}for(X=0;Z.charCodeAt(X)===48;X++);for(z=Z.length;Z.charCodeAt(--z)===48;);if(Z=Z.slice(X,++z)){if(z-=X,M&&J.DEBUG&&z>15&&(O>u||O!==i(O)))throw Error(s+Q.s*O);if((ge=ge-X-1)>T)Q.c=Q.e=null;else if(ge=-p&&pe<=p&&pe===i(pe)){if(se[0]===0){if(pe===0&&se.length===1)return!0;break e}if(K=(pe+1)%c,K<1&&(K+=c),String(se[0]).length==K){for(K=0;K=l||ee!==i(ee))break e;if(ee!==0)return!0}}}else if(se===null&&pe===null&&(ge===null||ge===1||ge===-1))return!0;throw Error(a+"Invalid BigNumber: "+O)},J.maximum=J.max=function(){return ae(arguments,G.lt)},J.minimum=J.min=function(){return ae(arguments,G.gt)},J.random=function(){var O=9007199254740992,K=Math.random()*O&2097151?function(){return i(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(ee){var se,pe,ge,X,M,z=0,Z=[],Q=new J(V);if(ee==null?ee=S:g(ee,0,p),X=o(ee/c),j)if(crypto.getRandomValues){for(se=crypto.getRandomValues(new Uint32Array(X*=2));z>>11),M>=9e15?(pe=crypto.getRandomValues(new Uint32Array(2)),se[z]=pe[0],se[z+1]=pe[1]):(Z.push(M%1e14),z+=2);z=X/2}else if(crypto.randomBytes){for(se=crypto.randomBytes(X*=7);z=9e15?crypto.randomBytes(7).copy(se,z):(Z.push(M%1e14),z+=7);z=X/7}else throw j=!1,Error(a+"crypto unavailable");if(!j)for(;z=10;M/=10,z++);zpe-1&&(M[X+1]==null&&(M[X+1]=0),M[X+1]+=M[X]/pe|0,M[X]%=pe)}return M.reverse()}return function(ee,se,pe,ge,X){var M,z,Z,Q,de,we,Se,Ee,ke=ee.indexOf("."),Te=S,W=C;for(ke>=0&&(Q=P,P=0,ee=ee.replace(".",""),Ee=new J(se),we=Ee.pow(ee.length-ke),P=Q,Ee.c=K(N(_(we.c),we.e,"0"),10,pe,O),Ee.e=Ee.c.length),Se=K(ee,se,pe,X?(M=$,O):(M=O,$)),Z=Q=Se.length;Se[--Q]==0;Se.pop());if(!Se[0])return M.charAt(0);if(ke<0?--Z:(we.c=Se,we.e=Z,we.s=ge,we=y(we,Ee,Te,W,pe),Se=we.c,de=we.r,Z=we.e),z=Z+Te+1,ke=Se[z],Q=pe/2,de=de||z<0||Se[z+1]!=null,de=W<4?(ke!=null||de)&&(W==0||W==(we.s<0?3:2)):ke>Q||ke==Q&&(W==4||de||W==6&&Se[z-1]&1||W==(we.s<0?8:7)),z<1||!Se[0])ee=de?N(M.charAt(1),-Te,M.charAt(0)):M.charAt(0);else{if(Se.length=z,de)for(--pe;++Se[--z]>pe;)Se[z]=0,z||(++Z,Se=[1].concat(Se));for(Q=Se.length;!Se[--Q];);for(ke=0,ee="";ke<=Q;ee+=M.charAt(Se[ke++]));ee=N(ee,Z,M.charAt(0))}return ee}}(),y=function(){function O(se,pe,ge){var X,M,z,Z,Q=0,de=se.length,we=pe%d,Se=pe/d|0;for(se=se.slice();de--;)z=se[de]%d,Z=se[de]/d|0,X=Se*z+Z*we,M=we*z+X%d*d+Q,Q=(M/ge|0)+(X/d|0)+Se*Z,se[de]=M%ge;return Q&&(se=[Q].concat(se)),se}function K(se,pe,ge,X){var M,z;if(ge!=X)z=ge>X?1:-1;else for(M=z=0;Mpe[M]?1:-1;break}return z}function ee(se,pe,ge,X){for(var M=0;ge--;)se[ge]-=M,M=se[ge]1;se.splice(0,1));}return function(se,pe,ge,X,M){var z,Z,Q,de,we,Se,Ee,ke,Te,W,x,I,Y,re,fe,le,xe,_e=se.s==pe.s?1:-1,Ae=se.c,$e=pe.c;if(!Ae||!Ae[0]||!$e||!$e[0])return new J(!se.s||!pe.s||(Ae?$e&&Ae[0]==$e[0]:!$e)?NaN:Ae&&Ae[0]==0||!$e?_e*0:_e/0);for(ke=new J(_e),Te=ke.c=[],Z=se.e-pe.e,_e=ge+Z+1,M||(M=l,Z=m(se.e/c)-m(pe.e/c),_e=_e/c|0),Q=0;$e[Q]==(Ae[Q]||0);Q++);if($e[Q]>(Ae[Q]||0)&&Z--,_e<0)Te.push(1),de=!0;else{for(re=Ae.length,le=$e.length,Q=0,_e+=2,we=i(M/($e[0]+1)),we>1&&($e=O($e,we,M),Ae=O(Ae,we,M),le=$e.length,re=Ae.length),Y=le,W=Ae.slice(0,le),x=W.length;x=M/2&&fe++;do{if(we=0,z=K($e,W,le,x),z<0){if(I=W[0],le!=x&&(I=I*M+(W[1]||0)),we=i(I/fe),we>1)for(we>=M&&(we=M-1),Se=O($e,we,M),Ee=Se.length,x=W.length;K(Se,W,Ee,x)==1;)we--,ee(Se,le=10;_e/=10,Q++);ie(ke,ge+(ke.e=Q+Z*c-1)+1,X,de)}else ke.e=Z,ke.r=+de;return ke}}();function te(O,K,ee,se){var pe,ge,X,M,z;if(ee==null?ee=C:g(ee,0,8),!O.c)return O.toString();if(pe=O.c[0],X=O.e,K==null)z=_(O.c),z=se==1||se==2&&(X<=v||X>=b)?A(z,X):N(z,X,"0");else if(O=ie(new J(O),K,ee),ge=O.e,z=_(O.c),M=z.length,se==1||se==2&&(K<=ge||ge<=v)){for(;MM){if(--K>0)for(z+=".";K--;z+="0");}else if(K+=ge-M,K>0)for(ge+1==M&&(z+=".");K--;z+="0");return O.s<0&&pe?"-"+z:z}function ae(O,K){for(var ee,se=1,pe=new J(O[0]);se=10;pe/=10,se++);return(ee=se+ee*c-1)>T?O.c=O.e=null:ee=10;M/=10,pe++);if(ge=K-pe,ge<0)ge+=c,X=K,z=de[Z=0],Q=z/we[pe-X-1]%10|0;else if(Z=o((ge+1)/c),Z>=de.length)if(se){for(;de.length<=Z;de.push(0));z=Q=0,pe=1,ge%=c,X=ge-c+1}else break e;else{for(z=M=de[Z],pe=1;M>=10;M/=10,pe++);ge%=c,X=ge-c+pe,Q=X<0?0:z/we[pe-X-1]%10|0}if(se=se||K<0||de[Z+1]!=null||(X<0?z:z%we[pe-X-1]),se=ee<4?(Q||se)&&(ee==0||ee==(O.s<0?3:2)):Q>5||Q==5&&(ee==4||se||ee==6&&(ge>0?X>0?z/we[pe-X]:0:de[Z-1])%10&1||ee==(O.s<0?8:7)),K<1||!de[0])return de.length=0,se?(K-=O.e+1,de[0]=we[(c-K%c)%c],O.e=-K||0):de[0]=O.e=0,O;if(ge==0?(de.length=Z,M=1,Z--):(de.length=Z+1,M=we[c-ge],de[Z]=X>0?i(z/we[pe-X]%we[X])*M:0),se)for(;;)if(Z==0){for(ge=1,X=de[0];X>=10;X/=10,ge++);for(X=de[0]+=M,M=1;X>=10;X/=10,M++);ge!=M&&(O.e++,de[0]==l&&(de[0]=1));break}else{if(de[Z]+=M,de[Z]!=l)break;de[Z--]=0,M=1}for(ge=de.length;de[--ge]===0;de.pop());}O.e>T?O.c=O.e=null:O.e=b?A(K,ee):N(K,ee,"0"),O.s<0?"-"+K:K)}return G.absoluteValue=G.abs=function(){var O=new J(this);return O.s<0&&(O.s=1),O},G.comparedTo=function(O,K){return w(this,new J(O,K))},G.decimalPlaces=G.dp=function(O,K){var ee,se,pe,ge=this;if(O!=null)return g(O,0,p),K==null?K=C:g(K,0,8),ie(new J(ge),O+ge.e+1,K);if(!(ee=ge.c))return null;if(se=((pe=ee.length-1)-m(this.e/c))*c,pe=ee[pe])for(;pe%10==0;pe/=10,se--);return se<0&&(se=0),se},G.dividedBy=G.div=function(O,K){return y(this,new J(O,K),S,C)},G.dividedToIntegerBy=G.idiv=function(O,K){return y(this,new J(O,K),0,1)},G.exponentiatedBy=G.pow=function(O,K){var ee,se,pe,ge,X,M,z,Z,Q,de=this;if(O=new J(O),O.c&&!O.isInteger())throw Error(a+"Exponent not an integer: "+ue(O));if(K!=null&&(K=new J(K)),M=O.e>14,!de.c||!de.c[0]||de.c[0]==1&&!de.e&&de.c.length==1||!O.c||!O.c[0])return Q=new J(Math.pow(+ue(de),M?O.s*(2-E(O)):+ue(O))),K?Q.mod(K):Q;if(z=O.s<0,K){if(K.c?!K.c[0]:!K.s)return new J(NaN);se=!z&&de.isInteger()&&K.isInteger(),se&&(de=de.mod(K))}else{if(O.e>9&&(de.e>0||de.e<-1||(de.e==0?de.c[0]>1||M&&de.c[1]>=24e7:de.c[0]<8e13||M&&de.c[0]<=9999975e7)))return ge=de.s<0&&E(O)?-0:0,de.e>-1&&(ge=1/ge),new J(z?1/ge:ge);P&&(ge=o(P/c+2))}for(M?(ee=new J(.5),z&&(O.s=1),Z=E(O)):(pe=Math.abs(+ue(O)),Z=pe%2),Q=new J(V);;){if(Z){if(Q=Q.times(de),!Q.c)break;ge?Q.c.length>ge&&(Q.c.length=ge):se&&(Q=Q.mod(K))}if(pe){if(pe=i(pe/2),pe===0)break;Z=pe%2}else if(O=O.times(ee),ie(O,O.e+1,1),O.e>14)Z=E(O);else{if(pe=+ue(O),pe===0)break;Z=pe%2}de=de.times(de),ge?de.c&&de.c.length>ge&&(de.c.length=ge):se&&(de=de.mod(K))}return se?Q:(z&&(Q=V.div(Q)),K?Q.mod(K):ge?ie(Q,P,C,X):Q)},G.integerValue=function(O){var K=new J(this);return O==null?O=C:g(O,0,8),ie(K,K.e+1,O)},G.isEqualTo=G.eq=function(O,K){return w(this,new J(O,K))===0},G.isFinite=function(){return!!this.c},G.isGreaterThan=G.gt=function(O,K){return w(this,new J(O,K))>0},G.isGreaterThanOrEqualTo=G.gte=function(O,K){return(K=w(this,new J(O,K)))===1||K===0},G.isInteger=function(){return!!this.c&&m(this.e/c)>this.c.length-2},G.isLessThan=G.lt=function(O,K){return w(this,new J(O,K))<0},G.isLessThanOrEqualTo=G.lte=function(O,K){return(K=w(this,new J(O,K)))===-1||K===0},G.isNaN=function(){return!this.s},G.isNegative=function(){return this.s<0},G.isPositive=function(){return this.s>0},G.isZero=function(){return!!this.c&&this.c[0]==0},G.minus=function(O,K){var ee,se,pe,ge,X=this,M=X.s;if(O=new J(O,K),K=O.s,!M||!K)return new J(NaN);if(M!=K)return O.s=-K,X.plus(O);var z=X.e/c,Z=O.e/c,Q=X.c,de=O.c;if(!z||!Z){if(!Q||!de)return Q?(O.s=-K,O):new J(de?X:NaN);if(!Q[0]||!de[0])return de[0]?(O.s=-K,O):new J(Q[0]?X:C==3?-0:0)}if(z=m(z),Z=m(Z),Q=Q.slice(),M=z-Z){for((ge=M<0)?(M=-M,pe=Q):(Z=z,pe=de),pe.reverse(),K=M;K--;pe.push(0));pe.reverse()}else for(se=(ge=(M=Q.length)<(K=de.length))?M:K,M=K=0;K0)for(;K--;Q[ee++]=0);for(K=l-1;se>M;){if(Q[--se]=0;){for(ee=0,we=I[pe]%Te,Se=I[pe]/Te|0,X=z,ge=pe+X;ge>pe;)Z=x[--X]%Te,Q=x[X]/Te|0,M=Se*Z+Q*we,Z=we*Z+M%Te*Te+Ee[ge]+ee,ee=(Z/ke|0)+(M/Te|0)+Se*Q,Ee[ge--]=Z%ke;Ee[ge]=ee}return ee?++se:Ee.splice(0,1),ce(O,Ee,se)},G.negated=function(){var O=new J(this);return O.s=-O.s||null,O},G.plus=function(O,K){var ee,se=this,pe=se.s;if(O=new J(O,K),K=O.s,!pe||!K)return new J(NaN);if(pe!=K)return O.s=-K,se.minus(O);var ge=se.e/c,X=O.e/c,M=se.c,z=O.c;if(!ge||!X){if(!M||!z)return new J(pe/0);if(!M[0]||!z[0])return z[0]?O:new J(M[0]?se:pe*0)}if(ge=m(ge),X=m(X),M=M.slice(),pe=ge-X){for(pe>0?(X=ge,ee=z):(pe=-pe,ee=M),ee.reverse();pe--;ee.push(0));ee.reverse()}for(pe=M.length,K=z.length,pe-K<0&&(ee=z,z=M,M=ee,K=pe),pe=0;K;)pe=(M[--K]=M[K]+z[K]+pe)/l|0,M[K]=l===M[K]?0:M[K]%l;return pe&&(M=[pe].concat(M),++X),ce(O,M,X)},G.precision=G.sd=function(O,K){var ee,se,pe,ge=this;if(O!=null&&O!==!!O)return g(O,1,p),K==null?K=C:g(K,0,8),ie(new J(ge),O,K);if(!(ee=ge.c))return null;if(pe=ee.length-1,se=pe*c+1,pe=ee[pe]){for(;pe%10==0;pe/=10,se--);for(pe=ee[0];pe>=10;pe/=10,se++);}return O&&ge.e+1>se&&(se=ge.e+1),se},G.shiftedBy=function(O){return g(O,-u,u),this.times("1e"+O)},G.squareRoot=G.sqrt=function(){var O,K,ee,se,pe,ge=this,X=ge.c,M=ge.s,z=ge.e,Z=S+4,Q=new J("0.5");if(M!==1||!X||!X[0])return new J(!M||M<0&&(!X||X[0])?NaN:X?ge:1/0);if(M=Math.sqrt(+ue(ge)),M==0||M==1/0?(K=_(X),(K.length+z)%2==0&&(K+="0"),M=Math.sqrt(+K),z=m((z+1)/2)-(z<0||z%2),M==1/0?K="5e"+z:(K=M.toExponential(),K=K.slice(0,K.indexOf("e")+1)+z),ee=new J(K)):ee=new J(M+""),ee.c[0]){for(z=ee.e,M=z+Z,M<3&&(M=0);;)if(pe=ee,ee=Q.times(pe.plus(y(ge,pe,Z,1))),_(pe.c).slice(0,M)===(K=_(ee.c)).slice(0,M))if(ee.e0&&Ee>0){for(ge=Ee%M||M,Q=Se.substr(0,ge);ge0&&(Q+=Z+Se.slice(ge)),we&&(Q="-"+Q)}se=de?Q+(ee.decimalSeparator||"")+((z=+ee.fractionGroupSize)?de.replace(new RegExp("\\d{"+z+"}\\B","g"),"$&"+(ee.fractionGroupSeparator||"")):de):Q}return(ee.prefix||"")+se+(ee.suffix||"")},G.toFraction=function(O){var K,ee,se,pe,ge,X,M,z,Z,Q,de,we,Se=this,Ee=Se.c;if(O!=null&&(M=new J(O),!M.isInteger()&&(M.c||M.s!==1)||M.lt(V)))throw Error(a+"Argument "+(M.isInteger()?"out of range: ":"not an integer: ")+ue(M));if(!Ee)return new J(Se);for(K=new J(V),Z=ee=new J(V),se=z=new J(V),we=_(Ee),ge=K.e=we.length-Se.e-1,K.c[0]=f[(X=ge%c)<0?c+X:X],O=!O||M.comparedTo(K)>0?ge>0?K:Z:M,X=T,T=1/0,M=new J(we),z.c[0]=0;Q=y(M,K,0,1),pe=ee.plus(Q.times(se)),pe.comparedTo(O)!=1;)ee=se,se=pe,Z=z.plus(Q.times(pe=Z)),z=pe,K=M.minus(Q.times(pe=K)),M=pe;return pe=y(O.minus(ee),se,0,1),z=z.plus(pe.times(Z)),ee=ee.plus(pe.times(se)),z.s=Z.s=Se.s,ge=ge*2,de=y(Z,se,ge,C).minus(Se).abs().comparedTo(y(z,ee,ge,C).minus(Se).abs())<1?[Z,se]:[z,ee],T=X,de},G.toNumber=function(){return+ue(this)},G.toPrecision=function(O,K){return O!=null&&g(O,1,p),te(this,O,K,2)},G.toString=function(O){var K,ee=this,se=ee.s,pe=ee.e;return pe===null?se?(K="Infinity",se<0&&(K="-"+K)):K="NaN":(O==null?K=pe<=v||pe>=b?A(_(ee.c),pe):N(_(ee.c),pe,"0"):O===10&&q?(ee=ie(new J(ee),S+pe+1,C),K=N(_(ee.c),ee.e,"0")):(g(O,2,$.length,"Base"),K=U(N(_(ee.c),pe,"0"),10,O,se,!0)),se<0&&ee.c[0]&&(K="-"+K)),K},G.valueOf=G.toJSON=function(){return ue(this)},G._isBigNumber=!0,D!=null&&J.set(D),J}function m(D){var y=D|0;return D>0||D===y?y:y-1}function _(D){for(var y,U,L=1,G=D.length,V=D[0]+"";Lb^U?1:-1;for(C=(v=G.length)<(b=V.length)?v:b,S=0;SV[S]^U?1:-1;return v==b?0:v>b^U?1:-1}function g(D,y,U,L){if(DU||D!==i(D))throw Error(a+(L||"Argument")+(typeof D=="number"?DU?" out of range: ":" not an integer: ":" not a primitive number: ")+String(D))}function E(D){var y=D.c.length-1;return m(D.e/c)==y&&D.c[y]%2!=0}function A(D,y){return(D.length>1?D.charAt(0)+"."+D.slice(1):D)+(y<0?"e":"e+")+y}function N(D,y,U){var L,G;if(y<0){for(G=U+".";++y;G+=U);D=G+D}else if(L=D.length,++y>L){for(G=U,y-=L;--y;G+=U);D+=G}else y!isNaN(parseFloat(_))&&isFinite(_);e.isNumeric=n,e.prettifyNumberConfig={ALPH:{minDecimalPlaces:2,maxDecimalPlaces:10,minDecimalSignificantDigits:2,decimalPlacesWhenZero:2},TOKEN:{minDecimalPlaces:4,maxDecimalPlaces:16,minDecimalSignificantDigits:2,decimalPlacesWhenZero:1},Exact:{minDecimalPlaces:18,maxDecimalPlaces:18,minDecimalSignificantDigits:0,decimalPlacesWhenZero:0}};function o(_){return s(_,18,e.prettifyNumberConfig.ALPH)}e.prettifyAttoAlphAmount=o;function i(_,w){return s(_,w,e.prettifyNumberConfig.TOKEN)}e.prettifyTokenAmount=i;function a(_,w){return s(_,w,e.prettifyNumberConfig.Exact)}e.prettifyExactAmount=a;function s(_,w,g){const E=f(h(_),w);if(!(0,e.isNumeric)(E))return;const A=new r.default(E);let N;if(A.gte(1))N=A.toFormat(g.minDecimalPlaces);else{const L=A.toFormat(g.maxDecimalPlaces).split(".")[1],G=L==null?void 0:L.match(/^0+/),V=G&&G.length?G[0].length:0,S=Math.max(V+g.minDecimalSignificantDigits,g.minDecimalPlaces);N=A.toFormat(S)}let D=N.replace(/0+$/,"");const y=1+N.indexOf(".")+g.decimalPlacesWhenZero;return D.lengthh(v,S)),type:"Array"}}e.toApiArray=p;function h(L,G){return G==="Bool"?{value:s(L),type:G}:G==="U256"||G==="I256"?{value:l(L),type:G}:G==="ByteVec"?{value:f(L),type:G}:G==="Address"?{value:d(L),type:G}:p(G,L)}e.toApiVal=h;function m(L,G,V,S=!1){if(L.length===0)throw new Error("Not enough Vals");const C=L[`${G}`];if(V==="Bool"&&C.type===V)return[C.value,G+1];if((V==="U256"||V==="I256")&&C.type===V)return[u(C.value),G+1];if((V==="ByteVec"||V==="Address")&&(C.type===V||S))return[C.value,G+1];{const[v,b]=E(V),B=b.reduce((H,P)=>H*P),T=G+B,j=L.slice(G,T);if(j.length==B&&j.every(H=>H.type===v)){const H=j.map(P=>g(P,v));return[N(H,b),T]}else throw new Error(`Invalid array Val type: ${j}, ${V}`)}}function _(L,G,V,S=!1){let C=0;const v={};return V.forEach((b,B)=>{const T=G[`${B}`],[j,H]=m(L,C,b,S);C=H,v[`${T}`]=j}),v}e.fromApiVals=_;function w(L,G){let V=0;const S=[];for(const C of G){const[v,b]=m(L,V,C);S.push(v),V=b}return S}e.fromApiArray=w;function g(L,G){if(L.type==="Bool"&&L.type===G)return L.value;if((L.type==="U256"||L.type==="I256")&&L.type===G)return u(L.value);if((L.type==="ByteVec"||L.type==="Address")&&L.type===G)return L.value;throw new Error(`Invalid node.Val type: ${L}`)}e.fromApiVal=g;function E(L){const G=L.lastIndexOf(";");if(G===-1)throw new Error(`Invalid Val type: ${L}`);const V=L.slice(1,G),S=parseInt(L.slice(G+1,-1));if(V[0]=="["){const[C,v]=E(V);return[C,(v.unshift(S),v)]}else return[V,[S]]}function A(L){if(L==="U256"||L==="I256")return 0n;if(L==="Bool")return!1;if(L==="ByteVec")return"";if(L==="Address")return t.ZERO_ADDRESS;const[G,V]=E(L),S=A(G);return V.reduceRight((C,v)=>Array(v).fill(C),S)}e.getDefaultValue=A;function N(L,G){if(G.length==1)return L;{const V=[],S=L.length/G[0],C=G.slice(1);for(let v=0;vV*S)}e.typeLength=D;function y(L,G){for(const[V,S]of Object.entries(L))for(const C of Object.keys(S))S[`${C}`]=async(...v)=>G({path:V,method:C,params:v})}e.forwardRequests=y;async function U(L,G){const V=L[`${G.path}`][`${G.method}`];return V(...G.params)}e.request=U,function(L){L.FungibleToken="0001",L.NFTCollection="0002",L.NFT="0003",L.NFTCollectionWithRoyalty="000201"}(e.StdInterfaceIds||(e.StdInterfaceIds={}))}(Kw)),Kw}var W8={};(function(){(function(e){(function(t){var r={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};function n(L){return L&&DataView.prototype.isPrototypeOf(L)}if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(L){return L&&o.indexOf(Object.prototype.toString.call(L))>-1};function a(L){if(typeof L!="string"&&(L=String(L)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(L))throw new TypeError("Invalid character in header field name");return L.toLowerCase()}function s(L){return typeof L!="string"&&(L=String(L)),L}function l(L){var G={next:function(){var V=L.shift();return{done:V===void 0,value:V}}};return r.iterable&&(G[Symbol.iterator]=function(){return G}),G}function c(L){this.map={},L instanceof c?L.forEach(function(G,V){this.append(V,G)},this):Array.isArray(L)?L.forEach(function(G){this.append(G[0],G[1])},this):L&&Object.getOwnPropertyNames(L).forEach(function(G){this.append(G,L[G])},this)}c.prototype.append=function(L,G){L=a(L),G=s(G);var V=this.map[L];this.map[L]=V?V+", "+G:G},c.prototype.delete=function(L){delete this.map[a(L)]},c.prototype.get=function(L){return L=a(L),this.has(L)?this.map[L]:null},c.prototype.has=function(L){return this.map.hasOwnProperty(a(L))},c.prototype.set=function(L,G){this.map[a(L)]=s(G)},c.prototype.forEach=function(L,G){for(var V in this.map)this.map.hasOwnProperty(V)&&L.call(G,this.map[V],V,this)},c.prototype.keys=function(){var L=[];return this.forEach(function(G,V){L.push(V)}),l(L)},c.prototype.values=function(){var L=[];return this.forEach(function(G){L.push(G)}),l(L)},c.prototype.entries=function(){var L=[];return this.forEach(function(G,V){L.push([V,G])}),l(L)},r.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function u(L){if(L.bodyUsed)return Promise.reject(new TypeError("Already read"));L.bodyUsed=!0}function f(L){return new Promise(function(G,V){L.onload=function(){G(L.result)},L.onerror=function(){V(L.error)}})}function d(L){var G=new FileReader,V=f(G);return G.readAsArrayBuffer(L),V}function p(L){var G=new FileReader,V=f(G);return G.readAsText(L),V}function h(L){for(var G=new Uint8Array(L),V=new Array(G.length),S=0;S-1?G:L}function E(L,G){G=G||{};var V=G.body;if(L instanceof E){if(L.bodyUsed)throw new TypeError("Already read");this.url=L.url,this.credentials=L.credentials,G.headers||(this.headers=new c(L.headers)),this.method=L.method,this.mode=L.mode,this.signal=L.signal,!V&&L._bodyInit!=null&&(V=L._bodyInit,L.bodyUsed=!0)}else this.url=String(L);if(this.credentials=G.credentials||this.credentials||"same-origin",(G.headers||!this.headers)&&(this.headers=new c(G.headers)),this.method=g(G.method||this.method||"GET"),this.mode=G.mode||this.mode||null,this.signal=G.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&V)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(V)}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function A(L){var G=new FormData;return L.trim().split("&").forEach(function(V){if(V){var S=V.split("="),C=S.shift().replace(/\+/g," "),v=S.join("=").replace(/\+/g," ");G.append(decodeURIComponent(C),decodeURIComponent(v))}}),G}function N(L){var G=new c,V=L.replace(/\r?\n[\t ]+/g," ");return V.split(/\r?\n/).forEach(function(S){var C=S.split(":"),v=C.shift().trim();if(v){var b=C.join(":").trim();G.append(v,b)}}),G}_.call(E.prototype);function D(L,G){G||(G={}),this.type="default",this.status=G.status===void 0?200:G.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in G?G.statusText:"OK",this.headers=new c(G.headers),this.url=G.url||"",this._initBody(L)}_.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},D.error=function(){var L=new D(null,{status:0,statusText:""});return L.type="error",L};var y=[301,302,303,307,308];D.redirect=function(L,G){if(y.indexOf(G)===-1)throw new RangeError("Invalid status code");return new D(null,{status:G,headers:{location:L}})},t.DOMException=e.DOMException;try{new t.DOMException}catch{t.DOMException=function(G,V){this.message=G,this.name=V;var S=Error(G);this.stack=S.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function U(L,G){return new Promise(function(V,S){var C=new E(L,G);if(C.signal&&C.signal.aborted)return S(new t.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function b(){v.abort()}v.onload=function(){var B={status:v.status,statusText:v.statusText,headers:N(v.getAllResponseHeaders()||"")};B.url="responseURL"in v?v.responseURL:B.headers.get("X-Request-URL");var T="response"in v?v.response:v.responseText;V(new D(T,B))},v.onerror=function(){S(new TypeError("Network request failed"))},v.ontimeout=function(){S(new TypeError("Network request failed"))},v.onabort=function(){S(new t.DOMException("Aborted","AbortError"))},v.open(C.method,C.url,!0),C.credentials==="include"?v.withCredentials=!0:C.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&r.blob&&(v.responseType="blob"),C.headers.forEach(function(B,T){v.setRequestHeader(T,B)}),C.signal&&(C.signal.addEventListener("abort",b),v.onreadystatechange=function(){v.readyState===4&&C.signal.removeEventListener("abort",b)}),v.send(typeof C._bodyInit>"u"?null:C._bodyInit)})}return U.polyfill=!0,e.fetch||(e.fetch=U,e.Headers=c,e.Request=E,e.Response=D),t.Headers=c,t.Request=E,t.Response=D,t.fetch=U,Object.defineProperty(t,"__esModule",{value:!0}),t})({})})(typeof self<"u"?self:Le)})();var Vs={};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.isBalanceEqual=Vs.convertHttpResponse=void 0;function jke(e){if(e.error){const t=e.error.detail??`status code: ${e.status}`;throw new Error(`[API Error] - ${t}`)}else return e.data}Vs.convertHttpResponse=jke;function Lke(e,t){const r=(o,i)=>{const a=(o==null?void 0:o.length)??0,s=(i==null?void 0:i.length)??0;if(a!==s)return!1;if(a===0)return!0;const l=i.map(c=>({...c,used:!1}));return o.every(c=>{const u=l.find(f=>!f.used&&c.id===f.id&&c.amount===f.amount);return u===void 0?!1:(u.used=!0,!0)})},n=e.balance===t.balance&&e.lockedBalance===t.lockedBalance;return e.utxoNum===t.utxoNum&&n&&r(e.tokenBalances,t.tokenBalances)&&r(e.lockedTokenBalances,t.lockedTokenBalances)}Vs.isBalanceEqual=Lke;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=void 0;const t=Vs;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="../",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...m})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},w=this.mergeRequestParams(m,_),g=f&&this.toQueryString(f),E=this.contentFormatters[u||r.Json],A=d||w.format;return this.customFetch(`${p||this.baseUrl||""}${c}${g?`?${g}`:""}`,{...w,headers:{...w.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):w.signal,body:typeof s>"u"||s===null?null:E(s)}).then(async N=>{const D=N;D.data=null,D.error=null;const y=A?await N[A]().then(U=>(D.ok?D.data=U:D.error=U,D)).catch(U=>(D.error=U,D)):D;return h&&this.abortControllers.delete(h),y})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.wallets={getWallets:(a={})=>this.request({path:"/wallets",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putWallets:(a,s={})=>this.request({path:"/wallets",method:"PUT",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postWallets:(a,s={})=>this.request({path:"/wallets",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletName:(a,s={})=>this.request({path:`/wallets/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),deleteWalletsWalletName:(a,s,l={})=>this.request({path:`/wallets/${a}`,method:"DELETE",body:s,type:r.Json,...l}).then(t.convertHttpResponse),postWalletsWalletNameLock:(a,s={})=>this.request({path:`/wallets/${a}/lock`,method:"POST",...s}).then(t.convertHttpResponse),postWalletsWalletNameUnlock:(a,s,l={})=>this.request({path:`/wallets/${a}/unlock`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse),getWalletsWalletNameBalances:(a,s={})=>this.request({path:`/wallets/${a}/balances`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameRevealMnemonic:(a,s,l={})=>this.request({path:`/wallets/${a}/reveal-mnemonic`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameTransfer:(a,s,l={})=>this.request({path:`/wallets/${a}/transfer`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-active-address`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSweepAllAddresses:(a,s,l={})=>this.request({path:`/wallets/${a}/sweep-all-addresses`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameSign:(a,s,l={})=>this.request({path:`/wallets/${a}/sign`,method:"POST",body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameAddresses:(a,s={})=>this.request({path:`/wallets/${a}/addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getWalletsWalletNameAddressesAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/addresses/${s}`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getWalletsWalletNameMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/miner-addresses`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/derive-next-address`,method:"POST",query:s,format:"json",...l}).then(t.convertHttpResponse),postWalletsWalletNameDeriveNextMinerAddresses:(a,s={})=>this.request({path:`/wallets/${a}/derive-next-miner-addresses`,method:"POST",format:"json",...s}).then(t.convertHttpResponse),postWalletsWalletNameChangeActiveAddress:(a,s,l={})=>this.request({path:`/wallets/${a}/change-active-address`,method:"POST",body:s,type:r.Json,...l}).then(t.convertHttpResponse)},this.infos={getInfosNode:(a={})=>this.request({path:"/infos/node",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosVersion:(a={})=>this.request({path:"/infos/version",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosChainParams:(a={})=>this.request({path:"/infos/chain-params",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSelfClique:(a={})=>this.request({path:"/infos/self-clique",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosInterCliquePeerInfo:(a={})=>this.request({path:"/infos/inter-clique-peer-info",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosDiscoveredNeighbors:(a={})=>this.request({path:"/infos/discovered-neighbors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosMisbehaviors:(a={})=>this.request({path:"/infos/misbehaviors",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosMisbehaviors:(a,s={})=>this.request({path:"/infos/misbehaviors",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosUnreachable:(a={})=>this.request({path:"/infos/unreachable",method:"GET",format:"json",...a}).then(t.convertHttpResponse),postInfosDiscovery:(a,s={})=>this.request({path:"/infos/discovery",method:"POST",body:a,type:r.Json,...s}).then(t.convertHttpResponse),getInfosHistoryHashrate:(a,s={})=>this.request({path:"/infos/history-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentHashrate:(a,s={})=>this.request({path:"/infos/current-hashrate",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosCurrentDifficulty:(a={})=>this.request({path:"/infos/current-difficulty",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.blockflow={getBlockflowBlocks:(a,s={})=>this.request({path:"/blockflow/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEvents:(a,s={})=>this.request({path:"/blockflow/blocks-with-events",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowBlocksWithEventsBlockHash:(a,s={})=>this.request({path:`/blockflow/blocks-with-events/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlockflowIsBlockInMainChain:(a,s={})=>this.request({path:"/blockflow/is-block-in-main-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHashes:(a,s={})=>this.request({path:"/blockflow/hashes",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowChainInfo:(a,s={})=>this.request({path:"/blockflow/chain-info",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlockflowHeadersBlockHash:(a,s={})=>this.request({path:`/blockflow/headers/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddressBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressUtxos:(a,s={})=>this.request({path:`/addresses/${a}/utxos`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressGroup:(a,s={})=>this.request({path:`/addresses/${a}/group`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.transactions={postTransactionsBuild:(a,s={})=>this.request({path:"/transactions/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSweepAddressBuild:(a,s={})=>this.request({path:"/transactions/sweep-address/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsSubmit:(a,s={})=>this.request({path:"/transactions/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postTransactionsDecodeUnsignedTx:(a,s={})=>this.request({path:"/transactions/decode-unsigned-tx",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getTransactionsDetailsTxid:(a,s,l={})=>this.request({path:`/transactions/details/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getTransactionsStatus:(a,s={})=>this.request({path:"/transactions/status",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"GET",format:"json",...a}).then(t.convertHttpResponse),deleteMempoolTransactions:(a={})=>this.request({path:"/mempool/transactions",method:"DELETE",...a}).then(t.convertHttpResponse),putMempoolTransactionsRebroadcast:(a,s={})=>this.request({path:"/mempool/transactions/rebroadcast",method:"PUT",query:a,...s}).then(t.convertHttpResponse),putMempoolTransactionsValidate:(a={})=>this.request({path:"/mempool/transactions/validate",method:"PUT",...a}).then(t.convertHttpResponse)},this.contracts={postContractsCompileScript:(a,s={})=>this.request({path:"/contracts/compile-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxExecuteScript:(a,s={})=>this.request({path:"/contracts/unsigned-tx/execute-script",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileContract:(a,s={})=>this.request({path:"/contracts/compile-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCompileProject:(a,s={})=>this.request({path:"/contracts/compile-project",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsUnsignedTxDeployContract:(a,s={})=>this.request({path:"/contracts/unsigned-tx/deploy-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getContractsAddressState:(a,s,l={})=>this.request({path:`/contracts/${a}/state`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postContractsTestContract:(a,s={})=>this.request({path:"/contracts/test-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsCallContract:(a,s={})=>this.request({path:"/contracts/call-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postContractsMulticallContract:(a,s={})=>this.request({path:"/contracts/multicall-contract",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.multisig={postMultisigAddress:(a,s={})=>this.request({path:"/multisig/address",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigBuild:(a,s={})=>this.request({path:"/multisig/build",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSweep:(a,s={})=>this.request({path:"/multisig/sweep",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),postMultisigSubmit:(a,s={})=>this.request({path:"/multisig/submit",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse)},this.utils={postUtilsVerifySignature:(a,s={})=>this.request({path:"/utils/verify-signature",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),putUtilsCheckHashIndexing:(a={})=>this.request({path:"/utils/check-hash-indexing",method:"PUT",...a}).then(t.convertHttpResponse)},this.miners={postMinersCpuMining:(a,s={})=>this.request({path:"/miners/cpu-mining",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),postMinersCpuMiningMineOneBlock:(a,s={})=>this.request({path:"/miners/cpu-mining/mine-one-block",method:"POST",query:a,format:"json",...s}).then(t.convertHttpResponse),getMinersAddresses:(a={})=>this.request({path:"/miners/addresses",method:"GET",format:"json",...a}).then(t.convertHttpResponse),putMinersAddresses:(a,s={})=>this.request({path:"/miners/addresses",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)},this.events={getEventsContractContractaddress:(a,s,l={})=>this.request({path:`/events/contract/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsContractContractaddressCurrentCount:(a,s={})=>this.request({path:`/events/contract/${a}/current-count`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getEventsTxIdTxid:(a,s,l={})=>this.request({path:`/events/tx-id/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getEventsBlockHashBlockhash:(a,s,l={})=>this.request({path:`/events/block-hash/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)}}}e.Api=o})(W8);var a5={},Vt={},o$;function xG(){if(o$)return Vt;o$=1;var e;Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.buildDebugBytecode=Vt.encodeContractField=Vt.buildContractByteCode=Vt.buildScriptByteCode=Vt.encodeScriptField=Vt.encodeScriptFieldAsString=Vt.encodeAddress=Vt.encodeByteVec=Vt.encodeU256=Vt.encodeI256=Vt.encodeBool=void 0;const t=zs,r=wf(),n=Xn(),o=BigInt(0);class i{}i.oneByteBound=BigInt(64),i.twoByteBound=i.oneByteBound<=o?f(T):d(T)}Vt.encodeI256=c;function u(T,j,H){let P=T.toString(16);P.length%2===1?P="0"+P:j&&P[0]>="8"&&(P="00"+P);const F=P.length/2,$=new Uint8Array(F+1);for(let J=0;J>8)+s.twoBytePrefix,j&255])}else if(T>24)+s.fourBytePrefix,j>>16&255,j>>8&255,j&255])}else{if(T=-a.oneByteBound){const j=Number(T);return new Uint8Array([(j^s.oneByteNegPrefix)&255])}else if(T>=-a.twoByteBound){const j=Number(T);return new Uint8Array([(j>>8^s.twoByteNegPrefix)&255,j&255])}else if(T>=-a.fourByteBound){const j=Number(T);return new Uint8Array([(j>>24^s.fourByteNegPrefix)&255,j>>16&255,j>>8&255,j&255])}else{if(T>=a.i256LowerBound)return u(~T,!0,!0);throw Error(`Too small number for i256: ${T}`)}}function p(T){if(T>8&255)+s.twoBytePrefix,j&255])}else if(T>24&255)+s.fourBytePrefix,j>>16&255,j>>8&255,j&255])}else{if(T{const $=H.names[`${F}`],q=H.types[`${F}`];if($ in j){const J=j[`${$}`];return U($,()=>A(q,J))}else throw new Error(`The value of field ${$} is not provided`)})}Vt.buildScriptByteCode=y;function U(T,j){try{return j()}catch(H){throw H instanceof Error?new Error(`Invalid ${T}, error: ${H.message}`):H}}function L(T,j,H){const F=j.isMutable.map((q,J)=>J).filter(q=>j.isMutable[`${q}`]===H).flatMap(q=>{const J=j.names[`${q}`],te=j.types[`${q}`];if(J in T){const ae=T[`${J}`];return U(J,()=>b(te,ae))}else throw new Error(`The value of field ${J} is not provided`)});return t.Buffer.from(c(BigInt(F.length))).toString("hex")+F.map(q=>t.Buffer.from(q).toString("hex")).join("")}function G(T,j,H){const P=L(j,H,!1),F=L(j,H,!0);return T+P+F}Vt.buildContractByteCode=G;var V;(function(T){T[T.Bool=0]="Bool",T[T.I256=1]="I256",T[T.U256=2]="U256",T[T.ByteVec=3]="ByteVec",T[T.Address=4]="Address"})(V||(V={}));function S(T){return new Uint8Array([V.I256,...c(T)])}function C(T){return new Uint8Array([V.U256,...p(T)])}function v(T,j){if(!Array.isArray(j))throw new Error(`Expected array, got ${j}`);const H=T.lastIndexOf(";");if(H==-1)throw new Error(`Invalid Array type: ${T}`);const P=T.slice(1,H),F=parseInt(T.slice(H+1,-1));if(j.length!=F)throw new Error(`Invalid val dimension: ${j}`);return j.flatMap($=>b(P,$))}function b(T,j){switch(T){case"Bool":const H=(0,r.toApiBoolean)(j)?1:0;return[new Uint8Array([V.Bool,H])];case"I256":const P=(0,r.toApiNumber256)(j);return[S(BigInt(P))];case"U256":const F=(0,r.toApiNumber256)(j);return[C(BigInt(F))];case"ByteVec":const $=(0,r.toApiByteVec)(j);return[new Uint8Array([V.ByteVec,...h($)])];case"Address":const q=(0,r.toApiAddress)(j);return[new Uint8Array([V.Address,...m(q)])];default:return v(T,j)}}Vt.encodeContractField=b;function B(T,j){if(j==="")return T;const H=/[=+-][0-9a-f]*/g;let P="",F=0;for(const $ of j.matchAll(H)){const q=$[0],J=q[0];if(J==="="){const te=parseInt(q.substring(1));P=P+T.slice(F,F+te),F=F+te}else if(J==="+")P=P+q.substring(1);else{const te=parseInt(q.substring(1));F=F+te}}return P}return Vt.buildDebugBytecode=B,Vt}var s5={},Do={},i$;function _G(){if(i$)return Do;i$=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.getCurrentExplorerProvider=Do.setCurrentExplorerProvider=Do.getCurrentNodeProvider=Do.setCurrentNodeProvider=void 0;const e=wf();let t;function r(s,l,c){typeof s=="string"?t=new e.NodeProvider(s,l,c):t=s}Do.setCurrentNodeProvider=r;function n(){if(typeof t>"u")throw Error("No node provider is set.");return t}Do.getCurrentNodeProvider=n;let o;function i(s,l,c){typeof s=="string"?o=new e.ExplorerProvider(s,l,c):o=s}Do.setCurrentExplorerProvider=i;function a(){return o}return Do.getCurrentExplorerProvider=a,Do}var ml={},a$;function EG(){if(a$)return ml;a$=1,Object.defineProperty(ml,"__esModule",{value:!0}),ml.subscribeToEvents=ml.EventSubscription=void 0;const e=el(),t=Xn();class r extends t.Subscription{constructor(i,a,s){super(i),this.contractAddress=a,this.fromCount=typeof s>"u"?0:s,this.onEventCountChanged=i.onEventCountChanged,this.startPolling()}startPolling(){this.eventEmitter.on("tick",async()=>{await this.polling()}),this.eventEmitter.emit("tick")}currentEventCount(){return this.fromCount}async polling(){try{const i=await e.web3.getCurrentNodeProvider().events.getEventsContractContractaddress(this.contractAddress,{start:this.fromCount});if(this.cancelled)return;if(this.fromCount===i.nextStart){this.task=setTimeout(()=>this.eventEmitter.emit("tick"),this.pollingInterval);return}const a=i.events.map(s=>this.messageCallback(s));await Promise.all(a),this.fromCount=i.nextStart,this.onEventCountChanged!==void 0&&await this.onEventCountChanged(this.fromCount),await this.polling()}catch(i){await this.errorCallback(i,this)}}}ml.EventSubscription=r;function n(o,i,a){return new r(o,i,a)}return ml.subscribeToEvents=n,ml}var s$;function Uke(){return s$||(s$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(W,x,I,Y){Y===void 0&&(Y=I);var re=Object.getOwnPropertyDescriptor(x,I);(!re||("get"in re?!x.__esModule:re.writable||re.configurable))&&(re={enumerable:!0,get:function(){return x[I]}}),Object.defineProperty(W,Y,re)}:function(W,x,I,Y){Y===void 0&&(Y=I),W[Y]=x[I]}),r=Le&&Le.__setModuleDefault||(Object.create?function(W,x){Object.defineProperty(W,"default",{enumerable:!0,value:x})}:function(W,x){W.default=x}),n=Le&&Le.__importStar||function(W){if(W&&W.__esModule)return W;var x={};if(W!=null)for(var I in W)I!=="default"&&Object.prototype.hasOwnProperty.call(W,I)&&t(x,W,I);return r(x,W),x},o=Le&&Le.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.tryGetCallResult=e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx=e.getContractEventsCurrentCount=e.multicallMethods=e.callMethod=e.subscribeContractEvents=e.subscribeContractEvent=e.decodeEvent=e.subscribeContractDestroyedEvent=e.subscribeContractCreatedEvent=e.fetchContractState=e.ContractInstance=e.testMethod=e.addStdIdToFields=e.subscribeEventsFromContract=e.decodeContractDestroyedEvent=e.decodeContractCreatedEvent=e.DestroyContractEventAddress=e.CreateContractEventAddress=e.ExecutableScript=e.ContractFactory=e.randomTxId=e.toApiVals=e.Script=e.Contract=e.Artifact=e.Project=e.ProjectArtifact=e.DEFAULT_COMPILER_OPTIONS=e.DEFAULT_NODE_COMPILER_OPTIONS=e.StdIdFieldName=void 0;const i=zs,a=o(Xo),s=Xo,l=wf(),c=n(xG()),u=Xn(),f=_G(),d=n(Xo),p=EG(),h=M0,m=n(Hb),_=new u.WebCrypto;e.StdIdFieldName="__stdInterfaceId";var w;(function(W){W[W.Contract=0]="Contract",W[W.Script=1]="Script",W[W.AbstractContract=2]="AbstractContract",W[W.Interface=3]="Interface"})(w||(w={})),e.DEFAULT_NODE_COMPILER_OPTIONS={ignoreUnusedConstantsWarnings:!1,ignoreUnusedVariablesWarnings:!1,ignoreUnusedFieldsWarnings:!1,ignoreUnusedPrivateFunctionsWarnings:!1,ignoreUpdateFieldsCheckWarnings:!1,ignoreCheckExternalCallerWarnings:!1},e.DEFAULT_COMPILER_OPTIONS={errorOnWarnings:!0,...e.DEFAULT_NODE_COMPILER_OPTIONS};class g{constructor(x,I){this.matcher=new RegExp(x,"mg"),this.type=I}}function E(W){let x=0;for(let I=0;Ithis.compilerOptionsUsed[`${fe}`]===le)||I.length!==this.infos.size)return!0;for(const fe of I){const le=this.infos.get(fe.name);if(typeof le>"u"||le.sourceCodeHash!==fe.sourceCodeHash)return!0}return!1}static async from(x){const I=d.join(x,D.artifactFileName);if(a.default.existsSync(I))try{const Y=await s.promises.readFile(I),re=JSON.parse(Y.toString()),fe=re.fullNodeVersion,le=re.compilerOptionsUsed,xe=new Map(Object.entries(re.infos));return new D(fe,le,xe)}catch(Y){console.log(`Failed to load project artifact, error: ${Y}`);return}}}e.ProjectArtifact=D,D.artifactFileName=".project.json";class y{static buildProjectArtifact(x,I,Y,re,fe){const le=new Map;Y.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:_e.artifact.codeHashDebug,warnings:_e.warnings})}),re.forEach(_e=>{le.set(_e.artifact.name,{sourceFile:_e.sourceInfo.contractRelativePath,sourceCodeHash:_e.sourceInfo.sourceCodeHash,bytecodeDebugPatch:_e.artifact.bytecodeDebugPatch,codeHashDebug:"",warnings:_e.warnings})});const xe=Y.size+re.size;return I.slice(xe).forEach(_e=>{le.set(_e.name,{sourceFile:_e.contractRelativePath,sourceCodeHash:_e.sourceCodeHash,bytecodeDebugPatch:"",codeHashDebug:"",warnings:[]})}),new D(x,fe,le)}constructor(x,I,Y,re,fe,le,xe){this.contractsRootDir=x,this.artifactsRootDir=I,this.sourceInfos=Y,this.contracts=re,this.scripts=fe,this.projectArtifact=xe,le&&y.checkCompilerWarnings([...[...re.entries()].map(_e=>_e[1].warnings).flat(),...[...fe.entries()].map(_e=>_e[1].warnings).flat()],le)}static checkCompilerWarnings(x,I){if(x.length!==0){const Y=" - ",fe=`Compilation warnings: -`+(Y+x.join(` -`+Y))+` -`;if(I)throw new Error(fe);console.log(fe)}}static contract(x){const I=y.currentProject.contracts.get(x);if(typeof I>"u")throw new Error(`Contract "${x}" does not exist`);return I.artifact}static script(x){const I=y.currentProject.scripts.get(x);if(typeof I>"u")throw new Error(`Script "${x}" does not exist`);return I.artifact}async saveArtifactsToFile(x){const I=this.artifactsRootDir,Y=async function(re){const fe=re.sourceInfo.getArtifactPath(I),le=d.dirname(fe);return a.default.existsSync(le)||a.default.mkdirSync(le,{recursive:!0}),s.promises.writeFile(fe,re.artifact.toString())};this.contracts.forEach(re=>Y(re)),this.scripts.forEach(re=>Y(re)),await this.projectArtifact.saveToFile(x)}contractByCodeHash(x){const I=[...this.contracts.values()].find(Y=>Y.artifact.codeHash===x||Y.artifact.codeHashDebug==x);if(typeof I>"u")throw new Error(`Unknown code with code hash: ${x}`);return I.artifact}static async compile(x,I,Y,re,fe,le,xe,_e){const $e=Y.reduce((Qe,rt)=>(Qe.find(ve=>ve.sourceCodeHash===rt.sourceCodeHash)===void 0&&Qe.push(rt),Qe),[]).map(Qe=>Qe.sourceCode).join(` -`),Ne=await I.contracts.postContractsCompileProject({code:$e,compilerOptions:_e}),We=new Map,gt=new Map;Ne.contracts.forEach(Qe=>{const rt=Y.find(oe=>oe.type===w.Contract&&oe.name===Qe.name);if(rt===void 0)throw new Error(`SourceInfo does not exist for contract ${Qe.name}`);const ve=L.fromCompileResult(Qe);We.set(ve.name,new N(rt,ve,Qe.warnings))}),Ne.scripts.forEach(Qe=>{const rt=Y.find(oe=>oe.type===w.Script&&oe.name===Qe.name);if(rt===void 0)throw new Error(`SourceInfo does not exist for script ${Qe.name}`);const ve=G.fromCompileResult(Qe);gt.set(ve.name,new N(rt,ve,Qe.warnings))});const ft=y.buildProjectArtifact(x,Y,We,gt,_e),Ye=new y(fe,le,Y,We,gt,xe,ft);return await Ye.saveArtifactsToFile(re),Ye}static async loadArtifacts(x,I,Y,re,fe,le,xe,_e){try{const Ae=new Map,$e=new Map;for(const Ne of I){const We=Y.infos.get(Ne.name);if(typeof We>"u")throw Error(`Unable to find project info for ${Ne.name}, please rebuild the project`);const gt=We.warnings,ft=Ne.getArtifactPath(le);if(Ne.type===w.Contract){const Ye=await L.fromArtifactFile(ft,We.bytecodeDebugPatch,We.codeHashDebug);Ae.set(Ye.name,new N(Ne,Ye,gt))}else if(Ne.type===w.Script){const Ye=await G.fromArtifactFile(ft,We.bytecodeDebugPatch);$e.set(Ye.name,new N(Ne,Ye,gt))}}return new y(fe,le,I,Ae,$e,xe,Y)}catch(Ae){return console.log(`Failed to load artifacts, error: ${Ae}, try to re-compile contracts...`),y.compile(Y.fullNodeVersion,x,I,re,fe,le,xe,_e)}}static getImportSourcePath(x,I){const Y=I.split("/");if(Y.length>1&&Y[0]==="std"){const fe=d.dirname(__filename);return d.join(fe,"..","..","..",I)}let re=x;for(;;){const fe=d.join(re,"node_modules",I);if(a.default.existsSync(fe))return fe;const le=re;if(re=d.join(re,".."),le===re)throw new Error(`Specified import file does not exist: ${I}`)}}static async handleImports(x,I,Y,re){const fe=[],le=Y.replace(y.importRegex,_e=>(fe.push(_e),"")),xe=[];for(const _e of fe){const Ae=_e.slice(8,-1),$e=Ae.endsWith(".ral")?Ae:Ae+".ral";if(!re.includes($e)){re.push($e);const Ne=y.getImportSourcePath(x,$e),We=await y.loadSourceFile(x,I,Ne,re,!0);xe.push(...We)}}return[le,xe]}static async loadSourceFile(x,I,Y,re,fe){const le=d.relative(I,Y);if(!Y.endsWith(".ral"))throw new Error(`Invalid filename: ${Y}, smart contract file name should end with ".ral"`);const xe=await s.promises.readFile(Y),[_e,Ae]=await y.handleImports(x,I,xe.toString(),re);if(_e.match(new RegExp('^import "',"mg"))!==null)throw new Error(`Invalid import statements, source: ${Y}`);const $e=Ae;for(const Ne of this.matchers){const We=_e.matchAll(Ne.matcher);for(const gt of We){const ft=await A.from(Ne.type,gt[1],_e,le,fe);$e.push(ft)}}return $e}static async loadSourceFiles(x,I){const Y=[],re=[],fe=async function(xe){const _e=await s.promises.readdir(xe,{withFileTypes:!0});for(const Ae of _e)if(Ae.isFile()){const $e=d.join(xe,Ae.name),Ne=await y.loadSourceFile(x,I,$e,Y,!1);re.push(...Ne)}else{const $e=d.join(xe,Ae.name);await fe($e)}};await fe(I);const le=re.filter(xe=>xe.type===w.Contract||xe.type===w.Script).length;if(re.length===0||le===0)throw new Error("Project have no source files");return re.sort((xe,_e)=>xe.type-_e.type)}static async build(x={},I=".",Y=y.DEFAULT_CONTRACTS_DIR,re=y.DEFAULT_ARTIFACTS_DIR,fe=void 0){const le=(0,f.getCurrentNodeProvider)(),xe=fe??(await le.infos.getInfosVersion()).version,_e=await y.loadSourceFiles(I,Y),{errorOnWarnings:Ae,...$e}={...e.DEFAULT_COMPILER_OPTIONS,...x},Ne=await D.from(I);Ne===void 0||Ne.needToReCompile($e,_e,xe)?(console.log(`Compiling contracts in folder "${Y}"`),y.currentProject=await y.compile(xe,le,_e,I,Y,re,Ae,$e)):(console.log(`Contracts are compiled already. Loading them from folder "${re}"`),y.currentProject=await y.loadArtifacts(le,_e,Ne,I,Y,re,Ae,$e))}}e.Project=y,y.importRegex=new RegExp('^import "[^"./]+/[^"]*[a-z][a-z_0-9]*(.ral)?"',"mg"),y.abstractContractMatcher=new g("^Abstract Contract ([A-Z][a-zA-Z0-9]*)",w.AbstractContract),y.contractMatcher=new g("^Contract ([A-Z][a-zA-Z0-9]*)",w.Contract),y.interfaceMatcher=new g("^Interface ([A-Z][a-zA-Z0-9]*)",w.Interface),y.scriptMatcher=new g("^TxScript ([A-Z][a-zA-Z0-9]*)",w.Script),y.matchers=[y.abstractContractMatcher,y.contractMatcher,y.interfaceMatcher,y.scriptMatcher],y.DEFAULT_CONTRACTS_DIR="contracts",y.DEFAULT_ARTIFACTS_DIR="artifacts";class U{constructor(x,I,Y){this.version=x,this.name=I,this.functions=Y}publicFunctions(){return this.functions.filter(x=>x.isPublic).map(x=>x.name)}usingPreapprovedAssetsFunctions(){return this.functions.filter(x=>x.usePreapprovedAssets).map(x=>x.name)}usingAssetsInContractFunctions(){return this.functions.filter(x=>x.useAssetsInContract).map(x=>x.name)}}e.Artifact=U;class L extends U{constructor(x,I,Y,re,fe,le,xe,_e,Ae,$e,Ne,We){super(x,I,Ae),this.bytecode=Y,this.bytecodeDebugPatch=re,this.codeHash=fe,this.fieldsSig=xe,this.eventsSig=_e,this.constants=$e,this.enums=Ne,this.stdInterfaceId=We,this.bytecodeDebug=c.buildDebugBytecode(this.bytecode,this.bytecodeDebugPatch),this.codeHashDebug=le}static fromJson(x,I="",Y=""){if(x.version==null||x.name==null||x.bytecode==null||x.codeHash==null||x.fieldsSig==null||x.eventsSig==null||x.constants==null||x.enums==null||x.functions==null)throw Error("The artifact JSON for contract is incomplete");return new L(x.version,x.name,x.bytecode,I,x.codeHash,Y||x.codeHash,x.fieldsSig,x.eventsSig,x.functions,x.constants,x.enums,x.stdInterfaceId===null?void 0:x.stdInterfaceId)}static fromCompileResult(x){return new L(x.version,x.name,x.bytecode,x.bytecodeDebugPatch,x.codeHash,x.codeHashDebug,x.fields,x.events,x.functions,x.constants,x.enums,x.stdInterfaceId)}static async fromArtifactFile(x,I,Y){const re=await s.promises.readFile(x),fe=JSON.parse(re.toString());return L.fromJson(fe,I,Y)}toString(){const x={version:this.version,name:this.name,bytecode:this.bytecode,codeHash:this.codeHash,fieldsSig:this.fieldsSig,eventsSig:this.eventsSig,functions:this.functions,constants:this.constants,enums:this.enums};return this.stdInterfaceId!==void 0&&(x.stdInterfaceId=this.stdInterfaceId),JSON.stringify(x,null,2)}getInitialFieldsWithDefaultValues(){const x=this.stdInterfaceId===void 0?this.fieldsSig:{names:this.fieldsSig.names.slice(-1),types:this.fieldsSig.types.slice(-1),isMutable:this.fieldsSig.isMutable.slice(-1)};return x.names.reduce((I,Y,re)=>(I[`${Y}`]=(0,l.getDefaultValue)(x.types[`${re}`]),I),{})}toState(x,I,Y){const re=typeof Y<"u"?Y:L.randomAddress();return{address:re,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(re)),bytecode:this.bytecode,codeHash:this.codeHash,fields:x,fieldsSig:this.fieldsSig,asset:I}}static randomAddress(){const x=new Uint8Array(33);return _.getRandomValues(x),x[0]=3,u.bs58.encode(x)}printDebugMessages(x,I){I.length!=0&&(console.log(`Testing ${this.name}.${x}:`),I.forEach(Y=>console.log(`Debug - ${Y.contractAddress} - ${Y.message}`)))}toApiFields(x){return typeof x>"u"?[]:j(x,this.fieldsSig)}toApiArgs(x,I){if(I){const Y=this.functions.find(re=>re.name==x);if(Y==null)throw new Error(`Invalid function name: ${x}`);return H(I,Y)}else return[]}getMethodIndex(x){return this.functions.findIndex(I=>I.name===x)}toApiContractStates(x){return typeof x<"u"?x.map(I=>T(I)):void 0}toApiTestContractParams(x,I){const Y=I.initialFields===void 0?[]:B(I.initialFields,this.fieldsSig,!1),re=I.initialFields===void 0?[]:B(I.initialFields,this.fieldsSig,!0);return{group:I.group,blockHash:I.blockHash,blockTimeStamp:I.blockTimeStamp,txId:I.txId,address:I.address,bytecode:this.bytecodeDebug,initialImmFields:Y,initialMutFields:re,initialAsset:typeof I.initialAsset<"u"?C(I.initialAsset):void 0,methodIndex:this.getMethodIndex(x),args:this.toApiArgs(x,I.testArgs),existingContracts:this.toApiContractStates(I.existingContracts),inputAssets:$(I.inputAssets)}}fromApiContractState(x){return{address:x.address,contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(x.address)),bytecode:x.bytecode,initialStateHash:x.initialStateHash,codeHash:x.codeHash,fields:V(x.immFields,x.mutFields,this.fieldsSig),fieldsSig:this.fieldsSig,asset:v(x.asset)}}static fromApiContractState(x,I){return(I?I(x.codeHash):y.currentProject.contractByCodeHash(x.codeHash)).fromApiContractState(x)}static fromApiEvent(x,I,Y,re){let fe,le;if(x.eventIndex==L.ContractCreatedEventIndex)fe=ue(S(x.fields,L.ContractCreatedEvent,!0)),le=L.ContractCreatedEvent.name;else if(x.eventIndex==L.ContractDestroyedEventIndex)fe=S(x.fields,L.ContractDestroyedEvent,!0),le=L.ContractDestroyedEvent.name;else{const _e=(re?re(I):y.currentProject.contractByCodeHash(I)).eventsSig[x.eventIndex];fe=S(x.fields,_e),le=_e.name}return{txId:Y,blockHash:x.blockHash,contractAddress:x.contractAddress,name:le,eventIndex:x.eventIndex,fields:fe}}fromApiTestContractResult(x,I,Y){const re=this.functions.findIndex(Ae=>Ae.name===x),fe=this.functions[`${re}`].returnTypes,le=(0,l.fromApiArray)(I.returns,fe),xe=le.length===0?null:le.length===1?le[0]:le,_e=new Map;return _e.set(I.address,I.codeHash),I.contracts.forEach(Ae=>_e.set(Ae.address,Ae.codeHash)),{contractId:(0,u.binToHex)((0,u.contractIdFromAddress)(I.address)),contractAddress:I.address,returns:xe,gasUsed:I.gasUsed,contracts:I.contracts.map(Ae=>L.fromApiContractState(Ae)),txOutputs:I.txOutputs.map(q),events:L.fromApiEvents(I.events,_e,Y),debugMessages:I.debugMessages}}async txParamsForDeployment(x,I){const Y=I.initialFields??{},re=this.buildByteCodeToDeploy(se(this,Y)),fe=await x.getSelectedAccount();return{signerAddress:fe.address,signerKeyType:fe.keyType,bytecode:re,initialAttoAlphAmount:I==null?void 0:I.initialAttoAlphAmount,issueTokenAmount:I==null?void 0:I.issueTokenAmount,initialTokenAmounts:I==null?void 0:I.initialTokenAmounts,gasAmount:I==null?void 0:I.gasAmount,gasPrice:I==null?void 0:I.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildContractByteCode(this.bytecode,x,this.fieldsSig)}catch(I){throw new Error(`Failed to build bytecode for contract ${this.name}, error: ${I}`)}}static fromApiEvents(x,I,Y,re){return x.map(fe=>{const le=fe.contractAddress,xe=I.get(le);if(typeof xe<"u"||fe.eventIndex<0)return L.fromApiEvent(fe,xe,Y,re);throw Error(`Cannot find codeHash for the contract address: ${le}`)})}toApiCallContract(x,I,Y,re){const fe=this.functions[`${re}`],le=P(x.args??{},fe.paramNames,fe.paramTypes);return{...x,group:I,address:Y,methodIndex:re,args:le}}fromApiCallContractResult(x,I,Y,re){const fe=this.functions[`${Y}`].returnTypes,le=Te(x),xe=(0,l.fromApiArray)(le.returns,fe),_e=xe.length===0?null:xe.length===1?xe[0]:xe,Ae=new Map;return le.contracts.forEach($e=>Ae.set($e.address,$e.codeHash)),{returns:_e,gasUsed:le.gasUsed,contracts:le.contracts.map($e=>L.fromApiContractState($e,re)),txInputs:le.txInputs,txOutputs:le.txOutputs.map($e=>q($e)),events:L.fromApiEvents(le.events,Ae,I,re)}}}e.Contract=L,L.ContractCreatedEventIndex=-1,L.ContractCreatedEvent={name:"ContractCreated",fieldNames:["address","parentAddress","stdInterfaceId"],fieldTypes:["Address","Address","ByteVec"]},L.ContractDestroyedEventIndex=-2,L.ContractDestroyedEvent={name:"ContractDestroyed",fieldNames:["address"],fieldTypes:["Address"]};class G extends U{constructor(x,I,Y,re,fe,le){super(x,I,le),this.bytecodeTemplate=Y,this.bytecodeDebugPatch=re,this.fieldsSig=fe}static fromCompileResult(x){return new G(x.version,x.name,x.bytecodeTemplate,x.bytecodeDebugPatch,x.fields,x.functions)}static fromJson(x,I=""){if(x.version==null||x.name==null||x.bytecodeTemplate==null||x.fieldsSig==null||x.functions==null)throw Error("The artifact JSON for script is incomplete");return new G(x.version,x.name,x.bytecodeTemplate,I,x.fieldsSig,x.functions)}static async fromArtifactFile(x,I){const Y=await s.promises.readFile(x),re=JSON.parse(Y.toString());return this.fromJson(re,I)}toString(){const x={version:this.version,name:this.name,bytecodeTemplate:this.bytecodeTemplate,fieldsSig:this.fieldsSig,functions:this.functions};return JSON.stringify(x,null,2)}async txParamsForExecution(x,I){const Y=await x.getSelectedAccount();return{signerAddress:Y.address,signerKeyType:Y.keyType,bytecode:this.buildByteCodeToDeploy(I.initialFields??{}),attoAlphAmount:I.attoAlphAmount,tokens:I.tokens,gasAmount:I.gasAmount,gasPrice:I.gasPrice}}buildByteCodeToDeploy(x){try{return c.buildScriptByteCode(this.bytecodeTemplate,x,this.fieldsSig)}catch(I){throw new Error(`Failed to build bytecode for script ${this.name}, error: ${I}`)}}}e.Script=G;function V(W,x,I){const Y=[];let re=0,fe=0;return I.types.flatMap((xe,_e)=>Array((0,l.typeLength)(xe)).fill(I.isMutable[`${_e}`])).forEach(xe=>{xe?(Y.push(x[`${fe}`]),fe+=1):(Y.push(W[`${re}`]),re+=1)}),(0,l.fromApiVals)(Y,I.names,I.types)}function S(W,x,I=!1){return(0,l.fromApiVals)(W,x.fieldNames,x.fieldTypes,I)}function C(W){return{attoAlphAmount:(0,l.toApiNumber256)(W.alphAmount),tokens:typeof W.tokens<"u"?W.tokens.map(l.toApiToken):[]}}function v(W){return{alphAmount:(0,l.fromApiNumber256)(W.attoAlphAmount),tokens:(0,l.fromApiTokens)(W.tokens)}}function b(W,x){if(x in W)return W[`${x}`];throw Error(`No Val exists for ${x}`)}function B(W,x,I){const Y=x.names.map((le,xe)=>xe).filter(le=>x.isMutable[`${le}`]===I),re=Y.map(le=>x.names[`${le}`]),fe=Y.map(le=>x.types[`${le}`]);return P(W,re,fe)}function T(W){const x=W.fields??{};return{address:W.address,bytecode:W.bytecode,codeHash:W.codeHash,initialStateHash:W.initialStateHash,immFields:B(x,W.fieldsSig,!1),mutFields:B(x,W.fieldsSig,!0),asset:C(W.asset)}}function j(W,x){return P(W,x.names,x.types)}function H(W,x){return P(W,x.paramNames,x.paramTypes)}function P(W,x,I){return x.map((Y,re)=>{const fe=b(W,Y),le=I[`${re}`];return(0,l.toApiVal)(fe,le)})}e.toApiVals=P;function F(W){return{address:W.address,asset:C(W.asset)}}function $(W){return typeof W<"u"?W.map(F):void 0}function q(W){if(W.type==="AssetOutput"){const x=W;return{type:"AssetOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens),lockTime:x.lockTime,message:x.message}}else if(W.type==="ContractOutput"){const x=W;return{type:"ContractOutput",address:x.address,alphAmount:(0,l.fromApiNumber256)(x.attoAlphAmount),tokens:(0,l.fromApiTokens)(x.tokens)}}else throw new Error(`Unknown output type: ${W}`)}function J(){const W=new Uint8Array(32);return _.getRandomValues(W),(0,u.binToHex)(W)}e.randomTxId=J,u.assertType;class te{constructor(x){this.contract=x}async deploy(x,I){const Y=await this.contract.txParamsForDeployment(x,{...I,initialFields:se(this.contract,I.initialFields)}),re=await x.signAndSubmitDeployContractTx(Y);return{...re,contractInstance:this.at(re.contractAddress)}}stateForTest(x,I,Y){const re={alphAmount:(I==null?void 0:I.alphAmount)??h.ONE_ALPH,tokens:I==null?void 0:I.tokens};return this.contract.toState(se(this.contract,x),re,Y)}}e.ContractFactory=te;class ae{constructor(x){this.script=x}async execute(x,I){const Y=await this.script.txParamsForExecution(x,I);return await x.signAndSubmitExecuteScriptTx(Y)}}e.ExecutableScript=ae;function ce(W){const x=new Uint8Array(32).fill(0);return x[31]=W,(0,u.addressFromContractId)((0,u.binToHex)(x))}e.CreateContractEventAddress=ce(-1),e.DestroyContractEventAddress=ce(-2);function ie(W,x,I){if(W.eventIndex!==I)throw new Error(`Invalid event index: ${W.eventIndex}, expected: ${I}`);return S(W.fields,x,!0)}function ue(W){const x=W.parentAddress,I=W.stdInterfaceId;return{address:W.address,parentAddress:x===""?void 0:x,stdInterfaceIdGuessed:I===""?void 0:I}}function O(W){const x=ie(W,L.ContractCreatedEvent,L.ContractCreatedEventIndex);return{blockHash:W.blockHash,txId:W.txId,eventIndex:W.eventIndex,name:L.ContractCreatedEvent.name,fields:ue(x)}}e.decodeContractCreatedEvent=O;function K(W){const x=ie(W,L.ContractDestroyedEvent,L.ContractDestroyedEventIndex);return{blockHash:W.blockHash,txId:W.txId,eventIndex:W.eventIndex,name:L.ContractDestroyedEvent.name,fields:{address:x.address}}}e.decodeContractDestroyedEvent=K;function ee(W,x,I,Y,re){const fe=_e=>_e.eventIndex!==I?Promise.resolve():W.messageCallback(Y(_e)),le=(_e,Ae)=>W.errorCallback(_e,Ae),xe={pollingInterval:W.pollingInterval,messageCallback:fe,errorCallback:le,onEventCountChanged:W.onEventCountChanged};return(0,p.subscribeToEvents)(xe,x,re)}e.subscribeEventsFromContract=ee;function se(W,x){const I="414c5048";return W.stdInterfaceId===void 0?x:{...x,__stdInterfaceId:I+W.stdInterfaceId}}e.addStdIdToFields=se;async function pe(W,x,I){const Y=(I==null?void 0:I.txId)??J(),re=I.initialFields===void 0?{}:I.initialFields,fe=W.contract.toApiTestContractParams(x,{...I,txId:Y,initialFields:se(W.contract,re),testArgs:I.testArgs===void 0?{}:I.testArgs}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsTestContract(fe),xe=W.contract.fromApiTestContractResult(x,le,Y);return W.contract.printDebugMessages(x,xe.debugMessages),xe}e.testMethod=pe;class ge{constructor(x){this.address=x,this.contractId=(0,u.binToHex)((0,u.contractIdFromAddress)(x)),this.groupIndex=(0,u.groupOfAddress)(x)}}e.ContractInstance=ge;async function X(W,x){const I=await(0,f.getCurrentNodeProvider)().contracts.getContractsAddressState(x.address,{group:x.groupIndex}),Y=W.contract.fromApiContractState(I);return{...Y,fields:Y.fields}}e.fetchContractState=X;function M(W,x){return ee(W,e.CreateContractEventAddress,L.ContractCreatedEventIndex,I=>({...O(I),contractAddress:e.CreateContractEventAddress}),x)}e.subscribeContractCreatedEvent=M;function z(W,x){return ee(W,e.DestroyContractEventAddress,L.ContractDestroyedEventIndex,I=>({...K(I),contractAddress:e.DestroyContractEventAddress}),x)}e.subscribeContractDestroyedEvent=z;function Z(W,x,I,Y){if(I.eventIndex!==Y&&!(Y>=0&&Yle.name===Y);return ee(I,x.address,fe,le=>Z(W,x,le,fe),re)}e.subscribeContractEvent=Q;function de(W,x,I,Y){const re=xe=>I.messageCallback({...Z(W,x,xe,xe.eventIndex),contractAddress:x.address}),fe=(xe,_e)=>I.errorCallback(xe,_e),le={pollingInterval:I.pollingInterval,messageCallback:re,errorCallback:fe,onEventCountChanged:I.onEventCountChanged};return(0,p.subscribeToEvents)(le,x.address,Y)}e.subscribeContractEvents=de;async function we(W,x,I,Y,re){const fe=W.contract.getMethodIndex(I),le=(Y==null?void 0:Y.txId)??J(),xe=W.contract.toApiCallContract({...Y,txId:le,args:Y.args===void 0?{}:Y.args},x.groupIndex,x.address,fe),_e=await(0,f.getCurrentNodeProvider)().contracts.postContractsCallContract(xe);return W.contract.fromApiCallContractResult(_e,le,fe,re)}e.callMethod=we;async function Se(W,x,I,Y){const re=Object.entries(I),fe=re.map(_e=>{const[Ae,$e]=_e,Ne=W.contract.getMethodIndex(Ae),We=($e==null?void 0:$e.txId)??J();return W.contract.toApiCallContract({...$e,txId:We,args:$e.args===void 0?{}:$e.args},x.groupIndex,x.address,Ne)}),le=await(0,f.getCurrentNodeProvider)().contracts.postContractsMulticallContract({calls:fe}),xe={};return fe.forEach((_e,Ae)=>{const $e=_e.methodIndex,Ne=le.results[`${$e}`],We=re[`${Ae}`][0];xe[`${We}`]=W.contract.fromApiCallContractResult(Ne,_e.txId,$e,Y)}),xe}e.multicallMethods=Se;async function Ee(W){return(0,f.getCurrentNodeProvider)().events.getEventsContractContractaddressCurrentCount(W).catch(x=>{if(x instanceof Error&&x.message.includes(`${W} not found`))return 0;throw x})}e.getContractEventsCurrentCount=Ee;const ke=async(W,x)=>{const I=await W.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:x}),Y=I.unsignedTx.fixedOutputs.length,re=I.unsignedTx.txId+Y.toString(16).padStart(8,"0");return(0,u.binToHex)(m.blake2b((0,u.hexToBinUnsafe)(re),void 0,32)).slice(0,62)+I.fromGroup.toString(16).padStart(2,"0")};e.getContractIdFromUnsignedTx=ke,e.getTokenIdFromUnsignedTx=e.getContractIdFromUnsignedTx;function Te(W){if(W.type==="CallContractFailed")throw new Error(`Failed to call contract, error: ${W.error}`);return W}e.tryGetCallResult=Te}(s5)),s5}var l$;function SG(){return l$||(l$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(xG(),e),r(Uke(),e),r(EG(),e)}(a5)),a5}var c$;function zke(){if(c$)return ud;c$=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.NodeProvider=void 0;const e=V8(),t=W8,r=SG(),n=Xn();function o(a,s,l){const c=new t.Api({baseUrl:a,baseApiParams:{secure:!0},securityWorker:u=>u!==null?{headers:{"X-API-KEY":`${u}`}}:{},customFetch:l??((...u)=>fetch(...u))});return c.setSecurityData(s??null),c}class i{constructor(s,l,c){this.request=f=>(0,e.request)(this,f),this.fetchFungibleTokenMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1,2,3],w=>({methodIndex:w,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(w=>(0,r.tryGetCallResult)(w));return{symbol:_[0].returns[0].value,name:_[1].returns[0].value,decimals:Number(_[2].returns[0].value),totalSupply:BigInt(_[3].returns[0].value)}},this.fetchNFTMetaData=async f=>{const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),h=await this.contracts.postContractsCallContract({methodIndex:0,group:p,address:d});return{tokenUri:(0,n.hexToString)((0,r.tryGetCallResult)(h).returns[0].value)}},this.fetchNFTCollectionMetaData=async f=>{const d=(0,n.addressFromContractId)(f),p=(0,n.groupOfAddress)(d),h=Array.from([0,1],w=>({methodIndex:w,group:p,address:d})),_=(await this.contracts.postContractsMulticallContract({calls:h})).results.map(w=>(0,r.tryGetCallResult)(w));return{collectionUri:(0,n.hexToString)(_[0].returns[0].value),totalSupply:BigInt(_[1].returns[0].value)}},this.guessStdInterfaceId=async f=>{var w;const d=(0,n.addressFromTokenId)(f),p=(0,n.groupOfAddress)(d),m=(w=(await this.contracts.getContractsAddressState((0,n.addressFromTokenId)(f),{group:p})).immFields.slice(-1).pop())==null?void 0:w.value,_="414c5048";if(typeof m=="string"&&m.startsWith(_))return m.slice(8)},this.guessFollowsNFTCollectionStd=async f=>{const d=await this.guessStdInterfaceId(f);return!!d&&d.startsWith(e.StdInterfaceIds.NFTCollection)},this.guessStdTokenType=async f=>{switch(await this.guessStdInterfaceId(f)){case e.StdInterfaceIds.FungibleToken:return"fungible";case e.StdInterfaceIds.NFT:return"non-fungible";default:return}};let u;typeof s=="string"?u=o(s,l,c):typeof s=="function"?(u=new i("https://1.2.3.4:0"),(0,e.forwardRequests)(u,s)):u=s,this.wallets={...u.wallets},this.infos={...u.infos},this.blockflow={...u.blockflow},this.addresses={...u.addresses},this.transactions={...u.transactions},this.mempool={...u.mempool},this.contracts={...u.contracts},this.multisig={...u.multisig},this.utils={...u.utils},this.miners={...u.miners},this.events={...u.events}}static Proxy(s){return new i(s)}static Remote(s){return new i(s)}}return ud.NodeProvider=i,ud}var vd={},q8={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Api=e.HttpClient=e.ContentType=e.IntervalType=void 0,function(i){i.Daily="daily",i.Hourly="hourly"}(e.IntervalType||(e.IntervalType={}));const t=Vs;var r;(function(i){i.Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded",i.Text="text/plain"})(r=e.ContentType||(e.ContentType={}));class n{constructor(a={}){this.baseUrl="",this.securityData=null,this.abortControllers=new Map,this.customFetch=(...s)=>fetch(...s),this.baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"},this.setSecurityData=s=>{this.securityData=s},this.contentFormatters={[r.Json]:s=>s!==null&&(typeof s=="object"||typeof s=="string")?JSON.stringify(s):s,[r.Text]:s=>s!==null&&typeof s!="string"?JSON.stringify(s):s,[r.FormData]:s=>Object.keys(s||{}).reduce((l,c)=>{const u=s[c];return l.append(c,u instanceof Blob?u:typeof u=="object"&&u!==null?JSON.stringify(u):`${u}`),l},new FormData),[r.UrlEncoded]:s=>this.toQueryString(s)},this.createAbortSignal=s=>{if(this.abortControllers.has(s)){const c=this.abortControllers.get(s);return c?c.signal:void 0}const l=new AbortController;return this.abortControllers.set(s,l),l.signal},this.abortRequest=s=>{const l=this.abortControllers.get(s);l&&(l.abort(),this.abortControllers.delete(s))},this.request=async({body:s,secure:l,path:c,type:u,query:f,format:d,baseUrl:p,cancelToken:h,...m})=>{const _=(typeof l=="boolean"?l:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},w=this.mergeRequestParams(m,_),g=f&&this.toQueryString(f),E=this.contentFormatters[u||r.Json],A=d||w.format;return this.customFetch(`${p||this.baseUrl||""}${c}${g?`?${g}`:""}`,{...w,headers:{...w.headers||{},...u&&u!==r.FormData?{"Content-Type":u}:{}},signal:h?this.createAbortSignal(h):w.signal,body:typeof s>"u"||s===null?null:E(s)}).then(async N=>{const D=N;D.data=null,D.error=null;const y=A?await N[A]().then(U=>(D.ok?D.data=U:D.error=U,D)).catch(U=>(D.error=U,D)):D;return h&&this.abortControllers.delete(h),y})},Object.assign(this,a)}encodeQueryParam(a,s){return`${encodeURIComponent(a)}=${encodeURIComponent(typeof s=="number"?s:`${s}`)}`}addQueryParam(a,s){return this.encodeQueryParam(s,a[s])}addArrayQueryParam(a,s){return a[s].map(c=>this.encodeQueryParam(s,c)).join("&")}toQueryString(a){const s=a||{};return Object.keys(s).filter(c=>typeof s[c]<"u").map(c=>Array.isArray(s[c])?this.addArrayQueryParam(s,c):this.addQueryParam(s,c)).join("&")}addQueryParams(a){const s=this.toQueryString(a);return s?`?${s}`:""}mergeRequestParams(a,s){return{...this.baseApiParams,...a,...s||{},headers:{...this.baseApiParams.headers||{},...a.headers||{},...s&&s.headers||{}}}}}e.HttpClient=n;class o extends n{constructor(){super(...arguments),this.blocks={getBlocks:(a,s={})=>this.request({path:"/blocks",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHash:(a,s={})=>this.request({path:`/blocks/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getBlocksBlockHashTransactions:(a,s,l={})=>this.request({path:`/blocks/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.transactions={getTransactionsTransactionHash:(a,s={})=>this.request({path:`/transactions/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse)},this.addresses={getAddressesAddress:(a,s={})=>this.request({path:`/addresses/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesTransactions:(a,s,l={})=>this.request({path:"/addresses/transactions",method:"POST",query:a,body:s,type:r.Json,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTimerangedTransactions:(a,s,l={})=>this.request({path:`/addresses/${a}/timeranged-transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTotalTransactions:(a,s={})=>this.request({path:`/addresses/${a}/total-transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressMempoolTransactions:(a,s={})=>this.request({path:`/addresses/${a}/mempool/transactions`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressBalance:(a,s={})=>this.request({path:`/addresses/${a}/balance`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressTokens:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdTransactions:(a,s,l,c={})=>this.request({path:`/addresses/${a}/tokens/${s}/transactions`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse),getAddressesAddressTokensTokenIdBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens/${s}/balance`,method:"GET",format:"json",...l}).then(t.convertHttpResponse),getAddressesAddressTokensBalance:(a,s,l={})=>this.request({path:`/addresses/${a}/tokens-balance`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),postAddressesUsed:(a,s={})=>this.request({path:"/addresses/used",method:"POST",body:a,type:r.Json,format:"json",...s}).then(t.convertHttpResponse),getAddressesAddressExportTransactionsCsv:(a,s,l={})=>this.request({path:`/addresses/${a}/export-transactions/csv`,method:"GET",query:s,format:"text",...l}).then(t.convertHttpResponse),getAddressesAddressAmountHistory:(a,s,l={})=>this.request({path:`/addresses/${a}/amount-history`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.infos={getInfos:(a={})=>this.request({path:"/infos",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosHeights:(a={})=>this.request({path:"/infos/heights",method:"GET",format:"json",...a}).then(t.convertHttpResponse),getInfosSupply:(a,s={})=>this.request({path:"/infos/supply",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getInfosSupplyTotalAlph:(a={})=>this.request({path:"/infos/supply/total-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyCirculatingAlph:(a={})=>this.request({path:"/infos/supply/circulating-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyReservedAlph:(a={})=>this.request({path:"/infos/supply/reserved-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosSupplyLockedAlph:(a={})=>this.request({path:"/infos/supply/locked-alph",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosTotalTransactions:(a={})=>this.request({path:"/infos/total-transactions",method:"GET",format:"text",...a}).then(t.convertHttpResponse),getInfosAverageBlockTimes:(a={})=>this.request({path:"/infos/average-block-times",method:"GET",format:"json",...a}).then(t.convertHttpResponse)},this.mempool={getMempoolTransactions:(a,s={})=>this.request({path:"/mempool/transactions",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.tokens={getTokens:(a,s={})=>this.request({path:"/tokens",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getTokensTokenIdTransactions:(a,s,l={})=>this.request({path:`/tokens/${a}/transactions`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.charts={getChartsHashrates:(a,s={})=>this.request({path:"/charts/hashrates",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCount:(a,s={})=>this.request({path:"/charts/transactions-count",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse),getChartsTransactionsCountPerChain:(a,s={})=>this.request({path:"/charts/transactions-count-per-chain",method:"GET",query:a,format:"json",...s}).then(t.convertHttpResponse)},this.contractEvents={getContractEventsTransactionIdTransactionId:(a,s={})=>this.request({path:`/contract-events/transaction-id/${a}`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddress:(a,s,l={})=>this.request({path:`/contract-events/contract-address/${a}`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse),getContractEventsContractAddressContractAddressInputAddressInputAddress:(a,s,l,c={})=>this.request({path:`/contract-events/contract-address/${a}/input-address/${s}`,method:"GET",query:l,format:"json",...c}).then(t.convertHttpResponse)},this.contracts={getContractsContractParent:(a,s={})=>this.request({path:`/contracts/${a}/parent`,method:"GET",format:"json",...s}).then(t.convertHttpResponse),getContractsContractSubContracts:(a,s,l={})=>this.request({path:`/contracts/${a}/sub-contracts`,method:"GET",query:s,format:"json",...l}).then(t.convertHttpResponse)},this.utils={putUtilsSanityCheck:(a={})=>this.request({path:"/utils/sanity-check",method:"PUT",...a}).then(t.convertHttpResponse),putUtilsUpdateGlobalLoglevel:(a,s={})=>this.request({path:"/utils/update-global-loglevel",method:"PUT",body:a,...s}).then(t.convertHttpResponse),putUtilsUpdateLogConfig:(a,s={})=>this.request({path:"/utils/update-log-config",method:"PUT",body:a,type:r.Json,...s}).then(t.convertHttpResponse)}}}e.Api=o})(q8);var u$;function Hke(){if(u$)return vd;u$=1,Object.defineProperty(vd,"__esModule",{value:!0}),vd.ExplorerProvider=void 0;const e=V8(),t=q8;function r(o,i,a){const s=new t.Api({baseUrl:o,baseApiParams:{secure:!0},securityWorker:l=>l!==null?{headers:{"X-API-KEY":`${l}`}}:{},customFetch:a??((...l)=>fetch(...l))});return s.setSecurityData(i??null),s}class n{constructor(i,a,s){this.request=c=>(0,e.request)(this,c);let l;typeof i=="string"?l=r(i,a,s):typeof i=="function"?(l=new n("https://1.2.3.4:0"),(0,e.forwardRequests)(l,i)):l=i,this.blocks={...l.blocks},this.transactions={...l.transactions},this.addresses={...l.addresses},this.infos={...l.infos},this.mempool={...l.mempool},this.tokens={...l.tokens},this.charts={...l.charts},this.utils={...l.utils},this.contracts={...l.contracts},this.contractEvents={...l.contractEvents}}static Proxy(i){return new n(i)}static Remote(i){return new n(i)}}return vd.ExplorerProvider=n,vd}var f$;function wf(){return f$||(f$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.explorer=e.node=void 0,n(zke(),e),n(Hke(),e),e.node=o(W8),e.explorer=o(q8),n(V8(),e),n(Vs,e)}(Gw)),Gw}var l5={},Wt={},gd={},d$;function CG(){if(d$)return gd;d$=1,Object.defineProperty(gd,"__esModule",{value:!0}),gd.TransactionBuilder=void 0;const e=el(),t=wf(),r=Xn(),n=PG();class o{static from(a,s,l){const c=typeof a=="string"?new t.NodeProvider(a,s,l):a;return new class extends o{get nodeProvider(){return c}}}static validatePublicKey(a,s,l){if((0,r.addressFromPublicKey)(s,l)!==a.signerAddress)throw new Error("Unmatched public key")}async buildTransferTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{destinations:l,gasPrice:c,...u}=a,f={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,destinations:(0,n.toApiDestinations)(l),gasPrice:(0,t.toApiNumber256Optional)(c),...u},d=await this.nodeProvider.transactions.postTransactionsBuild(f);return{...d,gasPrice:(0,t.fromApiNumber256)(d.gasPrice)}}async buildDeployContractTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{initialAttoAlphAmount:l,initialTokenAmounts:c,issueTokenAmount:u,gasPrice:f,...d}=a,p={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,initialAttoAlphAmount:(0,t.toApiNumber256Optional)(l),initialTokenAmounts:(0,t.toApiTokens)(c),issueTokenAmount:(0,t.toApiNumber256Optional)(u),gasPrice:(0,t.toApiNumber256Optional)(f),...d},h=await this.nodeProvider.contracts.postContractsUnsignedTxDeployContract(p),m=e.utils.binToHex(e.utils.contractIdFromAddress(h.contractAddress));return{...h,groupIndex:h.fromGroup,contractId:m,gasPrice:(0,t.fromApiNumber256)(h.gasPrice)}}async buildExecuteScriptTx(a,s){o.validatePublicKey(a,s,a.signerKeyType);const{attoAlphAmount:l,tokens:c,gasPrice:u,...f}=a,d={fromPublicKey:s,fromPublicKeyType:a.signerKeyType,attoAlphAmount:(0,t.toApiNumber256Optional)(l),tokens:(0,t.toApiTokens)(c),gasPrice:(0,t.toApiNumber256Optional)(u),...f},p=await this.nodeProvider.contracts.postContractsUnsignedTxExecuteScript(d);return{...p,groupIndex:p.fromGroup,gasPrice:(0,t.fromApiNumber256)(p.gasPrice)}}async buildUnsignedTx(a){const s={unsignedTx:a.unsignedTx},l=await this.nodeProvider.transactions.postTransactionsDecodeUnsignedTx(s);return{fromGroup:l.fromGroup,toGroup:l.toGroup,unsignedTx:a.unsignedTx,txId:l.unsignedTx.txId,gasAmount:l.unsignedTx.gasAmount,gasPrice:(0,t.fromApiNumber256)(l.unsignedTx.gasPrice)}}}return gd.TransactionBuilder=o,gd}var p$;function PG(){if(p$)return Wt;p$=1;var e=Le&&Le.__createBinding||(Object.create?function(D,y,U,L){L===void 0&&(L=U);var G=Object.getOwnPropertyDescriptor(y,U);(!G||("get"in G?!y.__esModule:G.writable||G.configurable))&&(G={enumerable:!0,get:function(){return y[U]}}),Object.defineProperty(D,L,G)}:function(D,y,U,L){L===void 0&&(L=U),D[L]=y[U]}),t=Le&&Le.__setModuleDefault||(Object.create?function(D,y){Object.defineProperty(D,"default",{enumerable:!0,value:y})}:function(D,y){D.default=y}),r=Le&&Le.__importStar||function(D){if(D&&D.__esModule)return D;var y={};if(D!=null)for(var U in D)U!=="default"&&Object.prototype.hasOwnProperty.call(D,U)&&e(y,D,U);return t(y,D),y},n=Le&&Le.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.fromApiDestination=Wt.toApiDestinations=Wt.toApiDestination=Wt.verifySignedMessage=Wt.hashMessage=Wt.extendMessage=Wt.SignerProviderWithCachedAccounts=Wt.SignerProviderWithMultipleAccounts=Wt.SignerProviderSimple=Wt.InteractiveSignerProvider=Wt.SignerProvider=void 0;const o=zs,i=Xo,a=wf(),s=r(Xn()),l=n(Hb),c=CG(),u=Xn();class f{async getSelectedAccount(){const y=await this.unsafeGetSelectedAccount();return f.validateAccount(y),y}static validateAccount(y){const U=(0,u.addressFromPublicKey)(y.publicKey,y.keyType),L=(0,u.groupOfAddress)(U);if(U!==y.address||L!==y.group)throw Error(`Invalid accounot data: ${JSON.stringify(y)}`)}}Wt.SignerProvider=f;class d extends f{async enable(y){const U=await this.unsafeEnable(y);return f.validateAccount(U),U}}Wt.InteractiveSignerProvider=d;class p extends f{async submitTransaction(y){const U={unsignedTx:y.unsignedTx,signature:y.signature};return this.nodeProvider.transactions.postTransactionsSubmit(U)}async signAndSubmitTransferTx(y){const U=await this.signTransferTx(y);return await this.submitTransaction(U),U}async signAndSubmitDeployContractTx(y){const U=await this.signDeployContractTx(y);return await this.submitTransaction(U),U}async signAndSubmitExecuteScriptTx(y){const U=await this.signExecuteScriptTx(y);return await this.submitTransaction(U),U}async signAndSubmitUnsignedTx(y){const U=await this.signUnsignedTx(y);return await this.submitTransaction(U),U}async usePublicKey(y){const{signerAddress:U,...L}=y;return{fromPublicKey:await this.getPublicKey(U),...L}}async signTransferTx(y){const U=await this.buildTransferTx(y);return{signature:await this.signRaw(y.signerAddress,U.txId),...U}}async buildTransferTx(y){return c.TransactionBuilder.from(this.nodeProvider).buildTransferTx(y,await this.getPublicKey(y.signerAddress))}async signDeployContractTx(y){const U=await this.buildDeployContractTx(y);return{signature:await this.signRaw(y.signerAddress,U.txId),...U}}async buildDeployContractTx(y){return c.TransactionBuilder.from(this.nodeProvider).buildDeployContractTx(y,await this.getPublicKey(y.signerAddress))}async signExecuteScriptTx(y){const U=await this.buildExecuteScriptTx(y);return{signature:await this.signRaw(y.signerAddress,U.txId),...U}}async buildExecuteScriptTx(y){return c.TransactionBuilder.from(this.nodeProvider).buildExecuteScriptTx(y,await this.getPublicKey(y.signerAddress))}async signUnsignedTx(y){const U=await c.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(y);return{signature:await this.signRaw(y.signerAddress,U.txId),...U}}async signMessage(y){const U=w(y.message,y.messageHasher);return{signature:await this.signRaw(y.signerAddress,U)}}}Wt.SignerProviderSimple=p;class h extends p{async getAccount(y){const L=(await this.getAccounts()).find(G=>G.address===y);if(typeof L>"u")throw new Error("Unmatched signerAddress");return L}async getPublicKey(y){return(await this.getAccount(y)).publicKey}}Wt.SignerProviderWithMultipleAccounts=h;class m extends h{constructor(){super(...arguments),this._selectedAccount=void 0,this._accounts=new Map}unsafeGetSelectedAccount(){if(this._selectedAccount===void 0)throw Error("No account is selected yet");return Promise.resolve(this._selectedAccount)}setSelectedAccount(y){const U=this._accounts.get(y);if(U===void 0)throw Error("The address is not in the accounts");return this._selectedAccount=U,Promise.resolve()}getAccounts(){return Promise.resolve(Array.from(this._accounts.values()))}async getAccount(y){const U=this._accounts.get(y);if(U===void 0)throw Error("The address is not in the accounts");return Promise.resolve(U)}}Wt.SignerProviderWithCachedAccounts=m;function _(D){return"Alephium Signed Message: "+D}Wt.extendMessage=_;function w(D,y){switch(y){case"alephium":return s.binToHex(l.default.blake2b(_(D),void 0,32));case"sha256":const U=(0,i.createHash)("sha256");return U.update(o.Buffer.from(D)),s.binToHex(U.digest());case"blake2b":return s.binToHex(l.default.blake2b(D,void 0,32));case"identity":return D;default:throw Error(`Invalid message hasher: ${y}`)}}Wt.hashMessage=w;function g(D,y,U,L,G){const V=w(D,y);return s.verifySignature(V,U,L,G)}Wt.verifySignedMessage=g;function E(D){return{...D,attoAlphAmount:(0,a.toApiNumber256)(D.attoAlphAmount),tokens:(0,a.toApiTokens)(D.tokens)}}Wt.toApiDestination=E;function A(D){return D.map(E)}Wt.toApiDestinations=A;function N(D){return{...D,attoAlphAmount:(0,a.fromApiNumber256)(D.attoAlphAmount),tokens:(0,a.fromApiTokens)(D.tokens)}}return Wt.fromApiDestination=N,Wt}var c5={},h$;function Vke(){if(h$)return c5;h$=1,Object.defineProperty(c5,"__esModule",{value:!0});const e=Xn();return e.assertType,(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),(0,e.assertType)(),e.assertType,(0,e.assertType)(),c5}var v$;function Wke(){return v$||(v$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(PG(),e),r(Vke(),e),r(CG(),e)}(l5)),l5}var u5={},yl={},g$;function qke(){if(g$)return yl;g$=1,Object.defineProperty(yl,"__esModule",{value:!0}),yl.subscribeToTxStatus=yl.TxStatusSubscription=void 0;const e=el(),t=Xn();class r extends t.Subscription{constructor(i,a,s,l,c){super(i),this.txId=a,this.fromGroup=s,this.toGroup=l,this.confirmations=c??1,this.startPolling()}async polling(){try{const i=await e.web3.getCurrentNodeProvider().transactions.getTransactionsStatus({txId:this.txId,fromGroup:this.fromGroup,toGroup:this.toGroup});await this.messageCallback(i),i.type==="Confirmed"&&i.chainConfirmations>=this.confirmations&&this.unsubscribe()}catch(i){await this.errorCallback(i,this)}}}yl.TxStatusSubscription=r;function n(o,i,a,s,l){return new r(o,i,a,s,l)}return yl.subscribeToTxStatus=n,yl}var bl={},m$;function Gke(){if(m$)return bl;m$=1;var e=Le&&Le.__createBinding||(Object.create?function(a,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(a,c,u)}:function(a,s,l,c){c===void 0&&(c=l),a[c]=s[l]}),t=Le&&Le.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),r=Le&&Le.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var l in a)l!=="default"&&Object.prototype.hasOwnProperty.call(a,l)&&e(s,a,l);return t(s,a),s};Object.defineProperty(bl,"__esModule",{value:!0}),bl.transactionVerifySignature=bl.transactionSign=void 0;const n=r(Xn());function o(a,s,l){return n.sign(a,s,l)}bl.transactionSign=o;function i(a,s,l,c){return n.verifySignature(a,s,l,c)}return bl.transactionVerifySignature=i,bl}var y$;function Kke(){return y$||(y$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(qke(),e),r(Gke(),e)}(u5)),u5}var OG={},kG={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateNFTBaseUri=e.validateNFTCollectionUriMetaData=e.validateNFTTokenUriMetaData=e.validNFTCollectionUriMetaDataFields=e.validNFTUriMetaDataAttributeTypes=e.validNFTTokenUriMetaDataAttributesFields=e.validNFTTokenUriMetaDataFields=void 0,e.validNFTTokenUriMetaDataFields=["name","description","image","attributes"],e.validNFTTokenUriMetaDataAttributesFields=["trait_type","value"],e.validNFTUriMetaDataAttributeTypes=["string","number","boolean"],e.validNFTCollectionUriMetaDataFields=["name","description","image"];function t(u){Object.keys(u).forEach(m=>{if(!e.validNFTTokenUriMetaDataFields.includes(m))throw new Error(`Invalid field ${m}, only ${e.validNFTTokenUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=a(u,"description"),p=i(u,"image"),h=o(u.attributes);return{name:f,description:d,image:p,attributes:h}}e.validateNFTTokenUriMetaData=t;function r(u){Object.keys(u).forEach(h=>{if(!e.validNFTCollectionUriMetaDataFields.includes(h))throw new Error(`Invalid field ${h}, only ${e.validNFTCollectionUriMetaDataFields} are allowed`)});const f=i(u,"name"),d=i(u,"description"),p=i(u,"image");return{name:f,description:d,image:p}}e.validateNFTCollectionUriMetaData=r;async function n(u,f){if(c(f)&&f>0){const d=[];for(let p=0;p{if(typeof f!="object")throw new Error("Field 'attributes' should be an array of objects");Object.keys(f).forEach(d=>{if(!e.validNFTTokenUriMetaDataAttributesFields.includes(d))throw new Error(`Invalid field ${d} for attributes, only ${e.validNFTTokenUriMetaDataAttributesFields} are allowed`)}),i(f,"trait_type"),s(f,"value")})}return u}function i(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function a(u,f){const d=u[`${f}`];if(d!==void 0&&!(typeof d=="string"&&d!==""))throw new Error(`JSON field '${f}' is not a non empty string`);return d}function s(u,f){const d=u[`${f}`];if(!(typeof d=="string"&&d!==""||typeof d=="number"||typeof d=="boolean"))throw new Error("Attribute value should be a non empty string, number or boolean");return d}async function l(u,f){try{return await(await fetch(`${u}${f}`)).json()}catch(d){throw new Error(`Error fetching NFT metadata from ${u}${f}: ${d}`)}}function c(u){return u===parseInt(u.toString(),10)}})(kG);(function(e){var t=Le&&Le.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i);var s=Object.getOwnPropertyDescriptor(o,i);(!s||("get"in s?!o.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return o[i]}}),Object.defineProperty(n,a,s)}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=Le&&Le.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(kG,e)})(OG);var b$;function el(){return b$||(b$=1,function(e){var t=Le&&Le.__createBinding||(Object.create?function(i,a,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(a,s);(!c||("get"in c?!a.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(i,l,c)}:function(i,a,s,l){l===void 0&&(l=s),i[l]=a[s]}),r=Le&&Le.__setModuleDefault||(Object.create?function(i,a){Object.defineProperty(i,"default",{enumerable:!0,value:a})}:function(i,a){i.default=a}),n=Le&&Le.__exportStar||function(i,a){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&t(a,i,s)},o=Le&&Le.__importStar||function(i){if(i&&i.__esModule)return i;var a={};if(i!=null)for(var s in i)s!=="default"&&Object.prototype.hasOwnProperty.call(i,s)&&t(a,i,s);return r(a,i),a};Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.web3=void 0,BigInt.prototype.toJSON=function(){return this.toString()},n(wf(),e),n(SG(),e),n(Wke(),e),n(Xn(),e),n(Kke(),e),n(OG,e),n(M0,e),e.web3=o(_G()),e.utils=o(Xn())}(qw)),qw}var Mo={},w$;function AG(){return w$||(w$=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.RELAY_URL=Mo.LOGGER=Mo.RELAY_METHODS=Mo.PROVIDER_NAMESPACE=void 0,Mo.PROVIDER_NAMESPACE="alephium",Mo.RELAY_METHODS=["alph_signAndSubmitTransferTx","alph_signAndSubmitDeployContractTx","alph_signAndSubmitExecuteScriptTx","alph_signAndSubmitUnsignedTx","alph_signUnsignedTx","alph_signMessage","alph_requestNodeApi","alph_requestExplorerApi"],Mo.LOGGER="error",Mo.RELAY_URL="wss://relay.walletconnect.com"),Mo}var x$;function Yke(){if(x$)return Dr;x$=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.parseAccount=Dr.formatAccount=Dr.parseChain=Dr.formatChain=Dr.isCompatibleAddressGroup=Dr.isCompatibleChain=Dr.WalletConnectProvider=void 0;const e=Nn,t=e.__importDefault(eV()),r=e.__importDefault(_Ce),n=ECe,o=el(),i=AG();class a extends o.SignerProvider{static async init(h){const m=new a(h);return await m.initialize(),m}constructor(h){super(),this.events=new t.default,this.account=void 0,this.requestNodeAPI=m=>this.typedRequest("alph_requestNodeApi",m),this.requestExplorerAPI=m=>this.typedRequest("alph_requestExplorerApi",m),this.providerOpts=h,this.networkId=h.networkId,this.addressGroup=h.addressGroup,this.permittedChain=c(this.networkId,this.addressGroup),this.methods=h.methods??[...i.RELAY_METHODS],this.methods.includes("alph_requestNodeApi")?this.nodeProvider=o.NodeProvider.Remote(this.requestNodeAPI):this.nodeProvider=void 0,this.methods.includes("alph_requestExplorerApi")?this.explorerProvider=o.ExplorerProvider.Remote(this.requestExplorerAPI):this.explorerProvider=void 0}async connect(){const{uri:h,approval:m}=await this.client.connect({requiredNamespaces:{alephium:{chains:[this.permittedChain],methods:this.methods,events:["accountChanged"]}}});h&&this.emitEvents("displayUri",h),this.session=await m(),this.updateNamespace(this.session.namespaces)}async disconnect(){if(!this.client)throw new Error("Sign Client not initialized");await this.providerOpts.onDisconnected(),await this.client.disconnect({topic:this.session.topic,reason:(0,n.getSdkError)("USER_DISCONNECTED")})}on(h,m){this.events.on(h,m)}once(h,m){this.events.once(h,m)}removeListener(h,m){this.events.removeListener(h,m)}off(h,m){this.events.off(h,m)}unsafeGetSelectedAccount(){if(this.account===void 0)throw Error("Account is not available");return Promise.resolve(this.account)}async signAndSubmitTransferTx(h){return this.typedRequest("alph_signAndSubmitTransferTx",h)}async signAndSubmitDeployContractTx(h){return this.typedRequest("alph_signAndSubmitDeployContractTx",h)}async signAndSubmitExecuteScriptTx(h){return this.typedRequest("alph_signAndSubmitExecuteScriptTx",h)}async signAndSubmitUnsignedTx(h){return this.typedRequest("alph_signAndSubmitUnsignedTx",h)}async signUnsignedTx(h){return this.typedRequest("alph_signUnsignedTx",h)}async signMessage(h){return this.typedRequest("alph_signMessage",h)}async initialize(){await this.createClient(),this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await r.default.init({logger:this.providerOpts.logger||i.LOGGER,relayUrl:this.providerOpts.relayUrl||i.RELAY_URL,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata})}checkStorage(){if(this.client.session.length){const h=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[h])}}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",h=>{this.emitEvents("session_ping",h)}),this.client.on("session_event",h=>{this.emitEvents("session_event",h)}),this.client.on("session_update",({topic:h,params:m})=>{var g;const{namespaces:_}=m,w=(g=this.client)==null?void 0:g.session.get(h);this.session={...w,namespaces:_},this.updateNamespace(this.session.namespaces),this.emitEvents("session_update",{topic:h,params:m})}),this.client.on("session_delete",()=>{this.emitEvents("session_delete")})}emitEvents(h,m){this.events.emit(h,m)}typedRequest(h,m){return this.request({method:h,params:m})}async request(h){var m,_;if(!this.methods.includes(h.method))return Promise.reject(new Error(`Invalid method was passed: ${h.method}`));if(!h.method.startsWith("alph_request")){const w=(m=h.params)==null?void 0:m.signerAddress;if(typeof w>"u")throw new Error("Cannot request without signerAddress");const g=(await this.getSelectedAccount()).address;if(w!==g)throw new Error(`Invalid signer address: ${h.params.signerAddress}`)}try{return await this.client.request({request:{method:h.method,params:h.params},chainId:this.permittedChain,topic:(_=this.session)==null?void 0:_.topic})}catch(w){throw w.message?new Error(w.message):w}}updateNamespace(h){const m=(0,n.getChainsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setChain(m);const _=(0,n.getAccountsFromNamespaces)(h,[i.PROVIDER_NAMESPACE]);this.setAccounts(_)}sameChains(h,m){return typeof m>"u"?!1:h.join()===m.join()}setChain(h){if(!this.sameChains(h,[this.permittedChain]))throw Error("Network or address group has changed")}sameAccounts(h,m){return typeof m>"u"?!1:h.map(_=>_.address).join()===m.map(_=>_.address).join()}setAccounts(h){const m=h.map(d);if(this.sameAccounts(m,this.lastSetAccounts))return;if(this.lastSetAccounts=m,m.length!==1)throw Error("The WC provider does not supports multiple accounts");const _=m[0];if(!l(_.group,this.addressGroup))throw Error("The new account belongs to an unexpected address group");this.account=_,this.emitEvents("accountChanged",_)}}Dr.WalletConnectProvider=a;function s(p){return p.startsWith(`${i.PROVIDER_NAMESPACE}:`)}Dr.isCompatibleChain=s;function l(p,h){return h===void 0||h===p}Dr.isCompatibleAddressGroup=l;function c(p,h){if(h!==void 0&&h<0)throw Error("Address group in provider needs to be either undefined or non-negative");const m=h!==void 0?h:-1;return`${i.PROVIDER_NAMESPACE}:${p}/${m}`}Dr.formatChain=c;function u(p){const[h,m,_]=p.replace(/\//g,":").split(":"),w=parseInt(_,10);if(w<-1)throw Error("Address group in protocol needs to be either -1 or non-negative");const g=o.networkIds;if(!g.includes(m))throw Error(`Invalid network id, expect one of ${g}`);return{networkId:m,addressGroup:w===-1?void 0:w}}Dr.parseChain=u;function f(p,h){return`${p}:${h.publicKey}/${h.keyType}`}Dr.formatAccount=f;function d(p){const[h,m,_,w,g]=p.replace(/\//g,":").split(":"),E=(0,o.addressFromPublicKey)(w),A=(0,o.groupOfAddress)(E);if(g!=="default"&&g!=="bip340-schnorr")throw Error(`Invalid key type: ${g}`);return{address:E,group:A,publicKey:w,keyType:g}}return Dr.parseAccount=d,Dr}var f5={},_$;function Xke(){if(_$)return f5;_$=1,Object.defineProperty(f5,"__esModule",{value:!0});const e=el();return(0,e.assertType)(),(0,e.assertType)(),f5}(function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Nn;t.__exportStar(Yke(),e),t.__exportStar(AG(),e),t.__exportStar(Xke(),e)})(JH);var G8={};Object.defineProperty(G8,"__esModule",{value:!0});var IG=G8.getWindowMetadata=void 0;const E$=Ft;function Zke(){let e,t;try{e=E$.getDocumentOrThrow(),t=E$.getLocationOrThrow()}catch{return null}function r(){const f=e.getElementsByTagName("link"),d=[];for(let p=0;p-1){const _=h.getAttribute("href");if(_)if(_.toLowerCase().indexOf("https:")===-1&&_.toLowerCase().indexOf("http:")===-1&&_.indexOf("//")!==0){let w=t.protocol+"//"+t.host;if(_.indexOf("/")===0)w+=_;else{const g=t.pathname.split("/");g.pop();const E=g.join("/");w+=E+"/"+_}d.push(w)}else if(_.indexOf("//")===0){const w=t.protocol+_;d.push(w)}else d.push(_)}}return d}function n(...f){const d=e.getElementsByTagName("meta");for(let p=0;ph.getAttribute(_)).filter(_=>_?f.includes(_):!1);if(m.length&&m){const _=h.getAttribute("content");if(_)return _}}return""}function o(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=e.title),f}function i(){return n("description","og:description","twitter:description","keywords")}const a=o(),s=i(),l=t.origin,c=r();return{description:s,url:l,icons:c,name:a}}IG=G8.getWindowMetadata=Zke;var Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});var $G=Gt.getLocalStorage=zG=Gt.getLocalStorageOrThrow=UG=Gt.getCrypto=LG=Gt.getCryptoOrThrow=jG=Gt.getLocation=BG=Gt.getLocationOrThrow=FG=Gt.getNavigator=NG=Gt.getNavigatorOrThrow=RG=Gt.getDocument=MG=Gt.getDocumentOrThrow=DG=Gt.getFromWindowOrThrow=TG=Gt.getFromWindow=void 0;function dc(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var TG=Gt.getFromWindow=dc;function xf(e){const t=dc(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var DG=Gt.getFromWindowOrThrow=xf;function Jke(){return xf("document")}var MG=Gt.getDocumentOrThrow=Jke;function Qke(){return dc("document")}var RG=Gt.getDocument=Qke;function eAe(){return xf("navigator")}var NG=Gt.getNavigatorOrThrow=eAe;function tAe(){return dc("navigator")}var FG=Gt.getNavigator=tAe;function rAe(){return xf("location")}var BG=Gt.getLocationOrThrow=rAe;function nAe(){return dc("location")}var jG=Gt.getLocation=nAe;function oAe(){return xf("crypto")}var LG=Gt.getCryptoOrThrow=oAe;function iAe(){return dc("crypto")}var UG=Gt.getCrypto=iAe;function aAe(){return xf("localStorage")}var zG=Gt.getLocalStorageOrThrow=aAe;function sAe(){return dc("localStorage")}$G=Gt.getLocalStorage=sAe;var lAe=globalThis&&globalThis.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new pAe:typeof navigator<"u"?P$(navigator.userAgent):wAe()}function yAe(e){return e!==""&&gAe.reduce(function(t,r){var n=r[0],o=r[1];if(t)return t;var i=o.exec(e);return!!i&&[n,i]},!1)}function P$(e){var t=yAe(e);if(!t)return null;var r=t[0],n=t[1];if(r==="searchbot")return new dAe;var o=n[1]&&n[1].split(/[._]/).slice(0,3);o?o.length1:!1}function _Ae(){return Gb()?HG()||VG():!1}function WG(){const e=K8();return e&&e.name?e.name.toLowerCase()==="node":!1}function EAe(){return!WG()&&!!qG()}const SAe=TG,CAe=DG,PAe=MG,OAe=RG,kAe=NG,qG=FG,AAe=BG,IAe=jG,$Ae=LG,TAe=UG,DAe=zG,Kb=$G;function MAe(){return IG()}function RAe(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function NAe(e){return typeof e=="string"?e:JSON.stringify(e)}const GG=RAe,KG=NAe;function YG(e,t){const r=KG(t),n=Kb();n&&n.setItem(e,r)}function FAe(e){let t=null,r=null;const n=Kb();return n&&(r=n.getItem(e)),t=r&&GG(r),t}function BAe(e){const t=Kb();t&&t.removeItem(e)}const XG="WALLETCONNECT_DEEPLINK_CHOICE";function jAe(e,t){const r=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${r}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function LAe(e){const t=e.href.split("?")[0];YG(XG,Object.assign(Object.assign({},e),{href:t}))}function ZG(e,t){return e.filter(r=>r.name.toLowerCase().includes(t.toLowerCase()))[0]}function UAe(e,t){let r=e;return t&&(r=t.map(n=>ZG(e,n)).filter(Boolean)),r}const JG="https://registry.walletconnect.com";function zAe(){return JG+"/api/v2/wallets"}function HAe(){return JG+"/api/v2/dapps"}function QG(e,t="mobile"){var r;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(r=e.image_url.sm)!==null&&r!==void 0?r:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function VAe(e,t="mobile"){return Object.values(e).filter(r=>!!r[t].universal||!!r[t].native).map(r=>QG(r,t))}const WAe=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:K8,detectOS:Gb,formatIOSMobile:jAe,formatMobileRegistry:VAe,formatMobileRegistryEntry:QG,getClientMeta:MAe,getCrypto:TAe,getCryptoOrThrow:$Ae,getDappRegistryUrl:HAe,getDocument:OAe,getDocumentOrThrow:PAe,getFromWindow:SAe,getFromWindowOrThrow:CAe,getLocal:FAe,getLocalStorage:Kb,getLocalStorageOrThrow:DAe,getLocation:IAe,getLocationOrThrow:AAe,getMobileLinkRegistry:UAe,getMobileRegistryEntry:ZG,getNavigator:qG,getNavigatorOrThrow:kAe,getWalletRegistryUrl:zAe,isAndroid:HG,isBrowser:EAe,isIOS:VG,isMobile:_Ae,isNode:WG,mobileLinkChoiceKey:XG,removeLocal:BAe,safeJsonParse:GG,safeJsonStringify:KG,saveMobileLinkInfo:LAe,setLocal:YG},Symbol.toStringTag,{value:"Module"})),qAe=Xl(WAe);var j0={},GAe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},eK={},tl={},KAe={}.toString,Y8=Array.isArray||function(e){return KAe.call(e)=="[object Array]"},YAe=Y8;function XAe(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}Et.TYPED_ARRAY_SUPPORT=XAe();var O$=Et.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function Et(e,t,r){return!Et.TYPED_ARRAY_SUPPORT&&!(this instanceof Et)?new Et(e,t,r):typeof e=="number"?tK(this,e):nIe(this,e,t,r)}Et.TYPED_ARRAY_SUPPORT&&(Et.prototype.__proto__=Uint8Array.prototype,Et.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Et[Symbol.species]===Et&&Object.defineProperty(Et,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function X8(e){if(e>=O$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O$.toString(16)+" bytes");return e|0}function ZAe(e){return e!==e}function Hu(e,t){var r;return Et.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=Et.prototype):(r=e,r===null&&(r=new Et(t)),r.length=t),r}function tK(e,t){var r=Hu(e,t<0?0:X8(t)|0);if(!Et.TYPED_ARRAY_SUPPORT)for(var n=0;n55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function nK(e){if(Et.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:rK(e).length}function tIe(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function rIe(e,t,r,n){return tIe(rK(t,e.length-r),e,r,n)}function nIe(e,t,r,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?QAe(e,t,r,n):typeof t=="string"?JAe(e,t):eIe(e,t)}Et.prototype.write=function(t,r,n){r===void 0?(n=this.length,r=0):n===void 0&&typeof r=="string"?(n=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(n)?n=n|0:n=void 0);var o=this.length-r;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return rIe(this,t,r,n)};Et.prototype.slice=function(t,r){var n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else if(i<1e3||!Et.TYPED_ARRAY_SUPPORT)for(a=0;a>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var i;if(typeof t=="number")for(i=r;i40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};no.getSymbolTotalCodewords=function(t){return oIe[t]};no.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};no.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Z8=t};no.isKanjiModeEnabled=function(){return typeof Z8<"u"};no.toSJIS=function(t){return Z8(t)};var Yb={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(r){if(typeof r!="string")throw new Error("Param is not a string");var n=r.toLowerCase();switch(n){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+r)}}e.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},e.from=function(n,o){if(e.isValid(n))return n;try{return t(n)}catch{return o}}})(Yb);function oK(){this.buffer=[],this.length=0}oK.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var r=0;r>>t-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var iIe=oK,k$=tl;function L0(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=k$.alloc(e*e),this.reservedBit=k$.alloc(e*e)}L0.prototype.set=function(e,t,r,n){var o=e*this.size+t;this.data[o]=r,n&&(this.reservedBit[o]=!0)};L0.prototype.get=function(e,t){return this.data[e*this.size+t]};L0.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r};L0.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var aIe=L0,iK={};(function(e){var t=no.getSymbolSize;e.getRowColCoords=function(n){if(n===1)return[];for(var o=Math.floor(n/7)+2,i=t(n),a=i===145?26:Math.ceil((i-13)/(2*o-2))*2,s=[i-7],l=1;l=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var i=o.size,a=0,s=0,l=0,c=null,u=null,f=0;f=5&&(a+=t.N1+(s-5)),c=p,s=1),p=o.get(d,f),p===u?l++:(l>=5&&(a+=t.N1+(l-5)),u=p,l=1)}s>=5&&(a+=t.N1+(s-5)),l>=5&&(a+=t.N1+(l-5))}return a},e.getPenaltyN2=function(o){for(var i=o.size,a=0,s=0;s=10&&(s===1488||s===93)&&a++,l=l<<1&2047|o.get(u,c),u>=10&&(l===1488||l===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){for(var i=0,a=o.data.length,s=0;s=0;){for(var s=a[0],l=0;l - * @license MIT - */(function(e){var t=R0,r=Ab,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=g,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{var X=new Uint8Array(1),M={foo:function(){return 42}};return Object.setPrototypeOf(M,Uint8Array.prototype),Object.setPrototypeOf(X,M),X.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(X){if(X>o)throw new RangeError('The value "'+X+'" is invalid for option "size"');var M=new Uint8Array(X);return Object.setPrototypeOf(M,s.prototype),M}function s(X,M,z){if(typeof X=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(X)}return l(X,M,z)}s.poolSize=8192;function l(X,M,z){if(typeof X=="string")return d(X,M);if(ArrayBuffer.isView(X))return h(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(se(X,ArrayBuffer)||X&&se(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(se(X,SharedArrayBuffer)||X&&se(X.buffer,SharedArrayBuffer)))return m(X,M,z);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Z=X.valueOf&&X.valueOf();if(Z!=null&&Z!==X)return s.from(Z,M,z);var Q=_(X);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return s.from(X[Symbol.toPrimitive]("string"),M,z);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}s.from=function(X,M,z){return l(X,M,z)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function c(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function u(X,M,z){return c(X),X<=0?a(X):M!==void 0?typeof z=="string"?a(X).fill(M,z):a(X).fill(M):a(X)}s.alloc=function(X,M,z){return u(X,M,z)};function f(X){return c(X),a(X<0?0:w(X)|0)}s.allocUnsafe=function(X){return f(X)},s.allocUnsafeSlow=function(X){return f(X)};function d(X,M){if((typeof M!="string"||M==="")&&(M="utf8"),!s.isEncoding(M))throw new TypeError("Unknown encoding: "+M);var z=E(X,M)|0,Z=a(z),Q=Z.write(X,M);return Q!==z&&(Z=Z.slice(0,Q)),Z}function p(X){for(var M=X.length<0?0:w(X.length)|0,z=a(M),Z=0;Z=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return X|0}function g(X){return+X!=X&&(X=0),s.alloc(+X)}s.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==s.prototype},s.compare=function(M,z){if(se(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),se(z,Uint8Array)&&(z=s.from(z,z.offset,z.byteLength)),!s.isBuffer(M)||!s.isBuffer(z))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===z)return 0;for(var Z=M.length,Q=z.length,de=0,we=Math.min(Z,Q);deQ.length?s.from(we).copy(Q,de):Uint8Array.prototype.set.call(Q,we,de);else if(s.isBuffer(we))we.copy(Q,de);else throw new TypeError('"list" argument must be an Array of Buffers');de+=we.length}return Q};function E(X,M){if(s.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||se(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);var z=X.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&z===0)return 0;for(var Q=!1;;)switch(M){case"ascii":case"latin1":case"binary":return z;case"utf8":case"utf-8":return ie(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z*2;case"hex":return z>>>1;case"base64":return K(X).length;default:if(Q)return Z?-1:ie(X).length;M=(""+M).toLowerCase(),Q=!0}}s.byteLength=E;function A(X,M,z){var Z=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((z===void 0||z>this.length)&&(z=this.length),z<=0)||(z>>>=0,M>>>=0,z<=M))return"";for(X||(X="utf8");;)switch(X){case"hex":return H(this,M,z);case"utf8":case"utf-8":return v(this,M,z);case"ascii":return T(this,M,z);case"latin1":case"binary":return j(this,M,z);case"base64":return C(this,M,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,M,z);default:if(Z)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),Z=!0}}s.prototype._isBuffer=!0;function N(X,M,z){var Z=X[M];X[M]=X[z],X[z]=Z}s.prototype.swap16=function(){var M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var z=0;zz&&(M+=" ... "),""},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(M,z,Z,Q,de){if(se(M,Uint8Array)&&(M=s.from(M,M.offset,M.byteLength)),!s.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if(z===void 0&&(z=0),Z===void 0&&(Z=M?M.length:0),Q===void 0&&(Q=0),de===void 0&&(de=this.length),z<0||Z>M.length||Q<0||de>this.length)throw new RangeError("out of range index");if(Q>=de&&z>=Z)return 0;if(Q>=de)return-1;if(z>=Z)return 1;if(z>>>=0,Z>>>=0,Q>>>=0,de>>>=0,this===M)return 0;for(var we=de-Q,Se=Z-z,Ee=Math.min(we,Se),ke=this.slice(Q,de),Te=M.slice(z,Z),W=0;W2147483647?z=2147483647:z<-2147483648&&(z=-2147483648),z=+z,pe(z)&&(z=Q?0:X.length-1),z<0&&(z=X.length+z),z>=X.length){if(Q)return-1;z=X.length-1}else if(z<0)if(Q)z=0;else return-1;if(typeof M=="string"&&(M=s.from(M,Z)),s.isBuffer(M))return M.length===0?-1:y(X,M,z,Z,Q);if(typeof M=="number")return M=M&255,typeof Uint8Array.prototype.indexOf=="function"?Q?Uint8Array.prototype.indexOf.call(X,M,z):Uint8Array.prototype.lastIndexOf.call(X,M,z):y(X,[M],z,Z,Q);throw new TypeError("val must be string, number or Buffer")}function y(X,M,z,Z,Q){var de=1,we=X.length,Se=M.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(X.length<2||M.length<2)return-1;de=2,we/=2,Se/=2,z/=2}function Ee(I,Y){return de===1?I[Y]:I.readUInt16BE(Y*de)}var ke;if(Q){var Te=-1;for(ke=z;kewe&&(z=we-Se),ke=z;ke>=0;ke--){for(var W=!0,x=0;xQ&&(Z=Q)):Z=Q;var de=M.length;Z>de/2&&(Z=de/2);for(var we=0;we>>0,isFinite(Z)?(Z=Z>>>0,Q===void 0&&(Q="utf8")):(Q=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var de=this.length-z;if((Z===void 0||Z>de)&&(Z=de),M.length>0&&(Z<0||z<0)||z>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");for(var we=!1;;)switch(Q){case"hex":return U(this,M,z,Z);case"utf8":case"utf-8":return L(this,M,z,Z);case"ascii":case"latin1":case"binary":return G(this,M,z,Z);case"base64":return V(this,M,z,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,M,z,Z);default:if(we)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),we=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(X,M,z){return M===0&&z===X.length?t.fromByteArray(X):t.fromByteArray(X.slice(M,z))}function v(X,M,z){z=Math.min(X.length,z);for(var Z=[],Q=M;Q239?4:de>223?3:de>191?2:1;if(Q+Se<=z){var Ee,ke,Te,W;switch(Se){case 1:de<128&&(we=de);break;case 2:Ee=X[Q+1],(Ee&192)===128&&(W=(de&31)<<6|Ee&63,W>127&&(we=W));break;case 3:Ee=X[Q+1],ke=X[Q+2],(Ee&192)===128&&(ke&192)===128&&(W=(de&15)<<12|(Ee&63)<<6|ke&63,W>2047&&(W<55296||W>57343)&&(we=W));break;case 4:Ee=X[Q+1],ke=X[Q+2],Te=X[Q+3],(Ee&192)===128&&(ke&192)===128&&(Te&192)===128&&(W=(de&15)<<18|(Ee&63)<<12|(ke&63)<<6|Te&63,W>65535&&W<1114112&&(we=W))}}we===null?(we=65533,Se=1):we>65535&&(we-=65536,Z.push(we>>>10&1023|55296),we=56320|we&1023),Z.push(we),Q+=Se}return B(Z)}var b=4096;function B(X){var M=X.length;if(M<=b)return String.fromCharCode.apply(String,X);for(var z="",Z=0;ZZ)&&(z=Z);for(var Q="",de=M;deZ&&(M=Z),z<0?(z+=Z,z<0&&(z=0)):z>Z&&(z=Z),zz)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M],de=1,we=0;++we>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M+--z],de=1;z>0&&(de*=256);)Q+=this[M+--z]*de;return Q},s.prototype.readUint8=s.prototype.readUInt8=function(M,z){return M=M>>>0,z||F(M,1,this.length),this[M]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(M,z){return M=M>>>0,z||F(M,2,this.length),this[M]|this[M+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(M,z){return M=M>>>0,z||F(M,2,this.length),this[M]<<8|this[M+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(M,z){return M=M>>>0,z||F(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},s.prototype.readIntLE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=this[M],de=1,we=0;++we=de&&(Q-=Math.pow(2,8*z)),Q},s.prototype.readIntBE=function(M,z,Z){M=M>>>0,z=z>>>0,Z||F(M,z,this.length);for(var Q=z,de=1,we=this[M+--Q];Q>0&&(de*=256);)we+=this[M+--Q]*de;return de*=128,we>=de&&(we-=Math.pow(2,8*z)),we},s.prototype.readInt8=function(M,z){return M=M>>>0,z||F(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},s.prototype.readInt16LE=function(M,z){M=M>>>0,z||F(M,2,this.length);var Z=this[M]|this[M+1]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt16BE=function(M,z){M=M>>>0,z||F(M,2,this.length);var Z=this[M+1]|this[M]<<8;return Z&32768?Z|4294901760:Z},s.prototype.readInt32LE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},s.prototype.readInt32BE=function(M,z){return M=M>>>0,z||F(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},s.prototype.readFloatLE=function(M,z){return M=M>>>0,z||F(M,4,this.length),r.read(this,M,!0,23,4)},s.prototype.readFloatBE=function(M,z){return M=M>>>0,z||F(M,4,this.length),r.read(this,M,!1,23,4)},s.prototype.readDoubleLE=function(M,z){return M=M>>>0,z||F(M,8,this.length),r.read(this,M,!0,52,8)},s.prototype.readDoubleBE=function(M,z){return M=M>>>0,z||F(M,8,this.length),r.read(this,M,!1,52,8)};function $(X,M,z,Z,Q,de){if(!s.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Q||MX.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(M,z,Z,Q){if(M=+M,z=z>>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;$(this,M,z,Z,de,0)}var we=1,Se=0;for(this[z]=M&255;++Se>>0,Z=Z>>>0,!Q){var de=Math.pow(2,8*Z)-1;$(this,M,z,Z,de,0)}var we=Z-1,Se=1;for(this[z+we]=M&255;--we>=0&&(Se*=256);)this[z+we]=M/Se&255;return z+Z},s.prototype.writeUint8=s.prototype.writeUInt8=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,1,255,0),this[z]=M&255,z+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,2,65535,0),this[z]=M&255,this[z+1]=M>>>8,z+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,2,65535,0),this[z]=M>>>8,this[z+1]=M&255,z+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,4,4294967295,0),this[z+3]=M>>>24,this[z+2]=M>>>16,this[z+1]=M>>>8,this[z]=M&255,z+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,4,4294967295,0),this[z]=M>>>24,this[z+1]=M>>>16,this[z+2]=M>>>8,this[z+3]=M&255,z+4},s.prototype.writeIntLE=function(M,z,Z,Q){if(M=+M,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);$(this,M,z,Z,de-1,-de)}var we=0,Se=1,Ee=0;for(this[z]=M&255;++we>0)-Ee&255;return z+Z},s.prototype.writeIntBE=function(M,z,Z,Q){if(M=+M,z=z>>>0,!Q){var de=Math.pow(2,8*Z-1);$(this,M,z,Z,de-1,-de)}var we=Z-1,Se=1,Ee=0;for(this[z+we]=M&255;--we>=0&&(Se*=256);)M<0&&Ee===0&&this[z+we+1]!==0&&(Ee=1),this[z+we]=(M/Se>>0)-Ee&255;return z+Z},s.prototype.writeInt8=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,1,127,-128),M<0&&(M=255+M+1),this[z]=M&255,z+1},s.prototype.writeInt16LE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,2,32767,-32768),this[z]=M&255,this[z+1]=M>>>8,z+2},s.prototype.writeInt16BE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,2,32767,-32768),this[z]=M>>>8,this[z+1]=M&255,z+2},s.prototype.writeInt32LE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,4,2147483647,-2147483648),this[z]=M&255,this[z+1]=M>>>8,this[z+2]=M>>>16,this[z+3]=M>>>24,z+4},s.prototype.writeInt32BE=function(M,z,Z){return M=+M,z=z>>>0,Z||$(this,M,z,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[z]=M>>>24,this[z+1]=M>>>16,this[z+2]=M>>>8,this[z+3]=M&255,z+4};function q(X,M,z,Z,Q,de){if(z+Z>X.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("Index out of range")}function J(X,M,z,Z,Q){return M=+M,z=z>>>0,Q||q(X,M,z,4),r.write(X,M,z,Z,23,4),z+4}s.prototype.writeFloatLE=function(M,z,Z){return J(this,M,z,!0,Z)},s.prototype.writeFloatBE=function(M,z,Z){return J(this,M,z,!1,Z)};function te(X,M,z,Z,Q){return M=+M,z=z>>>0,Q||q(X,M,z,8),r.write(X,M,z,Z,52,8),z+8}s.prototype.writeDoubleLE=function(M,z,Z){return te(this,M,z,!0,Z)},s.prototype.writeDoubleBE=function(M,z,Z){return te(this,M,z,!1,Z)},s.prototype.copy=function(M,z,Z,Q){if(!s.isBuffer(M))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!Q&&Q!==0&&(Q=this.length),z>=M.length&&(z=M.length),z||(z=0),Q>0&&Q=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),M.length-z>>0,Z=Z===void 0?this.length:Z>>>0,M||(M=0);var we;if(typeof M=="number")for(we=z;we55295&&z<57344){if(!Q){if(z>56319){(M-=3)>-1&&de.push(239,191,189);continue}else if(we+1===Z){(M-=3)>-1&&de.push(239,191,189);continue}Q=z;continue}if(z<56320){(M-=3)>-1&&de.push(239,191,189),Q=z;continue}z=(Q-55296<<10|z-56320)+65536}else Q&&(M-=3)>-1&&de.push(239,191,189);if(Q=null,z<128){if((M-=1)<0)break;de.push(z)}else if(z<2048){if((M-=2)<0)break;de.push(z>>6|192,z&63|128)}else if(z<65536){if((M-=3)<0)break;de.push(z>>12|224,z>>6&63|128,z&63|128)}else if(z<1114112){if((M-=4)<0)break;de.push(z>>18|240,z>>12&63|128,z>>6&63|128,z&63|128)}else throw new Error("Invalid code point")}return de}function ue(X){for(var M=[],z=0;z>8,Q=z%256,de.push(Q),de.push(Z);return de}function K(X){return t.toByteArray(ce(X))}function ee(X,M,z,Z){for(var Q=0;Q=M.length||Q>=X.length);++Q)M[Q+z]=X[Q];return Q}function se(X,M){return X instanceof M||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===M.name}function pe(X){return X!==X}var ge=function(){for(var X="0123456789abcdef",M=new Array(256),z=0;z<16;++z)for(var Z=z*16,Q=0;Q<16;++Q)M[Z+Q]=X[z]+X[Q];return M}()})(uK);var I$=tl,fK=lK,lIe=uK.Buffer;function J8(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}J8.prototype.initialize=function(t){this.degree=t,this.genPoly=fK.generateECPolynomial(this.degree)};J8.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var r=I$.alloc(this.degree),n=lIe.concat([t,r],t.length+this.degree),o=fK.mod(n,this.genPoly),i=this.degree-o.length;if(i>0){var a=I$.alloc(this.degree);return o.copy(a,i),a}return o};var cIe=J8,dK={},rl={},Q8={};Q8.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var Li={},pK="[0-9]+",uIe="[A-Z $%*+\\-./:]+",qp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";qp=qp.replace(/u/g,"\\u");var fIe="(?:(?![A-Z0-9 $%*+\\-./:]|"+qp+`)(?:.|[\r -]))+`;Li.KANJI=new RegExp(qp,"g");Li.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Li.BYTE=new RegExp(fIe,"g");Li.NUMERIC=new RegExp(pK,"g");Li.ALPHANUMERIC=new RegExp(uIe,"g");var dIe=new RegExp("^"+qp+"$"),pIe=new RegExp("^"+pK+"$"),hIe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Li.testKanji=function(t){return dIe.test(t)};Li.testNumeric=function(t){return pIe.test(t)};Li.testAlphanumeric=function(t){return hIe.test(t)};(function(e){var t=Q8,r=Li;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(i,a){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?i.ccBits[0]:a<27?i.ccBits[1]:i.ccBits[2]},e.getBestModeForData=function(i){return r.testNumeric(i)?e.NUMERIC:r.testAlphanumeric(i)?e.ALPHANUMERIC:r.testKanji(i)?e.KANJI:e.BYTE},e.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},e.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");var i=o.toLowerCase();switch(i){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(i,a){if(e.isValid(i))return i;try{return n(i)}catch{return a}}})(rl);(function(e){var t=no,r=Xb,n=Yb,o=rl,i=Q8,a=Y8,s=7973,l=t.getBCHDigit(s);function c(p,h,m){for(var _=1;_<=40;_++)if(h<=e.getCapacity(_,m,p))return _}function u(p,h){return o.getCharCountIndicator(p,h)+4}function f(p,h){var m=0;return p.forEach(function(_){var w=u(_.mode,h);m+=w+_.getBitsLength()}),m}function d(p,h){for(var m=1;m<=40;m++){var _=f(p,m);if(_<=e.getCapacity(m,h,o.MIXED))return m}}e.from=function(h,m){return i.isValid(h)?parseInt(h,10):m},e.getCapacity=function(h,m,_){if(!i.isValid(h))throw new Error("Invalid QR Code version");typeof _>"u"&&(_=o.BYTE);var w=t.getSymbolTotalCodewords(h),g=r.getTotalCodewordsCount(h,m),E=(w-g)*8;if(_===o.MIXED)return E;var A=E-u(_,h);switch(_){case o.NUMERIC:return Math.floor(A/10*3);case o.ALPHANUMERIC:return Math.floor(A/11*2);case o.KANJI:return Math.floor(A/13);case o.BYTE:default:return Math.floor(A/8)}},e.getBestVersionForData=function(h,m){var _,w=n.from(m,n.M);if(a(h)){if(h.length>1)return d(h,w);if(h.length===0)return 1;_=h[0]}else _=h;return c(_.mode,_.getLength(),w)},e.getEncodedBits=function(h){if(!i.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var m=h<<12;t.getBCHDigit(m)-l>=0;)m^=s<=0;)o^=vK<0&&(n=this.data.substr(r),o=parseInt(n,10),t.put(o,i*3+1))};var mIe=Vu,yIe=rl,d5=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Wu(e){this.mode=yIe.ALPHANUMERIC,this.data=e}Wu.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Wu.prototype.getLength=function(){return this.data.length};Wu.prototype.getBitsLength=function(){return Wu.getBitsLength(this.data.length)};Wu.prototype.write=function(t){var r;for(r=0;r+2<=this.data.length;r+=2){var n=d5.indexOf(this.data[r])*45;n+=d5.indexOf(this.data[r+1]),t.put(n,11)}this.data.length%2&&t.put(d5.indexOf(this.data[r]),6)};var bIe=Wu,wIe=tl,xIe=rl;function qu(e){this.mode=xIe.BYTE,this.data=wIe.from(e)}qu.getBitsLength=function(t){return t*8};qu.prototype.getLength=function(){return this.data.length};qu.prototype.getBitsLength=function(){return qu.getBitsLength(this.data.length)};qu.prototype.write=function(e){for(var t=0,r=this.data.length;t=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` -Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),e.put(r,13)}};var CIe=Gu,mK={exports:{}};(function(e){var t={single_source_shortest_paths:function(r,n,o){var i={},a={};a[n]=0;var s=t.PriorityQueue.make();s.push(n,0);for(var l,c,u,f,d,p,h,m,_;!s.empty();){l=s.pop(),c=l.value,f=l.cost,d=r[c]||{};for(u in d)d.hasOwnProperty(u)&&(p=d[u],h=f+p,m=a[u],_=typeof a[u]>"u",(_||m>h)&&(a[u]=h,s.push(u,h),i[u]=c))}if(typeof o<"u"&&typeof a[o]>"u"){var w=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(w)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=t.single_source_shortest_paths(r,n,o);return t.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=t.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(mK);var PIe=mK.exports;(function(e){var t=rl,r=mIe,n=bIe,o=_Ie,i=CIe,a=Li,s=no,l=PIe;function c(w){return unescape(encodeURIComponent(w)).length}function u(w,g,E){for(var A=[],N;(N=w.exec(E))!==null;)A.push({data:N[0],index:N.index,mode:g,length:N[0].length});return A}function f(w){var g=u(a.NUMERIC,t.NUMERIC,w),E=u(a.ALPHANUMERIC,t.ALPHANUMERIC,w),A,N;s.isKanjiModeEnabled()?(A=u(a.BYTE,t.BYTE,w),N=u(a.KANJI,t.KANJI,w)):(A=u(a.BYTE_KANJI,t.BYTE,w),N=[]);var D=g.concat(E,A,N);return D.sort(function(y,U){return y.index-U.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function d(w,g){switch(g){case t.NUMERIC:return r.getBitsLength(w);case t.ALPHANUMERIC:return n.getBitsLength(w);case t.KANJI:return i.getBitsLength(w);case t.BYTE:return o.getBitsLength(w)}}function p(w){return w.reduce(function(g,E){var A=g.length-1>=0?g[g.length-1]:null;return A&&A.mode===E.mode?(g[g.length-1].data+=E.data,g):(g.push(E),g)},[])}function h(w){for(var g=[],E=0;E=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(i+s,a+l,!0,!0):e.set(i+s,a+l,!1,!0))}function NIe(e){for(var t=e.size,r=8;r>s&1)===1,e.set(o,i,a,!0),e.set(i,o,a,!0)}function v5(e,t,r){var n=e.size,o=TIe.getEncodedBits(t,r),i,a;for(i=0;i<15;i++)a=(o>>i&1)===1,i<6?e.set(i,8,a,!0):i<8?e.set(i+1,8,a,!0):e.set(n-15+i,8,a,!0),i<8?e.set(8,n-i-1,a,!0):i<9?e.set(8,15-i-1+1,a,!0):e.set(8,15-i-1,a,!0);e.set(n-8,8,1,!0)}function jIe(e,t){for(var r=e.size,n=-1,o=r-1,i=7,a=0,s=r-1;s>0;s-=2)for(s===6&&s--;;){for(var l=0;l<2;l++)if(!e.isReserved(o,s-l)){var c=!1;a>>i&1)===1),e.set(o,s-l,c),i--,i===-1&&(a++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function LIe(e,t,r){var n=new OIe;r.forEach(function(c){n.put(c.mode.bit,4),n.put(c.getLength(),DIe.getCharCountIndicator(c.mode,e)),c.write(n)});var o=Jb.getSymbolTotalCodewords(e),i=Jx.getTotalCodewordsCount(e,t),a=(o-i)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);for(var s=(a-n.getLengthInBits())/8,l=0;l=7&&BIe(u,t),jIe(u,l),isNaN(n)&&(n=Zx.getBestMask(u,v5.bind(null,u,r))),Zx.applyMask(n,u),v5(u,r,n),{modules:u,version:t,errorCorrectionLevel:r,maskPattern:n,segments:o}}eK.create=function(t,r){if(typeof t>"u"||t==="")throw new Error("No input text");var n=p5.M,o,i;return typeof r<"u"&&(n=p5.from(r.errorCorrectionLevel,p5.M),o=qm.from(r.version),i=Zx.from(r.maskPattern),r.toSJISFunc&&Jb.setToSJISFunction(r.toSJISFunc)),zIe(t,o,n,i)};var yK={},eE={};(function(e){function t(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");var n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");var o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}e.getOptions=function(n){n||(n={}),n.color||(n.color={});var o=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:i,scale:i?4:a,margin:o,color:{dark:t(n.color.dark||"#000000ff"),light:t(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},e.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},e.getImageWidth=function(n,o){var i=e.getScale(n,o);return Math.floor((n+o.margin*2)*i)},e.qrToImageData=function(n,o,i){for(var a=o.modules.size,s=o.modules.data,l=e.getScale(a,i),c=Math.floor((a+i.margin*2)*l),u=i.margin*l,f=[i.color.light,i.color.dark],d=0;d=u&&p>=u&&d"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(c=n()),l=t.getOptions(l);var u=t.getImageWidth(i.modules.size,l),f=c.getContext("2d"),d=f.createImageData(u,u);return t.qrToImageData(d.data,i,l),r(f,c,u),f.putImageData(d,0,0),c},e.renderToDataURL=function(i,a,s){var l=s;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});var c=e.render(i,a,l),u=l.type||"image/png",f=l.rendererOpts||{};return c.toDataURL(u,f.quality)}})(yK);var bK={},HIe=eE;function D$(e,t){var r=e.a/255,n=t+'="'+e.hex+'"';return r<1?n+" "+t+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function g5(e,t,r){var n=e+t;return typeof r<"u"&&(n+=" "+r),n}function VIe(e,t,r){for(var n="",o=0,i=!1,a=0,s=0;s0&&l>0&&e[s-1]||(n+=i?g5("M",l+r,.5+c+r):g5("m",o,0),o=0,i=!1),l+1':"",c="',u='viewBox="0 0 '+s+" "+s+'"',f=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",d=''+l+c+` -`;return typeof n=="function"&&n(null,d),d};var WIe=GAe,Qx=eK,wK=yK,qIe=bK;function tE(e,t,r,n,o){var i=[].slice.call(arguments,1),a=i.length,s=typeof i[a-1]=="function";if(!s&&!WIe())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(o=r,r=t,t=n=void 0):a===3&&(t.getContext&&typeof o>"u"?(o=n,n=void 0):(o=n,n=r,r=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=t,t=n=void 0):a===2&&!t.getContext&&(n=r,r=t,t=void 0),new Promise(function(c,u){try{var f=Qx.create(r,n);c(e(f,t,n))}catch(d){u(d)}})}try{var l=Qx.create(r,n);o(null,e(l,t,n))}catch(c){o(c)}}j0.create=Qx.create;j0.toCanvas=tE.bind(null,wK.render);j0.toDataURL=tE.bind(null,wK.renderToDataURL);j0.toString=tE.bind(null,function(e,t,r){return qIe.render(e,r)});var GIe=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=M$[t.format]||M$.default;window.clipboardData.setData(f,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=XIe("message"in t?t.message:YIe),window.prompt(n,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l}var JIe=ZIe,vt,Qd,rE,xK,R$,nE,_K,ya={},Qb=[],QIe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function ha(e,t){for(var r in t)e[r]=t[r];return e}function EK(e){var t=e.parentNode;t&&t.removeChild(e)}function Ba(e,t,r){var n,o=arguments,i={};for(n in t)n!=="key"&&n!=="ref"&&(i[n]=t[n]);if(arguments.length>3)for(r=[r],n=3;n2&&(t.children=Qb.slice.call(arguments,2)),r={},t)n!=="key"&&n!=="ref"&&(r[n]=t[n]);return Gm(e.type,r,t.key||e.key,t.ref||e.ref,null)}function IK(e){var t={},r={__c:"__cC"+_K++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i=this;return this.getChildContext||(o=[],this.getChildContext=function(){return t[r.__c]=i,t},this.shouldComponentUpdate=function(a){i.props.value!==a.value&&o.some(function(s){s.context=a.value,G1(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Consumer.contextType=r,r.Provider.__=r,r}vt={__e:function(e,t){for(var r,n;t=t.__;)if((r=t.__c)&&!r.__)try{if(r.constructor&&r.constructor.getDerivedStateFromError!=null&&(n=!0,r.setState(r.constructor.getDerivedStateFromError(e))),r.componentDidCatch!=null&&(n=!0,r.componentDidCatch(e)),n)return G1(r.__E=r)}catch(o){e=o}throw e}},Zo.prototype.setState=function(e,t){var r;r=this.__s!==this.state?this.__s:this.__s=ha({},this.state),typeof e=="function"&&(e=e(r,this.props)),e&&ha(r,e),e!=null&&this.__v&&(t&&this.__h.push(t),G1(this))},Zo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G1(this))},Zo.prototype.render=U0,Qd=[],rE=0,xK=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,nE=ya,_K=0;var pc,kn,B$,Ku=0,e6=[],j$=vt.__r,L$=vt.diffed,U$=vt.__c,z$=vt.unmount;function _f(e,t){vt.__h&&vt.__h(kn,e,Ku||t),Ku=0;var r=kn.__H||(kn.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function iE(e){return Ku=1,aE(FK,e)}function aE(e,t,r){var n=_f(pc++,2);return n.__c||(n.__c=kn,n.__=[r?r(t):FK(void 0,t),function(o){var i=e(n.__[0],o);n.__[0]!==i&&(n.__[0]=i,n.__c.setState({}))}]),n.__}function $K(e,t){var r=_f(pc++,3);!vt.__s&&lE(r.__H,t)&&(r.__=e,r.__H=t,kn.__H.__h.push(r))}function sE(e,t){var r=_f(pc++,4);!vt.__s&&lE(r.__H,t)&&(r.__=e,r.__H=t,kn.__h.push(r))}function TK(e){return Ku=5,e2(function(){return{current:e}},[])}function DK(e,t,r){Ku=6,sE(function(){typeof e=="function"?e(t()):e&&(e.current=t())},r==null?r:r.concat(e))}function e2(e,t){var r=_f(pc++,7);return lE(r.__H,t)?(r.__H=t,r.__h=e,r.__=e()):r.__}function MK(e,t){return Ku=8,e2(function(){return e},t)}function RK(e){var t=kn.context[e.__c],r=_f(pc++,9);return r.__c=e,t?(r.__==null&&(r.__=!0,t.sub(kn)),t.props.value):e.__}function NK(e,t){vt.useDebugValue&&vt.useDebugValue(t?t(e):e)}function i$e(e){var t=_f(pc++,10),r=iE();return t.__=e,kn.componentDidCatch||(kn.componentDidCatch=function(n){t.__&&t.__(n),r[1](n)}),[r[0],function(){r[1](void 0)}]}function a$e(){e6.some(function(e){if(e.__P)try{e.__H.__h.forEach(t6),e.__H.__h.forEach(r6),e.__H.__h=[]}catch(t){return e.__H.__h=[],vt.__e(t,e.__v),!0}}),e6=[]}function t6(e){e.t&&e.t()}function r6(e){var t=e.__();typeof t=="function"&&(e.t=t)}function lE(e,t){return!e||t.some(function(r,n){return r!==e[n]})}function FK(e,t){return typeof t=="function"?t(e):t}vt.__r=function(e){j$&&j$(e),pc=0,(kn=e.__c).__H&&(kn.__H.__h.forEach(t6),kn.__H.__h.forEach(r6),kn.__H.__h=[])},vt.diffed=function(e){L$&&L$(e);var t=e.__c;if(t){var r=t.__H;r&&r.__h.length&&(e6.push(t)!==1&&B$===vt.requestAnimationFrame||((B$=vt.requestAnimationFrame)||function(n){var o,i=function(){clearTimeout(a),cancelAnimationFrame(o),setTimeout(n)},a=setTimeout(i,100);typeof window<"u"&&(o=requestAnimationFrame(i))})(a$e))}},vt.__c=function(e,t){t.some(function(r){try{r.__h.forEach(t6),r.__h=r.__h.filter(function(n){return!n.__||r6(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],vt.__e(n,r.__v)}}),U$&&U$(e,t)},vt.unmount=function(e){z$&&z$(e);var t=e.__c;if(t){var r=t.__H;if(r)try{r.__.forEach(function(n){return n.t&&n.t()})}catch(n){vt.__e(n,t.__v)}}};function cE(e,t){for(var r in t)e[r]=t[r];return e}function n6(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}var BK=function(e){var t,r;function n(o){var i;return(i=e.call(this,o)||this).isPureReactComponent=!0,i}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.shouldComponentUpdate=function(o,i){return n6(this.props,o)||n6(this.state,i)},n}(Zo);function jK(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:n6(this.props,o)}function n(o){return this.shouldComponentUpdate=r,Ba(e,cE({},o))}return n.prototype.isReactComponent=!0,n.displayName="Memo("+(e.displayName||e.name)+")",n.t=!0,n}var H$=vt.__b;function LK(e){function t(r){var n=cE({},r);return delete n.ref,e(n,r.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}vt.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),H$&&H$(e)};var V$=function(e,t){return e?$s(e).reduce(function(r,n,o){return r.concat(t(n,o))},[]):null},UK={map:V$,forEach:V$,count:function(e){return e?$s(e).length:0},only:function(e){if((e=$s(e)).length!==1)throw new Error("Children.only() expects only one child.");return e[0]},toArray:$s},s$e=vt.__e;function zK(e){return e&&((e=cE({},e)).__c=null,e.__k=e.__k&&e.__k.map(zK)),e}function Ym(){this.__u=0,this.o=null,this.__b=null}function HK(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function VK(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return Ba(r,i)}return o.displayName="Lazy",o.t=!0,o}function ru(){this.i=null,this.l=null}vt.__e=function(e,t,r){if(e.then){for(var n,o=t;o=o.__;)if((n=o.__c)&&n.__c)return n.__c(e,t.__c)}s$e(e,t,r)},(Ym.prototype=new Zo).__c=function(e,t){var r=this;r.o==null&&(r.o=[]),r.o.push(t);var n=HK(r.__v),o=!1,i=function(){o||(o=!0,n?n(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var a=function(){var s;if(!--r.__u)for(r.__v.__k[0]=r.state.u,r.setState({u:r.__b=null});s=r.o.pop();)s.forceUpdate()};r.__u++||r.setState({u:r.__b=r.__v.__k[0]}),e.then(i,i)},Ym.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=zK(this.__b),this.__b=null),[Ba(Zo,null,t.u?null:e.children),t.u&&e.fallback]};var W$=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]8?2.5:2.7)+"vw":"inherit";return et.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:r,onClick:i,rel:"noopener noreferrer",target:"_blank"},et.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+o+"') "+t,backgroundSize:"100%"}}),et.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},n))}var I$e=5,y5=12;function $$e(e){var t=mn.isAndroid(),r=et.useState(""),n=r[0],o=r[1],i=et.useState(""),a=i[0],s=i[1],l=et.useState(1),c=l[0],u=l[1],f=a?e.links.filter(function(A){return A.name.toLowerCase().includes(a.toLowerCase())}):e.links,d=e.errorMessage,p=a||f.length>I$e,h=Math.ceil(f.length/y5),m=[(c-1)*y5+1,c*y5],_=f.length?f.filter(function(A,N){return N+1>=m[0]&&N+1<=m[1]}):[],w=!t&&h>1,g=void 0;function E(A){o(A.target.value),clearTimeout(g),A.target.value?g=setTimeout(function(){s(A.target.value),u(1)},1e3):(o(""),s(""),u(1))}return et.createElement("div",null,et.createElement("p",{id:rY,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),!t&&et.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:n,onChange:E}),et.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":p&&f.length?"__wrap":"")},t?et.createElement(P$e,{name:e.text.connect,color:_$e,href:e.uri,onClick:et.useCallback(function(){mn.saveMobileLinkInfo({name:"Unknown",href:e.uri})},[])}):_.length?_.map(function(A){var N=A.color,D=A.name,y=A.shortName,U=A.logo,L=mn.formatIOSMobile(e.uri,A),G=et.useCallback(function(){mn.saveMobileLinkInfo({name:D,href:L})},[_]);return p?et.createElement(A$e,{color:N,href:L,name:y||D,logo:U,onClick:G}):et.createElement(k$e,{color:N,href:L,name:D,logo:U,onClick:G})}):et.createElement(et.Fragment,null,et.createElement("p",null,d.length?e.errorMessage:e.links.length&&!f.length?e.text.no_wallets_found:e.text.loading))),w&&et.createElement("div",{className:"walletconnect-modal__footer"},Array(h).fill(0).map(function(A,N){var D=N+1,y=c===D;return et.createElement("a",{style:{margin:"auto 10px",fontWeight:y?"bold":"normal"},onClick:function(){return u(D)}},D)})))}function T$e(e){var t=!!e.message.trim();return et.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}var D$e=function(e){try{var t="";return Promise.resolve(QK.toString(e,{margin:0,type:"svg"})).then(function(r){return typeof r=="string"&&(t=r.replace("0||et.useEffect(function(){var S=function(){try{if(t)return Promise.resolve();a(!0);var C=y$e(function(){var v=e.qrcodeModalOptions&&e.qrcodeModalOptions.registryUrl?e.qrcodeModalOptions.registryUrl:mn.getWalletRegistryUrl();return Promise.resolve(fetch(v)).then(function(b){return Promise.resolve(b.json()).then(function(B){var T=B.listings,j=r?"mobile":"desktop",H=mn.getMobileLinkRegistry(mn.formatMobileRegistry(T,j),n);a(!1),c(!0),L(H.length?"":e.text.no_supported_wallets),D(H);var P=H.length===1;P&&(_(mn.formatIOSMobile(e.uri,H[0])),d(!0)),E(P)})})},function(v){a(!1),c(!0),L(e.text.something_went_wrong),console.error(v)});return Promise.resolve(C&&C.then?C.then(function(){}):void 0)}catch(v){return Promise.reject(v)}};S()})};G();var V=r?f:!f;return et.createElement("div",{id:tY,className:"walletconnect-qrcode__base animated fadeIn"},et.createElement("div",{className:"walletconnect-modal__base"},et.createElement(C$e,{onClose:e.onClose}),g&&f?et.createElement("div",{className:"walletconnect-modal__single_wallet"},et.createElement("a",{onClick:function(){return mn.saveMobileLinkInfo({name:N[0].name,href:m})},href:m,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(g?N[0].name:"")+" ›")):t||i||!i&&N.length?et.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(V?" right__selected":"")},et.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),r?et.createElement(et.Fragment,null,et.createElement("a",{onClick:function(){return d(!1),G()}},e.text.mobile),et.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode)):et.createElement(et.Fragment,null,et.createElement("a",{onClick:function(){return d(!0)}},e.text.qrcode),et.createElement("a",{onClick:function(){return d(!1),G()}},e.text.desktop))):null,et.createElement("div",null,f||!t&&!i&&!N.length?et.createElement(M$e,Object.assign({},p)):et.createElement($$e,Object.assign({},p,{links:N,errorMessage:U})))))}var N$e={choose_preferred_wallet:"Wähle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterstützten Wallet",no_wallets_found:"keine Wallet gefunden"},F$e={choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},B$e={choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera móvil",scan_qrcode_with_wallet:"Escanea el código QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo salió mal",no_supported_wallets:"Todavía no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},j$e={choose_preferred_wallet:"Choisissez votre portefeuille préféré",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copié!",connect_with:"Connectez-vous à l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourné",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouvé"},L$e={choose_preferred_wallet:"원하는 지갑을 선택하세요",connect_mobile_wallet:"모바일 지갑과 연결",scan_qrcode_with_wallet:"WalletConnect 지원 지갑에서 QR코드를 스캔하세요",connect:"연결",qrcode:"QR 코드",mobile:"모바일",desktop:"데스크탑",copy_to_clipboard:"클립보드에 복사",copied_to_clipboard:"클립보드에 복사되었습니다!",connect_with:"와 연결하다",loading:"로드 중...",something_went_wrong:"문제가 발생했습니다.",no_supported_wallets:"아직 지원되는 지갑이 없습니다",no_wallets_found:"지갑을 찾을 수 없습니다"},U$e={choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se à carteira móvel",scan_qrcode_with_wallet:"Ler o código QR com uma carteira compatível com WalletConnect",connect:"Conectar",qrcode:"Código QR",mobile:"Móvel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda não há carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},z$e={choose_preferred_wallet:"选择你的钱包",connect_mobile_wallet:"连接至移动端钱包",scan_qrcode_with_wallet:"使用兼容 WalletConnect 的钱包扫描二维码",connect:"连接",qrcode:"二维码",mobile:"移动",desktop:"桌面",copy_to_clipboard:"复制到剪贴板",copied_to_clipboard:"复制到剪贴板成功!",connect_with:"通过以下方式连接",loading:"正在加载...",something_went_wrong:"出了问题",no_supported_wallets:"目前还没有支持的钱包",no_wallets_found:"没有找到钱包"},H$e={choose_preferred_wallet:"کیف پول مورد نظر خود را انتخاب کنید",connect_mobile_wallet:"به کیف پول موبایل وصل شوید",scan_qrcode_with_wallet:"کد QR را با یک کیف پول سازگار با WalletConnect اسکن کنید",connect:"اتصال",qrcode:"کد QR",mobile:"سیار",desktop:"دسکتاپ",copy_to_clipboard:"کپی به کلیپ بورد",copied_to_clipboard:"در کلیپ بورد کپی شد!",connect_with:"ارتباط با",loading:"...بارگذاری",something_went_wrong:"مشکلی پیش آمد",no_supported_wallets:"هنوز هیچ کیف پول پشتیبانی شده ای وجود ندارد",no_wallets_found:"هیچ کیف پولی پیدا نشد"},Z$={de:N$e,en:F$e,es:B$e,fr:j$e,ko:L$e,pt:U$e,zh:z$e,fa:H$e};function V$e(){var e=mn.getDocumentOrThrow(),t=e.getElementById(X$);t&&e.head.removeChild(t);var r=e.createElement("style");r.setAttribute("id",X$),r.innerText=m$e,e.head.appendChild(r)}function W$e(){var e=mn.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",eY),e.body.appendChild(t),t}function nY(){var e=mn.getDocumentOrThrow(),t=e.getElementById(tY);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout(function(){var r=e.getElementById(eY);r&&e.body.removeChild(r)},x$e))}function q$e(e){return function(){nY(),e&&e()}}function G$e(){var e=mn.getNavigatorOrThrow().language.split("-")[0]||"en";return Z$[e]||Z$.en}function K$e(e,t,r){V$e();var n=W$e();et.render(et.createElement(R$e,{text:G$e(),uri:e,onClose:q$e(t),qrcodeModalOptions:r}),n)}function Y$e(){nY()}var oY=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};function X$e(e,t,r){console.log(e),oY()?g$e(e):K$e(e,t,r)}function Z$e(){oY()||Y$e()}var J$e={open:X$e,close:Z$e},Q$e=J$e;const J$=ri(Q$e);var Ro={},fE;Object.defineProperty(Ro,"__esModule",{value:!0});var eTe=el();let tTe=class extends eTe.InteractiveSignerProvider{constructor(){super(...arguments),this.enableIfConnected=async t=>{if(await this.isPreauthorized(t))return await super.enable(t)}}};function iY(e){return`alephiumProviders/${e}#initialized`}const i6={id:"alephium",name:"Alephium",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgd2lkdGg9IjEwMCUiCiAgIGhlaWdodD0iMTAwJSIKICAgdmlld0JveD0iMCAwIDUxMiA1MTIiCiAgIHZlcnNpb249IjEuMSIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyIKICAgaWQ9InN2Zzk4ODQiCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c3ZnPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnMKICAgaWQ9ImRlZnMxMCIgLz4KICAgIDxnCiAgIGlkPSJnMTAwNyI+PHJlY3QKICAgICB4PSIwIgogICAgIHk9IjAiCiAgICAgd2lkdGg9IjUxMi4wMDA2MSIKICAgICBoZWlnaHQ9IjUxMS45OTk5MSIKICAgICBzdHlsZT0iZmlsbDpub25lO3N0cm9rZS13aWR0aDowLjM1NTU1NiIKICAgICBpZD0icmVjdDk4NjUiIC8+PHBhdGgKICAgICBkPSJtIDIyMi44MjMyLDMwOS43OTQxMSBjIDAsLTQuMzYxMjQgLTMuNDQ2NzgsLTcuMjk4MzIgLTcuNzA0NTgsLTYuNTQ3NjYgbCAtNTAuODkwNzksOC45NzIwOSBjIC00LjI1Nzc5LDAuNzUwNjUgLTcuNzA0NTgsNC45MDMwOCAtNy43MDQ1OCw5LjI2NDMxIHYgOTYuMjM1OTggYyAwLDQuMzcxMTkgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MSBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY1IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NjciIC8+PHBhdGgKICAgICBkPSJtIDM1NS4zODYyLDk0LjMwNTMwNCBjIDAsLTQuMzYxMjM3IC0zLjQ0Njc4LC03LjI5ODMxNSAtNy43MDQ1OCwtNi41NDc2NjIgbCAtNTAuODkwNzksOC45NzIwOTUgYyAtNC4yNTc3OSwwLjc1MDY1MyAtNy43MDQ1OCw0LjkwMzA3MyAtNy43MDQ1OCw5LjI2NDMxMyB2IDk2LjIzNTk3IGMgMCw0LjM3MTIgMy40NDY3OSw3LjMwODI3IDcuNzA0NTgsNi41NTc2MiBsIDUwLjg5MDc5LC04Ljk3MjA5IGMgNC4yNTc4LC0wLjc1MDY2IDcuNzA0NTgsLTQuOTAzMDggNy43MDQ1OCwtOS4yNzQyNyB6IgogICAgIHN0eWxlPSJmaWxsOiNmZjVkNTE7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjEuMDA0NyIKICAgICBpZD0icGF0aDk4NzEiIC8+PHBhdGgKICAgICBkPSJtIDIzMS4wODk3OSwxMTYuNzY3NDEgYyAtMS45NjU1NSwtNC4zMjkwNSAtNy4yNDkxNiwtNy4xODEyNiAtMTEuODExMDgsLTYuMzc2OTkgbCAtNTQuNTI1NzgsOS42MTI5NiBjIC00LjU2MTkyLDAuODA0MjcgLTYuNjY0MjgsNC45NTg2MyAtNC42OTg3Miw5LjI4NzY4IGwgMTIwLjczOTcxLDI2NS45MjQxMiBjIDEuOTY1NTYsNC4zMjkwNiA3LjI2MDUzLDcuMjA2MjggMTEuODIyNDQsNi40MDIwMSBsIDU0LjUyNTc5LC05LjYxMjk1IGMgNC41NjE5MiwtMC44MDQyNyA2LjY1MjkxLC00Ljk4MzY1IDQuNjg3MzYsLTkuMzEyNzEgeiIKICAgICBzdHlsZT0iZmlsbDojMDAwMDAwO2ZpbGwtb3BhY2l0eToxO3N0cm9rZS13aWR0aDoxLjcxMzM0IgogICAgIGlkPSJwYXRoOTg3NSIgLz48L2c+Cjwvc3ZnPgo=",downloads:{chrome:"https://chrome.google.com/webstore/detail/alephium-extension-wallet",firefox:"https://addons.mozilla.org/en-US/firefox/addon/alephium-extension-wallet"}},Q$=[i6];function aY(e,t){return e.id===t.id&&e.name===t.name}function b5(e){return new Promise(t=>{const r=()=>{const n=sY(e.id);n&&aY(n,e)&&t(n)};window.addEventListener(iY(e.id),r),r(),setTimeout(()=>t(void 0),5e3)})}function sY(e){try{const t=window.alephiumProviders;if(!t)return;const r=t[e];return lY(r)?r:void 0}catch{}}function lY(e){try{return e&&["id","name","icon","unsafeEnable","isPreauthorized","nodeProvider","explorerProvider","signAndSubmitTransferTx","signAndSubmitDeployContractTx","signAndSubmitExecuteScriptTx","signAndSubmitUnsignedTx","signUnsignedTx","signMessage"].every(t=>t in e)}catch{}return!1}Ro.AlephiumWindowObject=tTe,Ro.alephiumProvider=i6,Ro.checkProviderMetadata=aY,fE=Ro.getDefaultAlephiumWallet=function(){return b5(i6)},Ro.getKnownWallet=b5,Ro.getWalletObject=sY,Ro.isWalletObj=lY,Ro.knownProviders=Q$,Ro.providerInitializedEvent=iY,Ro.scanKnownWallets=async function(){const e=[];for(const t of Q$){const r=await b5(t);r!==void 0&&e.push(r)}return e};var Ze=el();const eT={font:{family:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji'"},text:{primary:{color:"#373737"},secondary:{color:"#999999",hover:{color:"#111111"}},error:"#FC6464",valid:"#32D74B"},buttons:{primary:{borderRadius:16,color:"#000373737000",background:"#FFFFFF",border:"#F0F0F0",hover:{color:"#000000",border:"#1A88F8"}},secondary:{borderRadius:16,background:"#F6F7F9",color:"#000000"}},navigation:{color:"#999999"},modal:{background:"#ffffff",divider:"#f7f6f8"},tooltips:{color:"#999999",background:"#ffffff",hover:{background:"#f6f7f9"}},overlay:{background:"rgba(0, 0, 0, 0.06)"},qrCode:{accentColor:"#F7F6F8"}},tT=e=>e,rTe=()=>typeof window>"u"?!1:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;rTe();const nTe={connectKit:{options:{iconStyle:"light"},theme:{preferred:"dark",light:tT(eT),dark:tT(eT)}}},a6=k.createContext(null),Ui=()=>{const e=k.useContext(a6);if(!e)throw Error("ConnectSetting Hook must be inside a Provider.");return e},s6=k.createContext(null),ja=()=>{const e=k.useContext(s6);if(!e)throw Error("AlephiumConnect Hook must be inside a Provider.");return e},rT=k.createContext(null),cY=e=>{e={selector:"__ALEPHIUMCONNECT__",...e};const{selector:t,children:r}=e,n=k.useRef(null),[o,i]=k.useState(!1);return k.useEffect(()=>{const a="#"+t.replace(/^#/,"");if(n.current=document.querySelector(a),!n.current){const s=document.createElement("div");s.setAttribute("id",t),document.body.appendChild(s),n.current=s}i(!0)},[t]),n.current&&o?Ys.createPortal(r,n.current):null},uY=()=>{var e;const t=G4();return(e=t==null?void 0:t.name)!==null&&e!==void 0?e:""},fY=()=>{var e;const t=G4();return(e=t==null?void 0:t.os)!==null&&e!==void 0?e:""},oTe=()=>fY().toLowerCase().includes("ios"),iTe=()=>fY().toLowerCase().includes("android"),dE=()=>iTe()||oTe();function l6(e){return ne.Children.toArray(e).reduce((r,n)=>n.type===ne.Fragment?r.concat(l6(n.props.children)):(r.push(n),r),[])}const pE=e=>{const t=e.slice(0,6),r=e.slice(-6);return`${t} ... ${r}`};var st=typeof Ow.div=="function"?Ow:Ow.default,Ia={mobileWidth:560};const aTe=st(ut.div)` - z-index: -1; - pointer-events: auto; - position: absolute; - left: 50%; - transform: translateX(-50%); - width: var(--width); - top: 64px; - color: #fff; - font-size: 14px; - line-height: 20px; - font-weight: 500; - background: var(--ck-body-color-danger); - border-radius: 20px; - padding: 24px 46px 82px 24px; - transition: width var(--duration) var(--ease); - a { - font-weight: 700; - text-decoration: underline; - } - code { - font-size: 0.9em; - display: inline-block; - font-family: monospace; - margin: 1px; - padding: 0 4px; - border-radius: 8px; - font-weight: bold; - background: rgba(255, 255, 255, 0.1); - } -`,c6=eo` -from { opacity: 0; } - to { opacity: 1; } -`,sTe=eo` -from { opacity: 0; transform: scale(0.85); } - to { opacity: 1; transform: scale(1); } -`,lTe=eo` -from { opacity: 0; transform: scale(1.1); } - to { opacity: 1; transform: scale(1); } -`,u6=eo` -from { opacity: 1; } - to { opacity: 0; } -`,cTe=eo` -from { opacity: 1; transform: scale(1); } - to { opacity: 0; transform: scale(1.1); } -`,uTe=eo` -from { opacity: 1; transform: scale(1); } - to { opacity: 0; transform: scale(0.85); } -`,Ts=st(ut.div)` - max-width: 100%; - width: 295px; - padding-top: 48px; -`,fTe=st(ut.div)` - user-select: none; - position: relative; - display: block; - text-align: center; - color: var(--ck-body-color-muted); - font-size: 15px; - font-weight: 400; - line-height: 21px; - span { - z-index: 2; - position: relative; - display: inline-block; - user-select: none; - pointer-events: none; - padding: 0 14px; - background: var(--ck-body-background); - transition: background-color 200ms ease; - } - &:before { - z-index: 2; - content: ''; - position: absolute; - top: 50%; - left: 0; - right: 0; - height: 1px; - transform: translateY(-1px); - background: var(--ck-body-divider); - box-shadow: var(--ck-body-divider-box-shadow); - } -`,Xm=st(ut.div)` - z-index: 3; - pointer-events: none; - user-select: none; - position: absolute; - top: 25px; - left: 50%; - display: flex; - align-items: center; - justify-content: center; - height: 26px; - transform: translateX(-50%); - width: var(--width); - text-align: center; - font-size: 17px; - line-height: 20px; - font-weight: var(--ck-modal-heading-font-weight, 600); - color: var(--ck-body-color); - span { - display: inline-block; - } -`,dTe=st(ut.div)` - position: relative; - padding: 0; -`,po=st(ut.div)` - left: 0; - right: 0; - text-align: center; - display: flex; - flex-direction: column; - gap: 12px; - padding: 0 0 16px; - - @media only screen and (max-width: ${Ia.mobileWidth}px) { - display: block; - } -`,es=st(ut.h1)` - margin: 0; - padding: 0; - line-height: ${e=>e.$small?20:22}px; - font-size: ${e=>e.$small?17:19}px; - font-weight: var(--ck-modal-h1-font-weight, 600); - color: ${e=>e.$error?"var(--ck-body-color-danger)":e.$valid?"var(--ck-body-color-valid)":"var(--ck-body-color)"}; - > svg { - position: relative; - top: -2px; - display: inline-block; - vertical-align: middle; - margin-right: 6px; - } - @media only screen and (max-width: ${Ia.mobileWidth}px) { - margin-bottom: 6px; - font-size: 17px; - } -`,f6=st.div` - font-size: 16px; - font-weight: 400; - line-height: 21px; - color: var(--ck-body-color-muted); - strong { - font-weight: 500; - color: var(--ck-body-color); - } -`,pTe=st(ut.div)` - z-index: 1; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: var(--ck-overlay-background, rgba(71, 88, 107, 0.24)); - backdrop-filter: var(--ck-overlay-backdrop-filter, none); - opacity: 0; - animation: ${e=>e.$active?c6:u6} 150ms ease-out both; -`,hTe=eo` - from{ opacity: 0; transform: scale(0.97); } - to{ opacity: 1; transform: scale(1); } -`,vTe=eo` - from{ opacity: 1; transform: scale(1); } - to{ opacity: 0; transform: scale(0.97); } -`,gTe=eo` - from { transform: translate3d(0, 100%, 0); } - to { transform: translate3d(0, 0%, 0); } -`,mTe=eo` - from { opacity: 1; } - to { opacity: 0; } -`,dY=st(ut.div)` - z-index: 2; - position: relative; - color: var(--ck-body-color); - - animation: 150ms ease both; - animation-name: ${vTe}; - &.active { - animation-name: ${hTe}; - } - - &:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 50%; - width: var(--width); - height: var(--height); - transform: translateX(-50%); - backface-visibility: hidden; - transition: all 200ms ease; - border-radius: var(--ck-border-radius, 20px); - background: var(--ck-body-background); - box-shadow: var(--ck-modal-box-shadow); - } - - @media only screen and (max-width: ${Ia.mobileWidth}px) { - animation-name: ${mTe}; - animation-duration: 130ms; - animation-timing-function: ease; - - &.active { - animation-name: ${gTe}; - animation-duration: 300ms; - animation-delay: 32ms; - animation-timing-function: cubic-bezier(0.15, 1.15, 0.6, 1); - } - - &:before { - width: 100%; - transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); - will-change: height; - } - } -`,pY=st(ut.div)` - z-index: 3; - position: absolute; - top: 0; - left: 50%; - height: 64px; - transform: translateX(-50%); - backface-visibility: hidden; - width: var(--width); - transition: 0.2s ease width; - pointer-events: auto; - //border-bottom: 1px solid var(--ck-body-divider); -`,yTe=st(ut.div)` - position: relative; - overflow: hidden; - height: var(--height); - transition: 0.2s ease height; - @media only screen and (max-width: ${Ia.mobileWidth}px) { - transition: 0ms height cubic-bezier(0.15, 1.15, 0.6, 1); - /* animation-delay: 34ms; */ - } -`,hY=st(ut.div)` - z-index: 2; - position: relative; - top: 0; - left: 50%; - margin-left: calc(var(--width) / -2); - width: var(--width); - /* left: 0; */ - /* width: 100%; */ - display: flex; - justify-content: center; - align-items: center; - transform-origin: center center; - animation: 200ms ease both; - - &.active { - animation-name: ${lTe}; - } - &.active-scale-up { - animation-name: ${sTe}; - } - &.exit-scale-down { - z-index: 1; - pointer-events: none; - position: absolute; - /* top: 0; */ - /* left: 0; */ - animation-name: ${uTe}; - } - &.exit { - z-index: 1; - pointer-events: none; - position: absolute; - /* top: 0; */ - /* left: 0; */ - /* left: 50%; */ - /* transform: translateX(-50%); */ - animation-name: ${cTe}; - animation-delay: 16.6667ms; - } - @media only screen and (max-width: ${Ia.mobileWidth}px) { - /* animation: 0ms ease both; */ - /* animation-delay: 35ms; */ - animation: 0ms cubic-bezier(0.15, 1.15, 0.6, 1) both; - - &.active { - animation-name: ${c6}; - } - &.active-scale-up { - animation-name: ${c6}; - } - &.exit-scale-down { - z-index: 3; - animation-name: ${u6}; - } - &.exit { - z-index: 3; - animation-name: ${u6}; - animation-delay: 0ms; - } - } -`,vY=st(ut.div)` - margin: 0 auto; - width: fit-content; - padding: 29px 24px 24px; - backface-visibility: hidden; -`,bTe=st.div` - z-index: 2147483646; // z-index set one below max (2147483647) for if we wish to layer things ontop of the modal in a seperate Portal - position: fixed; - inset: 0; -`,d6=st(ut.button)` - z-index: 3; - cursor: pointer; - position: absolute; - top: 22px; - right: 17px; - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - } - - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } -`,p6=st(ut.button)` - z-index: 3; - position: absolute; - inset: 0; - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - position: relative; - left: -1px; - } - - &:enabled { - cursor: pointer; - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } - } -`,h6=st(ut.button)` - z-index: 3; - position: absolute; - inset: 0; - transform: translateX(-1px); - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px; - padding: 0; - margin: 0; - color: var(--ck-body-action-color); - background: var(--ck-body-background); - transition: background-color 200ms ease, transform 100ms ease; - /* will-change: transform; */ - svg { - display: block; - position: relative; - } - &:enabled { - cursor: pointer; - &:hover { - background: var(--ck-body-background-secondary); - } - &:active { - transform: scale(0.9); - } - } -`,wTe=st(ut.div)` - --ease: cubic-bezier(0.25, 0.1, 0.25, 1); - --duration: 200ms; - --transition: height var(--duration) var(--ease), width var(--duration) var(--ease); - z-index: 3; - display: block; - pointer-events: none; - position: absolute; - left: 50%; - top: 50%; - width: 100%; - transform: translate3d(-50%, -50%, 0); - backface-visibility: hidden; - @media only screen and (max-width: ${Ia.mobileWidth}px) { - pointer-events: auto; - left: 0; - top: auto; - bottom: -5px; - transform: none; - ${dY} { - max-width: 448px; - margin: 0 auto; - &:before { - width: 100%; - border-radius: var(--ck-border-radius, 30px) var(--ck-border-radius, 30px) 0 0; - } - } - ${hY} { - left: 0; - right: 0; - margin: 0 auto; - width: auto; - } - ${Ts} { - margin: 0 auto; - width: 100% !important; - } - ${Xm} { - top: 29px; - } - ${po} { - gap: 12px; - } - ${f6} { - margin: 0 auto; - max-width: 295px; - } - ${vY} { - width: 100%; - padding: 31px 24px; - } - ${pY} { - width: 100%; - top: 4px; - border-bottom: 0; - } - ${d6} { - right: 22px; - } - ${p6} { - top: -1px; - left: -3px; - } - ${h6} { - top: -1px; - left: -3px; - svg { - width: 65%; - height: auto; - } - } - ${d6}, - ${p6}, - ${h6} { - // Quick hack for bigger tappable area on mobile - transform: scale(1.4) !important; - background: transparent !important; - svg { - transform: scale(0.8) !important; - } - } - } -`,xTe=9;function _Te(){const e=k.useRef(null);function t(r){if(!e.current)return;const n=e.current.querySelectorAll(` - a[href]:not(:disabled), - button:not(:disabled), - textarea:not(:disabled), - input[type="text"]:not(:disabled), - input[type="radio"]:not(:disabled), - input[type="checkbox"]:not(:disabled), - select:not(:disabled) - `),o=n[0],i=n[n.length-1];(r.key==="Tab"||r.keyCode===xTe)&&(r.shiftKey?document.activeElement===o&&(i.focus(),r.preventDefault()):document.activeElement===i&&(o.focus(),r.preventDefault()))}return k.useEffect(()=>{e.current&&(e.current.addEventListener("keydown",t),e.current.focus({preventScroll:!0}));const r=e.current;return()=>{r&&r.removeEventListener("keydown",t)}},[e]),e}function ETe(e){const t=_Te();return k.useEffect(()=>{t.current&&t.current.focus({preventScroll:!0})},[t]),R.jsx("div",{ref:t,tabIndex:0,children:e.children})}function STe(e,t){const r=k.useRef({target:e,previous:t});return r.current.target!==e&&(r.current.previous=r.current.target,r.current.target=e),r.current.previous}const nT={debug:10,info:20,warn:30,error:40,none:100},CTe=typeof window<"u"&&window.document&&window.document.createElement!==void 0?k.useLayoutEffect:k.useEffect,PTe=({logLevel:e="info",maxFontSize:t=100,minFontSize:r=20,onFinish:n,onStart:o,resolution:i=5}={})=>{const a=nT[e],s=k.useCallback(()=>({calcKey:0,fontSize:t,fontSizePrev:r,fontSizeMax:t,fontSizeMin:r}),[t,r]),l=k.useRef(null),c=k.useRef(),u=k.useRef(!1),[f,d]=k.useState(s),{calcKey:p,fontSize:h,fontSizeMax:m,fontSizeMin:_,fontSizePrev:w}=f;let g=null;const[E]=k.useState(()=>new q6e(()=>{g=window.requestAnimationFrame(()=>{u.current||(o&&o(),u.current=!0,d({...s(),calcKey:p+1}))})}));k.useEffect(()=>(l.current&&E.observe(l.current),()=>{g&&window.cancelAnimationFrame(g),E.disconnect()}),[g,E]);const A=l.current&&l.current.innerHTML;return k.useEffect(()=>{p===0||u.current||(A!==c.current&&(o&&o(),d({...s(),calcKey:p+1})),c.current=A)},[p,s,A,o]),CTe(()=>{if(p===0)return;const N=Math.abs(h-w)<=i,D=!!l.current&&(l.current.scrollHeight>l.current.offsetHeight||l.current.scrollWidth>l.current.offsetWidth),y=D&&h===w,U=h>w;if(N){y?(u.current=!1,a<=nT.info&&console.info(`[use-fit-text] reached \`minFontSize = ${r}\` without fitting text`)):D?d({fontSize:U?w:_,fontSizeMax:m,fontSizeMin:_,fontSizePrev:w,calcKey:p}):(u.current=!1,n&&n(h));return}let L,G=m,V=_;D?(L=U?w-h:_-h,G=Math.min(m,h)):(L=U?m-h:w-h,V=Math.max(_,h)),d({calcKey:p,fontSize:h+L/2,fontSizeMax:G,fontSizeMin:V,fontSizePrev:h})},[p,h,m,_,w,n,l,i]),{fontSize:h,ref:l}},hE=ne.forwardRef(({children:e},t)=>{const[r,n]=ne.useState(!1),{fontSize:o,ref:i}=PTe({logLevel:"none",maxFontSize:100,minFontSize:70,onStart:()=>n(!0),onFinish:()=>n(!0)});return R.jsx("div",{ref:i,style:{visibility:r?"visible":"hidden",fontSize:`${o}%`,maxHeight:"100%",maxWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e})});hE.displayName="FitText";var OTe={light:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"#F6F7F9","--ck-connectbutton-background-secondary":"#FFFFFF","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"#F0F2F5","--ck-connectbutton-active-color":"#373737","--ck-connectbutton-active-background":"#EAECF1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#F6F7F9","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#F0F2F5","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#F6F7F9","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-color":"#373737","--ck-primary-button-hover-background":"#F0F2F5","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#F6F7F9","--ck-tertiary-button-background":"#FFFFFF","--ck-secondary-button-hover-background":"#e0e4eb","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(71, 88, 107, 0.24)","--ck-body-color":"#373737","--ck-body-color-muted":"#999999","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F3F4F7","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-siwe-border":"#F0F0F0","--ck-body-disclaimer-color":"#AAAAAB","--ck-body-disclaimer-link-color":"#838485","--ck-body-disclaimer-link-hover-color":"#000000","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0,0,0,0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#f7f6f8","--ck-focus-color":"#1A88F8","--ck-spinner-color":"var(--ck-focus-color)","--ck-copytoclipboard-stroke":"#CCCCCC"},dark:{"--ck-connectbutton-font-size":"15px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#383838","--ck-connectbutton-background-secondary":"#282828","--ck-connectbutton-hover-background":"#404040","--ck-connectbutton-active-background":"#4D4D4D","--ck-connectbutton-balance-color":"#fff","--ck-connectbutton-balance-background":"#282828","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-background)","--ck-connectbutton-balance-hover-background":"#383838","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-hover-background)","--ck-connectbutton-balance-active-background":"#404040","--ck-connectbutton-balance-active-box-shadow":"inset 0 0 0 1px var(--ck-connectbutton-active-background)","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"#383838","--ck-primary-button-border-radius":"16px","--ck-primary-button-font-weight":"600","--ck-primary-button-hover-background":"#404040","--ck-primary-button-active-border-radius":"16px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#333333","--ck-secondary-button-hover-background":"#4D4D4D","--ck-tertiary-button-background":"#424242","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-body-color":"#ffffff","--ck-body-color-muted":"rgba(255, 255, 255, 0.4)","--ck-body-color-muted-hover":"rgba(255, 255, 255, 0.8)","--ck-body-background":"#2B2B2B","--ck-body-background-transparent":"rgba(0,0,0,0)","--ck-body-background-secondary":"#333333","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#ffffff","--ck-body-background-tertiary":"#333333","--ck-body-action-color":"#808080","--ck-body-divider":"#383838","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-color":"#858585","--ck-body-disclaimer-link-color":"#ADADAD","--ck-body-disclaimer-link-hover-color":"#FFFFFF","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-background":"#2B2B2B","--ck-tooltip-background-secondary":"#333333","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-dropdown-button-color":"#6C7381","--ck-spinner-color":"var(--ck-focus-color)","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"#3d3d3d"}},kTe={"--ck-font-family":"Lato","--ck-border-radius":"0px","--ck-connectbutton-color":"#373737","--ck-connectbutton-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-box-shadow":" 0 0 0 1px #003C74, 2px 2px 0px rgba(255, 255, 255, 0.75), -2px -2px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-connectbutton-border-radius":"4.5px","--ck-connectbutton-hover-color":"#373737","--ck-connectbutton-hover-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 0% / 200% 200%, #F5F5F1","--ck-connectbutton-active-background":"linear-gradient(180deg, #F0F0EA 0%, #FFFFFF 50%, #F0F0EA 100%) 100% 100% / 200% 200%, #F5F5F1","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#fff","--ck-connectbutton-balance-box-shadow":"0 0 0 1px #E4E7E7","--ck-connectbutton-balance-hover-box-shadow":"0 0 0 1px #d7dbdb","--ck-connectbutton-balance-active-box-shadow":"0 0 0 1px #bbc0c0","--ck-focus-color":"#1A88F8","--ck-overlay-background":"rgba(0, 127, 128, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"#808080","--ck-body-color-muted-hover":"#111111","--ck-body-background":"#F0EDE2","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary-hover-background":"#FAFAFA","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-action-color":"#373737","--ck-body-color-danger":"#FC6464","--ck-body-color-valid":"#32D74B","--ck-body-divider":"#919B9C","--ck-body-divider-box-shadow":"0px 1px 0px #FBFBF8","--ck-primary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-primary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-border-radius":"6px","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 5px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-primary-button-hover-border-radius":"6px","--ck-modal-heading-font-weight":400,"--ck-modal-box-shadow":` - inset 0px -3px 0px #0F37A9, - inset -2px 0px 0px #0F37A9, - inset 0px -4px 0px #0D5DDF, - inset -4px 0px 0px #0D5DDF, - inset 2px 0px 0px #0453DD, - inset 0px 2px 0px #044FD1, - inset 4px 0px 0px #4283EB, - inset 0px 4px 0px #4283EB - `,"--ck-modal-h1-font-weight":400,"--ck-secondary-button-color":"#373737","--ck-secondary-button-border-radius":"6px","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 0px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-secondary-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #003C74, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset 0px 0px 0px 4px #97B9EC, inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-body-background-secondary":"rgba(0, 0, 0, 0.1)","--ck-body-background-tertiary":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-body-button-text-align":"left","--ck-body-button-box-shadow":"0 2px 4px rgba(0, 0, 0, 0.05 )","--ck-body-disclaimer-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-body-disclaimer-box-shadow":` - inset 0px -3px 0px #0F37A9, - inset -2px 0px 0px #0F37A9, - inset 0px -4px 0px #0D5DDF, - inset -4px 0px 0px #0D5DDF, - inset 2px 0px 0px #0453DD, - inset 4px 0px 0px #4283EB, - inset 0 1px 0 0 #919B9C`,"--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-color":"#959594","--ck-body-disclaimer-link-color":"#626262","--ck-body-disclaimer-link-hover-color":"#000000","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#919B9C","--ck-qr-border-radius":"0","--ck-qr-background":"#FFFFFF","--ck-copytoclipboard-stroke":"rgba(55, 55, 55, 0.4)","--ck-tooltip-background":"linear-gradient(270deg, #F7F3E6 7.69%, #F5F7DA 100%)","--ck-tooltip-background-secondary":"#f6f7f9","--ck-tooltip-color":"#000000","--ck-tooltip-shadow":" 0 0 0 1.5px #2b2622, 0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px #A0A0A0, 1px 1px 0px rgba(255, 255, 255, 0.75), -1px -1px 0px rgba(0, 0, 0, 0.05), inset -1px -2px 2px rgba(0, 0, 0, 0.2)","--ck-dropdown-button-background":"linear-gradient(180deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-button-hover-background":"linear-gradient(0deg, #FFFFFF 0%, #F0F0EA 100%), #F5F5F1","--ck-dropdown-pending-color":"#ACA899","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"#ACA899","--ck-dropdown-active-background":"#3F69BF","--ck-dropdown-active-border-radius":"0","--ck-dropdown-active-inset":"-12px","--ck-dropdown-color":"#ACA899","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"inset 0 0 0 1px #ACA899, 2px 2px 7px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"#ACA899","--ck-alert-background":"linear-gradient(180deg, #FBFBFB 0%, #EFEFEE 100%)","--ck-alert-box-shadow":"inset 0 0 0 1px #919B9C, 1px 1px 2px rgba(0, 0, 0, 0.15), inset -2px -2px 0px #FFFFFF","--ck-alert-border-radius":"0","--ck-graphic-primary-color":"#333333","--ck-graphic-primary-background":"#FFFFFF","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#919B9C"},ATe={"--ck-font-family":'"SF Pro Rounded",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"8px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-hover-background":"#F3EDE8","--ck-connectbutton-active-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-color":"#000000","--ck-connectbutton-balance-background":"#F3EDE8","--ck-connectbutton-balance-box-shadow":"-4px 4px 0px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-hover-background":"#eee5dd","--ck-connectbutton-balance-connectbutton-box-shadow":"-4px 8px 0px -4px #000000, inset 0 0 0 2px #000000","--ck-connectbutton-balance-connectbutton-border-radius":"0px 8px 8px 0","--ck-primary-button-color":"#373737","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #000000, -4px 4px 0 0 #000000","--ck-primary-button-border-radius":"8px","--ck-primary-button-hover-background":"#F3EDE8","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #000000, -0px 0px 0 0 #000000","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#373737","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-secondary-button-hover-background":"#F3EDE8","--ck-secondary-button-hover-box-shadow":"0 0 0 0 #000000, inset 0 0 0 2px #000000","--ck-focus-color":"#3B99FC","--ck-overlay-background":"rgba(133, 120, 122, 0.8)","--ck-body-color":"#373737","--ck-body-color-muted":"rgba(0, 0, 0, 0.5)","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#EBE1D8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"rgba(0,0,0,0.1)","--ck-body-background-secondary-hover-background":"#4D4D4D","--ck-body-background-secondary-hover-outline":"#373737","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"8px","--ck-tertiary-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-body-action-color":"#373737","--ck-body-divider":"#373737","--ck-body-color-danger":"#FF4E4E","--ck-body-disclaimer-background":"#E3D6C9","--ck-body-disclaimer-box-shadow":"-4px 4px 0 0 #000000, inset 2px 0 0 0 #000000, inset -2px 0 0 0 #000000, inset 0 -2px 0 0 #000000","--ck-body-disclaimer-font-weight":"500","--ck-body-disclaimer-color":"#888079","--ck-body-disclaimer-link-color":"#5B5650","--ck-body-disclaimer-link-hover-color":"#000000","--ck-modal-box-shadow":"-10px 10px 0px #000000, inset 0 0 0 2px #000000","--ck-copytoclipboard-stroke":"#555555","--ck-tooltip-border-radius":"8px","--ck-tooltip-color":"#373737","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#EBE1D8","--ck-tooltip-shadow":"-6px 6px 0 0 #000000, 0 0 0 2px #000000","--ck-spinner-color":"#1A88F8","--ck-dropdown-button-color":"#000","--ck-dropdown-button-box-shadow":"-2px 2px 0 2px #000000, 0 0 0 2px #000000","--ck-dropdown-button-background":"#ffffff","--ck-dropdown-button-hover-background":"#F3EDE8","--ck-dropdown-button-hover-box-shadow":"-2px 2px 0 0 #000000, 0 0 0 2px #000000","--ck-dropdown-pending-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-color":"#FFFFFF","--ck-dropdown-active-static-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-active-background":"#3B99FC","--ck-dropdown-active-box-shadow":"inset 0 0 0 2px #000000","--ck-dropdown-active-border-radius":"8px","--ck-dropdown-color":"rgba(0, 0, 0, 0.5)","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"-4px 4px 0 0 #000000, inset 0 0 0 2px #000000","--ck-dropdown-border-radius":"8px","--ck-alert-color":"rgba(0, 0, 0, 0.5)","--ck-alert-background":" #F5F5F5","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"8px","--ck-qr-dot-color":"#000000","--ck-qr-border-color":"#000000","--ck-qr-background":"#ffffff","--ck-graphic-primary-color":"#000000","--ck-graphic-primary-background":"#ffffff","--ck-graphic-compass-background":"#FFFFFF","--ck-siwe-border":"#8E8985"},ITe={"--ck-border-radius":"12px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"12px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F6F7F9","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"12px","--ck-primary-button-color":"#414451","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F6F7F9","--ck-primary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"12px","--ck-secondary-button-color":"#414451","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"0 0 0 1px #E9EAEC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F6F7F9","--ck-secondary-button-hover-box-shadow":"0 0 0 1px #D9DBDD, 0px 0 0 rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#414451","--ck-body-color-muted":"#9196A1","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#F6F8FA","--ck-tertiary-border-radius":"13px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#999999","--ck-body-divider":"#f7f6f8","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-dropdown-color":"rgba(55, 55, 55, 0.4)","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#2E3138","--ck-qr-border-color":"#E9EAEC","--ck-siwe-border":"#EAEBED"},$Te={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"10px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"8px","--ck-connectbutton-color":"#ffffff","--ck-connectbutton-background":"#313235","--ck-connectbutton-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-connectbutton-hover-background":"#414144","--ck-connectbutton-active-background":"#4C4D4F","--ck-connectbutton-balance-color":"#ffffff","--ck-connectbutton-balance-background":"#1F2023","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #313235","--ck-connectbutton-balance-hover-background":"#313235","--ck-connectbutton-balance-active-background":"#414144","--ck-primary-button-border-radius":"8px","--ck-primary-button-color":"#ffffff","--ck-primary-button-background":"rgba(255, 255, 255, 0.08)","--ck-primary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-primary-button-hover-background":"rgba(255, 255, 255, 0.2)","--ck-secondary-button-border-radius":"8px","--ck-secondary-button-color":"#ffffff","--ck-secondary-button-background":"#363638","--ck-secondary-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-secondary-button-hover-background":"#3c3c3e","--ck-overlay-background":"rgba(0,0,0,0.4)","--ck-modal-box-shadow":"inset 0 0 0 1px #38393C, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-body-color":"#ffffff","--ck-body-color-muted":"#8B8F97","--ck-body-color-muted-hover":"#ffffff","--ck-body-background":"#1F2023","--ck-body-background-transparent":"rgba(31, 32, 35, 0)","--ck-body-background-secondary":"#313235","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"rgba(255, 255, 255, 0.02)","--ck-body-background-tertiary":"#313235","--ck-tertiary-border-radius":"12px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-body-action-color":"#8B8F97","--ck-body-divider":"rgba(255,255,255,0.1)","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#2B2D31","--ck-body-disclaimer-box-shadow":"none","--ck-body-disclaimer-color":"#808183","--ck-body-disclaimer-link-color":"#AAABAD","--ck-body-disclaimer-link-hover-color":"#ffffff","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#1F2023","--ck-tooltip-background-secondary":"#1F2023","--ck-tooltip-color":"#ffffff","--ck-tooltip-shadow":" 0 0 0 1px rgba(255, 255, 255, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#6C7381","--ck-dropdown-button-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.05)","--ck-dropdown-button-background":"#313235","--ck-dropdown-pending-color":"#8B8F97","--ck-dropdown-active-color":"#FFF","--ck-dropdown-active-static-color":"#FFF","--ck-dropdown-active-background":"rgba(255, 255, 255, 0.07)","--ck-dropdown-color":"#8B8F97","--ck-dropdown-background":"#313235","--ck-dropdown-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.03)","--ck-dropdown-border-radius":"8px","--ck-alert-color":"#8B8F97","--ck-alert-background":"#404145","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(255, 255, 255, 0.02)","--ck-qr-border-radius":"12px","--ck-qr-dot-color":"#ffffff","--ck-qr-border-color":"rgba(255,255,255,0.1)"},TTe={"--ck-font-family":'"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"0px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-border-radius":"0px","--ck-connectbutton-color":"#414451","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-connectbutton-hover-color":"#111","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #111","--ck-connectbutton-balance-color":"#111111","--ck-connectbutton-balance-background":"#F7F7F7","--ck-connectbutton-balance-box-shadow":"inset 0 0 0 1px #F7F7F7","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-connectbutton-balance-hover-box-shadow":"inset 0 0 0 1px #111","--ck-primary-button-border-radius":"0px","--ck-primary-button-color":"#111111","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-primary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-secondary-button-border-radius":"0px","--ck-secondary-button-color":"#111111","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 1px #111111","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#E7E7E7","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#111111","--ck-body-color-muted":"#A0A0A0","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"0px","--ck-tertiary-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-body-action-color":"#A0A0A0","--ck-body-divider":"#EBEBEB","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#FAFAFA","--ck-body-disclaimer-box-shadow":"inset 0 1px 0 0 #ECECEC","--ck-body-disclaimer-color":"#9D9D9D","--ck-body-disclaimer-link-color":"#6E6E6E","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-border-radius":"0px","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-active-border-radius":"0","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"0","--ck-alert-color":"rgba(17, 17, 17, 0.4)","--ck-alert-background":"#fff","--ck-alert-box-shadow":"inset 0 0 0 1px #EBEBEB","--ck-alert-border-radius":"0","--ck-qr-border-radius":"0px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#EBEBEB","--ck-modal-h1-font-weight":"400","--ck-modal-heading-font-weight":"400","--ck-primary-button-font-weight":"400","--ck-siwe-border":"#EBEBEB"},DTe={"--ck-font-family":'"Nunito",ui-rounded,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"17px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"14px","--ck-connectbutton-color":"#000000","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 2px #DFE4EC, 0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-hover-background":"#F9FAFB","--ck-connectbutton-balance-color":"#414451","--ck-connectbutton-balance-background":"#F9FAFB","--ck-connectbutton-balance-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-hover-background":"#F5F7F9","--ck-connectbutton-balance-hover-box-shadow":"0 2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-balance-active-box-shadow":"0 0 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-connectbutton-active-background":"#F5F7F9","--ck-connectbutton-active-box-shadow":"inset 0 0 0 2px #CFD7E2, 0 0px 0 0 #CFD7E2, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-border-radius":"18px","--ck-primary-button-color":"#000000","--ck-primary-button-background":"#ffffff","--ck-primary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-primary-button-hover-background":"#F5F7F9","--ck-primary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#000000","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -4px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-secondary-button-hover-background":"#F5F7F9","--ck-secondary-button-hover-box-shadow":"inset 0 0 0 2px #DFE4EC, inset 0 -2px 0 0 #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 3px 16px rgba(0, 0, 0, 0.08)","--ck-body-color":"#000000","--ck-body-color-muted":"#93989F","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#ffffff","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#f6f7f9","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-secondary-hover-outline":"#4282FF","--ck-body-background-tertiary":"#ffffff","--ck-tertiary-border-radius":"22px","--ck-tertiary-box-shadow":"inset 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-body-action-color":"#93989F","--ck-body-divider":"#DFE4EC","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFB","--ck-body-disclaimer-font-size":"14px","--ck-body-disclaimer-font-weight":"700","--ck-body-disclaimer-color":"#959697","--ck-body-disclaimer-link-color":"#646464","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#CCCCCC","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":" 0 0 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 2px #DFE4EC, 0 2px 0 2px #DFE4EC, 0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#F5F7F9","--ck-dropdown-pending-color":"#848D9A","--ck-dropdown-active-color":"#000000","--ck-dropdown-active-static-color":"#848D9A","--ck-dropdown-active-background":"#F5F7F9","--ck-dropdown-color":"#848D9A","--ck-dropdown-background":"#FFFFFF","--ck-dropdown-box-shadow":"0px 2px 15px rgba(0, 0, 0, 0.15)","--ck-dropdown-border-radius":"16px","--ck-alert-color":"#848D9A","--ck-alert-background":"#F5F7F9","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#111111","--ck-qr-border-color":"#DFE4EC","--ck-modal-h1-font-weight":"700","--ck-modal-heading-font-weight":"700","--ck-primary-button-font-weight":"700","--ck-siwe-border":"#DFE4EC"},MTe={"--ck-font-family":'"PT Root UI",ui-rounded,"Nunito",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,"Apple Color Emoji",Arial,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"',"--ck-border-radius":"24px","--ck-connectbutton-font-size":"16px","--ck-connectbutton-font-weight":"700","--ck-connectbutton-border-radius":"10px","--ck-connectbutton-color":"#151C3B","--ck-connectbutton-background":"#ffffff","--ck-connectbutton-box-shadow":"inset 0 0 0 1px #D6D8E1","--ck-connectbutton-hover-background":"#E9EBF3","--ck-connectbutton-hover-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-active-background":"#D4D8E8","--ck-connectbutton-active-box-shadow":"inset 0 0 0 1px #D4D8E8","--ck-connectbutton-balance-color":"#373737","--ck-connectbutton-balance-background":"#F6F7F9","--ck-connectbutton-balance-box-shadow":"none","--ck-connectbutton-balance-hover-background":"#f1f1f3","--ck-primary-button-border-radius":"16px","--ck-primary-button-color":"#151C3B","--ck-primary-button-background":"#ffffff","--ck-primary-button-font-weight":"700","--ck-primary-button-hover-background":"#DEE1ED","--ck-secondary-button-border-radius":"16px","--ck-secondary-button-color":"#151C3B","--ck-secondary-button-background":"#ffffff","--ck-secondary-button-font-weight":"700","--ck-secondary-button-hover-background":"#DEE1ED","--ck-focus-color":"#1A88F8","--ck-modal-box-shadow":"0px 2px 4px rgba(0, 0, 0, 0.02)","--ck-overlay-background":"rgba(213, 215, 225, 0.8)","--ck-overlay-backdrop-filter":"blur(6px)","--ck-body-color":"#151C3B","--ck-body-color-muted":"#757A8E","--ck-body-color-muted-hover":"#000000","--ck-body-background":"#F4F4F8","--ck-body-background-transparent":"rgba(255,255,255,0)","--ck-body-background-secondary":"#E9E9F1","--ck-body-background-secondary-hover-background":"#e0e4eb","--ck-body-background-tertiary":"#E9E9F1","--ck-tertiary-border-radius":"24px","--ck-body-action-color":"#79809C","--ck-body-divider":"#D9DBE3","--ck-body-color-danger":"#FF4E4E","--ck-body-color-valid":"#32D74B","--ck-body-disclaimer-background":"#F9FAFA","--ck-body-disclaimer-color":"#AFB1B6","--ck-body-disclaimer-link-color":"#787B84","--ck-body-disclaimer-link-hover-color":"#000000","--ck-copytoclipboard-stroke":"#79809C","--ck-tooltip-background":"#ffffff","--ck-tooltip-background-secondary":"#ffffff","--ck-tooltip-color":"#999999","--ck-tooltip-shadow":"0px 2px 10px rgba(0, 0, 0, 0.08)","--ck-spinner-color":"var(--ck-focus-color)","--ck-dropdown-button-color":"#999999","--ck-dropdown-button-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-button-background":"#fff","--ck-dropdown-button-hover-color":"#8B8B8B","--ck-dropdown-button-hover-background":"#DEE1ED","--ck-dropdown-button-hover-box-shadow":"0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-dropdown-color":"#757A8E","--ck-dropdown-box-shadow":"0 0 0 1px rgba(0, 0, 0, 0.01), 0px 0px 7px rgba(0, 0, 0, 0.05)","--ck-alert-color":"#9196A1","--ck-alert-background":"#F6F8FA","--ck-alert-box-shadow":"inset 0 0 0 1px rgba(0, 0, 0, 0.04)","--ck-alert-border-radius":"8px","--ck-qr-border-radius":"24px","--ck-qr-dot-color":"#000000","--ck-qr-background":"#ffffff","--ck-siwe-border":"#DFE4EC","--ck-graphic-primary-background":"#fff","--ck-graphic-compass-background":"#fff","--ck-graphic-primary-box-shadow":"0px 2.94737px 14.7368px rgba(0, 0, 0, 0.1)","--ck-graphic-compass-box-shadow":"0px 2px 9px rgba(0, 0, 0, 0.15)"},ra={base:OTe,web95:kTe,retro:ATe,soft:ITe,midnight:$Te,minimal:TTe,rounded:DTe,nouns:MTe};const Nc={default:{"--ck-font-family":`-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, - 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', - 'Segoe UI Symbol'`,"--ck-border-radius":"20px","--ck-secondary-button-border-radius":"16px"},graphics:{light:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#4E4E4E","--ck-graphic-scaniconwithlogos-02":"#272727","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#F6F7F9","--ck-chain-ethereum-01":"#25292E","--ck-chain-ethereum-02":"#fff","--ck-chain-ethereum-03":"#DFE0E0"},dark:{"--ck-graphic-wave-stop-01":"#E8F17D","--ck-graphic-wave-stop-02":"#A8ECDE","--ck-graphic-wave-stop-03":"#7AA1F2","--ck-graphic-wave-stop-04":"#DEA1E8","--ck-graphic-wave-stop-05":"#F46D98","--ck-graphic-scaniconwithlogos-01":"#AFAFAF","--ck-graphic-scaniconwithlogos-02":"#696969","--ck-graphic-scaniconwithlogos-03":"#F8D74A","--ck-graphic-scaniconwithlogos-04":"#3D3D3D"}},ens:{light:{"--ck-ens-01-start":"#FF3B30","--ck-ens-01-stop":"#FF9500","--ck-ens-02-start":"#FF9500","--ck-ens-02-stop":"#FFCC00","--ck-ens-03-start":"#FFCC00","--ck-ens-03-stop":"#34C759","--ck-ens-04-start":"#5856D6","--ck-ens-04-stop":"#AF52DE","--ck-ens-05-start":"#5AC8FA","--ck-ens-05-stop":"#007AFF","--ck-ens-06-start":"#007AFF","--ck-ens-06-stop":"#5856D6","--ck-ens-07-start":"#5856D6","--ck-ens-07-stop":"#AF52DE","--ck-ens-08-start":"#AF52DE","--ck-ens-08-stop":"#FF2D55"},dark:{"--ck-ens-01-start":"#FF453A","--ck-ens-01-stop":"#FF9F0A","--ck-ens-02-start":"#FF9F0A","--ck-ens-02-stop":"#FFD60A","--ck-ens-03-start":"#FFD60A","--ck-ens-03-stop":"#32D74B","--ck-ens-04-start":"#32D74B","--ck-ens-04-stop":"#64D2FF","--ck-ens-05-start":"#64D2FF","--ck-ens-05-stop":"#0A84FF","--ck-ens-06-start":"#0A84FF","--ck-ens-06-stop":"#5E5CE6","--ck-ens-07-start":"#5E5CE6","--ck-ens-07-stop":"#BF5AF2","--ck-ens-08-start":"#BF5AF2","--ck-ens-08-stop":"#FF2D55"}},brand:{"--ck-family-brand":"#1A88F8","--ck-brand-walletConnect":"#3B99FC","--ck-brand-coinbaseWallet":"#0052FF","--ck-brand-metamask":"#f6851b","--ck-brand-metamask-01":"#F6851B","--ck-brand-metamask-02":"#E2761B","--ck-brand-metamask-03":"#CD6116","--ck-brand-metamask-04":"#161616","--ck-brand-metamask-05":"#763D16","--ck-brand-metamask-06":"#D7C1B3","--ck-brand-metamask-07":"#C0AD9E","--ck-brand-metamask-08":"#E4761B","--ck-brand-metamask-09":"#233447","--ck-brand-metamask-10":"#E4751F","--ck-brand-metamask-11":"#FEF5E7","--ck-brand-metamask-12":"#E3C8AB","--ck-brand-trust-01":"#3375BB","--ck-brand-trust-02":"#ffffff","--ck-brand-trust-01b":"#ffffff","--ck-brand-trust-02b":"#3375BB","--ck-brand-argent":"#f36a3d","--ck-brand-imtoken-01":"#11C4D1","--ck-brand-imtoken-02":"#0062AD"}},RTe=e=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(t==null)return e;const r={r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)};return`color(display-p3 ${r.r/255} ${r.g/255} ${r.b/255})`},Fc=(e,t)=>dr` - ${Object.keys(e).map(r=>{const n=e[r];return n&&`${r}:${n};`})} - `,na={light:ra.base.light,dark:ra.base.dark,web95:ra.web95,retro:ra.retro,soft:ra.soft,midnight:ra.midnight,minimal:ra.minimal,rounded:ra.rounded,nouns:ra.nouns},di=(e,t)=>{const r=t?" !important":"";return dr` - ${Object.keys(e).map(n=>{const o=e[n];return o&&`${n}:${o}${r};`})} - @supports (color: color(display-p3 1 1 1)) { - ${Object.keys(e).map(n=>{const o=e[n];return`${n}:${RTe(o)}${r};`})} - } - `},lo={default:Fc(Nc.default),light:di(na.light),dark:di(na.dark),web95:di(na.web95),retro:di(na.retro),soft:di(na.soft),midnight:di(na.midnight),minimal:di(na.minimal),rounded:di(na.rounded),nouns:di(na.nouns)},yu={brand:Fc(Nc.brand),ensLight:Fc(Nc.ens.light),ensDark:Fc(Nc.ens.dark),graphicsLight:Fc(Nc.graphics.light),graphicsDark:Fc(Nc.graphics.dark)},oT=dr` - ${yu.brand} - ${yu.ensLight} - ${yu.graphicsLight} -`,iT=dr` - ${yu.brand} - ${yu.ensDark} - ${yu.graphicsDark} -`;let ui="auto";const vE=st(ut.div)` - ${lo.default} - - ${e=>{switch(e.$useTheme){case"web95":return ui="light",lo.web95;case"retro":return ui="light",lo.retro;case"soft":return ui="light",lo.soft;case"midnight":return ui="dark",lo.midnight;case"minimal":return ui="light",lo.minimal;case"rounded":return ui="light",lo.rounded;case"nouns":return ui="light",lo.nouns;default:return e.$useMode==="light"?(ui="light",lo.light):e.$useMode==="dark"?(ui="dark",lo.dark):dr` - @media (prefers-color-scheme: light) { - ${lo.light} - } - @media (prefers-color-scheme: dark) { - ${lo.dark} - } - `}}} - - ${e=>{switch(ui){case"light":return oT;case"dark":return iT;default:return dr` - ${oT} - @media (prefers-color-scheme: dark) { - ${iT} - } - `}}} - - - ${e=>{if(e.$customTheme)return di(e.$customTheme,!0)}} - - all: initial; - text-align: left; - text-direction: ltr; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-text-stroke: 0.001px transparent; - text-size-adjust: none; - font-size: 16px; - - button { - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); - -webkit-text-stroke: 0.001px transparent; - } - - &, - * { - font-family: var(--ck-font-family); - box-sizing: border-box; - outline: none; - border: none; - } - /* - @media (prefers-reduced-motion) { - * { - animation-duration: 60ms !important; - transition-duration: 60ms !important; - } - } - */ - img, - svg { - max-width: 100%; - } - strong { - font-weight: 600; - } - a:focus-visible, - button:focus, - button:focus-visible { - outline: none; - } -`,NTe=({...e})=>R.jsx("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 11C20 15.9706 15.9706 20 11 20C6.02944 20 2 15.9706 2 11C2 6.02944 6.02944 2 11 2C15.9706 2 20 6.02944 20 11ZM22 11C22 17.0751 17.0751 22 11 22C4.92487 22 0 17.0751 0 11C0 4.92487 4.92487 0 11 0C17.0751 0 22 4.92487 22 11ZM11.6445 12.7051C11.6445 13.1348 11.3223 13.4678 10.7744 13.4678C10.2266 13.4678 9.92578 13.1885 9.92578 12.6191V12.4795C9.92578 11.4268 10.4951 10.8574 11.2686 10.3203C12.2031 9.67578 12.665 9.32129 12.665 8.59082C12.665 7.76367 12.0205 7.21582 11.043 7.21582C10.3232 7.21582 9.80762 7.57031 9.45312 8.16113C9.38282 8.24242 9.32286 8.32101 9.2667 8.39461C9.04826 8.68087 8.88747 8.8916 8.40039 8.8916C8.0459 8.8916 7.66992 8.62305 7.66992 8.15039C7.66992 7.96777 7.70215 7.7959 7.75586 7.61328C8.05664 6.625 9.27051 5.75488 11.1182 5.75488C12.9336 5.75488 14.5234 6.71094 14.5234 8.50488C14.5234 9.7832 13.7822 10.417 12.7402 11.1045C11.999 11.5986 11.6445 11.9746 11.6445 12.5762V12.7051ZM11.9131 15.5625C11.9131 16.1855 11.376 16.6797 10.7529 16.6797C10.1299 16.6797 9.59277 16.1748 9.59277 15.5625C9.59277 14.9395 10.1191 14.4453 10.7529 14.4453C11.3867 14.4453 11.9131 14.9287 11.9131 15.5625Z",fill:"currentColor"})}),aT=({...e})=>R.jsxs(ut.svg,{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[R.jsx("path",{d:"M1 13L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),R.jsx("path",{d:"M1 0.999999L13 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),FTe=({...e})=>R.jsx(ut.svg,{width:9,height:16,viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:R.jsx("path",{d:"M8 1L1 8L8 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),w5=.22,BTe={initial:{zIndex:2,opacity:0},animate:{opacity:1,scale:1,transition:{duration:w5*.75,delay:w5*.25,ease:[.26,.08,.25,1]}},exit:{zIndex:1,opacity:0,pointerEvents:"none",position:"absolute",left:["50%","50%"],x:["-50%","-50%"],transition:{duration:w5,ease:[.26,.08,.25,1]}}},an={CONNECTORS:"CONNECTORS",PROFILE:"PROFILE",CONNECT:"CONNECT"},jTe=({open:e,pages:t,pageId:r,positionInside:n,inline:o,onClose:i,onBack:a,onInfo:s})=>{const l=Ui(),c=dE(),[u,f]=VH({timeout:160,preEnter:!0,mountOnEnter:!0,unmountOnExit:!0}),d=!(u==="exited"||u==="unmounted"),p=u==="preEnter"||u!=="exiting",h=l.route===an.CONNECTORS?0:1,m=STe(h,h);k.useEffect(()=>{f(e),e&&E(void 0)},[e]);const[_,w]=k.useState({width:void 0,height:void 0}),[g,E]=k.useState(void 0),A=V=>{const S={width:V==null?void 0:V.offsetWidth,height:V==null?void 0:V.offsetHeight};w({width:`${S==null?void 0:S.width}px`,height:`${S==null?void 0:S.height}px`})},N=k.useRef(null),D=k.useRef(),y=k.useCallback(V=>{V&&(N.current=V,E(g!==void 0),clearTimeout(D.current),D.current=setTimeout(()=>E(!1),360),A(V))},[g,D,N]);k.useEffect(()=>{N.current&&A(N.current)},[c]),k.useEffect(()=>{if(!d){w({width:void 0,height:void 0});return}const V=S=>{S.key==="Escape"&&i&&i()};return document.addEventListener("keydown",V),()=>{document.removeEventListener("keydown",V)}},[d,i]);const U={"--height":_.height,"--width":_.width};function L(){switch(l.route){case an.CONNECTORS:return"Connectors";case an.PROFILE:return"Profile";default:return""}}const G=R.jsx(vE,{$useTheme:l.theme,$useMode:l.mode,$customTheme:l.customTheme,children:R.jsxs(bTe,{role:"dialog",style:{pointerEvents:p?"auto":"none",position:n?"absolute":void 0},children:[!o&&R.jsx(pTe,{$active:p,onClick:i}),R.jsxs(wTe,{style:U,initial:!1,children:[R.jsx("div",{style:{pointerEvents:g?"all":"none",position:"absolute",top:0,bottom:0,left:"50%",transform:"translateX(-50%)",width:"var(--width)",zIndex:9,transition:"width 200ms ease"}}),R.jsxs(dY,{className:`${p&&"active"}`,children:[R.jsx(Yo,{initial:!1,children:l.errorMessage&&R.jsxs(aTe,{initial:{y:"10%",x:"-50%"},animate:{y:"-100%"},exit:{y:"100%"},transition:{duration:.2,ease:"easeInOut"},children:[R.jsx("span",{children:l.errorMessage}),R.jsx("div",{onClick:()=>console.log("click"),style:{position:"absolute",right:24,top:24},children:R.jsx(aT,{})})]})}),R.jsxs(pY,{children:[i&&R.jsx(d6,{"aria-label":"close",onClick:i,children:R.jsx(aT,{})}),R.jsx("div",{style:{position:"absolute",top:23,left:20,width:32,height:32},children:R.jsx(Yo,{children:a?R.jsx(p6,{disabled:g,"aria-label":"back",onClick:a,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:R.jsx(FTe,{})},"backButton"):l.route===an.PROFILE&&s&&R.jsx(h6,{disabled:g,"aria-label":"more info",onClick:s,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.1,delay:c?.01:0},children:R.jsx(NTe,{})},"infoButton")})})]}),R.jsx(Xm,{children:R.jsx(Yo,{children:R.jsx(ut.div,{style:{position:"absolute",top:0,bottom:0,left:52,right:52,display:"flex",justifyContent:"center"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c?0:.17,delay:c?.01:0},children:R.jsx(hE,{children:L()})},`${l.route}-''}`)})}),R.jsx(yTe,{children:t.map(({id:V,content:S})=>R.jsx(LTe,{open:V===r,initial:!n&&u!=="entered",enterAnim:V===r?h>m?"active-scale-up":"active":"",exitAnim:V!==r?h{const[i,a]=VH({timeout:400,preEnter:!0,initialEntered:t,mountOnEnter:!0,unmountOnExit:!0}),s=!(i==="exited"||i==="unmounted"),l=i==="preEnter"||i!=="exiting";return k.useEffect(()=>{a(t)},[t]),s?R.jsx(hY,{className:`${l?n:o}`,style:{animationDuration:r?"0ms":void 0,animationDelay:r?"0ms":void 0},children:e}):null},sT=({children:e})=>R.jsx(fTe,{children:R.jsx("span",{children:e??"or"})}),UTe=({background:e=!1,...t})=>R.jsx("svg",{...t,"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e?{background:"var(--ck-brand-walletConnect)"}:void 0,children:R.jsx("path",{d:"M9.58818 11.8556C13.1293 8.31442 18.8706 8.31442 22.4117 11.8556L22.8379 12.2818C23.015 12.4588 23.015 12.7459 22.8379 12.9229L21.3801 14.3808C21.2915 14.4693 21.148 14.4693 21.0595 14.3808L20.473 13.7943C18.0026 11.3239 13.9973 11.3239 11.5269 13.7943L10.8989 14.4223C10.8104 14.5109 10.6668 14.5109 10.5783 14.4223L9.12041 12.9645C8.94336 12.7875 8.94336 12.5004 9.12041 12.3234L9.58818 11.8556ZM25.4268 14.8706L26.7243 16.1682C26.9013 16.3452 26.9013 16.6323 26.7243 16.8093L20.8737 22.6599C20.6966 22.8371 20.4096 22.8371 20.2325 22.6599L16.0802 18.5076C16.0359 18.4634 15.9641 18.4634 15.9199 18.5076L11.7675 22.6599C11.5905 22.8371 11.3034 22.8371 11.1264 22.66C11.1264 22.66 11.1264 22.6599 11.1264 22.6599L5.27561 16.8092C5.09856 16.6322 5.09856 16.3451 5.27561 16.168L6.57313 14.8706C6.75019 14.6934 7.03726 14.6934 7.21431 14.8706L11.3668 19.023C11.411 19.0672 11.4828 19.0672 11.5271 19.023L15.6793 14.8706C15.8563 14.6934 16.1434 14.6934 16.3205 14.8706L20.473 19.023C20.5172 19.0672 20.589 19.0672 20.6332 19.023L24.7856 14.8706C24.9627 14.6935 25.2498 14.6935 25.4268 14.8706Z",fill:e?"white":"var(--ck-brand-walletConnect)"})}),zTe=({...e})=>R.jsx("svg",{...e,"aria-hidden":"true",width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{background:"black"},children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2106 16H16V29.4577H19.2182V19.2182L37.2106 19.1011V16ZM37.3568 33.4073V54.6179H50.8146V51.3997H40.575L40.458 33.4073H37.3568ZM16 72.1714H37.2106V69.0703L19.2182 68.9533V58.7137H16V72.1714ZM50.9609 16H72.1714V29.4577H68.9533V19.2182L50.9609 19.1011V16ZM72.1714 72.1714H50.9609V69.0703L68.9533 68.9533V58.7137H72.1714V72.1714Z",fill:"white"})}),HTe=({...e})=>R.jsx("svg",{...e,version:"1.0",xmlns:"http://www.w3.org/2000/svg",width:"36.000000pt",height:"36.000000pt",viewBox:"0 0 108.000000 108.000000",preserveAspectRatio:"xMidYMid meet",children:R.jsxs("g",{transform:"translate(0.000000,108.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none",children:[R.jsx("path",{d:`M655 871 l-30 -6 -3 -108 -3 -109 31 6 c16 3 44 9 60 12 l30 6 0 104 -0 104 -27 -1 c-16 -1 -41 -4 -58 -8z`}),R.jsx("path",{d:`M381 831 c-19 -3 -36 -10 -37 -16 -2 -5 54 -136 124 -290 l128 -280 -64 3 c35 1 68 6 73 11 5 5 -48 133 -120 292 l-129 284 -34 1 c-19 1 -50 -1 --69 -5z`}),R.jsx("path",{d:`M390 426 l-55 -11 -3 -114 -3 -114 52 7 c90 12 90 12 87 133 -2 60 --7 107 -13 109 -5 1 -35 -3 -65 -10z`})]})});var Fr={AlephiumIcon:HTe,WalletConnect:UTe,Ledger:zTe};let gY=[];typeof window<"u"&&(gY=[{id:"injected",name:"Extension Wallet",shortName:"Browser",logos:{default:R.jsx(Fr.AlephiumIcon,{}),mobile:R.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:R.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:R.jsx(Fr.AlephiumIcon,{})})}),transparent:R.jsx(Fr.AlephiumIcon,{})},scannable:!1,extensionIsInstalled:()=>!!window.alephiumProviders},{id:"desktopWallet",name:"Desktop wallet",shortName:"Desktop wallet",logos:{default:R.jsx(Fr.AlephiumIcon,{}),mobile:R.jsx("div",{style:{padding:5,background:"var(--ck-body-background-tertiary)",borderRadius:"27%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:R.jsx("div",{style:{transform:"scale(0.75)",position:"relative",width:"100%"},children:R.jsx(Fr.AlephiumIcon,{})})}),transparent:R.jsx(Fr.AlephiumIcon,{})},scannable:!1},{id:"walletConnect",name:"WalletConnect",shortName:"WalletConnect",logos:{default:R.jsx(Fr.WalletConnect,{}),mobile:R.jsx("div",{style:{padding:5,background:"var(--ck-body-background-secondary)",borderRadius:"21%",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.02)"},children:R.jsx(Fr.WalletConnect,{})}),transparent:R.jsx(Fr.WalletConnect,{background:!1}),connectorButton:R.jsx(Fr.WalletConnect,{}),qrCode:R.jsx(Fr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}]);var $l=gY;const VTe=st(ut.div)` - display: flex; - flex-direction: column; - gap: 12px; - padding: 0 0 16px; -`,WTe=st(ut.button)` - cursor: pointer; - user-select: none; - position: relative; - display: flex; - align-items: center; - padding: 0 20px; - width: 100%; - height: 64px; - font-size: 17px; - font-weight: var(--ck-primary-button-font-weight, 500); - line-height: 20px; - text-align: var(--ck-body-button-text-align, left); - transition: 180ms ease; - transition-property: background, color, box-shadow, transform; - will-change: transform, box-shadow, background-color, color; - - --fallback-color: var(--ck-primary-button-color); - --fallback-background: var(--ck-primary-button-background); - --fallback-box-shadow: var(--ck-primary-button-box-shadow); - --fallback-border-radius: var(--ck-primary-button-border-radius); - - --color: var(--ck-primary-button-color, var(--fallback-color)); - --background: var(--ck-primary-button-background, var(--fallback-background)); - --box-shadow: var(--ck-primary-button-box-shadow, var(--fallback-box-shadow)); - --border-radius: var(--ck-primary-button-border-radius, var(--fallback-border-radius)); - - --hover-color: var(--ck-primary-button-hover-color, var(--color)); - --hover-background: var(--ck-primary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-primary-button-active-color, var(--hover-color)); - --active-background: var(--ck-primary-button-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-primary-button-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-primary-button-active-border-radius, var(--hover-border-radius)); - - color: var(--color); - background: var(--background); - box-shadow: var(--box-shadow); - border-radius: var(--border-radius); - - &:disabled { - transition: 180ms ease; - } - - &:not(:disabled) { - &:hover { - color: var(--hover-color); - background: var(--hover-background); - box-shadow: var(--hover-box-shadow); - border-radius: var(--hover-border-radius); - } - &:focus-visible { - transition-duration: 100ms; - color: var(--hover-color); - background: var(--hover-background); - box-shadow: var(--hover-box-shadow); - border-radius: var(--hover-border-radius); - } - &:active { - color: var(--active-color); - background: var(--active-background); - box-shadow: var(--active-box-shadow); - border-radius: var(--active-border-radius); - } - } -`,qTe=st(ut.span)` - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding-right: 38px; -`,GTe=st(ut.div)` - position: absolute; - right: 20px; - width: 32px; - height: 32px; - overflow: hidden; - svg { - display: block; - width: 100%; - height: 100%; - } -`,KTe=st(ut.div)` - display: flex; - flex-direction: row; - align-items: flex-start; - justify-content: space-between; - padding: 14px 0 28px; - margin: 0 0; -`,YTe=st(ut.button)` - --background: var(--ck-body-background-secondary); - cursor: pointer; - user-select: none; - position: relative; - padding: 0; - width: 100%; - min-width: 25%; - font-size: 13px; - font-weight: 500; - line-height: 13px; - text-align: center; - transition: transform 100ms ease; - - background: none; - - &:disabled { - cursor: not-allowed; - opacity: 0.4; - } - - &:not(:disabled) { - &:active { - transform: scale(0.97); - } - } -`,XTe=st(ut.span)` - display: block; - padding: 10px 0 0; - color: var(--ck-body-color); - opacity: 0.75; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -`,ZTe=st(ut.div)` - margin: 0 auto; - width: 60px; - height: 60px; - overflow: hidden; - svg { - border-radius: inherit; - display: block; - position: relative; - transform: translate3d(0, 0, 0); - width: 100%; - height: 100%; - } -`,JTe=()=>{const e=$l.find(t=>t.id==="desktopWallet");if(!e)throw new Error("Desktop wallet connector configuration not found");return e},QTe=e=>{const t=typeof window<"u",r=dE()&&!t;return{id:"injected",name:"Extension Wallet",shortName:"browser",scannable:!1,logos:{default:R.jsx(Fr.AlephiumIcon,{})},installed:!!(!r&&t)}},eDe=e=>({id:"walletConnect",name:"Other Wallets",logos:{default:R.jsx(Fr.WalletConnect,{}),mobile:R.jsx(Fr.WalletConnect,{}),transparent:R.jsx(Fr.WalletConnect,{background:!1}),connectorButton:R.jsx(Fr.WalletConnect,{}),qrCode:R.jsx(Fr.WalletConnect,{background:!0})},logoBackground:"var(--ck-brand-walletConnect)",scannable:!0}),tDe=({})=>[QTe(),eDe(),JTe()];function rDe(){return tDe({})}const nDe=()=>{const e=Ui(),t=dE(),r=rDe();return R.jsx(Ts,{style:{width:312},children:t?R.jsx(R.Fragment,{children:R.jsx(KTe,{children:$l.map(n=>{var o,i,a,s,l;const c=$l.filter(d=>d.id===n.id)[0];if(!c)return null;let u=c.logos,f=(i=(o=c.shortName)!==null&&o!==void 0?o:c.name)!==null&&i!==void 0?i:n.name;if(c.id==="injected"&&n.name){const d=lT(n.name,r);d&&(u=d.logos,f=d.name.replace(" Wallet",""))}return c.id==="walletConnect"?f="Wallet Connect":c.id==="desktopWallet"&&(f="Desktop wallet"),R.jsxs(YTe,{onClick:()=>{e.setRoute(an.CONNECT),e.setConnectorId(n.id)},children:[R.jsx(ZTe,{children:(l=(s=(a=u.mobile)!==null&&a!==void 0?a:u.appIcon)!==null&&s!==void 0?s:u.connectorButton)!==null&&l!==void 0?l:u.default}),R.jsx(XTe,{children:f})]},`m-${n.id}`)})})}):R.jsx(R.Fragment,{children:R.jsx(VTe,{children:$l.map(n=>{var o,i;const a=$l.filter(u=>u.id===n.id)[0];if(!a)return null;let s=a.logos,l=(o=a.name)!==null&&o!==void 0?o:n.name;if(a.id==="walletConnect"?l="WalletConnect":a.id==="desktopWallet"&&(l="Desktop wallet"),a.id==="injected"&&n.name){const u=lT(n.name,r);u&&(s=u.logos,l=u.name)}let c=(i=s.connectorButton)!==null&&i!==void 0?i:s.default;return a.extensionIsInstalled&&s.appIcon&&a.extensionIsInstalled()&&(c=s.appIcon),R.jsxs(WTe,{disabled:e.route!==an.CONNECTORS,onClick:()=>{e.setRoute(an.CONNECT),e.setConnectorId(n.id)},children:[R.jsx(GTe,{children:c}),R.jsx(qTe,{children:l})]},n.id)})})})})},lT=(e,t)=>{let r=e.split(/[(),]+/);r.shift(),r=r.map(i=>i.trim());const n=r.filter(i=>t.map(s=>s.name).includes(i)?i:null);return n.length===0?null:t.filter(i=>i.installed&&i.name===n[0])[0]},Oc=st(ut.div)` - display: flex; - flex-direction: column; - gap: 6px; - position: relative; - left: 0; - right: 0; - ${po} { - padding: 0 8px 32px; - gap: 12px; - } -`,x5=2,oDe=eo` - 0%{ transform:none; } - 25%{ transform:translateX(${x5}px); } - 50%{ transform:translateX(-${x5}px); } - 75%{ transform:translateX(${x5}px); } - 100%{ transform:none; } -`,iDe=eo` - 0%{ opacity:1; } - 100%{ opacity:0; } -`,tp=st(ut.div)` - /* - background: var( - --ck-body-background - ); // To stop the overlay issue during transition for the squircle spinner - */ -`,aDe=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - margin: 10px auto 16px; - height: 120px; - //transform: scale(1.001); // fixes shifting issue between states -`,sDe=st(ut.div)` - user-select: none; - position: relative; - --spinner-error-opacity: 0; - &:before { - content: ''; - position: absolute; - inset: -5px; - opacity: 0; - background: var(--ck-body-color-danger); - ${e=>e.$circle&&dr` - border-radius: 50%; - background: none; - box-shadow: inset 0 0 0 3.5px var(--ck-body-color-danger); - `} - } - ${e=>e.$shake&&dr` - animation: ${oDe} 220ms ease-out both; - &:before { - animation: ${iDe} 220ms ease-out 750ms both; - } - `} -`,lDe=st(ut.button)` - z-index: 5; - appearance: none; - position: absolute; - right: 2px; - bottom: 2px; - padding: 0; - display: flex; - align-items: center; - justify-content: center; - width: 32px; - height: 32px; - border-radius: 16px; - cursor: pointer; - overflow: hidden; - background: none; - - color: var(--ck-body-background); - transition: color 200ms ease; - box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15); - - &:before { - z-index: 3; - content: ''; - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 200ms ease; - background: var(--ck-body-color); - } - - &:hover:before { - opacity: 0.1; - } -`,cDe=st(ut.div)` - position: absolute; - inset: 0; - - &:before { - z-index: 1; - content: ''; - position: absolute; - inset: 3px; - border-radius: 16px; - background: conic-gradient(from 90deg, currentColor 10%, var(--ck-body-color) 80%); - } - - svg { - z-index: 2; - display: block; - position: relative; - width: 100%; - height: 100%; - } -`,cT=eo` - 0%{ transform: rotate(0deg); } - 100%{ transform: rotate(360deg); } -`,uDe=st(ut.div)` - position: absolute; - right: 16px; - top: 0; - bottom: 0; - display: flex; - align-items: center; - justify-content: center; - animation: ${cT} 1s linear infinite; - svg { - display: block; - position: relative; - animation: ${cT} 1s ease-in-out infinite; - } -`,bu=st.svg` - --x: -3px; - --stroke-width: 2; - position: relative; - top: 1px; - left: -0.5px; - display: inline-block; - vertical-align: middle; - margin-left: 9px; - margin-right: 1px; - transition: all 100ms ease; - transform: translateX(var(--x, -3px)); - color: var(--ck-secondary-button-color, var(--ck-body-color)); - opacity: 0.4; -`,rp=st.path``,np=st.line` - transition: inherit; - transition-property: transform; - transform-origin: 90% 50%; - transform: scaleX(0.1); -`,v6=st.div` - display: inline-block; - vertical-align: middle; - position: relative; - margin-right: 6px; - color: var(--ck-secondary-button-color, var(--ck-body-color)); -`,fDe=st.div` - transform: rotate(90deg); - ${bu} { - margin: 0 auto; - } -`,dDe=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - inset: 0; - height: 100%; -`,pDe=st.button` - - ${({disabled:e})=>e&&dr` - cursor: not-allowed; - pointer-events: none; - `} - - ${({$variant:e})=>{if(e==="primary")return dr` - --color: var(--ck-primary-button-color, var(--ck-body-color)); - --background: var(--ck-primary-button-background, var(--ck-body-background-primary)); - --box-shadow: var(--ck-primary-button-box-shadow); - --border-radius: var(--ck-primary-button-border-radius); - --font-weight: var(--ck-primary-button-font-weight, 500); - - --hover-color: var(--ck-button-primary-hover-color, var(--color)); - --hover-background: var(--ck-primary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-primary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-primary-button-hover-border-radius, var(--border-radius)); - --hover-font-weight: var(--ck-primary-button-font-weight, var(--font-weight)); - `;if(e==="secondary")return dr` - --color: var(--ck-secondary-button-color, var(--ck-body-color)); - --background: var(--ck-secondary-button-background, var(--ck-body-background-secondary)); - --box-shadow: var(--ck-secondary-button-box-shadow); - --border-radius: var(--ck-secondary-button-border-radius); - --font-weight: var(--ck-secondary-button-font-weight, 500); - - --hover-color: var(--ck-secondary-button-hover-color, var(--color)); - --hover-background: var(--ck-secondary-button-hover-background, var(--background)); - --hover-box-shadow: var(--ck-secondary-button-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-secondary-button-hover-border-radius, var(--border-radius)); - --hover-font-weight: var(--ck-secondary-button-font-weight, var(--font-weight)); - `;if(e==="tertiary")return dr` - --color: var(--ck-tertiary-button-color, var(--ck-secondary-button-color)); - --background: var(--ck-tertiary-button-background, var(--ck-secondary-button-background)); - --box-shadow: var(--ck-tertiary-button-box-shadow, var(--ck-secondary-button-box-shadow)); - --border-radius: var(--ck-tertiary-button-border-radius, var(--ck-secondary-button-border-radius)); - --font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); - - --hover-color: var(--button-tertiary-hover-color, var(--ck-tertiary-button-color)); - --hover-background: var(--ck-tertiary-button-hover-background, var(--ck-tertiary-button-background)); - --hover-box-shadow: var(--ck-tertiary-button-hover-box-shadow, var(--ck-tertiary-button-box-shadow)); - --hover-border-radius: var( - --ck-tertiary-button-hover-border-radius, - var(--ck-tertiary-button-border-radius, var(--border-radius)) - ); - --hover-font-weight: var(--ck-tertiary-button-font-weight, var(--ck-secondary-button-font-weight)); - `}} - - appearance: none; - cursor: pointer; - user-select: none; - min-width: fit-content; - width: 100%; - display:block; - text-align: center; - height: 48px; - margin: 12px 0 0; - line-height: 48px; - padding: 0 4px; - font-size: 16px; - font-weight: var(--font-weight,500); - text-decoration: none; - white-space: nowrap; - transition: 100ms ease; - transition-property: box-shadow, background-color; - color: var(--color); - background: var(--background); - border-radius: var(--border-radius); - box-shadow: var(--box-shadow); - will-change: transform, box-shadow, background-color, color; - - ${v6} { - ${bu} { - transform: translateX(0); - ${np} { - transform: none; - } - ${rp} { - } - } - } -} - - @media only screen and (min-width: ${Ia.mobileWidth+1}px) { - &:hover, - &:focus-visible { - color: var(--ck-accent-text-color, var(--hover-color)); - background: var(--ck-accent-color, var(--hover-background)); - border-radius: var(--hover-border-radius); - box-shadow: var(--hover-box-shadow); - - ${bu} { - transform: translateX(0); - ${np} { - transform: none; - } - ${rp} { - } - } - ${v6} { - ${bu} { - transform: translateX(var(--x)); - ${np} { - transform: scaleX(0.1); - } - ${rp} { - } - } - } - } - &:active { - box-shadow: var(--ck-secondary-button-active-box-shadow, var(--hover-box-shadow)); - } - } - @media only screen and (max-width: ${Ia.mobileWidth}px) { - transition: transform 100ms ease; - transform: scale(1); - font-size: 17px; - &:active { - } - } -`,hDe=st.div` - transform: translateZ(0); // Shifting fix - position: relative; - display: inline-block; - vertical-align: middle; - max-width: calc(100% - 42px); - /* - overflow: hidden; - text-overflow: ellipsis; - */ -`,uT=st(ut.div)` - position: relative; - display: inline-block; - vertical-align: middle; - max-width: 20px; - max-height: 20px; - margin: 0 10px; - &:first-child { - margin-left: 0; - } - &:last-child { - margin-right: 0; - } - ${e=>e.$rounded&&dr` - overflow: hidden; - border-radius: 5px; - `} - svg { - display: block; - position: relative; - max-width: 100%; - height: auto; - } -`,Zm={duration:.4,ease:[.175,.885,.32,.98]},vDe=()=>R.jsx(uDe,{initial:{opacity:0,rotate:180},animate:{opacity:1,rotate:0},exit:{position:"absolute",opacity:0,rotate:-180,transition:{...Zm}},transition:{...Zm,delay:.2},children:R.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("circle",{cx:"9",cy:"9",r:"7",stroke:"currentColor",strokeOpacity:"0.1",strokeWidth:"2.5"}),R.jsx("path",{d:"M16 9C16 5.13401 12.866 2 9 2",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]})}),nu=({children:e,variant:t="secondary",disabled:r,icon:n,iconPosition:o="left",roundedIcon:i,waiting:a,arrow:s,download:l,href:c,style:u,onClick:f})=>{const d=typeof e=="string"?e:l6(e).join(""),p=typeof c=="string"?c:l6(c).join("");return R.jsx(pDe,{as:c?"a":void 0,onClick:h=>{!r&&f&&f(h)},href:p,target:c&&"_blank",rel:c&&"noopener noreferrer",disabled:r,$variant:t,style:u,children:R.jsxs(Yo,{initial:!1,children:[R.jsxs(dDe,{initial:{opacity:0,y:-10},animate:{opacity:1,y:-1},exit:{position:"absolute",opacity:0,y:10,transition:{...Zm}},transition:{...Zm,delay:.2},children:[n&&o==="left"&&R.jsx(uT,{$rounded:i,children:n}),l&&R.jsx(v6,{children:R.jsx(fDe,{children:R.jsxs(bu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx(np,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"}),R.jsx(rp,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"var(--stroke-width)",strokeLinecap:"round"})]})})}),R.jsx(hDe,{style:{paddingLeft:s?6:0},children:R.jsx(hE,{children:e})}),n&&o==="right"&&R.jsx(uT,{$rounded:i,children:n}),s&&R.jsxs(bu,{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx(np,{stroke:"currentColor",x1:"1",y1:"6",x2:"12",y2:"6",strokeWidth:"2",strokeLinecap:"round"}),R.jsx(rp,{stroke:"currentColor",d:"M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314",strokeWidth:"2",strokeLinecap:"round"})]})]},d),a&&R.jsx(vDe,{})]})})},gDe=st(ut.div)` - z-index: 2147483647; - position: fixed; - inset: 0; - pointer-events: none; -`,mDe=st(ut.div)` - --shadow: var(--ck-tooltip-shadow); - z-index: 2147483647; - position: absolute; - top: 0; - left: 0; - display: flex; - gap: 8px; - width: fit-content; - align-items: center; - justify-content: center; - border-radius: var(--ck-tooltip-border-radius, ${e=>e.$size==="small"?11:14}px); - border-radius: ; - padding: 10px 16px 10px 12px; - font-size: 14px; - line-height: 19px; - font-weight: 500; - letter-spacing: -0.1px; - color: var(--ck-tooltip-color); - background: var(--ck-tooltip-background); - box-shadow: var(--shadow); - > span { - z-index: 3; - position: relative; - } - > div { - margin: -4px 0; // offset for icon - } - strong { - color: var(--ck-spinner-color); - } - - .ck-tt-logo { - display: inline-block; - vertical-align: text-bottom; - height: 1em; - width: 1.25em; - svg { - display: block; - height: 100%; - transform: translate(0.5px, -1px) scale(1.75); - } - } -`,yDe=st(ut.div)` - z-index: 2; - position: absolute; - display: flex; - align-items: center; - justify-content: center; - width: ${e=>e.$size==="small"?14:18}px; - right: 100%; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - content: ''; - position: absolute; - box-shadow: var(--shadow); - width: ${e=>e.$size==="small"?14:18}px; - height: ${e=>e.$size==="small"?14:18}px; - transform: translate(75%, 0) rotate(45deg); - background: var(--ck-tooltip-background); - border-radius: ${e=>e.$size==="small"?2:3}px 0 0 0; - } -`,bDe=({children:e,message:t,open:r,xOffset:n=0,yOffset:o=0,delay:i})=>{const a=Ui(),[s,l]=k.useState(!1),[c,u]=k.useState(!1),[f,d]=k.useState("small"),[p,h]=k.useState(!1),[m]=k.useState(a.route),_=k.useRef(null),[w,g]=XH({debounce:p?0:220,offsetSize:!0,scroll:!0}),E=()=>{let D=!1;const y=n+g.left+g.width,U=o+g.top+g.height*.5;return(y>window.innerWidth||y<0||U>window.innerHeight||U<0)&&(D=!0),D};return(typeof window<"u"?k.useLayoutEffect:k.useEffect)(()=>{if(!_.current||g.top+g.bottom+g.left+g.right+g.height+g.width===0)return;const D=n+g.left+g.width,y=o+g.top+g.height*.5;!p&&D!==0&&y!==0&&h(!0),_.current.style.left=`${D}px`,_.current.style.top=`${y}px`,d(_.current.offsetHeight<=40?"small":"large"),u(E())},[g,r,s]),k.useEffect(()=>{a.open||l(!1)},[a.open]),k.useEffect(()=>{l(!!r)},[r]),R.jsxs(R.Fragment,{children:[R.jsx(ut.div,{ref:w,style:r===void 0?{cursor:"help"}:{},onHoverStart:()=>l(!0),onHoverEnd:()=>l(!1),onClick:()=>l(!1),children:e}),R.jsx(cY,{children:R.jsx(Yo,{children:m===a.route&&!c&&s&&R.jsx(vE,{$useTheme:a.theme,$useMode:a.mode,$customTheme:a.customTheme,children:R.jsx(gDe,{children:R.jsxs(mDe,{role:"tooltip",$size:f,ref:_,initial:"collapsed",animate:p?"open":{},exit:"collapsed",variants:{collapsed:{transformOrigin:"20px 50%",opacity:0,scale:.9,z:.01,y:"-50%",x:20,transition:{duration:.1}},open:{willChange:"opacity,transform",opacity:1,scale:1,z:.01,y:"-50%",x:20,transition:{ease:[.76,0,.24,1],duration:.15,delay:i||.5}}},children:[t,R.jsx(yDe,{$size:f})]})})})})})]})},wDe=st(ut.div)` - display: flex; - gap: 8px; - position: relative; - border-radius: 9px; - margin: 0 auto; - padding: 10px; - text-align: left; - font-size: 14px; - line-height: 17px; - font-weight: 400; - max-width: 260px; - min-width: 100%; - - border-radius: var(--ck-alert-border-radius, 12px); - color: var(--ck-alert-color, var(--ck-body-color-muted)); - background: var(--ck-alert-background, var(--ck-body-background-secondary)); - box-shadow: var(--ck-alert-box-shadow, var(--ck-body-box-shadow)); - - @media only screen and (max-width: ${Ia.mobileWidth}px) { - padding: 16px; - font-size: 16px; - line-height: 21px; - border-radius: 24px; - text-align: center; - } -`,xDe=st(ut.div)` - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - svg { - display: block; - width: 100%; - height: auto; - } -`,Jm=ne.forwardRef(({children:e,icon:t},r)=>R.jsxs(wDe,{children:[t&&R.jsx(xDe,{children:t}),R.jsx("div",{children:e})]}));Jm.displayName="Alert";const _De=st(ut.div)` - z-index: 4; - position: relative; - width: 100px; - height: 100px; - svg { - z-index: 3; - position: relative; - display: block; - } -`,EDe=st(ut.div)` - z-index: 2; - position: absolute; - //overflow: hidden; - inset: 6px; - border-radius: 50px; - background: var(--ck-body-background); - display: flex; - align-items: center; - justify-content: center; - svg, - img { - pointer-events: none; - display: block; - margin: 0 auto; - width: 100%; - height: 100%; - ${e=>e.$small&&dr` - width: 60%; - height: 60%; - `} - } -`,SDe=st(ut.div)` - position: absolute; - inset: -5px; -`,CDe=st(ut.div)` - pointer-events: none; - user-select: none; - z-index: 1; - position: absolute; - inset: -25%; - background: var(--ck-body-background); - div:first-child { - position: absolute; - left: 50%; - right: 0; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - position: absolute; - content: ''; - inset: 0; - background: var(--ck-spinner-color); - transform-origin: 0% 50%; - animation: rotateExpiringSpinner 5000ms ease-in both; - } - } - div:last-child { - position: absolute; - left: 0; - right: 50%; - top: 0; - bottom: 0; - overflow: hidden; - &:before { - position: absolute; - content: ''; - inset: 0; - background: var(--ck-spinner-color); - transform-origin: 100% 50%; - animation: rotateExpiringSpinner 5000ms ease-out 5000ms both; - } - } - @keyframes rotateExpiringSpinner { - 0% { - transform: rotate(-180deg); - } - 100% { - transform: rotate(0deg); - } - } -`,PDe=st(ut.div)` - pointer-events: none; - user-select: none; - z-index: 1; - position: absolute; - inset: 0; - svg { - display: block; - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; - animation: rotateSpinner 1200ms linear infinite; - } - @keyframes rotateSpinner { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } - } -`,ODe=({logo:e,smallLogo:t,connecting:r=!0,unavailable:n=!1,countdown:o=!1})=>R.jsxs(_De,{transition:{duration:.5,ease:[.175,.885,.32,.98]},children:[R.jsx(EDe,{$small:!n&&t,style:n?{borderRadius:0}:void 0,children:e}),R.jsx(SDe,{children:R.jsxs(Yo,{children:[r&&R.jsx(PDe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:o?1:0}},children:R.jsxs("svg",{"aria-hidden":"true",width:"102",height:"102",viewBox:"0 0 102 102",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M52 100C24.3858 100 2 77.6142 2 50",stroke:"url(#paint0_linear_1943_4139)",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round"}),R.jsx("defs",{children:R.jsxs("linearGradient",{id:"paint0_linear_1943_4139",x1:"2",y1:"48.5",x2:"53",y2:"100",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"var(--ck-spinner-color)"}),R.jsx("stop",{offset:"1",stopColor:"var(--ck-spinner-color)",stopOpacity:"0"})]})})]})},"Spinner"),o&&R.jsxs(CDe,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:[R.jsx("div",{}),R.jsx("div",{})]},"ExpiringSpinner")]})})]}),fT=({...e})=>R.jsx("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 2.82561C0 1.26507 1.26507 0 2.82561 0H4.59161C6.15215 0 7.41722 1.26507 7.41722 2.82561V4.59161C7.41722 6.15215 6.15215 7.41722 4.59161 7.41722H2.82561C1.26507 7.41722 0 6.15215 0 4.59161V2.82561ZM2.82561 1.69536C2.20139 1.69536 1.69536 2.20139 1.69536 2.82561V4.59161C1.69536 5.21583 2.20139 5.72185 2.82561 5.72185H4.59161C5.21583 5.72185 5.72185 5.21583 5.72185 4.59161V2.82561C5.72185 2.20139 5.21583 1.69536 4.59161 1.69536H2.82561ZM0 11.4084C0 9.84791 1.26507 8.58284 2.82561 8.58284H4.59161C6.15215 8.58284 7.41722 9.8479 7.41722 11.4084V13.1744C7.41722 14.735 6.15215 16.0001 4.59161 16.0001H2.82561C1.26507 16.0001 0 14.735 0 13.1744V11.4084ZM2.82561 10.2782C2.20139 10.2782 1.69536 10.7842 1.69536 11.4084V13.1744C1.69536 13.7987 2.20139 14.3047 2.82561 14.3047H4.59161C5.21583 14.3047 5.72185 13.7987 5.72185 13.1744V11.4084C5.72185 10.7842 5.21583 10.2782 4.59161 10.2782H2.82561ZM11.4083 0C9.84779 0 8.58272 1.26507 8.58272 2.82561V4.59161C8.58272 6.15215 9.84779 7.41722 11.4083 7.41722H13.1743C14.7349 7.41722 15.9999 6.15215 15.9999 4.59161V2.82561C15.9999 1.26507 14.7349 0 13.1743 0H11.4083ZM10.2781 2.82561C10.2781 2.20139 10.7841 1.69536 11.4083 1.69536H13.1743C13.7985 1.69536 14.3046 2.20139 14.3046 2.82561V4.59161C14.3046 5.21583 13.7985 5.72185 13.1743 5.72185H11.4083C10.7841 5.72185 10.2781 5.21583 10.2781 4.59161V2.82561ZM15.7351 9.96026C15.7351 10.7795 15.0709 11.4437 14.2516 11.4437C13.4323 11.4437 12.7682 10.7795 12.7682 9.96026C12.7682 9.14098 13.4323 8.47682 14.2516 8.47682C15.0709 8.47682 15.7351 9.14098 15.7351 9.96026ZM9.96026 11.4437C10.7795 11.4437 11.4437 10.7795 11.4437 9.96026C11.4437 9.14098 10.7795 8.47682 9.96026 8.47682C9.14098 8.47682 8.47682 9.14098 8.47682 9.96026C8.47682 10.7795 9.14098 11.4437 9.96026 11.4437ZM15.7351 14.2517C15.7351 15.071 15.0709 15.7352 14.2516 15.7352C13.4323 15.7352 12.7682 15.071 12.7682 14.2517C12.7682 13.4325 13.4323 12.7683 14.2516 12.7683C15.0709 12.7683 15.7351 13.4325 15.7351 14.2517ZM9.96026 15.7352C10.7795 15.7352 11.4437 15.071 11.4437 14.2517C11.4437 13.4325 10.7795 12.7683 9.96026 12.7683C9.14098 12.7683 8.47682 13.4325 8.47682 14.2517C8.47682 15.071 9.14098 15.7352 9.96026 15.7352Z",fill:"currentColor",fillOpacity:"0.3"})}),kDe=({...e})=>R.jsxs("svg",{"aria-hidden":"true",width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z",fill:"currentColor"}),R.jsx("path",{d:"M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z",fill:"currentColor"})]}),ADe=({...e})=>R.jsx("svg",{"aria-hidden":"true",width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:0,top:0},...e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0C1.79086 0 0 1.79086 0 4V10C0 12.2091 1.79086 14 4 14H6C6.55228 14 7 13.5523 7 13C7 12.4477 6.55228 12 6 12H4C2.89543 12 2 11.1046 2 10V4C2 2.89543 2.89543 2 4 2H6C6.55228 2 7 1.55228 7 1C7 0.447715 6.55228 0 6 0H4ZM11.7071 3.29289C11.3166 2.90237 10.6834 2.90237 10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L11.5858 6H9.5H6C5.44772 6 5 6.44772 5 7C5 7.55228 5.44772 8 6 8H9.5H11.5858L10.2929 9.29289C9.90237 9.68342 9.90237 10.3166 10.2929 10.7071C10.6834 11.0976 11.3166 11.0976 11.7071 10.7071L14.7071 7.70711C15.0976 7.31658 15.0976 6.68342 14.7071 6.29289L11.7071 3.29289Z",fill:"currentColor",fillOpacity:"0.4"})}),IDe=({...e})=>R.jsx("svg",{"aria-hidden":"true",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM13.274 7.13324C13.6237 6.70579 13.5607 6.07577 13.1332 5.72604C12.7058 5.37632 12.0758 5.43932 11.726 5.86676L7.92576 10.5115L6.20711 8.79289C5.81658 8.40237 5.18342 8.40237 4.79289 8.79289C4.40237 9.18342 4.40237 9.81658 4.79289 10.2071L7.29289 12.7071C7.49267 12.9069 7.76764 13.0128 8.04981 12.9988C8.33199 12.9847 8.59505 12.8519 8.77396 12.6332L13.274 7.13324Z",fill:"currentColor"})}),$De=({...e})=>R.jsx("svg",{"aria-hidden":"true",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:R.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM24.5001 8.74263C25.0834 8.74263 25.5563 9.21551 25.5563 9.79883V14.5997C25.5563 15.183 25.0834 15.6559 24.5001 15.6559H19.6992C19.1159 15.6559 18.643 15.183 18.643 14.5997C18.643 14.0164 19.1159 13.5435 19.6992 13.5435H21.8378L20.071 11.8798C20.0632 11.8724 20.0555 11.865 20.048 11.8574C19.1061 10.915 17.8835 10.3042 16.5643 10.1171C15.2452 9.92999 13.9009 10.1767 12.7341 10.82C11.5674 11.4634 10.6413 12.4685 10.0955 13.684C9.54968 14.8994 9.41368 16.2593 9.70801 17.5588C10.0023 18.8583 10.711 20.0269 11.7273 20.8885C12.7436 21.7502 14.0124 22.2582 15.3425 22.336C16.6726 22.4138 17.9919 22.0572 19.1017 21.3199C19.5088 21.0495 19.8795 20.7333 20.2078 20.3793C20.6043 19.9515 21.2726 19.9262 21.7004 20.3228C22.1282 20.7194 22.1534 21.3876 21.7569 21.8154C21.3158 22.2912 20.8176 22.7161 20.2706 23.0795C18.7793 24.0702 17.0064 24.5493 15.2191 24.4448C13.4318 24.3402 11.7268 23.6576 10.3612 22.4998C8.9956 21.3419 8.0433 19.7716 7.6478 18.0254C7.2523 16.2793 7.43504 14.4519 8.16848 12.8186C8.90192 11.1854 10.1463 9.83471 11.7142 8.97021C13.282 8.10572 15.0884 7.77421 16.861 8.02565C18.6282 8.27631 20.2664 9.09278 21.5304 10.3525L23.4439 12.1544V9.79883C23.4439 9.21551 23.9168 8.74263 24.5001 8.74263Z",fill:"currentColor"})}),TDe=({...e})=>R.jsxs("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[R.jsx("path",{d:"M14 9.5V7C14 5.89543 13.1046 5 12 5H7C5.89543 5 5 5.89543 5 7V12C5 13.1046 5.89543 14 7 14H9.5",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),R.jsx("rect",{x:"10",y:"10",width:"9",height:"9",rx:"2",stroke:"var(--ck-body-color-muted)",strokeWidth:"2"}),R.jsx("path",{d:"M1 3L3 5L7 1",stroke:"var(--ck-body-color)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]}),DDe=st(ut.div)` - display: flex; - align-items: center; - justify-content: center; - max-width: 32px; - max-height: 32px; - width: 100%; - height: 100%; - svg { - display: block; - width: 100%; - height: 100%; - } -`,MDe=R.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("g",{filter:"url(#filter0_ii_927_5781)",children:R.jsxs("g",{clipPath:"url(#clip0_927_5781)",children:[R.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"#DB4437"}),R.jsx("path",{d:"M1.58771 0V12.2727H6.06498L10.0002 5.45455H20.0002V0H1.58771Z",fill:"url(#paint0_linear_927_5781)"}),R.jsx("path",{d:"M6.17038 12.2272L1.64538 4.46582L1.57947 4.57946L6.07265 12.284L6.17038 12.2272Z",fill:"black",fillOpacity:"0.15"}),R.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"#0F9D58"}),R.jsx("path",{d:"M0 20.0003H9.51932L13.9375 15.5821V12.273H6.0625L0 1.87305V20.0003Z",fill:"url(#paint1_linear_927_5781)"}),R.jsx("path",{d:"M13.8412 12.4208L13.7469 12.3662L9.38324 19.9969H9.51392L13.8435 12.4242L13.8412 12.4208Z",fill:"#263238",fillOpacity:"0.15"}),R.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"#FFCD40"}),R.jsx("path",{d:"M10.0006 5.45459L13.9381 12.2728L9.51996 20H20.0006V5.45459H10.0006Z",fill:"url(#paint2_linear_927_5781)"}),R.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"#FFCD40"}),R.jsx("path",{d:"M9.9996 5.45459L13.9371 12.2728L9.51892 20H19.9996V5.45459H9.9996Z",fill:"url(#paint3_linear_927_5781)"}),R.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"#DB4437"}),R.jsx("path",{d:"M1.58691 0V12.2727H6.06419L9.99941 5.45455H19.9994V0H1.58691Z",fill:"url(#paint4_linear_927_5781)"}),R.jsx("path",{d:"M10 5.45459V7.83527L18.9091 5.45459H10Z",fill:"url(#paint5_radial_927_5781)"}),R.jsx("path",{d:"M0 19.9998H9.51932L11.9318 15.9089L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"#0F9D58"}),R.jsx("path",{d:"M0 19.9998H9.51932L12.1023 15.5112L13.9375 12.2726H6.0625L0 1.87256V19.9998Z",fill:"url(#paint6_linear_927_5781)"}),R.jsx("path",{d:"M1.58771 4.59668L8.09339 11.1012L6.06384 12.2728L1.58771 4.59668Z",fill:"url(#paint7_radial_927_5781)"}),R.jsx("path",{d:"M9.52661 19.9884L11.9084 11.1021L13.938 12.2725L9.52661 19.9884Z",fill:"url(#paint8_radial_927_5781)"}),R.jsx("path",{d:"M10.0003 14.5455C12.5107 14.5455 14.5458 12.5104 14.5458 10C14.5458 7.48966 12.5107 5.45459 10.0003 5.45459C7.48996 5.45459 5.4549 7.48966 5.4549 10C5.4549 12.5104 7.48996 14.5455 10.0003 14.5455Z",fill:"#F1F1F1"}),R.jsx("path",{d:"M9.99995 13.6365C12.0083 13.6365 13.6363 12.0084 13.6363 10.0001C13.6363 7.99183 12.0083 6.36377 9.99995 6.36377C7.99164 6.36377 6.36359 7.99183 6.36359 10.0001C6.36359 12.0084 7.99164 13.6365 9.99995 13.6365Z",fill:"#4285F4"}),R.jsx("path",{d:"M10.0003 5.34082C7.48899 5.34082 5.4549 7.37491 5.4549 9.88628V9.99991C5.4549 7.48855 7.48899 5.45446 10.0003 5.45446H20.0003V5.34082H10.0003Z",fill:"black",fillOpacity:"0.2"}),R.jsx("path",{d:"M13.9318 12.273C13.1455 13.6299 11.6818 14.5458 10 14.5458C8.31818 14.5458 6.85227 13.6299 6.06818 12.273H6.06364L0 1.87305V1.98668L6.06818 12.3867C6.85455 13.7435 8.31818 14.6594 10 14.6594C11.6818 14.6594 13.1455 13.7446 13.9318 12.3867H13.9375V12.273H13.9307H13.9318Z",fill:"white",fillOpacity:"0.1"}),R.jsx("path",{opacity:"0.1",d:"M10.1133 5.45459C10.094 5.45459 10.0758 5.45686 10.0565 5.458C12.5406 5.48868 14.5452 7.50913 14.5452 10C14.5452 12.491 12.5406 14.5114 10.0565 14.5421C10.0758 14.5421 10.094 14.5455 10.1133 14.5455C12.6247 14.5455 14.6588 12.5114 14.6588 10C14.6588 7.48868 12.6247 5.45459 10.1133 5.45459Z",fill:"black"}),R.jsx("path",{d:"M13.9769 12.4204C14.3632 11.7522 14.5871 10.9795 14.5871 10.1522C14.5874 9.68602 14.5157 9.22262 14.3746 8.77832C14.4826 9.16696 14.5451 9.57377 14.5451 9.99764C14.5451 10.8249 14.3212 11.5976 13.9348 12.2658L13.9371 12.2704L9.51892 19.9976H9.65074L13.9769 12.4204Z",fill:"white",fillOpacity:"0.2"}),R.jsx("path",{d:"M10 0.113636C15.5034 0.113636 19.9682 4.56023 20 10.0568C20 10.0375 20.0011 10.0193 20.0011 10C20.0011 4.47727 15.5239 0 10.0011 0C4.47841 0 0 4.47727 0 10C0 10.0193 0.00113639 10.0375 0.00113639 10.0568C0.0318182 4.56023 4.49659 0.113636 10 0.113636Z",fill:"white",fillOpacity:"0.2"}),R.jsx("path",{d:"M10 19.8865C15.5034 19.8865 19.9682 15.4399 20 9.94336C20 9.96268 20.0011 9.98086 20.0011 10.0002C20.0011 15.5229 15.5239 20.0002 10.0011 20.0002C4.47841 20.0002 0 15.5229 0 10.0002C0 9.98086 0.00113639 9.96268 0.00113639 9.94336C0.0318182 15.4399 4.49659 19.8865 10.0011 19.8865H10Z",fill:"black",fillOpacity:"0.15"})]})}),R.jsxs("defs",{children:[R.jsxs("filter",{id:"filter0_ii_927_5781",x:0,y:"-0.235294",width:20,height:"20.4706",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[R.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),R.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),R.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),R.jsx("feOffset",{dy:"0.235294"}),R.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),R.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),R.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),R.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_927_5781"}),R.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),R.jsx("feOffset",{dy:"-0.235294"}),R.jsx("feGaussianBlur",{stdDeviation:"0.235294"}),R.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:-1,k3:1}),R.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),R.jsx("feBlend",{mode:"normal",in2:"effect1_innerShadow_927_5781",result:"effect2_innerShadow_927_5781"})]}),R.jsxs("linearGradient",{id:"paint0_linear_927_5781",x1:"2.42521",y1:"7.61591",x2:"8.39112",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),R.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),R.jsxs("linearGradient",{id:"paint1_linear_927_5781",x1:"11.6932",y1:"17.7844",x2:"5.06136",y2:"13.8981",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),R.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),R.jsxs("linearGradient",{id:"paint2_linear_927_5781",x1:"12.9438",y1:"4.75004",x2:"14.6143",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),R.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),R.jsxs("linearGradient",{id:"paint3_linear_927_5781",x1:"12.9428",y1:"4.75004",x2:"14.6132",y2:"12.0569",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#EA6100",stopOpacity:"0.3"}),R.jsx("stop",{offset:"0.66",stopColor:"#EA6100",stopOpacity:0})]}),R.jsxs("linearGradient",{id:"paint4_linear_927_5781",x1:"2.42441",y1:"7.61591",x2:"8.39032",y2:"4.13068",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#A52714",stopOpacity:"0.6"}),R.jsx("stop",{offset:"0.66",stopColor:"#A52714",stopOpacity:0})]}),R.jsxs("radialGradient",{id:"paint5_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.56818 5.44891) scale(9.55455)",children:[R.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),R.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),R.jsxs("linearGradient",{id:"paint6_linear_927_5781",x1:"11.6932",y1:"17.7839",x2:"5.06136",y2:"13.8976",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#055524",stopOpacity:"0.4"}),R.jsx("stop",{offset:"0.33",stopColor:"#055524",stopOpacity:0})]}),R.jsxs("radialGradient",{id:"paint7_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(1.57975 4.60463) scale(8.86818)",children:[R.jsx("stop",{stopColor:"#3E2723",stopOpacity:"0.2"}),R.jsx("stop",{offset:1,stopColor:"#3E2723",stopOpacity:0})]}),R.jsxs("radialGradient",{id:"paint8_radial_927_5781",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.97775 10.0157) scale(9.98523)",children:[R.jsx("stop",{stopColor:"#263238",stopOpacity:"0.2"}),R.jsx("stop",{offset:1,stopColor:"#263238",stopOpacity:0})]}),R.jsx("clipPath",{id:"clip0_927_5781",children:R.jsx("rect",{width:20,height:20,rx:10,fill:"white"})})]})]}),RDe=R.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsxs("g",{clipPath:"url(#clip0_927_5847)",children:[R.jsx("path",{d:"M19.011 6.71023C18.5898 5.69685 17.7355 4.60269 17.0665 4.25681C17.5436 5.18063 17.8747 6.17276 18.0481 7.19792L18.0499 7.21417C16.954 4.48315 15.0963 3.38023 13.5782 0.981835C13.5014 0.860539 13.4246 0.738994 13.3498 0.610696C13.3071 0.537418 13.2728 0.471393 13.2431 0.410621C13.1801 0.288713 13.1316 0.159878 13.0985 0.0267267C13.0985 0.0205825 13.0963 0.0146369 13.0923 0.0100242C13.0882 0.00541151 13.0826 0.00245454 13.0765 0.00171737C13.0705 7.85858e-05 13.0642 7.85858e-05 13.0582 0.00171737C13.057 0.00171737 13.055 0.00396821 13.0535 0.0044684C13.052 0.00496859 13.0487 0.00721943 13.0465 0.00821981L13.0502 0.00171737C10.6156 1.42725 9.78901 4.06574 9.71399 5.38624C8.74136 5.45292 7.81141 5.81121 7.04549 6.41437C6.96561 6.34671 6.88212 6.28343 6.79539 6.2248C6.57456 5.45174 6.56514 4.6336 6.76813 3.85566C5.87401 4.28877 5.07954 4.90279 4.43501 5.65884H4.43051C4.04636 5.17191 4.07337 3.5663 4.09538 3.23093C3.98174 3.2766 3.87326 3.33419 3.77176 3.40274C3.43264 3.64477 3.11562 3.91635 2.8244 4.2143C2.49255 4.55075 2.18946 4.91441 1.91831 5.30146V5.30296V5.3012C1.29521 6.18444 0.853213 7.18234 0.617826 8.23731L0.604821 8.30133C0.586564 8.38661 0.52079 8.81377 0.509535 8.90656C0.509535 8.91381 0.508035 8.92056 0.507285 8.92781C0.42244 9.36882 0.369864 9.81542 0.349976 10.2641V10.3141C0.354259 12.7396 1.26772 15.0754 2.91002 16.8604C4.55233 18.6454 6.80415 19.7498 9.22094 19.9556C11.6377 20.1615 14.0439 19.4538 15.9644 17.9723C17.8849 16.4908 19.1803 14.3431 19.5947 11.9532C19.6109 11.8282 19.6242 11.7044 19.6387 11.5781C19.8384 9.92791 19.6222 8.25404 19.01 6.70873L19.011 6.71023ZM7.83928 14.2981C7.88455 14.3198 7.92707 14.3433 7.97358 14.3641L7.98034 14.3684C7.93332 14.3458 7.8863 14.3224 7.83928 14.2981ZM18.0501 7.21692V7.20767L18.0519 7.21792L18.0501 7.21692Z",fill:"url(#paint0_linear_927_5847)"}),R.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint1_radial_927_5847)"}),R.jsx("path",{d:"M19.0109 6.71026C18.5898 5.69688 17.7354 4.60272 17.0664 4.25684C17.5435 5.18066 17.8746 6.17278 18.0481 7.19794V7.20719L18.0498 7.21745C18.797 9.35551 18.689 11.6997 17.7482 13.7599C16.6373 16.1435 13.9493 18.5867 9.7402 18.4667C5.19349 18.3379 1.18699 14.9629 0.439211 10.5437C0.30291 9.84668 0.439211 9.4933 0.507737 8.92684C0.414265 9.36685 0.362102 9.81463 0.351929 10.2643V10.3144C0.356212 12.7399 1.26967 15.0757 2.91198 16.8607C4.55429 18.6456 6.8061 19.7501 9.2229 19.9559C11.6397 20.1617 14.0458 19.4541 15.9664 17.9725C17.8869 16.491 19.1822 14.3434 19.5966 11.9535C19.6129 11.8284 19.6262 11.7046 19.6407 11.5783C19.8403 9.92819 19.6242 8.25431 19.0119 6.70901L19.0109 6.71026Z",fill:"url(#paint2_radial_927_5847)"}),R.jsx("path",{d:"M14.2993 7.84794C14.3203 7.8627 14.3398 7.87745 14.3595 7.89221C14.1161 7.46047 13.813 7.06519 13.4592 6.71802C10.4456 3.70439 12.6696 0.18557 13.0445 0.00550206L13.0483 0C10.6136 1.42553 9.78706 4.06402 9.71204 5.38452C9.82508 5.37677 9.93712 5.36726 10.0527 5.36726C10.9164 5.36893 11.7644 5.59929 12.5103 6.03492C13.2562 6.47055 13.8734 7.09592 14.2993 7.84744V7.84794Z",fill:"url(#paint3_radial_927_5847)"}),R.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint4_radial_927_5847)"}),R.jsx("path",{d:"M10.0577 8.45061C10.0417 8.6917 9.18992 9.52326 8.89206 9.52326C6.13602 9.52326 5.68835 11.1906 5.68835 11.1906C5.8104 12.5947 6.78877 13.7516 7.97146 14.3618C8.02548 14.3898 8.08025 14.4151 8.13502 14.4399C8.22989 14.4819 8.32476 14.5207 8.41963 14.5564C8.82553 14.7 9.25065 14.7821 9.68085 14.7997C14.5127 15.0263 15.448 9.02257 11.9615 7.27942C12.7839 7.1724 13.6168 7.37463 14.2986 7.84688C13.8727 7.09536 13.2555 6.46999 12.5096 6.03436C11.7637 5.59873 10.9158 5.36837 10.052 5.3667C9.93695 5.3667 9.82441 5.3762 9.71136 5.38396C8.73874 5.45064 7.80879 5.80893 7.04286 6.41209C7.19067 6.53714 7.35748 6.7042 7.70886 7.05058C8.36661 7.69857 10.0535 8.36983 10.0572 8.44861L10.0577 8.45061Z",fill:"url(#paint5_radial_927_5847)"}),R.jsx("path",{d:"M6.59134 6.0923C6.66987 6.14231 6.73464 6.18583 6.79141 6.2251C6.57058 5.45204 6.56117 4.63389 6.76415 3.85596C5.87003 4.28907 5.07556 4.90308 4.43103 5.65913C4.4783 5.65788 5.88432 5.63262 6.59134 6.0923Z",fill:"url(#paint6_radial_927_5847)"}),R.jsx("path",{d:"M0.437567 10.5439C1.1856 14.963 5.19185 18.3393 9.73855 18.4668C13.9476 18.5859 16.6361 16.1425 17.7466 13.7601C18.6873 11.6998 18.7954 9.35569 18.0482 7.21762V7.20837C18.0482 7.20111 18.0467 7.19686 18.0482 7.19911L18.0499 7.21537C18.3938 9.46046 17.2519 11.6345 15.4665 13.1076L15.4609 13.1201C11.9821 15.9536 8.6534 14.8292 7.98064 14.3706C7.93363 14.348 7.88661 14.3246 7.83959 14.3003C5.81158 13.3309 4.97352 11.4842 5.15358 9.89862C4.67218 9.90573 4.19905 9.77307 3.79151 9.51672C3.38397 9.26038 3.05952 8.89134 2.85747 8.45433C3.38987 8.1282 3.99692 7.94382 4.62077 7.91878C5.24461 7.89374 5.86448 8.02887 6.42131 8.31128C7.56906 8.83225 8.87507 8.8836 10.0602 8.45433C10.0564 8.37555 8.36954 7.70405 7.71179 7.05631C7.36041 6.70993 7.1936 6.54312 7.04579 6.41782C6.96591 6.35016 6.88243 6.28688 6.7957 6.22825C6.73818 6.18898 6.6734 6.14647 6.59562 6.09545C5.88861 5.63578 4.48258 5.66104 4.43607 5.66229H4.43156C4.04742 5.17535 4.07443 3.56975 4.09644 3.23438C3.9828 3.28005 3.87431 3.33764 3.77282 3.40619C3.4337 3.64822 3.11667 3.91979 2.82546 4.21774C2.49242 4.55325 2.18808 4.91607 1.91562 5.3024V5.3039V5.30215C1.29252 6.18539 0.850521 7.18329 0.615133 8.23825C0.610381 8.25801 0.266002 9.76357 0.435816 10.5444L0.437567 10.5439Z",fill:"url(#paint7_radial_927_5847)"}),R.jsx("path",{d:"M13.459 6.71761C13.8128 7.06516 14.1159 7.46087 14.3593 7.89305C14.4126 7.93331 14.4624 7.97333 14.5046 8.01209C16.7022 10.0378 15.5508 12.9014 15.465 13.104C17.2502 11.6332 18.3911 9.45763 18.0485 7.21179C16.952 4.47826 15.0923 3.37535 13.5768 0.976952C13.5 0.855657 13.4232 0.734111 13.3484 0.605813C13.3057 0.532535 13.2714 0.466511 13.2417 0.405738C13.1787 0.283831 13.1302 0.154995 13.0971 0.0218439C13.0971 0.0156997 13.0949 0.0097541 13.0909 0.0051414C13.0868 0.000528701 13.0812 -0.00242828 13.0751 -0.00316545C13.0691 -0.00480423 13.0628 -0.00480423 13.0568 -0.00316545C13.0556 -0.00316545 13.0536 -0.000914601 13.0521 -0.000414413C13.0506 8.57743e-05 13.0473 0.00233662 13.0451 0.00333699C12.6702 0.181154 10.4466 3.70222 13.4602 6.71335L13.459 6.71761Z",fill:"url(#paint8_radial_927_5847)"}),R.jsx("path",{d:"M14.5043 8.01315C14.462 7.97439 14.4122 7.93437 14.359 7.8941C14.3392 7.87935 14.3197 7.86459 14.2987 7.84984C13.6169 7.37759 12.784 7.17536 11.9616 7.28238C15.4479 9.02553 14.5125 15.0278 9.68095 14.8027C9.25075 14.785 8.82562 14.703 8.41973 14.5594C8.32486 14.5238 8.22999 14.485 8.13512 14.4428C8.08035 14.4178 8.02558 14.3928 7.97156 14.3648L7.97831 14.369C8.65206 14.829 11.9798 15.9526 15.4586 13.1186L15.4641 13.1061C15.5509 12.9035 16.7023 10.0399 14.5038 8.01415L14.5043 8.01315Z",fill:"url(#paint9_radial_927_5847)"}),R.jsx("path",{d:"M5.68842 11.1892C5.68842 11.1892 6.13583 9.52179 8.89212 9.52179C9.18998 9.52179 10.0425 8.69023 10.0578 8.44914C8.8727 8.8784 7.56669 8.82706 6.41894 8.30608C5.86211 8.02367 5.24224 7.88855 4.61839 7.91359C3.99455 7.93863 3.3875 8.123 2.8551 8.44914C3.05715 8.88615 3.3816 9.25518 3.78914 9.51153C4.19668 9.76787 4.66981 9.90053 5.15121 9.89343C4.97165 11.4783 5.80946 13.3247 7.83722 14.2951C7.88249 14.3168 7.925 14.3403 7.97152 14.3611C6.78783 13.7496 5.81046 12.5932 5.68842 11.1899V11.1892Z",fill:"url(#paint10_radial_927_5847)"}),R.jsx("path",{d:"M19.0112 6.71023C18.59 5.69685 17.7357 4.60269 17.0667 4.25681C17.5438 5.18063 17.8749 6.17276 18.0483 7.19792L18.0501 7.21417C16.9542 4.48315 15.0965 3.38023 13.5784 0.981835C13.5016 0.860539 13.4249 0.738994 13.3501 0.610696C13.3073 0.537418 13.2731 0.471393 13.2433 0.410621C13.1803 0.288713 13.1318 0.159878 13.0987 0.0267267C13.0988 0.0205825 13.0966 0.0146369 13.0925 0.0100242C13.0884 0.00541151 13.0828 0.00245454 13.0767 0.00171737C13.0708 7.85859e-05 13.0644 7.85859e-05 13.0585 0.00171737C13.0572 0.00171737 13.0552 0.00396821 13.0537 0.0044684C13.0522 0.00496859 13.049 0.00721943 13.0467 0.00821981L13.0505 0.00171737C10.6158 1.42725 9.78925 4.06574 9.71422 5.38624C9.82726 5.37848 9.9393 5.36898 10.0548 5.36898C10.9186 5.37065 11.7666 5.60101 12.5125 6.03664C13.2584 6.47227 13.8756 7.09764 14.3014 7.84916C13.6196 7.37691 12.7868 7.17468 11.9643 7.2817C15.4506 9.02485 14.5153 15.0271 9.68371 14.802C9.25351 14.7843 8.82838 14.7023 8.42248 14.5587C8.32761 14.5232 8.23275 14.4843 8.13788 14.4421C8.08311 14.4171 8.02834 14.3921 7.97432 14.3641L7.98107 14.3684C7.93405 14.3458 7.88703 14.3224 7.84002 14.2981C7.88528 14.3198 7.9278 14.3433 7.97432 14.3641C6.79062 13.7524 5.81326 12.5959 5.69121 11.1929C5.69121 11.1929 6.13863 9.52554 8.89491 9.52554C9.19277 9.52554 10.0453 8.69398 10.0606 8.45289C10.0568 8.37411 8.36996 7.7026 7.71222 7.05486C7.36084 6.70848 7.19402 6.54167 7.04622 6.41637C6.96634 6.34871 6.88285 6.28543 6.79612 6.2268C6.57529 5.45374 6.56588 4.6356 6.76886 3.85766C5.87474 4.29077 5.08027 4.90479 4.43574 5.66084H4.43124C4.04709 5.17391 4.0741 3.5683 4.09611 3.23293C3.98247 3.2786 3.87399 3.33619 3.77249 3.40474C3.43337 3.64677 3.11635 3.91835 2.82514 4.2163C2.49328 4.55275 2.19019 4.91641 1.91905 5.30345V5.30496V5.30321C1.29595 6.18644 0.853946 7.18434 0.618558 8.23931L0.605554 8.30333C0.587297 8.38861 0.505516 8.82177 0.493762 8.91481C0.418959 9.36194 0.371188 9.81318 0.350708 10.2661V10.3161C0.354992 12.7416 1.26845 15.0774 2.91076 16.8624C4.55307 18.6474 6.80488 19.7518 9.22168 19.9576C11.6385 20.1635 14.0446 19.4558 15.9652 17.9743C17.8857 16.4928 19.181 14.3451 19.5954 11.9552C19.6117 11.8302 19.6249 11.7064 19.6394 11.5801C19.8391 9.92991 19.623 8.25604 19.0107 6.71073L19.0112 6.71023ZM18.0496 7.20817L18.0513 7.21842L18.0496 7.20817Z",fill:"url(#paint11_linear_927_5847)"})]}),R.jsxs("defs",{children:[R.jsxs("linearGradient",{id:"paint0_linear_927_5847",x1:"17.728",y1:"3.09786",x2:"1.63621",y2:"18.6237",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{offset:"0.048",stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.111",stopColor:"#FFE847"}),R.jsx("stop",{offset:"0.225",stopColor:"#FFC830"}),R.jsx("stop",{offset:"0.368",stopColor:"#FF980E"}),R.jsx("stop",{offset:"0.401",stopColor:"#FF8B16"}),R.jsx("stop",{offset:"0.462",stopColor:"#FF672A"}),R.jsx("stop",{offset:"0.534",stopColor:"#FF3647"}),R.jsx("stop",{offset:"0.705",stopColor:"#E31587"})]}),R.jsxs("radialGradient",{id:"paint1_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(17.1052 2.25108) scale(20.2076)",children:[R.jsx("stop",{offset:"0.129",stopColor:"#FFBD4F"}),R.jsx("stop",{offset:"0.186",stopColor:"#FFAC31"}),R.jsx("stop",{offset:"0.247",stopColor:"#FF9D17"}),R.jsx("stop",{offset:"0.283",stopColor:"#FF980E"}),R.jsx("stop",{offset:"0.403",stopColor:"#FF563B"}),R.jsx("stop",{offset:"0.467",stopColor:"#FF3750"}),R.jsx("stop",{offset:"0.71",stopColor:"#F5156C"}),R.jsx("stop",{offset:"0.782",stopColor:"#EB0878"}),R.jsx("stop",{offset:"0.86",stopColor:"#E50080"})]}),R.jsxs("radialGradient",{id:"paint2_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.6024 10.5042) scale(20.2076)",children:[R.jsx("stop",{offset:"0.3",stopColor:"#960E18"}),R.jsx("stop",{offset:"0.351",stopColor:"#B11927",stopOpacity:"0.74"}),R.jsx("stop",{offset:"0.435",stopColor:"#DB293D",stopOpacity:"0.343"}),R.jsx("stop",{offset:"0.497",stopColor:"#F5334B",stopOpacity:"0.094"}),R.jsx("stop",{offset:"0.53",stopColor:"#FF3750",stopOpacity:0})]}),R.jsxs("radialGradient",{id:"paint3_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.1034 -2.25084) scale(14.638)",children:[R.jsx("stop",{offset:"0.132",stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.252",stopColor:"#FFDC3E"}),R.jsx("stop",{offset:"0.506",stopColor:"#FF9D12"}),R.jsx("stop",{offset:"0.526",stopColor:"#FF980E"})]}),R.jsxs("radialGradient",{id:"paint4_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(7.35173 15.7558) scale(9.62111)",children:[R.jsx("stop",{offset:"0.353",stopColor:"#3A8EE6"}),R.jsx("stop",{offset:"0.472",stopColor:"#5C79F0"}),R.jsx("stop",{offset:"0.669",stopColor:"#9059FF"}),R.jsx("stop",{offset:1,stopColor:"#C139E6"})]}),R.jsxs("radialGradient",{id:"paint5_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.5799 8.76923) rotate(-13.5916) scale(5.10194 5.97309)",children:[R.jsx("stop",{offset:"0.206",stopColor:"#9059FF",stopOpacity:0}),R.jsx("stop",{offset:"0.278",stopColor:"#8C4FF3",stopOpacity:"0.064"}),R.jsx("stop",{offset:"0.747",stopColor:"#7716A8",stopOpacity:"0.45"}),R.jsx("stop",{offset:"0.975",stopColor:"#6E008B",stopOpacity:"0.6"})]}),R.jsxs("radialGradient",{id:"paint6_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35238 1.50057) scale(6.9226)",children:[R.jsx("stop",{stopColor:"#FFE226"}),R.jsx("stop",{offset:"0.121",stopColor:"#FFDB27"}),R.jsx("stop",{offset:"0.295",stopColor:"#FFC82A"}),R.jsx("stop",{offset:"0.502",stopColor:"#FFA930"}),R.jsx("stop",{offset:"0.732",stopColor:"#FF7E37"}),R.jsx("stop",{offset:"0.792",stopColor:"#FF7139"})]}),R.jsxs("radialGradient",{id:"paint7_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.8545 -3.00121) scale(29.5361)",children:[R.jsx("stop",{offset:"0.113",stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.456",stopColor:"#FF980E"}),R.jsx("stop",{offset:"0.622",stopColor:"#FF5634"}),R.jsx("stop",{offset:"0.716",stopColor:"#FF3647"}),R.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),R.jsxs("radialGradient",{id:"paint8_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.3996 -1.36343) rotate(83.976) scale(21.6445 14.2051)",children:[R.jsx("stop",{stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.06",stopColor:"#FFE847"}),R.jsx("stop",{offset:"0.168",stopColor:"#FFC830"}),R.jsx("stop",{offset:"0.304",stopColor:"#FF980E"}),R.jsx("stop",{offset:"0.356",stopColor:"#FF8B16"}),R.jsx("stop",{offset:"0.455",stopColor:"#FF672A"}),R.jsx("stop",{offset:"0.57",stopColor:"#FF3647"}),R.jsx("stop",{offset:"0.737",stopColor:"#E31587"})]}),R.jsxs("radialGradient",{id:"paint9_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(9.35233 4.00165) scale(18.4369)",children:[R.jsx("stop",{offset:"0.137",stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.48",stopColor:"#FF980E"}),R.jsx("stop",{offset:"0.592",stopColor:"#FF5634"}),R.jsx("stop",{offset:"0.655",stopColor:"#FF3647"}),R.jsx("stop",{offset:"0.904",stopColor:"#E31587"})]}),R.jsxs("radialGradient",{id:"paint10_radial_927_5847",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.1041 5.00184) scale(20.1801)",children:[R.jsx("stop",{offset:"0.094",stopColor:"#FFF44F"}),R.jsx("stop",{offset:"0.231",stopColor:"#FFE141"}),R.jsx("stop",{offset:"0.509",stopColor:"#FFAF1E"}),R.jsx("stop",{offset:"0.626",stopColor:"#FF980E"})]}),R.jsxs("linearGradient",{id:"paint11_linear_927_5847",x1:"17.5331",y1:"3.01533",x2:"3.84302",y2:"16.708",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{offset:"0.167",stopColor:"#FFF44F",stopOpacity:"0.8"}),R.jsx("stop",{offset:"0.266",stopColor:"#FFF44F",stopOpacity:"0.634"}),R.jsx("stop",{offset:"0.489",stopColor:"#FFF44F",stopOpacity:"0.217"}),R.jsx("stop",{offset:"0.6",stopColor:"#FFF44F",stopOpacity:0})]}),R.jsx("clipPath",{id:"clip0_927_5847",children:R.jsx("rect",{width:20,height:20,fill:"white"})})]})]}),NDe=R.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M17.2924 5.22043L17.7256 4.15905L16.4982 2.8883C15.8339 2.22404 14.4187 2.61393 14.4187 2.61393L12.8158 0.794434H7.16242L5.55231 2.62115C5.55231 2.62115 4.13715 2.23848 3.47289 2.8883L2.24545 4.15183L2.67866 5.21321L2.13715 6.78721L3.9422 13.6681C4.31765 15.141 4.57036 15.7114 5.63173 16.4623L8.93137 18.7006C9.24906 18.8955 9.63895 19.2349 9.99274 19.2349C10.3465 19.2349 10.7364 18.8955 11.0541 18.7006L14.3538 16.4623C15.4151 15.7114 15.6678 15.141 16.0433 13.6681L17.8483 6.78721L17.2924 5.22043Z",fill:"url(#paint0_linear_927_5861)"}),R.jsx("path",{d:"M13.9711 3.78343C13.9711 3.78343 16.0433 6.28884 16.0433 6.81592C16.0433 7.35744 15.7834 7.49462 15.5234 7.77621L13.9711 9.43686C13.8267 9.58126 13.5162 9.82675 13.6967 10.2527C13.8772 10.686 14.1299 11.2203 13.8411 11.769C13.5523 12.3249 13.0469 12.6932 12.722 12.6354C12.2387 12.4786 11.7777 12.2602 11.3502 11.9856C11.0758 11.8051 10.1949 11.0758 10.1949 10.7943C10.1949 10.5127 11.1047 10 11.278 9.89895C11.444 9.78343 12.2166 9.33577 12.231 9.16249C12.2455 8.9892 12.2455 8.94588 12.0144 8.51267C11.7834 8.07946 11.379 7.50184 11.4368 7.12639C11.509 6.75094 12.1588 6.54877 12.6426 6.36827L14.1372 5.80509C14.2527 5.74733 14.2238 5.69679 13.8772 5.66068C13.5307 5.6318 12.5559 5.50184 12.1155 5.62458C11.6751 5.74733 10.9386 5.93505 10.8664 6.03614C10.8086 6.13722 10.7509 6.13722 10.8159 6.48379L11.2346 8.75816C11.2635 9.04697 11.3213 9.24191 11.018 9.31411C10.7003 9.38632 10.1733 9.50906 9.99276 9.50906C9.81225 9.50906 9.27796 9.38632 8.96749 9.31411C8.65702 9.24191 8.71478 9.04697 8.75088 8.75816C8.77976 8.46935 9.09745 6.82314 9.16243 6.48379C9.23464 6.13722 9.16965 6.13722 9.11189 6.03614C9.03969 5.93505 8.29601 5.74733 7.85558 5.62458C7.42236 5.50184 6.44041 5.6318 6.09384 5.66791C5.74727 5.69679 5.71839 5.74011 5.83391 5.81231L7.3285 6.36827C7.80503 6.54877 8.46929 6.75094 8.53428 7.12639C8.60648 7.50906 8.19493 8.07946 7.95666 8.51267C7.71839 8.94588 7.72561 8.9892 7.74005 9.16249C7.75449 9.33577 8.53428 9.78343 8.69312 9.89895C8.86641 10.0073 9.77615 10.5127 9.77615 10.7943C9.77615 11.0758 8.91695 11.8051 8.62814 11.9856C8.20063 12.2602 7.73957 12.4786 7.2563 12.6354C6.93139 12.6932 6.42597 12.3249 6.12994 11.769C5.84113 11.2203 6.10106 10.686 6.27435 10.2527C6.45485 9.81953 6.1516 9.58848 5.99998 9.43686L4.44763 7.77621C4.19493 7.50906 3.935 7.36466 3.935 6.83036C3.935 6.29606 6.0072 3.79787 6.0072 3.79787L7.97832 4.11556C8.20937 4.11556 8.722 3.92061 9.19132 3.75455C9.66063 3.61014 9.98554 3.5957 9.98554 3.5957C9.98554 3.5957 10.3032 3.5957 10.7798 3.75455C11.2563 3.91339 11.7617 4.11556 11.9928 4.11556C12.231 4.11556 13.9783 3.77621 13.9783 3.77621L13.9711 3.78343ZM12.4188 13.3719C12.5487 13.4441 12.4693 13.6029 12.3465 13.6896L10.5126 15.1192C10.3682 15.2636 10.1372 15.4802 9.98554 15.4802C9.83391 15.4802 9.61009 15.2636 9.45846 15.1192C8.8506 14.6351 8.23683 14.1586 7.61731 13.6896C7.50178 13.6029 7.42236 13.4513 7.54511 13.3719L8.62814 12.7943C9.05864 12.5665 9.51417 12.3897 9.98554 12.2672C10.0938 12.2672 10.7798 12.5127 11.3357 12.7943L12.4188 13.3719Z",fill:"white"}),R.jsx("path",{d:"M14.4332 2.62115L12.8159 0.794434H7.16243L5.55232 2.62115C5.55232 2.62115 4.13716 2.23848 3.4729 2.8883C3.4729 2.8883 5.35016 2.72223 5.99998 3.77638L7.99276 4.11573C8.2238 4.11573 8.73644 3.92079 9.20575 3.75472C9.67507 3.61032 9.99998 3.59588 9.99998 3.59588C9.99998 3.59588 10.3177 3.59588 10.7942 3.75472C11.2707 3.91357 11.7761 4.11573 12.0072 4.11573C12.2455 4.11573 13.9928 3.77638 13.9928 3.77638C14.6426 2.72223 16.5198 2.8883 16.5198 2.8883C15.8556 2.22404 14.4404 2.61393 14.4404 2.61393",fill:"url(#paint1_linear_927_5861)"}),R.jsxs("defs",{children:[R.jsxs("linearGradient",{id:"paint0_linear_927_5861",x1:"2.13715",y1:"10.1991",x2:"17.8483",y2:"10.1991",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{offset:"0.4",stopColor:"#FF5500"}),R.jsx("stop",{offset:"0.6",stopColor:"#FF2000"})]}),R.jsxs("linearGradient",{id:"paint1_linear_927_5861",x1:"3.73384",y1:"2.4883",x2:"16.5198",y2:"2.4883",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#FF452A"}),R.jsx("stop",{offset:1,stopColor:"#FF2000"})]})]})]}),FDe=R.jsxs("svg",{"aria-hidden":"true",width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R.jsxs("g",{clipPath:"url(#clip0_927_5865)",children:[R.jsx("path",{d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint0_linear_927_5865)"}),R.jsx("path",{opacity:"0.35",d:"M18.0547 14.8828C17.7865 15.0222 17.5099 15.1448 17.2266 15.25C16.3293 15.584 15.3792 15.7533 14.4219 15.75C10.7266 15.75 7.50781 13.2109 7.50781 9.94531C7.51262 9.50803 7.63385 9.07993 7.85905 8.70506C8.08424 8.33019 8.40526 8.0221 8.78906 7.8125C5.44531 7.95312 4.58594 11.4375 4.58594 13.4766C4.58594 19.2578 9.90625 19.8359 11.0547 19.8359C11.6719 19.8359 12.6016 19.6562 13.1641 19.4766L13.2656 19.4453C15.4183 18.7014 17.2534 17.2465 18.4688 15.3203C18.5041 15.2618 18.5192 15.1933 18.5119 15.1253C18.5046 15.0574 18.4752 14.9937 18.4282 14.944C18.3812 14.8944 18.3192 14.8615 18.2518 14.8505C18.1843 14.8394 18.1151 14.8508 18.0547 14.8828Z",fill:"url(#paint1_radial_927_5865)"}),R.jsx("path",{d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint2_linear_927_5865)"}),R.jsx("path",{opacity:"0.41",d:"M8.2578 18.8516C7.56239 18.4196 6.95961 17.854 6.48436 17.1875C5.94166 16.4447 5.56809 15.5921 5.38987 14.6896C5.21165 13.787 5.23311 12.8565 5.45272 11.9631C5.67234 11.0697 6.08479 10.2353 6.66115 9.51826C7.23751 8.80123 7.96379 8.21903 8.78905 7.8125C9.03905 7.69531 9.45311 7.49219 10.0078 7.5C10.3981 7.50302 10.7824 7.59627 11.1308 7.77245C11.4791 7.94864 11.7819 8.20299 12.0156 8.51562C12.3299 8.93835 12.5023 9.4498 12.5078 9.97656C12.5078 9.96094 14.4219 3.75781 6.2578 3.75781C2.82811 3.75781 0.00780015 7.00781 0.00780015 9.86719C-0.00584162 11.3776 0.317079 12.8721 0.953112 14.2422C1.99473 16.4602 3.81447 18.2185 6.06689 19.1834C8.3193 20.1483 10.8476 20.2526 13.1719 19.4766C12.3576 19.7337 11.4972 19.811 10.6501 19.7031C9.80297 19.5952 8.98941 19.3047 8.26561 18.8516H8.2578Z",fill:"url(#paint3_radial_927_5865)"}),R.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint4_radial_927_5865)"}),R.jsx("path",{d:"M11.9062 11.625C11.8359 11.7031 11.6406 11.8203 11.6406 12.0625C11.6406 12.2656 11.7734 12.4688 12.0156 12.6328C13.1328 13.4141 15.25 13.3047 15.2578 13.3047C16.0907 13.3041 16.9081 13.0802 17.625 12.6562C18.3467 12.2341 18.9456 11.6307 19.3622 10.9057C19.7788 10.1808 19.9986 9.35955 20 8.52344C20.0234 6.77344 19.375 5.60937 19.1172 5.09375C17.4531 1.85937 13.8828 4.89564e-08 10 4.89564e-08C7.37202 -0.00025981 4.84956 1.03398 2.97819 2.87904C1.10682 4.7241 0.0369559 7.23166 0 9.85938C0.0390625 7.00781 2.875 4.70312 6.25 4.70312C6.52344 4.70312 8.08594 4.72656 9.53125 5.48438C10.5466 5.98895 11.3875 6.78627 11.9453 7.77344C12.4219 8.60156 12.5078 9.65625 12.5078 10.0781C12.5078 10.5 12.2969 11.1172 11.8984 11.6328L11.9062 11.625Z",fill:"url(#paint5_radial_927_5865)"})]}),R.jsxs("defs",{children:[R.jsxs("linearGradient",{id:"paint0_linear_927_5865",x1:"4.58594",y1:"13.8281",x2:"18.5234",y2:"13.8281",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#0C59A4"}),R.jsx("stop",{offset:1,stopColor:"#114A8B"})]}),R.jsxs("radialGradient",{id:"paint1_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(12.2813 13.9332) scale(7.45313 7.08047)",children:[R.jsx("stop",{offset:"0.7",stopOpacity:0}),R.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),R.jsx("stop",{offset:1})]}),R.jsxs("linearGradient",{id:"paint2_linear_927_5865",x1:"11.9297",y1:"7.78125",x2:"3.23436",y2:"17.2578",gradientUnits:"userSpaceOnUse",children:[R.jsx("stop",{stopColor:"#1B9DE2"}),R.jsx("stop",{offset:"0.2",stopColor:"#1595DF"}),R.jsx("stop",{offset:"0.7",stopColor:"#0680D7"}),R.jsx("stop",{offset:1,stopColor:"#0078D4"})]}),R.jsxs("radialGradient",{id:"paint3_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(5.51209 15.5419) rotate(-81.3844) scale(11.202 9.05011)",children:[R.jsx("stop",{offset:"0.8",stopOpacity:0}),R.jsx("stop",{offset:"0.9",stopOpacity:"0.5"}),R.jsx("stop",{offset:1})]}),R.jsxs("radialGradient",{id:"paint4_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(2.02266 3.69656) rotate(92.2906) scale(15.8251 33.7043)",children:[R.jsx("stop",{stopColor:"#35C1F1"}),R.jsx("stop",{offset:"0.1",stopColor:"#34C1ED"}),R.jsx("stop",{offset:"0.2",stopColor:"#2FC2DF"}),R.jsx("stop",{offset:"0.3",stopColor:"#2BC3D2"}),R.jsx("stop",{offset:"0.7",stopColor:"#36C752"})]}),R.jsxs("radialGradient",{id:"paint5_radial_927_5865",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(18.7547 6.03906) rotate(73.7398) scale(7.60156 6.18159)",children:[R.jsx("stop",{stopColor:"#66EB6E"}),R.jsx("stop",{offset:1,stopColor:"#66EB6E",stopOpacity:0})]}),R.jsx("clipPath",{id:"clip0_927_5865",children:R.jsx("rect",{width:20,height:20,fill:"white"})})]})]});var _5={Chrome:MDe,FireFox:RDe,Brave:NDe,Edge:FDe};const g6=ne.forwardRef(({browser:e},t)=>{const r=e??uY();let n;switch(r){case"chrome":n=_5.Chrome;break;case"firefox":n=_5.FireFox;break;case"edge":n=_5.Edge;break}return n?R.jsx(DDe,{children:n}):R.jsx(R.Fragment,{})});g6.displayName="BrowserIcon";const gE="alph:lastConnectedAccount";function mE(){return window===void 0?void 0:window.localStorage}function BDe(){const e=mE();if(e===void 0)return;const t=e.getItem(gE);return t===null?void 0:JSON.parse(t)}function mY(e,t,r){const n=mE();if(n!==void 0){const o={connectorId:e,account:t,network:r};n.setItem(gE,JSON.stringify(o))}}function yY(){const e=mE();e!==void 0&&e.removeItem(gE)}const jDe="6e2562e43678dd68a9070a62b6d52207";async function bY(e,t){const r=await JH.WalletConnectProvider.init({projectId:jDe,networkId:t.network,addressGroup:t.addressGroup,onDisconnected:t.onDisconnected});r.on("displayUri",e),r.on("session_delete",t.onDisconnected);try{if(await r.connect(),r.account)return await t.onConnected({account:r.account,signerProvider:r}),r.account}catch(n){console.error("Wallet connect error:",n),t.onDisconnected()}}const LDe=async e=>{const t=await bY(r=>J$.open(r,()=>console.log("qr closed")),e);return J$.close(),t},UDe=async e=>await bY(t=>window.open(`alephium://wc?uri=${t}`),e),dT=async e=>{await e.disconnect()},zDe=async e=>{try{const t=await fE(),r=await(t==null?void 0:t.enable({...e,networkId:e.network}));if(t&&r)return await e.onConnected({account:r,signerProvider:t}),mY("injected",r,e.network),r}catch(t){console.error("Wallet connect error:",t),e.onDisconnected()}},HDe=async e=>await e.disconnect(),VDe=async e=>{try{const t=await fE(),r=await(t==null?void 0:t.enableIfConnected({...e,networkId:e.network}));return t&&r&&(await e.onConnected({account:r,signerProvider:t}),mY("injected",r,e.network)),r}catch(t){console.error("Wallet auto-connect error:",t),e.onDisconnected()}},WDe={injected:{connect:zDe,disconnect:HDe,autoConnect:VDe},walletConnect:{connect:LDe,disconnect:dT},desktopWallet:{connect:UDe,disconnect:dT}};function wY(e){return WDe[`${e}`]}function Ef(){const{connectorId:e}=Ui(),{signerProvider:t,setSignerProvider:r,setConnectionStatus:n,setAccount:o,addressGroup:i,network:a,keyType:s}=ja(),l=k.useCallback(()=>{yY(),r(void 0),o(void 0)},[r,o]),c=k.useCallback(h=>{o(h.account),r(h.signerProvider)},[o,r]),u=k.useMemo(()=>({network:a,addressGroup:i,keyType:s,onDisconnected:l,onConnected:c}),[l,c,a,i,s]),f=k.useMemo(()=>wY(e),[e]),d=k.useMemo(()=>async()=>(n("connecting"),await f.connect(u)),[f,u,n]),p=k.useMemo(()=>async()=>{t&&await f.disconnect(t)},[f,t]);return k.useMemo(()=>({connect:d,disconnect:p}),[d,p])}const Nt={CONNECTED:"connected",CONNECTING:"connecting",EXPIRING:"expiring",FAILED:"failed",REJECTED:"rejected",NOTCONNECTED:"notconnected",UNAVAILABLE:"unavailable"},kc={initial:{willChange:"transform,opacity",position:"relative",opacity:0,scale:.95},animate:{position:"relative",opacity:1,scale:1,transition:{ease:[.16,1,.3,1],duration:.4,delay:.05,position:{delay:0}}},exit:{position:"absolute",opacity:0,scale:.95,transition:{ease:[.16,1,.3,1],duration:.3}}},qDe=({connectorId:e,switchConnectMethod:t,forceState:r})=>{var n,o;const{setOpen:i}=Ui(),{connect:a}=Ef(),[s,l]=k.useState(e),[c,u]=k.useState(!1),f=$l.filter(N=>N.id===s)[0],d=9;k.useState(d);const p=f.extensionIsInstalled&&f.extensionIsInstalled(),h=uY(),m=f.extensions?f.extensions[h]:void 0,_=f.extensions?{name:Object.keys(f.extensions)[0],label:Object.keys(f.extensions)[0].charAt(0).toUpperCase()+Object.keys(f.extensions)[0].slice(1),url:f.extensions[Object.keys(f.extensions)[0]]}:void 0,[w,g]=k.useState(r||(p?Nt.CONNECTING:Nt.UNAVAILABLE)),E=k.useCallback(()=>{p&&a().then(N=>{N&&g(Nt.CONNECTED),i(!1)})},[p,i,a]),A=k.useRef();return k.useEffect(()=>{if(w!==Nt.UNAVAILABLE)return A.current=setTimeout(E,600),()=>{clearTimeout(A.current)}},[w,E]),f?f.id==="walletConnect"?R.jsx(Ts,{children:R.jsxs(tp,{children:[R.jsx(Xm,{children:"Invalid State"}),R.jsx(po,{children:R.jsx(Jm,{children:"WalletConnect does not have an injection flow. This state should never happen."})})]})}):R.jsx(Ts,{children:R.jsxs(tp,{children:[R.jsx(aDe,{children:R.jsxs(sDe,{$shake:w===Nt.FAILED||w===Nt.REJECTED,$circle:!0,children:[R.jsx(Yo,{children:(w===Nt.FAILED||w===Nt.REJECTED)&&R.jsx(lDe,{"aria-label":"Retry",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileTap:{scale:.9},transition:{duration:.1},onClick:E,children:R.jsx(cDe,{children:R.jsx(bDe,{open:c&&(w===Nt.FAILED||w===Nt.REJECTED),message:"try again",xOffset:-6,children:R.jsx($De,{})})})})}),R.jsx(ODe,{logo:w===Nt.UNAVAILABLE?R.jsx("div",{style:{transform:"scale(1.14)",position:"relative",width:"100%"},children:(n=f.logos.transparent)!==null&&n!==void 0?n:f.logos.default}):R.jsx(R.Fragment,{children:(o=f.logos.transparent)!==null&&o!==void 0?o:f.logos.default}),smallLogo:f.id==="injected",connecting:w===Nt.CONNECTING,unavailable:w===Nt.UNAVAILABLE,countdown:w===Nt.EXPIRING})]})}),R.jsx(dTe,{children:R.jsxs(Yo,{initial:!1,children:[w===Nt.FAILED&&R.jsxs(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:[R.jsxs(po,{children:[R.jsxs(es,{$error:!0,children:[R.jsx(kDe,{}),"failed"]}),R.jsx(f6,{children:"failed"})]}),f.scannable&&R.jsxs(R.Fragment,{children:[R.jsx(sT,{}),R.jsx(nu,{icon:R.jsx(fT,{}),onClick:()=>t(s),children:"scan qr code"})]})]},Nt.FAILED),w===Nt.REJECTED&&R.jsxs(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:[R.jsxs(po,{style:{paddingBottom:28},children:[R.jsx(es,{children:"rejected"}),R.jsx(f6,{children:"rejected"})]}),f.scannable&&R.jsxs(R.Fragment,{children:[R.jsx(sT,{}),R.jsx(nu,{icon:R.jsx(fT,{}),onClick:()=>t(s),children:"scan the qr code"})]})]},Nt.REJECTED),(w===Nt.CONNECTING||w===Nt.EXPIRING)&&R.jsx(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:R.jsx(po,{style:{paddingBottom:28},children:R.jsx(es,{children:f.id==="injected"?"connecting":"rejected"})})},Nt.CONNECTING),w===Nt.CONNECTED&&R.jsx(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:R.jsx(po,{children:R.jsxs(es,{$valid:!0,children:[R.jsx(IDe,{})," ","Connected"]})})},Nt.CONNECTED),w===Nt.NOTCONNECTED&&R.jsx(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:R.jsx(po,{children:R.jsx(es,{children:"Not Connected"})})},Nt.NOTCONNECTED),w===Nt.UNAVAILABLE&&R.jsx(Oc,{initial:"initial",animate:"animate",exit:"exit",variants:kc,children:m?R.jsxs(R.Fragment,{children:[R.jsx(po,{style:{paddingBottom:18},children:R.jsx(es,{children:"Install"})}),!p&&m&&R.jsx(nu,{href:m,icon:R.jsx(g6,{}),children:"Install the extension"})]}):R.jsxs(R.Fragment,{children:[R.jsx(po,{style:{paddingBottom:12},children:R.jsx(es,{children:"Not Available"})}),!p&&_&&R.jsxs(nu,{href:_==null?void 0:_.url,icon:R.jsx(g6,{browser:_==null?void 0:_.name}),children:["Install on ",_==null?void 0:_.label]})]})},Nt.UNAVAILABLE)]})})]})}):R.jsx(Ts,{children:R.jsxs(tp,{children:[R.jsx(Xm,{children:"Invalid State"}),R.jsx(po,{children:R.jsx(Jm,{children:"No connectors match the id given. This state should never happen."})})]})})};let pT=!1;const GDe=()=>{const{setOpen:e}=Ui(),[t,r]=k.useState(),{connect:n}=Ef();return k.useEffect(()=>{pT||n().then(()=>{pT=!0,e(!1),r(void 0)}).catch(o=>r(`${o}`))},[n,e]),R.jsx(Ts,{children:R.jsx(tp,{children:t!==void 0?t:"Connecting to wallet connect"})})},KDe=()=>{const[e,t]=k.useState(),{connect:r}=Ef();return k.useEffect(()=>{r().catch(n=>t(`${n}`))},[r]),R.jsx(Ts,{children:R.jsx(tp,{children:e!==void 0?e:"Opening desktop wallet..."})})},Xa={QRCODE:"QRCODE",INJECTOR:"INJECTOR",DESKTOPWALLET:"DESKTOPWALLET"},YDe=({connectorId:e})=>{const[t,r]=k.useState(e),n=$l.filter(l=>l.id===t)[0],o=n.extensionIsInstalled&&n.extensionIsInstalled(),i=(!n.scannable||o)&&e!=="desktopWallet",[a,s]=k.useState(i?Xa.INJECTOR:e==="desktopWallet"?Xa.DESKTOPWALLET:Xa.QRCODE);return n?a===Xa.QRCODE?R.jsx(GDe,{}):a===Xa.DESKTOPWALLET?R.jsx(KDe,{}):R.jsx(Yo,{children:a===Xa.INJECTOR&&R.jsx(ut.div,{initial:"initial",animate:"animate",exit:"exit",variants:BTe,children:R.jsx(qDe,{connectorId:t,switchConnectMethod:l=>{l&&r(l),s(Xa.QRCODE)}})},Xa.INJECTOR)}):R.jsx(Jm,{children:"Connector not found"})},XDe=st(ut.div)` - transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); - display: flex; - align-items: center; - justify-content: center; - width: 16px; - svg { - display: block; - } - svg, - svg path, - svg rect { - transition: inherit; - } - svg path:first-child { - transform-origin: 50% 50%; - fill: var(--bg); - stroke: var(--color); - } - svg rect { - transform-origin: 53% 63%; - fill: var(--bg); - stroke: var(--color); - } - svg path:last-child { - opacity: 0; - stroke: var(--bg); - transform: translate(11.75px, 10px) rotate(90deg) scale(0.6); - } - ${e=>e.$clipboard?dr` - --color: var(--ck-focus-color) !important; - --bg: var(--ck-body-background); - svg { - transition-delay: 0ms; - path:first-child { - opacity: 0; - transform: rotate(-90deg) scale(0.2); - } - rect { - rx: 10px; - fill: var(--color); - transform: rotate(-90deg) scale(1.45); - } - path:last-child { - transition-delay: 100ms; - opacity: 1; - transform: translate(7.75px, 9.5px); - } - } - `:dr` - &:hover { - } - &:hover:active { - } - `} -`,hT=({copied:e,small:t})=>R.jsx(XDe,{$clipboard:e,children:R.jsx(TDe,{style:{transform:t?"scale(1)":"translateX(3px) scale(1.5)",opacity:t||e?1:.3}})}),ZDe=st.div` - --color: var(--ck-copytoclipboard-stroke); - --bg: var(--ck-body-background); - transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1); - - cursor: pointer; - display: inline-flex; - align-items: center; - justify-content: center; - - ${e=>e.$disabled?dr` - cursor: not-allowed; - opacity: 0.4; - `:dr` - &:hover { - --color: var(--ck-body-color-muted); - } - `} -`,JDe=st.div` - display: block; - position: relative; - transition: inherit; - svg { - position: absolute; - left: 100%; - display: block; - top: -1px; - margin: 0; - margin-left: 4px; - } -`,QDe=({string:e,children:t,variant:r})=>{const[n,o]=k.useState(!1);let i;const a=()=>{if(!e)return;const s=e.trim();navigator.clipboard&&navigator.clipboard.writeText(s),o(!0),clearTimeout(i),i=setTimeout(()=>o(!1),1e3)};return r==="button"?R.jsx(nu,{disabled:!e,onClick:a,icon:R.jsx(hT,{copied:n}),children:t}):R.jsx(ZDe,{onClick:a,$disabled:!e,children:R.jsxs(JDe,{children:[t,R.jsx(hT,{copied:n,small:!0})]})})},eMe=({closeModal:e})=>{const{displayAccount:t,setOpen:r}=Ui(),{account:n}=ja(),{disconnect:o}=Ef(),[i,a]=k.useState(!1),s=n?t?t(n):n.address:void 0;return k.useEffect(()=>{if(i)return e?e():r(!1),()=>{o(),r(!1)}},[i,o,e,r]),R.jsxs(Ts,{children:[R.jsx(po,{style:{paddingBottom:22,gap:6},children:R.jsx(es,{children:R.jsx(QDe,{string:s,children:s&&pE(s)})})}),R.jsx(nu,{onClick:()=>a(!0),icon:R.jsx(ADe,{}),children:"Disconnect"})]})},tMe={},rMe=({mode:e="auto",theme:t="auto",customTheme:r=tMe})=>{const{route:n,setRoute:o,open:i,setOpen:a,connectorId:s,setMode:l,setTheme:c,setCustomTheme:u}=Ui(),{account:f,network:d,addressGroup:p,keyType:h}=ja(),m=k.useRef(d),_=k.useRef(p),w=k.useRef(h),g=!!f,{disconnect:E}=Ef();k.useEffect(()=>{g&&m.current!==d&&E(),m.current=d},[d,m,E,g]),k.useEffect(()=>{g&&p!==void 0&&_.current!==p&&E(),_.current=p},[p,_,E,g]),k.useEffect(()=>{g&&w.current!==h&&E(),w.current=h},[h,w,E,g]);const A=n!==an.CONNECTORS&&n!==an.PROFILE,N=()=>{o(an.CONNECTORS)},D=[{id:"CONNECTORS",content:R.jsx(nDe,{})},{id:"CONNECT",content:R.jsx(YDe,{connectorId:s})},{id:"PROFILE",content:R.jsx(eMe,{})}],y=k.useCallback(()=>{a(!1)},[a]);return k.useEffect(()=>{g&&n!==an.PROFILE&&y()},[g,n,y]),k.useEffect(()=>l(e),[l,e]),k.useEffect(()=>c(t),[c,t]),k.useEffect(()=>u(r),[u,r]),k.useEffect(()=>{const U="alephium";if(!i)return;const L=document.createElement("meta");return L.setAttribute("property","og:title"),L.setAttribute("content",U),document.head.prepend(L),()=>{document.head.removeChild(L)}},[i]),R.jsx(jTe,{open:i,pages:D,pageId:n,onClose:y,onInfo:void 0,onBack:A?N:void 0})},nMe=["injected","walletConnect","desktopWallet"],oMe=({theme:e="auto",mode:t="auto",customTheme:r,children:n})=>{if(k.useContext(a6))throw new Error("Multiple, nested usages of ConnectSettingContext detected. Please use only one.");const[i,a]=k.useState(e),[s,l]=k.useState(t),[c,u]=k.useState(r??{}),[f,d]=k.useState(!1),[p,h]=k.useState("injected"),[m,_]=k.useState(an.CONNECTORS),[w,g]=k.useState("");k.useEffect(()=>a(e),[e]),k.useEffect(()=>l(t),[t]),k.useEffect(()=>u(r??{}),[r]);const E={open:f,setOpen:d,route:m,setRoute:_,connectorId:p,setConnectorId:h,theme:i,setTheme:a,mode:s,setMode:l,customTheme:c,setCustomTheme:u,errorMessage:w};return R.jsx(a6.Provider,{value:E,children:R.jsxs(P6e,{theme:nTe,children:[n,R.jsx(rMe,{theme:i,mode:s,customTheme:c})]})})};function iMe(){try{return Ze.web3.getCurrentNodeProvider()}catch{return}}const aMe=({network:e,addressGroup:t,keyType:r,children:n})=>{if(k.useContext(s6))throw new Error("Multiple, nested usages of AlephiumConnectProvider detected. Please use only one.");const[i,a]=k.useState(e),[s,l]=k.useState(t),[c,u]=k.useState(r??"default");k.useEffect(()=>a(e),[e]),k.useEffect(()=>l(t),[t]),k.useEffect(()=>u(r??"default"),[r]);const f=k.useMemo(()=>{const N=BDe();if(N!==void 0&&N.network===i&&(s===void 0||N.account.group===s)&&(c===void 0||N.account.keyType===c))return N},[i,s,c]),[d,p]=k.useState(f!==void 0?"connecting":"disconnected"),[h,m]=k.useState(f==null?void 0:f.account),[_,w]=k.useState(),g=k.useCallback(N=>{w(N),p(N===void 0?"disconnected":"connected")},[w,p]),E=k.useCallback(N=>{m(D=>(D==null?void 0:D.address)===(N==null?void 0:N.address)?D:N)},[m]);k.useEffect(()=>{(async()=>{const D=()=>{yY(),E(void 0),g(void 0)},y=U=>{E(U.account),g(U.signerProvider)};try{const U=f==null?void 0:f.connectorId,L=Array.from(nMe),G=U===void 0?L:[U].concat(L.filter(V=>V!==U));for(const V of G){const S=wY(V);if(S.autoConnect!==void 0&&await S.autoConnect({network:e,addressGroup:t,keyType:r,onDisconnected:D,onConnected:y})!==void 0)return}}catch(U){console.error(U)}D()})()},[]);const A={network:i,setNetwork:a,addressGroup:s,setAddressGroup:l,keyType:c??"default",setKeyType:u,account:h,connectionStatus:d,setConnectionStatus:p,setAccount:E,signerProvider:_,setSignerProvider:g};return R.jsx(s6.Provider,{value:A,children:n})},sMe=({children:e})=>{if(k.useContext(rT))throw new Error("Multiple, nested usages of AlephiumBalanceProvider detected. Please use only one.");const{account:r,signerProvider:n,network:o}=ja(),[i,a]=k.useState(),s=k.useCallback(async()=>{var u;const f=(u=iMe())!==null&&u!==void 0?u:n==null?void 0:n.nodeProvider;if(f&&r){const d=await f.addresses.getAddressesAddressBalance(r.address);a(p=>p!==void 0&&Ze.isBalanceEqual(p,d)?p:d)}else r===void 0&&a(void 0)},[r,n]),l=k.useCallback((u,f)=>{if(r===void 0)throw new Error("Wallet is not connected");const d=f??1,_={pollingInterval:o==="devnet"?1e3:4e3,messageCallback:async w=>{w.type==="Confirmed"&&w.chainConfirmations>=d&&await s()},errorCallback:(w,g)=>(g.unsubscribe(),console.error(`tx status subscription error: ${w}`),Promise.resolve())};Ze.subscribeToTxStatus(_,u,void 0,void 0,d)},[s,r,o]);k.useEffect(()=>{r===void 0&&a(void 0)},[r]);const c={balance:i,updateBalance:s,updateBalanceForTx:l};return R.jsx(rT.Provider,{value:c,children:e})},lMe=({theme:e,customTheme:t,network:r,addressGroup:n,keyType:o,children:i})=>R.jsx(aMe,{network:r,addressGroup:n,keyType:o,children:R.jsx(oMe,{theme:e==="simple-light"||e==="simple-dark"?"auto":e,mode:e==="simple-light"?"light":e==="simple-dark"?"dark":"auto",customTheme:t,children:R.jsx(sMe,{children:i})})}),E5=st(ut.div)` - top: 0; - bottom: 0; - left: 0; - display: inline-flex; - align-items: center; - justify-content: center; - white-space: nowrap; -`,m6=st(ut.div)` - display: flex; - align-items: center; - justify-content: flex-start; - position: relative; - height: 40px; - padding: 0; - line-height: 0; - letter-spacing: -0.2px; - font-size: var(--ck-connectbutton-font-size, 16px); - font-weight: var(--ck-connectbutton-font-weight, 500); - text-align: center; - transition: 100ms ease; - transition-property: color, background, box-shadow, border-radius; - - color: var(--color); - background: var(--background); - box-shadow: var(--box-shadow); - border-radius: var(--border-radius); - - &.primary { - --color: var(--ck-connectbutton-color); - --background: var(--ck-connectbutton-background); - --box-shadow: var(--ck-connectbutton-box-shadow); - --border-radius: var(--ck-connectbutton-border-radius, 12px); - - --hover-color: var(--ck-connectbutton-hover-color, var(--color)); - --hover-background: var(--ck-connectbutton-hover-background, var(--background)); - --hover-box-shadow: var(--ck-connectbutton-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-connectbutton-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-connectbutton-active-color, var(--hover-color)); - --active-background: var(--ck-connectbutton-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-connectbutton-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-connectbutton-active-border-radius, var(--hover-border-radius)); - } - &.secondary { - --color: var(--ck-connectbutton-balance-color); - --background: var(--ck-connectbutton-balance-background); - --box-shadow: var(--ck-connectbutton-balance-box-shadow); - --border-radius: var(--ck-connectbutton-balance-border-radius, var(--ck-connectbutton-border-radius, 12px)); - - --hover-color: var(--ck-connectbutton-balance-hover-color, var(--color)); - --hover-background: var(--ck-connectbutton-balance-hover-background, var(--background)); - --hover-box-shadow: var(--ck-connectbutton-balance-hover-box-shadow, var(--box-shadow)); - --hover-border-radius: var(--ck-connectbutton-balance-hover-border-radius, var(--border-radius)); - - --active-color: var(--ck-connectbutton-balance-active-color, var(--hover-color)); - --active-background: var(--ck-connectbutton-balance-active-background, var(--hover-background)); - --active-box-shadow: var(--ck-connectbutton-balance-active-box-shadow, var(--hover-box-shadow)); - --active-border-radius: var(--ck-connectbutton-balance-active-border-radius, var(--hover-border-radius)); - } -`,cMe=st.button` - all: initial; - appearance: none; - user-select: none; - position: relative; - padding: 0; - margin: 0; - background: none; - border-radius: var(--ck-border-radius); - - &:disabled { - pointer-events: none; - opacity: 0.3; - } - - display: flex; - flex-wrap: nowrap; - background: none; - cursor: pointer; - * { - cursor: pointer; - } - &:hover { - ${m6} { - color: var(--hover-color, var(--color)); - background: var(--hover-background, var(--background)); - box-shadow: var(--hover-box-shadow, var(--box-shadow)); - border-radius: var(--hover-border-radius, var(--border-radius)); - } - } - &:active { - ${m6} { - color: var(--active-color, var(--hover-color, var(--color))); - background: var(--active-background, var(--hover-background, var(--background))); - box-shadow: var(--active-box-shadow, var(--hover-box-shadow, var(--box-shadow))); - border-radius: var(--active-border-radius, var(--hover-border-radius, var(--border-radius))); - } - } - &:focus-visible, - &:focus { - outline: none; - } -`,uMe=({children:e,variant:t="primary",autoSize:r=!0,duration:n=.3,style:o})=>{const[i,a]=XH();return R.jsx(m6,{className:t,initial:!1,animate:r?{width:a.width>10?a.width:"auto"}:void 0,transition:{duration:n,ease:[.25,1,.5,1],delay:.01},style:o,children:R.jsx("div",{ref:i,style:{whiteSpace:"nowrap",width:"fit-content",position:"relative",padding:"0 12px"},children:e})})},fMe={initial:{zIndex:2,opacity:0,x:"-100%"},animate:{opacity:1,x:.1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,opacity:0,x:"-100%",pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},dMe={initial:{zIndex:2,opacity:0,x:"100%"},animate:{x:.2,opacity:1,transition:{duration:.4,ease:[.25,1,.5,1]}},exit:{zIndex:1,x:"100%",opacity:0,pointerEvents:"none",position:"absolute",transition:{duration:.4,ease:[.25,1,.5,1]}}},pMe={initial:{opacity:0},animate:{opacity:1,transition:{duration:.3,ease:[.25,1,.5,1]}},exit:{position:"absolute",opacity:0,transition:{duration:.3,ease:[.25,1,.5,1]}}},hMe=e=>e.address,xY=({displayAccount:e,children:t})=>{const r=Ui(),{account:n}=ja(),{disconnect:o}=Ef();function i(){r.setOpen(!1)}function a(){r.setOpen(!0),r.setRoute(n?an.PROFILE:an.CONNECTORS)}if(!t)return null;const s=n?(e??hMe)(n):void 0;return R.jsx(R.Fragment,{children:t({show:a,hide:i,isConnected:!!n,isConnecting:r.open,disconnect:o,account:n,truncatedAddress:s?pE(s):void 0})})};xY.displayName="AlephiumConnectButton.Custom";function vMe({label:e,displayAccount:t}){const{account:r}=ja();return R.jsx(Yo,{initial:!1,children:r?R.jsx(E5,{initial:"initial",animate:"animate",exit:"exit",variants:dMe,style:{height:40},children:R.jsx("div",{style:{position:"relative",paddingRight:0},children:R.jsx(Yo,{initial:!1,children:R.jsx(E5,{initial:"initial",animate:"animate",exit:"exit",variants:pMe,style:{position:"relative"},children:pE(t(r))},"ckTruncatedAddress")})})},"connectedText"):R.jsx(E5,{initial:"initial",animate:"animate",exit:"exit",variants:fMe,style:{height:40},children:e||"Connect Alephium"},"connectWalletText")})}function _Y({label:e,onClick:t,displayAccount:r}){const n=Ui(),{account:o}=ja(),i=!!o;function a(){n.setOpen(!0),n.setRoute(i?an.PROFILE:an.CONNECTORS)}return R.jsx(vE,{$useTheme:n.theme,$useMode:n.mode,$customTheme:n.customTheme,children:R.jsx(cMe,{onClick:()=>{t?t(a):a()},children:R.jsx(uMe,{theme:n.theme,mode:n.mode,customTheme:n.customTheme,style:{overflow:"hidden"},children:R.jsx(vMe,{label:e,displayAccount:r??(s=>s.address)})})})})}_Y.Custom=xY;function t2(){const{account:e,signerProvider:t,connectionStatus:r,network:n}=ja();return k.useMemo(()=>r==="connected"?{connectionStatus:r,signer:t,account:{...e,network:n},nodeProvider:t==null?void 0:t.nodeProvider,explorerProvider:t==null?void 0:t.explorerProvider}:r==="disconnected"?{connectionStatus:r,signer:void 0,account:void 0,nodeProvider:void 0,explorerProvider:void 0}:{connectionStatus:r,signer:void 0,account:e===void 0?void 0:{...e,network:n},nodeProvider:void 0,explorerProvider:void 0},[t,e,n,r])}function EY(){const{network:e,setNetwork:t,addressGroup:r,setAddressGroup:n,keyType:o,setKeyType:i}=ja();return k.useMemo(()=>({network:e,setNetwork:t,addressGroup:r,setAddressGroup:n,keyType:o,setKeyType:i}),[e,t,r,n,o,i])}var Yu={};const gMe=0,mMe=[{id:"66da610efb5129c062e88e5fd65fe810f31efd1597021b2edf887a4360fa0800",name:"Alf",symbol:"ALF",decimals:9,description:"Alf, first token deployed on the mainnet",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/ALF.png"},{id:"b2d71c116408ae47b931482a440f675dc9ea64453db24ee931dacd578cae9002",name:"ALPHpaca",symbol:"PACA",decimals:0,description:"Part Alpaca, part ecosystem, part coin and part meme. ALPHpaca is rapidly trying to expand it's uses across the Alephium ecosystem.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/PACA.png"},{id:"b522184377a33e376e997a950288fa76c1f48e97bc29cd10779adc7cfb673200",name:"Berry",symbol:"BERRY",decimals:0,description:"Mr Berry's coin",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/BERRY.png"},{id:"1516c410b54470d667e1315ce2faa81870c76c5c7a491e3e86eeec8366495502",name:"Montycoin",symbol:"TAIL",decimals:0,description:"Montycoin is an incentivization token made for fun and immersion into MontaiL's DJ'ing career. With widely growing uses.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TAIL.png"},{id:"1a281053ba8601a658368594da034c2e99a0fb951b86498d05e76aedfe666800",name:"AYIN",symbol:"AYIN",decimals:18,description:"$AYIN is a DEX token, that incentivises users through fees and other mechanisms to participate in trading on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/AYIN.png"},{id:"5bf2f559ae714dab83ff36bed4d9e634dfda3ca9ed755d60f00be89e2a20bd00",name:"Staked Ayin",symbol:"XAYIN",decimals:18,description:"xAyin is single-staked Ayin accumulating trading fees and additional Ayins from the DEX",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/XAYIN.png"},{id:"7da28936499f56ffed497fe7eba856aa85eeb943bab2478e36f7020d89cd2400",name:"Vlad",symbol:"VLAD",decimals:9,description:"Enough $VLAD entitles you to some VLAD time, at VLAD's discretion, to talk about VLAD, with VLAD in a VLAD setup of his choosing. This is the way of the VLAD. $VLAD is a valueless memexperimentcoin. NFA applies.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/VLAD.png"},{id:"2bc4b844502d6c27b57dfe064f95353647a606b3d92150786ecacb56c885c800",name:"Jekyll",symbol:"JKL",decimals:18,description:"Jekyll comes to life as the sun rises...",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/JKL.png"},{id:"19246e8c2899bc258a1156e08466e3cdd3323da756d8a543c7fc911847b96f00",name:"Wrapped Ether (AlphBridge)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WETH.png"},{id:"383bc735a4de6722af80546ec9eeb3cff508f2f68e97da19489ce69f3e703200",name:"Wrapped BTC (AlphBridge)",symbol:"WBTC",decimals:8,description:"wBTC Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WBTC.png"},{id:"556d9582463fe44fbd108aedc9f409f69086dc78d994b88ea6c9e65f8bf98e00",name:"Tether USD (AlphBridge)",symbol:"USDT",decimals:6,description:"USDT Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/USDT.png"},{id:"722954d9067c5a5ad532746a024f2a9d7a18ed9b90e27d0a3a504962160b5600",name:"USD Coin (AlphBridge)",symbol:"USDC",decimals:6,description:"USDC Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/USDC.png"},{id:"3d0a1895108782acfa875c2829b0bf76cb586d95ffa4ea9855982667cc73b700",name:"Dai Stablecoin (AlphBridge)",symbol:"DAI",decimals:18,description:"DAI Bridged to Alephium from Alephium Bridge",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/DAI.png"},{id:"df3008f43a7cc1d4a37eef71bf581fc4b9c3be4e2d58ed6d1df483bbb83bd200",name:"NUMBER GO UP",symbol:"NGU",decimals:7,description:"Number Go Up",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/NGU.png"},{id:"11379064c747f89753d493b562130a63caf1a1fc448fcb161e507d2e542c0b00",name:"VIRAL",symbol:"VIRL",decimals:4,description:"The most contagious token on the Alephium Blockchain.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/VIRL.png"},{id:"130f008dcc71ad5138bdae00d918acef3b78ddbe95e627215a36a47b6b151100",name:"BUBBLE",symbol:"BUBBLE",decimals:9,description:"Governance token for the AlphDolphins NFT Collections",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/BUBBLE.png"},{id:"7dd0c01b2c835ed659c85c1ae64c7c10b916c06f13cf5b91f1369a5a3feda000",name:"CYXE",symbol:"CYXE",decimals:4,description:"Your Memory. Your Eyes. Your Life.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/CYXE.png"},{id:"c1aeea313e36454f35beaf40130c9219faa40ba645aff93e16429146039f8202",name:"Wang",symbol:"WANG",decimals:5,description:"The first mystical coin, endowing its holders with the spirit of Alephium.",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WANG.png"},{id:"4e0eb20afb173cd534ae29acd013861115482c1e3d8ed626294bbe1008a3f900",name:"KleoMixer",symbol:"MIX",decimals:8,description:"$MIX is the native token of the KleoMixer platform",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/MIX.png"},{id:"93cc555d3dfc0a81aa6f3127c0108e529a32c87c595c1b89f1855e698c2bc700",name:"SUCC",symbol:"SUCC",decimals:10,description:"Tribute to Sir Moist. 1 alph = 1 SUCC",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/SUCC.png"},{id:"3f0139e1b0aa2cf0a9400ccdb73d00750bcfc8c7be0e858052d794491c8a5900",name:"Shin Inu",symbol:"SHIN",decimals:5,description:"Fun collectible coin and first dog token on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/SHIN.png"},{id:"06bc1a82909c566eb6b00a3dc2dfca0d0564f43f3e8357114a0a59b182792a00",name:"LOVE",symbol:"LOVE",decimals:7,description:"NGU LOVE. NUMBER GO UP",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/LOVE.png"}],yMe={networkId:gMe,tokens:mMe},bMe=1,wMe=[{id:"bed35ce97166170f91a8cdb35948b8696aa67dbd573ee0c5cc572bb8c44ddb01",name:"Test BTC",symbol:"TBTC",decimals:8,description:"Testing BTC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TBTC.png"},{id:"4d765e05a5f08c39ab441c10fea45310cbd7b8c7bc7b4cd4e93d4531fdf2b601",name:"Test ETH",symbol:"TETH",decimals:18,description:"Testing ETH on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TETH.png"},{id:"9a8cda8bc3423347b7fe2932ef7981ed67e8825dba3a5ee36011f578d1d70f00",name:"Wrapped Ether (Wormhole)",symbol:"WETH",decimals:18,description:"ETH Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WETH.png"},{id:"4db93c3e58ca4c3392b9d47be17b62fcbabccba61a7d7c1fa1c3baa40181f700",name:"Wrapped BNB (Wormhole)",symbol:"WBNB",decimals:18,description:"BNB Bridged to Alephium from Wormhole",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/WBNB.png"},{id:"92982a9d35b38ff1d0b43dec536631b523cdccde0cf2fc1d5c349790c59d2701",name:"Test DAI",symbol:"TDAI",decimals:18,description:"Testing DAI on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TDAI.png"},{id:"416800f4e2a7326ef2c129d38e4db35de11cec2d4aff98972558ca2c6f976e01",name:"Test USDT",symbol:"TUSDT",decimals:6,description:"Testing USDT on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TUSDT.png"},{id:"ecc6dd103bbb3cfad3ada8d6a22d73a599a9d39a43b81a734bc9784acc261b01",name:"Test USDC",symbol:"TUSDC",decimals:6,description:"Testing USDC on Alephium",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/TUSDC.png"},{id:"f393e2366ee780141240e840aa32f26eade79559864d103b453f0d595425af00",name:"Fetatoken",symbol:"FETA",decimals:18,description:"DJ Fetamin fanclub token",logoURI:"https://raw.githubusercontent.com/alephium/token-list/master/logos/FETA.png"}],xMe={networkId:bMe,tokens:wMe};var SY={};Object.defineProperty(SY,"__esModule",{value:!0});(function(e){var t=Le&&Le.__createBinding||(Object.create?function(a,s,l,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(a,c,u)}:function(a,s,l,c){c===void 0&&(c=l),a[c]=s[l]}),r=Le&&Le.__exportStar||function(a,s){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&t(s,a,l)},n=Le&&Le.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.ALPH=e.testnetTokensMetadata=e.mainnetTokensMetadata=void 0;const o=n(yMe),i=n(xMe);r(SY,e),e.mainnetTokensMetadata=o.default,e.testnetTokensMetadata=i.default,e.default={mainnet:{tokens:e.mainnetTokensMetadata},testnet:{tokens:e.testnetTokensMetadata}},e.ALPH={id:"".padStart(64,"0"),name:"Alephium",symbol:"ALPH",decimals:18}})(Yu);const _Me="https://wallet-v20.mainnet.alephium.org",EMe="https://wallet-v20.testnet.alephium.org",SMe="http://127.0.0.1:22973",CMe="https://backend-v113.mainnet.alephium.org",PMe="https://backend-v113.testnet.alephium.org",OMe="http://127.0.0.1:9090",kMe="https://explorer.alephium.org",AMe="https://testnet.alephium.org",IMe="http://localhost:23000",CY="alephium-network";function $Me(){const e=localStorage.getItem(CY);return e==="mainnet"||e==="testnet"||e==="devnet"?e:"mainnet"}function TMe(e){localStorage.setItem(CY,e)}function hc(){const{network:e,setNetwork:t}=EY();return k.useEffect(()=>{TMe(e)},[e]),[e,t]}function r2(){const[e]=hc(),t=k.useMemo(()=>new Ze.NodeProvider(e==="mainnet"?_Me:e==="testnet"?EMe:SMe),[e]);return k.useEffect(()=>{Ze.web3.setCurrentNodeProvider(t)},[t]),t}function DMe(){const[e]=hc(),t=k.useMemo(()=>new Ze.ExplorerProvider(e==="mainnet"?CMe:e==="testnet"?PMe:OMe),[e]);return k.useEffect(()=>{Ze.web3.setCurrentExplorerProvider(t)},[Ze.ExplorerProvider]),t}function PY(){const[e]=hc();return e==="mainnet"?kMe:e==="testnet"?AMe:IMe}function MMe(){const[e]=hc();return e==="mainnet"?Yu.mainnetTokensMetadata.tokens:e==="testnet"?Yu.testnetTokensMetadata.tokens:[]}function RMe(e){return e==="mainnet"?Yu.mainnetTokensMetadata:Yu.testnetTokensMetadata}const NMe="/alephium-toolkit/assets/alephium-light-28918105.png",FMe="/alephium-toolkit/assets/alephium-dark-50aa73c9.png",BMe=it(e=>({link:{display:"flex",alignItems:"center",height:"100%",paddingLeft:e.spacing.md,paddingRight:e.spacing.md,textDecoration:"none",color:e.colorScheme==="dark"?e.white:e.black,fontWeight:500,fontSize:e.fontSizes.sm,[e.fn.smallerThan("sm")]:{height:me(42),display:"flex",alignItems:"center",width:"100%"},...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})},subLink:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,borderRadius:e.radius.md,...e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}),"&:active":e.activeStyles},dropdownFooter:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0],margin:`calc(${e.spacing.md} * -1)`,marginTop:e.spacing.sm,padding:`${e.spacing.md} calc(${e.spacing.md} * 2)`,paddingBottom:e.spacing.xl,borderTop:`${me(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}`},hiddenMobile:{[e.fn.smallerThan("sm")]:{display:"none"}},hiddenDesktop:{[e.fn.largerThan("sm")]:{display:"none"}}}));function jMe(){const[e,{toggle:t}]=DN(!1),{classes:r}=BMe(),n=Ir(),[o,i]=hc();return R.jsx(IF,{height:60,px:"md",children:R.jsxs(jt,{position:"apart",sx:{height:"100%"},children:[R.jsx(uL,{src:n.colorScheme==="dark"?FMe:NMe,height:55,width:"auto",ml:"sm"}),R.jsxs(jt,{className:r.hiddenMobile,children:[R.jsx(Zbe,{}),R.jsxs(go,{children:[R.jsx(go.Target,{children:R.jsx(sr,{size:"md",w:"5.25rem",tt:"capitalize",radius:"md",compact:!0,variant:"outline",children:o})}),R.jsxs(go.Dropdown,{children:[R.jsx(go.Item,{onClick:()=>i("mainnet"),children:"Mainnet"}),R.jsx(go.Item,{onClick:()=>i("testnet"),children:"Testnet"}),R.jsx(go.Item,{onClick:()=>i("devnet"),children:"Devnet"})]})]}),R.jsx(_Y,{})]}),R.jsx(aj,{opened:e,onClick:t,className:r.hiddenDesktop})]})})}function wu({children:e,...t}){return R.jsx(Je,{mx:"auto",px:"lg",py:"lg",sx:r=>({backgroundColor:r.colorScheme==="dark"?r.colors.dark[7]:"white",borderRadius:r.radius.md,boxShadow:r.shadows.sm}),...t,children:e})}function LMe({caption:e}){const t=Ir();return R.jsx(_t,{fw:"bold",c:t.colorScheme==="dark"?t.colors.gray[0]:t.colors.dark[8],children:e})}function n2({w:e,px:t,py:r,data:n,horizontalSpacing:o,verticalSpacing:i}){const a=Object.entries(n).map(([s,l])=>R.jsxs("tr",{children:[R.jsx("td",{width:"30%",children:R.jsx(LMe,{caption:s})}),R.jsx("td",{width:"70%",children:l})]},s));return R.jsx(wu,{w:e,mx:"auto",px:t??"lg",py:r??"lg",ta:"center",children:R.jsx(LU,{horizontalSpacing:o??"xs",verticalSpacing:i??"xl",fontSize:"md",withColumnBorders:!0,children:R.jsx("tbody",{children:a})})})}const UMe=it(e=>({root:{paddingTop:me(80),paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(150),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function zMe(){const{classes:e}=UMe();return R.jsx(Je,{maw:me("70%"),mx:"auto",mt:me("15%"),children:R.jsx("div",{className:e.root,children:R.jsxs(d4,{children:[R.jsx("div",{className:e.label,children:"No Wallet"}),R.jsx(Zy,{className:e.title,children:"Please connect your wallet"})]})})})}function Ds({value:e,color:t,variant:r}){return R.jsx(Yy,{value:e,timeout:1e3,children:({copied:n,copy:o})=>R.jsx(b0.Floating,{label:n?"Copied":"Copy",position:"right",children:R.jsx(sr,{variant:r||"subtle",color:t,onClick:o,styles:{root:{height:"auto",padding:"0.5rem"},label:{whiteSpace:"normal",wordBreak:"break-all",lineHeight:"1.5rem"}},children:e})})})}function HMe(){const{account:e,connectionStatus:t}=t2(),{network:r,addressGroup:n,keyType:o}=EY();return console.log("WalletInfo:",t,r,n,o,e),t==="connecting"&&!e?null:t==="disconnected"?R.jsx(zMe,{}):R.jsx(m0,{mt:"10%",children:R.jsx(n2,{w:900,data:{"Network Type":R.jsx(_t,{tt:"capitalize",children:e==null?void 0:e.network}),"Address Group":e==null?void 0:e.group,Address:R.jsx(Ds,{value:(e==null?void 0:e.address)??"???"}),"Public Key":R.jsx(Ds,{value:(e==null?void 0:e.publicKey)??"???"})}})})}const VMe=it(e=>({root:{paddingTop:"5rem",paddingBottom:me(120),backgroundColor:e.fn.variant({variant:"filled",color:e.primaryColor}).background},label:{textAlign:"center",fontWeight:900,fontSize:me(220),lineHeight:1,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][3],[e.fn.smallerThan("sm")]:{fontSize:me(120)}},title:{fontFamily:`Greycliff CF, ${e.fontFamily}`,textAlign:"center",fontWeight:900,fontSize:me(38),color:e.white,[e.fn.smallerThan("sm")]:{fontSize:me(32)}},description:{maxWidth:me(540),margin:"auto",marginTop:e.spacing.xl,marginBottom:`calc(${e.spacing.xl} * 1.5)`,color:e.colors[e.primaryColor][1]}}));function fi(){const{classes:e}=VMe();return R.jsx(Je,{maw:me("70%"),mx:"auto",mt:me("15%"),children:R.jsx("div",{className:e.root,children:R.jsxs(d4,{children:[R.jsx("div",{className:e.label,children:"WIP"}),R.jsx(Zy,{className:e.title,children:"We are working on it..."})]})})})}function vT({value:e,label:t}){return R.jsx(Yy,{value:e,timeout:1e3,children:({copied:r,copy:n})=>R.jsx(b0,{label:r?"Copied":"Copy",withArrow:!0,position:"right",color:"indigo",children:R.jsx(sr,{variant:"subtle",onClick:n,children:t??e})})})}function WMe(){const[e,t]=k.useState(""),[r,n]=k.useState(),o=r2(),[i]=hc(),a=k.useCallback(async s=>{if(t(s),s){const l=await o.fetchFungibleTokenMetaData(s),c=i=="devnet"?!1:RMe(i).tokens.find(f=>f.id===s)!==void 0,u=Ze.addressFromTokenId(s);n({...l,verified:c,tokenId:s,tokenAddress:u})}else n(void 0)},[]);return R.jsx(m0,{h:me("80%"),children:R.jsxs(w0,{children:[R.jsx(Oi,{w:me("40rem"),mx:"auto",size:"md",value:e,onChange:s=>a(s.currentTarget.value),placeholder:"Search token address or token id",radius:"xl",withAsterisk:!0}),R.jsx(Je,{mt:"xl",w:me("55rem"),children:R.jsx(n2,{data:{Verified:`${r==null?void 0:r.verified}`,Name:`${r?Ze.hexToString(r.name):void 0}`,Symbol:`${r?Ze.hexToString(r.symbol):void 0}`,Decimals:`${r==null?void 0:r.decimals}`,"Total Supply":`${r?Ze.prettifyTokenAmount(r.totalSupply,r.decimals):void 0}`,"Token ID":r?R.jsx(vT,{value:`${r.tokenId}`}):"undefined","Token Address":r?R.jsx(vT,{value:`${r.tokenAddress}`}):"undefined"}})})]})})}var qMe=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const gT=ri(qMe);function y6(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{const n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}var GMe=Object.defineProperty,mT=Object.getOwnPropertySymbols,KMe=Object.prototype.hasOwnProperty,YMe=Object.prototype.propertyIsEnumerable,yT=(e,t,r)=>t in e?GMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XMe=(e,t)=>{for(var r in t||(t={}))KMe.call(t,r)&&yT(e,r,t[r]);if(mT)for(var r of mT(t))YMe.call(t,r)&&yT(e,r,t[r]);return e};function OY(e,t){if(t===null||typeof t!="object")return{};const r=XMe({},t);return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}const ou="__MANTINE_FORM_INDEX__";function bT(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${ou}`)):!1:!1}function wT(e,t,r){typeof r.value=="object"&&(r.value=iu(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function iu(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(iu(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(iu(s),iu(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(iu(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t0,errors:t}}function b6(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{const a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=ca(s,t);let c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,f)=>b6(a,t,`${s}.${f}`,o))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||b6(a,t,s,o)),o},n)}function w6(e,t){return xT(typeof e=="function"?e(t):b6(e,t))}function f1(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};const n=w6(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}function ZMe(e,{from:t,to:r},n){const o=ca(e,n);if(!Array.isArray(o))return n;const i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),o2(e,i,n)}var JMe=Object.defineProperty,_T=Object.getOwnPropertySymbols,QMe=Object.prototype.hasOwnProperty,eRe=Object.prototype.propertyIsEnumerable,ET=(e,t,r)=>t in e?JMe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tRe=(e,t)=>{for(var r in t||(t={}))QMe.call(t,r)&&ET(e,r,t[r]);if(_T)for(var r of _T(t))eRe.call(t,r)&&ET(e,r,t[r]);return e};function rRe(e,{from:t,to:r},n){const o=`${e}.${t}`,i=`${e}.${r}`,a=tRe({},n);return Object.keys(n).every(s=>{let l,c;if(s.startsWith(o)&&(l=s,c=s.replace(o,i)),s.startsWith(i)&&(l=s.replace(i,o),c=s),l&&c){const u=a[l],f=a[c];return f===void 0?delete a[l]:a[l]=f,u===void 0?delete a[c]:a[c]=u,!1}return!0}),a}function nRe(e,t,r){const n=ca(e,r);return Array.isArray(n)?o2(e,n.filter((o,i)=>i!==t),r):r}var oRe=Object.defineProperty,ST=Object.getOwnPropertySymbols,iRe=Object.prototype.hasOwnProperty,aRe=Object.prototype.propertyIsEnumerable,CT=(e,t,r)=>t in e?oRe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sRe=(e,t)=>{for(var r in t||(t={}))iRe.call(t,r)&&CT(e,r,t[r]);if(ST)for(var r of ST(t))aRe.call(t,r)&&CT(e,r,t[r]);return e};function PT(e,t){const r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function OT(e,t,r,n){if(t===void 0)return r;const o=`${String(e)}`;let i=r;n===-1&&(i=OY(`${o}.${t}`,i));const a=sRe({},i),s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;const c=PT(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{const u=PT(l,o),f=l.replace(`${o}.${u}`,`${o}.${u+n}`);a[f]=c,s.add(f),s.has(l)||delete a[l]}),a}function lRe(e,t,r,n){const o=ca(e,n);if(!Array.isArray(o))return n;const i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),o2(e,i,n)}function kT(e,t){const r=Object.keys(e);if(typeof t=="string"){const n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function cRe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var uRe=Object.defineProperty,fRe=Object.defineProperties,dRe=Object.getOwnPropertyDescriptors,AT=Object.getOwnPropertySymbols,pRe=Object.prototype.hasOwnProperty,hRe=Object.prototype.propertyIsEnumerable,IT=(e,t,r)=>t in e?uRe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Za=(e,t)=>{for(var r in t||(t={}))pRe.call(t,r)&&IT(e,r,t[r]);if(AT)for(var r of AT(t))hRe.call(t,r)&&IT(e,r,t[r]);return e},S5=(e,t)=>fRe(e,dRe(t));function yE({initialValues:e={},initialErrors:t={},initialDirty:r={},initialTouched:n={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:a=!1,transformValues:s=c=>c,validate:l}={}){const[c,u]=k.useState(n),[f,d]=k.useState(r),[p,h]=k.useState(e),[m,_]=k.useState(y6(t)),w=k.useRef(e),g=te=>{w.current=te},E=k.useCallback(()=>u({}),[]),A=te=>{const ae=te?Za(Za({},p),te):p;g(ae),d({})},N=k.useCallback(te=>_(ae=>y6(typeof te=="function"?te(ae):te)),[]),D=k.useCallback(()=>_({}),[]),y=k.useCallback(()=>{h(e),D(),g(e),d({}),E()},[]),U=k.useCallback((te,ae)=>N(ce=>S5(Za({},ce),{[te]:ae})),[]),L=k.useCallback(te=>N(ae=>{if(typeof te!="string")return ae;const ce=Za({},ae);return delete ce[te],ce}),[]),G=k.useCallback(te=>d(ae=>{if(typeof te!="string")return ae;const ce=OY(te,ae);return delete ce[te],ce}),[]),V=k.useCallback((te,ae)=>{const ce=bT(te,i);G(te),u(ie=>S5(Za({},ie),{[te]:!0})),h(ie=>{const ue=o2(te,ae,ie);if(ce){const O=f1(te,l,ue);O.hasError?U(te,O.error):L(te)}return ue}),!ce&&o&&U(te,null)},[]),S=k.useCallback(te=>{h(ae=>{const ce=typeof te=="function"?te(ae):te;return Za(Za({},ae),ce)}),o&&D()},[]),C=k.useCallback((te,ae)=>{G(te),h(ce=>ZMe(te,ae,ce)),_(ce=>rRe(te,ae,ce))},[]),v=k.useCallback((te,ae)=>{G(te),h(ce=>nRe(te,ae,ce)),_(ce=>OT(te,ae,ce,-1))},[]),b=k.useCallback((te,ae,ce)=>{G(te),h(ie=>lRe(te,ae,ce,ie)),_(ie=>OT(te,ce,ie,1))},[]),B=k.useCallback(()=>{const te=w6(l,p);return _(te.errors),te},[p,l]),T=k.useCallback(te=>{const ae=f1(te,l,p);return ae.hasError?U(te,ae.error):L(te),ae},[p,l]),j=(te,{type:ae="input",withError:ce=!0,withFocus:ie=!0}={})=>{const O={onChange:cRe(K=>V(te,K))};return ce&&(O.error=m[te]),ae==="checkbox"?O.checked=ca(te,p):O.value=ca(te,p),ie&&(O.onFocus=()=>u(K=>S5(Za({},K),{[te]:!0})),O.onBlur=()=>{if(bT(te,a)){const K=f1(te,l,p);K.hasError?U(te,K.error):L(te)}}),O},H=(te,ae)=>ce=>{ce==null||ce.preventDefault();const ie=B();ie.hasErrors?ae==null||ae(ie.errors,p,ce):te==null||te(s(p),ce)},P=te=>s(te||p),F=k.useCallback(te=>{te.preventDefault(),y()},[]),$=te=>{if(te){const ce=ca(te,f);if(typeof ce=="boolean")return ce;const ie=ca(te,p),ue=ca(te,w.current);return!gT(ie,ue)}return Object.keys(f).length>0?kT(f):!gT(p,w.current)},q=k.useCallback(te=>kT(c,te),[c]),J=k.useCallback(te=>te?!f1(te,l,p).hasError:!w6(l,p).hasErrors,[p,l]);return{values:p,errors:m,setValues:S,setErrors:N,setFieldValue:V,setFieldError:U,clearFieldError:L,clearErrors:D,reset:y,validate:B,validateField:T,reorderListItem:C,removeListItem:v,insertListItem:b,getInputProps:j,onSubmit:H,onReset:F,isDirty:$,isTouched:q,setTouched:u,setDirty:d,resetTouched:E,resetDirty:A,isValid:J,getTransformedValues:P}}function $T(e,t){if(typeof e=="number")return t.length===e;const{max:r,min:n}=e;let o=!0;return typeof r=="number"&&t.length>r&&(o=!1),typeof n=="number"&&t.lengthtypeof n=="string"?$T(e,n.trim())?null:r:typeof n=="object"&&n!==null&&"length"in n&&$T(e,n)?null:r}function TT({min:e,max:t},r){const n=r||!0;return o=>{if(typeof o!="number")return n;let i=!0;return typeof e=="number"&&ot&&(i=!1),i?null:n}}function x6(e,t){return x6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},x6(e,t)}function AY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,x6(e,t)}function yt(){return yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Sn(1));return r(IY)(e,t)}if(typeof e!="function")throw new Error(Sn(2));var o=e,i=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(Sn(3));return i}function f(m){if(typeof m!="function")throw new Error(Sn(4));if(l)throw new Error(Sn(5));var _=!0;return c(),s.push(m),function(){if(_){if(l)throw new Error(Sn(6));_=!1,c();var g=s.indexOf(m);s.splice(g,1),a=null}}}function d(m){if(!bRe(m))throw new Error(Sn(7));if(typeof m.type>"u")throw new Error(Sn(8));if(l)throw new Error(Sn(9));try{l=!0,i=o(i,m)}finally{l=!1}for(var _=a=s,w=0;w<_.length;w++){var g=_[w];g()}return m}function p(m){if(typeof m!="function")throw new Error(Sn(10));o=m,d({type:NT.REPLACE})}function h(){var m,_=f;return m={subscribe:function(g){if(typeof g!="object"||g===null)throw new Error(Sn(11));function E(){g.next&&g.next(u())}E();var A=_(E);return{unsubscribe:A}}},m[RT]=function(){return this},m}return d({type:NT.INIT}),n={dispatch:d,subscribe:f,getState:u,replaceReducer:p},n[RT]=h,n}function FT(e,t){return function(){return t(e.apply(this,arguments))}}function BT(e,t){if(typeof e=="function")return FT(e,t);if(typeof e!="object"||e===null)throw new Error(Sn(16));var r={};for(var n in e){var o=e[n];typeof o=="function"&&(r[n]=FT(o,t))}return r}function $Y(){for(var e=arguments.length,t=new Array(e),r=0;r=0)&&(r[o]=e[o]);return r}var NY={exports:{}},Bt={};/** @license React v17.0.2 - * react-is.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 i2=60103,a2=60106,z0=60107,H0=60108,V0=60114,W0=60109,q0=60110,G0=60112,K0=60113,bE=60120,Y0=60115,X0=60116,FY=60121,BY=60122,jY=60117,LY=60129,UY=60131;if(typeof Symbol=="function"&&Symbol.for){var Rr=Symbol.for;i2=Rr("react.element"),a2=Rr("react.portal"),z0=Rr("react.fragment"),H0=Rr("react.strict_mode"),V0=Rr("react.profiler"),W0=Rr("react.provider"),q0=Rr("react.context"),G0=Rr("react.forward_ref"),K0=Rr("react.suspense"),bE=Rr("react.suspense_list"),Y0=Rr("react.memo"),X0=Rr("react.lazy"),FY=Rr("react.block"),BY=Rr("react.server.block"),jY=Rr("react.fundamental"),LY=Rr("react.debug_trace_mode"),UY=Rr("react.legacy_hidden")}function oi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case i2:switch(e=e.type,e){case z0:case V0:case H0:case K0:case bE:return e;default:switch(e=e&&e.$$typeof,e){case q0:case G0:case X0:case Y0:case W0:return e;default:return t}}case a2:return t}}}var PRe=W0,ORe=i2,kRe=G0,ARe=z0,IRe=X0,$Re=Y0,TRe=a2,DRe=V0,MRe=H0,RRe=K0;Bt.ContextConsumer=q0;Bt.ContextProvider=PRe;Bt.Element=ORe;Bt.ForwardRef=kRe;Bt.Fragment=ARe;Bt.Lazy=IRe;Bt.Memo=$Re;Bt.Portal=TRe;Bt.Profiler=DRe;Bt.StrictMode=MRe;Bt.Suspense=RRe;Bt.isAsyncMode=function(){return!1};Bt.isConcurrentMode=function(){return!1};Bt.isContextConsumer=function(e){return oi(e)===q0};Bt.isContextProvider=function(e){return oi(e)===W0};Bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===i2};Bt.isForwardRef=function(e){return oi(e)===G0};Bt.isFragment=function(e){return oi(e)===z0};Bt.isLazy=function(e){return oi(e)===X0};Bt.isMemo=function(e){return oi(e)===Y0};Bt.isPortal=function(e){return oi(e)===a2};Bt.isProfiler=function(e){return oi(e)===V0};Bt.isStrictMode=function(e){return oi(e)===H0};Bt.isSuspense=function(e){return oi(e)===K0};Bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===z0||e===V0||e===LY||e===H0||e===K0||e===bE||e===UY||typeof e=="object"&&e!==null&&(e.$$typeof===X0||e.$$typeof===Y0||e.$$typeof===W0||e.$$typeof===q0||e.$$typeof===G0||e.$$typeof===jY||e.$$typeof===FY||e[0]===BY)};Bt.typeOf=oi;NY.exports=Bt;var NRe=NY.exports,FRe=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],BRe=["reactReduxForwardedRef"],jRe=[],LRe=[null,null];function URe(e,t){var r=e[1];return[t.payload,r+1]}function LT(e,t,r){RY(function(){return e.apply(void 0,t)},r)}function zRe(e,t,r,n,o,i,a){e.current=n,t.current=o,r.current=!1,i.current&&(i.current=null,a())}function HRe(e,t,r,n,o,i,a,s,l,c){if(e){var u=!1,f=null,d=function(){if(!u){var m=t.getState(),_,w;try{_=n(m,o.current)}catch(g){w=g,f=g}w||(f=null),_===i.current?a.current||l():(i.current=_,s.current=_,a.current=!0,c({type:"STORE_UPDATED",payload:{error:w}}))}};r.onStateChange=d,r.trySubscribe(),d();var p=function(){if(u=!0,r.tryUnsubscribe(),r.onStateChange=null,f)throw f};return p}}var VRe=function(){return[null,0]};function WRe(e,t){t===void 0&&(t={});var r=t,n=r.getDisplayName,o=n===void 0?function(E){return"ConnectAdvanced("+E+")"}:n,i=r.methodName,a=i===void 0?"connectAdvanced":i,s=r.renderCountProp,l=s===void 0?void 0:s,c=r.shouldHandleStateChanges,u=c===void 0?!0:c,f=r.storeKey,d=f===void 0?"store":f;r.withRef;var p=r.forwardRef,h=p===void 0?!1:p,m=r.context,_=m===void 0?TY:m,w=Qm(r,FRe),g=_;return function(A){var N=A.displayName||A.name||"Component",D=o(N),y=ys({},w,{getDisplayName:o,methodName:a,renderCountProp:l,shouldHandleStateChanges:u,storeKey:d,displayName:D,wrappedComponentName:N,WrappedComponent:A}),U=w.pure;function L(v){return e(v.dispatch,y)}var G=U?k.useMemo:function(v){return v()};function V(v){var b=k.useMemo(function(){var Z=v.reactReduxForwardedRef,Q=Qm(v,BRe);return[v.context,Z,Q]},[v]),B=b[0],T=b[1],j=b[2],H=k.useMemo(function(){return B&&B.Consumer&&NRe.isContextConsumer(ne.createElement(B.Consumer,null))?B:g},[B,g]),P=k.useContext(H),F=!!v.store&&!!v.store.getState&&!!v.store.dispatch;P&&P.store;var $=F?v.store:P.store,q=k.useMemo(function(){return L($)},[$]),J=k.useMemo(function(){if(!u)return LRe;var Z=MY($,F?null:P.subscription),Q=Z.notifyNestedSubs.bind(Z);return[Z,Q]},[$,F,P]),te=J[0],ae=J[1],ce=k.useMemo(function(){return F?P:ys({},P,{subscription:te})},[F,P,te]),ie=k.useReducer(URe,jRe,VRe),ue=ie[0],O=ue[0],K=ie[1];if(O&&O.error)throw O.error;var ee=k.useRef(),se=k.useRef(j),pe=k.useRef(),ge=k.useRef(!1),X=G(function(){return pe.current&&j===se.current?pe.current:q($.getState(),j)},[$,O,j]);LT(zRe,[se,ee,ge,j,X,pe,ae]),LT(HRe,[u,$,te,q,se,ee,ge,pe,ae,K],[$,te,q]);var M=k.useMemo(function(){return ne.createElement(A,ys({},X,{ref:T}))},[T,A,X]),z=k.useMemo(function(){return u?ne.createElement(H.Provider,{value:ce},M):M},[H,M,ce]);return z}var S=U?ne.memo(V):V;if(S.WrappedComponent=A,S.displayName=V.displayName=D,h){var C=ne.forwardRef(function(b,B){return ne.createElement(S,ys({},b,{reactReduxForwardedRef:B}))});return C.displayName=D,C.WrappedComponent=A,F3(C,A)}return F3(S,A)}}function UT(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function P5(e,t){if(UT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0;o=0;n--){var o=t[n](e);if(o)return o}return function(i,a){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+a.wrappedComponentName+".")}}function uNe(e,t){return e===t}function fNe(e){var t=e===void 0?{}:e,r=t.connectHOC,n=r===void 0?WRe:r,o=t.mapStateToPropsFactories,i=o===void 0?QRe:o,a=t.mapDispatchToPropsFactories,s=a===void 0?XRe:a,l=t.mergePropsFactories,c=l===void 0?oNe:l,u=t.selectorFactory,f=u===void 0?lNe:u;return function(p,h,m,_){_===void 0&&(_={});var w=_,g=w.pure,E=g===void 0?!0:g,A=w.areStatesEqual,N=A===void 0?uNe:A,D=w.areOwnPropsEqual,y=D===void 0?P5:D,U=w.areStatePropsEqual,L=U===void 0?P5:U,G=w.areMergedPropsEqual,V=G===void 0?P5:G,S=Qm(w,cNe),C=O5(p,i,"mapStateToProps"),v=O5(h,s,"mapDispatchToProps"),b=O5(m,c,"mergeProps");return n(f,ys({methodName:"connect",getDisplayName:function(T){return"Connect("+T+")"},shouldHandleStateChanges:!!p,initMapStateToProps:C,initMapDispatchToProps:v,initMergeProps:b,pure:E,areStatesEqual:N,areOwnPropsEqual:y,areStatePropsEqual:L,areMergedPropsEqual:V},S))}}const HY=fNe();_Re(Ys.unstable_batchedUpdates);function dNe(e,t){if(e.length!==t.length)return!1;for(var r=0;r");return n.callbacks},n.setCallbacks=function(s){n.callbacks=s},n}var r=t.prototype;return r.componentDidMount=function(){this.unbind=yo(window,[{eventName:"error",fn:this.onWindowError}])},r.componentDidCatch=function(o){if(o instanceof ry){this.setState({});return}throw o},r.componentWillUnmount=function(){this.unbind()},r.render=function(){return this.props.children(this.setCallbacks)},t}(ne.Component),SNe=` - Press space bar to start a drag. - When dragging you can use the arrow keys to move the item around and escape to cancel. - Some screen readers may require you to be in focus mode or to use your pass through key -`,ny=function(t){return t+1},CNe=function(t){return` - You have lifted an item in position `+ny(t.source.index)+` -`},KY=function(t,r){var n=t.droppableId===r.droppableId,o=ny(t.index),i=ny(r.index);return n?` - You have moved the item from position `+o+` - to position `+i+` - `:` - You have moved the item from position `+o+` - in list `+t.droppableId+` - to list `+r.droppableId+` - in position `+i+` - `},YY=function(t,r,n){var o=r.droppableId===n.droppableId;return o?` - The item `+t+` - has been combined with `+n.draggableId:` - The item `+t+` - in list `+r.droppableId+` - has been combined with `+n.draggableId+` - in list `+n.droppableId+` - `},PNe=function(t){var r=t.destination;if(r)return KY(t.source,r);var n=t.combine;return n?YY(t.draggableId,t.source,n):"You are over an area that cannot be dropped on"},WT=function(t){return` - The item has returned to its starting position - of `+ny(t.index)+` -`},ONe=function(t){if(t.reason==="CANCEL")return` - Movement cancelled. - `+WT(t.source)+` - `;var r=t.destination,n=t.combine;return r?` - You have dropped the item. - `+KY(t.source,r)+` - `:n?` - You have dropped the item. - `+YY(t.draggableId,t.source,n)+` - `:` - The item has been dropped while not over a drop area. - `+WT(t.source)+` - `},K1={dragHandleUsageInstructions:SNe,onDragStart:CNe,onDragUpdate:PNe,onDragEnd:ONe},kr={x:0,y:0},jr=function(t,r){return{x:t.x+r.x,y:t.y+r.y}},zn=function(t,r){return{x:t.x-r.x,y:t.y-r.y}},Rs=function(t,r){return t.x===r.x&&t.y===r.y},Sf=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Kl=function(t,r,n){var o;return n===void 0&&(n=0),o={},o[t]=r,o[t==="x"?"y":"x"]=n,o},Zp=function(t,r){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))},qT=function(t,r){return Math.min.apply(Math,r.map(function(n){return Zp(t,n)}))},XY=function(t){return function(r){return{x:t(r.x),y:t(r.y)}}},kNe=function(e,t){var r=Vo({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return r.width<=0||r.height<=0?null:r},Z0=function(t,r){return{top:t.top+r.y,left:t.left+r.x,bottom:t.bottom+r.y,right:t.right+r.x}},GT=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},ANe={top:0,right:0,bottom:0,left:0},INe=function(t,r){return r?Z0(t,r.scroll.diff.displacement):t},$Ne=function(t,r,n){if(n&&n.increasedBy){var o;return yt({},t,(o={},o[r.end]=t[r.end]+n.increasedBy[r.line],o))}return t},TNe=function(t,r){return r&&r.shouldClipSubject?kNe(r.pageMarginBox,t):Vo(t)},Xu=function(e){var t=e.page,r=e.withPlaceholder,n=e.axis,o=e.frame,i=INe(t.marginBox,o),a=$Ne(i,n,r),s=TNe(a,o);return{page:t,withPlaceholder:r,active:s}},EE=function(e,t){e.frame||Ge(!1);var r=e.frame,n=zn(t,r.scroll.initial),o=Sf(n),i=yt({},r,{scroll:{initial:r.scroll.initial,current:t,diff:{value:n,displacement:o},max:r.scroll.max}}),a=Xu({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:i}),s=yt({},e,{frame:i,subject:a});return s};function oy(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function SE(e,t){if(e.findIndex)return e.findIndex(t);for(var r=0;re.bottom,c=n.lefte.right,u=l&&c;if(u)return!0;var f=l&&a||c&&i;return f}},NNe=function(e){var t=wo(e.top,e.bottom),r=wo(e.left,e.right);return function(n){var o=t(n.top)&&t(n.bottom)&&r(n.left)&&r(n.right);return o}},PE={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},rX={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},FNe=function(e){return function(t){var r=wo(t.top,t.bottom),n=wo(t.left,t.right);return function(o){return e===PE?r(o.top)&&r(o.bottom):n(o.left)&&n(o.right)}}},BNe=function(t,r){var n=r.frame?r.frame.scroll.diff.displacement:kr;return Z0(t,n)},jNe=function(t,r,n){return r.subject.active?n(r.subject.active)(t):!1},LNe=function(t,r,n){return n(r)(t)},OE=function(t){var r=t.target,n=t.destination,o=t.viewport,i=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,s=i?BNe(r,n):r;return jNe(s,n,a)&&LNe(s,o,a)},UNe=function(t){return OE(yt({},t,{isVisibleThroughFrameFn:tX}))},nX=function(t){return OE(yt({},t,{isVisibleThroughFrameFn:NNe}))},zNe=function(t){return OE(yt({},t,{isVisibleThroughFrameFn:FNe(t.destination.axis)}))},HNe=function(t,r,n){if(typeof n=="boolean")return n;if(!r)return!0;var o=r.invisible,i=r.visible;if(o[t])return!1;var a=i[t];return a?a.shouldAnimate:!0};function VNe(e,t){var r=e.page.marginBox,n={top:t.point.y,right:0,bottom:0,left:t.point.x};return Vo(xE(r,n))}function Qp(e){var t=e.afterDragging,r=e.destination,n=e.displacedBy,o=e.viewport,i=e.forceShouldAnimate,a=e.last;return t.reduce(function(l,c){var u=VNe(c,n),f=c.descriptor.id;l.all.push(f);var d=UNe({target:u,destination:r,viewport:o,withDroppableDisplacement:!0});if(!d)return l.invisible[c.descriptor.id]=!0,l;var p=HNe(f,a,i),h={draggableId:f,shouldAnimate:p};return l.visible[f]=h,l},{all:[],visible:{},invisible:{}})}function WNe(e,t){if(!e.length)return 0;var r=e[e.length-1].descriptor.index;return t.inHomeList?r:r+1}function KT(e){var t=e.insideDestination,r=e.inHomeList,n=e.displacedBy,o=e.destination,i=WNe(t,{inHomeList:r});return{displaced:Jp,displacedBy:n,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:i}}}}function iy(e){var t=e.draggable,r=e.insideDestination,n=e.destination,o=e.viewport,i=e.displacedBy,a=e.last,s=e.index,l=e.forceShouldAnimate,c=Pf(t,n);if(s==null)return KT({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var u=nl(r,function(m){return m.descriptor.index===s});if(!u)return KT({insideDestination:r,inHomeList:c,displacedBy:i,destination:n});var f=c2(t,r),d=r.indexOf(u),p=f.slice(d),h=Qp({afterDragging:p,destination:n,displacedBy:i,last:a,viewport:o.frame,forceShouldAnimate:l});return{displaced:h,displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:s}}}}function Ws(e,t){return!!t.effected[e]}var qNe=function(e){var t=e.isMovingForward,r=e.destination,n=e.draggables,o=e.combine,i=e.afterCritical;if(!r.isCombineEnabled)return null;var a=o.draggableId,s=n[a],l=s.descriptor.index,c=Ws(a,i);return c?t?l:l-1:t?l+1:l},GNe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.insideDestination,o=e.location;if(!n.length)return null;var i=o.index,a=t?i+1:i-1,s=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=r?l:l+1;return ac?null:a},KNe=function(e){var t=e.isMovingForward,r=e.isInHomeList,n=e.draggable,o=e.draggables,i=e.destination,a=e.insideDestination,s=e.previousImpact,l=e.viewport,c=e.afterCritical,u=s.at;if(u||Ge(!1),u.type==="REORDER"){var f=GNe({isMovingForward:t,isInHomeList:r,location:u.destination,insideDestination:a});return f==null?null:iy({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:f})}var d=qNe({isMovingForward:t,destination:i,displaced:s.displaced,draggables:o,combine:u.combine,afterCritical:c});return d==null?null:iy({draggable:n,insideDestination:a,destination:i,viewport:l,last:s.displaced,displacedBy:s.displacedBy,index:d})},YNe=function(e){var t=e.displaced,r=e.afterCritical,n=e.combineWith,o=e.displacedBy,i=!!(t.visible[n]||t.invisible[n]);return Ws(n,r)?i?kr:Sf(o.point):i?o.point:kr},XNe=function(e){var t=e.afterCritical,r=e.impact,n=e.draggables,o=l2(r);o||Ge(!1);var i=o.draggableId,a=n[i].page.borderBox.center,s=YNe({displaced:r.displaced,afterCritical:t,combineWith:i,displacedBy:r.displacedBy});return jr(a,s)},oX=function(t,r){return r.margin[t.start]+r.borderBox[t.size]/2},ZNe=function(t,r){return r.margin[t.end]+r.borderBox[t.size]/2},kE=function(t,r,n){return r[t.crossAxisStart]+n.margin[t.crossAxisStart]+n.borderBox[t.crossAxisSize]/2},YT=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return Kl(r.line,n.marginBox[r.end]+oX(r,o),kE(r,n.marginBox,o))},XT=function(t){var r=t.axis,n=t.moveRelativeTo,o=t.isMoving;return Kl(r.line,n.marginBox[r.start]-ZNe(r,o),kE(r,n.marginBox,o))},JNe=function(t){var r=t.axis,n=t.moveInto,o=t.isMoving;return Kl(r.line,n.contentBox[r.start]+oX(r,o),kE(r,n.contentBox,o))},QNe=function(e){var t=e.impact,r=e.draggable,n=e.draggables,o=e.droppable,i=e.afterCritical,a=Cf(o.descriptor.id,n),s=r.page,l=o.axis;if(!a.length)return JNe({axis:l,moveInto:o.page,isMoving:s});var c=t.displaced,u=t.displacedBy,f=c.all[0];if(f){var d=n[f];if(Ws(f,i))return XT({axis:l,moveRelativeTo:d.page,isMoving:s});var p=ey(d.page,u.point);return XT({axis:l,moveRelativeTo:p,isMoving:s})}var h=a[a.length-1];if(h.descriptor.id===r.descriptor.id)return s.borderBox.center;if(Ws(h.descriptor.id,i)){var m=ey(h.page,Sf(i.displacedBy.point));return YT({axis:l,moveRelativeTo:m,isMoving:s})}return YT({axis:l,moveRelativeTo:h.page,isMoving:s})},_6=function(e,t){var r=e.frame;return r?jr(t,r.scroll.diff.displacement):t},eFe=function(t){var r=t.impact,n=t.draggable,o=t.droppable,i=t.draggables,a=t.afterCritical,s=n.page.borderBox.center,l=r.at;return!o||!l?s:l.type==="REORDER"?QNe({impact:r,draggable:n,draggables:i,droppable:o,afterCritical:a}):XNe({impact:r,draggables:i,afterCritical:a})},u2=function(e){var t=eFe(e),r=e.droppable,n=r?_6(r,t):t;return n},iX=function(e,t){var r=zn(t,e.scroll.initial),n=Sf(r),o=Vo({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),i={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:r,displacement:n}}};return i};function ZT(e,t){return e.map(function(r){return t[r]})}function tFe(e,t){for(var r=0;r1?u.sort(function(f,d){return dn(f)[s.start]-dn(d)[s.start]})[0]:c.sort(function(f,d){var p=qT(r,GT(dn(f))),h=qT(r,GT(dn(d)));return p!==h?p-h:dn(f)[s.start]-dn(d)[s.start]})[0]},JT=function(t,r){var n=t.page.borderBox.center;return Ws(t.descriptor.id,r)?zn(n,r.displacedBy.point):n},aFe=function(t,r){var n=t.page.borderBox;return Ws(t.descriptor.id,r)?Z0(n,Sf(r.displacedBy.point)):n},sFe=function(e){var t=e.pageBorderBoxCenter,r=e.viewport,n=e.destination,o=e.insideDestination,i=e.afterCritical,a=o.filter(function(s){return nX({target:aFe(s,i),destination:n,viewport:r.frame,withDroppableDisplacement:!0})}).sort(function(s,l){var c=Zp(t,_6(n,JT(s,i))),u=Zp(t,_6(n,JT(l,i)));return ct.left&&e.topt.top}function vFe(e){var t=e.pageBorderBox,r=e.draggable,n=e.candidates,o=r.page.borderBox.center,i=n.map(function(a){var s=a.axis,l=Kl(a.axis.line,t.center[s.line],a.page.borderBox.center[s.crossAxisLine]);return{id:a.descriptor.id,distance:Zp(o,l)}}).sort(function(a,s){return s.distance-a.distance});return i[0]?i[0].id:null}function gFe(e){var t=e.pageBorderBox,r=e.draggable,n=e.droppables,o=s2(n).filter(function(i){if(!i.isEnabled)return!1;var a=i.subject.active;if(!a||!hFe(t,a))return!1;if(cX(a)(t.center))return!0;var s=i.axis,l=a.center[s.crossAxisLine],c=t[s.crossAxisStart],u=t[s.crossAxisEnd],f=wo(a[s.crossAxisStart],a[s.crossAxisEnd]),d=f(c),p=f(u);return!d&&!p?!0:d?cl});return o.length?o.length===1?o[0].descriptor.id:vFe({pageBorderBox:t,draggable:r,candidates:o}):null}var uX=function(t,r){return Vo(Z0(t,r))},mFe=function(e,t){var r=e.frame;return r?uX(t,r.scroll.diff.value):t};function fX(e){var t=e.displaced,r=e.id;return!!(t.visible[r]||t.invisible[r])}function yFe(e){var t=e.draggable,r=e.closest,n=e.inHomeList;return r?n&&r.descriptor.index>t.descriptor.index?r.descriptor.index-1:r.descriptor.index:null}var bFe=function(e){var t=e.pageBorderBoxWithDroppableScroll,r=e.draggable,n=e.destination,o=e.insideDestination,i=e.last,a=e.viewport,s=e.afterCritical,l=n.axis,c=J0(n.axis,r.displaceBy),u=c.value,f=t[l.start],d=t[l.end],p=c2(r,o),h=nl(p,function(_){var w=_.descriptor.id,g=_.page.borderBox.center[l.line],E=Ws(w,s),A=fX({displaced:i,id:w});return E?A?d<=g:fw[s.start]+E&&fw[s.start]-c+E&&uw[s.start]+c+E&&fw[s.start]+E&&u=tD)return wX;var i=o/tD,a=C6+XFe*i,s=n==="CANCEL"?a*ZFe:a;return Number(s.toFixed(2))},QFe=function(e){var t=e.impact,r=e.draggable,n=e.dimensions,o=e.viewport,i=e.afterCritical,a=n.draggables,s=n.droppables,l=qn(t),c=l?s[l]:null,u=s[r.descriptor.droppableId],f=hX({impact:t,draggable:r,draggables:a,afterCritical:i,droppable:c||u,viewport:o}),d=zn(f,r.client.borderBox.center);return d},eBe=function(e){var t=e.draggables,r=e.reason,n=e.lastImpact,o=e.home,i=e.viewport,a=e.onLiftImpact;if(!n.at||r!=="DROP"){var s=pX({draggables:t,impact:a,destination:o,viewport:i,forceShouldAnimate:!0});return{impact:s,didDropInsideDroppable:!1}}if(n.at.type==="REORDER")return{impact:n,didDropInsideDroppable:!0};var l=yt({},n,{displaced:Jp});return{impact:l,didDropInsideDroppable:!0}},tBe=function(e){var t=e.getState,r=e.dispatch;return function(n){return function(o){if(o.type!=="DROP"){n(o);return}var i=t(),a=o.payload.reason;if(i.phase==="COLLECTING"){r(GFe({reason:a}));return}if(i.phase!=="IDLE"){var s=i.phase==="DROP_PENDING"&&i.isWaiting;s&&Ge(!1),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Ge(!1);var l=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],f=eBe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=f.impact,p=f.didDropInsideDroppable,h=p?CE(d):null,m=p?l2(d):null,_={index:l.draggable.index,droppableId:l.droppable.id},w={draggableId:u.descriptor.id,type:u.descriptor.type,source:_,reason:a,mode:i.movementMode,destination:h,combine:m},g=QFe({impact:d,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),E={critical:i.critical,afterCritical:i.afterCritical,result:w,impact:d},A=!Rs(i.current.client.offset,g)||!!w.combine;if(!A){r(TE({completed:E}));return}var N=JFe({current:i.current.client.offset,destination:g,reason:a}),D={newHomeClientOffset:g,dropDuration:N,completed:E};r(qFe(D))}}}},xX=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function rBe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(r){r.target!==window&&r.target!==window.document||e()}}}function nBe(e){var t=e.onWindowScroll;function r(){t(xX())}var n=Xp(r),o=rBe(n),i=Ms;function a(){return i!==Ms}function s(){a()&&Ge(!1),i=yo(window,[o])}function l(){a()||Ge(!1),n.cancel(),i(),i=Ms}return{start:s,stop:l,isActive:a}}var oBe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},iBe=function(e){var t=nBe({onWindowScroll:function(n){e.dispatch(LFe({newScroll:n}))}});return function(r){return function(n){!t.isActive()&&n.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&oBe(n)&&t.stop(),r(n)}}},aBe=function(e){var t=!1,r=!1,n=setTimeout(function(){r=!0}),o=function(a){t||r||(t=!0,e(a),clearTimeout(n))};return o.wasCalled=function(){return t},o},sBe=function(){var e=[],t=function(i){var a=SE(e,function(c){return c.timerId===i});a===-1&&Ge(!1);var s=e.splice(a,1),l=s[0];l.callback()},r=function(i){var a=setTimeout(function(){return t(a)}),s={timerId:a,callback:i};e.push(s)},n=function(){if(e.length){var i=[].concat(e);e.length=0,i.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:r,flush:n}},lBe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.droppableId===r.droppableId&&t.index===r.index},cBe=function(t,r){return t==null&&r==null?!0:t==null||r==null?!1:t.draggableId===r.draggableId&&t.droppableId===r.droppableId},uBe=function(t,r){if(t===r)return!0;var n=t.draggable.id===r.draggable.id&&t.draggable.droppableId===r.draggable.droppableId&&t.draggable.type===r.draggable.type&&t.draggable.index===r.draggable.index,o=t.droppable.id===r.droppable.id&&t.droppable.type===r.droppable.type;return n&&o},md=function(t,r){r()},d1=function(t,r){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:r}},T5=function(t,r,n,o){if(!t){n(o(r));return}var i=aBe(n),a={announce:i};t(r,a),i.wasCalled()||n(o(r))},fBe=function(e,t){var r=sBe(),n=null,o=function(d,p){n&&Ge(!1),md("onBeforeCapture",function(){var h=e().onBeforeCapture;if(h){var m={draggableId:d,mode:p};h(m)}})},i=function(d,p){n&&Ge(!1),md("onBeforeDragStart",function(){var h=e().onBeforeDragStart;h&&h(d1(d,p))})},a=function(d,p){n&&Ge(!1);var h=d1(d,p);n={mode:p,lastCritical:d,lastLocation:h.source,lastCombine:null},r.add(function(){md("onDragStart",function(){return T5(e().onDragStart,h,t,K1.onDragStart)})})},s=function(d,p){var h=CE(p),m=l2(p);n||Ge(!1);var _=!uBe(d,n.lastCritical);_&&(n.lastCritical=d);var w=!lBe(n.lastLocation,h);w&&(n.lastLocation=h);var g=!cBe(n.lastCombine,m);if(g&&(n.lastCombine=m),!(!_&&!w&&!g)){var E=yt({},d1(d,n.mode),{combine:m,destination:h});r.add(function(){md("onDragUpdate",function(){return T5(e().onDragUpdate,E,t,K1.onDragUpdate)})})}},l=function(){n||Ge(!1),r.flush()},c=function(d){n||Ge(!1),n=null,md("onDragEnd",function(){return T5(e().onDragEnd,d,t,K1.onDragEnd)})},u=function(){if(n){var d=yt({},d1(n.lastCritical,n.mode),{combine:null,destination:null,reason:"CANCEL"});c(d)}};return{beforeCapture:o,beforeStart:i,start:a,update:s,flush:l,drop:c,abort:u}},dBe=function(e,t){var r=fBe(e,t);return function(n){return function(o){return function(i){if(i.type==="BEFORE_INITIAL_CAPTURE"){r.beforeCapture(i.payload.draggableId,i.payload.movementMode);return}if(i.type==="INITIAL_PUBLISH"){var a=i.payload.critical;r.beforeStart(a,i.payload.movementMode),o(i),r.start(a,i.payload.movementMode);return}if(i.type==="DROP_COMPLETE"){var s=i.payload.completed.result;r.flush(),o(i),r.drop(s);return}if(o(i),i.type==="FLUSH"){r.abort();return}var l=n.getState();l.phase==="DRAGGING"&&r.update(l.critical,l.impact)}}}},pBe=function(e){return function(t){return function(r){if(r.type!=="DROP_ANIMATION_FINISHED"){t(r);return}var n=e.getState();n.phase!=="DROP_ANIMATING"&&Ge(!1),e.dispatch(TE({completed:n.completed}))}}},hBe=function(e){var t=null,r=null;function n(){r&&(cancelAnimationFrame(r),r=null),t&&(t(),t=null)}return function(o){return function(i){if((i.type==="FLUSH"||i.type==="DROP_COMPLETE"||i.type==="DROP_ANIMATION_FINISHED")&&n(),o(i),i.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var l=e.getState();l.phase==="DROP_ANIMATING"&&e.dispatch(bX())}};r=requestAnimationFrame(function(){r=null,t=yo(window,[a])})}}}},vBe=function(e){return function(){return function(t){return function(r){(r.type==="DROP_COMPLETE"||r.type==="FLUSH"||r.type==="DROP_ANIMATE")&&e.stopPublishing(),t(r)}}}},gBe=function(e){var t=!1;return function(){return function(r){return function(n){if(n.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(n.payload.critical.draggable.id),r(n),e.tryRestoreFocusRecorded();return}if(r(n),!!t){if(n.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(n.type==="DROP_COMPLETE"){t=!1;var o=n.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},mBe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},yBe=function(e){return function(t){return function(r){return function(n){if(mBe(n)){e.stop(),r(n);return}if(n.type==="INITIAL_PUBLISH"){r(n);var o=t.getState();o.phase!=="DRAGGING"&&Ge(!1),e.start(o);return}r(n),e.scroll(t.getState())}}}},bBe=function(e){return function(t){return function(r){if(t(r),r.type==="PUBLISH_WHILE_DRAGGING"){var n=e.getState();n.phase==="DROP_PENDING"&&(n.isWaiting||e.dispatch(yX({reason:n.reason})))}}}},wBe=$Y,xBe=function(e){var t=e.dimensionMarshal,r=e.focusMarshal,n=e.styleMarshal,o=e.getResponders,i=e.announce,a=e.autoScroller;return IY($Fe,wBe(wRe(YFe(n),vBe(t),KFe(t),tBe,pBe,hBe,bBe,yBe(a),iBe,gBe(r),dBe(o,i))))},D5=function(){return{additions:{},removals:{},modified:{}}};function _Be(e){var t=e.registry,r=e.callbacks,n=D5(),o=null,i=function(){o||(r.collectionStarting(),o=requestAnimationFrame(function(){o=null;var u=n,f=u.additions,d=u.removals,p=u.modified,h=Object.keys(f).map(function(w){return t.draggable.getById(w).getDimension(kr)}).sort(function(w,g){return w.descriptor.index-g.descriptor.index}),m=Object.keys(p).map(function(w){var g=t.droppable.getById(w),E=g.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:E}}),_={additions:h,removals:Object.keys(d),modified:m};n=D5(),r.publish(_)}))},a=function(u){var f=u.descriptor.id;n.additions[f]=u,n.modified[u.descriptor.droppableId]=!0,n.removals[f]&&delete n.removals[f],i()},s=function(u){var f=u.descriptor;n.removals[f.id]=!0,n.modified[f.droppableId]=!0,n.additions[f.id]&&delete n.additions[f.id],i()},l=function(){o&&(cancelAnimationFrame(o),o=null,n=D5())};return{add:a,remove:s,stop:l}}var _X=function(e){var t=e.scrollHeight,r=e.scrollWidth,n=e.height,o=e.width,i=zn({x:r,y:t},{x:o,y:n}),a={x:Math.max(0,i.x),y:Math.max(0,i.y)};return a},EX=function(){var e=document.documentElement;return e||Ge(!1),e},SX=function(){var e=EX(),t=_X({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},EBe=function(){var e=xX(),t=SX(),r=e.y,n=e.x,o=EX(),i=o.clientWidth,a=o.clientHeight,s=n+i,l=r+a,c=Vo({top:r,left:n,right:s,bottom:l}),u={frame:c,scroll:{initial:e,current:e,max:t,diff:{value:kr,displacement:kr}}};return u},SBe=function(e){var t=e.critical,r=e.scrollOptions,n=e.registry,o=EBe(),i=o.scroll.current,a=t.droppable,s=n.droppable.getAllByType(a.type).map(function(f){return f.callbacks.getDimensionAndWatchScroll(i,r)}),l=n.draggable.getAllByType(t.draggable.type).map(function(f){return f.getDimension(i)}),c={draggables:QY(l),droppables:JY(s)},u={dimensions:c,critical:t,viewport:o};return u};function rD(e,t,r){if(r.descriptor.id===t.id||r.descriptor.type!==t.type)return!1;var n=e.droppable.getById(r.descriptor.droppableId);return n.descriptor.mode==="virtual"}var CBe=function(e,t){var r=null,n=_Be({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(p,h){e.droppable.exists(p)||Ge(!1),r&&t.updateDroppableIsEnabled({id:p,isEnabled:h})},i=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:h}))},a=function(p,h){r&&(e.droppable.exists(p)||Ge(!1),t.updateDroppableScroll({id:p,newScroll:h}))},s=function(p,h){r&&e.droppable.getById(p).callbacks.scroll(h)},l=function(){if(r){n.stop();var p=r.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(h){return h.callbacks.dragStopped()}),r.unsubscribe(),r=null}},c=function(p){r||Ge(!1);var h=r.critical.draggable;p.type==="ADDITION"&&rD(e,h,p.value)&&n.add(p.value),p.type==="REMOVAL"&&rD(e,h,p.value)&&n.remove(p.value)},u=function(p){r&&Ge(!1);var h=e.draggable.getById(p.draggableId),m=e.droppable.getById(h.descriptor.droppableId),_={draggable:h.descriptor,droppable:m.descriptor},w=e.subscribe(c);return r={critical:_,unsubscribe:w},SBe({critical:_,registry:e,scrollOptions:p.scrollOptions})},f={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:i,scrollDroppable:s,updateDroppableScroll:a,startPublishing:u,stopPublishing:l};return f},CX=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},PBe=function(e){window.scrollBy(e.x,e.y)},OBe=Pr(function(e){return s2(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),kBe=function(t,r){var n=nl(OBe(r),function(o){return o.frame||Ge(!1),cX(o.frame.pageMarginBox)(t)});return n},ABe=function(e){var t=e.center,r=e.destination,n=e.droppables;if(r){var o=n[r];return o.frame?o:null}var i=kBe(t,n);return i},Ns={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},IBe=function(e,t){var r=e[t.size]*Ns.startFromPercentage,n=e[t.size]*Ns.maxScrollAtPercentage,o={startScrollingFrom:r,maxScrollValueAt:n};return o},PX=function(e){var t=e.startOfRange,r=e.endOfRange,n=e.current,o=r-t;if(o===0)return 0;var i=n-t,a=i/o;return a},RE=1,$Be=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Ns.maxPixelScroll;if(e===t.startScrollingFrom)return RE;var r=PX({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),n=1-r,o=Ns.maxPixelScroll*Ns.ease(n);return Math.ceil(o)},nD=Ns.durationDampening.accelerateAt,oD=Ns.durationDampening.stopDampeningAt,TBe=function(e,t){var r=t,n=oD,o=Date.now(),i=o-r;if(i>=oD)return e;if(it.height,i=r.width>t.width;return!i&&!o?n:i&&o?null:{x:i?0:n.x,y:o?0:n.y}},MBe=XY(function(e){return e===0?0:e}),OX=function(e){var t=e.dragStartTime,r=e.container,n=e.subject,o=e.center,i=e.shouldUseTimeDampening,a={top:o.y-r.top,right:r.right-o.x,bottom:r.bottom-o.y,left:o.x-r.left},s=aD({container:r,distanceToEdges:a,dragStartTime:t,axis:PE,shouldUseTimeDampening:i}),l=aD({container:r,distanceToEdges:a,dragStartTime:t,axis:rX,shouldUseTimeDampening:i}),c=MBe({x:l,y:s});if(Rs(c,kr))return null;var u=DBe({container:r,subject:n,proposedScroll:c});return u?Rs(u,kr)?null:u:null},RBe=XY(function(e){return e===0?0:e>0?1:-1}),NE=function(){var e=function(r,n){return r<0?r:r>n?r-n:0};return function(t){var r=t.current,n=t.max,o=t.change,i=jr(r,o),a={x:e(i.x,n.x),y:e(i.y,n.y)};return Rs(a,kr)?null:a}}(),kX=function(t){var r=t.max,n=t.current,o=t.change,i={x:Math.max(n.x,r.x),y:Math.max(n.y,r.y)},a=RBe(o),s=NE({max:i,current:n,change:a});return!s||a.x!==0&&s.x===0||a.y!==0&&s.y===0},FE=function(t,r){return kX({current:t.scroll.current,max:t.scroll.max,change:r})},NBe=function(t,r){if(!FE(t,r))return null;var n=t.scroll.max,o=t.scroll.current;return NE({current:o,max:n,change:r})},BE=function(t,r){var n=t.frame;return n?kX({current:n.scroll.current,max:n.scroll.max,change:r}):!1},FBe=function(t,r){var n=t.frame;return!n||!BE(t,r)?null:NE({current:n.scroll.current,max:n.scroll.max,change:r})},BBe=function(e){var t=e.viewport,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=OX({dragStartTime:o,container:t.frame,subject:r,center:n,shouldUseTimeDampening:i});return a&&FE(t,a)?a:null},jBe=function(e){var t=e.droppable,r=e.subject,n=e.center,o=e.dragStartTime,i=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var s=OX({dragStartTime:o,container:a.pageMarginBox,subject:r,center:n,shouldUseTimeDampening:i});return s&&BE(t,s)?s:null},sD=function(e){var t=e.state,r=e.dragStartTime,n=e.shouldUseTimeDampening,o=e.scrollWindow,i=e.scrollDroppable,a=t.current.page.borderBoxCenter,s=t.dimensions.draggables[t.critical.draggable.id],l=s.page.marginBox;if(t.isWindowScrollAllowed){var c=t.viewport,u=BBe({dragStartTime:r,viewport:c,subject:l,center:a,shouldUseTimeDampening:n});if(u){o(u);return}}var f=ABe({center:a,destination:qn(t.impact),droppables:t.dimensions.droppables});if(f){var d=jBe({dragStartTime:r,droppable:f,subject:l,center:a,shouldUseTimeDampening:n});d&&i(f.descriptor.id,d)}},LBe=function(e){var t=e.scrollWindow,r=e.scrollDroppable,n=Xp(t),o=Xp(r),i=null,a=function(u){i||Ge(!1);var f=i,d=f.shouldUseTimeDampening,p=f.dragStartTime;sD({state:u,scrollWindow:n,scrollDroppable:o,dragStartTime:p,shouldUseTimeDampening:d})},s=function(u){i&&Ge(!1);var f=Date.now(),d=!1,p=function(){d=!0};sD({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),i={dragStartTime:f,shouldUseTimeDampening:d},d&&a(u)},l=function(){i&&(n.cancel(),o.cancel(),i=null)};return{start:s,stop:l,scroll:a}},UBe=function(e){var t=e.move,r=e.scrollDroppable,n=e.scrollWindow,o=function(c,u){var f=jr(c.current.client.selection,u);t({client:f})},i=function(c,u){if(!BE(c,u))return u;var f=FBe(c,u);if(!f)return r(c.descriptor.id,u),null;var d=zn(u,f);r(c.descriptor.id,d);var p=zn(u,d);return p},a=function(c,u,f){if(!c||!FE(u,f))return f;var d=NBe(u,f);if(!d)return n(f),null;var p=zn(f,d);n(p);var h=zn(f,p);return h},s=function(c){var u=c.scrollJumpRequest;if(u){var f=qn(c.impact);f||Ge(!1);var d=i(c.dimensions.droppables[f],u);if(d){var p=c.viewport,h=a(c.isWindowScrollAllowed,p,d);h&&o(c,h)}}};return s},zBe=function(e){var t=e.scrollDroppable,r=e.scrollWindow,n=e.move,o=LBe({scrollWindow:r,scrollDroppable:t}),i=UBe({move:n,scrollWindow:r,scrollDroppable:t}),a=function(c){if(c.phase==="DRAGGING"){if(c.movementMode==="FLUID"){o.scroll(c);return}c.scrollJumpRequest&&i(c)}},s={scroll:a,start:o.start,stop:o.stop};return s},Zu="data-rbd",Ju=function(){var e=Zu+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),P6=function(){var e=Zu+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),HBe=function(){var e=Zu+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),lD={contextId:Zu+"-scroll-container-context-id"},VBe=function(t){return function(r){return"["+r+'="'+t+'"]'}},yd=function(t,r){return t.map(function(n){var o=n.styles[r];return o?n.selector+" { "+o+" }":""}).join(" ")},WBe="pointer-events: none;",qBe=function(e){var t=VBe(e),r=function(){var s=` - cursor: -webkit-grab; - cursor: grab; - `;return{selector:t(Ju.contextId),styles:{always:` - -webkit-touch-callout: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - touch-action: manipulation; - `,resting:s,dragging:WBe,dropAnimating:s}}}(),n=function(){var s=` - transition: `+ip.outOfTheWay+`; - `;return{selector:t(P6.contextId),styles:{dragging:s,dropAnimating:s,userCancel:s}}}(),o={selector:t(HBe.contextId),styles:{always:"overflow-anchor: none;"}},i={selector:"body",styles:{dragging:` - cursor: grabbing; - cursor: -webkit-grabbing; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - overflow-anchor: none; - `}},a=[n,r,o,i];return{always:yd(a,"always"),resting:yd(a,"resting"),dragging:yd(a,"dragging"),dropAnimating:yd(a,"dropAnimating"),userCancel:yd(a,"userCancel")}},Gn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?k.useLayoutEffect:k.useEffect,M5=function(){var t=document.querySelector("head");return t||Ge(!1),t},cD=function(t){var r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.type="text/css",r};function GBe(e,t){var r=Ot(function(){return qBe(e)},[e]),n=k.useRef(null),o=k.useRef(null),i=lt(Pr(function(f){var d=o.current;d||Ge(!1),d.textContent=f}),[]),a=lt(function(f){var d=n.current;d||Ge(!1),d.textContent=f},[]);Gn(function(){!n.current&&!o.current||Ge(!1);var f=cD(t),d=cD(t);return n.current=f,o.current=d,f.setAttribute(Zu+"-always",e),d.setAttribute(Zu+"-dynamic",e),M5().appendChild(f),M5().appendChild(d),a(r.always),i(r.resting),function(){var p=function(m){var _=m.current;_||Ge(!1),M5().removeChild(_),m.current=null};p(n),p(o)}},[t,a,i,r.always,r.resting,e]);var s=lt(function(){return i(r.dragging)},[i,r.dragging]),l=lt(function(f){if(f==="DROP"){i(r.dropAnimating);return}i(r.userCancel)},[i,r.dropAnimating,r.userCancel]),c=lt(function(){o.current&&i(r.resting)},[i,r.resting]),u=Ot(function(){return{dragging:s,dropping:l,resting:c}},[s,l,c]);return u}var AX=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function f2(e){return e instanceof AX(e).HTMLElement}function KBe(e,t){var r="["+Ju.contextId+'="'+e+'"]',n=ZY(document.querySelectorAll(r));if(!n.length)return null;var o=nl(n,function(i){return i.getAttribute(Ju.draggableId)===t});return!o||!f2(o)?null:o}function YBe(e){var t=k.useRef({}),r=k.useRef(null),n=k.useRef(null),o=k.useRef(!1),i=lt(function(d,p){var h={id:d,focus:p};return t.current[d]=h,function(){var _=t.current,w=_[d];w!==h&&delete _[d]}},[]),a=lt(function(d){var p=KBe(e,d);p&&p!==document.activeElement&&p.focus()},[e]),s=lt(function(d,p){r.current===d&&(r.current=p)},[]),l=lt(function(){n.current||o.current&&(n.current=requestAnimationFrame(function(){n.current=null;var d=r.current;d&&a(d)}))},[a]),c=lt(function(d){r.current=null;var p=document.activeElement;p&&p.getAttribute(Ju.draggableId)===d&&(r.current=d)},[]);Gn(function(){return o.current=!0,function(){o.current=!1;var d=n.current;d&&cancelAnimationFrame(d)}},[]);var u=Ot(function(){return{register:i,tryRecordFocus:c,tryRestoreFocusRecorded:l,tryShiftRecord:s}},[i,c,l,s]);return u}function XBe(){var e={draggables:{},droppables:{}},t=[];function r(f){return t.push(f),function(){var p=t.indexOf(f);p!==-1&&t.splice(p,1)}}function n(f){t.length&&t.forEach(function(d){return d(f)})}function o(f){return e.draggables[f]||null}function i(f){var d=o(f);return d||Ge(!1),d}var a={register:function(d){e.draggables[d.descriptor.id]=d,n({type:"ADDITION",value:d})},update:function(d,p){var h=e.draggables[p.descriptor.id];h&&h.uniqueId===d.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:function(d){var p=d.descriptor.id,h=o(p);h&&d.uniqueId===h.uniqueId&&(delete e.draggables[p],n({type:"REMOVAL",value:d}))},getById:i,findById:o,exists:function(d){return!!o(d)},getAllByType:function(d){return oy(e.draggables).filter(function(p){return p.descriptor.type===d})}};function s(f){return e.droppables[f]||null}function l(f){var d=s(f);return d||Ge(!1),d}var c={register:function(d){e.droppables[d.descriptor.id]=d},unregister:function(d){var p=s(d.descriptor.id);p&&d.uniqueId===p.uniqueId&&delete e.droppables[d.descriptor.id]},getById:l,findById:s,exists:function(d){return!!s(d)},getAllByType:function(d){return oy(e.droppables).filter(function(p){return p.descriptor.type===d})}};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:r,clean:u}}function ZBe(){var e=Ot(XBe,[]);return k.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var jE=ne.createContext(null),ay=function(){var e=document.body;return e||Ge(!1),e},JBe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},QBe=function(t){return"rbd-announcement-"+t};function eje(e){var t=Ot(function(){return QBe(e)},[e]),r=k.useRef(null);k.useEffect(function(){var i=document.createElement("div");return r.current=i,i.id=t,i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true"),yt(i.style,JBe),ay().appendChild(i),function(){setTimeout(function(){var l=ay();l.contains(i)&&l.removeChild(i),i===r.current&&(r.current=null)})}},[t]);var n=lt(function(o){var i=r.current;if(i){i.textContent=o;return}},[]);return n}var tje=0,rje={separator:"::"};function LE(e,t){return t===void 0&&(t=rje),Ot(function(){return""+e+t.separator+tje++},[t.separator,e])}function nje(e){var t=e.contextId,r=e.uniqueId;return"rbd-hidden-text-"+t+"-"+r}function oje(e){var t=e.contextId,r=e.text,n=LE("hidden-text",{separator:"-"}),o=Ot(function(){return nje({contextId:t,uniqueId:n})},[n,t]);return k.useEffect(function(){var a=document.createElement("div");return a.id=o,a.textContent=r,a.style.display="none",ay().appendChild(a),function(){var l=ay();l.contains(a)&&l.removeChild(a)}},[o,r]),o}var d2=ne.createContext(null);function IX(e){var t=k.useRef(e);return k.useEffect(function(){t.current=e}),t}function ije(){var e=null;function t(){return!!e}function r(a){return a===e}function n(a){e&&Ge(!1);var s={abandon:a};return e=s,s}function o(){e||Ge(!1),e=null}function i(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:r,claim:n,release:o,tryAbandon:i}}var aje=9,sje=13,UE=27,$X=32,lje=33,cje=34,uje=35,fje=36,dje=37,pje=38,hje=39,vje=40,p1,gje=(p1={},p1[sje]=!0,p1[aje]=!0,p1),TX=function(e){gje[e.keyCode]&&e.preventDefault()},p2=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],r=nl(t,function(n){return"on"+n in document});return r||e}(),DX=0,uD=5;function mje(e,t){return Math.abs(t.x-e.x)>=uD||Math.abs(t.y-e.y)>=uD}var fD={type:"IDLE"};function yje(e){var t=e.cancel,r=e.completed,n=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(a){var s=a.button,l=a.clientX,c=a.clientY;if(s===DX){var u={x:l,y:c},f=n();if(f.type==="DRAGGING"){a.preventDefault(),f.actions.move(u);return}f.type!=="PENDING"&&Ge(!1);var d=f.point;if(mje(d,u)){a.preventDefault();var p=f.actions.fluidLift(u);o({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var s=n();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"mousedown",fn:function(a){n().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var s=n();if(s.type==="PENDING"){t();return}if(a.keyCode===UE){a.preventDefault(),t();return}TX(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){n().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var s=n();if(s.type==="IDLE"&&Ge(!1),s.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:p2,fn:t}]}function bje(e){var t=k.useRef(fD),r=k.useRef(Ms),n=Ot(function(){return{eventName:"mousedown",fn:function(f){if(!f.defaultPrevented&&f.button===DX&&!(f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)){var d=e.findClosestDraggableId(f);if(d){var p=e.tryGetLock(d,a,{sourceEvent:f});if(p){f.preventDefault();var h={x:f.clientX,y:f.clientY};r.current(),c(p,h)}}}}}},[e]),o=Ot(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(f){if(!f.defaultPrevented){var d=e.findClosestDraggableId(f);if(d){var p=e.findOptionsForDraggable(d);p&&(p.shouldRespectForcePress||e.canGetLock(d)&&f.preventDefault())}}}}},[e]),i=lt(function(){var f={passive:!1,capture:!0};r.current=yo(window,[o,n],f)},[o,n]),a=lt(function(){var u=t.current;u.type!=="IDLE"&&(t.current=fD,r.current(),i())},[i]),s=lt(function(){var u=t.current;a(),u.type==="DRAGGING"&&u.actions.cancel({shouldBlockNextClick:!0}),u.type==="PENDING"&&u.actions.abort()},[a]),l=lt(function(){var f={capture:!0,passive:!1},d=yje({cancel:s,completed:a,getPhase:function(){return t.current},setPhase:function(h){t.current=h}});r.current=yo(window,d,f)},[s,a]),c=lt(function(f,d){t.current.type!=="IDLE"&&Ge(!1),t.current={type:"PENDING",point:d,actions:f},l()},[l]);Gn(function(){return i(),function(){r.current()}},[i])}var Ac;function wje(){}var xje=(Ac={},Ac[cje]=!0,Ac[lje]=!0,Ac[fje]=!0,Ac[uje]=!0,Ac);function _je(e,t){function r(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:function(i){if(i.keyCode===UE){i.preventDefault(),r();return}if(i.keyCode===$X){i.preventDefault(),n();return}if(i.keyCode===vje){i.preventDefault(),e.moveDown();return}if(i.keyCode===pje){i.preventDefault(),e.moveUp();return}if(i.keyCode===hje){i.preventDefault(),e.moveRight();return}if(i.keyCode===dje){i.preventDefault(),e.moveLeft();return}if(xje[i.keyCode]){i.preventDefault();return}TX(i)}},{eventName:"mousedown",fn:r},{eventName:"mouseup",fn:r},{eventName:"click",fn:r},{eventName:"touchstart",fn:r},{eventName:"resize",fn:r},{eventName:"wheel",fn:r,options:{passive:!0}},{eventName:p2,fn:r}]}function Eje(e){var t=k.useRef(wje),r=Ot(function(){return{eventName:"keydown",fn:function(i){if(i.defaultPrevented||i.keyCode!==$X)return;var a=e.findClosestDraggableId(i);if(!a)return;var s=e.tryGetLock(a,u,{sourceEvent:i});if(!s)return;i.preventDefault();var l=!0,c=s.snapLift();t.current();function u(){l||Ge(!1),l=!1,t.current(),n()}t.current=yo(window,_je(c,u),{capture:!0,passive:!1})}}},[e]),n=lt(function(){var i={passive:!1,capture:!0};t.current=yo(window,[r],i)},[r]);Gn(function(){return n(),function(){t.current()}},[n])}var R5={type:"IDLE"},Sje=120,Cje=.15;function Pje(e){var t=e.cancel,r=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.keyCode===UE&&o.preventDefault(),t()}},{eventName:p2,fn:t}]}function Oje(e){var t=e.cancel,r=e.completed,n=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var s=i.touches[0],l=s.clientX,c=s.clientY,u={x:l,y:c};i.preventDefault(),a.actions.move(u)}},{eventName:"touchend",fn:function(i){var a=n();if(a.type!=="DRAGGING"){t();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),r()}},{eventName:"touchcancel",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(i){var a=n();a.type==="IDLE"&&Ge(!1);var s=i.touches[0];if(s){var l=s.force>=Cje;if(l){var c=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){c&&t();return}if(c){if(a.hasMoved){i.preventDefault();return}t();return}i.preventDefault()}}}},{eventName:p2,fn:t}]}function kje(e){var t=k.useRef(R5),r=k.useRef(Ms),n=lt(function(){return t.current},[]),o=lt(function(p){t.current=p},[]),i=Ot(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var h=e.findClosestDraggableId(p);if(h){var m=e.tryGetLock(h,s,{sourceEvent:p});if(m){var _=p.touches[0],w=_.clientX,g=_.clientY,E={x:w,y:g};r.current(),f(m,E)}}}}}},[e]),a=lt(function(){var p={capture:!0,passive:!1};r.current=yo(window,[i],p)},[i]),s=lt(function(){var d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),o(R5),r.current(),a())},[a,o]),l=lt(function(){var d=t.current;s(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[s]),c=lt(function(){var p={capture:!0,passive:!1},h={cancel:l,completed:s,getPhase:n},m=yo(window,Oje(h),p),_=yo(window,Pje(h),p);r.current=function(){m(),_()}},[l,n,s]),u=lt(function(){var p=n();p.type!=="PENDING"&&Ge(!1);var h=p.actions.fluidLift(p.point);o({type:"DRAGGING",actions:h,hasMoved:!1})},[n,o]),f=lt(function(p,h){n().type!=="IDLE"&&Ge(!1);var m=setTimeout(u,Sje);o({type:"PENDING",point:h,actions:p,longPressTimerId:m}),c()},[c,n,o,u]);Gn(function(){return a(),function(){r.current();var h=n();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),o(R5))}},[n,a,o]),Gn(function(){var p=yo(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var Aje={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function MX(e,t){if(t==null)return!1;var r=!!Aje[t.tagName.toLowerCase()];if(r)return!0;var n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:MX(e,t.parentElement)}function Ije(e,t){var r=t.target;return f2(r)?MX(e,r):!1}var $je=function(e){return Vo(e.getBoundingClientRect()).center};function Tje(e){return e instanceof AX(e).Element}var Dje=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],r=nl(t,function(n){return n in Element.prototype});return r||e}();function RX(e,t){return e==null?null:e[Dje](t)?e:RX(e.parentElement,t)}function Mje(e,t){return e.closest?e.closest(t):RX(e,t)}function Rje(e){return"["+Ju.contextId+'="'+e+'"]'}function Nje(e,t){var r=t.target;if(!Tje(r))return null;var n=Rje(e),o=Mje(r,n);return!o||!f2(o)?null:o}function Fje(e,t){var r=Nje(e,t);return r?r.getAttribute(Ju.draggableId):null}function Bje(e,t){var r="["+P6.contextId+'="'+e+'"]',n=ZY(document.querySelectorAll(r)),o=nl(n,function(i){return i.getAttribute(P6.id)===t});return!o||!f2(o)?null:o}function jje(e){e.preventDefault()}function h1(e){var t=e.expected,r=e.phase,n=e.isLockActive;return e.shouldWarn,!(!n()||t!==r)}function NX(e){var t=e.lockAPI,r=e.store,n=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var i=n.draggable.findById(o);return!(!i||!i.options.isEnabled||!CX(r.getState(),o))}function Lje(e){var t=e.lockAPI,r=e.contextId,n=e.store,o=e.registry,i=e.draggableId,a=e.forceSensorStop,s=e.sourceEvent,l=NX({lockAPI:t,store:n,registry:o,draggableId:i});if(!l)return null;var c=o.draggable.getById(i),u=Bje(r,c.descriptor.id);if(!u||s&&!c.options.canDragInteractiveElements&&Ije(u,s))return null;var f=t.claim(a||Ms),d="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function h(){return t.isActive(f)}function m(D,y){h1({expected:D,phase:d,isLockActive:h,shouldWarn:!0})&&n.dispatch(y())}var _=m.bind(null,"DRAGGING");function w(D){function y(){t.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(y(),d!=="PRE_DRAG"&&Ge(!1)),n.dispatch(DFe(D.liftActionArgs)),d="DRAGGING";function U(L,G){if(G===void 0&&(G={shouldBlockNextClick:!1}),D.cleanup(),G.shouldBlockNextClick){var V=yo(window,[{eventName:"click",fn:jje,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(V)}y(),n.dispatch(yX({reason:L}))}return yt({isActive:function(){return h1({expected:"DRAGGING",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(G){return U("DROP",G)},cancel:function(G){return U("CANCEL",G)}},D.actions)}function g(D){var y=Xp(function(L){_(function(){return mX({client:L})})}),U=w({liftActionArgs:{id:i,clientSelection:D,movementMode:"FLUID"},cleanup:function(){return y.cancel()},actions:{move:y}});return yt({},U,{move:y})}function E(){var D={moveUp:function(){return _(zFe)},moveRight:function(){return _(VFe)},moveDown:function(){return _(HFe)},moveLeft:function(){return _(WFe)}};return w({liftActionArgs:{id:i,clientSelection:$je(u),movementMode:"SNAP"},cleanup:Ms,actions:D})}function A(){var D=h1({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!0});D&&t.release()}var N={isActive:function(){return h1({expected:"PRE_DRAG",phase:d,isLockActive:h,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:g,snapLift:E,abort:A};return N}var Uje=[bje,Eje,kje];function zje(e){var t=e.contextId,r=e.store,n=e.registry,o=e.customSensors,i=e.enableDefaultSensors,a=[].concat(i?Uje:[],o||[]),s=k.useState(function(){return ije()})[0],l=lt(function(g,E){g.isDragging&&!E.isDragging&&s.tryAbandon()},[s]);Gn(function(){var g=r.getState(),E=r.subscribe(function(){var A=r.getState();l(g,A),g=A});return E},[s,r,l]),Gn(function(){return s.tryAbandon},[s.tryAbandon]);for(var c=lt(function(w){return NX({lockAPI:s,registry:n,store:r,draggableId:w})},[s,n,r]),u=lt(function(w,g,E){return Lje({lockAPI:s,registry:n,contextId:t,store:r,draggableId:w,forceSensorStop:g,sourceEvent:E&&E.sourceEvent?E.sourceEvent:null})},[t,s,n,r]),f=lt(function(w){return Fje(t,w)},[t]),d=lt(function(w){var g=n.draggable.findById(w);return g?g.options:null},[n.draggable]),p=lt(function(){s.isClaimed()&&(s.tryAbandon(),r.getState().phase!=="IDLE"&&r.dispatch($E()))},[s,r]),h=lt(s.isClaimed,[s]),m=Ot(function(){return{canGetLock:c,tryGetLock:u,findClosestDraggableId:f,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:h}},[c,u,f,d,p,h]),_=0;_r.name!==e)))}function VX(e){return Of().find(r=>r.name===e)!==void 0}function WX(e){return Ze.isHexString(e)&&e.length===66}function jLe(e){return Ze.isHexString(e)&&e.length===128}function h2(e){const t=e.pubkeys.map(i=>{const a=Ze.hexToBinUnsafe(i.pubkey);return Vb.blake2b(a,void 0,32)}),r=e.pubkeys.length,n=[Uint8Array.from([1]),Ze.encodeI256(BigInt(r))].concat(t).concat([Ze.encodeI256(BigInt(e.mOfN))]),o=Uint8Array.from(n.reduce((i,a)=>Uint8Array.from([...i,...a]),new Uint8Array));return Ze.bs58.encode(o)}function qX(){return Of()}function VE(e){const t=Of().find(r=>r.name===e);if(t===void 0)throw new Error(`The multisig ${e} does not exist`);return t}function LLe(e){const t=r2(),[r,n]=k.useState();return k.useEffect(()=>{e!==void 0&&t.addresses.getAddressesAddressBalance(e).then(n).catch(o=>{console.error(`Get balance error: ${o}`)})},[e]),r}function ULe(e,t){var n,o;if(e===void 0||t===void 0)return"";const r=t.id===Ze.ALPH_TOKEN_ID?e.balance:(o=(n=e.tokenBalances)==null?void 0:n.find(i=>i.id===t.id))==null?void 0:o.amount;return r===void 0?"":Ze.prettifyTokenAmount(r,t.decimals)}function zLe(e){return e.length===64&&Ze.isHexString(e)}async function HLe(e,t,r,n){const o=await e.addresses.getAddressesAddressBalance(t);r.forEach((i,a)=>{var f,d,p,h;const s=a===Ze.ALPH_TOKEN_ID?o.lockedBalance:((d=(f=o.lockedTokenBalances)==null?void 0:f.find(m=>m.id===a))==null?void 0:d.amount)??0n,l=a===Ze.ALPH_TOKEN_ID?o.balance:((h=(p=o.tokenBalances)==null?void 0:p.find(m=>m.id===a))==null?void 0:h.amount)??0n,c=BigInt(l)-BigInt(s),u=n.find(m=>m.id===a);if(ci.pubkeys.find(u=>u.name===c).pubkey),s=new Map,l=n.map(c=>{if(c.tokenId===""||c.tokenAmount===void 0)throw new Error("Please input the amount");const u=o.find(p=>p.id===c.tokenId),f=Ze.convertAmountWithDecimals(c.tokenAmount,u.decimals),d=s.get(c.tokenId);if(d===void 0?s.set(c.tokenId,f):s.set(c.tokenId,f+d),c.tokenId!==Ze.ALPH_TOKEN_ID){const p=s.get(Ze.ALPH_TOKEN_ID);return p===void 0?s.set(Ze.ALPH_TOKEN_ID,Ze.DUST_AMOUNT):s.set(Ze.ALPH_TOKEN_ID,p+Ze.DUST_AMOUNT),{address:c.address,attoAlphAmount:Ze.DUST_AMOUNT.toString(),tokens:[{id:c.tokenId,amount:f.toString()}]}}else return{address:c.address,attoAlphAmount:f.toString()}});return await HLe(e,i.address,s,o),await e.multisig.postMultisigBuild({fromAddress:i.address,fromPublicKeys:a,destinations:l})}async function WLe(e,t,r,n){const o=VE(t);if(r.length!==o.mOfN)throw new Error(`Please select ${o.mOfN} signers`);const i=r.map(c=>o.pubkeys.find(u=>u.name===c).pubkey),s=(await e.multisig.postMultisigSweep({fromAddress:o.address,fromPublicKeys:i,toAddress:n})).unsignedTxs[0].unsignedTx,l=await e.transactions.postTransactionsDecodeUnsignedTx({unsignedTx:s});return[s,l]}async function qLe(e,t){const r=await e.getSelectedAccount(),{signature:n}=await e.signUnsignedTx({signerAddress:r.address,signerKeyType:r.keyType,unsignedTx:t});return{signer:r.publicKey,signature:n}}async function GLe(e,t,r,n,o){const i=VE(t);if(o.length!==i.mOfN)throw new Error(`Expect ${i.mOfN} signatures`);const a=Ze.binToHex(Vb.blake2b(Ze.hexToBinUnsafe(n),void 0,32)),s=o.map(c=>{const u=i.pubkeys.find(f=>f.name===c.name).pubkey;return{name:c.name,pubkey:u,signature:c.signature}}),l=Array(i.pubkeys.length).fill("");return s.forEach(c=>{const u=i.pubkeys.findIndex(f=>f.pubkey===c.pubkey);if(u===-1)throw new Error(`Unknown signer: ${c.name}`);if(KLe(i,r,a,c,c.signature),l[u]!=="")throw new Error(`Duplicate signature from signer ${c.name}`);l[u]=c.signature}),await e.multisig.postMultisigSubmit({unsignedTx:n,signatures:l.filter(c=>c!=="")})}function KLe(e,t,r,n,o){if(Ze.verifySignature(r,n.pubkey,o))return;throw t.map(a=>e.pubkeys.find(s=>s.name===a)).forEach(a=>{if(a.pubkey!==n.pubkey&&Ze.verifySignature(r,a.pubkey,o))throw new Error(`The signature ${mD(o)} is from ${a.name}, not ${n.name}`)}),new Error(`Invalid signature ${mD(o)}`)}function mD(e){return`${e.slice(0,6)}...${e.slice(-6)}`}async function GX(e,t,r=30){try{await e.transactions.getTransactionsTransactionHash(t);return}catch(n){if(console.error(`Get transaction status error: ${n}`),r===0)throw n}await new Promise(n=>setTimeout(n,4e3)),await GX(e,t,r-1)}function YLe(e){const t={...e};delete t.address;const r=JSON.stringify(t),n=Ze.binToHex(Vb.blake2b(r,void 0,32));return btoa(r+n)}function XLe(e){const t=atob(e);if(t.length<=64)throw new Error("Invalid config");const r=t.length-64,n=t.slice(r),o=t.slice(0,r),i=Ze.binToHex(Vb.blake2b(o,void 0,32));if(n!==i)throw new Error("Invalid config hash");return ZLe(JSON.parse(o))}function ZLe(e){const t=e.name;if(t===void 0||t==="")throw new Error("Invalid config name");if(VX(t))throw new Error("The multisig already exists");const r=e.pubkeys;if(r===void 0||!Array.isArray(r))throw new Error("Expected a non-empty pubkey array");const n=r.length;if(n===0)throw new Error("The pubkey list is empty");r.forEach((i,a)=>{const s=i.name;if(s===void 0||s==="")throw new Error(`Invalid name in the pubkeys list, index: ${a}`);const l=i.pubkey;if(l===void 0||!WX(l))throw new Error(`Invalid pubkey in the pubkeys list, index: ${a}`)});const o=e.mOfN;if(o===void 0||typeof o!="number")throw new Error("Invalid mOfN");if(o<1||o>n)throw new Error("Invalid value of mOfN");return e}function yD(e){const t=e.indexOf("."),r=e.lastIndexOf(".");return parseInt(e.slice(t+1,r))}function JLe(){const e=k.useMemo(()=>{const a=window.localStorage.getItem(Y1);if(a)try{return JSON.parse(a)}catch{console.log("Failed to parse stored value")}return A6},[]),t=yE({validateInputOnChange:[`pubkeys.${ou}.pubkey`],initialValues:e,validate:{name:a=>a===""?"Empty name":VX(a)?"The multisig already exists":null,pubkeys:{pubkey:(a,s,l)=>{if(a==="")return"Empty public key";if(!WX(a))return"Invalid public key";const c=s.pubkeys.findIndex(u=>u.pubkey===a);return yD(l)!==c?"Duplicate public key":null},name:(a,s,l)=>{if(a==="")return"Empty name";const c=s.pubkeys.findIndex(u=>u.name===a);return yD(l)!==c?"Duplicate name":null}}}}),r=k.useRef(),n=_0();k.useEffect(()=>{window.localStorage.setItem(Y1,JSON.stringify(t.values))},[t.values]),k.useEffect(()=>{t.values.pubkeys.lengtht.onSubmit(a=>{const s={...a,address:h2(a)};window.localStorage.setItem(Y1,JSON.stringify(s)),HX(s),NLe(),n("/multisig/show?name="+a.name)}),[t,n]);console.log("form.values",t.values);const i=t.values.pubkeys.map((a,s)=>R.jsx(ILe,{index:s,draggableId:s.toString(),children:l=>R.jsxs(jt,{position:"apart",spacing:"xl",ref:l.innerRef,mt:"xs",...l.draggableProps,children:[R.jsx(m0,{...l.dragHandleProps,children:R.jsx(Bbe,{size:"1.2rem"})}),R.jsx(Oi,{radius:"md",placeholder:"Name",ta:"left",...t.getInputProps(`pubkeys.${s}.name`)}),R.jsx(Oi,{radius:"md",placeholder:"Public Key",w:"32rem",ta:"left",...t.getInputProps(`pubkeys.${s}.pubkey`)}),R.jsx(b0,{label:"Remove Signer",disabled:t.values.pubkeys.length===1,children:R.jsx(Hbe,{size:"1.2rem",onClick:()=>t.values.pubkeys.length!==1&&t.removeListItem("pubkeys",s)})})]})},s));return R.jsx(Je,{maw:900,mx:"auto",mt:"5rem",children:R.jsxs("form",{onSubmit:o,children:[R.jsxs(jt,{position:"center",children:[R.jsx(_t,{fw:"700",size:"xl",children:"Choose a Name"}),R.jsx(Oi,{placeholder:"Multisig Name",ta:"left",size:"md",...t.getInputProps("name")})]}),R.jsxs(wu,{mt:"2rem",px:"2rem",py:"1.5rem",children:[R.jsx(_t,{ta:"left",fw:"700",children:"Signers"}),R.jsx(Gje,{onDragEnd:({destination:a,source:s})=>t.reorderListItem("pubkeys",{from:s.index,to:a.index}),children:R.jsx(zX,{droppableId:"dnd-list",direction:"vertical",children:a=>R.jsxs("div",{...a.droppableProps,ref:a.innerRef,children:[i,a.placeholder]})})}),R.jsxs(jt,{position:"apart",mt:"lg",children:[R.jsx(sr,{variant:"light",radius:"md",onClick:()=>t.setValues(A6),children:"Reset Signers"}),R.jsx(sr,{variant:"light",radius:"md",onClick:()=>t.insertListItem("pubkeys",{name:"",pubkey:""}),children:"Add Signer"})]})]}),R.jsxs(wu,{mt:"xl",px:"2rem",py:"1.5rem",children:[R.jsx(_t,{weight:700,ta:"left",children:"Signatures Required"}),R.jsxs(jt,{position:"apart",children:[R.jsx(OU,{mt:me("2.5rem"),w:"70%",pb:"md",px:"md",min:0,max:t.values.pubkeys.length,step:1,value:t.values.mOfN,label:a=>`${a} of ${t.values.pubkeys.length}`,labelAlwaysOn:!0,thumbSize:1,styles:a=>({label:{backgroundColor:a.colorScheme==="dark"?a.colors.dark[3]:a.colors.blue[3]}})}),R.jsxs(jt,{spacing:5,mt:"md",children:[R.jsx(Dv,{size:36,variant:"default",onClick:()=>r.current.decrement(),children:"–"}),R.jsx(kp,{hideControls:!0,value:t.values.mOfN,size:"xs",onChange:a=>t.setValues({mOfN:a!==""?a:1}),handlersRef:r,max:t.values.pubkeys.length,min:1,step:1,styles:{input:{width:me(54),textAlign:"center"}}}),R.jsx(Dv,{size:36,variant:"default",onClick:()=>r.current.increment(),children:"+"})]})]})]}),R.jsx(jt,{position:"right",mt:"xl",mx:"lg",children:R.jsx(sr,{type:"submit",children:"Create Multisig"})})]})})}function QLe(){const[e,t]=k.useState(),[r,n]=k.useState(),o=_0(),i=k.useCallback(()=>{r!==void 0&&(HX({...r,address:h2(r)}),o("/multisig/show?name="+r.name))},[r,o]),a=k.useCallback(s=>{if(t(void 0),s===""){t("Please input the configuration");return}try{n(XLe(s))}catch(l){t(`${l}`)}},[n,t]);return R.jsxs(Je,{maw:800,mx:"auto",mt:"5rem",children:[R.jsx(_t,{ta:"left",fw:"700",size:"xl",children:"Multisig Configuration"}),R.jsx(Pi.Description,{ta:"left",size:"md",children:"You can import the multisig configuration shared by the creator of the multisig address."}),R.jsx(m4,{placeholder:"Paste the configuration here",minRows:8,mt:"lg",onChange:s=>a(s.target.value)}),e?R.jsx(_t,{color:"red",mt:"md",ta:"right",children:e}):null,R.jsxs(jt,{position:"right",mt:"lg",children:[R.jsx("div",{style:{flex:1}}),R.jsx(sr,{onClick:i,disabled:e!==void 0||r===void 0,children:"Import Multisig"})]})]})}function eUe(){const e=qX(),t=lf(),r=new URLSearchParams(t.search),n=r.get("name");if(console.log(t.search,r,n),n){const o=e.find(i=>i.name===n);return o===void 0?[e,n,void 0]:[e,n,o]}else return[e,void 0,void 0]}function tUe(){const[e,t,r]=eUe(),[n,{open:o,close:i}]=DN(!1),{account:a}=t2(),s=_0();return R.jsxs(Je,{maw:850,mx:"auto",mt:"5rem",ta:"left",children:[R.jsxs(jt,{position:"center",children:[R.jsx(_t,{fw:"700",size:"xl",children:"Select Multisig"}),R.jsx(rm,{size:"md",placeholder:"Pick one",data:e.map(l=>({value:l.name,label:l.name})),value:t,onChange:l=>s("/multisig/show?name="+l)})]}),R.jsxs(Na,{opened:n,onClose:i,withCloseButton:!1,styles:{inner:{right:0}},children:[R.jsxs(H_,{icon:R.jsx(Ibe,{size:"1rem"}),title:"Attention!",color:"red",mt:"lg",children:["This action will remove multisig ",R.jsx(v4,{children:t})," from your browser. You will need to re-import the configuration to use it again."]}),R.jsx(jt,{position:"center",mt:"lg",children:R.jsx(sr,{color:"red",onClick:()=>{i(),t&&(BLe(t),s("/multisig/show"))},children:"Confirm"})})]}),t&&r&&R.jsxs(Je,{mx:"auto",mt:"2rem",w:"100%",children:[R.jsx(n2,{data:{Address:R.jsx(jt,{position:"center",mx:"auto",children:R.jsx(Ds,{value:h2(r)})}),"Number of Signers":r.pubkeys.length,"Required Signers":r.mOfN,Signers:R.jsx(ks,{children:r.pubkeys.map(({name:l,pubkey:c})=>{const u=Ze.addressFromPublicKey(c);return[R.jsx(ks.Col,{span:2,children:R.jsx(w0,{h:"100%",children:R.jsxs(_t,{fw:"450",my:"auto",ta:"right",children:[l,":"]})})},l),R.jsx(ks.Col,{span:10,children:R.jsx(Ds,{value:u,color:(a==null?void 0:a.address)===u?"yellow":void 0})},c)]})})}}),R.jsxs(jt,{position:"apart",mt:"2rem",mx:"lg",children:[R.jsx(sr,{onClick:o,children:"Remove"}),R.jsx(Yy,{value:YLe(r),timeout:1e3,children:({copied:l,copy:c})=>R.jsx(b0,{label:l?"Copied":null,opened:l,withArrow:!0,children:R.jsx(sr,{onClick:c,children:"Export"})})})]})]})]})}function rUe(){const[e,t]=k.useState(),[r,n]=k.useState(),[o,i]=k.useState(!1),[a,s]=k.useState(),[l,c]=k.useState(),[u,f]=k.useState(),{account:d,signer:p,connectionStatus:h}=t2(),[m,_]=k.useState(),w=r2(),g=k.useCallback(async y=>{try{if(i(!0),!Ze.isHexString(y))throw new Error("Invalid unsigned tx");const U=await iUe(w,y),L=oUe(U.unsignedTx.inputs[0].unlockScript),G=U.unsignedTx.fixedOutputs[0],V=nUe(L);c(L),s(V),f({recipient:G.address,amount:Ze.prettifyAttoAlphAmount(BigInt(G.attoAlphAmount)),fee:Ze.prettifyAttoAlphAmount(BigInt(U.unsignedTx.gasPrice)*BigInt(U.unsignedTx.gasAmount)),txId:U.unsignedTx.txId}),i(!1),_(void 0)}catch(U){i(!1),_(`Error: ${U}`),console.error(U)}},[s,i]),[E,A]=k.useState();k.useEffect(()=>{A(void 0)},[d]);const N=k.useCallback(async()=>{try{if(r===void 0||!Ze.isHexString(r))throw new Error("Invalid unsigned tx");if(h!=="connected")throw new Error("Wallet is not connected");if(l!==void 0&&l.find(U=>U.pubkey===d.publicKey)===void 0)throw new Error("The currently connected account is not the expected signer");const y=await qLe(p,r);t(y)}catch(y){A(`Error: ${y}`),console.error(y)}},[r,t,l,p,d,h]),D=k.useCallback(()=>{i(!1),t(void 0),s(void 0),f(void 0),_(void 0),A(void 0),c(void 0)},[i,t,s]);return R.jsxs(Je,{maw:900,mx:"auto",mt:"5rem",children:[R.jsx(_t,{ta:"left",fw:"700",size:"xl",children:"Transaction to sign"}),R.jsx(Pi.Description,{ta:"left",size:"md",children:"The transaction must be created by the multisig address."}),R.jsx(m4,{placeholder:"Paste your multisig transaction here",minRows:6,mt:"md",value:r??"",onChange:y=>{D(),y.target.value===""?n(void 0):(n(y.target.value),g(y.target.value))},styles:{input:{color:"gray",opacity:.9}}}),m?R.jsx(_t,{color:"red",mt:"md",mx:"lg",ta:"left",children:m}):o||!r?null:R.jsxs(Je,{mt:"xl",children:[R.jsx(_t,{ta:"left",fw:"700",mb:"lg",children:"Transaction Details"}),R.jsx(n2,{px:0,py:0,verticalSpacing:"sm",data:{Multisig:a?R.jsx(z3,{href:`/alephium-toolkit/#/multisig/show?name=${a.name}`,target:"_blank",children:a.name}):R.jsx(v4,{color:"red",children:"unknown"}),Recipient:R.jsx(Ds,{value:(u==null?void 0:u.recipient)??""}),"ALPH Amount":(u==null?void 0:u.amount)+" ALPH","Transaction Fee":(u==null?void 0:u.fee)+" ALPH","Transaction Hash":R.jsx(Ds,{value:(u==null?void 0:u.txId)??""})}})]}),E&&R.jsx(_t,{color:"red",mt:"md",mx:"lg",ta:"left",children:E}),e?R.jsxs(Je,{children:[R.jsx(_t,{ta:"left",fw:"700",mt:"xl",children:"Copy and share the signature:"}),R.jsx(jt,{position:"apart",mt:"md",children:R.jsx(Ds,{value:e.signature})})]}):R.jsxs(jt,{position:"apart",mt:"xl",mx:"md",children:[R.jsx(sr,{disabled:o||!!m||!r,onClick:()=>n(void 0),children:"Reset"}),R.jsx(sr,{disabled:o||!!m||!r,onClick:N,children:"Sign Transaction"})]})]})}function nUe(e){const t=e[e.length-1].index;return Of().find(n=>n.mOfN!==e.length||n.pubkeys.lengthn.pubkeys[i].pubkey===o))}function oUe(e){if(!e.startsWith("01"))throw new Error("Invalid p2mpk unlock script");const t=[],r=parseInt(e.slice(2,4),16);let n=4;for(let o=0;oi.unlockScript===n))throw new Error("Invalid unsigned tx, the input from different address");return r}function aUe(){const e=k.useMemo(()=>{const V=window.localStorage.getItem(k6);if(V)try{return JSON.parse(V)}catch{console.log("Failed to parse stored value")}return I6},[]),t=yE({validateInputOnChange:[`destinations.${ou}.address`,`destinations.${ou}.tokenId`,`destinations.${ou}.tokenAmount`,`signatures.${ou}.signature`],initialValues:e,validate:{multisig:V=>V===""?"Please select multisig":null,destinations:{address:V=>V===""?"Empty address":Ze.isBase58(V)?null:"Invalid address",tokenId:V=>zLe(V)?null:"Invalid token id",tokenAmount:(V,S)=>{if(V===void 0)return"Token amount is empty";const C=u.find(v=>v.id===S.destinations[0].tokenId);if(C!==void 0){const v=Ze.convertAmountWithDecimals(V,C.decimals);return v===void 0||v<=0n?"Invalid token amount":null}}},signatures:{signature:V=>jLe(V)?null:"Invalid signature"}}}),r=qX(),[n,o]=k.useState(),i=r2(),a=DMe(),s=MMe(),[l,c]=k.useState(),[u,f]=k.useState([]),d=LLe(l);k.useEffect(()=>{if(d===void 0)return;const V=[];for(const S of d.tokenBalances??[]){const C=s.find(v=>v.id===S.id);C&&V.push({...C})}V.push(Yu.ALPH),f(V)},[d]),k.useEffect(()=>{if(t.values.multisig==="")c(void 0);else{const V=r.find(S=>S.name===t.values.multisig);V!==void 0&&c(h2(V))}},[t.values.multisig,r]);const[p,h]=k.useState(),m=k.useCallback(V=>{const S=t.getInputProps(V);return{...S,onChange:v=>{S.onChange(v),h(void 0)}}},[t,h]),_=k.useCallback(async()=>{try{if(t.values.sweep){t.setValues({step:1});return}if(t.values.destinations.some((C,v)=>{const b=t.validateField(`destinations.${v}.address`),B=t.validateField(`destinations.${v}.tokenId`),T=t.validateField(`destinations.${v}.tokenAmount`),j=C.tokenId===""||C.tokenAmount===void 0,H=b.hasError||B.hasError||T.hasError;return j||H}))throw new Error("Invalid destinations");const S=await VLe(i,t.values.multisig,t.values.signers,t.values.destinations,u);h(void 0),console.log(`Build multisig tx result: ${JSON.stringify(S)}`),t.setValues({unsignedTx:S.unsignedTx,step:1})}catch(V){h(`Error in build multisig tx: ${V}`),console.error(V)}},[t,u]),w=k.useCallback(async()=>{try{if(t.values.destinations.some((S,C)=>t.validateField(`destinations.${C}.address`).error))throw new Error("Invalid destinations");if(t.validateField("signers").hasError)throw new Error("Please select signers");if(t.values.destinations[0].tokenId==="")throw new Error("Please select token");if(t.values.destinations[0].tokenId===Ze.ALPH_TOKEN_ID){const[S,C]=await WLe(i,t.values.multisig,t.values.signers,t.values.destinations[0].address);console.log("Build multisig tx result:",C);const v=BigInt(C.unsignedTx.fixedOutputs[0].attoAlphAmount),b=Ze.number256ToNumber(v,18);console.log(v,b),h(void 0),t.setValues({sweep:!0,unsignedTx:S,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:t.values.destinations[0].tokenId,tokenAmount:b}]})}else if(d!==void 0){const S=t.values.destinations[0].tokenId,C=u.find(b=>b.id===S),v=d.tokenBalances.find(b=>b.id===S).amount;t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:S,tokenAmount:Ze.number256ToNumber(v,C.decimals)}]})}}catch(V){h(`Error in build multisig tx: ${V}`),console.error(V)}},[t,d,u]),g=k.useCallback(()=>{const V=t.values.destinations[0];if(V.tokenId===""||d===void 0)return;const S=u.find(C=>C.id===V.tokenId);return ULe(d,S)},[t,d,u]),[E,A]=k.useState(!1),[N,D]=k.useState(),y=k.useCallback(async()=>{try{if(t.values.unsignedTx===void 0)throw new Error("There is no unsigned tx");if(t.values.signatures.some((C,v)=>t.validateField(`signatures.${v}.signature`).hasError))throw new Error("Invalid signatures");const S=await GLe(i,t.values.multisig,t.values.signers,t.values.unsignedTx,t.values.signatures);console.log(`Submit multisig tx result: ${JSON.stringify(S)}`),o(S),t.setValues({step:3}),await GX(a,S.txId),A(!0),D(void 0),FLe()}catch(V){D(`Error in tx submission: ${V}`),console.error(V)}},[t,o]),U=PY(),L=k.useMemo(()=>{if(t.values.multisig!=="")return r.find(V=>V.name===t.values.multisig)},[t.values.multisig,r]);k.useEffect(()=>{window.localStorage.setItem(k6,JSON.stringify(t.values))},[t.values]);const G=k.useCallback(()=>{t.setValues(I6),h(void 0)},[t,h]);return R.jsx(Je,{maw:1200,mx:"auto",mt:"5rem",children:R.jsxs(ks,{columns:13,children:[R.jsx(ks.Col,{span:9,children:t.values.step===0?R.jsxs(Je,{mx:"auto",mt:"xl",ta:"left",children:[R.jsx(rm,{w:"20rem",mx:"auto",size:"md",placeholder:"Select Multisig",data:r.map(V=>({value:V.name,label:V.name})),value:t.values.multisig,onChange:V=>{G(),t.setValues({multisig:V??""})}}),L&&R.jsxs(R.Fragment,{children:[R.jsxs(wu,{mx:"xl",mt:"xl",children:[R.jsxs(_t,{ta:"left",fw:"700",children:["Select ",L.mOfN,"-of-",L.pubkeys.length," Signers"]}),R.jsx(bg.Group,{multiple:!0,onChange:V=>{const S=V.sort((v,b)=>{const B=L.pubkeys.findIndex(j=>j.name===v),T=L.pubkeys.findIndex(j=>j.name===b);return console.log(B,T),B-T}),C=S.map(v=>({name:v,signature:""}));t.setValues({signers:S,signatures:C})},children:R.jsxs(jt,{position:"center",mt:"lg",children:[...L.pubkeys.map(V=>R.jsx(bg,{value:V.name,variant:"light",radius:"xl",checked:t.values.signers.includes(V.name),disabled:t.values.signers.length>=L.mOfN&&!t.values.signers.includes(V.name),style:{marginRight:"0.5rem",marginBottom:"0.5rem"},children:V.name}))]})})]}),R.jsxs(wu,{mx:"xl",mt:"xl",children:[R.jsx(_t,{ta:"left",fw:"700",children:"Send Assets"}),R.jsxs(jt,{mt:"lg",position:"apart",mx:"0.5rem",children:[R.jsx(Oi,{label:"Recipient",ta:"left",placeholder:"Address",icon:R.jsx($be,{size:"1.25rem"}),...t.getInputProps("destinations.0.address"),w:"26rem"}),R.jsx(kp,{label:R.jsxs(jt,{position:"apart",w:"95%",mx:"auto",children:[R.jsxs(_t,{children:["Balance: ",g()]}),R.jsx(sr,{size:me(13),m:2,p:3,variant:"light",color:"indigo",compact:!0,onClick:w,children:"Max"})]}),ta:"left",precision:6,placeholder:"Amount",hideControls:!0,rightSection:R.jsx(rm,{label:"",value:t.values.destinations[0].symbol,placeholder:"Token",data:u.map(V=>V.symbol),onChange:V=>{t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:u.find(S=>S.symbol===V).symbol,tokenId:u.find(S=>S.symbol===V).id,tokenAmount:t.values.destinations[0].tokenAmount}]})}}),rightSectionWidth:"6rem",...m("destinations.0.tokenAmount"),onChange:V=>{t.setValues({sweep:!1,destinations:[{address:t.values.destinations[0].address,symbol:t.values.destinations[0].symbol,tokenId:t.values.destinations[0].tokenId,tokenAmount:Number(V)}]})},styles:{label:{width:"100%"}}})]})]}),p&&R.jsx(_t,{color:"red",mt:"lg",mx:"lg",children:p}),R.jsxs(jt,{mt:"lg",position:"apart",mx:"2rem",children:[R.jsx(sr,{onClick:G,children:"Reset"}),R.jsx(sr,{onClick:_,children:"Build Transaction"})]})]})]}):t.values.step===1?R.jsxs(Je,{maw:800,mx:"lg",mt:"xl",ta:"left",children:[R.jsx(_t,{fw:"700",size:"lg",children:"Copy and share the transaction to signers"}),R.jsxs(Pi.Description,{ta:"left",size:"md",children:["Signers should paste the transaction on the page"," ",R.jsx(z3,{href:"/alephium-toolkit/#/multisig/sign-tx",target:"_blank",children:"sign-tx"})]}),R.jsx(y4,{h:"lg"}),R.jsx(Ds,{value:t.values.unsignedTx??"",variant:"outline"}),R.jsxs(jt,{mt:"xl",position:"apart",mx:"lg",children:[R.jsx(sr,{onClick:()=>{t.setValues({step:0})},children:"Back"}),R.jsx(sr,{onClick:()=>{t.setValues({step:2})},children:"Next"})]})]}):t.values.step===2?R.jsxs(Je,{mx:"auto",mt:"xl",ta:"left",children:[R.jsxs(wu,{mx:"lg",children:[R.jsx(_t,{ta:"left",fw:"700",children:"Signatures"}),t.values.signers.map((V,S)=>R.jsxs(jt,{position:"apart",mt:"md",mx:"5rem",children:[R.jsxs(_t,{children:[V,":"]}),R.jsx(Oi,{w:"32rem",placeholder:"Signature",...t.getInputProps(`signatures.${S}.signature`)})]},V))]}),N&&R.jsx(_t,{color:"red",mt:"lg",mx:"lg",children:N}),R.jsxs(jt,{mt:"xl",position:"apart",mx:"2rem",children:[R.jsx(sr,{onClick:()=>{t.setValues({step:1})},children:"Back"}),R.jsx(sr,{onClick:y,children:"Submit"})]})]}):R.jsxs(Je,{maw:900,mx:"auto",mt:"xl",ta:"left",children:[R.jsx(jt,{position:"center",mt:"lg",children:E?R.jsx(pU,{sections:[{value:100,color:"teal"}],size:16*20,thickness:16*2,label:R.jsx(m0,{children:R.jsx(b4,{color:"teal",variant:"light",radius:"xl",size:"xl",children:R.jsx(iz,{size:42})})})}):R.jsx(Vl,{color:"teal",size:"16rem"})}),E&&R.jsxs(w0,{mt:"lg",mx:"2rem",children:[R.jsx(_t,{fw:400,fz:"1.5rem",ta:"center",children:"Transaction Submitted"}),R.jsx(z3,{href:`${U}/transactions/${n==null?void 0:n.txId}`,target:"_blank",mx:"auto",children:"View on Explorer"}),R.jsx(sr,{mx:"auto",onClick:()=>{G(),t.setValues({step:0})},children:"Create more transactions"})]})]})}),R.jsx(ks.Col,{offset:1,span:3,children:R.jsx(Je,{maw:400,mx:"auto",mt:"2.5rem",ta:"left",children:R.jsxs(ls,{active:t.values.step,onStepClick:V=>t.setValues({step:V}),orientation:"vertical",allowNextStepsSelect:!1,styles:V=>({stepIcon:{backgroundColor:V.fn.variant({variant:"light",color:V.primaryColor}).background}}),children:[R.jsx(ls.Step,{label:"Create",description:"Create a new transaction",allowStepSelect:t.values.step!==3&&t.values.step>0}),R.jsx(ls.Step,{label:"Sign",description:"Share the transaction to all signers for signatures",allowStepSelect:t.values.step!==3&&t.values.step>1}),R.jsx(ls.Step,{label:"Submit",description:"Aggregate all signatures and submit the transaction",allowStepSelect:t.values.step!==3&&t.values.step>2}),R.jsx(ls.Step,{label:"Transaction",description:"Available on the explorer"})]})})})]})})}const sUe="v2.3.5",lUe="SimpleToken",cUe="070609121b4024402d4050010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302010000000102a00002010201010015ce04b4450c7ba0001600340d7bb4b11600aba00016002ba1000516005e",uUe="baf828fcd7be3dca1f72793e385762d18e8de775dbaa4a1508e6c66b5ad2b4a0",fUe={names:["symbol","name","decimals","supply","balance","owner","__stdInterfaceId"],types:["ByteVec","ByteVec","U256","U256","U256","Address","ByteVec"],isMutable:[!1,!1,!1,!1,!0,!1,!1]},dUe=[{name:"Withdraw",fieldNames:["amount"],fieldTypes:["U256"]}],pUe=[{name:"getSymbol",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["ByteVec"]},{name:"getName",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["ByteVec"]},{name:"getDecimals",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"getTotalSupply",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"balance",usePreapprovedAssets:!1,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:["U256"]},{name:"withdraw",usePreapprovedAssets:!1,useAssetsInContract:!0,isPublic:!0,paramNames:["amount"],paramTypes:["U256"],paramIsMutable:[!1],returnTypes:[]}],hUe=[],vUe=[{name:"ErrorCodes",fields:[{name:"InvalidOwner",value:{type:"U256",value:"0"}},{name:"InvalidWithdrawAmount",value:{type:"U256",value:"1"}}]}],gUe="0001",mUe={version:sUe,name:lUe,bytecode:cUe,codeHash:uUe,fieldsSig:fUe,eventsSig:dUe,functions:pUe,constants:hUe,enums:vUe,stdInterfaceId:gUe};let B5;function Ic(e){B5===void 0&&(B5=[gi]);const t=B5.find(r=>r.contract.codeHash===e||r.contract.codeHashDebug===e);if(t===void 0)throw new Error("Unknown code with code hash: "+e);return t.contract}class yUe extends Ze.ContractFactory{constructor(){super(...arguments);ih(this,"consts",{ErrorCodes:{InvalidOwner:BigInt(0),InvalidWithdrawAmount:BigInt(1)}});ih(this,"tests",{getSymbol:async r=>Ze.testMethod(this,"getSymbol",r),getName:async r=>Ze.testMethod(this,"getName",r),getDecimals:async r=>Ze.testMethod(this,"getDecimals",r),getTotalSupply:async r=>Ze.testMethod(this,"getTotalSupply",r),balance:async r=>Ze.testMethod(this,"balance",r),withdraw:async r=>Ze.testMethod(this,"withdraw",r)})}at(r){return new bUe(r)}}const gi=new yUe(Ze.Contract.fromJson(mUe,"","baf828fcd7be3dca1f72793e385762d18e8de775dbaa4a1508e6c66b5ad2b4a0"));class bUe extends Ze.ContractInstance{constructor(r){super(r);ih(this,"methods",{getSymbol:async r=>Ze.callMethod(gi,this,"getSymbol",r===void 0?{}:r,Ic),getName:async r=>Ze.callMethod(gi,this,"getName",r===void 0?{}:r,Ic),getDecimals:async r=>Ze.callMethod(gi,this,"getDecimals",r===void 0?{}:r,Ic),getTotalSupply:async r=>Ze.callMethod(gi,this,"getTotalSupply",r===void 0?{}:r,Ic),balance:async r=>Ze.callMethod(gi,this,"balance",r===void 0?{}:r,Ic)})}async fetchState(){return Ze.fetchContractState(gi,this)}async getContractEventsCurrentCount(){return Ze.getContractEventsCurrentCount(this.address)}subscribeWithdrawEvent(r,n){return Ze.subscribeContractEvent(gi.contract,this,r,"Withdraw",n)}async multicall(r){return await Ze.multicallMethods(gi,this,r,Ic)}}const wUe="v2.3.5",xUe="Withdraw",_Ue="01010300000005{1}0d0c{0}0105",EUe={names:["token","amount"],types:["ByteVec","U256"],isMutable:[!1,!1]},SUe=[{name:"main",usePreapprovedAssets:!0,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:[]}],CUe={version:wUe,name:xUe,bytecodeTemplate:_Ue,fieldsSig:EUe,functions:SUe},PUe="v2.3.5",OUe="DeployNewToken",kUe="01010300030018b41700{2}{1}{3}{4}16001406414c504800011306640c13016417021701160013c40de0b6b3a7640000a2{0}16011602{4}bc18",AUe={names:["templateId","name","symbol","decimals","initialSupply"],types:["ByteVec","ByteVec","ByteVec","U256","U256"],isMutable:[!1,!1,!1,!1,!1]},IUe=[{name:"main",usePreapprovedAssets:!0,useAssetsInContract:!1,isPublic:!0,paramNames:[],paramTypes:[],paramIsMutable:[],returnTypes:[]}],$Ue={version:PUe,name:OUe,bytecodeTemplate:kUe,fieldsSig:AUe,functions:IUe};new Ze.ExecutableScript(Ze.Script.fromJson(CUe));const TUe=new Ze.ExecutableScript(Ze.Script.fromJson($Ue)),DUe="1DrDyTr9RpRsQnDnXo2YRiPzPW4ooHX5LLoqXrqfMrpQH",MUe={SimpleToken:{txId:"36175eefc917ad84dd7a4f4dda4bb6d52d977ff7425f07a63c03d2d222ced780",unsignedTx:"000401010103000000091500bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a13c40de0b6b3a7640000a214405b070609121b4024402d4050010000000102ce0002010000000102ce0102010000000102ce0202010000000102ce0302010000000102a00002010201010015ce04b4450c7ba0001600340d7bb4b11600aba00016002ba1000516005e14403f0603024654030a46616b6520546f6b656e021202000400bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a0306414c5048000114030102000cae188000e039c1174876e8000137a4444796ece62cecbb2d5e37c8b170701a0c01859c425724d6850c1442e1d7281cee82000381818e63bd9e35a5489b52a430accefc608fd60aa2c7c0d1b393b5239aedf6b001c6d388b948bdfad57a980000bee85f379545a2ed9f6cceb331288842f378cf0f04012ad4ac8824aae7d6f80a00000000000000000000",signature:"ea39aec2d7bbb6e6d2ecc28621f7f5b145017db7250c9521c74e4d729eb286481675bb12f1b7c5f33b3d80efdba89cb6330ab8dca3d8300a7f7a95c0d2990f49",gasPrice:"100000000000",gasAmount:57401,blockHash:"004b4df0f6dda9d2335ffe804d60d9772e5e5bac4d596a2af95c301d8b9a7770",codeHash:"2b861c3e394586c235dca6d70e9e1803abf17a74e9c049efd0c9a37efea86203",contractInstance:{address:"27NFdRE5GFaLBceNrKy4rH1P2u8w3LAbyWHrUQoJ4pP8j",contractId:"bc5db338da0b7b5ac07754d412e61746eda150f51de4842e7fc0e93b0ce87500",groupIndex:0,methods:{}},issueTokenAmount:"0"}},RUe={},NUe={},FUe={deployerAddress:DUe,contracts:MUe,scripts:RUe,migrations:NUe};function bD(e){const t={SimpleToken:{...e.contracts.SimpleToken,contractInstance:gi.at(e.contracts.SimpleToken.contractInstance.address)}};return{...e,contracts:t}}function BUe(e,t){const r=e==="devnet"?FUe:void 0;if(r===void 0)throw Error("The contract has not been deployed to the "+e);const n=Array.isArray(r)?r:[r];if(t===void 0){if(n.length>1)throw Error("The contract has been deployed multiple times on "+e+", please specify the deployer address");return bD(n[0])}const o=n.find(i=>i.deployerAddress===t);if(o===void 0)throw Error("The contract deployment result does not exist");return bD(o)}async function jUe(e,t,{name:r,symbol:n,decimals:o,supply:i}){const a=BUe(e),s=await TUe.execute(t,{initialFields:{templateId:a.contracts.SimpleToken.contractInstance.contractId,name:zs.Buffer.from(r,"utf-8").toString("hex"),symbol:zs.Buffer.from(n,"utf-8").toString("hex"),decimals:BigInt(o),initialSupply:BigInt(i)*BigInt(10**o)},attoAlphAmount:Ze.ONE_ALPH});return console.log(s),s.txId}function $6(e,t){return $6=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$6(e,t)}function KX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$6(e,t)}const wD={disabled:!1},ly=ne.createContext(null);var Od="unmounted",Sl="exited",Cl="entering",Bc="entered",T6="exiting",La=function(e){KX(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?s?(l=Sl,i.appearStatus=Cl):l=Bc:n.unmountOnExit||n.mountOnEnter?l=Od:l=Sl,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Od?{status:Sl}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Cl&&a!==Bc&&(i=Cl):(a===Cl||a===Bc)&&(i=T6)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){o===void 0&&(o=!1),i!==null?(this.cancelNextCallback(),i===Cl?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===Sl&&this.setState({status:Od})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[k1.findDOMNode(this),s],c=l[0],u=l[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!o&&!a||wD.disabled){this.safeSetState({status:Bc},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Cl},function(){i.props.onEntering(c,u),i.onTransitionEnd(d,function(){i.safeSetState({status:Bc},function(){i.props.onEntered(c,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:k1.findDOMNode(this);if(!i||wD.disabled){this.safeSetState({status:Sl},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:T6},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Sl},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:k1.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Od)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=g4(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ne.createElement(ly.Provider,{value:null},typeof a=="function"?a(o,s):ne.cloneElement(ne.Children.only(a),s))},t}(ne.Component);La.contextType=ly;La.propTypes={};function $c(){}La.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:$c,onEntering:$c,onEntered:$c,onExit:$c,onExiting:$c,onExited:$c};La.UNMOUNTED=Od;La.EXITED=Sl;La.ENTERING=Cl;La.ENTERED=Bc;La.EXITING=T6;const LUe=La;function UUe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WE(e,t){var r=function(i){return t&&k.isValidElement(i)?t(i):i},n=Object.create(null);return e&&k.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function zUe(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(n[l])for(a=0;at in e?tze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ED=(e,t)=>{for(var r in t||(t={}))rze.call(t,r)&&_D(e,r,t[r]);if(xD)for(var r of xD(t))nze.call(t,r)&&_D(e,r,t[r]);return e};const SD={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},oze={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function ize({state:e,maxHeight:t,positioning:r,transitionDuration:n}){const[o,i]=r,a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:SD[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:oze[a]},c={opacity:0,maxHeight:0,transform:SD[a]},u={entering:l,entered:l,exiting:c,exited:c};return ED(ED({},s),u[e])}function aze(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var sze=Object.defineProperty,lze=Object.defineProperties,cze=Object.getOwnPropertyDescriptors,cy=Object.getOwnPropertySymbols,YX=Object.prototype.hasOwnProperty,XX=Object.prototype.propertyIsEnumerable,CD=(e,t,r)=>t in e?sze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,PD=(e,t)=>{for(var r in t||(t={}))YX.call(t,r)&&CD(e,r,t[r]);if(cy)for(var r of cy(t))XX.call(t,r)&&CD(e,r,t[r]);return e},uze=(e,t)=>lze(e,cze(t)),OD=(e,t)=>{var r={};for(var n in e)YX.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cy)for(var n of cy(e))t.indexOf(n)<0&&XX.call(e,n)&&(r[n]=e[n]);return r};function ZX(e){var t=e,{notification:r,autoClose:n,onHide:o,innerRef:i}=t,a=OD(t,["notification","autoClose","onHide","innerRef"]);const s=r,{autoClose:l,message:c}=s,u=OD(s,["autoClose","message"]),f=aze(n,l),d=k.useRef(),p=()=>{o(r.id),window.clearTimeout(d.current)},h=()=>{clearTimeout(d.current)},m=()=>{typeof f=="number"&&(d.current=window.setTimeout(p,f))};return k.useEffect(()=>{typeof r.onOpen=="function"&&r.onOpen(r)},[]),k.useEffect(()=>(m(),h),[n,r.autoClose]),ne.createElement(GL,uze(PD(PD({},u),a),{onClose:p,onMouseEnter:h,onMouseLeave:m,ref:i}),c)}ZX.displayName="@mantine/notifications/NotificationContainer";var fze=it((e,{zIndex:t})=>({notifications:{width:`calc(100% - ${e.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:t},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}}));const dze=fze;var pze=Object.defineProperty,hze=Object.defineProperties,vze=Object.getOwnPropertyDescriptors,kD=Object.getOwnPropertySymbols,gze=Object.prototype.hasOwnProperty,mze=Object.prototype.propertyIsEnumerable,AD=(e,t,r)=>t in e?pze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yze=(e,t)=>{for(var r in t||(t={}))gze.call(t,r)&&AD(e,r,t[r]);if(kD)for(var r of kD(t))mze.call(t,r)&&AD(e,r,t[r]);return e},bze=(e,t)=>hze(e,vze(t));function wze({limit:e}){const{state:t,queue:r,update:n,cleanQueue:o}=$ne({initialValues:[],limit:e});return{notifications:t,queue:r,showNotification:c=>{const u=c.id||Uy();return n(f=>c.id&&f.some(d=>d.id===c.id)?f:[...f,bze(yze({},c),{id:u})]),u},updateNotification:c=>n(u=>{const f=u.findIndex(p=>p.id===c.id);if(f===-1)return u;const d=[...u];return d[f]=c,d}),hideNotification:c=>n(u=>u.filter(f=>f.id===c?(typeof f.onClose=="function"&&f.onClose(f),!1):!0)),cleanQueue:o,clean:()=>n(()=>[])}}var xze=Object.defineProperty,uy=Object.getOwnPropertySymbols,JX=Object.prototype.hasOwnProperty,QX=Object.prototype.propertyIsEnumerable,ID=(e,t,r)=>t in e?xze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j5=(e,t)=>{for(var r in t||(t={}))JX.call(t,r)&&ID(e,r,t[r]);if(uy)for(var r of uy(t))QX.call(t,r)&&ID(e,r,t[r]);return e},_ze=(e,t)=>{var r={};for(var n in e)JX.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uy)for(var n of uy(e))t.indexOf(n)<0&&QX.call(e,n)&&(r[n]=e[n]);return r};const Eze=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],vc=e=>{var t=e,{className:r,position:n="bottom-right",autoClose:o=4e3,transitionDuration:i=250,containerWidth:a=me(440),notificationMaxHeight:s=me(200),limit:l=5,zIndex:c=Ta("overlay"),style:u,children:f,target:d}=t,p=_ze(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const h=Ene(),m=k.useRef({}),_=k.useRef(0),{notifications:w,showNotification:g,updateNotification:E,hideNotification:A,clean:N,cleanQueue:D}=wze({limit:l}),{classes:y,cx:U,theme:L}=dze({zIndex:c}),G=f0(),S=(L.respectReducedMotion?G:!1)?1:i,C=(Eze.includes(n)?n:"bottom-right").split("-");Yn(()=>{w.length>_.current&&setTimeout(()=>h(),0),_.current=w.length},[w]),KUe({show:g,hide:A,update:E,clean:N,cleanQueue:D});const v=w.map(b=>ne.createElement(LUe,{key:b.id,timeout:S,onEnter:()=>m.current[b.id].offsetHeight,nodeRef:{current:m.current[b.id]}},B=>ne.createElement(ZX,{innerRef:T=>{m.current[b.id]=T},notification:b,onHide:A,className:y.notification,autoClose:o,sx:[j5({},ize({state:B,positioning:C,transitionDuration:S,maxHeight:s})),...Array.isArray(b.sx)?b.sx:[b.sx]]})));return ne.createElement(z_,{target:d},ne.createElement(Je,j5({className:U(y.notifications,r),style:u,sx:j5({maxWidth:a},eze(C,L.spacing.md))},p),ne.createElement(GUe,null,v)))};vc.displayName="@mantine/notifications/Notifications";vc.show=Yl.show;vc.hide=Yl.hide;vc.update=Yl.update;vc.clean=Yl.clean;vc.cleanQueue=Yl.cleanQueue;const Sze=()=>R.jsx(H_,{icon:R.jsx(jbe,{}),variant:"light",color:"blue",title:"No wallet connected",children:"You must connect a wallet with funds to perform this operation."});function Cze(){const[e,t]=k.useState(!1),{signer:r}=t2(),[n]=hc(),o=PY(),i=yE({initialValues:{name:"",symbol:"",decimals:18,supply:1e6},validate:{name:vRe({min:3},"Name must have 3 or more characters"),symbol:c=>/[A-Z]{3,6}/.test(c)?null:"Symbol must be 3-6 capital letters",decimals:TT({min:0,max:18},"Decimals must be between 0 and 18"),supply:TT({min:1},"Supply must be a positive integer")}}),a=c=>{const u=`${o}/transactions/${c}`;Yl.show({title:"Tokens successfully issued!",message:R.jsxs("span",{children:["View your minting transaction in the explorer"," ",R.jsxs("a",{href:u,target:"_blank",rel:"noreferrer",children:["here ",R.jsx(Rbe,{size:12}),"."]})]}),icon:R.jsx(iz,{size:"1.1rem"}),color:"teal"})},s=c=>{console.error(c),Yl.show({title:"Failed to issue tokens",message:`Error: ${c.message}`,icon:R.jsx(Wbe,{size:"1.1rem"}),color:"red"})},l=c=>{t(!0),jUe(n,r,c).then(a).catch(s).finally(()=>t(!1))};return R.jsx(m0,{h:me("80%"),children:R.jsx(f4,{shadow:"xs",p:"md",children:R.jsx(w0,{spacing:"md",children:R.jsxs(Je,{ta:"left",w:"40rem",mx:"auto",children:[!r&&R.jsx(Sze,{}),R.jsx(Zy,{order:1,children:"Issue new tokens"}),R.jsx(_t,{size:"xs",c:"dimmed",children:"Newly created tokens will be owned by your currently connected wallet account."}),R.jsx(y4,{h:"md"}),R.jsxs("form",{onSubmit:i.onSubmit(l),children:[R.jsx(Oi,{label:"Token Name",withAsterisk:!0,placeholder:"Token Name",...i.getInputProps("name")}),R.jsx(Oi,{mt:"md",label:"Token Symbol",withAsterisk:!0,description:"Symbol must be 3-6 capital letters",placeholder:"Token Symbol",...i.getInputProps("symbol")}),R.jsx(kp,{mt:"md",label:"Decimals",withAsterisk:!0,description:"Must be in the range of 0-18",placeholder:"Decimals",hideControls:!0,...i.getInputProps("decimals")}),R.jsx(kp,{mt:"md",label:"Token Supply",withAsterisk:!0,placeholder:"supply",hideControls:!0,...i.getInputProps("supply")}),R.jsx(jt,{position:"right",mt:"xl",children:R.jsx(sr,{type:"submit",disabled:!r,loading:e,children:"Issue Tokens"})})]})]})})})})}function Pze(){const e=Ir();return R.jsx(hbe,{children:R.jsx(RF,{styles:{main:{background:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}},navbarOffsetBreakpoint:"sm",asideOffsetBreakpoint:"sm",navbar:R.jsx(Xbe,{}),footer:R.jsx($F,{height:60,p:"md",children:R.jsx(_t,{fw:"bold",fz:"sm",children:"Powered by BlockFlow, Stateful UTXO, PoLW"})}),header:R.jsx(jMe,{}),children:R.jsxs(lbe,{children:[R.jsx(vr,{path:"/",element:R.jsx(HMe,{})}),R.jsx(vr,{path:"/token/all",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/token/info",element:R.jsx(WMe,{})}),R.jsx(vr,{path:"/token/new",element:R.jsx(Cze,{})}),R.jsx(vr,{path:"/token/burn",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/nft/all",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/nft/info",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/nft/new-collection",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/nft/burn",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/contract/play",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/contract/info",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/contract/deploy",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/multisig",element:R.jsx(fi,{})}),R.jsx(vr,{path:"/multisig/create",element:R.jsx(JLe,{})}),R.jsx(vr,{path:"/multisig/import",element:R.jsx(QLe,{})}),R.jsx(vr,{path:"/multisig/show",element:R.jsx(tUe,{})}),R.jsx(vr,{path:"/multisig/build-tx",element:R.jsx(aUe,{})}),R.jsx(vr,{path:"/multisig/sign-tx",element:R.jsx(rUe,{})})]})})})}function Oze(){const[e,t]=Ane({key:"mantine-color-scheme",defaultValue:"light",getInitialValueInEffect:!1}),r=k.useMemo(()=>$Me(),[]),n=o=>t(o||(e==="dark"?"light":"dark"));return Kne([["mod+J",()=>n()]]),R.jsx(lMe,{theme:e==="dark"?"retro":"nouns",network:r,children:R.jsx("div",{className:"App",children:R.jsx(SN,{colorScheme:e,toggleColorScheme:n,children:R.jsxs(_N,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:e},children:[R.jsx(vc,{}),R.jsx(f4,{children:R.jsx(Pze,{})})]})})})})}L5.createRoot(document.getElementById("root")).render(R.jsx(Oze,{})); diff --git a/index.html b/index.html index a41bc05..f45d681 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Alephium Toolkit - +